@unimaze/billing 0.21.3 → 0.21.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/components/CommonTranslations.d.ts +1 -29
- package/lib/common/components/CommonTranslations.js +4 -32
- package/lib/common/components/attachments/Attachment.d.ts +1 -1
- package/lib/common/components/attachments/AttachmentModal.d.ts +1 -1
- package/lib/common/components/attachments/index.d.ts +1 -1
- package/lib/common/components/base-information/AccountingCost.d.ts +1 -1
- package/lib/common/components/base-information/OrderReference.d.ts +1 -1
- package/lib/common/components/base-information/ProjectReference.d.ts +1 -1
- package/lib/common/components/base-information/ReferenceIdentifiers.d.ts +2 -1
- package/lib/common/components/base-information/ReferenceIdentifiers.js +29 -11
- package/lib/common/components/base-information/index.d.ts +10 -1
- package/lib/common/components/base-information/index.js +9 -1
- package/lib/common/components/billing-lines/BillingCalculations.d.ts +1 -1
- package/lib/common/components/billing-lines/BillingLinePreview.d.ts +2 -1
- package/lib/common/components/billing-lines/BillingLinePreview.js +4 -2
- package/lib/common/components/billing-lines/BillingTaxSummary.d.ts +1 -1
- package/lib/common/components/billing-lines/BillingTaxSummary.js +0 -1
- package/lib/common/components/billing-lines/CurrencySelector.d.ts +20 -0
- package/lib/common/components/billing-lines/CurrencySelector.js +17 -0
- package/lib/common/components/billing-lines/DiscountTypeSelector.d.ts +10 -0
- package/lib/common/components/billing-lines/DiscountTypeSelector.js +16 -0
- package/lib/common/components/billing-lines/NewBillingLines.d.ts +2 -1
- package/lib/common/components/billing-lines/NewBillingLines.js +37 -327
- package/lib/common/components/billing-lines/NewNewBillingLines.d.ts +15 -0
- package/lib/common/components/billing-lines/NewNewBillingLines.js +36 -0
- package/lib/common/components/billing-lines/SingleBillingLine.d.ts +19 -0
- package/lib/common/components/billing-lines/SingleBillingLine.js +262 -0
- package/lib/common/components/billing-lines/UnitOfMeasureSelector.d.ts +14 -0
- package/lib/common/components/billing-lines/UnitOfMeasureSelector.js +15 -0
- package/lib/common/components/billing-lines/cwdwdw.d.ts +1 -0
- package/lib/common/components/billing-lines/cwdwdw.js +14 -0
- package/lib/common/components/billing-lines/index.d.ts +3 -6
- package/lib/common/components/billing-lines/index.js +1 -1
- package/lib/common/components/customer/CostCenter.d.ts +1 -1
- package/lib/common/components/customer/CustomerContactName.d.ts +1 -1
- package/lib/common/components/customer/index.d.ts +1 -1
- package/lib/common/components/customer/index.js +6 -4
- package/lib/common/components/delivery-location/index.d.ts +1 -1
- package/lib/common/components/form-item/index.d.ts +1 -1
- package/lib/common/components/input/index.d.ts +1 -1
- package/lib/common/components/invoice/index.d.ts +3 -1
- package/lib/common/components/invoice/index.js +21 -14
- package/lib/common/components/invoice-preview/InvoicePreviewHeader.d.ts +1 -1
- package/lib/common/components/invoice-preview/InvoicePreviewHeader.js +7 -8
- package/lib/common/components/invoice-preview/index.d.ts +1 -1
- package/lib/common/components/invoice-preview/index.js +8 -2
- package/lib/common/components/payment-method/index.d.ts +1 -1
- package/lib/common/components/payment-method/index.js +22 -7
- package/lib/common/components/supplier/CityAutofill.d.ts +1 -1
- package/lib/common/components/supplier/index.d.ts +1 -1
- package/lib/common/components/welcome-modal/index.d.ts +1 -1
- package/lib/common/types/ReceiverRequirements.d.ts +2 -0
- package/lib/common/types/ReceiverRequirements.js +2 -0
- package/lib/create-invoice/index.d.ts +9 -1
- package/lib/create-invoice/index.js +87 -60
- package/lib/enums.d.ts +3 -0
- package/lib/translations/locales/en.json +7 -10
- package/lib/translations/locales/is.json +5 -8
- package/lib/translations/locales.d.ts +10 -16
- package/lib/unimaze-api-clients/src/mapi/api.d.ts +6664 -0
- package/lib/unimaze-api-clients/src/mapi/api.js +4743 -0
- package/lib/unimaze-api-clients/src/mapi/base.d.ts +55 -0
- package/lib/unimaze-api-clients/src/mapi/base.js +84 -0
- package/lib/unimaze-api-clients/src/mapi/configuration.d.ts +63 -0
- package/lib/unimaze-api-clients/src/mapi/configuration.js +28 -0
- package/lib/unimaze-api-clients/src/mapi/index.d.ts +13 -0
- package/lib/unimaze-api-clients/src/mapi/index.js +30 -0
- package/lib/unimaze-api-clients/src/rapi/api.d.ts +5015 -0
- package/lib/unimaze-api-clients/src/rapi/api.js +5582 -0
- package/lib/unimaze-api-clients/src/rapi/base.d.ts +55 -0
- package/lib/unimaze-api-clients/src/rapi/base.js +84 -0
- package/lib/unimaze-api-clients/src/rapi/configuration.d.ts +63 -0
- package/lib/unimaze-api-clients/src/rapi/configuration.js +28 -0
- package/lib/unimaze-api-clients/src/rapi/index.d.ts +13 -0
- package/lib/unimaze-api-clients/src/rapi/index.js +30 -0
- package/lib/unimaze-billing/src/common/components/CommonTranslations.d.ts +102 -0
- package/lib/unimaze-billing/src/common/components/CommonTranslations.js +106 -0
- package/lib/unimaze-billing/src/common/components/attachments/Attachment.d.ts +20 -0
- package/lib/unimaze-billing/src/common/components/attachments/Attachment.js +164 -0
- package/lib/unimaze-billing/src/common/components/attachments/AttachmentModal.d.ts +21 -0
- package/lib/unimaze-billing/src/common/components/attachments/AttachmentModal.js +203 -0
- package/lib/unimaze-billing/src/common/components/attachments/index.d.ts +27 -0
- package/lib/unimaze-billing/src/common/components/attachments/index.js +214 -0
- package/lib/unimaze-billing/src/common/components/base-information/AccountingCost.d.ts +17 -0
- package/lib/unimaze-billing/src/common/components/base-information/AccountingCost.js +61 -0
- package/lib/unimaze-billing/src/common/components/base-information/OrderReference.d.ts +16 -0
- package/lib/unimaze-billing/src/common/components/base-information/OrderReference.js +58 -0
- package/lib/unimaze-billing/src/common/components/base-information/ProjectReference.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/base-information/ProjectReference.js +30 -0
- package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.d.ts +48 -0
- package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.js +306 -0
- package/lib/unimaze-billing/src/common/components/base-information/index.d.ts +68 -0
- package/lib/unimaze-billing/src/common/components/base-information/index.js +178 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingCalculations.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingCalculations.js +153 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.d.ts +21 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.js +41 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingTaxSummary.d.ts +13 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingTaxSummary.js +134 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/CurrencySelector.d.ts +20 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/CurrencySelector.js +17 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/DiscountTypeSelector.d.ts +10 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/DiscountTypeSelector.js +16 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.d.ts +129 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.js +495 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/NewNewBillingLines.d.ts +15 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/NewNewBillingLines.js +36 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.js +199 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/UnitOfMeasureSelector.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/UnitOfMeasureSelector.js +15 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/index.d.ts +52 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/index.js +104 -0
- package/lib/unimaze-billing/src/common/components/component-container/Content.d.ts +7 -0
- package/lib/unimaze-billing/src/common/components/component-container/Content.js +13 -0
- package/lib/unimaze-billing/src/common/components/component-container/Header.d.ts +9 -0
- package/lib/unimaze-billing/src/common/components/component-container/Header.js +28 -0
- package/lib/unimaze-billing/src/common/components/component-container/index.d.ts +12 -0
- package/lib/unimaze-billing/src/common/components/component-container/index.js +22 -0
- package/lib/unimaze-billing/src/common/components/customer/CostCenter.d.ts +17 -0
- package/lib/unimaze-billing/src/common/components/customer/CostCenter.js +163 -0
- package/lib/unimaze-billing/src/common/components/customer/CustomerContactName.d.ts +17 -0
- package/lib/unimaze-billing/src/common/components/customer/CustomerContactName.js +53 -0
- package/lib/unimaze-billing/src/common/components/customer/hardCoddedCustomer.d.ts +7 -0
- package/lib/unimaze-billing/src/common/components/customer/hardCoddedCustomer.js +41 -0
- package/lib/unimaze-billing/src/common/components/customer/index.d.ts +26 -0
- package/lib/unimaze-billing/src/common/components/customer/index.js +168 -0
- package/lib/unimaze-billing/src/common/components/date-picker/index.d.ts +21 -0
- package/lib/unimaze-billing/src/common/components/date-picker/index.js +23 -0
- package/lib/unimaze-billing/src/common/components/delivery-location/index.d.ts +12 -0
- package/lib/unimaze-billing/src/common/components/delivery-location/index.js +89 -0
- 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 +295 -0
- package/lib/unimaze-billing/src/common/components/editable-row/index.d.ts +5 -0
- package/lib/unimaze-billing/src/common/components/editable-row/index.js +59 -0
- package/lib/unimaze-billing/src/common/components/form-item/index.d.ts +35 -0
- package/lib/unimaze-billing/src/common/components/form-item/index.js +60 -0
- package/lib/unimaze-billing/src/common/components/index.d.ts +18 -0
- package/lib/unimaze-billing/src/common/components/index.js +42 -0
- package/lib/unimaze-billing/src/common/components/input/index.d.ts +23 -0
- package/lib/unimaze-billing/src/common/components/input/index.js +37 -0
- package/lib/unimaze-billing/src/common/components/invoice/index.d.ts +40 -0
- package/lib/unimaze-billing/src/common/components/invoice/index.js +52 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewHeader.d.ts +12 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewHeader.js +105 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/index.d.ts +16 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/index.js +405 -0
- 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 +51 -0
- package/lib/unimaze-billing/src/common/components/payment-method/index.d.ts +76 -0
- package/lib/unimaze-billing/src/common/components/payment-method/index.js +356 -0
- package/lib/unimaze-billing/src/common/components/payment-method/paymentMethodForConversion.d.ts +8 -0
- package/lib/unimaze-billing/src/common/components/payment-method/paymentMethodForConversion.js +37 -0
- package/lib/unimaze-billing/src/common/components/submit-confirmation/SubmitConfirmationSVG.d.ts +3 -0
- package/lib/unimaze-billing/src/common/components/submit-confirmation/SubmitConfirmationSVG.js +17 -0
- package/lib/unimaze-billing/src/common/components/submit-confirmation/index.d.ts +8 -0
- package/lib/unimaze-billing/src/common/components/submit-confirmation/index.js +34 -0
- package/lib/unimaze-billing/src/common/components/supplier/CityAutofill.d.ts +18 -0
- package/lib/unimaze-billing/src/common/components/supplier/CityAutofill.js +159 -0
- package/lib/unimaze-billing/src/common/components/supplier/index.d.ts +94 -0
- package/lib/unimaze-billing/src/common/components/supplier/index.js +334 -0
- package/lib/unimaze-billing/src/common/components/tooltip/index.d.ts +7 -0
- package/lib/unimaze-billing/src/common/components/tooltip/index.js +15 -0
- package/lib/unimaze-billing/src/common/components/welcome-modal/index.d.ts +15 -0
- package/lib/unimaze-billing/src/common/components/welcome-modal/index.js +26 -0
- package/lib/unimaze-billing/src/common/consts/formLayout.d.ts +74 -0
- package/lib/unimaze-billing/src/common/consts/formLayout.js +45 -0
- package/lib/unimaze-billing/src/common/consts/validationRules.d.ts +6 -0
- package/lib/unimaze-billing/src/common/consts/validationRules.js +69 -0
- package/lib/unimaze-billing/src/common/enums/DocumentTypeEnum.d.ts +5 -0
- package/lib/unimaze-billing/src/common/enums/DocumentTypeEnum.js +8 -0
- package/lib/unimaze-billing/src/common/enums/index.d.ts +1 -0
- package/lib/unimaze-billing/src/common/enums/index.js +8 -0
- package/lib/unimaze-billing/src/common/types/AppConfiguration.d.ts +23 -0
- package/lib/unimaze-billing/src/common/types/AppConfiguration.js +2 -0
- package/lib/unimaze-billing/src/common/types/BillingLineMetadataOverride.d.ts +10 -0
- package/lib/unimaze-billing/src/common/types/BillingLineMetadataOverride.js +2 -0
- package/lib/unimaze-billing/src/common/types/CommonProps.d.ts +33 -0
- package/lib/unimaze-billing/src/common/types/CommonProps.js +2 -0
- package/lib/unimaze-billing/src/common/types/DiscountType.d.ts +1 -0
- package/lib/unimaze-billing/src/common/types/DiscountType.js +2 -0
- package/lib/unimaze-billing/src/common/types/InvoiceFormFields.d.ts +1 -0
- package/lib/unimaze-billing/src/common/types/InvoiceFormFields.js +2 -0
- package/lib/unimaze-billing/src/common/types/NewReceiverRequirements.d.ts +27 -0
- package/lib/unimaze-billing/src/common/types/NewReceiverRequirements.js +2 -0
- package/lib/unimaze-billing/src/common/types/ReceiverRequirements.d.ts +81 -0
- package/lib/unimaze-billing/src/common/types/ReceiverRequirements.js +391 -0
- package/lib/unimaze-billing/src/common/types/SupplierInfo.d.ts +11 -0
- package/lib/unimaze-billing/src/common/types/SupplierInfo.js +2 -0
- package/lib/unimaze-billing/src/common/types/index.d.ts +1 -0
- package/lib/unimaze-billing/src/common/types/index.js +17 -0
- package/lib/unimaze-billing/src/create-credit-note/index.d.ts +9 -0
- package/lib/unimaze-billing/src/create-credit-note/index.js +62 -0
- package/lib/unimaze-billing/src/create-invoice/IntlLoader.d.ts +11 -0
- package/lib/unimaze-billing/src/create-invoice/IntlLoader.js +116 -0
- package/lib/unimaze-billing/src/create-invoice/index.d.ts +74 -0
- package/lib/unimaze-billing/src/create-invoice/index.js +680 -0
- package/lib/unimaze-billing/src/enums.d.ts +11 -0
- package/lib/unimaze-billing/src/enums.js +18 -0
- package/lib/unimaze-billing/src/index.d.ts +4 -0
- package/lib/unimaze-billing/src/index.js +28 -0
- package/lib/unimaze-billing/src/translations/locales/en.json +183 -0
- package/lib/unimaze-billing/src/translations/locales/is.json +183 -0
- package/lib/unimaze-billing/src/translations/locales.d.ts +369 -0
- package/lib/unimaze-billing/src/translations/locales.js +11 -0
- package/lib/unimaze-billing/src/utils/ApiUtility.d.ts +23 -0
- package/lib/unimaze-billing/src/utils/ApiUtility.js +115 -0
- package/lib/unimaze-billing/src/utils/BillingLineUtility.d.ts +22 -0
- package/lib/unimaze-billing/src/utils/BillingLineUtility.js +158 -0
- package/lib/unimaze-billing/src/utils/ConversionUtility.d.ts +9 -0
- package/lib/unimaze-billing/src/utils/ConversionUtility.js +223 -0
- package/lib/unimaze-billing/src/utils/FileUploadUtility.d.ts +9 -0
- package/lib/unimaze-billing/src/utils/FileUploadUtility.js +45 -0
- package/lib/unimaze-billing/src/utils/IntlUtility.d.ts +5 -0
- package/lib/unimaze-billing/src/utils/IntlUtility.js +55 -0
- package/lib/unimaze-billing/src/utils/LocationUtility.d.ts +1 -0
- package/lib/unimaze-billing/src/utils/LocationUtility.js +81 -0
- package/lib/unimaze-billing/src/utils/ReferenceIdentifierUtility.d.ts +7 -0
- package/lib/unimaze-billing/src/utils/ReferenceIdentifierUtility.js +26 -0
- package/lib/unimaze-billing/src/utils/RequirementsUtility.d.ts +19 -0
- package/lib/unimaze-billing/src/utils/RequirementsUtility.js +189 -0
- package/lib/unimaze-billing/src/utils/index.d.ts +2 -0
- package/lib/unimaze-billing/src/utils/index.js +8 -0
- package/lib/utils/ApiUtility.d.ts +9 -3
- package/lib/utils/ApiUtility.js +30 -2
- package/lib/utils/BillingLineUtility.d.ts +3 -0
- package/lib/utils/BillingLineUtility.js +32 -1
- package/lib/utils/RequirementsUtility.d.ts +4 -1
- package/lib/utils/RequirementsUtility.js +56 -1
- package/package.json +2 -2
|
@@ -1,33 +1,5 @@
|
|
|
1
1
|
export declare const commonTranslationMessages: {
|
|
2
|
-
|
|
3
|
-
id: string;
|
|
4
|
-
defaultMessage: string;
|
|
5
|
-
};
|
|
6
|
-
taxCategoryType_labels_ReducedRated: {
|
|
7
|
-
id: string;
|
|
8
|
-
defaultMessage: string;
|
|
9
|
-
};
|
|
10
|
-
taxCategoryType_labels_ZeroRated: {
|
|
11
|
-
id: string;
|
|
12
|
-
defaultMessage: string;
|
|
13
|
-
};
|
|
14
|
-
taxCategoryType_labels_Exempt: {
|
|
15
|
-
id: string;
|
|
16
|
-
defaultMessage: string;
|
|
17
|
-
};
|
|
18
|
-
taxCategoryType_labels_OutsideTaxScope: {
|
|
19
|
-
id: string;
|
|
20
|
-
defaultMessage: string;
|
|
21
|
-
};
|
|
22
|
-
taxCategoryType_labels_ReverseCharged: {
|
|
23
|
-
id: string;
|
|
24
|
-
defaultMessage: string;
|
|
25
|
-
};
|
|
26
|
-
taxCategoryType_labels_FreeExportTaxNotCharged: {
|
|
27
|
-
id: string;
|
|
28
|
-
defaultMessage: string;
|
|
29
|
-
};
|
|
30
|
-
taxCategoryType_labels_ExemptEuropeanEconomicArea: {
|
|
2
|
+
taxCategoryType_label: {
|
|
31
3
|
id: string;
|
|
32
4
|
defaultMessage: string;
|
|
33
5
|
};
|
|
@@ -3,37 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.commonTranslationMessages = void 0;
|
|
4
4
|
var react_intl_1 = require("react-intl");
|
|
5
5
|
exports.commonTranslationMessages = (0, react_intl_1.defineMessages)({
|
|
6
|
-
|
|
7
|
-
id: "
|
|
8
|
-
defaultMessage: "Standard rated",
|
|
9
|
-
},
|
|
10
|
-
taxCategoryType_labels_ReducedRated: {
|
|
11
|
-
id: "taxCategoryType_labels_ReducedRated",
|
|
12
|
-
defaultMessage: "Reduced rated",
|
|
13
|
-
},
|
|
14
|
-
taxCategoryType_labels_ZeroRated: {
|
|
15
|
-
id: "taxCategoryType_labels_ZeroRated",
|
|
16
|
-
defaultMessage: "Zero rated",
|
|
17
|
-
},
|
|
18
|
-
taxCategoryType_labels_Exempt: {
|
|
19
|
-
id: "taxCategoryType_labels_Exempt",
|
|
20
|
-
defaultMessage: "Exempt",
|
|
21
|
-
},
|
|
22
|
-
taxCategoryType_labels_OutsideTaxScope: {
|
|
23
|
-
id: "taxCategoryType_labels_OutsideTaxScope",
|
|
24
|
-
defaultMessage: "Outside tax scope",
|
|
25
|
-
},
|
|
26
|
-
taxCategoryType_labels_ReverseCharged: {
|
|
27
|
-
id: "taxCategoryType_labels_ReverseCharged",
|
|
28
|
-
defaultMessage: "Reverse charged",
|
|
29
|
-
},
|
|
30
|
-
taxCategoryType_labels_FreeExportTaxNotCharged: {
|
|
31
|
-
id: "taxCategoryType_labels_FreeExportTaxNotCharged",
|
|
32
|
-
defaultMessage: "Free export tax not charged",
|
|
33
|
-
},
|
|
34
|
-
taxCategoryType_labels_ExemptEuropeanEconomicArea: {
|
|
35
|
-
id: "taxCategoryType_labels_ExemptEuropeanEconomicArea",
|
|
36
|
-
defaultMessage: "Exempt European economic area",
|
|
6
|
+
taxCategoryType_label: {
|
|
7
|
+
id: "taxCategoryType_label",
|
|
8
|
+
defaultMessage: "{taxCategoryType, select , StandardRated {Standard rated} ReducedRated {Reduced rated} ZeroRated {Zero rated} Exempt {Exempt} OutsideTaxScope {Outside tax scope} ReverseCharged {Reverse charged} FreeExportTaxNotCharged {Free export tax not charged} ExemptEuropeanEconomicArea {Exempt European economic area} ExemptionForResale {Exemption for resale} other {taxCategoryType}}",
|
|
37
9
|
},
|
|
38
10
|
unitOfMeasure_labels_Piece: {
|
|
39
11
|
id: "unitOfMeasure_labels_Piece",
|
|
@@ -93,7 +65,7 @@ exports.commonTranslationMessages = (0, react_intl_1.defineMessages)({
|
|
|
93
65
|
},
|
|
94
66
|
unitOfMeasure_labels_One: {
|
|
95
67
|
id: "unitOfMeasure_labels_One",
|
|
96
|
-
defaultMessage: "
|
|
68
|
+
defaultMessage: "Unit",
|
|
97
69
|
},
|
|
98
70
|
saveInformation_label: {
|
|
99
71
|
id: "saveInformation_label",
|
|
@@ -13,7 +13,7 @@ interface Props extends WrappedComponentProps {
|
|
|
13
13
|
setAttachmentFieldValidation: (attachmentFieldValidation: ValidateStatus) => void;
|
|
14
14
|
}
|
|
15
15
|
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
16
|
-
forwardedRef?: React.Ref<any
|
|
16
|
+
forwardedRef?: React.Ref<any>;
|
|
17
17
|
} & React.RefAttributes<any>> & {
|
|
18
18
|
WrappedComponent: React.ComponentType<Props>;
|
|
19
19
|
};
|
|
@@ -14,7 +14,7 @@ interface AttachmentModalProps extends WrappedComponentProps {
|
|
|
14
14
|
onSave: () => void;
|
|
15
15
|
}
|
|
16
16
|
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<AttachmentModalProps, "intl"> & {
|
|
17
|
-
forwardedRef?: React.Ref<any
|
|
17
|
+
forwardedRef?: React.Ref<any>;
|
|
18
18
|
} & React.RefAttributes<any>> & {
|
|
19
19
|
WrappedComponent: React.ComponentType<AttachmentModalProps>;
|
|
20
20
|
};
|
|
@@ -20,7 +20,7 @@ export type AttachmentType = {
|
|
|
20
20
|
description: string;
|
|
21
21
|
};
|
|
22
22
|
declare const AttachmentGroupIntl: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
23
|
-
forwardedRef?: React.Ref<any
|
|
23
|
+
forwardedRef?: React.Ref<any>;
|
|
24
24
|
} & React.RefAttributes<any>> & {
|
|
25
25
|
WrappedComponent: React.ComponentType<Props>;
|
|
26
26
|
};
|
|
@@ -10,7 +10,7 @@ interface Props extends WrappedComponentProps {
|
|
|
10
10
|
legalIdentifier: string;
|
|
11
11
|
}
|
|
12
12
|
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
13
|
-
forwardedRef?: React.Ref<any
|
|
13
|
+
forwardedRef?: React.Ref<any>;
|
|
14
14
|
} & React.RefAttributes<any>> & {
|
|
15
15
|
WrappedComponent: React.ComponentType<Props>;
|
|
16
16
|
};
|
|
@@ -9,7 +9,7 @@ interface Props extends WrappedComponentProps {
|
|
|
9
9
|
dependencies: NamePath[];
|
|
10
10
|
}
|
|
11
11
|
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
12
|
-
forwardedRef?: React.Ref<any
|
|
12
|
+
forwardedRef?: React.Ref<any>;
|
|
13
13
|
} & React.RefAttributes<any>> & {
|
|
14
14
|
WrappedComponent: React.ComponentType<Props>;
|
|
15
15
|
};
|
|
@@ -7,7 +7,7 @@ interface Props extends WrappedComponentProps {
|
|
|
7
7
|
form: FormInstance;
|
|
8
8
|
}
|
|
9
9
|
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
10
|
-
forwardedRef?: React.Ref<any
|
|
10
|
+
forwardedRef?: React.Ref<any>;
|
|
11
11
|
} & React.RefAttributes<any>> & {
|
|
12
12
|
WrappedComponent: React.ComponentType<Props>;
|
|
13
13
|
};
|
|
@@ -39,9 +39,10 @@ interface Props extends WrappedComponentProps {
|
|
|
39
39
|
referenceIdentifiersHelpText?: string;
|
|
40
40
|
referenceIdentifierValidateStatus: ValidateStatus;
|
|
41
41
|
setReferenceIdentifierValidateStatus: (referenceIdentifierValidateStatus: ValidateStatus) => void;
|
|
42
|
+
setReferenceIdentifierIsMandatory: (referenceIdentifierIsMandatory: boolean) => void;
|
|
42
43
|
}
|
|
43
44
|
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
44
|
-
forwardedRef?: React.Ref<any
|
|
45
|
+
forwardedRef?: React.Ref<any>;
|
|
45
46
|
} & React.RefAttributes<any>> & {
|
|
46
47
|
WrappedComponent: React.ComponentType<Props>;
|
|
47
48
|
};
|
|
@@ -55,8 +55,9 @@ var ReferenceIdentifierUtility_1 = require("../../../utils/ReferenceIdentifierUt
|
|
|
55
55
|
var axios_1 = __importDefault(require("axios"));
|
|
56
56
|
var ApiUtility_1 = require("../../../utils/ApiUtility");
|
|
57
57
|
var lodash_1 = require("lodash");
|
|
58
|
-
var form_item_1 = require("../form-item");
|
|
58
|
+
var form_item_1 = __importStar(require("../form-item"));
|
|
59
59
|
var __1 = require("..");
|
|
60
|
+
var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
|
|
60
61
|
exports.translationMessages = (0, react_intl_1.defineMessages)({
|
|
61
62
|
referenceIdentifiers_labels_addButton: {
|
|
62
63
|
id: "referenceIdentifiers_labels_addButton",
|
|
@@ -84,8 +85,9 @@ exports.translationMessages = (0, react_intl_1.defineMessages)({
|
|
|
84
85
|
},
|
|
85
86
|
});
|
|
86
87
|
var ReferenceIdentifiers = function (props) {
|
|
87
|
-
var _a
|
|
88
|
-
var
|
|
88
|
+
var _a, _b, _c, _d, _e, _f;
|
|
89
|
+
var _g = (0, react_1.useState)([]), referenceIdentifierValue = _g[0], setReferenceIdentifierValue = _g[1];
|
|
90
|
+
var _h = (0, react_1.useState)(false), loadingReferenceIdentifierValues = _h[0], setLoadingReferenceIdentifierValues = _h[1]; // TODO: change this to boolean[] for handling the list
|
|
89
91
|
var token = antd_1.theme.useToken().token;
|
|
90
92
|
var referenceIdentifiersHelp = props.referenceIdentifiersHelpText
|
|
91
93
|
? props.referenceIdentifiersHelpText
|
|
@@ -202,7 +204,7 @@ var ReferenceIdentifiers = function (props) {
|
|
|
202
204
|
}
|
|
203
205
|
: {};
|
|
204
206
|
return (react_1.default.createElement(antd_1.Form.Item, __assign({}, fieldProps),
|
|
205
|
-
react_1.default.createElement(antd_1.Select, __assign({ popupMatchSelectWidth: false }, selectProps), fieldDefinition_1.properties.values.map(function (op) {
|
|
207
|
+
react_1.default.createElement(antd_1.Select, __assign({ popupMatchSelectWidth: false }, selectProps, { prefix: react_1.default.createElement(antd_1.Typography.Text, { type: "danger" }, "*") }), fieldDefinition_1.properties.values.map(function (op) {
|
|
206
208
|
return (react_1.default.createElement(antd_1.Select.Option, { key: op.key, value: op.key }, op.name));
|
|
207
209
|
}))));
|
|
208
210
|
}
|
|
@@ -221,6 +223,7 @@ var ReferenceIdentifiers = function (props) {
|
|
|
221
223
|
};
|
|
222
224
|
var referenceIdentifiersDefinitions = (0, ReferenceIdentifierUtility_1.getReferenceIdentifierFieldDefinitions)(props.receiverRequirements);
|
|
223
225
|
var getSingleReferenceIdentifierInput = function () {
|
|
226
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
224
227
|
var fieldHandling = null;
|
|
225
228
|
var fieldDefinition = referenceIdentifiersDefinitions[0];
|
|
226
229
|
var singleReferenceIdentifierLabel = fieldDefinition.properties.label;
|
|
@@ -231,13 +234,18 @@ var ReferenceIdentifiers = function (props) {
|
|
|
231
234
|
? fieldHandling.helpText
|
|
232
235
|
: undefined;
|
|
233
236
|
}
|
|
237
|
+
// Condition 1 - If referenceidentifier should not show field values (options to choose from), but we need to validate
|
|
238
|
+
// Test: Always with "Should be validated" checked. Then test both mandatory and optional
|
|
234
239
|
if (fieldHandling && fieldHandling.shouldBeValidated) {
|
|
240
|
+
props.setReferenceIdentifierIsMandatory((_d = (((_c = (_b = (_a = props.receiverRequirements) === null || _a === void 0 ? void 0 : _a.fieldDefinitions) === null || _b === void 0 ? void 0 : _b[0].properties) === null || _c === void 0 ? void 0 : _c.cardinality) === "1..1")) !== null && _d !== void 0 ? _d : false);
|
|
235
241
|
return (react_1.default.createElement(antd_1.Form.Item, { name: ["invoice", "singleReferenceIdentifier", "value"], validateStatus: props.referenceIdentifierValidateStatus, hasFeedback: true },
|
|
236
|
-
react_1.default.createElement(__1.UmzInput, { defaultPlaceholder: singleReferenceIdentifierLabel, defaultTooltip: singleReferenceIdentifiersHelp ? singleReferenceIdentifiersHelp : undefined,
|
|
242
|
+
react_1.default.createElement(__1.UmzInput, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["referenceIdentifier.*"], defaultPlaceholder: singleReferenceIdentifierLabel, defaultTooltip: singleReferenceIdentifiersHelp ? singleReferenceIdentifiersHelp : undefined, onChange: function (event) {
|
|
237
243
|
return handleReferenceIdentifierValueValidation(props.legalIdentifier, fieldDefinition.name, event.currentTarget.value, props.rapiBaseUrl, ["invoice", "singleReferenceIdentifier", "value"], props.setReferenceIdentifierValidateStatus);
|
|
238
244
|
} })));
|
|
239
245
|
}
|
|
240
246
|
if (fieldDefinition.properties.hasOwnProperty("values") && fieldDefinition.properties.values) {
|
|
247
|
+
// Condition 2 - If referenceidentifier has field values (options to choose from)
|
|
248
|
+
props.setReferenceIdentifierIsMandatory((_h = (((_g = (_f = (_e = props.receiverRequirements) === null || _e === void 0 ? void 0 : _e.fieldDefinitions) === null || _f === void 0 ? void 0 : _f[0].properties) === null || _g === void 0 ? void 0 : _g.cardinality) === "1..1")) !== null && _h !== void 0 ? _h : false);
|
|
241
249
|
var selectProps = fieldDefinition.properties.hasOwnProperty("href")
|
|
242
250
|
? {
|
|
243
251
|
showSearch: true,
|
|
@@ -248,14 +256,20 @@ var ReferenceIdentifiers = function (props) {
|
|
|
248
256
|
loading: loadingReferenceIdentifierValues,
|
|
249
257
|
}
|
|
250
258
|
: {};
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
259
|
+
var isRequired = function () {
|
|
260
|
+
var _a;
|
|
261
|
+
return ((_a = fieldDefinition === null || fieldDefinition === void 0 ? void 0 : fieldDefinition.properties) === null || _a === void 0 ? void 0 : _a.cardinality) === "1..1";
|
|
262
|
+
};
|
|
263
|
+
var selectField = (react_1.default.createElement(antd_1.Select, __assign({ prefix: isRequired() ? react_1.default.createElement(antd_1.Typography.Text, { type: "danger" }, "*") : null, placeholder: singleReferenceIdentifierLabel, popupMatchSelectWidth: false }, selectProps, { suffixIcon: react_1.default.createElement(__1.UmzTooltip, { title: singleReferenceIdentifiersHelp }) }), fieldDefinition.properties.values.map(function (op) {
|
|
264
|
+
return (react_1.default.createElement(antd_1.Select.Option, { key: op.key, value: op.key }, op.name));
|
|
265
|
+
})));
|
|
266
|
+
return (react_1.default.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields[fieldDefinition.key], defaultLabel: "", defaultIsRequired: false, fieldName: ["invoice", "singleReferenceIdentifier", "value"], name: ["invoice", "singleReferenceIdentifier", "value"] }, selectField));
|
|
255
267
|
}
|
|
256
268
|
else {
|
|
269
|
+
// Condition 3
|
|
270
|
+
props.setReferenceIdentifierIsMandatory((_m = (((_l = (_k = (_j = props.receiverRequirements) === null || _j === void 0 ? void 0 : _j.fieldDefinitions) === null || _k === void 0 ? void 0 : _k[0].properties) === null || _l === void 0 ? void 0 : _l.cardinality) === "1..1")) !== null && _m !== void 0 ? _m : false);
|
|
257
271
|
return (react_1.default.createElement(antd_1.Form.Item, { name: ["invoice", "singleReferenceIdentifier", "value"] },
|
|
258
|
-
react_1.default.createElement(__1.UmzInput, { defaultPlaceholder: singleReferenceIdentifierLabel })));
|
|
272
|
+
react_1.default.createElement(__1.UmzInput, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["referenceIdentifier.*"], defaultPlaceholder: singleReferenceIdentifierLabel })));
|
|
259
273
|
}
|
|
260
274
|
};
|
|
261
275
|
if (referenceIdentifiersDefinitions.length === 0) {
|
|
@@ -272,6 +286,10 @@ var ReferenceIdentifiers = function (props) {
|
|
|
272
286
|
return getSingleReferenceIdentifierInput();
|
|
273
287
|
}
|
|
274
288
|
else {
|
|
289
|
+
// Many reference identifiers
|
|
290
|
+
props.setReferenceIdentifierIsMandatory((_d = (((_c = (_b = (_a = props.receiverRequirements) === null || _a === void 0 ? void 0 : _a.fieldDefinitions) === null || _b === void 0 ? void 0 : _b[0].properties) === null || _c === void 0 ? void 0 : _c.cardinality) === "1..1")) !== null && _d !== void 0 ? _d : false);
|
|
291
|
+
var isAnyRefRequired = Boolean((_f = (_e = props.receiverRequirements) === null || _e === void 0 ? void 0 : _e.fieldDefinitions) === null || _f === void 0 ? void 0 : _f.find(function (item) { var _a; return ((_a = item.properties) === null || _a === void 0 ? void 0 : _a.cardinality) === "1..1"; }));
|
|
292
|
+
props.setReferenceIdentifierIsMandatory(isAnyRefRequired);
|
|
275
293
|
return (react_1.default.createElement(antd_1.Form.List, { name: ["invoice", "referenceIdentifiers"] }, function (fields, _a) {
|
|
276
294
|
var add = _a.add, remove = _a.remove;
|
|
277
295
|
return fields.map(function (field, index) {
|
|
@@ -281,7 +299,7 @@ var ReferenceIdentifiers = function (props) {
|
|
|
281
299
|
react_1.default.createElement(antd_1.Col, { span: 12 },
|
|
282
300
|
react_1.default.createElement(antd_1.Row, { gutter: 10 },
|
|
283
301
|
react_1.default.createElement(antd_1.Col, { span: index === 0 ? 22 : 24 },
|
|
284
|
-
react_1.default.createElement(antd_1.Form.Item, __assign({}, field, { name: [field.name, "code"]
|
|
302
|
+
react_1.default.createElement(antd_1.Form.Item, __assign({}, field, { name: [field.name, "code"] }),
|
|
285
303
|
react_1.default.createElement(antd_1.Select, { labelInValue: true, allowClear: true, style: { width: "100%" }, popupMatchSelectWidth: false, placeholder: referenceIdentifiersLabel, onChange: function (a) {
|
|
286
304
|
var newState = referenceIdentifierValue.slice();
|
|
287
305
|
newState.splice(index, 1, a);
|
|
@@ -17,6 +17,7 @@ interface Props extends WrappedComponentProps {
|
|
|
17
17
|
dueDateMinimumOffset: number;
|
|
18
18
|
isSaveFieldValuesSelected: boolean;
|
|
19
19
|
onSaveFieldValuesChange: () => void;
|
|
20
|
+
setReferenceIdentifierIsMandatory: (referenceIdentifierIsMandatory: boolean) => void;
|
|
20
21
|
}
|
|
21
22
|
export declare const translationMessages: {
|
|
22
23
|
baseInformation_title: {
|
|
@@ -59,9 +60,17 @@ export declare const translationMessages: {
|
|
|
59
60
|
id: string;
|
|
60
61
|
defaultMessage: string;
|
|
61
62
|
};
|
|
63
|
+
baseInformation_objectIdentifier: {
|
|
64
|
+
id: string;
|
|
65
|
+
defaultMessage: string;
|
|
66
|
+
};
|
|
67
|
+
baseInformation_projectReference: {
|
|
68
|
+
id: string;
|
|
69
|
+
defaultMessage: string;
|
|
70
|
+
};
|
|
62
71
|
};
|
|
63
72
|
declare const BaseInformationIntl: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
64
|
-
forwardedRef?: React.Ref<any
|
|
73
|
+
forwardedRef?: React.Ref<any>;
|
|
65
74
|
} & React.RefAttributes<any>> & {
|
|
66
75
|
WrappedComponent: React.ComponentType<Props>;
|
|
67
76
|
};
|
|
@@ -83,6 +83,14 @@ exports.translationMessages = (0, react_intl_1.defineMessages)({
|
|
|
83
83
|
id: "baseInformation_dueDateErrorMsg",
|
|
84
84
|
defaultMessage: "Due date must be after the issue date",
|
|
85
85
|
},
|
|
86
|
+
baseInformation_objectIdentifier: {
|
|
87
|
+
id: "baseInformation_objectIdentifier",
|
|
88
|
+
defaultMessage: "Object identifier",
|
|
89
|
+
},
|
|
90
|
+
baseInformation_projectReference: {
|
|
91
|
+
id: "baseInformation_projectReference",
|
|
92
|
+
defaultMessage: "Project reference is required",
|
|
93
|
+
},
|
|
86
94
|
});
|
|
87
95
|
var BaseInformation = function (props) {
|
|
88
96
|
var _a, _b;
|
|
@@ -169,7 +177,7 @@ var BaseInformation = function (props) {
|
|
|
169
177
|
React.createElement(OrderReference_1.default, { receiverRequirements: props.receiverRequirements, formInstance: props.form, dependencies: [["invoice", "buyerReference"]] }),
|
|
170
178
|
React.createElement(form_item_1.default, { shouldUpdate: true, dependencies: [["invoice", "orderReference", "documentNo"]], receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields.buyerReference, defaultLabel: props.intl.formatMessage(exports.translationMessages.baseInformation_buyerReferenceLabel), defaultLabelTooltip: props.intl.formatMessage(exports.translationMessages.baseInformation_buyerReferenceLabel_helpText), defaultIsRequired: !props.form.getFieldValue(["invoice", "orderReference", "documentNo"]), fieldName: ["invoice", "buyerReference"] },
|
|
171
179
|
React.createElement(__1.UmzInput, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields.buyerReference, defaultIsRequired: !props.form.getFieldValue(["invoice", "orderReference", "documentNo"]), defaultPlaceholder: props.intl.formatMessage(exports.translationMessages.baseInformation_buyerReferenceLabel), defaultTooltip: props.intl.formatMessage(exports.translationMessages.baseInformation_buyerReferenceLabel_helpText), defaultValue: (_b = formData.invoice) === null || _b === void 0 ? void 0 : _b.buyerReference })),
|
|
172
|
-
React.createElement(ReferenceIdentifiers_1.default, { receiverRequirements: props.receiverRequirements, formInstance: props.form, updateReceiverRequirementsProp: props.updateReceiverRequirementsProp, rapiBaseUrl: props.rapiBaseUrl, legalIdentifier: props.legalIdentifier, referenceIdentifiersLabelText: props.referenceIdentifiersLabelText, referenceIdentifiersHelpText: props.referenceIdentifiersHelpText, referenceIdentifierValidateStatus: props.referenceIdentifierValidateStatus, setReferenceIdentifierValidateStatus: props.setReferenceIdentifierValidateStatus }),
|
|
180
|
+
React.createElement(ReferenceIdentifiers_1.default, { receiverRequirements: props.receiverRequirements, formInstance: props.form, updateReceiverRequirementsProp: props.updateReceiverRequirementsProp, rapiBaseUrl: props.rapiBaseUrl, legalIdentifier: props.legalIdentifier, referenceIdentifiersLabelText: props.referenceIdentifiersLabelText, referenceIdentifiersHelpText: props.referenceIdentifiersHelpText, referenceIdentifierValidateStatus: props.referenceIdentifierValidateStatus, setReferenceIdentifierValidateStatus: props.setReferenceIdentifierValidateStatus, setReferenceIdentifierIsMandatory: props.setReferenceIdentifierIsMandatory }),
|
|
173
181
|
React.createElement(AccountingCost_1.default, { formInstance: props.form, rapiBaseUrl: props.rapiBaseUrl, receiverRequirements: props.receiverRequirements, updateReceiverRequirementsProp: props.updateReceiverRequirementsProp, legalIdentifier: props.legalIdentifier }),
|
|
174
182
|
React.createElement(ProjectReference_1.default, { receiverRequirements: props.receiverRequirements, form: props.form }))),
|
|
175
183
|
React.createElement(antd_1.Checkbox, { checked: props.isSaveFieldValuesSelected, onChange: props.onSaveFieldValuesChange }, props.intl.formatMessage(CommonTranslations_1.commonTranslationMessages.saveInformation_label)))));
|
|
@@ -7,7 +7,7 @@ interface Props extends WrappedComponentProps {
|
|
|
7
7
|
outsideVatScope: boolean;
|
|
8
8
|
}
|
|
9
9
|
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
10
|
-
forwardedRef?: React.Ref<any
|
|
10
|
+
forwardedRef?: React.Ref<any>;
|
|
11
11
|
} & React.RefAttributes<any>> & {
|
|
12
12
|
WrappedComponent: React.ComponentType<Props>;
|
|
13
13
|
};
|
|
@@ -12,9 +12,10 @@ interface BillingLinePreviewProps extends WrappedComponentProps {
|
|
|
12
12
|
discountType?: string;
|
|
13
13
|
currencyCode: string;
|
|
14
14
|
onDelete: () => void;
|
|
15
|
+
onEdit: () => void;
|
|
15
16
|
}
|
|
16
17
|
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<BillingLinePreviewProps, "intl"> & {
|
|
17
|
-
forwardedRef?: React.Ref<any
|
|
18
|
+
forwardedRef?: React.Ref<any>;
|
|
18
19
|
} & React.RefAttributes<any>> & {
|
|
19
20
|
WrappedComponent: React.ComponentType<BillingLinePreviewProps>;
|
|
20
21
|
};
|
|
@@ -13,7 +13,7 @@ var react_intl_1 = require("react-intl");
|
|
|
13
13
|
var BillingLinePreview = function (props) {
|
|
14
14
|
var taxPercentage = (0, BillingLineUtility_1.calculateTaxPercentage)(enums_1.AvailableTaxCategoryTypeEnum[props.taxCategoryType]);
|
|
15
15
|
return (react_1.default.createElement(antd_1.Card, { style: { backgroundColor: "#F5F5F5", width: "full" }, size: "small", bordered: false },
|
|
16
|
-
react_1.default.createElement(antd_1.Flex, {
|
|
16
|
+
react_1.default.createElement(antd_1.Flex, { align: "center", justify: "space-between" },
|
|
17
17
|
react_1.default.createElement(antd_1.Flex, { vertical: true },
|
|
18
18
|
react_1.default.createElement(antd_1.Typography.Text, { strong: true },
|
|
19
19
|
props.name,
|
|
@@ -36,6 +36,8 @@ var BillingLinePreview = function (props) {
|
|
|
36
36
|
"%",
|
|
37
37
|
" ",
|
|
38
38
|
props.discountValue && " | ".concat(props.discountValue).concat(props.discountType === "PERCENTAGE" ? "%" : " ".concat(props.currencyCode), " ").concat(props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_discount)))),
|
|
39
|
-
react_1.default.createElement(
|
|
39
|
+
react_1.default.createElement("div", null,
|
|
40
|
+
react_1.default.createElement(antd_1.Button, { onClick: props.onEdit, icon: react_1.default.createElement(icons_1.EditOutlined, null), type: "text" }),
|
|
41
|
+
react_1.default.createElement(antd_1.Button, { onClick: props.onDelete, icon: react_1.default.createElement(icons_1.DeleteOutlined, null), type: "text", danger: true })))));
|
|
40
42
|
};
|
|
41
43
|
exports.default = (0, react_intl_1.injectIntl)(BillingLinePreview);
|
|
@@ -6,7 +6,7 @@ interface Props extends WrappedComponentProps {
|
|
|
6
6
|
outsideVatScope: boolean;
|
|
7
7
|
}
|
|
8
8
|
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
9
|
-
forwardedRef?: React.Ref<any
|
|
9
|
+
forwardedRef?: React.Ref<any>;
|
|
10
10
|
} & React.RefAttributes<any>> & {
|
|
11
11
|
WrappedComponent: React.ComponentType<Props>;
|
|
12
12
|
};
|
|
@@ -73,7 +73,6 @@ var translationMessages = (0, react_intl_1.defineMessages)({
|
|
|
73
73
|
defaultMessage: "Outside tax scope",
|
|
74
74
|
},
|
|
75
75
|
});
|
|
76
|
-
;
|
|
77
76
|
var BillingTaxSummary = function (props) {
|
|
78
77
|
var _a = (0, react_1.useState)(props.formInstance.getFieldValue(["invoice", "invoiceLines"])), invoiceLines = _a[0], setInvoiceLines = _a[1];
|
|
79
78
|
(0, react_1.useEffect)(function () {
|
|
@@ -0,0 +1,20 @@
|
|
|
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;
|
|
@@ -0,0 +1,17 @@
|
|
|
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);
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,16 @@
|
|
|
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;
|
|
@@ -120,9 +120,10 @@ interface Props extends WrappedComponentProps {
|
|
|
120
120
|
receiverRequirements: NewReceiverRequirements;
|
|
121
121
|
formInstance: FormInstance;
|
|
122
122
|
outsideVatScope: boolean;
|
|
123
|
+
validateFields: (fieldNames: string[][], validateOnly?: boolean | undefined) => void;
|
|
123
124
|
}
|
|
124
125
|
declare const BillingLinesWithIntl: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
125
|
-
forwardedRef?: React.Ref<any
|
|
126
|
+
forwardedRef?: React.Ref<any>;
|
|
126
127
|
} & React.RefAttributes<any>> & {
|
|
127
128
|
WrappedComponent: React.ComponentType<Props>;
|
|
128
129
|
};
|