Feature: Sale Analysis is working
Fix: Cashier Checkout multiple entries
This commit is contained in:
@ -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);
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user