@unimaze/billing 0.21.8 → 0.21.10

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.
Files changed (89) hide show
  1. package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.d.ts +0 -0
  2. package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.js +109 -0
  3. package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.d.ts +14 -0
  4. package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.js +73 -0
  5. package/lib/common/components/invoice-preview/InvoicePreviewInvoiceLines.d.ts +12 -0
  6. package/lib/common/components/invoice-preview/InvoicePreviewInvoiceLines.js +93 -0
  7. package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfo.d.ts +0 -0
  8. package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfo.js +110 -0
  9. package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.d.ts +14 -0
  10. package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.js +77 -0
  11. package/lib/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.d.ts +14 -0
  12. package/lib/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.js +52 -0
  13. package/lib/common/components/payment-method/index.js +5 -0
  14. package/lib/unimaze-billing/src/common/components/CommonTranslations.d.ts +1 -29
  15. package/lib/unimaze-billing/src/common/components/CommonTranslations.js +4 -32
  16. package/lib/unimaze-billing/src/common/components/attachments/Attachment.d.ts +1 -1
  17. package/lib/unimaze-billing/src/common/components/attachments/AttachmentModal.d.ts +1 -1
  18. package/lib/unimaze-billing/src/common/components/attachments/AttachmentModal.js +5 -2
  19. package/lib/unimaze-billing/src/common/components/attachments/index.d.ts +1 -1
  20. package/lib/unimaze-billing/src/common/components/base-information/AccountingCost.d.ts +1 -1
  21. package/lib/unimaze-billing/src/common/components/base-information/OrderReference.d.ts +1 -1
  22. package/lib/unimaze-billing/src/common/components/base-information/ProjectReference.d.ts +1 -1
  23. package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.d.ts +6 -1
  24. package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.js +34 -12
  25. package/lib/unimaze-billing/src/common/components/base-information/index.d.ts +10 -1
  26. package/lib/unimaze-billing/src/common/components/base-information/index.js +10 -2
  27. package/lib/unimaze-billing/src/common/components/billing-lines/BillingCalculations.d.ts +1 -1
  28. package/lib/unimaze-billing/src/common/components/billing-lines/BillingCalculations.js +3 -5
  29. package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.d.ts +4 -1
  30. package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.js +45 -25
  31. package/lib/unimaze-billing/src/common/components/billing-lines/BillingTaxSummary.d.ts +1 -1
  32. package/lib/unimaze-billing/src/common/components/billing-lines/BillingTaxSummary.js +0 -1
  33. package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.d.ts +6 -1
  34. package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.js +41 -327
  35. package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.d.ts +10 -5
  36. package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.js +137 -61
  37. package/lib/unimaze-billing/src/common/components/billing-lines/index.d.ts +3 -6
  38. package/lib/unimaze-billing/src/common/components/billing-lines/index.js +1 -1
  39. package/lib/unimaze-billing/src/common/components/customer/CostCenter.d.ts +1 -1
  40. package/lib/unimaze-billing/src/common/components/customer/CustomerContactName.d.ts +1 -1
  41. package/lib/unimaze-billing/src/common/components/customer/index.d.ts +1 -1
  42. package/lib/unimaze-billing/src/common/components/customer/index.js +7 -9
  43. package/lib/unimaze-billing/src/common/components/delivery-location/index.d.ts +1 -1
  44. package/lib/unimaze-billing/src/common/components/form-item/index.d.ts +1 -1
  45. package/lib/unimaze-billing/src/common/components/input/index.d.ts +1 -1
  46. package/lib/unimaze-billing/src/common/components/invoice/index.d.ts +3 -1
  47. package/lib/unimaze-billing/src/common/components/invoice/index.js +21 -14
  48. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.d.ts +14 -0
  49. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.js +75 -0
  50. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.d.ts +14 -0
  51. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.js +73 -0
  52. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewHeader.d.ts +1 -1
  53. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewHeader.js +7 -8
  54. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewInvoiceLines.d.ts +12 -0
  55. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewInvoiceLines.js +93 -0
  56. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfo.d.ts +14 -0
  57. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfo.js +77 -0
  58. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.d.ts +14 -0
  59. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.js +58 -0
  60. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.d.ts +14 -0
  61. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.js +52 -0
  62. package/lib/unimaze-billing/src/common/components/invoice-preview/index.d.ts +87 -1
  63. package/lib/unimaze-billing/src/common/components/invoice-preview/index.js +27 -236
  64. package/lib/unimaze-billing/src/common/components/payment-method/index.d.ts +1 -1
  65. package/lib/unimaze-billing/src/common/components/supplier/CityAutofill.d.ts +1 -1
  66. package/lib/unimaze-billing/src/common/components/supplier/index.d.ts +1 -1
  67. package/lib/unimaze-billing/src/common/components/supplier/index.js +1 -1
  68. package/lib/unimaze-billing/src/common/components/welcome-modal/index.d.ts +1 -1
  69. package/lib/unimaze-billing/src/common/types/AppConfiguration.d.ts +7 -4
  70. package/lib/unimaze-billing/src/common/types/ReceiverRequirements.d.ts +2 -0
  71. package/lib/unimaze-billing/src/common/types/ReceiverRequirements.js +2 -0
  72. package/lib/unimaze-billing/src/create-invoice/index.d.ts +11 -3
  73. package/lib/unimaze-billing/src/create-invoice/index.js +91 -64
  74. package/lib/unimaze-billing/src/enums.d.ts +3 -0
  75. package/lib/unimaze-billing/src/translations/locales/en.json +13 -13
  76. package/lib/unimaze-billing/src/translations/locales/is.json +8 -8
  77. package/lib/unimaze-billing/src/translations/locales.d.ts +16 -16
  78. package/lib/unimaze-billing/src/utils/ApiUtility.d.ts +9 -3
  79. package/lib/unimaze-billing/src/utils/ApiUtility.js +31 -13
  80. package/lib/unimaze-billing/src/utils/BillingLineUtility.d.ts +4 -1
  81. package/lib/unimaze-billing/src/utils/BillingLineUtility.js +36 -4
  82. package/lib/unimaze-billing/src/utils/ConversionUtility.d.ts +2 -2
  83. package/lib/unimaze-billing/src/utils/ConversionUtility.js +10 -11
  84. package/lib/unimaze-billing/src/utils/IntlUtility.d.ts +1 -0
  85. package/lib/unimaze-billing/src/utils/IntlUtility.js +33 -10
  86. package/lib/unimaze-billing/src/utils/RequirementsUtility.d.ts +3 -1
  87. package/lib/unimaze-billing/src/utils/RequirementsUtility.js +49 -1
  88. package/lib/utils/BillingLineUtility.js +3 -2
  89. package/package.json +1 -1
@@ -3,19 +3,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.translationMessages = void 0;
6
7
  var react_intl_1 = require("react-intl");
7
8
  var react_1 = __importDefault(require("react"));
8
9
  var antd_1 = require("antd");
9
10
  var BillingLineUtility_1 = require("../../../utils/BillingLineUtility");
10
- var enums_1 = require("../../../enums");
11
11
  var icons_1 = require("@ant-design/icons");
12
- var colors_1 = require("@ant-design/colors");
13
- var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
14
- var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
15
12
  var mapi_1 = require("@unimaze/api-clients/lib/mapi");
16
13
  var payment_method_1 = require("../payment-method");
17
- var IntlUtility_1 = require("../../../utils/IntlUtility");
18
- var translationMessages = (0, react_intl_1.defineMessages)({
14
+ var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
15
+ var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
16
+ var InvoicePreviewTotalAmountPreview_1 = __importDefault(require("./InvoicePreviewTotalAmountPreview"));
17
+ var InvoicePreviewInvoiceLines_1 = __importDefault(require("./InvoicePreviewInvoiceLines"));
18
+ var InvoicePreviewCustomerSupplierInfoBox_1 = __importDefault(require("./InvoicePreviewCustomerSupplierInfoBox"));
19
+ var InvoicePreviewPaymentInfoBox_1 = __importDefault(require("./InvoicePreviewPaymentInfoBox"));
20
+ exports.translationMessages = (0, react_intl_1.defineMessages)({
19
21
  customer_title: {
20
22
  id: "customer_title",
21
23
  defaultMessage: "Customer",
@@ -62,11 +64,11 @@ var translationMessages = (0, react_intl_1.defineMessages)({
62
64
  },
63
65
  billingCalculations_labels_TaxAmountWithoutVat: {
64
66
  id: "billingCalculations_labels_TaxAmountWithoutVat",
65
- defaultMessage: "Total amount without VAT",
67
+ defaultMessage: "Total amount before VAT", // icelandic
66
68
  },
67
69
  billingCalculations_labels_AmountPayable: {
68
70
  id: "billingCalculations_labels_AmountPayable",
69
- defaultMessage: "Amount payable",
71
+ defaultMessage: "Total invoiced amount", // icelandic
70
72
  },
71
73
  billingCalculations_labels_TotalAmountWithVat: {
72
74
  id: "billingCalculations_labels_TotalAmountWithVat",
@@ -78,7 +80,7 @@ var translationMessages = (0, react_intl_1.defineMessages)({
78
80
  },
79
81
  billingLines_discount: {
80
82
  id: "billingLines_discount",
81
- defaultMessage: "Discount",
83
+ defaultMessage: "line discount",
82
84
  },
83
85
  billingLines_total: {
84
86
  id: "billingLines_total",
@@ -96,9 +98,17 @@ var translationMessages = (0, react_intl_1.defineMessages)({
96
98
  id: "invoicePreview_paymentInfoTitle",
97
99
  defaultMessage: "Payment information",
98
100
  },
101
+ billingLines_total_discount: {
102
+ id: "billingLines_total_discount",
103
+ defaultMessage: "Total discount",
104
+ },
99
105
  });
100
106
  var InvoicePreview = function (props) {
101
- var _a, _b, _c, _d, _e, _f;
107
+ var token = antd_1.theme.useToken().token;
108
+ var formValueFile1 = props.form.getFieldValue(["attachments", "file1", "file"]);
109
+ var formValueFile2 = props.form.getFieldValue(["attachments", "file2", "file"]);
110
+ var formValueFile3 = props.form.getFieldValue(["attachments", "file3", "file"]);
111
+ var _totals = (0, BillingLineUtility_1.getTotals)(props.form.getFieldValue(["invoice", "invoiceLines"]));
102
112
  var defaultPaymentMethods = [
103
113
  {
104
114
  key: mapi_1.PaymentMeansType.NotSpecified,
@@ -117,7 +127,6 @@ var InvoicePreview = function (props) {
117
127
  name: props.intl.formatMessage(payment_method_1.translationMessages.paymentMethod_labels_methods_domesticClaim),
118
128
  },
119
129
  ];
120
- var token = antd_1.theme.useToken().token;
121
130
  var getPaymentMeansValue = function (paymentMeansType) {
122
131
  var paymentMeansTypes = (0, RequirementsUtility_1.getFieldRequirements)(props.recieverRequirements, ReceiverRequirements_1.AvailableFields["paymentMeans.type"]);
123
132
  if (paymentMeansTypes &&
@@ -132,184 +141,28 @@ var InvoicePreview = function (props) {
132
141
  return paymentMeansValue === null || paymentMeansValue === void 0 ? void 0 : paymentMeansValue.name;
133
142
  }
134
143
  };
135
- var formValueFile1 = props.form.getFieldValue(["attachments", "file1", "file"]);
136
- var formValueFile2 = props.form.getFieldValue(["attachments", "file2", "file"]);
137
- var formValueFile3 = props.form.getFieldValue(["attachments", "file3", "file"]);
138
- var _totals = (0, BillingLineUtility_1.getTotals)(props.form.getFieldValue(["invoice", "invoiceLines"]));
139
144
  return (react_1.default.createElement(antd_1.Flex, { justify: "center" },
140
145
  react_1.default.createElement(antd_1.Flex, { vertical: true, style: { width: "100%", maxWidth: "900px" } },
141
146
  react_1.default.createElement(antd_1.Row, { gutter: [20, 20] },
147
+ "TkkES****SEeeeeeeeeCCCswCASrrXXrrT",
142
148
  react_1.default.createElement(antd_1.Col, { span: 24 },
143
- react_1.default.createElement(antd_1.Card, { bordered: false, style: { backgroundColor: "#F5F5F5" }, title: react_1.default.createElement(antd_1.Row, { gutter: 20 },
144
- react_1.default.createElement(antd_1.Col, { span: 12 },
145
- react_1.default.createElement(antd_1.Flex, { justify: "space-between", align: "flex-end", style: { fontWeight: 400 } },
146
- react_1.default.createElement(antd_1.Typography.Text, null, props.intl.formatMessage(translationMessages.baseInformation_issueDate)),
147
- react_1.default.createElement(antd_1.Typography.Text, { type: "secondary", style: { fontSize: token.fontSizeSM } }, (_a = props.form
148
- .getFieldValue(["invoice", "issueDate"])) === null || _a === void 0 ? void 0 : _a.format("DD.MM.YYYY")))),
149
- react_1.default.createElement(antd_1.Col, { span: 12, style: { borderLeft: "1px solid ".concat(colors_1.grey[0]) } },
150
- react_1.default.createElement(antd_1.Flex, { justify: "space-between", align: "flex-end", style: { fontWeight: 400 } },
151
- react_1.default.createElement(antd_1.Typography.Text, null, props.intl.formatMessage(translationMessages.baseInformation_dueDate)),
152
- react_1.default.createElement(antd_1.Typography.Text, { type: "secondary", style: { fontSize: token.fontSizeSM } }, (_b = props.form.getFieldValue(["invoice", "dueDate"])) === null || _b === void 0 ? void 0 : _b.format("DD.MM.YYYY"))))) },
153
- react_1.default.createElement(antd_1.Flex, { vertical: true, gap: "small" },
154
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeHeading4, fontWeight: 500 } },
155
- props.intl.formatMessage(translationMessages.customer_title),
156
- ":"),
157
- react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, props.chosenCustomer.name),
158
- react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
159
- props.intl.formatMessage(translationMessages.customer_identifier),
160
- ":",
161
- " ",
162
- props.chosenCustomer.identifier),
163
- ((_c = props.chosenCustomer.address) === null || _c === void 0 ? void 0 : _c.streetNameAndNumber) &&
164
- ((_d = props.chosenCustomer.address) === null || _d === void 0 ? void 0 : _d.postalZone) &&
165
- ((_e = props.chosenCustomer.address) === null || _e === void 0 ? void 0 : _e.city) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
166
- props.intl.formatMessage(translationMessages.customer_address_streetNameAndNumber),
167
- ": ",
168
- props.chosenCustomer.address.streetNameAndNumber,
169
- ",",
170
- " ",
171
- props.chosenCustomer.address.postalZone,
172
- " ",
173
- props.chosenCustomer.address.city)),
174
- props.form.getFieldValue(["invoice", "customer", "locationIdentifier"]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
175
- props.intl.formatMessage(translationMessages.baseInformation_costCenter),
176
- ":",
177
- " ",
178
- props.form.getFieldValue(["invoice", "customer", "locationIdentifier"]))),
179
- react_1.default.createElement(antd_1.Col, { span: 8, style: { padding: 0 } },
180
- react_1.default.createElement("hr", null)),
181
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeHeading4, fontWeight: 500 } },
182
- props.intl.formatMessage(translationMessages.supplier_title),
183
- ":"),
184
- react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, props.form.getFieldValue(["invoice", "supplier", "name"])),
185
- react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
186
- props.intl.formatMessage(translationMessages.supplier_identifier),
187
- ":",
188
- " ",
189
- props.form.getFieldValue(["invoice", "supplier", "identifier"])),
190
- react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
191
- props.intl.formatMessage(translationMessages.supplier_address_streetNameAndNumber),
192
- ":",
193
- " ",
194
- props.form.getFieldValue([
195
- "invoice",
196
- "supplier",
197
- "address",
198
- "streetNameAndNumber",
199
- ]),
200
- ", ",
201
- props.form.getFieldValue(["invoice", "supplier", "address", "postalZone"]),
202
- " ",
203
- props.form.getFieldValue(["invoice", "supplier", "address", "city"])),
204
- props.form.getFieldValue(["invoice", "supplier", "contact", "telephone"]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
205
- props.intl.formatMessage(translationMessages.supplier_contact_phoneNumber),
206
- ":",
207
- props.form.getFieldValue(["invoice", "supplier", "contact", "telephone"]))),
208
- props.form.getFieldValue(["invoice", "supplier", "contact", "electronicMail"]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, props.form.getFieldValue(["invoice", "supplier", "contact", "electronicMail"])))))),
149
+ react_1.default.createElement(InvoicePreviewCustomerSupplierInfoBox_1.default, { form: props.form, chosenCustomer: props.chosenCustomer })),
209
150
  react_1.default.createElement(antd_1.Col, { span: 24 },
210
- react_1.default.createElement(antd_1.Flex, { vertical: true, style: { padding: "0 24px" }, gap: "middle" },
211
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeHeading4 } },
212
- props.intl.formatMessage(translationMessages.invoicePreview_billingLinesTitle),
213
- ":"),
214
- ((_f = props.form.getFieldValue(["invoice", "invoiceLines"])) === null || _f === void 0 ? void 0 : _f.length) > 0 &&
215
- props.form
216
- .getFieldValue(["invoice", "invoiceLines"])
217
- .map(function (line, index) {
218
- var _a, _b;
219
- var taxPercentage = (0, BillingLineUtility_1.calculateTaxPercentage)(enums_1.AvailableTaxCategoryTypeEnum[line.taxCategoryType]);
220
- var calculatedDiscountValue = line.discountType === "PERCENTAGE"
221
- ? (0, BillingLineUtility_1.calculateDiscountAmount)(line.discountValue, line.quantity, line.unitPriceAmount)
222
- : line.discountValue;
223
- return (react_1.default.createElement(antd_1.Flex, { key: index, vertical: true, gap: "small" },
224
- react_1.default.createElement(antd_1.Flex, { vertical: true },
225
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: "16px" } }, line.name),
226
- react_1.default.createElement(antd_1.Flex, { style: {
227
- backgroundColor: "#F5F5F5",
228
- margin: "0 -24px",
229
- padding: "0 24px",
230
- } },
231
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeSM } },
232
- line.quantity,
233
- " ", (_a = line.unitOfMeasure) === null || _a === void 0 ? void 0 :
234
- _a.unit,
235
- " -",
236
- " ",
237
- (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(line.unitPriceAmount, props.intl),
238
- " ",
239
- line.currencyCode,
240
- " / ", (_b = line.unitOfMeasure) === null || _b === void 0 ? void 0 :
241
- _b.unit))),
242
- react_1.default.createElement(antd_1.Flex, { justify: "space-between", align: "center" },
243
- react_1.default.createElement(antd_1.Typography.Text, null,
244
- taxPercentage,
245
- "% VAT"),
246
- react_1.default.createElement(antd_1.Typography.Text, null,
247
- (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)((0, BillingLineUtility_1.calculateTaxAmount)(line.taxableAmount, taxPercentage), props.intl),
248
- " ",
249
- line.currencyCode)),
250
- line.discountValue && (react_1.default.createElement(antd_1.Flex, { justify: "space-between", align: "center" },
251
- react_1.default.createElement(antd_1.Typography.Text, null, "".concat(line.discountValue).concat(line.discountType === "PERCENTAGE" ? "%" : " ".concat(line.currencyCode)),
252
- " ",
253
- props.intl.formatMessage(translationMessages.billingLines_discount)),
254
- react_1.default.createElement(antd_1.Typography.Text, null,
255
- (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(calculatedDiscountValue, props.intl),
256
- " ",
257
- line.currencyCode))),
258
- react_1.default.createElement(antd_1.Flex, { vertical: true },
259
- react_1.default.createElement(antd_1.Col, { span: 24, style: { padding: 0 } },
260
- react_1.default.createElement("hr", null)),
261
- react_1.default.createElement(antd_1.Flex, { justify: "space-between", align: "center" },
262
- react_1.default.createElement(antd_1.Typography.Text, null, props.intl.formatMessage(translationMessages.billingLines_total)),
263
- react_1.default.createElement(antd_1.Typography.Text, null,
264
- (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(line.taxableAmount, props.intl),
265
- " ",
266
- line.currencyCode)))));
267
- }))),
151
+ react_1.default.createElement(InvoicePreviewInvoiceLines_1.default, { form: props.form })),
268
152
  react_1.default.createElement(antd_1.Col, { span: 24 },
269
- react_1.default.createElement(antd_1.Flex, { vertical: true, gap: "small" },
270
- react_1.default.createElement(antd_1.Card, { bordered: false, style: { backgroundColor: "#F5F5F5" }, size: "small" },
271
- react_1.default.createElement(antd_1.Flex, { vertical: true, style: { padding: "0 12px" } },
272
- react_1.default.createElement(antd_1.Flex, { justify: "space-between" },
273
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: "16px" } }, props.intl.formatMessage(translationMessages.billingCalculations_labels_TaxAmountWithoutVat)),
274
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeSM } },
275
- props.form.getFieldValue(["invoice", "currencyCode"]),
276
- " ",
277
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: "16px" } }, (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(_totals
278
- .totalTaxableAmount, props.intl)))),
279
- react_1.default.createElement(antd_1.Flex, { justify: "space-between" },
280
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: "16px" } }, props.intl.formatMessage(translationMessages.billingCalculations_labels_TotalAmountWithVat)),
281
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeSM } },
282
- props.form.getFieldValue(["invoice", "currencyCode"]),
283
- " ",
284
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: "16px" } }, (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(_totals
285
- .totalTaxInclusiveAmount, props.intl)))),
286
- react_1.default.createElement(antd_1.Flex, { justify: "space-between" },
287
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: "16px" } }, props.intl.formatMessage(translationMessages.billingCalculations_labels_TotalRoundingAmount)),
288
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeSM } },
289
- props.form.getFieldValue(["invoice", "currencyCode"]),
290
- " ",
291
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: "16px" } }, (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(_totals
292
- .roundingAmount, props.intl)))))),
293
- react_1.default.createElement(antd_1.Flex, { justify: "space-between", align: "center", style: { padding: "0 24px" } },
294
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: "16px" } },
295
- props.intl.formatMessage(translationMessages.billingCalculations_labels_AmountPayable),
296
- ":"),
297
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeHeading4 } },
298
- props.form.getFieldValue(["invoice", "currencyCode"]),
299
- " ",
300
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeXL } }, (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(Math.round(_totals.totalTaxInclusiveAmount), props.intl)))))),
153
+ react_1.default.createElement(InvoicePreviewTotalAmountPreview_1.default, { form: props.form, totals: _totals })),
301
154
  props.form.getFieldValue(["invoice", "notes"]) && (react_1.default.createElement(antd_1.Col, { span: 24 },
302
155
  react_1.default.createElement(antd_1.Card, { bordered: false, size: "small", style: { backgroundColor: "#F5F5F5" } },
303
156
  react_1.default.createElement(antd_1.Flex, { vertical: true, style: { padding: "0 12px" } },
304
157
  react_1.default.createElement(antd_1.Typography.Text, { disabled: true },
305
- props.intl.formatMessage(translationMessages.baseInformation_notes),
158
+ props.intl.formatMessage(exports.translationMessages.baseInformation_notes),
306
159
  ":"),
307
160
  react_1.default.createElement(antd_1.Typography.Text, null, props.form.getFieldValue(["invoice", "notes"])))))),
308
161
  (formValueFile1 ||
309
162
  formValueFile2 ||
310
163
  formValueFile3) && (react_1.default.createElement(antd_1.Col, { span: 24 },
311
164
  react_1.default.createElement(antd_1.Flex, { vertical: true, gap: "small" },
312
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeHeading4 } }, props.intl.formatMessage(translationMessages.invoicePreview_attachmentsTitle)),
165
+ react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeHeading4 } }, props.intl.formatMessage(exports.translationMessages.invoicePreview_attachmentsTitle)),
313
166
  formValueFile1 && (react_1.default.createElement(antd_1.Flex, { gap: "middle", align: "flex-start" },
314
167
  react_1.default.createElement(icons_1.PaperClipOutlined, { style: { fontSize: "18px" } }),
315
168
  react_1.default.createElement(antd_1.Flex, { vertical: true },
@@ -338,68 +191,6 @@ var InvoicePreview = function (props) {
338
191
  "description",
339
192
  ])))))))),
340
193
  react_1.default.createElement(antd_1.Col, { span: 24 },
341
- react_1.default.createElement(antd_1.Card, { bordered: false, style: { backgroundColor: "#F5F5F5" }, size: "small" },
342
- react_1.default.createElement(antd_1.Flex, { vertical: true, style: { padding: "0 12px" }, gap: "small" },
343
- react_1.default.createElement(antd_1.Typography.Text, { style: { fontWeight: 700 } }, props.intl.formatMessage(translationMessages.invoicePreview_paymentInfoTitle)),
344
- react_1.default.createElement(antd_1.Flex, { vertical: true },
345
- react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
346
- props.form.getFieldValue(["invoice", "supplier", "name"]),
347
- " Kt:",
348
- " ",
349
- props.form.getFieldValue(["invoice", "supplier", "identifier"])),
350
- react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, getPaymentMeansValue(props.form.getFieldValue(["invoice", "paymentMeans", "type"]))),
351
- props.form.getFieldValue(["invoice", "paymentMeans", "domesticTransfer"]) && (react_1.default.createElement(react_1.default.Fragment, null,
352
- react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
353
- "Reikningsn\u00FAmer:",
354
- " ",
355
- props.form.getFieldValue([
356
- "invoice",
357
- "paymentMeans",
358
- "domesticTransfer",
359
- "bankNumber",
360
- ]),
361
- "-",
362
- props.form.getFieldValue([
363
- "invoice",
364
- "paymentMeans",
365
- "domesticTransfer",
366
- "accountTypeNumber",
367
- ]),
368
- "-",
369
- props.form.getFieldValue([
370
- "invoice",
371
- "paymentMeans",
372
- "domesticTransfer",
373
- "accountNumber",
374
- ])),
375
- props.form.getFieldValue([
376
- "invoice",
377
- "paymentMeans",
378
- "domesticTransfer",
379
- "paymentIdentifier",
380
- ]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
381
- props.intl.formatMessage(payment_method_1.translationMessages.paymentMethod_labels_domesticTransfer_paymentReference),
382
- ":",
383
- " ",
384
- props.form.getFieldValue([
385
- "invoice",
386
- "paymentMeans",
387
- "domesticTransfer",
388
- "paymentIdentifier",
389
- ]))))),
390
- props.form.getFieldValue(["invoice", "paymentMeans", "domesticClaim"]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
391
- props.form.getFieldValue([
392
- "invoice",
393
- "paymentMeans",
394
- "domesticClaim",
395
- "bankNumber",
396
- ]),
397
- "-66-",
398
- props.form.getFieldValue([
399
- "invoice",
400
- "paymentMeans",
401
- "domesticClaim",
402
- "accountNumber",
403
- ])))))))))));
194
+ react_1.default.createElement(InvoicePreviewPaymentInfoBox_1.default, { form: props.form, receiverRequirements: props.recieverRequirements }))))));
404
195
  };
405
196
  exports.default = (0, react_intl_1.injectIntl)(InvoicePreview);
@@ -69,7 +69,7 @@ interface Props extends WrappedComponentProps {
69
69
  isActiveStep: boolean;
70
70
  }
71
71
  declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
72
- forwardedRef?: React.Ref<any> | undefined;
72
+ forwardedRef?: React.Ref<any>;
73
73
  } & React.RefAttributes<any>> & {
74
74
  WrappedComponent: React.ComponentType<Props>;
75
75
  };
@@ -11,7 +11,7 @@ interface Props extends WrappedComponentProps {
11
11
  defaultValue?: string;
12
12
  }
13
13
  declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
14
- forwardedRef?: React.Ref<any> | undefined;
14
+ forwardedRef?: React.Ref<any>;
15
15
  } & React.RefAttributes<any>> & {
16
16
  WrappedComponent: React.ComponentType<Props>;
17
17
  };
@@ -87,7 +87,7 @@ interface Props extends WrappedComponentProps {
87
87
  isActiveStep: boolean;
88
88
  }
89
89
  declare const SupplierIntl: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
90
- forwardedRef?: React.Ref<any> | undefined;
90
+ forwardedRef?: React.Ref<any>;
91
91
  } & React.RefAttributes<any>> & {
92
92
  WrappedComponent: React.ComponentType<Props>;
93
93
  };
@@ -252,7 +252,7 @@ var Supplier = function (props) {
252
252
  required: true,
253
253
  message: props.intl.formatMessage(form_item_2.translationMessages.formItem_required_errorMessage),
254
254
  },
255
- ], normalize: formatIdentifierInput, validateTrigger: ["onBlur"] },
255
+ ], normalize: formatIdentifierInput, validateTrigger: ["onBlur", "onChange"] },
256
256
  React.createElement(__1.UmzInput, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["supplier.identifier"], defaultPlaceholder: props.intl.formatMessage(exports.translationMessages.supplier_identifier), defaultIsRequired: true, disabled: isLoadingParticipantInfo, onChange: function (value) {
257
257
  return debouncerSearch(props.rapiBaseUrl, props.rapiApiKey, value.target.value);
258
258
  } })),
@@ -8,7 +8,7 @@ interface Props extends WrappedComponentProps {
8
8
  imageUrl?: string;
9
9
  }
10
10
  declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
11
- forwardedRef?: React.Ref<any> | undefined;
11
+ forwardedRef?: React.Ref<any>;
12
12
  } & React.RefAttributes<any>> & {
13
13
  WrappedComponent: React.ComponentType<Props>;
14
14
  };
@@ -1,14 +1,17 @@
1
- import { PortalConfigurationCustomer } from "@unimaze/api-clients/src/rapi";
1
+ import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
2
2
  interface AppConfiguration {
3
3
  mapiUrl: string;
4
4
  rapiUrl: string;
5
5
  env: HostConfiguration[];
6
6
  }
7
+ interface ProfileOutputWithApiKey extends ProfileOutput {
8
+ apiKey: string;
9
+ }
7
10
  interface HostConfiguration {
8
11
  host: string;
9
12
  legalIdentifier: string;
10
13
  language: "en" | "is";
11
- customers: PortalConfigurationCustomer[];
14
+ customers: ProfileOutputWithApiKey[];
12
15
  }
13
16
  interface EnvironmentConfiguration {
14
17
  mapiUrl: string;
@@ -17,7 +20,7 @@ interface EnvironmentConfiguration {
17
20
  legalIdentifier: string;
18
21
  infoText?: string;
19
22
  supportEmail?: string;
20
- customers: PortalConfigurationCustomer[];
23
+ customers: ProfileOutputWithApiKey[];
21
24
  language: "is" | "en";
22
25
  }
23
- export { AppConfiguration, HostConfiguration, PortalConfigurationCustomer, EnvironmentConfiguration };
26
+ export { AppConfiguration, HostConfiguration, ProfileOutputWithApiKey, EnvironmentConfiguration };
@@ -27,6 +27,8 @@ export declare enum AvailableFields {
27
27
  "referenceIdentifiers.type" = "referenceIdentifiers.type",
28
28
  "referenceIdentifiers.code" = "referenceIdentifiers.code",
29
29
  "referenceIdentifiers.value" = "referenceIdentifiers.value",
30
+ "referenceIdentifier.*" = "referenceIdentifier.*",
31
+ "singleReferenceIdentifier" = "singleReferenceIdentifier",
30
32
  "referenceIdentifiers" = "referenceIdentifiers",
31
33
  "supplier.vatNumber" = "supplier.vatNumber",
32
34
  "supplier.address.streetNameAndNumber" = "supplier.address.streetNameAndNumber",
@@ -20,6 +20,8 @@ var AvailableFields;
20
20
  AvailableFields["referenceIdentifiers.type"] = "referenceIdentifiers.type";
21
21
  AvailableFields["referenceIdentifiers.code"] = "referenceIdentifiers.code";
22
22
  AvailableFields["referenceIdentifiers.value"] = "referenceIdentifiers.value";
23
+ AvailableFields["referenceIdentifier.*"] = "referenceIdentifier.*";
24
+ AvailableFields["singleReferenceIdentifier"] = "singleReferenceIdentifier";
23
25
  AvailableFields["referenceIdentifiers"] = "referenceIdentifiers";
24
26
  AvailableFields["supplier.vatNumber"] = "supplier.vatNumber";
25
27
  AvailableFields["supplier.address.streetNameAndNumber"] = "supplier.address.streetNameAndNumber";
@@ -1,8 +1,8 @@
1
+ import { ProfileOutputWithApiKey } from "../common/types/AppConfiguration";
1
2
  import React from "react";
2
3
  import { WrappedComponentProps } from "react-intl";
3
4
  import { CommonProps } from "../common/types/CommonProps";
4
5
  import "../common/style/index.css";
5
- import { PortalConfigurationCustomer } from "../../../unimaze-api-clients/src/rapi";
6
6
  export declare const translationMessages: {
7
7
  createInvoice_addDocumentLineMsg: {
8
8
  id: string;
@@ -60,14 +60,22 @@ export declare const translationMessages: {
60
60
  id: string;
61
61
  defaultMessage: string;
62
62
  };
63
+ createInvoice_validationErrorObjectIdentifierRequired: {
64
+ id: string;
65
+ defaultMessage: string;
66
+ };
67
+ createInvoice_validationErrorObjectIdentifierNotValid: {
68
+ id: string;
69
+ defaultMessage: string;
70
+ };
63
71
  };
64
72
  interface Props extends CommonProps, WrappedComponentProps {
65
- customers: PortalConfigurationCustomer[];
73
+ customers: ProfileOutputWithApiKey[];
66
74
  referenceIdentifiersHelpText?: string;
67
75
  referenceIdentifiersLabelText?: string;
68
76
  }
69
77
  declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
70
- forwardedRef?: React.Ref<any> | undefined;
78
+ forwardedRef?: React.Ref<any>;
71
79
  } & React.RefAttributes<any>> & {
72
80
  WrappedComponent: React.ComponentType<Props>;
73
81
  };