@posx/core 5.5.351 → 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.d.ts +2 -0
- package/build/index.js +3 -1
- package/package.json +1 -1
- package/package.publish.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -3657,9 +3657,11 @@ declare class ChargeConfig implements IChargeConfig {
|
|
|
3657
3657
|
}
|
|
3658
3658
|
interface ICurrencyConfig {
|
|
3659
3659
|
currency_symbol: string;
|
|
3660
|
+
is_symbol_after_amount: boolean;
|
|
3660
3661
|
}
|
|
3661
3662
|
declare class CurrencyConfig implements ICurrencyConfig {
|
|
3662
3663
|
currency_symbol: string;
|
|
3664
|
+
is_symbol_after_amount: boolean;
|
|
3663
3665
|
constructor();
|
|
3664
3666
|
}
|
|
3665
3667
|
declare class RoundingConfig implements IRoundingConfig {
|
package/build/index.js
CHANGED
|
@@ -2096,6 +2096,7 @@ var ChargeConfig = class {
|
|
|
2096
2096
|
var CurrencyConfig = class {
|
|
2097
2097
|
constructor() {
|
|
2098
2098
|
_defineProperty(this, "currency_symbol", "$");
|
|
2099
|
+
_defineProperty(this, "is_symbol_after_amount", false);
|
|
2099
2100
|
}
|
|
2100
2101
|
};
|
|
2101
2102
|
var RoundingConfig = class {
|
|
@@ -3303,7 +3304,8 @@ var InvoiceBaseService = class extends AppRemoteService {
|
|
|
3303
3304
|
invoice.service_chargeable_subtotal = 0;
|
|
3304
3305
|
}
|
|
3305
3306
|
this.calculateInvoiceCharges(invoice, CalcFlow.AfterSubtotal);
|
|
3306
|
-
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));
|
|
3307
3309
|
const serviceChargeRate = appConfig.config.charges.service_charge ? appConfig.config.charges.service_charge_rate : 0;
|
|
3308
3310
|
this.calculateServiceCharge(invoice, serviceChargeRate);
|
|
3309
3311
|
this.calculateDiscount(invoice, CalcFlow.AfterServiceCharge);
|
package/package.json
CHANGED