Fix:
Discount button was greyed out due to wrong check. Show was sending customer as empty dictionary which triggered an error in input as id was a required column
This commit is contained in:
parent
578385f866
commit
bf09471e9e
@ -84,7 +84,7 @@ def voucher_info(item: Voucher):
|
||||
"lastEditDateTip": item.last_edit_date.strftime("%d-%b-%Y %H:%M:%S"),
|
||||
"billId": item.full_bill_id,
|
||||
"table": {"id": item.food_table_id, "name": item.food_table.name},
|
||||
"customer": {"id": item.customer_id, "name": item.customer.name} if item.customer is not None else {},
|
||||
"customer": {"id": item.customer_id, "name": item.customer.name} if item.customer is not None else None,
|
||||
"settlements": [],
|
||||
"narration": item.narration,
|
||||
"reason": item.reason,
|
||||
|
@ -69,7 +69,7 @@ export class SalesHomeComponent implements OnInit {
|
||||
}
|
||||
|
||||
discountAllowed(): boolean {
|
||||
return this.auth.user.perms.indexOf('discount') === -1;
|
||||
return this.auth.user.perms.indexOf('discount') !== -1;
|
||||
}
|
||||
|
||||
showDiscount(): Observable<boolean | { id: string, name: string, discount: number }[]> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user