2
0
mirror of https://github.com/frappe/books.git synced 2025-02-08 15:08:29 +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> <template>
<div class="py-4"> <div class="py-4" v-if="pendingInvoices.length">
<div class="px-4 text-sm text-gray-600 mb-1"> <div class="px-4 text-sm text-gray-600 mb-1">
{{ _('Recent Invoices') }} {{ _('Recent Invoices') }}
</div> </div>

View File

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

View File

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