model client con la nueva nomenclatura

This commit is contained in:
Javi Gallego 2017-11-22 08:59:21 +01:00
parent 583e7c34bc
commit b3e8b4542a
5 changed files with 19 additions and 26 deletions

View File

@ -27,13 +27,13 @@
</vn-horizontal>
<vn-horizontal margin-medium-bottom>
<vn-one>
<vn-check label="Recibido core VNH" field="$ctrl.client.coreVnh" vn-acl="administrative"></vn-check>
<vn-check label="Recibido core VNH" field="$ctrl.client.HasCoreVnh" vn-acl="administrative"></vn-check>
</vn-one>
<vn-one>
<vn-check label="Recibido core VNL" field="$ctrl.client.coreVnl" vn-acl="administrative"></vn-check>
<vn-check label="Recibido core VNL" field="$ctrl.client.HasCoreVnl" vn-acl="administrative"></vn-check>
</vn-one>
<vn-one>
<vn-check label="Recibido B2B VNL" field="$ctrl.client.sepaVnl" vn-acl="administrative"></vn-check>
<vn-check label="Recibido B2B VNL" field="$ctrl.client.hasSepavnl" vn-acl="administrative"></vn-check>
</vn-one>
</vn-horizontal>
</vn-vertical>

View File

@ -8,7 +8,6 @@
<div class="margin-none">{{::$ctrl.client.id}}</div>
<div class="margin-none">{{$ctrl.client.name}}</div>
<div class="margin-none">{{$ctrl.client.phone}}</div>
<vn-switch label="Active" model="$ctrl.active"></vn-switch>
</vn-vertical>
</vn-horizontal>
</vn-vertical>

View File

@ -12,7 +12,7 @@
<vn-horizontal>
<vn-textfield autofocus vn-two label="Social name" field="$ctrl.client.socialName" vn-acl="administrative"></vn-textfield>
<vn-textfield vn-one label="Tax number" field="$ctrl.client.fi" vn-acl="administrative"></vn-textfield>
<vn-check vn-one label="Equalization tax" field="$ctrl.client.equalizationTax" vn-acl="administrative"></vn-check>
<vn-check vn-one label="Equalization tax" field="$ctrl.client.isEqualizated" vn-acl="administrative"></vn-check>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-two label="Street" field="$ctrl.client.street" vn-focus vn-acl="administrative"></vn-textfield>
@ -47,7 +47,7 @@
<vn-check label="Invoice by address" field="$ctrl.client.hasToInvoiceByAddress" vn-acl="administrative"></vn-check>
</vn-one>
<vn-one>
<vn-check label="Active" field="$ctrl.client.active" vn-acl="administrative"></vn-check>
<vn-check label="Active" field="$ctrl.client.isActive" vn-acl="administrative"></vn-check>
</vn-one>
</vn-horizontal>
<vn-horizontal>
@ -58,7 +58,7 @@
<vn-check label="Invoice by mail" field="$ctrl.client.invoiceByEmail" vn-acl="administrative"></vn-check>
</vn-one>
<vn-one>
<vn-check label="Vies" field="$ctrl.client.vies" vn-acl="administrative"></vn-check>
<vn-check label="Vies" field="$ctrl.client.isVies" vn-acl="administrative"></vn-check>
</vn-one>
</vn-horizontal>
@ -71,7 +71,7 @@
</vn-button-bar>
</form>
<vn-dialog
vn-id="propagate-equalizationTax"
vn-id="propagate-isEqualizated"
on-response="$ctrl.returnDialogEt(response)"
>
<tpl-body>

View File

@ -6,7 +6,7 @@ export default class ClientFiscalData {
this.$http = $http;
this.vnApp = vnApp;
this.translate = $translate;
this.equalizationTax = undefined;
this.isEqualizated = undefined;
this.copyData();
}
@ -16,7 +16,7 @@ export default class ClientFiscalData {
copyData() {
if (this.client) {
this.equalizationTax = this.client.equalizationTax;
this.isEqualizated = this.client.isEqualizated;
}
}
@ -26,16 +26,16 @@ export default class ClientFiscalData {
}
checkEtChanges() {
let equals = this.equalizationTax == this.client.equalizationTax;
this.equalizationTax = this.client.equalizationTax;
let equals = this.isEqualizated == this.client.isEqualizated;
this.isEqualizated = this.client.isEqualizated;
if (!equals)
this.$.propagateEqualizationTax.show();
this.$.propagateIsEqualizated.show();
}
returnDialogEt(response) {
if (response === 'ACCEPT') {
this.$http.patch(`/client/api/Clients/${this.client.id}/addressesPropagateRe`, {isEqualizated: this.client.equalizationTax}).then(
this.$http.patch(`/client/api/Clients/${this.client.id}/addressesPropagateRe`, {isEqualizated: this.client.isEqualizated}).then(
res => {
if (res.data)
this.vnApp.showMessage(this.translate.instant('Equivalent tax spreaded'));

View File

@ -39,15 +39,9 @@
"mobile": {
"type": "string"
},
"fax": {
"type": "string"
},
"active": {
"IsActive": {
"type": "boolean"
},
"discount":{
"type": "Number"
},
"credit": {
"type": "Number"
},
@ -60,7 +54,7 @@
"dueDay": {
"type": "Number"
},
"equalizationTax": {
"isEqualizated": {
"type": "boolean",
"description": "The client has equalization tax"
},
@ -76,13 +70,13 @@
"type": "boolean",
"description": "Send invoices by email"
},
"sepaVnl": {
"hasSepavnl": {
"type": "boolean"
},
"coreVnl": {
"hasCoreVnl": {
"type": "boolean"
},
"coreVnh": {
"hasCoreVnh": {
"type": "boolean"
},
"eypbc": {
@ -91,7 +85,7 @@
"quality": {
"type": "Number"
},
"vies": {
"isVies": {
"type": "boolean"
},
"isRelevant": {