feat: cuando seleccionas 'allClients' no tiene en cuenta el 'clientsRange'
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2022-10-21 10:06:34 +02:00
parent 53112995bc
commit b06f5b7246
3 changed files with 18 additions and 5 deletions

View File

@ -13,7 +13,16 @@
url="Companies"
data="companies"
order="code">
</vn-crud-model>
</vn-crud-model>
<div
class="progress vn-my-md"
ng-if="$ctrl.packageInvoicing">
<vn-horizontal>
<div>
{{'Calculating packages to invoice...' | translate}}
</div>
</vn-horizontal>
</div>
<div
class="progress vn-my-md"
ng-if="$ctrl.lastClientId">
@ -40,7 +49,8 @@
<vn-radio
label="All clients"
val="allClients"
ng-model="$ctrl.clientsNumber">
ng-model="$ctrl.clientsNumber"
ng-click="$ctrl.$onInit()">
</vn-radio>
<vn-radio
label="Clients range"
@ -53,6 +63,7 @@
url="Clients"
label="From client"
search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}"
order="id"
show-field="name"
value-field="id"
ng-model="$ctrl.invoice.fromClientId">
@ -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">

View File

@ -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);

View File

@ -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
Clients range: Rango de clientes
Calculating packages to invoice...: Calculando paquetes a factura...