@bookipi/htmlgenerator 1.14.1-alpha.3 → 1.14.1-alpha.5
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/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +8 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -14478,8 +14478,9 @@ var toCalcDocument = function toCalcDocument(document, company, context) {
|
|
|
14478
14478
|
};
|
|
14479
14479
|
lines = lineItems.map(function (lineItem) {
|
|
14480
14480
|
var taxCode = lineItem.taxCode;
|
|
14481
|
+
var lineInclusive = readField(lineItem.ti, lineItem.taxInclusive);
|
|
14481
14482
|
return _extends$1({}, toCalcLine(lineItem), {
|
|
14482
|
-
pricingMode: getPricingMode(
|
|
14483
|
+
pricingMode: getPricingMode(lineInclusive, pricingMode),
|
|
14483
14484
|
taxes: taxCode ? [{
|
|
14484
14485
|
code: taxCode,
|
|
14485
14486
|
rate: getTaxCodeRate(taxCode, lineItem.taxRate)
|
|
@@ -18067,6 +18068,9 @@ var toCalcCompany = function toCalcCompany(company, currencyCode) {
|
|
|
18067
18068
|
var calculateDocument$1 = function calculateDocument(document, company, currencyCode) {
|
|
18068
18069
|
return calc.calculateDocument(document, toCalcCompany(company, currencyCode));
|
|
18069
18070
|
};
|
|
18071
|
+
var getCalculationContext$1 = function getCalculationContext(document, company) {
|
|
18072
|
+
return calc.getCalculationContext(document, toCalcCompany(company));
|
|
18073
|
+
};
|
|
18070
18074
|
var calculateTaxCodeBreakdown$1 = function calculateTaxCodeBreakdown(document, company, currencyCode) {
|
|
18071
18075
|
return calc.calculateTaxCodeBreakdown(document, toCalcCompany(company, currencyCode));
|
|
18072
18076
|
};
|
|
@@ -18172,6 +18176,9 @@ var getTaxCodeBreakdown = function getTaxCodeBreakdown(document, company, curren
|
|
|
18172
18176
|
var _ref = _temp === void 0 ? {} : _temp,
|
|
18173
18177
|
_ref$calculationRevam = _ref.calculationRevamp,
|
|
18174
18178
|
calculationRevamp = _ref$calculationRevam === void 0 ? true : _ref$calculationRevam;
|
|
18179
|
+
if (!getCalculationContext$1(document, company).taxCodeRates) {
|
|
18180
|
+
return [];
|
|
18181
|
+
}
|
|
18175
18182
|
if (!calculationRevamp) {
|
|
18176
18183
|
return getOldTaxCodeBreakdown(document, company, currencyCode);
|
|
18177
18184
|
}
|