feat: update message while globalInvoicing
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
4f5abb709a
commit
53f78a98d2
|
@ -19,9 +19,7 @@
|
||||||
ng-if="$ctrl.isInvoicing">
|
ng-if="$ctrl.isInvoicing">
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-icon vn-none icon="warning"></vn-icon>
|
<vn-icon vn-none icon="warning"></vn-icon>
|
||||||
<span vn-none translate>Adding invoices to queue...</span>
|
{{$ctrl.currentClientId}} {{$ctrl.$t('of')}} {{$ctrl.lastClientId}}
|
||||||
{{$ctrl.lastClientId}}
|
|
||||||
<span translate>{{::$ctrl.lastClientId || 'Vacío'}}</span>
|
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
</div>
|
</div>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
|
|
|
@ -57,19 +57,17 @@ class Controller extends Dialog {
|
||||||
if (!this.invoice.fromClientId)
|
if (!this.invoice.fromClientId)
|
||||||
throw new Error('Choose a valid clients range');
|
throw new Error('Choose a valid clients range');
|
||||||
|
|
||||||
this.isInvoicing = true;
|
|
||||||
return this.$http.post(`InvoiceOuts/clientToInvoice`, this.invoice)
|
return this.$http.post(`InvoiceOuts/clientToInvoice`, this.invoice)
|
||||||
.then(res => {
|
.then(async res => {
|
||||||
this.lastClientId = res.data[res.data.length - 1];
|
this.lastClientId = res.data[res.data.length - 1];
|
||||||
console.log(this.lastClientId);
|
this.isInvoicing = true;
|
||||||
|
for (let clientId of res.data) {
|
||||||
|
this.currentClientId = clientId;
|
||||||
|
const params = {clientId: clientId};
|
||||||
|
await this.$http.post(`InvoiceOuts/globalInvoicing`, params);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// .then(() => {
|
.then(() => super.responseHandler(response))
|
||||||
// for (let clientId of res.data) {
|
|
||||||
// const params = {clientId: clientId};
|
|
||||||
// this.$http.post(`InvoiceOuts/globalInvoicing`, params);
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// .then(() => super.responseHandler(response))
|
|
||||||
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')))
|
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')))
|
||||||
.finally(() => this.isInvoicing = false);
|
.finally(() => this.isInvoicing = false);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -6,4 +6,5 @@ Invoice date: Fecha de factura
|
||||||
From client: Desde el cliente
|
From client: Desde el cliente
|
||||||
To client: Hasta el cliente
|
To client: Hasta el cliente
|
||||||
Invoice date and the max date should be filled: La fecha de factura y la fecha límite deben rellenarse
|
Invoice date and the max date should be filled: La fecha de factura y la fecha límite deben rellenarse
|
||||||
Choose a valid clients range: Selecciona un rango válido de clientes
|
Choose a valid clients range: Selecciona un rango válido de clientes
|
||||||
|
of: de
|
Loading…
Reference in New Issue