Added custom serializer to Decimal for all Models to output as number and not string.
This should mitigate all hacks earlier and reverted the earlier hacks.
This commit is contained in:
@ -193,10 +193,10 @@ export class IssueComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.voucher.inventories.push(
|
||||
new Inventory({
|
||||
quantity,
|
||||
rate: +this.batch.rate,
|
||||
tax: +this.batch.tax,
|
||||
discount: +this.batch.discount,
|
||||
amount: quantity * +this.batch.rate * (1 + +this.batch.tax) * (1 - +this.batch.discount),
|
||||
rate: this.batch.rate,
|
||||
tax: this.batch.tax,
|
||||
discount: this.batch.discount,
|
||||
amount: quantity * this.batch.rate * (1 + this.batch.tax) * (1 - this.batch.discount),
|
||||
batch: this.batch,
|
||||
}),
|
||||
);
|
||||
|
||||
@ -95,13 +95,13 @@ export class LedgerComponent implements OnInit, AfterViewInit {
|
||||
this.running = 0;
|
||||
this.info.body.forEach((item) => {
|
||||
if (item.type !== 'Opening Balance') {
|
||||
this.debit += +item.debit;
|
||||
this.credit += +item.credit;
|
||||
this.debit += item.debit;
|
||||
this.credit += item.credit;
|
||||
if (item.posted) {
|
||||
this.running += +item.debit - +item.credit;
|
||||
this.running += item.debit - item.credit;
|
||||
}
|
||||
} else {
|
||||
this.running += +item.debit - +item.credit;
|
||||
this.running += item.debit - item.credit;
|
||||
}
|
||||
item.running = this.running;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user