Merge pull request '2844-item last entries show the total cost in the "cost" column' (#585) from 2844-item_lastEntries_sum into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #585
Reviewed-by: Carlos Jimenez Ruiz <carlosjr@verdnatura.es>
This commit is contained in:
Carlos Jimenez Ruiz 2021-03-26 11:26:24 +00:00
commit 8a5c675266
3 changed files with 24 additions and 4 deletions

View File

@ -12,7 +12,7 @@ module.exports = Self => {
description: 'itemFk, id'
}],
returns: {
type: 'Array',
type: ['Object'],
root: true
},
http: {
@ -40,12 +40,19 @@ module.exports = Self => {
b.weight,
i.stems,
b.quantity,
b.buyingValue +
b.freightValue +
b.comissionValue +
b.packageValue AS cost,
b.buyingValue,
b.freightValue,
b.comissionValue,
b.packageValue,
b.packageFk ,
s.id AS supplierFk,
s.name AS supplier
FROM itemType it
RIGHT JOIN (entry e
RIGHT JOIN (entry e
LEFT JOIN supplier s ON s.id = e.supplierFk
RIGHT JOIN buy b ON b.entryFk = e.id
LEFT JOIN item i ON i.id = b.itemFk

View File

@ -72,7 +72,17 @@
</vn-td>
<vn-td number class="expendable">{{::entry.stems | dashIfEmpty}}</vn-td>
<vn-td number>{{::entry.quantity}}</vn-td>
<vn-td number class="expendable">{{::entry.buyingValue | dashIfEmpty}}</vn-td>
<vn-td number
class="expendable">
<span
vn-tooltip="
{{::$ctrl.$t('Cost')}}: {{::entry.buyingValue| dashIfEmpty}}<br>
{{::$ctrl.$t('Package')}}: {{::entry.packageValue| dashIfEmpty}}<br>
{{::$ctrl.$t('Freight')}}: {{::entry.freightValue| dashIfEmpty}}<br>
{{::$ctrl.$t('Comission')}}: {{::entry.comissionValue| dashIfEmpty}}">
{{::entry.cost | dashIfEmpty}}
</span>
</vn-td>
<vn-td number>{{::entry.weight | dashIfEmpty}}</vn-td>
<vn-td number>{{::entry.packageFk | dashIfEmpty}}</vn-td>
<vn-td class="expendable" title="{{::entry.supplier | dashIfEmpty}}">{{::entry.supplier | dashIfEmpty}}</vn-td>

View File

@ -9,4 +9,7 @@ Ignored: Ignorado
Provider: Proveedor
Cube: Cubo
Price Per Unit: Precio Por Unidad
Price Per Package: Precio Por Paquete
Price Per Package: Precio Por Paquete
Freight: Porte
Package: Embalaje
Comission: Comision