Merge pull request '3049-item_index_show_lastbuy_landed' (#730) from 3049-item_index_show_lastbuy_landed into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #730
Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
Joan Sanchez 2021-09-08 14:20:22 +00:00
commit 001b712c14
2 changed files with 12 additions and 1 deletions

View File

@ -57,6 +57,11 @@ module.exports = Self => {
arg: 'stemMultiplier',
type: 'integer',
description: 'The item multiplier',
},
{
arg: 'landed',
type: 'date',
description: 'The item last buy landed date',
}
],
returns: {
@ -114,12 +119,15 @@ module.exports = Self => {
return {'ori.code': value};
case 'intrastat':
return {'intr.description': value};
case 'landed':
return {'lb.landed': value};
}
});
filter = mergeFilters(filter, {where});
const stmts = [];
stmts.push('CALL cache.last_buy_refresh(FALSE)');
const stmt = new ParameterizedSQL(
`SELECT
i.id,
@ -146,7 +154,8 @@ module.exports = Self => {
ic.name AS category,
intr.description AS intrastat,
b.grouping,
b.packing
b.packing,
lb.landing AS landed
FROM item i
LEFT JOIN itemType it ON it.id = i.typeFk
LEFT JOIN itemCategory ic ON ic.id = it.categoryFk

View File

@ -26,6 +26,7 @@
<vn-th field="density" shrink>Density</vn-th>
<vn-th field="stemMultiplier" shrink>Multiplier</vn-th>
<vn-th field="active" shrink>Active</vn-th>
<vn-th field="landed" shrink-date>Landed</vn-th>
<vn-th></vn-th>
</vn-tr>
</vn-thead>
@ -87,6 +88,7 @@
ng-model="::item.isActive">
</vn-check>
</vn-td>
<vn-td shrink-date>{{::item.landed | date:'dd/MM/yyyy'}}</vn-td>
<vn-td shrink>
<vn-horizontal class="buttons">
<vn-icon-button