diff --git a/modules/invoiceOut/front/global-invoicing/index.html b/modules/invoiceOut/front/global-invoicing/index.html index 8efd80602b..b9f6515c81 100644 --- a/modules/invoiceOut/front/global-invoicing/index.html +++ b/modules/invoiceOut/front/global-invoicing/index.html @@ -1,10 +1,10 @@
{{'Calculating packages to invoice...'}}
- +
Invoicing
- {{'Id Client' | translate}}: {{$ctrl.currentClientId}} - {{'of' | translate}} {{::$ctrl.lastClientId}} + {{'Client' | translate}}: {{$ctrl.currentClient}} + {{'of' | translate}} {{::$ctrl.clients.length}}
{{($ctrl.percentage / 100) | percentage: 0}} diff --git a/modules/invoiceOut/front/global-invoicing/index.js b/modules/invoiceOut/front/global-invoicing/index.js index fc2a5d0d16..dd992a39cb 100644 --- a/modules/invoiceOut/front/global-invoicing/index.js +++ b/modules/invoiceOut/front/global-invoicing/index.js @@ -10,6 +10,10 @@ class Controller extends Section { maxShipped: new Date(), companyFk: this.vnConfig.companyFk }; + + this.invoice.invoiceDate = new Date(); + this.invoice.companyFk = 442; + this.invoice.printerFk = 1; } $onInit() { @@ -50,9 +54,10 @@ class Controller extends Section { invoiceOut(invoice, clientsAndAddresses) { const [clientAndAddress] = clientsAndAddresses; if (!clientAndAddress) return; - this.currentClientId = clientAndAddress.clientId; + this.currentClient = ++this.currentClient; this.getPercentage(); + const params = { clientId: clientAndAddress.clientId, addressId: clientAndAddress.addressId, @@ -63,7 +68,6 @@ class Controller extends Section { printerFk: this.invoice.printerFk, }; - this.$http.get(`Addresses/${clientAndAddress.addressId}`) .then(res => { this.address = res.data; @@ -118,7 +122,6 @@ class Controller extends Section { for (const clientAndAddress of clientsAndAddresses) this.clients.push(clientAndAddress.clientId); this.currentClient = 0; - this.lastClientId = clientsAndAddresses[clientsAndAddresses.length - 1].clientId; return this.invoiceOut(invoice, clientsAndAddresses); }) diff --git a/modules/invoiceOut/front/global-invoicing/locale/es.yml b/modules/invoiceOut/front/global-invoicing/locale/es.yml index d5e501eb60..1d76550afc 100644 --- a/modules/invoiceOut/front/global-invoicing/locale/es.yml +++ b/modules/invoiceOut/front/global-invoicing/locale/es.yml @@ -14,5 +14,5 @@ To client: Hasta cliente Address id: Id dirección Printer: Impresora of: de -Id Client: Id Cliente +Client: Cliente Invoicing: Facturando