refactor(item): item index now shows last buy landing
This commit is contained in:
parent
fa54dc5fa9
commit
538805828e
|
@ -57,6 +57,11 @@ module.exports = Self => {
|
||||||
arg: 'stemMultiplier',
|
arg: 'stemMultiplier',
|
||||||
type: 'integer',
|
type: 'integer',
|
||||||
description: 'The item multiplier',
|
description: 'The item multiplier',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
arg: 'landed',
|
||||||
|
type: 'date',
|
||||||
|
description: 'The item last buy landed date',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
returns: {
|
returns: {
|
||||||
|
@ -114,12 +119,15 @@ module.exports = Self => {
|
||||||
return {'ori.code': value};
|
return {'ori.code': value};
|
||||||
case 'intrastat':
|
case 'intrastat':
|
||||||
return {'intr.description': value};
|
return {'intr.description': value};
|
||||||
|
case 'landed':
|
||||||
|
return {'lb.landed': value};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
filter = mergeFilters(filter, {where});
|
filter = mergeFilters(filter, {where});
|
||||||
|
|
||||||
const stmts = [];
|
const stmts = [];
|
||||||
|
stmts.push('CALL cache.last_buy_refresh(FALSE)');
|
||||||
const stmt = new ParameterizedSQL(
|
const stmt = new ParameterizedSQL(
|
||||||
`SELECT
|
`SELECT
|
||||||
i.id,
|
i.id,
|
||||||
|
@ -146,7 +154,8 @@ module.exports = Self => {
|
||||||
ic.name AS category,
|
ic.name AS category,
|
||||||
intr.description AS intrastat,
|
intr.description AS intrastat,
|
||||||
b.grouping,
|
b.grouping,
|
||||||
b.packing
|
b.packing,
|
||||||
|
lb.landing AS landed
|
||||||
FROM item i
|
FROM item i
|
||||||
LEFT JOIN itemType it ON it.id = i.typeFk
|
LEFT JOIN itemType it ON it.id = i.typeFk
|
||||||
LEFT JOIN itemCategory ic ON ic.id = it.categoryFk
|
LEFT JOIN itemCategory ic ON ic.id = it.categoryFk
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
<vn-th field="density" shrink>Density</vn-th>
|
<vn-th field="density" shrink>Density</vn-th>
|
||||||
<vn-th field="stemMultiplier" shrink>Multiplier</vn-th>
|
<vn-th field="stemMultiplier" shrink>Multiplier</vn-th>
|
||||||
<vn-th field="active" shrink>Active</vn-th>
|
<vn-th field="active" shrink>Active</vn-th>
|
||||||
|
<vn-th field="landed" shrink-date>Landed</vn-th>
|
||||||
<vn-th></vn-th>
|
<vn-th></vn-th>
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
</vn-thead>
|
</vn-thead>
|
||||||
|
@ -87,6 +88,7 @@
|
||||||
ng-model="::item.isActive">
|
ng-model="::item.isActive">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
|
<vn-td shrink-date>{{::item.landed | date:'dd/MM/yyyy'}}</vn-td>
|
||||||
<vn-td shrink>
|
<vn-td shrink>
|
||||||
<vn-horizontal class="buttons">
|
<vn-horizontal class="buttons">
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
|
Loading…
Reference in New Issue