refs #5630 feat: borrar expediciones de GLS
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
a477bb32ad
commit
a499f7c633
|
@ -35,6 +35,11 @@ module.exports = Self => {
|
||||||
try {
|
try {
|
||||||
const promises = [];
|
const promises = [];
|
||||||
for (let expeditionId of expeditionIds) {
|
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);
|
const deletedExpedition = models.Expedition.destroyById(expeditionId, myOptions);
|
||||||
promises.push(deletedExpedition);
|
promises.push(deletedExpedition);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
"ExpeditionState": {
|
"ExpeditionState": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
"GlsExpedition": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
"Packaging": {
|
"Packaging": {
|
||||||
"dataSource": "vn"
|
"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