@unimaze/billing 0.21.57 → 0.21.59
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/lib/common/components/billing-lines/CurrencySelector.js +1 -1
- package/lib/common/components/billing-lines/DiscountTypeSelector.d.ts +1 -0
- package/lib/common/components/billing-lines/DiscountTypeSelector.js +1 -1
- package/lib/common/components/billing-lines/SingleBillingLine.js +1 -1
- package/lib/common/components/billing-lines/UnitOfMeasureSelector.js +1 -1
- package/lib/common/components/invoice-preview/index.js +1 -1
- package/lib/translations/locales/en.json +1 -1
- package/package.json +1 -1
|
@@ -62,7 +62,7 @@ var CurrencySelector = function (props) {
|
|
|
62
62
|
}
|
|
63
63
|
props.invoiceLinesFormInstance.setFieldsValue({ invoice: { currencyCode: currenciesFromReceiverRequirements[0].value } });
|
|
64
64
|
}
|
|
65
|
-
}, [props.receiverRequirements, props.formInstance.getFieldValue(["invoice", "currencyCode"])]);
|
|
65
|
+
}, [props.receiverRequirements, props.formInstance.getFieldValue(["invoice", "currencyCode"]), props.mobile]);
|
|
66
66
|
return (react_1.default.createElement(antd_1.Select, { popupMatchSelectWidth: false, style: { width: props.mobile ? 80 : "auto" }, placeholder: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_currencyCode), value: selectedValue, onSelect: props.onSelect, disabled: props.disabled }, currencies.map(function (currency) {
|
|
67
67
|
return react_1.default.createElement(antd_1.Select.Option, { value: currency.value, key: currency.value }, currency.label);
|
|
68
68
|
})));
|
|
@@ -8,7 +8,7 @@ var antd_1 = require("antd");
|
|
|
8
8
|
var react_1 = __importDefault(require("react"));
|
|
9
9
|
var DiscountTypeSelector = function (props) {
|
|
10
10
|
return (react_1.default.createElement(antd_1.Form.Item, { name: [props.fieldName, "discountType"], initialValue: props.initialValue, style: { marginBottom: "-2px" } },
|
|
11
|
-
react_1.default.createElement(antd_1.Select, { popupMatchSelectWidth: false, onSelect: props.onSelect, value: props.initialValue, style: { width:
|
|
11
|
+
react_1.default.createElement(antd_1.Select, { popupMatchSelectWidth: false, onSelect: props.onSelect, value: props.initialValue, style: { width: props.mobile ? 80 : "auto" } },
|
|
12
12
|
react_1.default.createElement(antd_1.Select.Option, { value: "AMOUNT" }, props.formInstance.getFieldValue(["invoice", "currencyCode"])),
|
|
13
13
|
react_1.default.createElement(antd_1.Select.Option, { value: "PERCENTAGE" }, "%"))));
|
|
14
14
|
};
|
|
@@ -286,7 +286,7 @@ var SingleBillingLine = function (props) {
|
|
|
286
286
|
},
|
|
287
287
|
], index: index },
|
|
288
288
|
React.createElement(antd_1.Flex, { gap: "middle", align: "center" },
|
|
289
|
-
(0, BillingLineUtility_1.getCorrectInputNode)("discountValue", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_discount), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.discountValue"], false), React.createElement(DiscountTypeSelector_1.default, { fieldName: fieldName, initialValue: discountType, onSelect: discountTypeSelectorOnSelectHandle, formInstance: props.invoiceLinesFormInstance }), false, props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName].discountValue),
|
|
289
|
+
(0, BillingLineUtility_1.getCorrectInputNode)("discountValue", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_discount), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.discountValue"], false), React.createElement(DiscountTypeSelector_1.default, { fieldName: fieldName, initialValue: discountType, onSelect: discountTypeSelectorOnSelectHandle, formInstance: props.invoiceLinesFormInstance, mobile: isMobile }), false, props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName].discountValue),
|
|
290
290
|
React.createElement(tooltip_1.default, { title: (0, RequirementsUtility_1.getFieldLabelTooltipOverride)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.discountValue"], props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_discount_helpText)) }))))),
|
|
291
291
|
React.createElement(antd_1.Form.Item, __assign({}, formLayout_1.fullWidthInput),
|
|
292
292
|
React.createElement(antd_1.Tooltip, { title: addNewLinesTooltip },
|
|
@@ -11,5 +11,5 @@ var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
|
|
|
11
11
|
var react_1 = __importDefault(require("react"));
|
|
12
12
|
var NewBillingLines_1 = require("./NewBillingLines");
|
|
13
13
|
var api_1 = require("@unimaze/api-clients/lib/mapi/api");
|
|
14
|
-
var UnitOfMeasureSelector = function (props) { return react_1.default.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.uniteOfMeasure.unit"], defaultIsRequired: true, fieldName: [props.fieldName, "unitOfMeasure", "unit"], defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_unitOfMeasure), verticalLabels: true, onlyLabelOnFirstInList: true, style: { marginBottom: "-2px", width: "
|
|
14
|
+
var UnitOfMeasureSelector = function (props) { return react_1.default.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.uniteOfMeasure.unit"], defaultIsRequired: true, fieldName: [props.fieldName, "unitOfMeasure", "unit"], defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_unitOfMeasure), verticalLabels: true, onlyLabelOnFirstInList: true, style: { marginBottom: "-2px", width: props.mobile ? 58 : "auto" }, initialValue: api_1.Units.One }, (0, BillingLineUtility_1.getCorrectInputNode)("unitOfMeasure", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_unitOfMeasure), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.uniteOfMeasure.unit"], true), undefined, props.mobile)); };
|
|
15
15
|
exports.default = (0, react_intl_1.injectIntl)(UnitOfMeasureSelector);
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"billingLines_currency_SEK_short": "SEK",
|
|
56
56
|
"billingLines_currency_USD": "US dollar (USD)",
|
|
57
57
|
"billingLines_currency_USD_short": "USD",
|
|
58
|
-
"billingLines_discount": "
|
|
58
|
+
"billingLines_discount": "Discount",
|
|
59
59
|
"billingLines_discount_helpText": "Discount can be represented as an amount or a percentage indicated with a percentage sign (%)",
|
|
60
60
|
"billingLines_each": "each",
|
|
61
61
|
"billingLines_input_must_be_number_validationMessage": "Input must be a number",
|