feat: refs #7348 hasDailyInvoice field #2670
|
@ -34,20 +34,25 @@ BEGIN
|
|||
DECLARE vIsTaxDataChecked TINYINT(1);
|
||||
DECLARE vHasCoreVnl BOOLEAN;
|
||||
DECLARE vMandateTypeFk INT;
|
||||
DECLARE vHasDailyInvoice BOOLEAN;
|
||||
|
||||
SELECT defaultPayMethodFk,
|
||||
defaultDueDay,
|
||||
defaultCredit,
|
||||
defaultIsTaxDataChecked,
|
||||
defaultHasCoreVnl,
|
||||
defaultMandateTypeFk
|
||||
SELECT cc.defaultPayMethodFk,
|
||||
cc.defaultDueDay,
|
||||
cc.defaultCredit,
|
||||
cc.defaultIsTaxDataChecked,
|
||||
cc.defaultHasCoreVnl,
|
||||
cc.defaultMandateTypeFk,
|
||||
c.hasDailyInvoice
|
||||
INTO vPayMethodFk,
|
||||
vDueDay,
|
||||
vDefaultCredit,
|
||||
vIsTaxDataChecked,
|
||||
vHasCoreVnl,
|
||||
vMandateTypeFk
|
||||
FROM clientConfig;
|
||||
vMandateTypeFk,
|
||||
vHasDailyInvoice
|
||||
FROM clientConfig cc
|
||||
LEFT JOIN province p ON p.id = vProvinceFk
|
||||
LEFT JOIN country c ON c.id = p.countryFk;
|
||||
|
||||
INSERT INTO `client`
|
||||
SET id = vUserFk,
|
||||
|
@ -65,7 +70,8 @@ BEGIN
|
|||
credit = vDefaultCredit,
|
||||
isTaxDataChecked = vIsTaxDataChecked,
|
||||
hasCoreVnl = vHasCoreVnl,
|
||||
isEqualizated = FALSE
|
||||
isEqualizated = FALSE,
|
||||
hasDailyInvoice = vHasDailyInvoice
|
||||
ON duplicate KEY UPDATE
|
||||
payMethodFk = vPayMethodFk,
|
||||
dueDay = vDueDay,
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE `vn`.`client`
|
||||
ADD COLUMN `hasDailyInvoice` TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'Indica si el cliente requiere facturación diaria por defecto se copiará lo que tenga country.hasDailyInvoice';
|
|
@ -99,6 +99,10 @@ module.exports = Self => {
|
|||
{
|
||||
arg: 'hasElectronicInvoice',
|
||||
type: 'boolean'
|
||||
},
|
||||
{
|
||||
arg: 'hasDailyInvoice',
|
||||
type: 'boolean'
|
||||
}
|
||||
],
|
||||
returns: {
|
||||
|
@ -117,8 +121,6 @@ module.exports = Self => {
|
|||
const myOptions = {};
|
||||
const models = Self.app.models;
|
||||
const args = ctx.args;
|
||||
const userId = ctx.req.accessToken.userId;
|
||||
const $t = ctx.req.__;
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -144,6 +144,9 @@
|
|||
},
|
||||
"recommendedCredit": {
|
||||
"type": "number"
|
||||
},
|
||||
"hasDailyInvoice": {
|
||||
"type": "boolean"
|
||||
}
|
||||
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue