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