#886 client.fiscal-data comprobación recargo
This commit is contained in:
parent
c0e6865523
commit
3b9df59df2
|
@ -100,7 +100,8 @@
|
|||
<vn-check
|
||||
vn-one
|
||||
label="Is equalizated"
|
||||
field="$ctrl.client.isEqualizated">
|
||||
field="$ctrl.client.isEqualizated"
|
||||
info="In order to invoice, this field is not consulted, but the consignee's ET. When modifying this field if the invoice by address option is not checked, the change will be automatically propagated to all addresses, otherwise the user will be asked if he wants to propagate it or not.">
|
||||
</vn-check>
|
||||
<vn-check
|
||||
vn-one
|
||||
|
|
|
@ -15,9 +15,8 @@ export default class Controller {
|
|||
}
|
||||
|
||||
copyData() {
|
||||
if (this.client) {
|
||||
if (this.client)
|
||||
this.isEqualizated = this.client.isEqualizated;
|
||||
}
|
||||
}
|
||||
|
||||
buyerHaspermissions() {
|
||||
|
@ -26,8 +25,10 @@ export default class Controller {
|
|||
}
|
||||
|
||||
submit() {
|
||||
if (this.isEqualizated != this.client.isEqualizated)
|
||||
if (this.isEqualizated != this.client.isEqualizated) {
|
||||
this.oldHasToInvoiceByAddress = this.client.hasToInvoiceByAddress;
|
||||
this.client.hasToInvoiceByAddress = false;
|
||||
}
|
||||
|
||||
return this.$.watcher.submit().then(
|
||||
() => this.checkEtChanges());
|
||||
|
@ -37,17 +38,20 @@ export default class Controller {
|
|||
let equals = this.isEqualizated == this.client.isEqualizated;
|
||||
this.isEqualizated = this.client.isEqualizated;
|
||||
|
||||
if (!equals)
|
||||
if (!equals && !this.oldHasToInvoiceByAddress)
|
||||
this.$.propagateIsEqualizated.show();
|
||||
else if (!equals)
|
||||
this.returnDialogEt('ACCEPT');
|
||||
|
||||
delete this.oldHasToInvoiceByAddress;
|
||||
}
|
||||
|
||||
returnDialogEt(response) {
|
||||
if (response === 'ACCEPT') {
|
||||
this.$http.patch(`/client/api/Clients/${this.client.id}/addressesPropagateRe`, {isEqualizated: this.client.isEqualizated}).then(
|
||||
res => {
|
||||
if (res.data) {
|
||||
if (res.data)
|
||||
this.vnApp.showMessage(this.translate.instant('Equivalent tax spreaded'));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Yes, notify: Sí, notificar
|
||||
You changed the equalization tax: Has cambiado el recargo de equivalencia
|
||||
Do you want to spread the change?: ¿Deseas propagar el cambio a sus consignatarios?
|
||||
Frozen: Congelado
|
||||
Frozen: Congelado
|
||||
In order to invoice, this field is not consulted, but the consignee's ET. When modifying this field if the invoice by address option is not checked, the change will be automatically propagated to all addresses, otherwise the user will be asked if he wants to propagate it or not.: Para facturar no se consulta este campo, sino el RE de consignatario. Al modificar este campo si no esta marcada la casilla Facturar por consignatario, se propagará automáticamente el cambio a todos los consignatarios, en caso contrario preguntará al usuario si quiere o no propagar.
|
Loading…
Reference in New Issue