@unimaze/billing 0.21.42 → 0.21.44

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.
@@ -18,6 +18,7 @@ interface Props extends WrappedComponentProps {
18
18
  isSaveFieldValuesSelected: boolean;
19
19
  onSaveFieldValuesChange: () => void;
20
20
  setReferenceIdentifierIsMandatory: (referenceIdentifierIsMandatory: boolean) => void;
21
+ colorError?: string;
21
22
  }
22
23
  export declare const translationMessages: {
23
24
  baseInformation_title: {
@@ -151,7 +151,7 @@ var BaseInformation = function (props) {
151
151
  React.createElement(antd_1.Row, { gutter: 20 },
152
152
  React.createElement(antd_1.Col, { span: 12 },
153
153
  React.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields.issueDate, defaultIsRequired: true, fieldName: ["invoice", "issueDate"] },
154
- React.createElement(__1.UmzDatePicker, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields.issueDate, defaultPlaceholder: props.intl.formatMessage(exports.translationMessages.baseInformation_issueDate), defaultIsRequired: true, defaultValue: (0, dayjs_1.default)(), format: "DD.MM.YYYY", style: { width: "100%" }, defaultTooltip: props.intl.formatMessage(exports.translationMessages.baseInformation_issueDate_title) }))),
154
+ React.createElement(__1.UmzDatePicker, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields.issueDate, defaultPlaceholder: props.intl.formatMessage(exports.translationMessages.baseInformation_issueDate), defaultIsRequired: true, defaultValue: (0, dayjs_1.default)(), format: "DD.MM.YYYY", style: { width: "100%" }, defaultTooltip: props.intl.formatMessage(exports.translationMessages.baseInformation_issueDate_title), colorError: props.colorError }))),
155
155
  React.createElement(antd_1.Col, { span: 12 },
156
156
  React.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields.dueDate, defaultIsRequired: true, fieldName: ["invoice", "dueDate"], additionalRules: [
157
157
  {
@@ -171,7 +171,7 @@ var BaseInformation = function (props) {
171
171
  var dueDateMinimumOffset = props.dueDateMinimumOffset;
172
172
  var issueDate = props.form.getFieldValue(["invoice", "issueDate"]);
173
173
  return disabledDate(currentDate, issueDate, dueDateMinimumOffset);
174
- } }))))),
174
+ }, colorError: props.colorError }))))),
175
175
  React.createElement(antd_1.Col, { span: 24 },
176
176
  React.createElement(OrderReference_1.default, { receiverRequirements: props.receiverRequirements, formInstance: props.form, dependencies: [["invoice", "buyerReference"]] }),
177
177
  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"] },
@@ -67,6 +67,10 @@ var translationMessages = (0, react_intl_1.defineMessages)({
67
67
  id: "customer_contact_name",
68
68
  defaultMessage: "Contact name",
69
69
  },
70
+ customer_no_customer_configured: {
71
+ id: "customer_no_customer_configured",
72
+ defaultMessage: "Error - no customer configured",
73
+ },
70
74
  });
71
75
  var Customer = function (props) {
72
76
  var width = (0, react_use_1.useWindowSize)().width;
@@ -101,7 +105,7 @@ var Customer = function (props) {
101
105
  ? props.intl.formatMessage(translationMessages.customer_selectTheCustomer)
102
106
  : props.intl.formatMessage(translationMessages.customer_title), defaultIsRequired: true, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["customer.identifier"], fieldName: ["invoice", "customer", "name"], style: { marginBottom: 0 } }, props.customers.length > 0 ? (react_1.default.createElement(antd_1.Select, __assign({ onChange: function (value) {
103
107
  onCustomerChange(value);
104
- }, disabled: props.customers.length === 1 }, formLayout_1.formItemLayout), props.customers.map(function (customer, index) { return (react_1.default.createElement(antd_1.Select.Option, { key: index, value: index }, customer.name)); }))) : ("Error - no customer configured")),
108
+ }, disabled: props.customers.length === 1 }, formLayout_1.formItemLayout), props.customers.map(function (customer, index) { return (react_1.default.createElement(antd_1.Select.Option, { key: index, value: index }, customer.name)); }))) : (props.intl.formatMessage(translationMessages.customer_no_customer_configured))),
105
109
  react_1.default.createElement(antd_1.Typography.Text, { className: "ant-form-text", style: { fontSize: 18 }, type: "secondary" },
106
110
  props.intl.formatMessage(translationMessages.customer_identifier),
107
111
  ":",
@@ -16,6 +16,7 @@ interface Props {
16
16
  disabledDate?: (current: Dayjs) => boolean;
17
17
  onChange?: (date: Dayjs | null, dateString: string | string[]) => void;
18
18
  getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
19
+ colorError?: string;
19
20
  }
20
21
  declare const UmzDatePicker: React.FC<Props>;
21
22
  export default UmzDatePicker;
@@ -8,7 +8,7 @@ var react_1 = __importDefault(require("react"));
8
8
  var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
9
9
  var tooltip_1 = __importDefault(require("../tooltip"));
10
10
  var UmzDatePicker = function (_a) {
11
- var receiverRequirements = _a.receiverRequirements, receiverRequirementsKey = _a.receiverRequirementsKey, defaultPlaceholder = _a.defaultPlaceholder, _b = _a.defaultIsRequired, defaultIsRequired = _b === void 0 ? false : _b, defaultPickerValue = _a.defaultPickerValue, defaultValue = _a.defaultValue, defaultTooltip = _a.defaultTooltip, format = _a.format, style = _a.style, _c = _a.disabled, disabled = _c === void 0 ? false : _c, disabledDate = _a.disabledDate, onChange = _a.onChange, getPopupContainer = _a.getPopupContainer;
11
+ var receiverRequirements = _a.receiverRequirements, receiverRequirementsKey = _a.receiverRequirementsKey, defaultPlaceholder = _a.defaultPlaceholder, _b = _a.defaultIsRequired, defaultIsRequired = _b === void 0 ? false : _b, defaultPickerValue = _a.defaultPickerValue, defaultValue = _a.defaultValue, defaultTooltip = _a.defaultTooltip, format = _a.format, style = _a.style, _c = _a.disabled, disabled = _c === void 0 ? false : _c, disabledDate = _a.disabledDate, onChange = _a.onChange, getPopupContainer = _a.getPopupContainer, colorError = _a.colorError;
12
12
  var isRequired = receiverRequirements && receiverRequirementsKey
13
13
  ? (0, RequirementsUtility_1.getFieldIsRequired)(receiverRequirements, receiverRequirementsKey, defaultIsRequired)
14
14
  : defaultIsRequired;
@@ -18,6 +18,7 @@ var UmzDatePicker = function (_a) {
18
18
  return (react_1.default.createElement(antd_1.Flex, { gap: "middle" },
19
19
  react_1.default.createElement(antd_1.DatePicker, { className: isRequired ? "date-picker-asterisk-wrapper" : undefined, required: isRequired, placeholder: defaultPlaceholder, defaultValue: defaultValue, defaultPickerValue: defaultPickerValue, format: format, style: style, disabled: disabled, disabledDate: disabledDate, onChange: onChange, getPopupContainer: getPopupContainer }),
20
20
  react_1.default.createElement(antd_1.Flex, { align: "center" },
21
- react_1.default.createElement(tooltip_1.default, { title: tooltipTitle }))));
21
+ react_1.default.createElement(tooltip_1.default, { title: tooltipTitle })),
22
+ react_1.default.createElement("style", null, "\n .date-picker-asterisk-wrapper::before {\n content: \"*\";\n color: ".concat(colorError || 'red', ";\n position: absolute;\n top: 50%;\n left: '12px';\n transform: translateY(-50%);\n z-index: 2;\n font-size: 14px;\n }\n "))));
22
23
  };
23
24
  exports.default = UmzDatePicker;
@@ -32,6 +32,7 @@ interface Props extends WrappedComponentProps {
32
32
  setReferenceIdentifierIsMandatory: (referenceIdentifierIsMandatory: boolean) => void;
33
33
  newLineSaved: boolean;
34
34
  setNewLineSaved: (isSaved: boolean) => void;
35
+ colorError?: string;
35
36
  }
36
37
  declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
37
38
  forwardedRef?: React.Ref<any>;
@@ -9,7 +9,7 @@ var __1 = require("..");
9
9
  var Invoice = function (props) {
10
10
  var newLineSaved = props.newLineSaved, setNewLineSaved = props.setNewLineSaved;
11
11
  return (react_1.default.createElement(react_1.default.Fragment, null,
12
- react_1.default.createElement(__1.BaseInformation, { receiverRequirements: props.receiverRequirements, form: props.form, documentType: "invoice", updateReceiverRequirementsProp: props.updateReceiverRequirementsProp, rapiBaseUrl: props.rapiBaseUrl, legalIdentifier: props.chosenCustomer.identifier, referenceIdentifiersLabelText: props.referenceIdentifiersLabelText, referenceIdentifiersHelpText: props.referenceIdentifiersHelpText, referenceIdentifierValidateStatus: props.referenceIdentifierValidateStatus, setReferenceIdentifierValidateStatus: props.setReferenceIdentifierValidateStatus, dueDateMinimumOffset: props.dueDateMinimumOffset, isSaveFieldValuesSelected: props.isSaveFieldValuesSelected, onSaveFieldValuesChange: props.onSaveFieldValuesChange, setReferenceIdentifierIsMandatory: props.setReferenceIdentifierIsMandatory }),
12
+ react_1.default.createElement(__1.BaseInformation, { receiverRequirements: props.receiverRequirements, form: props.form, documentType: "invoice", updateReceiverRequirementsProp: props.updateReceiverRequirementsProp, rapiBaseUrl: props.rapiBaseUrl, legalIdentifier: props.chosenCustomer.identifier, referenceIdentifiersLabelText: props.referenceIdentifiersLabelText, referenceIdentifiersHelpText: props.referenceIdentifiersHelpText, referenceIdentifierValidateStatus: props.referenceIdentifierValidateStatus, setReferenceIdentifierValidateStatus: props.setReferenceIdentifierValidateStatus, dueDateMinimumOffset: props.dueDateMinimumOffset, isSaveFieldValuesSelected: props.isSaveFieldValuesSelected, onSaveFieldValuesChange: props.onSaveFieldValuesChange, setReferenceIdentifierIsMandatory: props.setReferenceIdentifierIsMandatory, colorError: props.colorError }),
13
13
  react_1.default.createElement(__1.BillingLines, { formInstance: props.form, billingLinesMetadata: props.billingLinesMetadata, receiverRequirements: props.receiverRequirements, outsideVatScope: props.outsideVatScope, newLineSaved: newLineSaved, setNewLineSaved: setNewLineSaved }),
14
14
  react_1.default.createElement(__1.Attachments, { formInstance: props.form, uploadSizeLimit: props.uploadSizeLimit, attachmentTooltipText: props.attachmentTooltipText, languageString: props.languageString })));
15
15
  };
@@ -3,6 +3,7 @@ import React from "react";
3
3
  import { WrappedComponentProps } from "react-intl";
4
4
  interface Props extends WrappedComponentProps {
5
5
  form: FormInstance;
6
+ colorPrimary?: string;
6
7
  }
7
8
  declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
8
9
  forwardedRef?: React.Ref<any>;
@@ -28,6 +28,7 @@ var translationMessages = (0, react_intl_1.defineMessages)({
28
28
  },
29
29
  });
30
30
  var WrappedInvoicePreviewHeader = function (props) {
31
+ var _a;
31
32
  return (react_1.default.createElement(antd_1.ConfigProvider, { theme: {
32
33
  token: {
33
34
  colorText: "white",
@@ -41,7 +42,7 @@ var WrappedInvoicePreviewHeader = function (props) {
41
42
  },
42
43
  components: {
43
44
  Layout: {
44
- headerBg: colors_1.blue[6],
45
+ headerBg: (_a = props.colorPrimary) !== null && _a !== void 0 ? _a : colors_1.blue.primary,
45
46
  headerPadding: "35px",
46
47
  headerHeight: 200,
47
48
  },
@@ -82,7 +82,9 @@ var InvoicePreviewInvoiceLines = function (props) {
82
82
  react_1.default.createElement(antd_1.Flex, { justify: "space-between", style: { width: "80%" }, align: "center" },
83
83
  react_1.default.createElement(antd_1.Typography.Text, null,
84
84
  taxPercentage,
85
- "% VAT of ",
85
+ "% ",
86
+ props.intl.formatMessage(index_1.translationMessages.invoicePreview_VATof),
87
+ " ",
86
88
  (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(line.taxableAmount, props.intl, { style: 'decimal' })),
87
89
  react_1.default.createElement(antd_1.Typography.Text, null,
88
90
  (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)((0, BillingLineUtility_1.calculateTaxAmount)(line.taxableAmount, taxPercentage), props.intl),
@@ -19,7 +19,8 @@ var InvoicePreviewTotalAmountPreview = function (props) {
19
19
  return (react_1.default.createElement(antd_1.Flex, { justify: "space-between", key: index },
20
20
  react_1.default.createElement(antd_1.Typography.Text, null,
21
21
  taxPercentage,
22
- "% VAT"),
22
+ "% ",
23
+ props.intl.formatMessage(index_1.translationMessages.invoicePreview_VAT)),
23
24
  react_1.default.createElement(antd_1.Typography.Text, null, (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(tax.taxAmount, props.intl))));
24
25
  });
25
26
  };
@@ -92,6 +92,14 @@ export declare const translationMessages: {
92
92
  id: string;
93
93
  defaultMessage: string;
94
94
  };
95
+ invoicePreview_VAT: {
96
+ id: string;
97
+ defaultMessage: string;
98
+ };
99
+ invoicePreview_VATof: {
100
+ id: string;
101
+ defaultMessage: string;
102
+ };
95
103
  };
96
104
  interface Props extends WrappedComponentProps {
97
105
  recieverRequirements: NewReceiverRequirements;
@@ -102,6 +102,14 @@ exports.translationMessages = (0, react_intl_1.defineMessages)({
102
102
  id: "invoicePreview_lineDiscount",
103
103
  defaultMessage: "line discount",
104
104
  },
105
+ invoicePreview_VAT: {
106
+ id: "invoicePreview_VAT",
107
+ defaultMessage: "VAT",
108
+ },
109
+ invoicePreview_VATof: {
110
+ id: "invoicePreview_VATof",
111
+ defaultMessage: "VAT of",
112
+ },
105
113
  });
106
114
  var InvoicePreview = function (props) {
107
115
  var token = antd_1.theme.useToken().token;
@@ -76,6 +76,10 @@ var translationMessages = (0, react_intl_1.defineMessages)({
76
76
  id: "supplier_address_zip_postalZone",
77
77
  defaultMessage: "Zip/Postal code",
78
78
  },
79
+ supplier_errorFetchingCityAndPostcode: {
80
+ id: "supplier_errorFetchingCityAndPostcode",
81
+ defaultMessage: "Error fetching city and postcode data:",
82
+ },
79
83
  });
80
84
  var CityAutocomplete = function (props) {
81
85
  var _a = React.useState([]), citiesAndPostcodes = _a[0], setCitiesAndPostcodes = _a[1];
@@ -99,7 +103,7 @@ var CityAutocomplete = function (props) {
99
103
  var results;
100
104
  return __generator(this, function (_a) {
101
105
  switch (_a.label) {
102
- case 0: return [4 /*yield*/, (0, LocationUtility_1.fetchCityAndPostcode)(cityInput, props.form.getFieldValue(["invoice", "supplier", "address", "countryCode"]))];
106
+ case 0: return [4 /*yield*/, (0, LocationUtility_1.fetchCityAndPostcode)(cityInput, props.form.getFieldValue(["invoice", "supplier", "address", "countryCode"]), props.intl.formatMessage(translationMessages.supplier_errorFetchingCityAndPostcode))];
103
107
  case 1:
104
108
  results = _a.sent();
105
109
  setCitiesAndPostcodes(results);
@@ -15,6 +15,10 @@ export declare const translationMessages: {
15
15
  id: string;
16
16
  defaultMessage: string;
17
17
  };
18
+ supplier_identifier_validationMessage: {
19
+ id: string;
20
+ defaultMessage: string;
21
+ };
18
22
  supplier_vatNumber: {
19
23
  id: string;
20
24
  defaultMessage: string;
@@ -55,6 +55,10 @@ exports.translationMessages = (0, react_intl_1.defineMessages)({
55
55
  id: "supplier_identifier",
56
56
  defaultMessage: "Supplier identifier",
57
57
  },
58
+ supplier_identifier_validationMessage: {
59
+ id: "supplier_identifier_validationMessage",
60
+ defaultMessage: "Input must be in the format: 111111-1111",
61
+ },
58
62
  supplier_vatNumber: {
59
63
  id: "supplier_vatNumber",
60
64
  defaultMessage: "VAT no",
@@ -222,7 +226,7 @@ var Supplier = function (props) {
222
226
  React.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["supplier.identifier"], defaultLabel: props.intl.formatMessage(exports.translationMessages.supplier_identifier), defaultIsRequired: true, fieldName: ["invoice", "supplier", "identifier"], hasFeedback: isLoadingParticipantInfo, validateStatus: isLoadingParticipantInfo ? "validating" : undefined, rules: [
223
227
  {
224
228
  pattern: /^\d{6}-\d{4}$/,
225
- message: "Input must be in the format: 111111-1111",
229
+ message: props.intl.formatMessage(exports.translationMessages.supplier_identifier_validationMessage),
226
230
  },
227
231
  {
228
232
  required: true,
@@ -2,17 +2,7 @@
2
2
  padding-left: 12px;
3
3
  }
4
4
 
5
- .date-picker-asterisk-wrapper::before {
6
- content: "*";
7
- color: red;
8
- position: absolute;
9
- top: 50%;
10
- left: '12px';
11
- transform: translateY(-50%);
12
- z-index: 2;
13
- font-size: 14px;
14
- }
15
5
 
16
6
  .upload-container .ant-upload {
17
7
  width: 100%
18
- }
8
+ }
@@ -111,6 +111,6 @@ var CreateInvoice = function (props) {
111
111
  react_1.default.createElement(react_intl_1.IntlProvider, { locale: languageString, defaultLocale: "is", key: languageString, messages: locales_1.default[languageString] },
112
112
  react_1.default.createElement(index_1.default, { customers: props.customers, language: languageString, mapiBaseUrl: props.mapiBaseUrl, rapiBaseUrl: props.rapiBaseUrl, localStorageFormDataVersion: props.localStorageFormDataVersion, rapiApiKey: props.rapiApiKey, receiverRequirements: props.receiverRequirements, getReceiverRequirements: props.getReceiverRequirements, updateReceiverRequirementsProp: props.updateReceiverRequirementsProp,
113
113
  // legalIdentifier={props.legalIdentifier}
114
- uploadSizeLimit: props.uploadSizeLimit, attachmentTooltipText: props.attachmentTooltipText, referenceIdentifiersHelpText: props.referenceIdentifiersHelpText, referenceIdentifiersLabelText: props.referenceIdentifiersLabelText, dueDateMinimumOffset: props.dueDateMinimumOffset, defaultPaymentType: props.defaultPaymentType, supportEmail: props.supportEmail, welcomeModalTitle: props.welcomeModalTitle, welcomeModalParagraph: props.welcomeModalParagraph, welcomeModalImageUrl: props.welcomeModalImageUrl }))));
114
+ uploadSizeLimit: props.uploadSizeLimit, attachmentTooltipText: props.attachmentTooltipText, referenceIdentifiersHelpText: props.referenceIdentifiersHelpText, referenceIdentifiersLabelText: props.referenceIdentifiersLabelText, dueDateMinimumOffset: props.dueDateMinimumOffset, defaultPaymentType: props.defaultPaymentType, supportEmail: props.supportEmail, welcomeModalTitle: props.welcomeModalTitle, welcomeModalParagraph: props.welcomeModalParagraph, welcomeModalImageUrl: props.welcomeModalImageUrl, colorPrimary: props.colorPrimary, colorError: props.colorError }))));
115
115
  };
116
116
  exports.default = CreateInvoice;
@@ -68,6 +68,10 @@ export declare const translationMessages: {
68
68
  id: string;
69
69
  defaultMessage: string;
70
70
  };
71
+ createInvoice_invoiceHadValidationErrors: {
72
+ id: string;
73
+ defaultMessage: string;
74
+ };
71
75
  };
72
76
  interface Props extends CommonProps, WrappedComponentProps {
73
77
  customers: PortalConfigurationCustomer[];
@@ -136,6 +136,10 @@ exports.translationMessages = (0, react_intl_1.defineMessages)({
136
136
  id: "createInvoice_validationErrorObjectIdentifierNotValid",
137
137
  defaultMessage: "Object identifier is not valid",
138
138
  },
139
+ createInvoice_invoiceHadValidationErrors: {
140
+ id: "createInvoice_invoiceHadValidationErrors",
141
+ defaultMessage: "Created invoice had validation errors",
142
+ },
139
143
  });
140
144
  /**
141
145
  * Component for creating a form for creating an invoice and submitting it to the MAPI transaction services
@@ -430,7 +434,7 @@ var CreateInvoiceConstructor = function (props) {
430
434
  (0, ApiUtility_1.submitAttachmentIfAnyLeft)((_a = response === null || response === void 0 ? void 0 : response.uniqueId) !== null && _a !== void 0 ? _a : "", attachments, props.mapiBaseUrl, token, intl, 1, setNumberOfSuccessfulCalls);
431
435
  }
432
436
  else {
433
- antd_1.message.error("Created invoice had validation errors");
437
+ antd_1.message.error(props.intl.formatMessage(exports.translationMessages.createInvoice_invoiceHadValidationErrors));
434
438
  }
435
439
  setSubmitting(false);
436
440
  form.resetFields();
@@ -588,7 +592,7 @@ var CreateInvoiceConstructor = function (props) {
588
592
  ];
589
593
  return (react_1.default.createElement(react_1.default.Fragment, null,
590
594
  react_1.default.createElement(antd_1.Flex, { vertical: true, gap: "middle", style: { alignItems: "center", marginBottom: "50px" } },
591
- activeStep === items.length ? (react_1.default.createElement(components_1.InvoicePreviewHeader, { form: form })) : (activeStep < items.length && (react_1.default.createElement(antd_1.Steps, { style: { maxWidth: "900px", margin: isMobile ? 0 : "30px 0" }, current: activeStep, initial: 0, labelPlacement: "vertical", items: items, type: isMobile ? "navigation" : "default", size: isMobile ? "small" : "default", direction: "horizontal", responsive: false }))),
595
+ activeStep === items.length ? (react_1.default.createElement(components_1.InvoicePreviewHeader, { form: form, colorPrimary: props.colorPrimary })) : (activeStep < items.length && (react_1.default.createElement(antd_1.Steps, { style: { maxWidth: "900px", margin: isMobile ? 0 : "30px 0" }, current: activeStep, initial: 0, labelPlacement: "vertical", items: items, type: isMobile ? "navigation" : "default", size: isMobile ? "small" : "default", direction: "horizontal", responsive: false }))),
592
596
  react_1.default.createElement(antd_1.Layout.Content, null,
593
597
  react_1.default.createElement(antd_1.Flex, { style: { width: "100vw", padding: isMobile ? "0 20px" : 0 } },
594
598
  react_1.default.createElement(antd_1.Form, __assign({ style: { width: "100%" }, size: "large", onFieldsChange: function () {
@@ -618,7 +622,7 @@ var CreateInvoiceConstructor = function (props) {
618
622
  react_1.default.createElement(antd_1.Flex, { vertical: true, style: activeStep !== 2 ? { display: "none" } : {} },
619
623
  react_1.default.createElement(components_1.Invoice, { receiverRequirements: props.receiverRequirements, form: form, documentType: "invoice", updateReceiverRequirementsProp: props.updateReceiverRequirementsProp, rapiBaseUrl: props.rapiBaseUrl, legalIdentifier: chosenCustomer.identifier, referenceIdentifiersLabelText: props.referenceIdentifiersLabelText, referenceIdentifiersHelpText: props.referenceIdentifiersHelpText, referenceIdentifierValidateStatus: referenceIdentifierValidateStatus, chosenCustomer: chosenCustomer, setReferenceIdentifierValidateStatus: setReferenceIdentifierValidateStatus, dueDateMinimumOffset: props.dueDateMinimumOffset, billingLinesMetadata: billingLinesMetadata, outsideVatScope: outsideVatScope, uploadSizeLimit: props.uploadSizeLimit, attachmentTooltipText: props.attachmentTooltipText, languageString: props.language, isSaveFieldValuesSelected: isSaveFieldValuesSelected, onSaveFieldValuesChange: function () {
620
624
  return setIsSaveFieldValuesSelected(!isSaveFieldValuesSelected);
621
- }, setReferenceIdentifierIsMandatory: setReferenceIdentifierIsMandatory, newLineSaved: newLineSaved, setNewLineSaved: setNewLineSaved })),
625
+ }, setReferenceIdentifierIsMandatory: setReferenceIdentifierIsMandatory, newLineSaved: newLineSaved, setNewLineSaved: setNewLineSaved, colorError: props.colorError })),
622
626
  react_1.default.createElement(antd_1.Flex, { vertical: true, style: activeStep !== 3 ? { display: "none" } : {} },
623
627
  react_1.default.createElement(components_1.PaymentMethod, { receiverRequirements: props.receiverRequirements, formInstance: form, isSaveFieldValuesSelected: isSaveFieldValuesSelected, onSaveFieldValuesChange: function () {
624
628
  return setIsSaveFieldValuesSelected(!isSaveFieldValuesSelected);
@@ -93,6 +93,7 @@
93
93
  "createInvoice_Submit": "Submit",
94
94
  "createInvoice_addDocumentLineMsg": "At least one document line",
95
95
  "createInvoice_customerStepTitle": "Customer",
96
+ "createInvoice_invoiceHadValidationErrors": "Created invoice had validation errors",
96
97
  "createInvoice_invoiceStepTitle": "Invoice",
97
98
  "createInvoice_nextStep": "Next step",
98
99
  "createInvoice_paymentStepTitle": "Payment",
@@ -110,6 +111,7 @@
110
111
  "customer_contact_name": "Contact name",
111
112
  "customer_identifier": "Identifier",
112
113
  "customer_name": "Name",
114
+ "customer_no_customer_configured": "Error - no customer configured",
113
115
  "customer_selectTheCustomer": "Select the customer",
114
116
  "customer_title": "Customer",
115
117
  "deliveryLocation_city": "Town/City",
@@ -120,6 +122,8 @@
120
122
  "deliveryLocation_title": "Delivery location",
121
123
  "formItem_required_errorMessage": "This field is required",
122
124
  "invoicePreview.headerTitle": "Invoice",
125
+ "invoicePreview_VAT": "VAT",
126
+ "invoicePreview_VATof": "VAT of",
123
127
  "invoicePreview_attachmentsTitle": "Attachments",
124
128
  "invoicePreview_billingLinesTitle": "Invoice lines",
125
129
  "invoicePreview_lineDiscount": "line discount",
@@ -162,7 +166,9 @@
162
166
  "supplier_contact_email_title": "A payment notification will be sent to this email address",
163
167
  "supplier_contact_name": "Contact name",
164
168
  "supplier_contact_phoneNumber": "Phone number",
169
+ "supplier_errorFetchingCityAndPostcode": "Error fetching city and postcode data:",
165
170
  "supplier_identifier": "Supplier identifier",
171
+ "supplier_identifier_validationMessage": "Input must be in the format: 111111-1111",
166
172
  "supplier_name": "Supplier name",
167
173
  "supplier_notFound": "Did not find information about name and address of party from entered identifier",
168
174
  "supplier_notValidEmail": "Not a valid E-Mail",
@@ -40,20 +40,20 @@
40
40
  "billingCalculations_labels_TotalRoundingAmount": "Afrúningur aura",
41
41
  "billingCalculations_labels_TotalVatAmount": "Samtals VSK upphæð",
42
42
  "billingLines_button_addRow": "Bæta við röð",
43
- "billingLines_currencyCode": "Currency",
44
- "billingLines_currency_DKK": "Danish krona (DKK)",
43
+ "billingLines_currencyCode": "Gjaldmiðill",
44
+ "billingLines_currency_DKK": "Dönsk króna (DKK)",
45
45
  "billingLines_currency_DKK_short": "DKK",
46
- "billingLines_currency_EUR": "Euro (EUR)",
46
+ "billingLines_currency_EUR": "Evra (EUR)",
47
47
  "billingLines_currency_EUR_short": "EUR",
48
- "billingLines_currency_GBP": "British pound (GBP)",
48
+ "billingLines_currency_GBP": "Sterlingspund (GBP)",
49
49
  "billingLines_currency_GBP_short": "GBP",
50
- "billingLines_currency_ISK": "Icelandic krona (ISK)",
50
+ "billingLines_currency_ISK": "Íslensk króna (ISK)",
51
51
  "billingLines_currency_ISK_short": "ISK",
52
- "billingLines_currency_NOK": "Norwegian krona (NOK)",
52
+ "billingLines_currency_NOK": "Norsk króna (NOK)",
53
53
  "billingLines_currency_NOK_short": "NOK",
54
- "billingLines_currency_SEK": "Swedish krona (SEK)",
54
+ "billingLines_currency_SEK": "Sænsk króna (SEK)",
55
55
  "billingLines_currency_SEK_short": "SEK",
56
- "billingLines_currency_USD": "US dollar (USD)",
56
+ "billingLines_currency_USD": "Bandaríkjadalur (USD)",
57
57
  "billingLines_currency_USD_short": "USD",
58
58
  "billingLines_discount": "Afsláttur",
59
59
  "billingLines_discount_helpText": "Afslátt má setja fram sem upphæð eða sem hlutfall með því að bæta við prósentutákni (%)",
@@ -74,7 +74,7 @@
74
74
  "billingLines_taxCategoryType_title": "Ekki er hægt að leggja virðisauka á vöru nema gefa upp VSK númer",
75
75
  "billingLines_title": "Reikningslínur",
76
76
  "billingLines_tooltip_title": "Hér þarf að skilgreina Vörunr, Nafn, Fjölda, Mælieiningu, Verð pr. einingu og upphæð. Virðisauki reiknast sjálfkrafa. Smelltu á \"Bæta við röð\" til þess að bæta við vörulínu",
77
- "billingLines_total": "Total",
77
+ "billingLines_total": "Alls",
78
78
  "billingLines_total_discount": "Afsláttur alls",
79
79
  "billingLines_unitOfMeasure": "Mælieining",
80
80
  "billingLines_unitPriceAmount": "Verð pr. einingu",
@@ -93,6 +93,7 @@
93
93
  "createInvoice_Submit": "Senda",
94
94
  "createInvoice_addDocumentLineMsg": "Bætið við a.m.k einnig línu í skrá",
95
95
  "createInvoice_customerStepTitle": "Kaupandi",
96
+ "createInvoice_invoiceHadValidationErrors": "Reikningur hefur sannreyningarvillurs",
96
97
  "createInvoice_invoiceStepTitle": "Reikningur",
97
98
  "createInvoice_nextStep": "Halda áfram",
98
99
  "createInvoice_paymentStepTitle": "Greiðsla",
@@ -105,11 +106,12 @@
105
106
  "customer_address_city": "Borg",
106
107
  "customer_address_countryCode": "Landsnúmer",
107
108
  "customer_address_streetNameAndNumber": "Heimilisfang",
108
- "customer_address_zipPostalCode": "Zip/Postal code",
109
+ "customer_address_zipPostalCode": "Póstnúmer",
109
110
  "customer_contact_email": "Netfang",
110
111
  "customer_contact_name": "Nafn tengiliðs",
111
112
  "customer_identifier": "Kennitala",
112
113
  "customer_name": "Nafn",
114
+ "customer_no_customer_configured": "Villa: Enginn viðskiptavinur stilltur",
113
115
  "customer_selectTheCustomer": "Veldu viðskiptavini",
114
116
  "customer_title": "Viðskiptavinur",
115
117
  "deliveryLocation_city": "Bær/Borg",
@@ -119,11 +121,13 @@
119
121
  "deliveryLocation_streetNameAndNumber": "Heimilisfang",
120
122
  "deliveryLocation_title": "Afhendingarstaður",
121
123
  "formItem_required_errorMessage": "Það þarf að fylla út í þennan reit",
122
- "invoicePreview.headerTitle": "Invoice",
123
- "invoicePreview_attachmentsTitle": "Attachments",
124
- "invoicePreview_billingLinesTitle": "Invoice lines",
125
- "invoicePreview_lineDiscount": "line discount",
126
- "invoicePreview_paymentInfoTitle": "Payment information",
124
+ "invoicePreview.headerTitle": "Reikningur",
125
+ "invoicePreview_VAT": "VSK",
126
+ "invoicePreview_VATof": "VSK af",
127
+ "invoicePreview_attachmentsTitle": "Viðhengi",
128
+ "invoicePreview_billingLinesTitle": "Reikningslínur",
129
+ "invoicePreview_lineDiscount": "afsláttur á línu",
130
+ "invoicePreview_paymentInfoTitle": "Greiðsluupplýsingar",
127
131
  "missingRequiredData": "Vantar skilyrt gögn:",
128
132
  "noWhitespaceValidation_message": "Þetta svæði má ekki innihalda eingöngu stafbil",
129
133
  "paymentMethod_label": "Reikningsnúmer",
@@ -149,28 +153,30 @@
149
153
  "referenceIdentifiers_values_validation_message": "Þetta gildi er ekki til",
150
154
  "saveInformation_label": "Vista upplýsingar",
151
155
  "submitConfirmation_SuccessfullyUploadedAttachment": "Viðhengi sem hefur verið sent:",
152
- "submitConfirmation_footer_text": "If any questions arise, please contact us at",
156
+ "submitConfirmation_footer_text": "Ef spurningar vakna, hafið samband",
153
157
  "submitConfirmation_successfullyCreatedInvoice": "Reikningur hefur verið stofnaður",
154
- "submitConfirmation_text": "The invoice has been sent to the customer.",
155
- "submitConfirmation_title": "Invoice sent",
158
+ "submitConfirmation_text": "Reikningur hefur verið sendur til viðskiptavinar.",
159
+ "submitConfirmation_title": "Reikningur sendur",
156
160
  "supplier_address_city": "Borg",
157
161
  "supplier_address_countryCode": "Landsnúmer",
158
162
  "supplier_address_streetNameAndNumber": "Heimilisfang",
159
163
  "supplier_address_zip_postalCode": "Póstnúmer",
160
- "supplier_address_zip_postalZone": "Zip/Postal code",
164
+ "supplier_address_zip_postalZone": "Póstnúmer",
161
165
  "supplier_contact_email": "Netfang",
162
166
  "supplier_contact_email_title": "Send verður greiðslutilkynning á þetta netfang",
163
167
  "supplier_contact_name": "Nafn tengiliðs",
164
168
  "supplier_contact_phoneNumber": "Símanúmer",
169
+ "supplier_errorFetchingCityAndPostcode": "Vill við að sækja stað og póstnúmer:",
165
170
  "supplier_identifier": "Kennitala",
171
+ "supplier_identifier_validationMessage": "Gildið verður að vera á forminu: 111111-1111",
166
172
  "supplier_name": "Nafn birgja",
167
173
  "supplier_notFound": "Fann ekki upplýsingar um nafn og heimilisfang aðila út frá innsleginni kennitölu",
168
174
  "supplier_notValidEmail": "Ekki gilt netfang",
169
175
  "supplier_notVatRegistered": "Ekki VSK skyldur rekstur",
170
- "supplier_title": "Birgi",
176
+ "supplier_title": "Birgir",
171
177
  "supplier_vatNumber": "VSK nr.",
172
178
  "supplier_vatNumber_mandatory": "Gerð er krafa um VSK númer ef línur í skjali nota aðra skattflokka heldur en 'Utan skattumfangs'",
173
- "supplier_vatValidationMessage": "Must be between 5 and 6 characters",
179
+ "supplier_vatValidationMessage": "Verður að vera fimm eða sex stafir",
174
180
  "taxCategoryType_label": "{taxCategoryType, select , StandardRated {Hefðbundinn skattur} ReducedRated {Lækkaður skattur} ZeroRated {Enginn skattur} Exempt {Undaþeginn skatti} OutsideTaxScope {Utan skattumfangs} ReverseCharged {Reverse charged} FreeExportTaxNotCharged {Free export tax not charged} ExemptEuropeanEconomicArea {Exempt European economic area} ExemptionForResale {Undanþága vegna endursölu} other {taxCategoryType}}",
175
181
  "unitOfMeasure_labels_CubicMetre": "Rúmmetri",
176
182
  "unitOfMeasure_labels_Day": "Dagur",
@@ -94,6 +94,7 @@ declare const _default: {
94
94
  createInvoice_Submit: string;
95
95
  createInvoice_addDocumentLineMsg: string;
96
96
  createInvoice_customerStepTitle: string;
97
+ createInvoice_invoiceHadValidationErrors: string;
97
98
  createInvoice_invoiceStepTitle: string;
98
99
  createInvoice_nextStep: string;
99
100
  createInvoice_paymentStepTitle: string;
@@ -111,6 +112,7 @@ declare const _default: {
111
112
  customer_contact_name: string;
112
113
  customer_identifier: string;
113
114
  customer_name: string;
115
+ customer_no_customer_configured: string;
114
116
  customer_selectTheCustomer: string;
115
117
  customer_title: string;
116
118
  deliveryLocation_city: string;
@@ -121,6 +123,8 @@ declare const _default: {
121
123
  deliveryLocation_title: string;
122
124
  formItem_required_errorMessage: string;
123
125
  "invoicePreview.headerTitle": string;
126
+ invoicePreview_VAT: string;
127
+ invoicePreview_VATof: string;
124
128
  invoicePreview_attachmentsTitle: string;
125
129
  invoicePreview_billingLinesTitle: string;
126
130
  invoicePreview_lineDiscount: string;
@@ -163,7 +167,9 @@ declare const _default: {
163
167
  supplier_contact_email_title: string;
164
168
  supplier_contact_name: string;
165
169
  supplier_contact_phoneNumber: string;
170
+ supplier_errorFetchingCityAndPostcode: string;
166
171
  supplier_identifier: string;
172
+ supplier_identifier_validationMessage: string;
167
173
  supplier_name: string;
168
174
  supplier_notFound: string;
169
175
  supplier_notValidEmail: string;
@@ -286,6 +292,7 @@ declare const _default: {
286
292
  createInvoice_Submit: string;
287
293
  createInvoice_addDocumentLineMsg: string;
288
294
  createInvoice_customerStepTitle: string;
295
+ createInvoice_invoiceHadValidationErrors: string;
289
296
  createInvoice_invoiceStepTitle: string;
290
297
  createInvoice_nextStep: string;
291
298
  createInvoice_paymentStepTitle: string;
@@ -303,6 +310,7 @@ declare const _default: {
303
310
  customer_contact_name: string;
304
311
  customer_identifier: string;
305
312
  customer_name: string;
313
+ customer_no_customer_configured: string;
306
314
  customer_selectTheCustomer: string;
307
315
  customer_title: string;
308
316
  deliveryLocation_city: string;
@@ -313,6 +321,8 @@ declare const _default: {
313
321
  deliveryLocation_title: string;
314
322
  formItem_required_errorMessage: string;
315
323
  "invoicePreview.headerTitle": string;
324
+ invoicePreview_VAT: string;
325
+ invoicePreview_VATof: string;
316
326
  invoicePreview_attachmentsTitle: string;
317
327
  invoicePreview_billingLinesTitle: string;
318
328
  invoicePreview_lineDiscount: string;
@@ -355,7 +365,9 @@ declare const _default: {
355
365
  supplier_contact_email_title: string;
356
366
  supplier_contact_name: string;
357
367
  supplier_contact_phoneNumber: string;
368
+ supplier_errorFetchingCityAndPostcode: string;
358
369
  supplier_identifier: string;
370
+ supplier_identifier_validationMessage: string;
359
371
  supplier_name: string;
360
372
  supplier_notFound: string;
361
373
  supplier_notValidEmail: string;
@@ -1 +1 @@
1
- export declare const fetchCityAndPostcode: (query: string, country: string) => Promise<any>;
1
+ export declare const fetchCityAndPostcode: (query: string, country: string, errorMessage: string) => Promise<any>;
@@ -43,7 +43,7 @@ function capitalize(word) {
43
43
  return "";
44
44
  return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
45
45
  }
46
- var fetchCityAndPostcode = function (query, country) { return __awaiter(void 0, void 0, void 0, function () {
46
+ var fetchCityAndPostcode = function (query, country, errorMessage) { return __awaiter(void 0, void 0, void 0, function () {
47
47
  var baseUrl, selectFields, whereCondition, limit, apiUrl, response, data, results, error_1;
48
48
  return __generator(this, function (_a) {
49
49
  switch (_a.label) {
@@ -72,7 +72,7 @@ var fetchCityAndPostcode = function (query, country) { return __awaiter(void 0,
72
72
  return [2 /*return*/, results];
73
73
  case 4:
74
74
  error_1 = _a.sent();
75
- antd_1.message.error("Error fetching city and postcode data:".concat(error_1));
75
+ antd_1.message.error("".concat(errorMessage).concat(error_1));
76
76
  return [3 /*break*/, 5];
77
77
  case 5: return [2 /*return*/];
78
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unimaze/billing",
3
- "version": "0.21.42",
3
+ "version": "0.21.44",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",