mirror of
https://github.com/frappe/books.git
synced 2024-12-22 10:58:59 +00:00
fix: undefined name error when canceling sales invoice
This commit is contained in:
parent
8b9bdff938
commit
c7ac373534
@ -773,6 +773,10 @@ export async function removeLoyaltyPoint(doc: Doc) {
|
||||
},
|
||||
})) as { name: string; loyaltyPoints: number; expiryDate: Date }[];
|
||||
|
||||
if (!data.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
const loyalityPointEntryDoc = await doc.fyo.doc.getDoc(
|
||||
ModelNameEnum.LoyaltyPointEntry,
|
||||
data[0].name
|
||||
|
Loading…
Reference in New Issue
Block a user