Feature: Sale Analysis is working

Fix: Cashier Checkout multiple entries
This commit is contained in:
Amritanshu
2019-08-20 23:02:17 +05:30
parent c6b907061e
commit 70d31fea5e
35 changed files with 650 additions and 138 deletions

View File

@ -91,7 +91,7 @@ export class ReceivePaymentComponent {
(z, i) => array.controls[i].valueChanges.pipe(
distinctUntilChanged()
).subscribe(x => {
this.choices[this.type].find(s => s.name == x.name).amount = (x.amount === '' ? 0 : parseInt(x.amount, 10));
this.choices[this.type].find(s => s.name === x.name).amount = (x.amount === '' ? 0 : parseInt(x.amount, 10));
this.balance = this.amount - this.choices[this.type].reduce((a, c) => a + c.amount, 0);
})
);