@unimaze/billing 0.20.12 → 0.20.13
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.
|
@@ -18,11 +18,11 @@ var api_1 = require("@unimaze/api-clients/lib/mapi/api");
|
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
19
|
var antd_1 = require("antd");
|
|
20
20
|
var CommonTranslations_1 = require("../common/components/CommonTranslations");
|
|
21
|
+
var ConversionUtility_1 = require("./ConversionUtility");
|
|
21
22
|
exports.billingLinesFieldsMetadata = function (formInstance) {
|
|
22
23
|
var billingLinesMetadata = formInstance.getFieldValue(["invoice", "invoiceLines"]);
|
|
23
24
|
return billingLinesMetadata.map(function (billingLine) {
|
|
24
|
-
|
|
25
|
-
var cleanBillingLine = billingLine;
|
|
25
|
+
var cleanBillingLine = ConversionUtility_1.removeEmpty(billingLine);
|
|
26
26
|
var taxableAmount = exports.calculateTaxableAmount(cleanBillingLine.discountValue, cleanBillingLine.quantity, cleanBillingLine.unitPriceAmount);
|
|
27
27
|
var taxPercentage = exports.calculateTaxPercentage(cleanBillingLine.taxCategoryType);
|
|
28
28
|
var taxAmount = exports.calculateTaxAmount(taxableAmount, taxPercentage);
|