mirror of
https://github.com/frappe/books.git
synced 2024-11-14 01:14:03 +00:00
Chart of Accounts show debit and credit
This commit is contained in:
parent
ebf6800d65
commit
03b2180cdc
@ -4,10 +4,11 @@
|
|||||||
<div class="d-flex align-items-center" @click="toggleChildren">
|
<div class="d-flex align-items-center" @click="toggleChildren">
|
||||||
<feather-icon class="mr-1" :name="iconName" v-show="iconName" />
|
<feather-icon class="mr-1" :name="iconName" v-show="iconName" />
|
||||||
<span>{{ label }}</span>
|
<span>{{ label }}</span>
|
||||||
<div class="ml-auto d-flex align-items-center">
|
<div class="ml-auto d-flex align-items-center" v-if="rootType != null">
|
||||||
<span>
|
<span>
|
||||||
{{ currency }}
|
{{ currency }}
|
||||||
<span style="font-weight: 800">{{ computedBalance }}</span>
|
<span style="font-weight: 800">{{ Math.abs(computedBalance) }}</span>
|
||||||
|
{{ creditOrDebit }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -44,6 +45,12 @@ const Branch = {
|
|||||||
},
|
},
|
||||||
computedBalance() {
|
computedBalance() {
|
||||||
return this.nodeBalance;
|
return this.nodeBalance;
|
||||||
|
},
|
||||||
|
creditOrDebit() {
|
||||||
|
if (['Asset', 'Expense'].includes(this.rootType))
|
||||||
|
return this.nodeBalance > 0 ? 'Dr' : 'Cr';
|
||||||
|
|
||||||
|
return this.nodeBalance > 0 ? 'Cr' : 'Dr';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
Loading…
Reference in New Issue
Block a user