@unimaze/billing 0.21.52 → 0.21.54
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/create-invoice/index.js +13 -5
- package/package.json +2 -10
- package/lib/common/components/billing-lines/NewNewBillingLines.d.ts +0 -15
- package/lib/common/components/billing-lines/NewNewBillingLines.js +0 -36
- package/lib/common/components/billing-lines/cwdwdw.d.ts +0 -1
- package/lib/common/components/billing-lines/cwdwdw.js +0 -14
- package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.d.ts +0 -0
- package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.js +0 -109
- package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfo.d.ts +0 -0
- package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfo.js +0 -110
- package/lib/unimaze-api-clients/src/mapi/api.d.ts +0 -6664
- package/lib/unimaze-api-clients/src/mapi/api.js +0 -4743
- package/lib/unimaze-api-clients/src/mapi/base.d.ts +0 -55
- package/lib/unimaze-api-clients/src/mapi/base.js +0 -84
- package/lib/unimaze-api-clients/src/mapi/configuration.d.ts +0 -63
- package/lib/unimaze-api-clients/src/mapi/configuration.js +0 -28
- package/lib/unimaze-api-clients/src/mapi/index.d.ts +0 -13
- package/lib/unimaze-api-clients/src/mapi/index.js +0 -30
- package/lib/unimaze-api-clients/src/rapi/api.d.ts +0 -5015
- package/lib/unimaze-api-clients/src/rapi/api.js +0 -5582
- package/lib/unimaze-api-clients/src/rapi/base.d.ts +0 -55
- package/lib/unimaze-api-clients/src/rapi/base.js +0 -84
- package/lib/unimaze-api-clients/src/rapi/configuration.d.ts +0 -63
- package/lib/unimaze-api-clients/src/rapi/configuration.js +0 -28
- package/lib/unimaze-api-clients/src/rapi/index.d.ts +0 -13
- package/lib/unimaze-api-clients/src/rapi/index.js +0 -30
- package/lib/unimaze-billing/src/common/components/CommonTranslations.d.ts +0 -74
- package/lib/unimaze-billing/src/common/components/CommonTranslations.js +0 -78
- package/lib/unimaze-billing/src/common/components/attachments/Attachment.d.ts +0 -20
- package/lib/unimaze-billing/src/common/components/attachments/Attachment.js +0 -164
- package/lib/unimaze-billing/src/common/components/attachments/AttachmentModal.d.ts +0 -21
- package/lib/unimaze-billing/src/common/components/attachments/AttachmentModal.js +0 -206
- package/lib/unimaze-billing/src/common/components/attachments/index.d.ts +0 -27
- package/lib/unimaze-billing/src/common/components/attachments/index.js +0 -214
- package/lib/unimaze-billing/src/common/components/base-information/AccountingCost.d.ts +0 -17
- package/lib/unimaze-billing/src/common/components/base-information/AccountingCost.js +0 -61
- package/lib/unimaze-billing/src/common/components/base-information/OrderReference.d.ts +0 -16
- package/lib/unimaze-billing/src/common/components/base-information/OrderReference.js +0 -58
- package/lib/unimaze-billing/src/common/components/base-information/ProjectReference.d.ts +0 -14
- package/lib/unimaze-billing/src/common/components/base-information/ProjectReference.js +0 -30
- package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.d.ts +0 -53
- package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.js +0 -328
- package/lib/unimaze-billing/src/common/components/base-information/index.d.ts +0 -77
- package/lib/unimaze-billing/src/common/components/base-information/index.js +0 -186
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingCalculations.d.ts +0 -14
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingCalculations.js +0 -151
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.d.ts +0 -24
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.js +0 -61
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingTaxSummary.d.ts +0 -13
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingTaxSummary.js +0 -133
- package/lib/unimaze-billing/src/common/components/billing-lines/CurrencySelector.d.ts +0 -20
- package/lib/unimaze-billing/src/common/components/billing-lines/CurrencySelector.js +0 -17
- package/lib/unimaze-billing/src/common/components/billing-lines/DiscountTypeSelector.d.ts +0 -10
- package/lib/unimaze-billing/src/common/components/billing-lines/DiscountTypeSelector.js +0 -16
- package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.d.ts +0 -134
- package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.js +0 -209
- package/lib/unimaze-billing/src/common/components/billing-lines/NewNewBillingLines.d.ts +0 -15
- package/lib/unimaze-billing/src/common/components/billing-lines/NewNewBillingLines.js +0 -36
- package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.d.ts +0 -19
- package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.js +0 -275
- package/lib/unimaze-billing/src/common/components/billing-lines/UnitOfMeasureSelector.d.ts +0 -14
- package/lib/unimaze-billing/src/common/components/billing-lines/UnitOfMeasureSelector.js +0 -15
- package/lib/unimaze-billing/src/common/components/billing-lines/index.d.ts +0 -49
- package/lib/unimaze-billing/src/common/components/billing-lines/index.js +0 -104
- package/lib/unimaze-billing/src/common/components/component-container/Content.d.ts +0 -7
- package/lib/unimaze-billing/src/common/components/component-container/Content.js +0 -13
- package/lib/unimaze-billing/src/common/components/component-container/Header.d.ts +0 -9
- package/lib/unimaze-billing/src/common/components/component-container/Header.js +0 -28
- package/lib/unimaze-billing/src/common/components/component-container/index.d.ts +0 -12
- package/lib/unimaze-billing/src/common/components/component-container/index.js +0 -22
- package/lib/unimaze-billing/src/common/components/customer/CostCenter.d.ts +0 -17
- package/lib/unimaze-billing/src/common/components/customer/CostCenter.js +0 -163
- package/lib/unimaze-billing/src/common/components/customer/CustomerContactName.d.ts +0 -17
- package/lib/unimaze-billing/src/common/components/customer/CustomerContactName.js +0 -53
- package/lib/unimaze-billing/src/common/components/customer/hardCoddedCustomer.d.ts +0 -7
- package/lib/unimaze-billing/src/common/components/customer/hardCoddedCustomer.js +0 -41
- package/lib/unimaze-billing/src/common/components/customer/index.d.ts +0 -26
- package/lib/unimaze-billing/src/common/components/customer/index.js +0 -166
- package/lib/unimaze-billing/src/common/components/date-picker/index.d.ts +0 -21
- package/lib/unimaze-billing/src/common/components/date-picker/index.js +0 -23
- package/lib/unimaze-billing/src/common/components/delivery-location/index.d.ts +0 -12
- package/lib/unimaze-billing/src/common/components/delivery-location/index.js +0 -89
- package/lib/unimaze-billing/src/common/components/editable-cell/index.d.ts +0 -0
- package/lib/unimaze-billing/src/common/components/editable-cell/index.js +0 -295
- package/lib/unimaze-billing/src/common/components/editable-row/index.d.ts +0 -5
- package/lib/unimaze-billing/src/common/components/editable-row/index.js +0 -59
- package/lib/unimaze-billing/src/common/components/form-item/index.d.ts +0 -35
- package/lib/unimaze-billing/src/common/components/form-item/index.js +0 -60
- package/lib/unimaze-billing/src/common/components/index.d.ts +0 -18
- package/lib/unimaze-billing/src/common/components/index.js +0 -42
- package/lib/unimaze-billing/src/common/components/input/index.d.ts +0 -23
- package/lib/unimaze-billing/src/common/components/input/index.js +0 -37
- package/lib/unimaze-billing/src/common/components/invoice/index.d.ts +0 -42
- package/lib/unimaze-billing/src/common/components/invoice/index.js +0 -59
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.d.ts +0 -14
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.js +0 -75
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.d.ts +0 -14
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.js +0 -73
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewHeader.d.ts +0 -12
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewHeader.js +0 -104
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewInvoiceLines.d.ts +0 -12
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewInvoiceLines.js +0 -93
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfo.d.ts +0 -14
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfo.js +0 -77
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.d.ts +0 -14
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.js +0 -58
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.d.ts +0 -14
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.js +0 -52
- package/lib/unimaze-billing/src/common/components/invoice-preview/index.d.ts +0 -102
- package/lib/unimaze-billing/src/common/components/invoice-preview/index.js +0 -196
- package/lib/unimaze-billing/src/common/components/locale-intl/index.d.ts +0 -0
- package/lib/unimaze-billing/src/common/components/locale-intl/index.js +0 -51
- package/lib/unimaze-billing/src/common/components/payment-method/index.d.ts +0 -76
- package/lib/unimaze-billing/src/common/components/payment-method/index.js +0 -356
- package/lib/unimaze-billing/src/common/components/payment-method/paymentMethodForConversion.d.ts +0 -8
- package/lib/unimaze-billing/src/common/components/payment-method/paymentMethodForConversion.js +0 -37
- package/lib/unimaze-billing/src/common/components/submit-confirmation/SubmitConfirmationSVG.d.ts +0 -3
- package/lib/unimaze-billing/src/common/components/submit-confirmation/SubmitConfirmationSVG.js +0 -17
- package/lib/unimaze-billing/src/common/components/submit-confirmation/index.d.ts +0 -8
- package/lib/unimaze-billing/src/common/components/submit-confirmation/index.js +0 -34
- package/lib/unimaze-billing/src/common/components/supplier/CityAutofill.d.ts +0 -18
- package/lib/unimaze-billing/src/common/components/supplier/CityAutofill.js +0 -159
- package/lib/unimaze-billing/src/common/components/supplier/index.d.ts +0 -94
- package/lib/unimaze-billing/src/common/components/supplier/index.js +0 -334
- package/lib/unimaze-billing/src/common/components/tooltip/index.d.ts +0 -7
- package/lib/unimaze-billing/src/common/components/tooltip/index.js +0 -15
- package/lib/unimaze-billing/src/common/components/welcome-modal/index.d.ts +0 -15
- package/lib/unimaze-billing/src/common/components/welcome-modal/index.js +0 -26
- package/lib/unimaze-billing/src/common/consts/formLayout.d.ts +0 -74
- package/lib/unimaze-billing/src/common/consts/formLayout.js +0 -45
- package/lib/unimaze-billing/src/common/consts/validationRules.d.ts +0 -6
- package/lib/unimaze-billing/src/common/consts/validationRules.js +0 -69
- package/lib/unimaze-billing/src/common/enums/DocumentTypeEnum.d.ts +0 -5
- package/lib/unimaze-billing/src/common/enums/DocumentTypeEnum.js +0 -8
- package/lib/unimaze-billing/src/common/enums/index.d.ts +0 -1
- package/lib/unimaze-billing/src/common/enums/index.js +0 -8
- package/lib/unimaze-billing/src/common/types/AppConfiguration.d.ts +0 -26
- package/lib/unimaze-billing/src/common/types/AppConfiguration.js +0 -2
- package/lib/unimaze-billing/src/common/types/BillingLineMetadataOverride.d.ts +0 -10
- package/lib/unimaze-billing/src/common/types/BillingLineMetadataOverride.js +0 -2
- package/lib/unimaze-billing/src/common/types/CommonProps.d.ts +0 -33
- package/lib/unimaze-billing/src/common/types/CommonProps.js +0 -2
- package/lib/unimaze-billing/src/common/types/DiscountType.d.ts +0 -1
- package/lib/unimaze-billing/src/common/types/DiscountType.js +0 -2
- package/lib/unimaze-billing/src/common/types/InvoiceFormFields.d.ts +0 -1
- package/lib/unimaze-billing/src/common/types/InvoiceFormFields.js +0 -2
- package/lib/unimaze-billing/src/common/types/NewReceiverRequirements.d.ts +0 -27
- package/lib/unimaze-billing/src/common/types/NewReceiverRequirements.js +0 -2
- package/lib/unimaze-billing/src/common/types/ReceiverRequirements.d.ts +0 -83
- package/lib/unimaze-billing/src/common/types/ReceiverRequirements.js +0 -393
- package/lib/unimaze-billing/src/common/types/SupplierInfo.d.ts +0 -11
- package/lib/unimaze-billing/src/common/types/SupplierInfo.js +0 -2
- package/lib/unimaze-billing/src/common/types/index.d.ts +0 -1
- package/lib/unimaze-billing/src/common/types/index.js +0 -17
- package/lib/unimaze-billing/src/create-credit-note/index.d.ts +0 -9
- package/lib/unimaze-billing/src/create-credit-note/index.js +0 -62
- package/lib/unimaze-billing/src/create-invoice/IntlLoader.d.ts +0 -11
- package/lib/unimaze-billing/src/create-invoice/IntlLoader.js +0 -116
- package/lib/unimaze-billing/src/create-invoice/index.d.ts +0 -82
- package/lib/unimaze-billing/src/create-invoice/index.js +0 -710
- package/lib/unimaze-billing/src/enums.d.ts +0 -14
- package/lib/unimaze-billing/src/enums.js +0 -18
- package/lib/unimaze-billing/src/index.d.ts +0 -4
- package/lib/unimaze-billing/src/index.js +0 -28
- package/lib/unimaze-billing/src/translations/locales/en.json +0 -183
- package/lib/unimaze-billing/src/translations/locales/is.json +0 -183
- package/lib/unimaze-billing/src/translations/locales.d.ts +0 -369
- package/lib/unimaze-billing/src/translations/locales.js +0 -11
- package/lib/unimaze-billing/src/utils/ApiUtility.d.ts +0 -29
- package/lib/unimaze-billing/src/utils/ApiUtility.js +0 -133
- package/lib/unimaze-billing/src/utils/BillingLineUtility.d.ts +0 -25
- package/lib/unimaze-billing/src/utils/BillingLineUtility.js +0 -190
- package/lib/unimaze-billing/src/utils/ConversionUtility.d.ts +0 -9
- package/lib/unimaze-billing/src/utils/ConversionUtility.js +0 -222
- package/lib/unimaze-billing/src/utils/FileUploadUtility.d.ts +0 -9
- package/lib/unimaze-billing/src/utils/FileUploadUtility.js +0 -45
- package/lib/unimaze-billing/src/utils/IntlUtility.d.ts +0 -6
- package/lib/unimaze-billing/src/utils/IntlUtility.js +0 -78
- package/lib/unimaze-billing/src/utils/LocationUtility.d.ts +0 -1
- package/lib/unimaze-billing/src/utils/LocationUtility.js +0 -81
- package/lib/unimaze-billing/src/utils/ReferenceIdentifierUtility.d.ts +0 -7
- package/lib/unimaze-billing/src/utils/ReferenceIdentifierUtility.js +0 -26
- package/lib/unimaze-billing/src/utils/RequirementsUtility.d.ts +0 -21
- package/lib/unimaze-billing/src/utils/RequirementsUtility.js +0 -237
- package/lib/unimaze-billing/src/utils/index.d.ts +0 -2
- package/lib/unimaze-billing/src/utils/index.js +0 -8
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
var antd_1 = require("antd");
|
|
18
|
-
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var react_intl_1 = require("react-intl");
|
|
20
|
-
var colors_1 = require("@ant-design/colors");
|
|
21
|
-
var BillingLineUtility_1 = require("../../../utils/BillingLineUtility");
|
|
22
|
-
var supplier_1 = require("../supplier");
|
|
23
|
-
var IntlUtility_1 = require("../../../utils/IntlUtility");
|
|
24
|
-
var translationMessages = (0, react_intl_1.defineMessages)({
|
|
25
|
-
invoicePreview_headerTitle: {
|
|
26
|
-
id: "invoicePreview.headerTitle",
|
|
27
|
-
defaultMessage: "Invoice",
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
var WrappedInvoicePreviewHeader = function (props) {
|
|
31
|
-
return (react_1.default.createElement(antd_1.ConfigProvider, { theme: {
|
|
32
|
-
token: {
|
|
33
|
-
colorText: "white",
|
|
34
|
-
colorTextDescription: "white",
|
|
35
|
-
fontSizeHeading5: 16,
|
|
36
|
-
fontSizeLG: 20,
|
|
37
|
-
fontSizeXL: 30,
|
|
38
|
-
fontSize: 12,
|
|
39
|
-
fontSizeSM: 10,
|
|
40
|
-
fontWeightStrong: 700,
|
|
41
|
-
},
|
|
42
|
-
components: {
|
|
43
|
-
Layout: {
|
|
44
|
-
headerBg: colors_1.blue[6],
|
|
45
|
-
headerPadding: "35px",
|
|
46
|
-
headerHeight: 200,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
} },
|
|
50
|
-
react_1.default.createElement(InvoicePreviewHeader, __assign({}, props))));
|
|
51
|
-
};
|
|
52
|
-
var InvoicePreviewHeader = function (props) {
|
|
53
|
-
var token = antd_1.theme.useToken().token;
|
|
54
|
-
return (react_1.default.createElement(antd_1.Flex, { justify: "center" },
|
|
55
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true, style: { width: "100%", maxWidth: "900px" } },
|
|
56
|
-
react_1.default.createElement(antd_1.Layout.Header, { style: { width: "100vw", maxWidth: "900px" } },
|
|
57
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true },
|
|
58
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true, style: {
|
|
59
|
-
borderBottom: "1px solid white",
|
|
60
|
-
paddingBottom: "5px",
|
|
61
|
-
marginBottom: "10px",
|
|
62
|
-
} },
|
|
63
|
-
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary", style: { fontSize: token.fontSizeSM } },
|
|
64
|
-
props.intl.formatMessage(translationMessages.invoicePreview_headerTitle),
|
|
65
|
-
":"),
|
|
66
|
-
react_1.default.createElement(antd_1.Typography.Text, null, props.form.getFieldValue(["invoice", "invoiceNo"]))),
|
|
67
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true, style: {
|
|
68
|
-
borderBottom: "1px solid white",
|
|
69
|
-
paddingBottom: "5px",
|
|
70
|
-
marginBottom: "10px",
|
|
71
|
-
} },
|
|
72
|
-
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary", style: { fontSize: token.fontSizeSM } },
|
|
73
|
-
props.intl.formatMessage(supplier_1.translationMessages.supplier_title),
|
|
74
|
-
":"),
|
|
75
|
-
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeHeading5, fontWeight: 500 } }, props.form.getFieldValue(["invoice", "supplier", "name"]))),
|
|
76
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true },
|
|
77
|
-
react_1.default.createElement(antd_1.Typography.Text, null,
|
|
78
|
-
props.form.getFieldValue(["invoice", "currencyCode"]),
|
|
79
|
-
react_1.default.createElement(antd_1.Typography.Text, { strong: true, style: {
|
|
80
|
-
fontSize: token.fontSizeLG,
|
|
81
|
-
} }, (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(Math.round((0, BillingLineUtility_1.getTotals)(props.form.getFieldValue(["invoice", "invoiceLines"]))
|
|
82
|
-
.totalTaxInclusiveAmount), props.intl)))),
|
|
83
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true, align: "flex-end" },
|
|
84
|
-
props.form.getFieldValue(["invoice", "singleReferenceIdentifier"]) &&
|
|
85
|
-
props.form.getFieldValue(["invoice", "singleReferenceIdentifier"]).code &&
|
|
86
|
-
props.form.getFieldValue(["invoice", "singleReferenceIdentifier"]).value && (react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeSM } },
|
|
87
|
-
props.form.getFieldValue(["invoice", "singleReferenceIdentifier"]).code,
|
|
88
|
-
":",
|
|
89
|
-
" ",
|
|
90
|
-
props.form.getFieldValue(["invoice", "singleReferenceIdentifier"]).value)),
|
|
91
|
-
props.form.getFieldValue(["invoice", "referenceIdentifiers"]) &&
|
|
92
|
-
props.form
|
|
93
|
-
.getFieldValue(["invoice", "referenceIdentifiers"])
|
|
94
|
-
.map(function (referenceIdentifier, index) {
|
|
95
|
-
var _a, _b;
|
|
96
|
-
if (referenceIdentifier.code && referenceIdentifier.value) {
|
|
97
|
-
return (react_1.default.createElement(antd_1.Typography.Text, { key: index, style: { fontSize: token.fontSizeSM } },
|
|
98
|
-
((_a = referenceIdentifier === null || referenceIdentifier === void 0 ? void 0 : referenceIdentifier.code) === null || _a === void 0 ? void 0 : _a.label) || ((_b = referenceIdentifier === null || referenceIdentifier === void 0 ? void 0 : referenceIdentifier.code) === null || _b === void 0 ? void 0 : _b.key),
|
|
99
|
-
": ", referenceIdentifier === null || referenceIdentifier === void 0 ? void 0 :
|
|
100
|
-
referenceIdentifier.value));
|
|
101
|
-
}
|
|
102
|
-
})))))));
|
|
103
|
-
};
|
|
104
|
-
exports.default = (0, react_intl_1.injectIntl)(WrappedInvoicePreviewHeader);
|
package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewInvoiceLines.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FormInstance } from "antd";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { WrappedComponentProps } from "react-intl";
|
|
4
|
-
interface Props extends WrappedComponentProps {
|
|
5
|
-
form: FormInstance;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
8
|
-
forwardedRef?: React.Ref<any>;
|
|
9
|
-
} & React.RefAttributes<any>> & {
|
|
10
|
-
WrappedComponent: React.ComponentType<Props>;
|
|
11
|
-
};
|
|
12
|
-
export default _default;
|
package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewInvoiceLines.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var antd_1 = require("antd");
|
|
7
|
-
var react_1 = __importDefault(require("react"));
|
|
8
|
-
var react_intl_1 = require("react-intl");
|
|
9
|
-
var BillingLineUtility_1 = require("../../../utils/BillingLineUtility");
|
|
10
|
-
var index_1 = require("./index");
|
|
11
|
-
var IntlUtility_1 = require("../../../utils/IntlUtility");
|
|
12
|
-
var enums_1 = require("../../../enums");
|
|
13
|
-
var InvoicePreviewInvoiceLines = function (props) {
|
|
14
|
-
var _a;
|
|
15
|
-
var token = antd_1.theme.useToken().token;
|
|
16
|
-
var billingLineContent = function (line) {
|
|
17
|
-
var quantity = line.quantity, unitOfMeasure = line.unitOfMeasure, unitPriceAmount = line.unitPriceAmount, currencyCode = line.currencyCode;
|
|
18
|
-
var unitOfMeasureUnit = (unitOfMeasure === null || unitOfMeasure === void 0 ? void 0 : unitOfMeasure.unit) === "One" ? undefined : (unitOfMeasure === null || unitOfMeasure === void 0 ? void 0 : unitOfMeasure.unit) + ("(s)");
|
|
19
|
-
return react_1.default.createElement(antd_1.Typography.Text, { style: { fontStyle: "italic", color: 'grey' } },
|
|
20
|
-
quantity,
|
|
21
|
-
" ",
|
|
22
|
-
unitOfMeasureUnit,
|
|
23
|
-
" ",
|
|
24
|
-
"@",
|
|
25
|
-
" ",
|
|
26
|
-
unitPriceAmount,
|
|
27
|
-
" ",
|
|
28
|
-
currencyCode,
|
|
29
|
-
" ",
|
|
30
|
-
"each");
|
|
31
|
-
};
|
|
32
|
-
var getInvoiceLineHeader = function (line, taxPercentage, calculatedDiscountValue) {
|
|
33
|
-
return react_1.default.createElement("div", { style: {
|
|
34
|
-
display: "flex",
|
|
35
|
-
flexDirection: 'row',
|
|
36
|
-
backgroundColor: "#F5F5F5",
|
|
37
|
-
margin: "0 -24px",
|
|
38
|
-
padding: "0 24px",
|
|
39
|
-
justifyContent: "space-between",
|
|
40
|
-
} },
|
|
41
|
-
react_1.default.createElement("div", { style: { width: "80%", justifyContent: "space-between", display: "flex", flexDirection: 'row' } },
|
|
42
|
-
react_1.default.createElement("div", null,
|
|
43
|
-
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: "16px" } },
|
|
44
|
-
line.itemNo,
|
|
45
|
-
" ",
|
|
46
|
-
react_1.default.createElement("span", { style: { fontWeight: 'bold' } }, line.name))),
|
|
47
|
-
react_1.default.createElement("div", { style: { display: "flex", flexDirection: "row" } },
|
|
48
|
-
billingLineContent(line),
|
|
49
|
-
react_1.default.createElement("div", { style: { marginLeft: '10px' } },
|
|
50
|
-
line.taxableAmount,
|
|
51
|
-
" ",
|
|
52
|
-
line.currencyCode))),
|
|
53
|
-
react_1.default.createElement("div", null,
|
|
54
|
-
react_1.default.createElement(antd_1.Typography.Text, null,
|
|
55
|
-
(0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)((line.quantity * line.unitPriceAmount) + (0, BillingLineUtility_1.calculateTaxAmount)(line.taxableAmount, taxPercentage) - calculatedDiscountValue, props.intl),
|
|
56
|
-
" ",
|
|
57
|
-
line.currencyCode)));
|
|
58
|
-
};
|
|
59
|
-
return (react_1.default.createElement(antd_1.Flex, { vertical: true, style: { padding: "0 24px" }, gap: "middle" },
|
|
60
|
-
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeHeading4 } },
|
|
61
|
-
props.intl.formatMessage(index_1.translationMessages.invoicePreview_billingLinesTitle),
|
|
62
|
-
":"),
|
|
63
|
-
((_a = props.form.getFieldValue(["invoice", "invoiceLines"])) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
|
|
64
|
-
props.form
|
|
65
|
-
.getFieldValue(["invoice", "invoiceLines"])
|
|
66
|
-
.map(function (line, index) {
|
|
67
|
-
var taxPercentage = (0, BillingLineUtility_1.calculateTaxPercentage)(enums_1.AvailableTaxCategoryTypeEnum[line.taxCategoryType]);
|
|
68
|
-
var calculatedDiscountValue = line.discountType === "PERCENTAGE"
|
|
69
|
-
? (0, BillingLineUtility_1.calculateDiscountAmount)(line.discountValue, line.quantity, line.unitPriceAmount)
|
|
70
|
-
: line.discountValue;
|
|
71
|
-
return (react_1.default.createElement(antd_1.Flex, { key: index, vertical: true, gap: "small" },
|
|
72
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true }, getInvoiceLineHeader(line, taxPercentage, calculatedDiscountValue)),
|
|
73
|
-
line.discountValue && (react_1.default.createElement(antd_1.Flex, { justify: "space-between", style: { width: "80%" }, align: "center" },
|
|
74
|
-
react_1.default.createElement(antd_1.Typography.Text, null, "".concat(line.discountValue).concat(line.discountType === "PERCENTAGE" ? "%" : " ".concat(line.currencyCode)),
|
|
75
|
-
" ",
|
|
76
|
-
props.intl.formatMessage(index_1.translationMessages.billingLines_discount)),
|
|
77
|
-
react_1.default.createElement(antd_1.Typography.Text, null,
|
|
78
|
-
"-",
|
|
79
|
-
(0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(calculatedDiscountValue, props.intl),
|
|
80
|
-
" ",
|
|
81
|
-
line.currencyCode))),
|
|
82
|
-
react_1.default.createElement(antd_1.Flex, { justify: "space-between", style: { width: "80%" }, align: "center" },
|
|
83
|
-
react_1.default.createElement(antd_1.Typography.Text, null,
|
|
84
|
-
taxPercentage,
|
|
85
|
-
"% VAT of ",
|
|
86
|
-
line.taxableAmount),
|
|
87
|
-
react_1.default.createElement(antd_1.Typography.Text, null,
|
|
88
|
-
(0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)((0, BillingLineUtility_1.calculateTaxAmount)(line.taxableAmount, taxPercentage), props.intl),
|
|
89
|
-
" ",
|
|
90
|
-
line.currencyCode))));
|
|
91
|
-
})));
|
|
92
|
-
};
|
|
93
|
-
exports.default = (0, react_intl_1.injectIntl)(InvoicePreviewInvoiceLines);
|
package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfo.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FormInstance } from "antd";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { WrappedComponentProps } from "react-intl";
|
|
4
|
-
import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
5
|
-
interface Props extends WrappedComponentProps {
|
|
6
|
-
form: FormInstance;
|
|
7
|
-
receiverRequirements: NewReceiverRequirements;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
10
|
-
forwardedRef?: React.Ref<any>;
|
|
11
|
-
} & React.RefAttributes<any>> & {
|
|
12
|
-
WrappedComponent: React.ComponentType<Props>;
|
|
13
|
-
};
|
|
14
|
-
export default _default;
|
package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfo.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var antd_1 = require("antd");
|
|
7
|
-
var react_1 = __importDefault(require("react"));
|
|
8
|
-
var react_intl_1 = require("react-intl");
|
|
9
|
-
var index_1 = require("./index");
|
|
10
|
-
var payment_method_1 = require("../payment-method");
|
|
11
|
-
var mapi_1 = require("../../../../../unimaze-api-clients/src/mapi");
|
|
12
|
-
var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
|
|
13
|
-
var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
|
|
14
|
-
var InvoicePreviewPaymentInfo = function (props) {
|
|
15
|
-
var defaultPaymentMethods = [
|
|
16
|
-
{
|
|
17
|
-
key: mapi_1.PaymentMeansType.NotSpecified,
|
|
18
|
-
name: props.intl.formatMessage(payment_method_1.translationMessages.paymentMethod_labels_methods_undefined),
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
key: mapi_1.PaymentMeansType.MutuallyAgreed,
|
|
22
|
-
name: props.intl.formatMessage(payment_method_1.translationMessages.paymentMethod_labels_methods_mutuallyAgreed),
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
key: mapi_1.PaymentMeansType.DomesticTransfer,
|
|
26
|
-
name: props.intl.formatMessage(payment_method_1.translationMessages.paymentMethod_labels_methods_domesticTransfer),
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
key: mapi_1.PaymentMeansType.DomesticClaim,
|
|
30
|
-
name: props.intl.formatMessage(payment_method_1.translationMessages.paymentMethod_labels_methods_domesticClaim),
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
var getPaymentMeansValue = function (paymentMeansType) {
|
|
34
|
-
var paymentMeansTypes = (0, RequirementsUtility_1.getFieldRequirements)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["paymentMeans.type"]);
|
|
35
|
-
if (paymentMeansTypes &&
|
|
36
|
-
paymentMeansTypes.hasOwnProperty("properties") &&
|
|
37
|
-
paymentMeansTypes.properties.hasOwnProperty("values") &&
|
|
38
|
-
paymentMeansTypes.properties.values) {
|
|
39
|
-
var paymentMeansValue = paymentMeansTypes.properties.values.find(function (value) { return value.key === paymentMeansType; });
|
|
40
|
-
return paymentMeansValue === null || paymentMeansValue === void 0 ? void 0 : paymentMeansValue.name;
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
var paymentMeansValue = defaultPaymentMethods.find(function (value) { return value.key === paymentMeansType; });
|
|
44
|
-
return paymentMeansValue === null || paymentMeansValue === void 0 ? void 0 : paymentMeansValue.name;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
return (react_1.default.createElement(antd_1.Card, { bordered: false, style: { backgroundColor: "#F5F5F5" }, size: "small" },
|
|
48
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true, style: { padding: "0 12px" }, gap: "small" },
|
|
49
|
-
react_1.default.createElement(antd_1.Typography.Text, { style: { fontWeight: 700 } }, props.intl.formatMessage(index_1.translationMessages.invoicePreview_paymentInfoTitle)),
|
|
50
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true },
|
|
51
|
-
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
52
|
-
props.form.getFieldValue(["invoice", "supplier", "name"]),
|
|
53
|
-
" Kt:",
|
|
54
|
-
" ",
|
|
55
|
-
props.form.getFieldValue(["invoice", "supplier", "identifier"])),
|
|
56
|
-
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, getPaymentMeansValue(props.form.getFieldValue(["invoice", "paymentMeans", "type"]))),
|
|
57
|
-
props.form.getFieldValue(["invoice", "paymentMeans", "domesticTransfer"]) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
58
|
-
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
59
|
-
props.intl.formatMessage(payment_method_1.translationMessages.paymentMethod_labels_domesticTransfer_accountNo),
|
|
60
|
-
":",
|
|
61
|
-
" ",
|
|
62
|
-
props.form.getFieldValue(["invoice", "paymentMeans", "domesticTransfer", "bankNumber",]),
|
|
63
|
-
"-",
|
|
64
|
-
props.form.getFieldValue(["invoice", "paymentMeans", "domesticTransfer", "accountTypeNumber",]),
|
|
65
|
-
"-",
|
|
66
|
-
props.form.getFieldValue(["invoice", "paymentMeans", "domesticTransfer", "accountNumber",])),
|
|
67
|
-
props.form.getFieldValue(["invoice", "paymentMeans", "domesticTransfer", "paymentIdentifier",]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
68
|
-
props.intl.formatMessage(payment_method_1.translationMessages.paymentMethod_labels_domesticTransfer_paymentReference),
|
|
69
|
-
":",
|
|
70
|
-
" ",
|
|
71
|
-
props.form.getFieldValue(["invoice", "paymentMeans", "domesticTransfer", "paymentIdentifier",]))))),
|
|
72
|
-
props.form.getFieldValue(["invoice", "paymentMeans", "domesticClaim"]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
73
|
-
props.form.getFieldValue(["invoice", "paymentMeans", "domesticClaim", "bankNumber",]),
|
|
74
|
-
"-66-",
|
|
75
|
-
props.form.getFieldValue(["invoice", "paymentMeans", "domesticClaim", "accountNumber",])))))));
|
|
76
|
-
};
|
|
77
|
-
exports.default = (0, react_intl_1.injectIntl)(InvoicePreviewPaymentInfo);
|
package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FormInstance } from "antd";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { WrappedComponentProps } from "react-intl";
|
|
4
|
-
import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
5
|
-
interface Props extends WrappedComponentProps {
|
|
6
|
-
form: FormInstance;
|
|
7
|
-
receiverRequirements: NewReceiverRequirements;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
10
|
-
forwardedRef?: React.Ref<any>;
|
|
11
|
-
} & React.RefAttributes<any>> & {
|
|
12
|
-
WrappedComponent: React.ComponentType<Props>;
|
|
13
|
-
};
|
|
14
|
-
export default _default;
|
package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var antd_1 = require("antd");
|
|
7
|
-
var react_1 = __importDefault(require("react"));
|
|
8
|
-
var react_intl_1 = require("react-intl");
|
|
9
|
-
var index_1 = require("./index");
|
|
10
|
-
var mapi_1 = require("../../../../../unimaze-api-clients/src/mapi");
|
|
11
|
-
var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
|
|
12
|
-
var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
|
|
13
|
-
var index_2 = require("../payment-method/index");
|
|
14
|
-
var InvoicePreviewPaymentInfoBox = function (props) {
|
|
15
|
-
var defaultPaymentMethods = [
|
|
16
|
-
{
|
|
17
|
-
key: mapi_1.PaymentMeansType.NotSpecified,
|
|
18
|
-
name: props.intl.formatMessage(index_2.translationMessages.paymentMethod_labels_methods_undefined),
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
key: mapi_1.PaymentMeansType.MutuallyAgreed,
|
|
22
|
-
name: props.intl.formatMessage(index_2.translationMessages.paymentMethod_labels_methods_mutuallyAgreed),
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
key: mapi_1.PaymentMeansType.DomesticTransfer,
|
|
26
|
-
name: props.intl.formatMessage(index_2.translationMessages.paymentMethod_labels_methods_domesticTransfer),
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
key: mapi_1.PaymentMeansType.DomesticClaim,
|
|
30
|
-
name: props.intl.formatMessage(index_2.translationMessages.paymentMethod_labels_methods_domesticClaim),
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
var getPaymentMeansValue = function (paymentMeansType) {
|
|
34
|
-
var paymentMeansTypes = (0, RequirementsUtility_1.getFieldRequirements)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["paymentMeans.type"]);
|
|
35
|
-
if (paymentMeansTypes &&
|
|
36
|
-
paymentMeansTypes.hasOwnProperty("properties") &&
|
|
37
|
-
paymentMeansTypes.properties.hasOwnProperty("values") &&
|
|
38
|
-
paymentMeansTypes.properties.values) {
|
|
39
|
-
var paymentMeansValue = paymentMeansTypes.properties.values.find(function (value) { return value.key === paymentMeansType; });
|
|
40
|
-
return paymentMeansValue === null || paymentMeansValue === void 0 ? void 0 : paymentMeansValue.name;
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
var paymentMeansValue = defaultPaymentMethods.find(function (value) { return value.key === paymentMeansType; });
|
|
44
|
-
return paymentMeansValue === null || paymentMeansValue === void 0 ? void 0 : paymentMeansValue.name;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
return (react_1.default.createElement(antd_1.Card, { bordered: false, style: { backgroundColor: "#F5F5F5" }, size: "small" },
|
|
48
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true, style: { padding: "0 12px" }, gap: "small" },
|
|
49
|
-
react_1.default.createElement(antd_1.Typography.Text, { style: { fontWeight: 700 } }, props.intl.formatMessage(index_1.translationMessages.invoicePreview_paymentInfoTitle)),
|
|
50
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true },
|
|
51
|
-
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
52
|
-
props.form.getFieldValue(["invoice", "supplier", "name"]),
|
|
53
|
-
" Kt:",
|
|
54
|
-
" ",
|
|
55
|
-
props.form.getFieldValue(["invoice", "supplier", "identifier"])),
|
|
56
|
-
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, getPaymentMeansValue(props.form.getFieldValue(["invoice", "paymentMeans", "type"])))))));
|
|
57
|
-
};
|
|
58
|
-
exports.default = (0, react_intl_1.injectIntl)(InvoicePreviewPaymentInfoBox);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FormInstance } from "antd";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { WrappedComponentProps } from "react-intl";
|
|
4
|
-
import { Totals } from "../../../utils/BillingLineUtility";
|
|
5
|
-
interface Props extends WrappedComponentProps {
|
|
6
|
-
form: FormInstance;
|
|
7
|
-
totals: Totals;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
10
|
-
forwardedRef?: React.Ref<any>;
|
|
11
|
-
} & React.RefAttributes<any>> & {
|
|
12
|
-
WrappedComponent: React.ComponentType<Props>;
|
|
13
|
-
};
|
|
14
|
-
export default _default;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var antd_1 = require("antd");
|
|
7
|
-
var react_1 = __importDefault(require("react"));
|
|
8
|
-
var react_intl_1 = require("react-intl");
|
|
9
|
-
var BillingLineUtility_1 = require("../../../utils/BillingLineUtility");
|
|
10
|
-
var index_1 = require("./index");
|
|
11
|
-
var IntlUtility_1 = require("../../../utils/IntlUtility");
|
|
12
|
-
var enums_1 = require("../../../enums");
|
|
13
|
-
var InvoicePreviewTotalAmountPreview = function (props) {
|
|
14
|
-
var token = antd_1.theme.useToken().token;
|
|
15
|
-
var getLinesTax = function () {
|
|
16
|
-
var _a;
|
|
17
|
-
return ((_a = props.form.getFieldValue(["invoice", "invoiceLines"])) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
|
|
18
|
-
props.form.getFieldValue(["invoice", "invoiceLines"]).map(function (line, index) {
|
|
19
|
-
var taxPercentage = (0, BillingLineUtility_1.calculateTaxPercentage)(enums_1.AvailableTaxCategoryTypeEnum[line.taxCategoryType]);
|
|
20
|
-
return (react_1.default.createElement(antd_1.Flex, { justify: "space-between", key: index },
|
|
21
|
-
react_1.default.createElement(antd_1.Typography.Text, null,
|
|
22
|
-
taxPercentage,
|
|
23
|
-
"% VAT"),
|
|
24
|
-
react_1.default.createElement(antd_1.Typography.Text, null, (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)((0, BillingLineUtility_1.calculateTaxAmount)(line.taxableAmount, taxPercentage), props.intl))));
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
return (react_1.default.createElement(antd_1.Flex, { vertical: true, gap: "small" },
|
|
28
|
-
react_1.default.createElement(antd_1.Card, { bordered: false, style: { backgroundColor: "#F5F5F5" }, size: "small" },
|
|
29
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true, style: { padding: "0 12px" } },
|
|
30
|
-
react_1.default.createElement(antd_1.Flex, { justify: "space-between" },
|
|
31
|
-
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: "16px" } }, props.intl.formatMessage(index_1.translationMessages.billingCalculations_labels_TaxAmountWithoutVat)),
|
|
32
|
-
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeSM } },
|
|
33
|
-
props.form.getFieldValue(["invoice", "currencyCode"]),
|
|
34
|
-
" ",
|
|
35
|
-
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: "16px" } }, (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(props.totals.totalTaxableAmount, props.intl)))),
|
|
36
|
-
getLinesTax(),
|
|
37
|
-
react_1.default.createElement(antd_1.Flex, { justify: "space-between" },
|
|
38
|
-
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: "16px" } }, props.intl.formatMessage(index_1.translationMessages.billingCalculations_labels_TotalRoundingAmount)),
|
|
39
|
-
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeSM } },
|
|
40
|
-
props.form.getFieldValue(["invoice", "currencyCode"]),
|
|
41
|
-
" ",
|
|
42
|
-
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: "16px" } }, (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(props.totals.discountAmount, props.intl)))))),
|
|
43
|
-
react_1.default.createElement(antd_1.Flex, { justify: "space-between", align: "center", style: { padding: "0 24px" } },
|
|
44
|
-
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: "16px" } },
|
|
45
|
-
props.intl.formatMessage(index_1.translationMessages.billingCalculations_labels_AmountPayable),
|
|
46
|
-
":"),
|
|
47
|
-
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeHeading4 } },
|
|
48
|
-
props.form.getFieldValue(["invoice", "currencyCode"]),
|
|
49
|
-
" ",
|
|
50
|
-
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeXL } }, (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(Math.round(props.totals.totalTaxInclusiveAmount), props.intl))))));
|
|
51
|
-
};
|
|
52
|
-
exports.default = (0, react_intl_1.injectIntl)(InvoicePreviewTotalAmountPreview);
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { WrappedComponentProps } from "react-intl";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { FormInstance } from "antd";
|
|
4
|
-
import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
5
|
-
import { PartyMetadata } from "@unimaze/api-clients/lib/mapi";
|
|
6
|
-
export declare const translationMessages: {
|
|
7
|
-
customer_title: {
|
|
8
|
-
id: string;
|
|
9
|
-
defaultMessage: string;
|
|
10
|
-
};
|
|
11
|
-
customer_address_streetNameAndNumber: {
|
|
12
|
-
id: string;
|
|
13
|
-
defaultMessage: string;
|
|
14
|
-
};
|
|
15
|
-
customer_identifier: {
|
|
16
|
-
id: string;
|
|
17
|
-
defaultMessage: string;
|
|
18
|
-
};
|
|
19
|
-
baseInformation_costCenter: {
|
|
20
|
-
id: string;
|
|
21
|
-
defaultMessage: string;
|
|
22
|
-
};
|
|
23
|
-
baseInformation_issueDate: {
|
|
24
|
-
id: string;
|
|
25
|
-
defaultMessage: string;
|
|
26
|
-
};
|
|
27
|
-
baseInformation_dueDate: {
|
|
28
|
-
id: string;
|
|
29
|
-
defaultMessage: string;
|
|
30
|
-
};
|
|
31
|
-
baseInformation_notes: {
|
|
32
|
-
id: string;
|
|
33
|
-
defaultMessage: string;
|
|
34
|
-
};
|
|
35
|
-
supplier_title: {
|
|
36
|
-
id: string;
|
|
37
|
-
defaultMessage: string;
|
|
38
|
-
};
|
|
39
|
-
supplier_identifier: {
|
|
40
|
-
id: string;
|
|
41
|
-
defaultMessage: string;
|
|
42
|
-
};
|
|
43
|
-
supplier_address_streetNameAndNumber: {
|
|
44
|
-
id: string;
|
|
45
|
-
defaultMessage: string;
|
|
46
|
-
};
|
|
47
|
-
supplier_contact_phoneNumber: {
|
|
48
|
-
id: string;
|
|
49
|
-
defaultMessage: string;
|
|
50
|
-
};
|
|
51
|
-
billingCalculations_labels_TaxAmountWithoutVat: {
|
|
52
|
-
id: string;
|
|
53
|
-
defaultMessage: string;
|
|
54
|
-
};
|
|
55
|
-
billingCalculations_labels_AmountPayable: {
|
|
56
|
-
id: string;
|
|
57
|
-
defaultMessage: string;
|
|
58
|
-
};
|
|
59
|
-
billingCalculations_labels_TotalAmountWithVat: {
|
|
60
|
-
id: string;
|
|
61
|
-
defaultMessage: string;
|
|
62
|
-
};
|
|
63
|
-
billingCalculations_labels_TotalRoundingAmount: {
|
|
64
|
-
id: string;
|
|
65
|
-
defaultMessage: string;
|
|
66
|
-
};
|
|
67
|
-
billingLines_discount: {
|
|
68
|
-
id: string;
|
|
69
|
-
defaultMessage: string;
|
|
70
|
-
};
|
|
71
|
-
billingLines_total: {
|
|
72
|
-
id: string;
|
|
73
|
-
defaultMessage: string;
|
|
74
|
-
};
|
|
75
|
-
invoicePreview_billingLinesTitle: {
|
|
76
|
-
id: string;
|
|
77
|
-
defaultMessage: string;
|
|
78
|
-
};
|
|
79
|
-
invoicePreview_attachmentsTitle: {
|
|
80
|
-
id: string;
|
|
81
|
-
defaultMessage: string;
|
|
82
|
-
};
|
|
83
|
-
invoicePreview_paymentInfoTitle: {
|
|
84
|
-
id: string;
|
|
85
|
-
defaultMessage: string;
|
|
86
|
-
};
|
|
87
|
-
billingLines_total_discount: {
|
|
88
|
-
id: string;
|
|
89
|
-
defaultMessage: string;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
interface Props extends WrappedComponentProps {
|
|
93
|
-
recieverRequirements: NewReceiverRequirements;
|
|
94
|
-
form: FormInstance;
|
|
95
|
-
chosenCustomer: PartyMetadata;
|
|
96
|
-
}
|
|
97
|
-
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
98
|
-
forwardedRef?: React.Ref<any>;
|
|
99
|
-
} & React.RefAttributes<any>> & {
|
|
100
|
-
WrappedComponent: React.ComponentType<Props>;
|
|
101
|
-
};
|
|
102
|
-
export default _default;
|