From b06f5b72468622606fa104164d14ce30d038124c Mon Sep 17 00:00:00 2001 From: vicent Date: Fri, 21 Oct 2022 10:06:34 +0200 Subject: [PATCH] feat: cuando seleccionas 'allClients' no tiene en cuenta el 'clientsRange' --- .../front/index/global-invoicing/index.html | 16 ++++++++++++++-- .../front/index/global-invoicing/index.js | 4 ++-- .../front/index/global-invoicing/locale/es.yml | 3 ++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/modules/invoiceOut/front/index/global-invoicing/index.html b/modules/invoiceOut/front/index/global-invoicing/index.html index 7f96397f5..c2d1c4304 100644 --- a/modules/invoiceOut/front/index/global-invoicing/index.html +++ b/modules/invoiceOut/front/index/global-invoicing/index.html @@ -13,7 +13,16 @@ url="Companies" data="companies" order="code"> - + +
+ +
+ {{'Calculating packages to invoice...' | translate}} +
+
+
@@ -40,7 +49,8 @@ + ng-model="$ctrl.clientsNumber" + ng-click="$ctrl.$onInit()"> @@ -62,6 +73,7 @@ url="Clients" label="To client" search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}" + order="id" show-field="name" value-field="id" ng-model="$ctrl.invoice.toClientId"> diff --git a/modules/invoiceOut/front/index/global-invoicing/index.js b/modules/invoiceOut/front/index/global-invoicing/index.js index 1390f52e8..39dc31137 100644 --- a/modules/invoiceOut/front/index/global-invoicing/index.js +++ b/modules/invoiceOut/front/index/global-invoicing/index.js @@ -92,10 +92,10 @@ class Controller extends Dialog { }); this.$.invoiceButton.disabled = true; - if (this.clientsNumber == 'allClients') this.getMaxClientId(); - + this.packageInvoicing = true; this.$http.post(`InvoiceOuts/clientToInvoice`, this.invoice) .then(res => { + this.packageInvoicing = false; const invoice = res.data.invoice; const clientsAndAddresses = res.data.clientsAndAddresses; if (!clientsAndAddresses.length) return super.responseHandler(response); diff --git a/modules/invoiceOut/front/index/global-invoicing/locale/es.yml b/modules/invoiceOut/front/index/global-invoicing/locale/es.yml index 8ac2cc13a..af151684f 100644 --- a/modules/invoiceOut/front/index/global-invoicing/locale/es.yml +++ b/modules/invoiceOut/front/index/global-invoicing/locale/es.yml @@ -10,4 +10,5 @@ Choose a valid clients range: Selecciona un rango vĂ¡lido de clientes of: de Id Client: Id Cliente All clients: Todos los clientes -Clients range: Rango de clientes \ No newline at end of file +Clients range: Rango de clientes +Calculating packages to invoice...: Calculando paquetes a factura... \ No newline at end of file