Compare commits
1 Commits
dev
...
5630-ticke
Author | SHA1 | Date |
---|---|---|
Vicent Llopis | a499f7c633 |
|
@ -35,6 +35,11 @@ module.exports = Self => {
|
|||
try {
|
||||
const promises = [];
|
||||
for (let expeditionId of expeditionIds) {
|
||||
const glsExpedition = await models.GlsExpedition.findById(expeditionId);
|
||||
if (glsExpedition) {
|
||||
const barcode = glsExpedition.barcode;
|
||||
}
|
||||
|
||||
const deletedExpedition = models.Expedition.destroyById(expeditionId, myOptions);
|
||||
promises.push(deletedExpedition);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
"ExpeditionState": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"GlsExpedition": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Packaging": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "GlsExpedition",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "glsExpedition"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"expeditionFk": {
|
||||
"id": true,
|
||||
"type": "number",
|
||||
"description": "Identifier"
|
||||
},
|
||||
"barcode": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"expedition": {
|
||||
"type": "belongsTo",
|
||||
"model": "Expedition",
|
||||
"foreignKey": "expeditionFk"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue