@unimaze/billing 0.21.52 → 0.21.53
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 +5 -0
- package/lib/style/index.css +51 -0
- 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,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { WrappedComponentProps } from "react-intl";
|
|
3
|
-
import { FormInstance } from "antd/es/form";
|
|
4
|
-
interface Props extends WrappedComponentProps {
|
|
5
|
-
currencyCode: string;
|
|
6
|
-
formInstance: FormInstance;
|
|
7
|
-
outsideVatScope: boolean;
|
|
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,151 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
var react_1 = __importStar(require("react"));
|
|
27
|
-
var antd_1 = require("antd");
|
|
28
|
-
var BillingLineUtility_1 = require("../../../utils/BillingLineUtility");
|
|
29
|
-
var api_1 = require("@unimaze/api-clients/lib/mapi/api");
|
|
30
|
-
var react_intl_1 = require("react-intl");
|
|
31
|
-
var IntlUtility_1 = require("../../../utils/IntlUtility");
|
|
32
|
-
var translationMessages = (0, react_intl_1.defineMessages)({
|
|
33
|
-
billingCalculations_labels_TaxAmountWithoutVat: {
|
|
34
|
-
id: "billingCalculations_labels_TaxAmountWithoutVat",
|
|
35
|
-
defaultMessage: "Total amount without VAT",
|
|
36
|
-
},
|
|
37
|
-
billingCalculations_labels_TotalVatAmount: {
|
|
38
|
-
id: "billingCalculations_labels_TotalVatAmount",
|
|
39
|
-
defaultMessage: "Total VAT amount",
|
|
40
|
-
},
|
|
41
|
-
billingCalculations_labels_TotalAmountWithVat: {
|
|
42
|
-
id: "billingCalculations_labels_TotalAmountWithVat",
|
|
43
|
-
defaultMessage: "Total amount with VAT",
|
|
44
|
-
},
|
|
45
|
-
billingCalculations_labels_AmountPayable: {
|
|
46
|
-
id: "billingCalculations_labels_AmountPayable",
|
|
47
|
-
defaultMessage: "Amount payable",
|
|
48
|
-
},
|
|
49
|
-
billingCalculations_labels_RoundingAmount: {
|
|
50
|
-
id: "billingCalculations_labels_RoundingAmount",
|
|
51
|
-
defaultMessage: "Rounding amount",
|
|
52
|
-
},
|
|
53
|
-
billingLines_discount: {
|
|
54
|
-
id: "billingLines_discount",
|
|
55
|
-
defaultMessage: "Discount",
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
;
|
|
59
|
-
var BillingCalculations = function (props) {
|
|
60
|
-
var _a = (0, react_1.useState)([]), invoiceLines = _a[0], setInvoiceLines = _a[1];
|
|
61
|
-
(0, react_1.useEffect)(function () {
|
|
62
|
-
var savedLines = props.formInstance.getFieldValue(["invoice", "invoiceLines"]).filter(function (line) { return line.editing === false; });
|
|
63
|
-
setInvoiceLines(savedLines);
|
|
64
|
-
}, [props.outsideVatScope, props.formInstance.getFieldValue(["invoice", "invoiceLines"])]);
|
|
65
|
-
var totals = {
|
|
66
|
-
totalTaxableAmount: 0,
|
|
67
|
-
totalTaxAmount: 0,
|
|
68
|
-
totalTaxInclusiveAmount: 0,
|
|
69
|
-
roundingAmount: 0,
|
|
70
|
-
discountAmount: 0,
|
|
71
|
-
};
|
|
72
|
-
if (invoiceLines) {
|
|
73
|
-
invoiceLines.map(function (billingLine) {
|
|
74
|
-
if (billingLine) {
|
|
75
|
-
var taxAmount = (0, BillingLineUtility_1.calculateTaxAmount)((0, BillingLineUtility_1.calculateTaxableAmount)(billingLine.discountValue, billingLine.quantity, billingLine.unitPriceAmount, billingLine.discountType), (0, BillingLineUtility_1.calculateTaxPercentage)(billingLine.taxCategoryType ? api_1.TaxCategoryTypeEnum[billingLine.taxCategoryType] : undefined));
|
|
76
|
-
var taxableAmount = (0, BillingLineUtility_1.calculateTaxableAmount)(billingLine.discountValue, billingLine.quantity, billingLine.unitPriceAmount, billingLine.discountType);
|
|
77
|
-
var taxInclusiveAmount = taxableAmount + taxAmount;
|
|
78
|
-
var discountAmount = billingLine.discountType === "PERCENTAGE"
|
|
79
|
-
? (0, BillingLineUtility_1.calculateDiscountAmount)(billingLine.discountValue, billingLine.quantity, billingLine.unitPriceAmount)
|
|
80
|
-
: billingLine.discountValue
|
|
81
|
-
? parseFloat(billingLine.discountValue)
|
|
82
|
-
: 0;
|
|
83
|
-
totals = {
|
|
84
|
-
totalTaxAmount: totals.totalTaxAmount + taxAmount,
|
|
85
|
-
totalTaxableAmount: totals.totalTaxableAmount + taxableAmount,
|
|
86
|
-
totalTaxInclusiveAmount: totals.totalTaxInclusiveAmount + taxInclusiveAmount,
|
|
87
|
-
roundingAmount: Math.abs(totals.totalTaxInclusiveAmount +
|
|
88
|
-
taxInclusiveAmount -
|
|
89
|
-
Math.round(totals.totalTaxInclusiveAmount + taxInclusiveAmount)),
|
|
90
|
-
discountAmount: totals.discountAmount + discountAmount,
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
var roundedAmount = Math.round(totals.totalTaxInclusiveAmount);
|
|
96
|
-
var roundingAmount = totals.totalTaxInclusiveAmount - roundedAmount;
|
|
97
|
-
return (react_1.default.createElement(antd_1.Flex, { vertical: true },
|
|
98
|
-
react_1.default.createElement(antd_1.Flex, { justify: "end", gap: 'large' },
|
|
99
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true, style: { fontWeight: 300 } },
|
|
100
|
-
react_1.default.createElement(antd_1.Typography.Text, null,
|
|
101
|
-
props.intl.formatMessage(translationMessages.billingCalculations_labels_TaxAmountWithoutVat),
|
|
102
|
-
":"),
|
|
103
|
-
react_1.default.createElement(antd_1.Typography.Text, null,
|
|
104
|
-
props.intl.formatMessage(translationMessages.billingCalculations_labels_TotalAmountWithVat),
|
|
105
|
-
":"),
|
|
106
|
-
totals.discountAmount > 0 && (react_1.default.createElement(antd_1.Typography.Text, null,
|
|
107
|
-
props.intl.formatMessage(translationMessages.billingLines_discount),
|
|
108
|
-
":")),
|
|
109
|
-
roundingAmount !== 0 && (react_1.default.createElement(antd_1.Typography.Text, null,
|
|
110
|
-
props.intl.formatMessage(translationMessages.billingCalculations_labels_RoundingAmount),
|
|
111
|
-
":"))),
|
|
112
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true },
|
|
113
|
-
react_1.default.createElement(antd_1.Typography.Text, { strong: true },
|
|
114
|
-
(0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(totals.totalTaxableAmount, props.intl, {
|
|
115
|
-
style: "decimal",
|
|
116
|
-
}),
|
|
117
|
-
" ",
|
|
118
|
-
props.formInstance.getFieldValue(["invoice", "currencyCode"])),
|
|
119
|
-
react_1.default.createElement(antd_1.Typography.Text, { strong: true },
|
|
120
|
-
(0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(totals.totalTaxInclusiveAmount, props.intl, {
|
|
121
|
-
style: "decimal",
|
|
122
|
-
}),
|
|
123
|
-
" ",
|
|
124
|
-
props.formInstance.getFieldValue(["invoice", "currencyCode"])),
|
|
125
|
-
totals.discountAmount > 0 && (react_1.default.createElement(antd_1.Typography.Text, { strong: true },
|
|
126
|
-
(0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(totals.discountAmount, props.intl, {
|
|
127
|
-
style: "decimal",
|
|
128
|
-
}),
|
|
129
|
-
" ",
|
|
130
|
-
props.formInstance.getFieldValue(["invoice", "currencyCode"]))),
|
|
131
|
-
roundingAmount !== 0 && (react_1.default.createElement(antd_1.Typography.Text, { strong: true },
|
|
132
|
-
(0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(roundingAmount, props.intl, {
|
|
133
|
-
style: "decimal",
|
|
134
|
-
}),
|
|
135
|
-
" ",
|
|
136
|
-
props.formInstance.getFieldValue(["invoice", "currencyCode"]))))),
|
|
137
|
-
react_1.default.createElement(antd_1.Row, null,
|
|
138
|
-
react_1.default.createElement(antd_1.Col, { span: 24 },
|
|
139
|
-
react_1.default.createElement("hr", null))),
|
|
140
|
-
react_1.default.createElement(antd_1.Flex, { justify: "end" },
|
|
141
|
-
react_1.default.createElement(antd_1.Typography.Text, { strong: true, style: { fontSize: "18px" } },
|
|
142
|
-
" ",
|
|
143
|
-
"=",
|
|
144
|
-
" ",
|
|
145
|
-
(0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(roundedAmount, props.intl, {
|
|
146
|
-
style: "decimal",
|
|
147
|
-
}),
|
|
148
|
-
" ",
|
|
149
|
-
props.formInstance.getFieldValue(["invoice", "currencyCode"])))));
|
|
150
|
-
};
|
|
151
|
-
exports.default = (0, react_intl_1.injectIntl)(BillingCalculations);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { AvailableTaxCategoryTypeEnum } from "../../../enums";
|
|
3
|
-
import { WrappedComponentProps } from "react-intl";
|
|
4
|
-
interface BillingLinePreviewProps extends WrappedComponentProps {
|
|
5
|
-
itemNo?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
taxableAmount?: number;
|
|
8
|
-
quantity?: number;
|
|
9
|
-
unit?: string;
|
|
10
|
-
unitPriceAmount?: number;
|
|
11
|
-
unitOfMeasure?: any;
|
|
12
|
-
taxCategoryType?: AvailableTaxCategoryTypeEnum;
|
|
13
|
-
discountValue?: string;
|
|
14
|
-
discountType?: string;
|
|
15
|
-
currencyCode: string;
|
|
16
|
-
onDelete: () => void;
|
|
17
|
-
onEdit: () => void;
|
|
18
|
-
}
|
|
19
|
-
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<BillingLinePreviewProps, "intl"> & {
|
|
20
|
-
forwardedRef?: React.Ref<any>;
|
|
21
|
-
} & React.RefAttributes<any>> & {
|
|
22
|
-
WrappedComponent: React.ComponentType<BillingLinePreviewProps>;
|
|
23
|
-
};
|
|
24
|
-
export default _default;
|
|
@@ -1,61 +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 react_1 = __importDefault(require("react"));
|
|
7
|
-
var enums_1 = require("../../../enums");
|
|
8
|
-
var BillingLineUtility_1 = require("../../../utils/BillingLineUtility");
|
|
9
|
-
var antd_1 = require("antd");
|
|
10
|
-
var icons_1 = require("@ant-design/icons");
|
|
11
|
-
var NewBillingLines_1 = require("./NewBillingLines");
|
|
12
|
-
var react_intl_1 = require("react-intl");
|
|
13
|
-
var BillingLinePreview = function (props) {
|
|
14
|
-
var billingLineHeader = function () {
|
|
15
|
-
var itemNo = props.itemNo, name = props.name, taxableAmount = props.taxableAmount, currencyCode = props.currencyCode;
|
|
16
|
-
return react_1.default.createElement("div", { style: { display: "flex", justifyContent: "space-between", flexDirection: 'row' } },
|
|
17
|
-
react_1.default.createElement("div", null,
|
|
18
|
-
itemNo,
|
|
19
|
-
" ",
|
|
20
|
-
react_1.default.createElement("span", { style: { fontWeight: 'bold' } }, name)),
|
|
21
|
-
react_1.default.createElement("div", { style: { fontWeight: 'bold' } },
|
|
22
|
-
taxableAmount,
|
|
23
|
-
" ",
|
|
24
|
-
currencyCode));
|
|
25
|
-
};
|
|
26
|
-
var billingLineContent = function () {
|
|
27
|
-
var quantity = props.quantity, unitOfMeasure = props.unitOfMeasure, unitPriceAmount = props.unitPriceAmount, currencyCode = props.currencyCode, discountValue = props.discountValue, discountType = props.discountType;
|
|
28
|
-
var unitOfMeasureUnit = (unitOfMeasure === null || unitOfMeasure === void 0 ? void 0 : unitOfMeasure.unit) === "One" ? undefined : (unitOfMeasure === null || unitOfMeasure === void 0 ? void 0 : unitOfMeasure.unit) + ("(s)");
|
|
29
|
-
var discountExist = Number(discountValue) > 0;
|
|
30
|
-
var taxPercentage = (0, BillingLineUtility_1.calculateTaxPercentage)(enums_1.AvailableTaxCategoryTypeEnum[props.taxCategoryType]);
|
|
31
|
-
var discount = discountExist ? ", ".concat(discountValue).concat(discountType === "PERCENTAGE" ? "%" : " ".concat(currencyCode), " ").concat(props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_discount)) : null;
|
|
32
|
-
var tax = "".concat(taxPercentage, "% tax");
|
|
33
|
-
return react_1.default.createElement(antd_1.Typography.Text, null,
|
|
34
|
-
quantity,
|
|
35
|
-
" ",
|
|
36
|
-
unitOfMeasureUnit,
|
|
37
|
-
" ",
|
|
38
|
-
"@",
|
|
39
|
-
" ",
|
|
40
|
-
unitPriceAmount,
|
|
41
|
-
" ",
|
|
42
|
-
currencyCode,
|
|
43
|
-
" ",
|
|
44
|
-
"each",
|
|
45
|
-
" ",
|
|
46
|
-
"(",
|
|
47
|
-
tax,
|
|
48
|
-
" ",
|
|
49
|
-
discount,
|
|
50
|
-
")");
|
|
51
|
-
};
|
|
52
|
-
return (react_1.default.createElement(antd_1.Card, { style: { backgroundColor: "#F5F5F5", width: "full" }, size: "small", bordered: false },
|
|
53
|
-
react_1.default.createElement(antd_1.Flex, { align: "center", justify: "space-between" },
|
|
54
|
-
react_1.default.createElement(antd_1.Flex, { vertical: true, style: { width: '100%' } },
|
|
55
|
-
react_1.default.createElement(antd_1.Typography.Text, null, billingLineHeader()),
|
|
56
|
-
react_1.default.createElement(antd_1.Typography.Text, null, billingLineContent())),
|
|
57
|
-
react_1.default.createElement("div", { style: { display: "flex", flexDirection: 'row' } },
|
|
58
|
-
react_1.default.createElement(antd_1.Button, { onClick: props.onEdit, icon: react_1.default.createElement(icons_1.EditOutlined, null), type: "text" }),
|
|
59
|
-
react_1.default.createElement(antd_1.Button, { onClick: props.onDelete, icon: react_1.default.createElement(icons_1.DeleteOutlined, null), type: "text", danger: true })))));
|
|
60
|
-
};
|
|
61
|
-
exports.default = (0, react_intl_1.injectIntl)(BillingLinePreview);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { WrappedComponentProps } from "react-intl";
|
|
3
|
-
import { FormInstance } from "antd/es/form";
|
|
4
|
-
interface Props extends WrappedComponentProps {
|
|
5
|
-
formInstance: FormInstance;
|
|
6
|
-
outsideVatScope: boolean;
|
|
7
|
-
}
|
|
8
|
-
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
9
|
-
forwardedRef?: React.Ref<any>;
|
|
10
|
-
} & React.RefAttributes<any>> & {
|
|
11
|
-
WrappedComponent: React.ComponentType<Props>;
|
|
12
|
-
};
|
|
13
|
-
export default _default;
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
26
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
27
|
-
if (ar || !(i in from)) {
|
|
28
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
29
|
-
ar[i] = from[i];
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
var react_1 = __importStar(require("react"));
|
|
36
|
-
var antd_1 = require("antd");
|
|
37
|
-
var BillingLineUtility_1 = require("../../../utils/BillingLineUtility");
|
|
38
|
-
var api_1 = require("@unimaze/api-clients/lib/mapi/api");
|
|
39
|
-
var react_intl_1 = require("react-intl");
|
|
40
|
-
var CommonTranslations_1 = require("../CommonTranslations");
|
|
41
|
-
var IntlUtility_1 = require("../../../utils/IntlUtility");
|
|
42
|
-
var translationMessages = (0, react_intl_1.defineMessages)({
|
|
43
|
-
billingTaxSummary_taxOverview: {
|
|
44
|
-
id: "billingTaxSummary_taxOverview",
|
|
45
|
-
defaultMessage: "Tax overview"
|
|
46
|
-
},
|
|
47
|
-
billingTaxSummary_taxableAmount: {
|
|
48
|
-
id: "billingTaxSummary_taxableAmount",
|
|
49
|
-
defaultMessage: "Taxable amount"
|
|
50
|
-
},
|
|
51
|
-
billingTaxSummary_taxAmount: {
|
|
52
|
-
id: "billingTaxSummary_taxAmount",
|
|
53
|
-
defaultMessage: "Tax"
|
|
54
|
-
},
|
|
55
|
-
billingTaxSummary_taxCategoryType_labels_StandardRated: {
|
|
56
|
-
id: "billingTaxSummary_taxCategoryType_labels_StandardRated",
|
|
57
|
-
defaultMessage: "Standard rated",
|
|
58
|
-
},
|
|
59
|
-
billingTaxSummary_taxCategoryType_labels_ReducedRated: {
|
|
60
|
-
id: "billingTaxSummary_taxCategoryType_labels_ReducedRated",
|
|
61
|
-
defaultMessage: "Reduced rated",
|
|
62
|
-
},
|
|
63
|
-
billingTaxSummary_taxCategoryType_labels_ZeroRated: {
|
|
64
|
-
id: "billingTaxSummary_taxCategoryType_labels_ZeroRated",
|
|
65
|
-
defaultMessage: "Zero rated",
|
|
66
|
-
},
|
|
67
|
-
billingTaxSummary_taxCategoryType_labels_Exempt: {
|
|
68
|
-
id: "billingTaxSummary_taxCategoryType_labels_Exempt",
|
|
69
|
-
defaultMessage: "Exempt",
|
|
70
|
-
},
|
|
71
|
-
billingTaxSummary_taxCategoryType_labels_OutsideTaxScope: {
|
|
72
|
-
id: "billingTaxSummary_taxCategoryType_labels_OutsideTaxScope",
|
|
73
|
-
defaultMessage: "Outside tax scope",
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
|
-
var BillingTaxSummary = function (props) {
|
|
77
|
-
var _a = (0, react_1.useState)(props.formInstance.getFieldValue(["invoice", "invoiceLines"])), invoiceLines = _a[0], setInvoiceLines = _a[1];
|
|
78
|
-
(0, react_1.useEffect)(function () {
|
|
79
|
-
setInvoiceLines(props.formInstance.getFieldValue(["invoice", "invoiceLines"]));
|
|
80
|
-
}, [props.outsideVatScope, props.formInstance.getFieldValue(["invoice", "invoiceLines"])]);
|
|
81
|
-
var dataSource = invoiceLines
|
|
82
|
-
? invoiceLines.map(function (billingLine) {
|
|
83
|
-
var taxCategoryType = billingLine.taxCategoryType ? api_1.TaxCategoryTypeEnum[billingLine.taxCategoryType] : undefined;
|
|
84
|
-
var translationString = "taxCategoryType_labels_".concat(taxCategoryType);
|
|
85
|
-
var taxCategoryTypeTranslated = CommonTranslations_1.commonTranslationMessages.hasOwnProperty(translationString)
|
|
86
|
-
? props.intl.formatMessage(CommonTranslations_1.commonTranslationMessages[translationString])
|
|
87
|
-
: "";
|
|
88
|
-
return {
|
|
89
|
-
taxOverview: (0, BillingLineUtility_1.generateTaxCategoryLabel)(taxCategoryType, taxCategoryTypeTranslated),
|
|
90
|
-
taxableAmount: (0, BillingLineUtility_1.calculateTaxableAmount)(billingLine.discountValue, billingLine.quantity, billingLine.unitPriceAmount, billingLine.discountType),
|
|
91
|
-
taxAmount: (0, BillingLineUtility_1.calculateTaxAmount)((0, BillingLineUtility_1.calculateTaxableAmount)(billingLine.discountValue, billingLine.quantity, billingLine.unitPriceAmount, billingLine.discountType), (0, BillingLineUtility_1.calculateTaxPercentage)(billingLine.taxCategoryType ? api_1.TaxCategoryTypeEnum[billingLine.taxCategoryType] : undefined))
|
|
92
|
-
};
|
|
93
|
-
})
|
|
94
|
-
: [];
|
|
95
|
-
var hlpArray = dataSource ? __spreadArray([], dataSource, true) : [];
|
|
96
|
-
var helper = {};
|
|
97
|
-
var result = hlpArray.reduce(function (r, o) {
|
|
98
|
-
var key = o.taxOverview;
|
|
99
|
-
if (!helper[key]) {
|
|
100
|
-
helper[key] = Object.assign({}, o); // create a copy of o
|
|
101
|
-
r.push(helper[key]);
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
helper[key].taxAmount += o.taxAmount;
|
|
105
|
-
helper[key].taxableAmount += o.taxableAmount;
|
|
106
|
-
}
|
|
107
|
-
return r;
|
|
108
|
-
}, []);
|
|
109
|
-
var columns = [
|
|
110
|
-
{
|
|
111
|
-
title: props.intl.formatMessage(translationMessages.billingTaxSummary_taxOverview),
|
|
112
|
-
dataIndex: "taxOverview",
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
title: props.intl.formatMessage(translationMessages.billingTaxSummary_taxableAmount),
|
|
116
|
-
dataIndex: "taxableAmount",
|
|
117
|
-
render: function (value, record) {
|
|
118
|
-
return (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(record.taxableAmount, props.intl, { style: "decimal" });
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
title: props.intl.formatMessage(translationMessages.billingTaxSummary_taxAmount),
|
|
123
|
-
dataIndex: "taxAmount",
|
|
124
|
-
render: function (value, record) {
|
|
125
|
-
return (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(record.taxAmount, props.intl, { style: "decimal" });
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
];
|
|
129
|
-
return (react_1.default.createElement(antd_1.Table, { style: { minHeight: "170px" },
|
|
130
|
-
// showHeader={false}
|
|
131
|
-
columns: columns, dataSource: result, pagination: false, rowKey: (function (record, index) { return index.toString(); }) }));
|
|
132
|
-
};
|
|
133
|
-
exports.default = (0, react_intl_1.injectIntl)(BillingTaxSummary);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FieldValues, NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
2
|
-
import { WrappedComponentProps } from "react-intl";
|
|
3
|
-
import { FormInstance } from "antd/es/form";
|
|
4
|
-
import React from "react";
|
|
5
|
-
interface Props extends WrappedComponentProps {
|
|
6
|
-
receiverRequirements: NewReceiverRequirements;
|
|
7
|
-
fieldName: any;
|
|
8
|
-
formInstance: FormInstance;
|
|
9
|
-
currencies: FieldValues[];
|
|
10
|
-
mobile: boolean;
|
|
11
|
-
onSelect: (value: any) => void;
|
|
12
|
-
disabled: boolean;
|
|
13
|
-
callbackfn: (currency: FieldValues) => React.JSX.Element;
|
|
14
|
-
}
|
|
15
|
-
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
16
|
-
forwardedRef?: React.Ref<any>;
|
|
17
|
-
} & React.RefAttributes<any>> & {
|
|
18
|
-
WrappedComponent: React.ComponentType<Props>;
|
|
19
|
-
};
|
|
20
|
-
export default _default;
|
|
@@ -1,17 +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 react_intl_1 = require("react-intl");
|
|
7
|
-
var antd_1 = require("antd");
|
|
8
|
-
var react_1 = __importDefault(require("react"));
|
|
9
|
-
var form_item_1 = __importDefault(require("../form-item"));
|
|
10
|
-
var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
|
|
11
|
-
var NewBillingLines_1 = require("./NewBillingLines");
|
|
12
|
-
var CurrencySelector = function (props) {
|
|
13
|
-
var _a;
|
|
14
|
-
return react_1.default.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields.currencyCode, defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_currencyCode), defaultIsRequired: true, fieldName: [props.fieldName, "currencyCode"], initialValue: (_a = props.formInstance.getFieldValue(["invoice", "currencyCode"])) !== null && _a !== void 0 ? _a : props.currencies[0].key, style: { marginBottom: "-2px" } },
|
|
15
|
-
react_1.default.createElement(antd_1.Select, { popupMatchSelectWidth: false, style: { width: props.mobile ? 64 : "auto" }, placeholder: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_currencyCode), onSelect: props.onSelect, disabled: props.disabled }, props.currencies.map(props.callbackfn)));
|
|
16
|
-
};
|
|
17
|
-
exports.default = (0, react_intl_1.injectIntl)(CurrencySelector);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FormInstance } from "antd/es/form";
|
|
2
|
-
import React from "react";
|
|
3
|
-
interface Props {
|
|
4
|
-
fieldName: any;
|
|
5
|
-
initialValue: "PERCENTAGE" | "AMOUNT";
|
|
6
|
-
onSelect: (value: any) => void;
|
|
7
|
-
formInstance: FormInstance;
|
|
8
|
-
}
|
|
9
|
-
export declare const DiscountTypeSelector: React.FC<Props>;
|
|
10
|
-
export default DiscountTypeSelector;
|
|
@@ -1,16 +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
|
-
exports.DiscountTypeSelector = void 0;
|
|
7
|
-
var antd_1 = require("antd");
|
|
8
|
-
var react_1 = __importDefault(require("react"));
|
|
9
|
-
var DiscountTypeSelector = function (props) {
|
|
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: 90 } },
|
|
12
|
-
react_1.default.createElement(antd_1.Select.Option, { value: "AMOUNT" }, props.formInstance.getFieldValue(["invoice", "currencyCode"])),
|
|
13
|
-
react_1.default.createElement(antd_1.Select.Option, { value: "PERCENTAGE" }, "%"))));
|
|
14
|
-
};
|
|
15
|
-
exports.DiscountTypeSelector = DiscountTypeSelector;
|
|
16
|
-
exports.default = exports.DiscountTypeSelector;
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { WrappedComponentProps } from "react-intl";
|
|
3
|
-
import { FormInstance } from "antd/es/form";
|
|
4
|
-
import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
5
|
-
export declare const translationMessages: {
|
|
6
|
-
billingLines_labels_addButton: {
|
|
7
|
-
id: string;
|
|
8
|
-
defaultMessage: string;
|
|
9
|
-
};
|
|
10
|
-
billingLines_itemNo: {
|
|
11
|
-
id: string;
|
|
12
|
-
defaultMessage: string;
|
|
13
|
-
};
|
|
14
|
-
billingLines_name: {
|
|
15
|
-
id: string;
|
|
16
|
-
defaultMessage: string;
|
|
17
|
-
};
|
|
18
|
-
billingLines_quantity: {
|
|
19
|
-
id: string;
|
|
20
|
-
defaultMessage: string;
|
|
21
|
-
};
|
|
22
|
-
billingLines_unitOfMeasure: {
|
|
23
|
-
id: string;
|
|
24
|
-
defaultMessage: string;
|
|
25
|
-
};
|
|
26
|
-
billingLines_unitPriceAmount: {
|
|
27
|
-
id: string;
|
|
28
|
-
defaultMessage: string;
|
|
29
|
-
};
|
|
30
|
-
billingLines_taxCategoryType: {
|
|
31
|
-
id: string;
|
|
32
|
-
defaultMessage: string;
|
|
33
|
-
};
|
|
34
|
-
billingLines_taxCategoryType_title: {
|
|
35
|
-
id: string;
|
|
36
|
-
defaultMessage: string;
|
|
37
|
-
};
|
|
38
|
-
billingLines_taxCategoryPercentage: {
|
|
39
|
-
id: string;
|
|
40
|
-
defaultMessage: string;
|
|
41
|
-
};
|
|
42
|
-
billingLines_discount: {
|
|
43
|
-
id: string;
|
|
44
|
-
defaultMessage: string;
|
|
45
|
-
};
|
|
46
|
-
billingLines_discount_helpText: {
|
|
47
|
-
id: string;
|
|
48
|
-
defaultMessage: string;
|
|
49
|
-
};
|
|
50
|
-
billingLines_lineAmount: {
|
|
51
|
-
id: string;
|
|
52
|
-
defaultMessage: string;
|
|
53
|
-
};
|
|
54
|
-
billingLines_taxAmount: {
|
|
55
|
-
id: string;
|
|
56
|
-
defaultMessage: string;
|
|
57
|
-
};
|
|
58
|
-
billingLines_currencyCode: {
|
|
59
|
-
id: string;
|
|
60
|
-
defaultMessage: string;
|
|
61
|
-
};
|
|
62
|
-
billingLines_currency_ISK: {
|
|
63
|
-
id: string;
|
|
64
|
-
defaultMessage: string;
|
|
65
|
-
};
|
|
66
|
-
billingLines_currency_ISK_short: {
|
|
67
|
-
id: string;
|
|
68
|
-
defaultMessage: string;
|
|
69
|
-
};
|
|
70
|
-
billingLines_currency_DKK: {
|
|
71
|
-
id: string;
|
|
72
|
-
defaultMessage: string;
|
|
73
|
-
};
|
|
74
|
-
billingLines_currency_DKK_short: {
|
|
75
|
-
id: string;
|
|
76
|
-
defaultMessage: string;
|
|
77
|
-
};
|
|
78
|
-
billingLines_currency_NOK: {
|
|
79
|
-
id: string;
|
|
80
|
-
defaultMessage: string;
|
|
81
|
-
};
|
|
82
|
-
billingLines_currency_NOK_short: {
|
|
83
|
-
id: string;
|
|
84
|
-
defaultMessage: string;
|
|
85
|
-
};
|
|
86
|
-
billingLines_currency_SEK: {
|
|
87
|
-
id: string;
|
|
88
|
-
defaultMessage: string;
|
|
89
|
-
};
|
|
90
|
-
billingLines_currency_SEK_short: {
|
|
91
|
-
id: string;
|
|
92
|
-
defaultMessage: string;
|
|
93
|
-
};
|
|
94
|
-
billingLines_currency_EUR: {
|
|
95
|
-
id: string;
|
|
96
|
-
defaultMessage: string;
|
|
97
|
-
};
|
|
98
|
-
billingLines_currency_EUR_short: {
|
|
99
|
-
id: string;
|
|
100
|
-
defaultMessage: string;
|
|
101
|
-
};
|
|
102
|
-
billingLines_currency_USD: {
|
|
103
|
-
id: string;
|
|
104
|
-
defaultMessage: string;
|
|
105
|
-
};
|
|
106
|
-
billingLines_currency_USD_short: {
|
|
107
|
-
id: string;
|
|
108
|
-
defaultMessage: string;
|
|
109
|
-
};
|
|
110
|
-
billingLines_currency_GBP: {
|
|
111
|
-
id: string;
|
|
112
|
-
defaultMessage: string;
|
|
113
|
-
};
|
|
114
|
-
billingLines_currency_GBP_short: {
|
|
115
|
-
id: string;
|
|
116
|
-
defaultMessage: string;
|
|
117
|
-
};
|
|
118
|
-
billingLines_input_must_be_number_validationMessage: {
|
|
119
|
-
id: string;
|
|
120
|
-
defaultMessage: string;
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
interface Props extends WrappedComponentProps {
|
|
124
|
-
receiverRequirements: NewReceiverRequirements;
|
|
125
|
-
formInstance: FormInstance;
|
|
126
|
-
outsideVatScope: boolean;
|
|
127
|
-
validateFields: (fieldNames: string[][], validateOnly?: boolean | undefined) => void;
|
|
128
|
-
}
|
|
129
|
-
declare const BillingLinesWithIntl: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
130
|
-
forwardedRef?: React.Ref<any>;
|
|
131
|
-
} & React.RefAttributes<any>> & {
|
|
132
|
-
WrappedComponent: React.ComponentType<Props>;
|
|
133
|
-
};
|
|
134
|
-
export default BillingLinesWithIntl;
|