minor refactor
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2021-03-11 15:14:08 +01:00
parent 05ee2ee2d3
commit 674b959bbc
2 changed files with 4 additions and 2 deletions

View File

@ -23,7 +23,9 @@ module.exports = function(Self) {
});
Self.canBeInvoiced = async id => {
let ticket = await Self.app.models.Ticket.findById(id, {fields: ['id', 'refFk', 'shipped', 'totalWithVat']});
let ticket = await Self.app.models.Ticket.findById(id, {
fields: ['id', 'refFk', 'shipped', 'totalWithVat']
});
let query = `SELECT vn.hasSomeNegativeBase(?) AS hasSomeNegativeBase`;
let [result] = await Self.rawSql(query, [id]);

View File

@ -121,7 +121,7 @@
<vn-td>{{::ticket.warehouse}}</vn-td>
<vn-td number>
<span class="chip {{$ctrl.totalPriceColor(ticket)}}">
{{::ticket.totalWithVat | currency: 'EUR': 2}}
{{::(ticket.totalWithVat ? ticket.totalWithVat : 0) | currency: 'EUR': 2}}
</span>
</vn-td>
<vn-td actions>