optimize pos gold form
This commit is contained in:
@@ -78,11 +78,11 @@ export class PosGoldPayloadFormComponent extends AbstractForm<
|
||||
|
||||
form.controls.payload.controls.profit_amount.valueChanges.pipe(takeUntilDestroyed()).subscribe(() => {
|
||||
// if ((form.controls.discount_amount.value || 0) > (value || 0)) {
|
||||
form.controls.discount_amount.setValue(0);
|
||||
form.controls.discount_amount.setValue(0, { emitEvent: false });
|
||||
// }
|
||||
});
|
||||
form.controls.payload.controls.profit_percentage.valueChanges.pipe(takeUntilDestroyed()).subscribe(() => {
|
||||
form.controls.discount_amount.setValue(0);
|
||||
form.controls.discount_amount.setValue(0, { emitEvent: false });
|
||||
});
|
||||
|
||||
return form;
|
||||
|
||||
Reference in New Issue
Block a user