|
@@ -0,0 +1,131 @@
|
|
1
|
+
|
|
2
|
+{% extends "backOffice/admin/layout/layout.base.html.twig" %}
|
|
3
|
+{% set company = trainingOrganization.getCompany() %}
|
|
4
|
+<div class="container mt-3 border bg-light">
|
|
5
|
+ <div class="row border-bottom">
|
|
6
|
+ <div class="col-12 my-3">
|
|
7
|
+ <div class="d-flex justify-content-between align-items-center">
|
|
8
|
+ <h1>{{ company.getName() }}</h1>
|
|
9
|
+ </div>
|
|
10
|
+ {% include 'backOffice/admin/layout/partial/breadcrumb.html.twig' %}
|
|
11
|
+ </div>
|
|
12
|
+ </div>
|
|
13
|
+
|
|
14
|
+ {{ form_start(form, {attr: {class: 'form-with-validation needs-validation pb-0'} }) }}
|
|
15
|
+
|
|
16
|
+ <div class="message-display"></div>
|
|
17
|
+ <div class="row my-3 mx-auto">
|
|
18
|
+ <div class="col-12 px-0">
|
|
19
|
+ {% set icon_url = asset('build/images/entrepriseNoir.png') %}
|
|
20
|
+ {% if company.getLogo() != "" %}
|
|
21
|
+ {% set icon_url = url('drawUpload',{'name': company.getLogo()}) %}
|
|
22
|
+ {% endif %}
|
|
23
|
+ <h2 class="mx-0" >{{ 'label_transaction_training_organization_name'|trans }}</h2>
|
|
24
|
+ <div class="row px-3">
|
|
25
|
+ <img src="{{ icon_url }}" class="w-max-px-150" alt="Logo entreprise">
|
|
26
|
+
|
|
27
|
+ <div class="col">
|
|
28
|
+ <div>
|
|
29
|
+ <label class="d-inline-block w-px-100 text-right mr-4">{{ 'label_transaction_training_organisation_name'|trans }}</label>
|
|
30
|
+ <span>{{ company.getName() }}</span>
|
|
31
|
+ </div>
|
|
32
|
+ <div>
|
|
33
|
+ <label class="d-inline-block w-px-100 text-right mr-4">{{ 'label_transaction_training_organisation_siret'|trans }}</label>
|
|
34
|
+ <span>{{ company.getSiret() }}</span>
|
|
35
|
+ </div>
|
|
36
|
+ <div>
|
|
37
|
+ <label class="d-inline-block w-px-100 text-right mr-4">{{ 'label_transaction_training_organisation_address'|trans }}</label>
|
|
38
|
+ <span>{{ company.getAddress() }}</span>,
|
|
39
|
+ <span>{{ company.getPostalCode() }}</span>,
|
|
40
|
+ <span>{{ company.getCity() }}</span>,
|
|
41
|
+ <span>{% set country = company.getCountry() %}{% if country %}{{ country.getName() }}{% else %}NA{% endif %}</span>
|
|
42
|
+ </div>
|
|
43
|
+ <div>
|
|
44
|
+ <label class="d-inline-block w-px-100 text-right mr-4">{{ 'label_transaction_training_organisation_phone'|trans }}</label>
|
|
45
|
+ <span>{{ company.getPhone() }}</span>
|
|
46
|
+ </div>
|
|
47
|
+ <div>
|
|
48
|
+ <label class="d-inline-block w-px-100 text-right mr-4">{{ 'label_transaction_training_organisation_email'|trans }}</label>
|
|
49
|
+ <span>{{ company.getEmail() }}</span>
|
|
50
|
+ </div>
|
|
51
|
+ </div>
|
|
52
|
+ </div>
|
|
53
|
+ </div>
|
|
54
|
+ </div>
|
|
55
|
+
|
|
56
|
+ <div class="row my-3">
|
|
57
|
+ <div class="col-12 px-3">
|
|
58
|
+ <h2 class="mx-0" ><?php echo CPTViewUtility::escapeHtml(_CPT_FACTURATION_CLIENT_TRANSACTIONS); ?></h2>
|
|
59
|
+ <table class="table w-100 td-d-block td-d-lg-table-cell td-md-cell-label mt-1">
|
|
60
|
+ <thead>
|
|
61
|
+ <tr>
|
|
62
|
+ <th scope="col" class="header">{{ 'label_transaction_estimate_id'|trans }}</th>
|
|
63
|
+ <th scope="col" class="header">{{ 'label_transaction_create_date'|trans }}</th>
|
|
64
|
+ <th scope="col" class="header">{{ 'label_transaction_client_description'|trans }}</th>
|
|
65
|
+ <th scope="col" class="header">{{ 'label_transaction_client_price'|trans }}</th>
|
|
66
|
+ </tr>
|
|
67
|
+ </thead>
|
|
68
|
+ <tbody>
|
|
69
|
+ {% set description = "" %}
|
|
70
|
+ {% set total = 0 %}
|
|
71
|
+ {% for transaction in transaction %}
|
|
72
|
+ {% set estimate = transaction.getEstimate() %}
|
|
73
|
+ {% set description = description ~ transaction.getDescription() %}
|
|
74
|
+ {% set total = total + transaction.getPrice() %}
|
|
75
|
+
|
|
76
|
+ <tr>
|
|
77
|
+ <td class="align-top table__cell" data-title="{{ 'label_transaction_estimate_id'|trans }}">
|
|
78
|
+ {{ estimate.getEstimatId() }}
|
|
79
|
+ </td>
|
|
80
|
+ <td class="align-top table__cell" data-title="{{ 'label_transaction_create_date'|trans }}">
|
|
81
|
+ {{ transaction.getDateCreate()|date('d/m/Y H\\hi') }}
|
|
82
|
+ </td>
|
|
83
|
+ <td class="align-top table__cell" data-title="{{ 'label_transaction_client_description'|trans }}">
|
|
84
|
+ {{ transaction.getDescription()|nl2br }}
|
|
85
|
+ </td>
|
|
86
|
+ <td class="align-top table__cell" data-title="{{ 'label_transaction_client_price'|trans }}">
|
|
87
|
+ {{ transaction.getPrice()||number_format(2, '.', ' ') }}
|
|
88
|
+ </td>
|
|
89
|
+ </tr>
|
|
90
|
+ {% endfor %}
|
|
91
|
+
|
|
92
|
+ <tr>
|
|
93
|
+ <td colspan="3" class="text-right table-active" data-title="{{ ''|trans }}">
|
|
94
|
+ <span id="js-copy-montant-total" data-clipboard-text="<?php echo CPTViewListUtility::escapeHtml($montantTotal); ?>" data-copied="<?php echo CPTViewUtility::escapeHtml(_CPT_FACTURATION_CLIENT_COPIE); ?>" class="mr-2 btn btn-primary">
|
|
95
|
+ <ion-icon class="ion-ios-copy-outline mr-2"></ion-icon><?php echo CPTViewUtility::escapeHtml(_CPT_FACTURATION_CLIENT_COPIER_MONTANT_TOTAL); ?>
|
|
96
|
+ </span>
|
|
97
|
+ <?php echo CPTViewUtility::escapeHtml(_CPT_FACTURATION_CLIENT_LISTE_MONTANT_TOTAL); ?>
|
|
98
|
+ </td>
|
|
99
|
+ <td class="table-active" data-title="{{ ''|trans }}">
|
|
100
|
+ <span><?php echo CPTViewListUtility::formatPrix($montantTotal); ?></span>
|
|
101
|
+ </td>
|
|
102
|
+ </tr>
|
|
103
|
+ </tbody>
|
|
104
|
+ </table>
|
|
105
|
+
|
|
106
|
+ <span id="js-show-description-global" class="btn btn-primary" data-second-text="<?php echo CPTViewUtility::escapeHtml(_CPT_FACTURATION_CLIENT_MASQUER_DESCRIPTION_GLOBAL); ?>"><?php echo CPTViewUtility::escapeHtml(_CPT_FACTURATION_CLIENT_AFFICHER_DESCRIPTION_GLOBAL); ?></span>
|
|
107
|
+ <div id="js-description-global" class="d-none form-control">
|
|
108
|
+ <span id="js-copy-description-global" data-clipboard-target="#js-description-global-text" data-copied="<?php echo CPTViewUtility::escapeHtml(_CPT_FACTURATION_CLIENT_COPIEE); ?>" class="btn btn-primary"><ion-icon class="ion-ios-copy-outline mr-2"></ion-icon><?php echo CPTViewUtility::escapeHtml(_CPT_FACTURATION_CLIENT_COPIER_DESCRIPTION_GLOBAL); ?></span>
|
|
109
|
+ <div id="js-description-global-text">
|
|
110
|
+ <?php echo nl2br(CPTViewUtility::escapeHtml($descriptionTotal)); ?>
|
|
111
|
+ </div>
|
|
112
|
+ </div>
|
|
113
|
+ </div>
|
|
114
|
+ </div>
|
|
115
|
+ <div class="row my-3">
|
|
116
|
+ <div class="col-12 px-3">
|
|
117
|
+ <h2 class="mx-0" ><?php echo CPTViewUtility::escapeHtml(_CPT_FACTURATION_CLIENT_INFORMATION_FACTURE); ?></h2>
|
|
118
|
+ <div class="form-group">
|
|
119
|
+ <label class="like-label"><?php echo CPTViewUtility::escapeHtml(_CPT_FACTURATION_CLIENT_NUMERO_FACTURE); ?>*</label>
|
|
120
|
+ <input type="text" class="form-control" name="num_facture" value="" required/>
|
|
121
|
+ </div>
|
|
122
|
+ <div class="text-center">
|
|
123
|
+ <button type="submit" class="btn btn-primary btn-validate"><?php echo CPTViewUtility::escapeHtml(_CPT_FACTURATION_CLIENT_FACTURE_VALIDATE); ?></button>
|
|
124
|
+ </div>
|
|
125
|
+ </div>
|
|
126
|
+ </div>
|
|
127
|
+ </form>
|
|
128
|
+</div>
|
|
129
|
+<?php CPTViewUtility::setJs("js/script-view-form.js"); ?>
|
|
130
|
+<?php CPTViewUtility::setJs("js/script-view-list.js"); ?>
|
|
131
|
+<?php CPTViewUtility::setJs("js/backOffice/admin/script-transaction-client-view-form.js"); ?>
|