Преглед на файлове

[Administration] Factures > création : sélection de tous les BL en un clic

feature/souke
Guillaume Bourgeois преди 9 месеца
родител
ревизия
6d429fa189
променени са 3 файла, в които са добавени 22 реда и са изтрити 3 реда
  1. +4
    -3
      backend/views/document/_form.php
  2. +17
    -0
      backend/web/js/backend.js
  3. +1
    -0
      backend/web/js/vuejs/document-form.js

+ 4
- 3
backend/views/document/_form.php Целия файл

@@ -107,7 +107,9 @@ $documentClass = $documentModule->getClass($model);
class="table table-bordered">
<thead>
<tr>
<th></th>
<th>
<input type="checkbox" class="check-all-checkboxes" data-selector=".checkbox-delivery-note" />
</th>
<th>Libellé</th>
<th v-if="taxRateProducer != 0">Montant (TTC)</th>
<th v-else>Montant</th>
@@ -115,8 +117,7 @@ $documentClass = $documentModule->getClass($model);
</thead>
<tbody>
<tr v-for="deliveryNote in deliveryNoteCreateArray">
<td><input type="checkbox" name="Invoice[deliveryNotes][]"
:value="deliveryNote.id"/></td>
<td><input type="checkbox" class="checkbox-delivery-note" name="Invoice[deliveryNotes][]" :value="deliveryNote.id"/></td>
<td>{{ deliveryNote.name }}</td>
<td>{{ formatPrice(deliveryNote.total) }}</td>
</tr>

+ 17
- 0
backend/web/js/backend.js Целия файл

@@ -56,6 +56,7 @@ $(document).ready(function () {
opendistrib_user_form();
opendistrib_features_index();
opendistrib_point_sale_form();
opendistrib_check_all_checkboxes();
});

var UrlManager = {
@@ -68,6 +69,22 @@ var UrlManager = {
}
};

function opendistrib_check_all_checkboxes() {
$('.check-all-checkboxes').change(function() {
var selector = $(this).data('selector');
var checked = $(this).prop('checked');
$(selector).prop('checked', checked);

if(checked){
$(selector).unbind('change').change(function() {
if(!$(this).prop('checked')) {
$('.check-all-checkboxes').prop('checked', false);
}
});
}
});
}

function opendistrib_point_sale_form() {
if($('.point-sale-form').length) {
opendistrib_point_sale_form_days_distribution_event();

+ 1
- 0
backend/web/js/vuejs/document-form.js Целия файл

@@ -151,6 +151,7 @@ var app = new Vue({
} else {
app.document.address = '';
}
setTimeout("opendistrib_check_all_checkboxes();", 500);
});
},
deleteDeliveryNoteFromInvoice: function(event) {

Loading…
Отказ
Запис