Merge pull request '#7648 Add field for endpoint as buyLabel report' (!2738) from 7648_getBuys_fields into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #2738
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Javier Segarra 2024-07-16 06:28:41 +00:00
commit 3e14d2fd48
1 changed files with 26 additions and 6 deletions

View File

@ -51,6 +51,7 @@ module.exports = Self => {
'stickers',
'packing',
'grouping',
'packing',
'groupingMode',
'quantity',
'packagingFk',
@ -80,7 +81,9 @@ module.exports = Self => {
fields: [
'id',
'typeFk',
'stems',
'name',
'category',
'subName',
'size',
'minPrice',
@ -96,14 +99,31 @@ module.exports = Self => {
'value9',
'tag10',
'value10',
'groupingMode'
'groupingMode',
'inkFk',
'originFk',
'producerFk'
],
include: {
relation: 'itemType',
scope: {
fields: ['code', 'description']
include: [
{
relation: 'itemType',
scope: {
fields: ['code', 'description']
}
},
{
relation: 'origin',
scope: {
fields: ['code']
}
},
{
relation: 'producer',
scope: {
fields: ['name']
}
}
}
]
}
}]
};