feat: muestra en número de clientes en vez de su id
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
61b0aa079a
commit
06b4e03320
|
@ -1,10 +1,10 @@
|
||||||
<vn-card class="vn-w-lg">
|
<vn-card class="vn-w-lg">
|
||||||
<h5 ng-if="$ctrl.packageInvoicing" translate text-center class="vn-pa-md">{{'Calculating packages to invoice...'}}</h5>
|
<h5 ng-if="$ctrl.packageInvoicing" translate text-center class="vn-pa-md">{{'Calculating packages to invoice...'}}</h5>
|
||||||
<vn-vertical ng-if="$ctrl.lastClientId" text-center class="vn-pa-md">
|
<vn-vertical ng-if="$ctrl.clients.length" text-center class="vn-pa-md">
|
||||||
<h5 translate>Invoicing</h5>
|
<h5 translate>Invoicing</h5>
|
||||||
<div>
|
<div>
|
||||||
{{'Id Client' | translate}}: {{$ctrl.currentClientId}}
|
{{'Client' | translate}}: {{$ctrl.currentClient}}
|
||||||
{{'of' | translate}} {{::$ctrl.lastClientId}}
|
{{'of' | translate}} {{::$ctrl.clients.length}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{($ctrl.percentage / 100) | percentage: 0}}
|
{{($ctrl.percentage / 100) | percentage: 0}}
|
||||||
|
|
|
@ -10,6 +10,10 @@ class Controller extends Section {
|
||||||
maxShipped: new Date(),
|
maxShipped: new Date(),
|
||||||
companyFk: this.vnConfig.companyFk
|
companyFk: this.vnConfig.companyFk
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.invoice.invoiceDate = new Date();
|
||||||
|
this.invoice.companyFk = 442;
|
||||||
|
this.invoice.printerFk = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$onInit() {
|
$onInit() {
|
||||||
|
@ -50,9 +54,10 @@ class Controller extends Section {
|
||||||
invoiceOut(invoice, clientsAndAddresses) {
|
invoiceOut(invoice, clientsAndAddresses) {
|
||||||
const [clientAndAddress] = clientsAndAddresses;
|
const [clientAndAddress] = clientsAndAddresses;
|
||||||
if (!clientAndAddress) return;
|
if (!clientAndAddress) return;
|
||||||
this.currentClientId = clientAndAddress.clientId;
|
|
||||||
this.currentClient = ++this.currentClient;
|
this.currentClient = ++this.currentClient;
|
||||||
this.getPercentage();
|
this.getPercentage();
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
clientId: clientAndAddress.clientId,
|
clientId: clientAndAddress.clientId,
|
||||||
addressId: clientAndAddress.addressId,
|
addressId: clientAndAddress.addressId,
|
||||||
|
@ -63,7 +68,6 @@ class Controller extends Section {
|
||||||
printerFk: this.invoice.printerFk,
|
printerFk: this.invoice.printerFk,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$http.get(`Addresses/${clientAndAddress.addressId}`)
|
this.$http.get(`Addresses/${clientAndAddress.addressId}`)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.address = res.data;
|
this.address = res.data;
|
||||||
|
@ -118,7 +122,6 @@ class Controller extends Section {
|
||||||
for (const clientAndAddress of clientsAndAddresses)
|
for (const clientAndAddress of clientsAndAddresses)
|
||||||
this.clients.push(clientAndAddress.clientId);
|
this.clients.push(clientAndAddress.clientId);
|
||||||
this.currentClient = 0;
|
this.currentClient = 0;
|
||||||
this.lastClientId = clientsAndAddresses[clientsAndAddresses.length - 1].clientId;
|
|
||||||
|
|
||||||
return this.invoiceOut(invoice, clientsAndAddresses);
|
return this.invoiceOut(invoice, clientsAndAddresses);
|
||||||
})
|
})
|
||||||
|
|
|
@ -14,5 +14,5 @@ To client: Hasta cliente
|
||||||
Address id: Id dirección
|
Address id: Id dirección
|
||||||
Printer: Impresora
|
Printer: Impresora
|
||||||
of: de
|
of: de
|
||||||
Id Client: Id Cliente
|
Client: Cliente
|
||||||
Invoicing: Facturando
|
Invoicing: Facturando
|
||||||
|
|
Loading…
Reference in New Issue