@posx/core 5.5.352 → 5.5.357
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +2 -1
- package/package.json +1 -1
- package/package.publish.json +1 -1
package/build/index.js
CHANGED
|
@@ -3304,7 +3304,8 @@ var InvoiceBaseService = class extends AppRemoteService {
|
|
|
3304
3304
|
invoice.service_chargeable_subtotal = 0;
|
|
3305
3305
|
}
|
|
3306
3306
|
this.calculateInvoiceCharges(invoice, CalcFlow.AfterSubtotal);
|
|
3307
|
-
invoice.
|
|
3307
|
+
const serviceChargeableDiscountRatio = invoice.discountable_subtotal > 0 ? invoice.service_chargeable_subtotal / invoice.discountable_subtotal : 0;
|
|
3308
|
+
invoice.service_chargeable_subtotal = preciseRound(Math.max(0, invoice.service_chargeable_subtotal - invoice.discount_amount * serviceChargeableDiscountRatio));
|
|
3308
3309
|
const serviceChargeRate = appConfig.config.charges.service_charge ? appConfig.config.charges.service_charge_rate : 0;
|
|
3309
3310
|
this.calculateServiceCharge(invoice, serviceChargeRate);
|
|
3310
3311
|
this.calculateDiscount(invoice, CalcFlow.AfterServiceCharge);
|
package/package.json
CHANGED