WIP: feat: refs #7731 modificar columnas #3126
|
@ -16,7 +16,7 @@ BEGIN
|
||||||
OR NOT (NEW.socialName <=> OLD.socialName)
|
OR NOT (NEW.socialName <=> OLD.socialName)
|
||||||
OR NOT (NEW.street <=> OLD.street)
|
OR NOT (NEW.street <=> OLD.street)
|
||||||
OR NOT (NEW.accountingAccount <=> OLD.accountingAccount)
|
OR NOT (NEW.accountingAccount <=> OLD.accountingAccount)
|
||||||
OR NOT (NEW.isVies <=> OLD.isVies)
|
OR NOT (NEW.viesCode <=> OLD.viesCode)
|
||||||
OR NOT (NEW.fi <=> OLD.fi)
|
OR NOT (NEW.fi <=> OLD.fi)
|
||||||
OR NOT (NEW.postcode <=> OLD.postcode)
|
OR NOT (NEW.postcode <=> OLD.postcode)
|
||||||
OR NOT (NEW.city <=> OLD.city)
|
OR NOT (NEW.city <=> OLD.city)
|
||||||
|
|
|
@ -8,7 +8,7 @@ BEGIN
|
||||||
OR NOT (NEW.street <=> OLD.street)
|
OR NOT (NEW.street <=> OLD.street)
|
||||||
OR NOT (NEW.account <=> OLD.account)
|
OR NOT (NEW.account <=> OLD.account)
|
||||||
OR NOT (NEW.nif <=> OLD.nif)
|
OR NOT (NEW.nif <=> OLD.nif)
|
||||||
OR NOT (NEW.isVies <=> OLD.isVies)
|
OR NOT (NEW.viesCode <=> OLD.viesCode)
|
||||||
OR NOT (NEW.provinceFk <=> OLD.provinceFk)
|
OR NOT (NEW.provinceFk <=> OLD.provinceFk)
|
||||||
OR NOT (NEW.countryFk <=> OLD.countryFk)
|
OR NOT (NEW.countryFk <=> OLD.countryFk)
|
||||||
OR NOT (NEW.postCode <=> OLD.postCode)
|
OR NOT (NEW.postCode <=> OLD.postCode)
|
||||||
|
|
|
@ -40,7 +40,7 @@ AS SELECT `c`.`id` AS `id_cliente`,
|
||||||
`c`.`isCreatedAsServed` AS `isCreatedAsServed`,
|
`c`.`isCreatedAsServed` AS `isCreatedAsServed`,
|
||||||
`c`.`hasInvoiceSimplified` AS `hasInvoiceSimplified`,
|
`c`.`hasInvoiceSimplified` AS `hasInvoiceSimplified`,
|
||||||
`c`.`salesPersonFk` AS `Id_Trabajador`,
|
`c`.`salesPersonFk` AS `Id_Trabajador`,
|
||||||
`c`.`isVies` AS `vies`,
|
`c`.`viesCode` AS `vies`,
|
||||||
`c`.`bankEntityFk` AS `bankEntityFk`,
|
`c`.`bankEntityFk` AS `bankEntityFk`,
|
||||||
`c`.`typeFk` AS `typeFk`
|
`c`.`typeFk` AS `typeFk`
|
||||||
FROM `vn`.`client` `c`
|
FROM `vn`.`client` `c`
|
||||||
|
|
|
@ -73,8 +73,8 @@ module.exports = Self => {
|
||||||
type: 'boolean'
|
type: 'boolean'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
arg: 'isVies',
|
arg: 'viesCode',
|
||||||
type: 'boolean'
|
type: 'any'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
arg: 'isToBeMailed',
|
arg: 'isToBeMailed',
|
||||||
|
@ -103,10 +103,6 @@ module.exports = Self => {
|
||||||
{
|
{
|
||||||
arg: 'hasDailyInvoice',
|
arg: 'hasDailyInvoice',
|
||||||
type: 'boolean'
|
type: 'boolean'
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'viesCode',
|
|
||||||
type: 'any'
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
returns: {
|
returns: {
|
||||||
|
|
|
@ -103,9 +103,6 @@
|
||||||
"quality": {
|
"quality": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"isVies": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"isRelevant": {
|
"isRelevant": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
|
|
@ -67,7 +67,6 @@ describe('Supplier updateFiscalData()', () => {
|
||||||
healthRegister,
|
healthRegister,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
|
||||||
options);
|
options);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
expect(e.message).toEqual('You cannot update these fields');
|
expect(e.message).toEqual('You cannot update these fields');
|
||||||
|
@ -93,7 +92,6 @@ describe('Supplier updateFiscalData()', () => {
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
|
||||||
options);
|
options);
|
||||||
|
|
||||||
expect(supplier.account).toEqual(account);
|
expect(supplier.account).toEqual(account);
|
||||||
|
@ -123,7 +121,6 @@ describe('Supplier updateFiscalData()', () => {
|
||||||
healthRegister,
|
healthRegister,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
|
||||||
options);
|
options);
|
||||||
|
|
||||||
expect(supplier.name).toEqual(name);
|
expect(supplier.name).toEqual(name);
|
||||||
|
|
|
@ -50,9 +50,6 @@ module.exports = Self => {
|
||||||
}, {
|
}, {
|
||||||
arg: 'healthRegister',
|
arg: 'healthRegister',
|
||||||
type: 'any'
|
type: 'any'
|
||||||
}, {
|
|
||||||
arg: 'isVies',
|
|
||||||
type: 'boolean'
|
|
||||||
}, {
|
}, {
|
||||||
arg: 'isTrucker',
|
arg: 'isTrucker',
|
||||||
type: 'boolean'
|
type: 'boolean'
|
||||||
|
@ -71,7 +68,7 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.updateFiscalData = async(ctx, supplierId, name, nif, account, phone, sageTaxTypeFk, sageWithholdingFk, sageTransactionTypeFk, postCode, street, city, provinceFk, countryFk, supplierActivityFk, healthRegister, isVies, isTrucker, viesCode, options) => {
|
Self.updateFiscalData = async(ctx, supplierId, name, nif, account, phone, sageTaxTypeFk, sageWithholdingFk, sageTransactionTypeFk, postCode, street, city, provinceFk, countryFk, supplierActivityFk, healthRegister, isTrucker, viesCode, options) => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const {args} = ctx;
|
const {args} = ctx;
|
||||||
const myOptions = {};
|
const myOptions = {};
|
||||||
|
@ -105,7 +102,6 @@ module.exports = Self => {
|
||||||
countryFk,
|
countryFk,
|
||||||
supplierActivityFk,
|
supplierActivityFk,
|
||||||
healthRegister,
|
healthRegister,
|
||||||
isVies,
|
|
||||||
isTrucker,
|
isTrucker,
|
||||||
viesCode
|
viesCode
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
|
@ -111,9 +111,6 @@
|
||||||
"healthRegister": {
|
"healthRegister": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"isVies": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"viesCode": {
|
"viesCode": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue