2
0
mirror of https://github.com/frappe/books.git synced 2024-11-14 09:24:04 +00:00

fix: resolve linting issues

This commit is contained in:
AbleKSaju 2024-09-30 15:08:00 +05:30
parent 301a04a638
commit ea5293bb8b

View File

@ -195,7 +195,7 @@ export abstract class Invoice extends Transactional {
if (this.isReturn) { if (this.isReturn) {
await this._removeLoyaltyPointEntry(); await this._removeLoyaltyPointEntry();
await this.reduceUsedCountOfCoupons(); this.reduceUsedCountOfCoupons();
return; return;
} }
@ -251,11 +251,7 @@ export abstract class Invoice extends Transactional {
await this._updatePartyOutStanding(); await this._updatePartyOutStanding();
await this._updateIsItemsReturned(); await this._updateIsItemsReturned();
await this._removeLoyaltyPointEntry(); await this._removeLoyaltyPointEntry();
await this._reduceUsedCountOfCoupon(); this.reduceUsedCountOfCoupons();
}
async _reduceUsedCountOfCoupon() {
await this.reduceUsedCountOfCoupons();
} }
async _removeLoyaltyPointEntry() { async _removeLoyaltyPointEntry() {
@ -572,7 +568,7 @@ export abstract class Invoice extends Transactional {
await couponDoc.setAndSync({ used: (couponDoc.used as number) + 1 }); await couponDoc.setAndSync({ used: (couponDoc.used as number) + 1 });
}); });
} }
async reduceUsedCountOfCoupons() { reduceUsedCountOfCoupons() {
if (!this.coupons?.length) { if (!this.coupons?.length) {
return; return;
} }