mirror of
https://github.com/frappe/books.git
synced 2024-11-12 16:36:27 +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