@unimaze/billing 0.21.46 → 0.21.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/components/billing-lines/CurrencySelector.d.ts +1 -3
- package/lib/common/components/billing-lines/CurrencySelector.js +45 -8
- package/lib/common/components/billing-lines/NewBillingLines.js +0 -8
- 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.js +9 -5
- 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/invoice-preview/InvoicePreviewCustomerSupplierInfo.d.ts +0 -0
- package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.js +109 -0
- package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfo.d.ts +0 -0
- package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfo.js +110 -0
- 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 +74 -0
- package/lib/unimaze-billing/src/common/components/CommonTranslations.js +78 -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 +206 -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 +53 -0
- package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.js +328 -0
- package/lib/unimaze-billing/src/common/components/base-information/index.d.ts +77 -0
- package/lib/unimaze-billing/src/common/components/base-information/index.js +186 -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 +151 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.d.ts +24 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.js +61 -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 +133 -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 +134 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.js +209 -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 +19 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.js +275 -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 +49 -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 +166 -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 +42 -0
- package/lib/unimaze-billing/src/common/components/invoice/index.js +59 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.js +75 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.js +73 -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 +104 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewInvoiceLines.d.ts +12 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewInvoiceLines.js +93 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfo.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfo.js +77 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.js +58 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.js +52 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/index.d.ts +102 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/index.js +196 -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 +26 -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 +83 -0
- package/lib/unimaze-billing/src/common/types/ReceiverRequirements.js +393 -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 +82 -0
- package/lib/unimaze-billing/src/create-invoice/index.js +710 -0
- package/lib/unimaze-billing/src/enums.d.ts +14 -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 +29 -0
- package/lib/unimaze-billing/src/utils/ApiUtility.js +133 -0
- package/lib/unimaze-billing/src/utils/BillingLineUtility.d.ts +25 -0
- package/lib/unimaze-billing/src/utils/BillingLineUtility.js +190 -0
- package/lib/unimaze-billing/src/utils/ConversionUtility.d.ts +9 -0
- package/lib/unimaze-billing/src/utils/ConversionUtility.js +222 -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 +6 -0
- package/lib/unimaze-billing/src/utils/IntlUtility.js +78 -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 +21 -0
- package/lib/unimaze-billing/src/utils/RequirementsUtility.js +237 -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/RequirementsUtility.d.ts +3 -2
- package/lib/utils/RequirementsUtility.js +12 -2
- package/package.json +1 -1
- package/lib/style/index.css +0 -51
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
attachment_addAttachmentButton_title: string;
|
|
4
|
+
attachment_error_fileFailedToUpload: string;
|
|
5
|
+
attachment_error_fileTooLarge: string;
|
|
6
|
+
attachment_error_fileWrongType: string;
|
|
7
|
+
attachment_labels_Description: string;
|
|
8
|
+
attachment_labels_Description_requiredMessage: string;
|
|
9
|
+
attachment_labels_File: string;
|
|
10
|
+
attachment_labels_Reference: string;
|
|
11
|
+
attachment_labels_Reference_requiredMessage: string;
|
|
12
|
+
attachment_labels_descriptionErrorMsg: string;
|
|
13
|
+
attachment_labels_onUploadFileMsg: string;
|
|
14
|
+
attachment_labels_uploadFileMsg: string;
|
|
15
|
+
attachment_saveButton_title: string;
|
|
16
|
+
attachment_title: string;
|
|
17
|
+
attachment_tooltip_title: string;
|
|
18
|
+
baseInformation_accountingCostLabel: string;
|
|
19
|
+
baseInformation_accountingCostLabel_helpText: string;
|
|
20
|
+
baseInformation_buyerReferenceLabel: string;
|
|
21
|
+
baseInformation_buyerReferenceLabel_helpText: string;
|
|
22
|
+
baseInformation_costCenter: string;
|
|
23
|
+
baseInformation_dueDate: string;
|
|
24
|
+
baseInformation_dueDateErrorMsg: string;
|
|
25
|
+
baseInformation_dueDate_title: string;
|
|
26
|
+
baseInformation_invoiceNo: string;
|
|
27
|
+
baseInformation_issueDate: string;
|
|
28
|
+
baseInformation_issueDate_title: string;
|
|
29
|
+
baseInformation_notes: string;
|
|
30
|
+
baseInformation_objectIdentifier: string;
|
|
31
|
+
baseInformation_orderReferenceLabel: string;
|
|
32
|
+
baseInformation_orderReferenceLabel_helpText: string;
|
|
33
|
+
baseInformation_projectReference: string;
|
|
34
|
+
baseInformation_projectReferenceLabel: string;
|
|
35
|
+
baseInformation_title: string;
|
|
36
|
+
billingCalculations_labels_AmountPayable: string;
|
|
37
|
+
billingCalculations_labels_RoundingAmount: string;
|
|
38
|
+
billingCalculations_labels_TaxAmountWithoutVat: string;
|
|
39
|
+
billingCalculations_labels_TotalAmountWithVat: string;
|
|
40
|
+
billingCalculations_labels_TotalRoundingAmount: string;
|
|
41
|
+
billingCalculations_labels_TotalVatAmount: string;
|
|
42
|
+
billingLines_button_addRow: string;
|
|
43
|
+
billingLines_currencyCode: string;
|
|
44
|
+
billingLines_currency_DKK: string;
|
|
45
|
+
billingLines_currency_DKK_short: string;
|
|
46
|
+
billingLines_currency_EUR: string;
|
|
47
|
+
billingLines_currency_EUR_short: string;
|
|
48
|
+
billingLines_currency_GBP: string;
|
|
49
|
+
billingLines_currency_GBP_short: string;
|
|
50
|
+
billingLines_currency_ISK: string;
|
|
51
|
+
billingLines_currency_ISK_short: string;
|
|
52
|
+
billingLines_currency_NOK: string;
|
|
53
|
+
billingLines_currency_NOK_short: string;
|
|
54
|
+
billingLines_currency_SEK: string;
|
|
55
|
+
billingLines_currency_SEK_short: string;
|
|
56
|
+
billingLines_currency_USD: string;
|
|
57
|
+
billingLines_currency_USD_short: string;
|
|
58
|
+
billingLines_discount: string;
|
|
59
|
+
billingLines_discount_helpText: string;
|
|
60
|
+
billingLines_input_must_be_number_validationMessage: string;
|
|
61
|
+
billingLines_itemNo: string;
|
|
62
|
+
billingLines_labels_addButton: string;
|
|
63
|
+
billingLines_lineAmount: string;
|
|
64
|
+
billingLines_name: string;
|
|
65
|
+
billingLines_placeholders_itemNo: string;
|
|
66
|
+
billingLines_placeholders_newItem: string;
|
|
67
|
+
billingLines_quantity: string;
|
|
68
|
+
billingLines_taxAmount: string;
|
|
69
|
+
billingLines_taxCategoryPercentage: string;
|
|
70
|
+
billingLines_taxCategoryType: string;
|
|
71
|
+
billingLines_taxCategoryType_title: string;
|
|
72
|
+
billingLines_title: string;
|
|
73
|
+
billingLines_tooltip_title: string;
|
|
74
|
+
billingLines_total: string;
|
|
75
|
+
billingLines_total_discount: string;
|
|
76
|
+
billingLines_unitOfMeasure: string;
|
|
77
|
+
billingLines_unitPriceAmount: string;
|
|
78
|
+
billingTaxSummary_taxAmount: string;
|
|
79
|
+
billingTaxSummary_taxCategoryType_labels_Exempt: string;
|
|
80
|
+
billingTaxSummary_taxCategoryType_labels_OutsideTaxScope: string;
|
|
81
|
+
billingTaxSummary_taxCategoryType_labels_ReducedRated: string;
|
|
82
|
+
billingTaxSummary_taxCategoryType_labels_StandardRated: string;
|
|
83
|
+
billingTaxSummary_taxCategoryType_labels_ZeroRated: string;
|
|
84
|
+
billingTaxSummary_taxOverview: string;
|
|
85
|
+
billingTaxSummary_taxableAmount: string;
|
|
86
|
+
createInvoice_ErrorUploadedAttachmentMsg: string;
|
|
87
|
+
createInvoice_SendCopy: string;
|
|
88
|
+
createInvoice_SendCopyTooltip: string;
|
|
89
|
+
createInvoice_SendCopyTooltipDisabled: string;
|
|
90
|
+
createInvoice_Submit: string;
|
|
91
|
+
createInvoice_addDocumentLineMsg: string;
|
|
92
|
+
createInvoice_customerStepTitle: string;
|
|
93
|
+
createInvoice_invoiceStepTitle: string;
|
|
94
|
+
createInvoice_nextStep: string;
|
|
95
|
+
createInvoice_paymentStepTitle: string;
|
|
96
|
+
createInvoice_selectCustomerMsg: string;
|
|
97
|
+
createInvoice_successfullySubmittedInvoiceMsg: string;
|
|
98
|
+
createInvoice_successfullyUploadedAttachmentMsg: string;
|
|
99
|
+
createInvoice_supplierStepTitle: string;
|
|
100
|
+
createInvoice_validationErrorObjectIdentifierNotValid: string;
|
|
101
|
+
createInvoice_validationErrorObjectIdentifierRequired: string;
|
|
102
|
+
customer_address_city: string;
|
|
103
|
+
customer_address_countryCode: string;
|
|
104
|
+
customer_address_streetNameAndNumber: string;
|
|
105
|
+
customer_address_zipPostalCode: string;
|
|
106
|
+
customer_contact_email: string;
|
|
107
|
+
customer_contact_name: string;
|
|
108
|
+
customer_identifier: string;
|
|
109
|
+
customer_name: string;
|
|
110
|
+
customer_selectTheCustomer: string;
|
|
111
|
+
customer_title: string;
|
|
112
|
+
deliveryLocation_city: string;
|
|
113
|
+
deliveryLocation_countryCode: string;
|
|
114
|
+
deliveryLocation_partyName: string;
|
|
115
|
+
deliveryLocation_postalZone: string;
|
|
116
|
+
deliveryLocation_streetNameAndNumber: string;
|
|
117
|
+
deliveryLocation_title: string;
|
|
118
|
+
formItem_required_errorMessage: string;
|
|
119
|
+
"invoicePreview.headerTitle": string;
|
|
120
|
+
invoicePreview_attachmentsTitle: string;
|
|
121
|
+
invoicePreview_billingLinesTitle: string;
|
|
122
|
+
invoicePreview_paymentInfoTitle: string;
|
|
123
|
+
missingRequiredData: string;
|
|
124
|
+
paymentMethod_label: string;
|
|
125
|
+
paymentMethod_labels_domesticTransfer_accountNo: string;
|
|
126
|
+
paymentMethod_labels_domesticTransfer_accountType: string;
|
|
127
|
+
paymentMethod_labels_domesticTransfer_bankNo: string;
|
|
128
|
+
paymentMethod_labels_domesticTransfer_paymentReference: string;
|
|
129
|
+
paymentMethod_labels_icelandicClaim_bankNo: string;
|
|
130
|
+
paymentMethod_labels_icelandicClaim_claimNo: string;
|
|
131
|
+
paymentMethod_labels_methods_domesticClaim: string;
|
|
132
|
+
paymentMethod_labels_methods_domesticTransfer: string;
|
|
133
|
+
paymentMethod_labels_methods_mutuallyAgreed: string;
|
|
134
|
+
paymentMethod_labels_methods_undefined: string;
|
|
135
|
+
paymentMethod_rules_Length: string;
|
|
136
|
+
paymentMethod_rules_number: string;
|
|
137
|
+
paymentMethod_title: string;
|
|
138
|
+
referenceIdentifiers_labels_AKG: string;
|
|
139
|
+
referenceIdentifiers_labels_ARR: string;
|
|
140
|
+
referenceIdentifiers_labels_LOC: string;
|
|
141
|
+
referenceIdentifiers_labels_addButton: string;
|
|
142
|
+
referenceIdentifiers_labels_referenceIdentifier: string;
|
|
143
|
+
referenceIdentifiers_labels_referenceIdentifier_title: string;
|
|
144
|
+
referenceIdentifiers_values_validation_message: string;
|
|
145
|
+
saveInformation_label: string;
|
|
146
|
+
submitConfirmation_footer_text: string;
|
|
147
|
+
submitConfirmation_text: string;
|
|
148
|
+
submitConfirmation_title: string;
|
|
149
|
+
supplier_address_city: string;
|
|
150
|
+
supplier_address_countryCode: string;
|
|
151
|
+
supplier_address_streetNameAndNumber: string;
|
|
152
|
+
supplier_address_zip_postalCode: string;
|
|
153
|
+
supplier_address_zip_postalZone: string;
|
|
154
|
+
supplier_contact_email: string;
|
|
155
|
+
supplier_contact_email_title: string;
|
|
156
|
+
supplier_contact_name: string;
|
|
157
|
+
supplier_contact_phoneNumber: string;
|
|
158
|
+
supplier_identifier: string;
|
|
159
|
+
supplier_name: string;
|
|
160
|
+
supplier_notFound: string;
|
|
161
|
+
supplier_notValidEmail: string;
|
|
162
|
+
supplier_notVatRegistered: string;
|
|
163
|
+
supplier_title: string;
|
|
164
|
+
supplier_vatNumber: string;
|
|
165
|
+
supplier_vatNumber_mandatory: string;
|
|
166
|
+
taxCategoryType_label: string;
|
|
167
|
+
unitOfMeasure_labels_CubicMetre: string;
|
|
168
|
+
unitOfMeasure_labels_Day: string;
|
|
169
|
+
unitOfMeasure_labels_Hour: string;
|
|
170
|
+
unitOfMeasure_labels_KiloWattHour: string;
|
|
171
|
+
unitOfMeasure_labels_Kilogram: string;
|
|
172
|
+
unitOfMeasure_labels_Kilometre: string;
|
|
173
|
+
unitOfMeasure_labels_Litre: string;
|
|
174
|
+
unitOfMeasure_labels_Metre: string;
|
|
175
|
+
unitOfMeasure_labels_Month: string;
|
|
176
|
+
unitOfMeasure_labels_One: string;
|
|
177
|
+
unitOfMeasure_labels_Package: string;
|
|
178
|
+
unitOfMeasure_labels_Piece: string;
|
|
179
|
+
unitOfMeasure_labels_SquareMetre: string;
|
|
180
|
+
unitOfMeasure_labels_Tonne: string;
|
|
181
|
+
unitOfMeasure_labels_Year: string;
|
|
182
|
+
validationRule_kennitalaPattern: string;
|
|
183
|
+
welcomeModal_button_title: string;
|
|
184
|
+
};
|
|
185
|
+
is: {
|
|
186
|
+
attachment_addAttachmentButton_title: string;
|
|
187
|
+
attachment_error_fileFailedToUpload: string;
|
|
188
|
+
attachment_error_fileTooLarge: string;
|
|
189
|
+
attachment_error_fileWrongType: string;
|
|
190
|
+
attachment_labels_Description: string;
|
|
191
|
+
attachment_labels_Description_requiredMessage: string;
|
|
192
|
+
attachment_labels_File: string;
|
|
193
|
+
attachment_labels_Reference: string;
|
|
194
|
+
attachment_labels_Reference_requiredMessage: string;
|
|
195
|
+
attachment_labels_descriptionErrorMsg: string;
|
|
196
|
+
attachment_labels_onUploadFileMsg: string;
|
|
197
|
+
attachment_labels_uploadFileMsg: string;
|
|
198
|
+
attachment_saveButton_title: string;
|
|
199
|
+
attachment_title: string;
|
|
200
|
+
attachment_tooltip_title: string;
|
|
201
|
+
baseInformation_accountingCostLabel: string;
|
|
202
|
+
baseInformation_accountingCostLabel_helpText: string;
|
|
203
|
+
baseInformation_buyerReferenceLabel: string;
|
|
204
|
+
baseInformation_buyerReferenceLabel_helpText: string;
|
|
205
|
+
baseInformation_costCenter: string;
|
|
206
|
+
baseInformation_dueDate: string;
|
|
207
|
+
baseInformation_dueDateErrorMsg: string;
|
|
208
|
+
baseInformation_dueDate_title: string;
|
|
209
|
+
baseInformation_invoiceNo: string;
|
|
210
|
+
baseInformation_issueDate: string;
|
|
211
|
+
baseInformation_issueDate_title: string;
|
|
212
|
+
baseInformation_notes: string;
|
|
213
|
+
baseInformation_objectIdentifier: string;
|
|
214
|
+
baseInformation_orderReferenceLabel: string;
|
|
215
|
+
baseInformation_orderReferenceLabel_helpText: string;
|
|
216
|
+
baseInformation_projectReference: string;
|
|
217
|
+
baseInformation_projectReferenceLabel: string;
|
|
218
|
+
baseInformation_title: string;
|
|
219
|
+
billingCalculations_labels_AmountPayable: string;
|
|
220
|
+
billingCalculations_labels_RoundingAmount: string;
|
|
221
|
+
billingCalculations_labels_TaxAmountWithoutVat: string;
|
|
222
|
+
billingCalculations_labels_TotalAmountWithVat: string;
|
|
223
|
+
billingCalculations_labels_TotalRoundingAmount: string;
|
|
224
|
+
billingCalculations_labels_TotalVatAmount: string;
|
|
225
|
+
billingLines_button_addRow: string;
|
|
226
|
+
billingLines_currencyCode: string;
|
|
227
|
+
billingLines_currency_DKK: string;
|
|
228
|
+
billingLines_currency_DKK_short: string;
|
|
229
|
+
billingLines_currency_EUR: string;
|
|
230
|
+
billingLines_currency_EUR_short: string;
|
|
231
|
+
billingLines_currency_GBP: string;
|
|
232
|
+
billingLines_currency_GBP_short: string;
|
|
233
|
+
billingLines_currency_ISK: string;
|
|
234
|
+
billingLines_currency_ISK_short: string;
|
|
235
|
+
billingLines_currency_NOK: string;
|
|
236
|
+
billingLines_currency_NOK_short: string;
|
|
237
|
+
billingLines_currency_SEK: string;
|
|
238
|
+
billingLines_currency_SEK_short: string;
|
|
239
|
+
billingLines_currency_USD: string;
|
|
240
|
+
billingLines_currency_USD_short: string;
|
|
241
|
+
billingLines_discount: string;
|
|
242
|
+
billingLines_discount_helpText: string;
|
|
243
|
+
billingLines_input_must_be_number_validationMessage: string;
|
|
244
|
+
billingLines_itemNo: string;
|
|
245
|
+
billingLines_labels_addButton: string;
|
|
246
|
+
billingLines_lineAmount: string;
|
|
247
|
+
billingLines_name: string;
|
|
248
|
+
billingLines_placeholders_itemNo: string;
|
|
249
|
+
billingLines_placeholders_newItem: string;
|
|
250
|
+
billingLines_quantity: string;
|
|
251
|
+
billingLines_taxAmount: string;
|
|
252
|
+
billingLines_taxCategoryPercentage: string;
|
|
253
|
+
billingLines_taxCategoryType: string;
|
|
254
|
+
billingLines_taxCategoryType_title: string;
|
|
255
|
+
billingLines_title: string;
|
|
256
|
+
billingLines_tooltip_title: string;
|
|
257
|
+
billingLines_total: string;
|
|
258
|
+
billingLines_total_discount: string;
|
|
259
|
+
billingLines_unitOfMeasure: string;
|
|
260
|
+
billingLines_unitPriceAmount: string;
|
|
261
|
+
billingTaxSummary_taxAmount: string;
|
|
262
|
+
billingTaxSummary_taxCategoryType_labels_Exempt: string;
|
|
263
|
+
billingTaxSummary_taxCategoryType_labels_OutsideTaxScope: string;
|
|
264
|
+
billingTaxSummary_taxCategoryType_labels_ReducedRated: string;
|
|
265
|
+
billingTaxSummary_taxCategoryType_labels_StandardRated: string;
|
|
266
|
+
billingTaxSummary_taxCategoryType_labels_ZeroRated: string;
|
|
267
|
+
billingTaxSummary_taxOverview: string;
|
|
268
|
+
billingTaxSummary_taxableAmount: string;
|
|
269
|
+
createInvoice_ErrorUploadedAttachmentMsg: string;
|
|
270
|
+
createInvoice_SendCopy: string;
|
|
271
|
+
createInvoice_SendCopyTooltip: string;
|
|
272
|
+
createInvoice_SendCopyTooltipDisabled: string;
|
|
273
|
+
createInvoice_Submit: string;
|
|
274
|
+
createInvoice_addDocumentLineMsg: string;
|
|
275
|
+
createInvoice_customerStepTitle: string;
|
|
276
|
+
createInvoice_invoiceStepTitle: string;
|
|
277
|
+
createInvoice_nextStep: string;
|
|
278
|
+
createInvoice_paymentStepTitle: string;
|
|
279
|
+
createInvoice_selectCustomerMsg: string;
|
|
280
|
+
createInvoice_successfullySubmittedInvoiceMsg: string;
|
|
281
|
+
createInvoice_successfullyUploadedAttachmentMsg: string;
|
|
282
|
+
createInvoice_supplierStepTitle: string;
|
|
283
|
+
createInvoice_validationErrorObjectIdentifierNotValid: string;
|
|
284
|
+
createInvoice_validationErrorObjectIdentifierRequired: string;
|
|
285
|
+
customer_address_city: string;
|
|
286
|
+
customer_address_countryCode: string;
|
|
287
|
+
customer_address_streetNameAndNumber: string;
|
|
288
|
+
customer_address_zipPostalCode: string;
|
|
289
|
+
customer_contact_email: string;
|
|
290
|
+
customer_contact_name: string;
|
|
291
|
+
customer_identifier: string;
|
|
292
|
+
customer_name: string;
|
|
293
|
+
customer_selectTheCustomer: string;
|
|
294
|
+
customer_title: string;
|
|
295
|
+
deliveryLocation_city: string;
|
|
296
|
+
deliveryLocation_countryCode: string;
|
|
297
|
+
deliveryLocation_partyName: string;
|
|
298
|
+
deliveryLocation_postalZone: string;
|
|
299
|
+
deliveryLocation_streetNameAndNumber: string;
|
|
300
|
+
deliveryLocation_title: string;
|
|
301
|
+
formItem_required_errorMessage: string;
|
|
302
|
+
"invoicePreview.headerTitle": string;
|
|
303
|
+
invoicePreview_attachmentsTitle: string;
|
|
304
|
+
invoicePreview_billingLinesTitle: string;
|
|
305
|
+
invoicePreview_paymentInfoTitle: string;
|
|
306
|
+
missingRequiredData: string;
|
|
307
|
+
paymentMethod_label: string;
|
|
308
|
+
paymentMethod_labels_domesticTransfer_accountNo: string;
|
|
309
|
+
paymentMethod_labels_domesticTransfer_accountType: string;
|
|
310
|
+
paymentMethod_labels_domesticTransfer_bankNo: string;
|
|
311
|
+
paymentMethod_labels_domesticTransfer_paymentReference: string;
|
|
312
|
+
paymentMethod_labels_icelandicClaim_bankNo: string;
|
|
313
|
+
paymentMethod_labels_icelandicClaim_claimNo: string;
|
|
314
|
+
paymentMethod_labels_methods_domesticClaim: string;
|
|
315
|
+
paymentMethod_labels_methods_domesticTransfer: string;
|
|
316
|
+
paymentMethod_labels_methods_mutuallyAgreed: string;
|
|
317
|
+
paymentMethod_labels_methods_undefined: string;
|
|
318
|
+
paymentMethod_rules_Length: string;
|
|
319
|
+
paymentMethod_rules_number: string;
|
|
320
|
+
paymentMethod_title: string;
|
|
321
|
+
referenceIdentifiers_labels_AKG: string;
|
|
322
|
+
referenceIdentifiers_labels_ARR: string;
|
|
323
|
+
referenceIdentifiers_labels_LOC: string;
|
|
324
|
+
referenceIdentifiers_labels_addButton: string;
|
|
325
|
+
referenceIdentifiers_labels_referenceIdentifier: string;
|
|
326
|
+
referenceIdentifiers_labels_referenceIdentifier_title: string;
|
|
327
|
+
referenceIdentifiers_values_validation_message: string;
|
|
328
|
+
saveInformation_label: string;
|
|
329
|
+
submitConfirmation_footer_text: string;
|
|
330
|
+
submitConfirmation_text: string;
|
|
331
|
+
submitConfirmation_title: string;
|
|
332
|
+
supplier_address_city: string;
|
|
333
|
+
supplier_address_countryCode: string;
|
|
334
|
+
supplier_address_streetNameAndNumber: string;
|
|
335
|
+
supplier_address_zip_postalCode: string;
|
|
336
|
+
supplier_address_zip_postalZone: string;
|
|
337
|
+
supplier_contact_email: string;
|
|
338
|
+
supplier_contact_email_title: string;
|
|
339
|
+
supplier_contact_name: string;
|
|
340
|
+
supplier_contact_phoneNumber: string;
|
|
341
|
+
supplier_identifier: string;
|
|
342
|
+
supplier_name: string;
|
|
343
|
+
supplier_notFound: string;
|
|
344
|
+
supplier_notValidEmail: string;
|
|
345
|
+
supplier_notVatRegistered: string;
|
|
346
|
+
supplier_title: string;
|
|
347
|
+
supplier_vatNumber: string;
|
|
348
|
+
supplier_vatNumber_mandatory: string;
|
|
349
|
+
taxCategoryType_label: string;
|
|
350
|
+
unitOfMeasure_labels_CubicMetre: string;
|
|
351
|
+
unitOfMeasure_labels_Day: string;
|
|
352
|
+
unitOfMeasure_labels_Hour: string;
|
|
353
|
+
unitOfMeasure_labels_KiloWattHour: string;
|
|
354
|
+
unitOfMeasure_labels_Kilogram: string;
|
|
355
|
+
unitOfMeasure_labels_Kilometre: string;
|
|
356
|
+
unitOfMeasure_labels_Litre: string;
|
|
357
|
+
unitOfMeasure_labels_Metre: string;
|
|
358
|
+
unitOfMeasure_labels_Month: string;
|
|
359
|
+
unitOfMeasure_labels_One: string;
|
|
360
|
+
unitOfMeasure_labels_Package: string;
|
|
361
|
+
unitOfMeasure_labels_Piece: string;
|
|
362
|
+
unitOfMeasure_labels_SquareMetre: string;
|
|
363
|
+
unitOfMeasure_labels_Tonne: string;
|
|
364
|
+
unitOfMeasure_labels_Year: string;
|
|
365
|
+
validationRule_kennitalaPattern: string;
|
|
366
|
+
welcomeModal_button_title: string;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 is_json_1 = __importDefault(require("./locales/is.json"));
|
|
7
|
+
var en_json_1 = __importDefault(require("./locales/en.json"));
|
|
8
|
+
// English is the default message in each of our source files, so no need for a separate en.json file
|
|
9
|
+
// const en = {};
|
|
10
|
+
// If we add more than just spanish, just import the files and export it below: export default { en, es, de }
|
|
11
|
+
exports.default = { en: en_json_1.default, is: is_json_1.default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ImportDocumentValidationData, MessageOutput } from "@unimaze/api-clients/lib/mapi";
|
|
2
|
+
import { InvoiceMetadataInput, TransactionProcessingMode } from "@unimaze/api-clients/lib/mapi/api";
|
|
3
|
+
import { AxiosPromise, CancelToken } from "axios";
|
|
4
|
+
import { LanguageProp } from "../common/types/CommonProps";
|
|
5
|
+
import { UploadFile } from "antd/es/upload/interface";
|
|
6
|
+
import { IntlShape } from "react-intl";
|
|
7
|
+
interface CreateSubmitInvoice {
|
|
8
|
+
messageId: string;
|
|
9
|
+
more: boolean;
|
|
10
|
+
conversationIdentifier?: string;
|
|
11
|
+
processingMode?: TransactionProcessingMode;
|
|
12
|
+
services?: string[];
|
|
13
|
+
invoiceMetadataInput?: InvoiceMetadataInput;
|
|
14
|
+
}
|
|
15
|
+
interface AttachDocument {
|
|
16
|
+
messageId: string;
|
|
17
|
+
name: string;
|
|
18
|
+
contentType: string;
|
|
19
|
+
more: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const submitDocument: (data: any, attachDocument: AttachDocument, mapiBaseUrl: string, apiKey?: string) => AxiosPromise<MessageOutput>;
|
|
22
|
+
declare const submitDocumentFetch: (data: any, attachDocument: AttachDocument, mapiBaseUrl: string, apiKey: string) => Promise<Response>;
|
|
23
|
+
declare const submitInvoice: (createSubmitInvoice: CreateSubmitInvoice, mapiBaseUrl: string, apiKey: string, callName?: string, language?: LanguageProp) => AxiosPromise<MessageOutput | ImportDocumentValidationData[]>;
|
|
24
|
+
export declare const getCancelToken: (callName: string, showMessage?: boolean) => CancelToken;
|
|
25
|
+
declare const submitAttachmentIfAnyLeft: (_messageId: string, _attachments: {
|
|
26
|
+
description: string;
|
|
27
|
+
file: UploadFile;
|
|
28
|
+
}[], _mapiBaseUrl: string, _chosenCustomerApiKey: string, intl: IntlShape) => void;
|
|
29
|
+
export { submitInvoice, CreateSubmitInvoice, submitDocument, AttachDocument, submitDocumentFetch, submitAttachmentIfAnyLeft };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.submitAttachmentIfAnyLeft = exports.submitDocumentFetch = exports.submitDocument = exports.submitInvoice = exports.getCancelToken = void 0;
|
|
18
|
+
var api_clients_1 = require("@unimaze/api-clients");
|
|
19
|
+
var mapi_1 = require("@unimaze/api-clients/lib/mapi");
|
|
20
|
+
var axios_1 = __importDefault(require("axios"));
|
|
21
|
+
var antd_1 = require("antd");
|
|
22
|
+
var create_invoice_1 = require("../create-invoice");
|
|
23
|
+
var initialiseTransactionApi = function (mapiBaseUrl) {
|
|
24
|
+
var apiConfig = {
|
|
25
|
+
basePath: mapiBaseUrl,
|
|
26
|
+
};
|
|
27
|
+
var initiatedConfig = new mapi_1.Configuration(apiConfig);
|
|
28
|
+
return new api_clients_1.mapi.TransactionApi(initiatedConfig);
|
|
29
|
+
};
|
|
30
|
+
var initialiseMessageApi = function (mapiBaseUrl) {
|
|
31
|
+
var apiConfig = {
|
|
32
|
+
basePath: mapiBaseUrl,
|
|
33
|
+
};
|
|
34
|
+
var initiatedConfig = new mapi_1.Configuration(apiConfig);
|
|
35
|
+
return new api_clients_1.mapi.MessageApi(initiatedConfig);
|
|
36
|
+
};
|
|
37
|
+
var submitDocument = function (data, attachDocument, mapiBaseUrl, apiKey) {
|
|
38
|
+
var messageId = attachDocument.messageId, name = attachDocument.name, contentType = attachDocument.contentType, more = attachDocument.more;
|
|
39
|
+
var headers = __assign(__assign({}, (apiKey && { Authorization: "Bearer ".concat(window.btoa(apiKey)) })), { "Content-Type": "application/octet-stream", "X-test": "test" });
|
|
40
|
+
return axios_1.default.post("".concat(mapiBaseUrl, "/api/v1/messages/").concat(messageId, "/documents"), data, {
|
|
41
|
+
params: {
|
|
42
|
+
name: name,
|
|
43
|
+
contentType: contentType,
|
|
44
|
+
more: more
|
|
45
|
+
},
|
|
46
|
+
headers: headers
|
|
47
|
+
});
|
|
48
|
+
// const messageApi = initialiseMessageApi(mapiBaseUrl);
|
|
49
|
+
//
|
|
50
|
+
// const options = createOptionsData(data, apiKey)
|
|
51
|
+
// return messageApi.addDocuments(
|
|
52
|
+
// messageId,
|
|
53
|
+
// name,
|
|
54
|
+
// contentType,
|
|
55
|
+
// more,
|
|
56
|
+
// undefined,
|
|
57
|
+
// undefined,
|
|
58
|
+
// undefined,
|
|
59
|
+
// options
|
|
60
|
+
// )
|
|
61
|
+
};
|
|
62
|
+
exports.submitDocument = submitDocument;
|
|
63
|
+
var submitDocumentFetch = function (data, attachDocument, mapiBaseUrl, apiKey) {
|
|
64
|
+
var messageId = attachDocument.messageId, name = attachDocument.name, contentType = attachDocument.contentType, more = attachDocument.more;
|
|
65
|
+
var headers = {
|
|
66
|
+
Authorization: "Bearer ".concat(window.btoa(apiKey)),
|
|
67
|
+
"Content-Type": "application/octet-stream",
|
|
68
|
+
"X-test": "test",
|
|
69
|
+
};
|
|
70
|
+
var responsePromise = fetch("".concat(mapiBaseUrl, "/api/v1/messages/").concat(messageId, "/documents?Name=").concat(name, "&ContentType=").concat(contentType, "&More=").concat(more), {
|
|
71
|
+
method: "POST",
|
|
72
|
+
headers: headers,
|
|
73
|
+
body: data
|
|
74
|
+
});
|
|
75
|
+
return responsePromise;
|
|
76
|
+
};
|
|
77
|
+
exports.submitDocumentFetch = submitDocumentFetch;
|
|
78
|
+
var submitInvoice = function (createSubmitInvoice, mapiBaseUrl, apiKey, callName, language) {
|
|
79
|
+
var transactionApi = initialiseTransactionApi(mapiBaseUrl);
|
|
80
|
+
var messageId = createSubmitInvoice.messageId, more = createSubmitInvoice.more, conversationIdentifier = createSubmitInvoice.conversationIdentifier, processingMode = createSubmitInvoice.processingMode, services = createSubmitInvoice.services, invoiceMetadataInput = createSubmitInvoice.invoiceMetadataInput;
|
|
81
|
+
return transactionApi.createSubmitInvoice(messageId, more, conversationIdentifier, processingMode, services, undefined, invoiceMetadataInput, createOptions(apiKey, callName, language));
|
|
82
|
+
};
|
|
83
|
+
exports.submitInvoice = submitInvoice;
|
|
84
|
+
var createOptions = function (apiKey, callName, language) {
|
|
85
|
+
return __assign({ headers: {
|
|
86
|
+
"Accept-Language": language ? language : "en",
|
|
87
|
+
Authorization: "Bearer ".concat(window.btoa(apiKey))
|
|
88
|
+
} }, (callName && { cancelToken: (0, exports.getCancelToken)(callName) }));
|
|
89
|
+
};
|
|
90
|
+
var createOptionsData = function (data, apiKey, callName, language) {
|
|
91
|
+
var options = __assign(__assign({}, (callName && { cancelToken: (0, exports.getCancelToken)(callName) })), { data: data, headers: {
|
|
92
|
+
"Accept-Language": language ? language : "en",
|
|
93
|
+
Authorization: "Bearer ".concat(window.btoa(apiKey)),
|
|
94
|
+
"Content-Type": "application/octet-stream"
|
|
95
|
+
} });
|
|
96
|
+
return options;
|
|
97
|
+
};
|
|
98
|
+
var getCancelToken = function (callName, showMessage) {
|
|
99
|
+
if (showMessage === void 0) { showMessage = true; }
|
|
100
|
+
var cancelTokenSource = window[callName];
|
|
101
|
+
if (cancelTokenSource && showMessage) {
|
|
102
|
+
cancelTokenSource.cancel("only one call allowed. Canceling previous call");
|
|
103
|
+
}
|
|
104
|
+
window[callName] = axios_1.default.CancelToken.source();
|
|
105
|
+
return window[callName].token;
|
|
106
|
+
};
|
|
107
|
+
exports.getCancelToken = getCancelToken;
|
|
108
|
+
var submitAttachmentIfAnyLeft = function (_messageId, _attachments, _mapiBaseUrl, _chosenCustomerApiKey, intl) {
|
|
109
|
+
if (_attachments && _attachments.length > 0) {
|
|
110
|
+
var nextFileArray = _attachments.splice(0, 1);
|
|
111
|
+
var nextFile = nextFileArray[0].file.originFileObj;
|
|
112
|
+
var nextFileDescription_1 = nextFileArray[0].description;
|
|
113
|
+
if (!nextFile)
|
|
114
|
+
throw new Error("NextFile is empty");
|
|
115
|
+
var createAttachDocument = {
|
|
116
|
+
messageId: _messageId,
|
|
117
|
+
contentType: nextFile.type,
|
|
118
|
+
more: _attachments.length > 0,
|
|
119
|
+
name: nextFileDescription_1, // nextFile.name,
|
|
120
|
+
};
|
|
121
|
+
submitDocumentFetch(nextFile, createAttachDocument, _mapiBaseUrl, _chosenCustomerApiKey)
|
|
122
|
+
.then(function (submitDocumentResponse) {
|
|
123
|
+
antd_1.message.success(intl.formatMessage(create_invoice_1.translationMessages.createInvoice_successfullyUploadedAttachmentMsg, { attachment: nextFileDescription_1 }));
|
|
124
|
+
submitAttachmentIfAnyLeft(_messageId, _attachments, _mapiBaseUrl, _chosenCustomerApiKey, intl);
|
|
125
|
+
})
|
|
126
|
+
.catch(function (documentSendingErrorMessage) {
|
|
127
|
+
antd_1.message.error("".concat(intl.formatMessage(create_invoice_1.translationMessages.createInvoice_ErrorUploadedAttachmentMsg, {
|
|
128
|
+
attachment: nextFileDescription_1,
|
|
129
|
+
}), " - ").concat(documentSendingErrorMessage.message));
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
exports.submitAttachmentIfAnyLeft = submitAttachmentIfAnyLeft;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BillingLineMetadata } from "@unimaze/api-clients/lib/mapi";
|
|
2
|
+
import { FormInstance } from "antd/es/form";
|
|
3
|
+
import { TaxCategoryTypeEnum } from "@unimaze/api-clients/lib/mapi/api";
|
|
4
|
+
import { BillingLineMetadataOverride } from "../common/types/BillingLineMetadataOverride";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { IntlShape } from "react-intl";
|
|
7
|
+
import { DiscountType } from "../common/types/DiscountType";
|
|
8
|
+
import { AvailableTaxCategoryTypeEnum } from "../enums";
|
|
9
|
+
export interface Totals {
|
|
10
|
+
totalTaxableAmount: number;
|
|
11
|
+
totalTaxAmount: number;
|
|
12
|
+
totalTaxInclusiveAmount: number;
|
|
13
|
+
roundingAmount: number;
|
|
14
|
+
discountAmount: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const billingLinesFieldsMetadata: (formInstance: FormInstance) => BillingLineMetadata[];
|
|
17
|
+
export declare const calculateDiscountAmount: (discountValue: string | null | undefined, quantity: number | null, unitPriceAmount: number | null) => number;
|
|
18
|
+
export declare const calculateTaxableAmount: (discountValue: string | null | undefined, quantity: number | null, unitPriceAmount: number | null, discountType: DiscountType) => number;
|
|
19
|
+
export declare const calculateTaxAmount: (taxableAmount: number, taxPercentage: number) => number;
|
|
20
|
+
export declare const calculateTaxPercentage: (taxCategoryType: TaxCategoryTypeEnum | undefined) => number;
|
|
21
|
+
export declare const generateTaxCategoryLabel: (taxCategoryType: TaxCategoryTypeEnum | undefined, taxCategoryTypeTranslated: string) => string;
|
|
22
|
+
export declare const getCorrectInputNode: (dataIdx: keyof BillingLineMetadataOverride, intl: IntlShape, placeholder: string, required: boolean, addonAfter?: React.ReactNode, mobile?: boolean, value?: any) => React.ReactChild;
|
|
23
|
+
export declare const getTotals: (invoiceLines: BillingLineMetadataOverride[]) => Totals;
|
|
24
|
+
export declare const getTaxCategoryDisabled: (taxCategoryType: AvailableTaxCategoryTypeEnum, outsideVatScope: boolean) => boolean;
|
|
25
|
+
export declare const getFieldNames: (keys: string[], intl: IntlShape) => string[];
|