2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

fix: Show blank cells instead of 0.00 in GL

This commit is contained in:
Faris Ansari 2019-12-26 19:31:28 +05:30
parent d05a50f01d
commit 0b339a14c5
3 changed files with 11 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<template>
<div class="py-4">
<div class="py-4" v-if="pendingInvoices.length">
<div class="px-4 text-sm text-gray-600 mb-1">
{{ _('Recent Invoices') }}
</div>

View File

@ -50,6 +50,12 @@ class GeneralLedger {
debitTotal += entry.debit;
creditTotal += entry.credit;
entry.balance = balance;
if (entry.debit === 0) {
entry.debit = '';
}
if (entry.credit === 0) {
entry.credit = '';
}
glEntries.push(entry);
}
glEntries.push({

View File

@ -220,9 +220,12 @@ export default {
// column has a component definition
return column.component(cellValue, column);
}
// default cell component
let formattedValue =
cellValue != null ? frappe.format(cellValue, column) : '';
cellValue != null && cellValue !== ''
? frappe.format(cellValue, column)
: '';
return {
render(h) {
return h('span', formattedValue);