Merge branch 'dev' into 6321_negative_tickets
This commit is contained in:
commit
48b8bda49a
|
@ -24,7 +24,7 @@ module.exports = Self => {
|
|||
|
||||
try {
|
||||
const options = {transaction: tx, userId: ctx.req.accessToken.userId};
|
||||
const files = await Self.rawSql('SELECT name, checksum, keyValue FROM edi.fileConfig', null, options);
|
||||
const files = await Self.rawSql('SELECT name, checksum, keyValue FROM edi.fileMultiConfig', null, options);
|
||||
|
||||
const updatableFiles = [];
|
||||
for (const file of files) {
|
||||
|
@ -54,7 +54,7 @@ module.exports = Self => {
|
|||
|
||||
const tables = await Self.rawSql(`
|
||||
SELECT fileName, toTable, file
|
||||
FROM edi.tableConfig
|
||||
FROM edi.tableMultiConfig
|
||||
WHERE file IN (?)`, [fileNames], options);
|
||||
|
||||
for (const table of tables) {
|
||||
|
@ -85,7 +85,7 @@ module.exports = Self => {
|
|||
for (const file of updatableFiles) {
|
||||
console.log(`Updating file ${file.name} checksum...`);
|
||||
await Self.rawSql(`
|
||||
UPDATE edi.fileConfig
|
||||
UPDATE edi.fileMultiConfig
|
||||
SET checksum = ?
|
||||
WHERE name = ?`,
|
||||
[file.checksum, file.name], options);
|
||||
|
@ -228,7 +228,7 @@ module.exports = Self => {
|
|||
|
||||
await Self.rawSql(sqlTemplate, [filePath], options);
|
||||
await Self.rawSql(`
|
||||
UPDATE edi.tableConfig
|
||||
UPDATE edi.tableMultiConfig
|
||||
SET updated = ?
|
||||
WHERE fileName = ?
|
||||
`, [Date.vnNew(), baseName], options);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "salix.defaultViewConfig"
|
||||
"table": "salix.defaultViewMultiConfig"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "userConfig"
|
||||
"table": "userMultiConfig"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
|
|
|
@ -1967,7 +1967,7 @@ INSERT INTO `vn`.`orderTicket`(`orderFk`, `ticketFk`)
|
|||
(21, 21),
|
||||
(22, 22);
|
||||
|
||||
INSERT INTO `vn`.`userConfig` (`userFk`, `warehouseFk`, `companyFk`)
|
||||
INSERT INTO `vn`.`userMultiConfig` (`userFk`, `warehouseFk`, `companyFk`)
|
||||
VALUES
|
||||
(1, 1, 69),
|
||||
(5, 1, 442),
|
||||
|
|
|
@ -10,5 +10,5 @@ AS SELECT `q`.`name` AS `name`,
|
|||
`c`.`ringInUse` AS `ringinuse`
|
||||
FROM (
|
||||
`pbx`.`queue` `q`
|
||||
JOIN `pbx`.`queueConfig` `c` ON(`q`.`config` = `c`.`id`)
|
||||
JOIN `pbx`.`queueMultiConfig` `c` ON(`q`.`config` = `c`.`id`)
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@ DECLARE vCompanyFk INT;
|
|||
SELECT IFNULL(uc.companyFk, rc.defaultCompanyFk)
|
||||
INTO vCompanyFk
|
||||
FROM vn.routeConfig rc
|
||||
LEFT JOIN userConfig uc ON uc.userFk = workerFk;
|
||||
LEFT JOIN userMultiConfig uc ON uc.userFk = workerFk;
|
||||
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -216,7 +216,7 @@ BEGIN
|
|||
i.transactionTypeSageFk,
|
||||
@vTaxCodeGeneral := i.taxClassCodeFk
|
||||
FROM tmp.ticketServiceTax tst
|
||||
JOIN invoiceOutTaxConfig i ON i.taxClassCodeFk = tst.code
|
||||
JOIN invoiceOutTaxMultiConfig i ON i.taxClassCodeFk = tst.code
|
||||
WHERE i.isService
|
||||
HAVING taxableBase
|
||||
) sub;
|
||||
|
@ -229,7 +229,7 @@ BEGIN
|
|||
i.taxTypeSageFk ,
|
||||
i.transactionTypeSageFk
|
||||
FROM tmp.ticketTax tt
|
||||
JOIN invoiceOutTaxConfig i ON i.taxClassCodeFk = tt.code
|
||||
JOIN invoiceOutTaxMultiConfig i ON i.taxClassCodeFk = tt.code
|
||||
WHERE !i.isService
|
||||
GROUP BY tt.pgcFk
|
||||
HAVING taxableBase
|
||||
|
|
|
@ -42,7 +42,7 @@ BEGIN
|
|||
END IF;
|
||||
|
||||
SELECT warehouseFk INTO vWarehouseFk
|
||||
FROM userConfig
|
||||
FROM userMultiConfig
|
||||
WHERE userFk = account.myUser_getId();
|
||||
|
||||
IF NOT vWarehouseFk OR vWarehouseFk IS NULL THEN
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
RENAME TABLE hedera.shelfConfig TO hedera.shelfMultiConfig ;
|
||||
RENAME TABLE pbx.queueConfig TO pbx.queueMultiConfig ;
|
||||
RENAME TABLE salix.defaultViewConfig TO salix.defaultViewMultiConfig;
|
||||
RENAME TABLE edi.fileConfig TO edi.fileMultiConfig;
|
||||
RENAME TABLE edi.imapConfig TO edi.imapMultiConfig;
|
||||
RENAME TABLE edi.tableConfig TO edi.tableMultiConfig;
|
||||
RENAME TABLE vn.invoiceOutTaxConfig TO vn.invoiceOutTaxMultiConfig;
|
||||
RENAME TABLE vn.userConfig TO vn.userMultiConfig;
|
||||
RENAME TABLE vn.conveyorConfig TO vn.conveyorMultiConfig;
|
||||
|
||||
GRANT SELECT ON TABLE hedera.shelfMultiConfig TO employee;
|
|
@ -48,7 +48,7 @@ module.exports = Self => {
|
|||
LEFT JOIN vn.expeditionStateType est ON est.id = e.stateTypeFk
|
||||
JOIN vn.agencyMode am ON am.id = r.agencyModeFk
|
||||
JOIN vn.agency ag ON ag.id = am.agencyFk
|
||||
LEFT JOIN vn.userConfig uc ON uc.userFk = account.myUser_getId()
|
||||
LEFT JOIN vn.userMultiConfig uc ON uc.userFk = account.myUser_getId()
|
||||
WHERE t.routeFk = ?
|
||||
GROUP BY t.addressFk, e.itemPackingTypeFk
|
||||
) sub
|
||||
|
|
|
@ -71,7 +71,8 @@ module.exports = Self => {
|
|||
JSON_ARRAYAGG(
|
||||
JSON_OBJECT(
|
||||
'ticketId', ticketFk,
|
||||
'reason', reason
|
||||
'reason', reason,
|
||||
'clientId', clientFk
|
||||
)
|
||||
)
|
||||
)errors
|
||||
|
@ -83,7 +84,8 @@ module.exports = Self => {
|
|||
IF(hasErrorDeleted, 'Eliminado', NULL),
|
||||
IF(hasErrorItemTaxCountry, 'Impuesto no informado', NULL),
|
||||
IF(hasErrorAddress, 'Sin dirección', NULL),
|
||||
IF(hasErrorInfoTaxAreaWorld, 'Datos exportaciones', NULL)) reason
|
||||
IF(hasErrorInfoTaxAreaWorld, 'Datos exportaciones', NULL)) reason,
|
||||
clientFk
|
||||
FROM (
|
||||
SELECT t.id ticketFk,
|
||||
SUM(NOT c.hasToInvoice) hasErrorToInvoice,
|
||||
|
@ -93,7 +95,8 @@ module.exports = Self => {
|
|||
SUM(a.id IS NULL) hasErrorAddress,
|
||||
SUM(ios.code IS NOT NULL
|
||||
AND(ad.customsAgentFk IS NULL
|
||||
OR ad.incotermsFk IS NULL)) hasErrorInfoTaxAreaWorld
|
||||
OR ad.incotermsFk IS NULL)) hasErrorInfoTaxAreaWorld,
|
||||
t.clientFk clientFk
|
||||
FROM ticket t
|
||||
LEFT JOIN address ad ON ad.id = t.addressFk
|
||||
JOIN sale s ON s.ticketFk = t.id
|
||||
|
|
|
@ -42,7 +42,7 @@ fixtures:
|
|||
- ACL
|
||||
- fieldAcl
|
||||
- module
|
||||
- defaultViewConfig
|
||||
- defaultViewMultiConfig
|
||||
vn:
|
||||
- alertLevel
|
||||
- bookingPlanner
|
||||
|
@ -363,7 +363,7 @@ localFixtures:
|
|||
- travelConfig
|
||||
- travelRecalc
|
||||
- travelThermograph
|
||||
- userConfig
|
||||
- userMultiConfig
|
||||
- vehicle
|
||||
- wagonConfig
|
||||
- wagonType
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<div v-for="ticket in tickets" class="grid-block vn-px-ml">
|
||||
<p v-if="ticket.ticketId"><b>{{ $t('ticketId') }}:</b> {{ticket.ticketId}}</p>
|
||||
<p v-if="ticket.reason"><b>{{ $t('reason') }}:</b> {{ticket.reason}}</p>
|
||||
<p v-if="ticket.clientId"><b>{{ $t('clientId')}}</b>{{ticket.clientId}}</p>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,3 +2,4 @@ subject: Nightly ticket closing process report
|
|||
title: Nightly ticket closing process report
|
||||
reason: Reason
|
||||
ticketId: Ticket
|
||||
clientId: Client
|
|
@ -2,3 +2,4 @@ subject: Informe proceso de cierre de tickets nocturno
|
|||
title: Informe proceso de cierre de tickets nocturno
|
||||
reason: Motivo
|
||||
ticketId: Ticket
|
||||
clientId: Cliente
|
Loading…
Reference in New Issue