feat: packaging refs #4021
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Sergio De la torre 2024-05-30 18:06:35 +02:00
parent d461b78c7b
commit db1c352be3
4 changed files with 43 additions and 9 deletions

View File

@ -22,5 +22,8 @@
},
"EntryObservation": {
"dataSource": "vn"
},
"EntryType": {
"dataSource": "vn"
}
}
}

View File

@ -0,0 +1,25 @@
{
"name": "EntryType",
"base": "VnModel",
"mixins": {
"Loggable": true
},
"options": {
"mysql": {
"table": "entryType"
}
},
"properties": {
"code": {
"type": "string",
"id": true,
"description": "Identifier"
},
"description": {
"type": "string"
},
"isInformal": {
"type": "boolean"
}
}
}

View File

@ -35,9 +35,9 @@
},
"isVirtual": {
"type": "boolean",
"mysql": {
"columnName": "isRaid"
}
"mysql": {
"columnName": "isRaid"
}
},
"isRaid": {
"type": "boolean"
@ -53,9 +53,9 @@
},
"observation": {
"type": "string",
"mysql": {
"columnName": "evaNotes"
}
"mysql": {
"columnName": "evaNotes"
}
},
"loadPriority": {
"type": "number"
@ -101,6 +101,11 @@
"type": "belongsTo",
"model": "Account",
"foreignKey": "observationEditorFk"
},
"entryType": {
"type": "belongsTo",
"model": "EntryType",
"foreignKey": "typeFk"
}
}
}
}

View File

@ -33,7 +33,7 @@ module.exports = Self => {
JOIN vn.item i ON i.id = b.itemFk
WHERE e.id = ? AND e.supplierFk = ?
GROUP BY i.id
) SELECT i.id, i.name, et.quantity, SUM(b.quantity) quantityTotal, et.printedStickers
) SELECT i.id, i.name, et.quantity, SUM(b.quantity) quantityTotal, et.printedStickers, ic.url
FROM vn.buy b
JOIN vn.item i ON i.id = b.itemFk
JOIN vn.entry e ON e.id = b.entryFk
@ -41,6 +41,7 @@ module.exports = Self => {
JOIN vn.buyConfig bc ON bc.monthsAgo
JOIN vn.travel t ON t.id = e.travelFk
LEFT JOIN entryTmp et ON et.id = i.id
JOIN hedera.imageConfig ic
WHERE e.supplierFk = ?
AND i.family IN ('EMB', 'CONT')
AND b.created > (util.VN_CURDATE() - INTERVAL bc.monthsAgo MONTH)