#7648 Add field for endpoint as buyLabel report #2738

Merged
jsegarra merged 2 commits from 7648_getBuys_fields into dev 2024-07-16 06:28:43 +00:00
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']
}
}
}
]
}
}]
};