Merge pull request 'closes #4511 kkear-expedition.itemFk' (!1146) from 4511-kkear-expedition.itemFk into dev
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
Reviewed-on: #1146 Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
commit
c02be35e1c
|
@ -0,0 +1 @@
|
|||
Alter table `vn`.`expedition` RENAME COLUMN itemFk TO itemFk__;
|
|
@ -921,7 +921,7 @@ INSERT INTO `vn`.`expeditionStateType`(`id`, `description`, `code`)
|
|||
(3, 'Perdida', 'LOST');
|
||||
|
||||
|
||||
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `freightItemFk`, `created`, `itemFk`, `counter`, `workerFk`, `externalId`, `packagingFk`, `stateTypeFk`, `hostFk`)
|
||||
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `freightItemFk`, `created`, `itemFk__`, `counter`, `workerFk`, `externalId`, `packagingFk`, `stateTypeFk`, `hostFk`)
|
||||
VALUES
|
||||
(1, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 15, 1, 18, 'UR9000006041', 94, 1, 'pc1'),
|
||||
(2, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 16, 2, 18, 'UR9000006041', 94, 1, NULL),
|
||||
|
|
|
@ -37,7 +37,6 @@ module.exports = Self => {
|
|||
i1.name packageItemName,
|
||||
e.counter,
|
||||
i2.name freightItemName,
|
||||
e.itemFk,
|
||||
u.name userName,
|
||||
e.created,
|
||||
e.externalId,
|
||||
|
@ -50,10 +49,10 @@ module.exports = Self => {
|
|||
est.description state
|
||||
FROM vn.expedition e
|
||||
LEFT JOIN vn.expeditionStateType est ON est.id = e.stateTypeFk
|
||||
LEFT JOIN vn.item i2 ON i2.id = e.itemFk
|
||||
INNER JOIN vn.item i1 ON i1.id = e.freightItemFk
|
||||
LEFT JOIN vn.packaging p ON p.id = e.packagingFk
|
||||
LEFT JOIN vn.item i3 ON i3.id = p.itemFk
|
||||
LEFT JOIN vn.item i2 ON i2.id = p.itemFk
|
||||
LEFT JOIN account.user u ON u.id = e.workerFk
|
||||
LEFT JOIN vn.expeditionScan es ON es.expeditionFk = e.id
|
||||
LEFT JOIN account.user su ON su.id = es.workerFk
|
||||
|
|
|
@ -37,11 +37,6 @@
|
|||
"model": "agency-mode",
|
||||
"foreignKey": "agencyModeFk"
|
||||
},
|
||||
"packageItem": {
|
||||
"type": "belongsTo",
|
||||
"model": "Item",
|
||||
"foreignKey": "itemFk"
|
||||
},
|
||||
"worker": {
|
||||
"type": "belongsTo",
|
||||
"model": "Worker",
|
||||
|
|
Loading…
Reference in New Issue