@unimaze/billing 0.21.44 → 0.21.46

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 (192) hide show
  1. package/lib/common/components/billing-lines/CurrencySelector.d.ts +1 -0
  2. package/lib/common/components/billing-lines/CurrencySelector.js +1 -1
  3. package/lib/common/components/billing-lines/NewBillingLines.js +1 -1
  4. package/lib/common/components/billing-lines/SingleBillingLine.d.ts +1 -0
  5. package/lib/common/components/billing-lines/SingleBillingLine.js +15 -14
  6. package/lib/style/index.css +51 -0
  7. package/lib/translations/locales/is.json +1 -1
  8. package/package.json +1 -1
  9. package/lib/common/components/billing-lines/NewNewBillingLines.d.ts +0 -15
  10. package/lib/common/components/billing-lines/NewNewBillingLines.js +0 -36
  11. package/lib/common/components/billing-lines/cwdwdw.d.ts +0 -1
  12. package/lib/common/components/billing-lines/cwdwdw.js +0 -14
  13. package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.d.ts +0 -0
  14. package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.js +0 -109
  15. package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfo.d.ts +0 -0
  16. package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfo.js +0 -110
  17. package/lib/unimaze-api-clients/src/mapi/api.d.ts +0 -6664
  18. package/lib/unimaze-api-clients/src/mapi/api.js +0 -4743
  19. package/lib/unimaze-api-clients/src/mapi/base.d.ts +0 -55
  20. package/lib/unimaze-api-clients/src/mapi/base.js +0 -84
  21. package/lib/unimaze-api-clients/src/mapi/configuration.d.ts +0 -63
  22. package/lib/unimaze-api-clients/src/mapi/configuration.js +0 -28
  23. package/lib/unimaze-api-clients/src/mapi/index.d.ts +0 -13
  24. package/lib/unimaze-api-clients/src/mapi/index.js +0 -30
  25. package/lib/unimaze-api-clients/src/rapi/api.d.ts +0 -5015
  26. package/lib/unimaze-api-clients/src/rapi/api.js +0 -5582
  27. package/lib/unimaze-api-clients/src/rapi/base.d.ts +0 -55
  28. package/lib/unimaze-api-clients/src/rapi/base.js +0 -84
  29. package/lib/unimaze-api-clients/src/rapi/configuration.d.ts +0 -63
  30. package/lib/unimaze-api-clients/src/rapi/configuration.js +0 -28
  31. package/lib/unimaze-api-clients/src/rapi/index.d.ts +0 -13
  32. package/lib/unimaze-api-clients/src/rapi/index.js +0 -30
  33. package/lib/unimaze-billing/src/common/components/CommonTranslations.d.ts +0 -74
  34. package/lib/unimaze-billing/src/common/components/CommonTranslations.js +0 -78
  35. package/lib/unimaze-billing/src/common/components/attachments/Attachment.d.ts +0 -20
  36. package/lib/unimaze-billing/src/common/components/attachments/Attachment.js +0 -164
  37. package/lib/unimaze-billing/src/common/components/attachments/AttachmentModal.d.ts +0 -21
  38. package/lib/unimaze-billing/src/common/components/attachments/AttachmentModal.js +0 -206
  39. package/lib/unimaze-billing/src/common/components/attachments/index.d.ts +0 -27
  40. package/lib/unimaze-billing/src/common/components/attachments/index.js +0 -214
  41. package/lib/unimaze-billing/src/common/components/base-information/AccountingCost.d.ts +0 -17
  42. package/lib/unimaze-billing/src/common/components/base-information/AccountingCost.js +0 -61
  43. package/lib/unimaze-billing/src/common/components/base-information/OrderReference.d.ts +0 -16
  44. package/lib/unimaze-billing/src/common/components/base-information/OrderReference.js +0 -58
  45. package/lib/unimaze-billing/src/common/components/base-information/ProjectReference.d.ts +0 -14
  46. package/lib/unimaze-billing/src/common/components/base-information/ProjectReference.js +0 -30
  47. package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.d.ts +0 -53
  48. package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.js +0 -328
  49. package/lib/unimaze-billing/src/common/components/base-information/index.d.ts +0 -77
  50. package/lib/unimaze-billing/src/common/components/base-information/index.js +0 -186
  51. package/lib/unimaze-billing/src/common/components/billing-lines/BillingCalculations.d.ts +0 -14
  52. package/lib/unimaze-billing/src/common/components/billing-lines/BillingCalculations.js +0 -151
  53. package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.d.ts +0 -24
  54. package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.js +0 -61
  55. package/lib/unimaze-billing/src/common/components/billing-lines/BillingTaxSummary.d.ts +0 -13
  56. package/lib/unimaze-billing/src/common/components/billing-lines/BillingTaxSummary.js +0 -133
  57. package/lib/unimaze-billing/src/common/components/billing-lines/CurrencySelector.d.ts +0 -20
  58. package/lib/unimaze-billing/src/common/components/billing-lines/CurrencySelector.js +0 -17
  59. package/lib/unimaze-billing/src/common/components/billing-lines/DiscountTypeSelector.d.ts +0 -10
  60. package/lib/unimaze-billing/src/common/components/billing-lines/DiscountTypeSelector.js +0 -16
  61. package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.d.ts +0 -134
  62. package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.js +0 -209
  63. package/lib/unimaze-billing/src/common/components/billing-lines/NewNewBillingLines.d.ts +0 -15
  64. package/lib/unimaze-billing/src/common/components/billing-lines/NewNewBillingLines.js +0 -36
  65. package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.d.ts +0 -19
  66. package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.js +0 -275
  67. package/lib/unimaze-billing/src/common/components/billing-lines/UnitOfMeasureSelector.d.ts +0 -14
  68. package/lib/unimaze-billing/src/common/components/billing-lines/UnitOfMeasureSelector.js +0 -15
  69. package/lib/unimaze-billing/src/common/components/billing-lines/index.d.ts +0 -49
  70. package/lib/unimaze-billing/src/common/components/billing-lines/index.js +0 -104
  71. package/lib/unimaze-billing/src/common/components/component-container/Content.d.ts +0 -7
  72. package/lib/unimaze-billing/src/common/components/component-container/Content.js +0 -13
  73. package/lib/unimaze-billing/src/common/components/component-container/Header.d.ts +0 -9
  74. package/lib/unimaze-billing/src/common/components/component-container/Header.js +0 -28
  75. package/lib/unimaze-billing/src/common/components/component-container/index.d.ts +0 -12
  76. package/lib/unimaze-billing/src/common/components/component-container/index.js +0 -22
  77. package/lib/unimaze-billing/src/common/components/customer/CostCenter.d.ts +0 -17
  78. package/lib/unimaze-billing/src/common/components/customer/CostCenter.js +0 -163
  79. package/lib/unimaze-billing/src/common/components/customer/CustomerContactName.d.ts +0 -17
  80. package/lib/unimaze-billing/src/common/components/customer/CustomerContactName.js +0 -53
  81. package/lib/unimaze-billing/src/common/components/customer/hardCoddedCustomer.d.ts +0 -7
  82. package/lib/unimaze-billing/src/common/components/customer/hardCoddedCustomer.js +0 -41
  83. package/lib/unimaze-billing/src/common/components/customer/index.d.ts +0 -26
  84. package/lib/unimaze-billing/src/common/components/customer/index.js +0 -166
  85. package/lib/unimaze-billing/src/common/components/date-picker/index.d.ts +0 -21
  86. package/lib/unimaze-billing/src/common/components/date-picker/index.js +0 -23
  87. package/lib/unimaze-billing/src/common/components/delivery-location/index.d.ts +0 -12
  88. package/lib/unimaze-billing/src/common/components/delivery-location/index.js +0 -89
  89. package/lib/unimaze-billing/src/common/components/editable-cell/index.d.ts +0 -0
  90. package/lib/unimaze-billing/src/common/components/editable-cell/index.js +0 -295
  91. package/lib/unimaze-billing/src/common/components/editable-row/index.d.ts +0 -5
  92. package/lib/unimaze-billing/src/common/components/editable-row/index.js +0 -59
  93. package/lib/unimaze-billing/src/common/components/form-item/index.d.ts +0 -35
  94. package/lib/unimaze-billing/src/common/components/form-item/index.js +0 -60
  95. package/lib/unimaze-billing/src/common/components/index.d.ts +0 -18
  96. package/lib/unimaze-billing/src/common/components/index.js +0 -42
  97. package/lib/unimaze-billing/src/common/components/input/index.d.ts +0 -23
  98. package/lib/unimaze-billing/src/common/components/input/index.js +0 -37
  99. package/lib/unimaze-billing/src/common/components/invoice/index.d.ts +0 -42
  100. package/lib/unimaze-billing/src/common/components/invoice/index.js +0 -59
  101. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.d.ts +0 -14
  102. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.js +0 -75
  103. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.d.ts +0 -14
  104. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.js +0 -73
  105. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewHeader.d.ts +0 -12
  106. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewHeader.js +0 -104
  107. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewInvoiceLines.d.ts +0 -12
  108. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewInvoiceLines.js +0 -93
  109. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfo.d.ts +0 -14
  110. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfo.js +0 -77
  111. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.d.ts +0 -14
  112. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.js +0 -58
  113. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.d.ts +0 -14
  114. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.js +0 -52
  115. package/lib/unimaze-billing/src/common/components/invoice-preview/index.d.ts +0 -102
  116. package/lib/unimaze-billing/src/common/components/invoice-preview/index.js +0 -196
  117. package/lib/unimaze-billing/src/common/components/locale-intl/index.d.ts +0 -0
  118. package/lib/unimaze-billing/src/common/components/locale-intl/index.js +0 -51
  119. package/lib/unimaze-billing/src/common/components/payment-method/index.d.ts +0 -76
  120. package/lib/unimaze-billing/src/common/components/payment-method/index.js +0 -356
  121. package/lib/unimaze-billing/src/common/components/payment-method/paymentMethodForConversion.d.ts +0 -8
  122. package/lib/unimaze-billing/src/common/components/payment-method/paymentMethodForConversion.js +0 -37
  123. package/lib/unimaze-billing/src/common/components/submit-confirmation/SubmitConfirmationSVG.d.ts +0 -3
  124. package/lib/unimaze-billing/src/common/components/submit-confirmation/SubmitConfirmationSVG.js +0 -17
  125. package/lib/unimaze-billing/src/common/components/submit-confirmation/index.d.ts +0 -8
  126. package/lib/unimaze-billing/src/common/components/submit-confirmation/index.js +0 -34
  127. package/lib/unimaze-billing/src/common/components/supplier/CityAutofill.d.ts +0 -18
  128. package/lib/unimaze-billing/src/common/components/supplier/CityAutofill.js +0 -159
  129. package/lib/unimaze-billing/src/common/components/supplier/index.d.ts +0 -94
  130. package/lib/unimaze-billing/src/common/components/supplier/index.js +0 -334
  131. package/lib/unimaze-billing/src/common/components/tooltip/index.d.ts +0 -7
  132. package/lib/unimaze-billing/src/common/components/tooltip/index.js +0 -15
  133. package/lib/unimaze-billing/src/common/components/welcome-modal/index.d.ts +0 -15
  134. package/lib/unimaze-billing/src/common/components/welcome-modal/index.js +0 -26
  135. package/lib/unimaze-billing/src/common/consts/formLayout.d.ts +0 -74
  136. package/lib/unimaze-billing/src/common/consts/formLayout.js +0 -45
  137. package/lib/unimaze-billing/src/common/consts/validationRules.d.ts +0 -6
  138. package/lib/unimaze-billing/src/common/consts/validationRules.js +0 -69
  139. package/lib/unimaze-billing/src/common/enums/DocumentTypeEnum.d.ts +0 -5
  140. package/lib/unimaze-billing/src/common/enums/DocumentTypeEnum.js +0 -8
  141. package/lib/unimaze-billing/src/common/enums/index.d.ts +0 -1
  142. package/lib/unimaze-billing/src/common/enums/index.js +0 -8
  143. package/lib/unimaze-billing/src/common/types/AppConfiguration.d.ts +0 -26
  144. package/lib/unimaze-billing/src/common/types/AppConfiguration.js +0 -2
  145. package/lib/unimaze-billing/src/common/types/BillingLineMetadataOverride.d.ts +0 -10
  146. package/lib/unimaze-billing/src/common/types/BillingLineMetadataOverride.js +0 -2
  147. package/lib/unimaze-billing/src/common/types/CommonProps.d.ts +0 -33
  148. package/lib/unimaze-billing/src/common/types/CommonProps.js +0 -2
  149. package/lib/unimaze-billing/src/common/types/DiscountType.d.ts +0 -1
  150. package/lib/unimaze-billing/src/common/types/DiscountType.js +0 -2
  151. package/lib/unimaze-billing/src/common/types/InvoiceFormFields.d.ts +0 -1
  152. package/lib/unimaze-billing/src/common/types/InvoiceFormFields.js +0 -2
  153. package/lib/unimaze-billing/src/common/types/NewReceiverRequirements.d.ts +0 -27
  154. package/lib/unimaze-billing/src/common/types/NewReceiverRequirements.js +0 -2
  155. package/lib/unimaze-billing/src/common/types/ReceiverRequirements.d.ts +0 -83
  156. package/lib/unimaze-billing/src/common/types/ReceiverRequirements.js +0 -393
  157. package/lib/unimaze-billing/src/common/types/SupplierInfo.d.ts +0 -11
  158. package/lib/unimaze-billing/src/common/types/SupplierInfo.js +0 -2
  159. package/lib/unimaze-billing/src/common/types/index.d.ts +0 -1
  160. package/lib/unimaze-billing/src/common/types/index.js +0 -17
  161. package/lib/unimaze-billing/src/create-credit-note/index.d.ts +0 -9
  162. package/lib/unimaze-billing/src/create-credit-note/index.js +0 -62
  163. package/lib/unimaze-billing/src/create-invoice/IntlLoader.d.ts +0 -11
  164. package/lib/unimaze-billing/src/create-invoice/IntlLoader.js +0 -116
  165. package/lib/unimaze-billing/src/create-invoice/index.d.ts +0 -82
  166. package/lib/unimaze-billing/src/create-invoice/index.js +0 -710
  167. package/lib/unimaze-billing/src/enums.d.ts +0 -14
  168. package/lib/unimaze-billing/src/enums.js +0 -18
  169. package/lib/unimaze-billing/src/index.d.ts +0 -4
  170. package/lib/unimaze-billing/src/index.js +0 -28
  171. package/lib/unimaze-billing/src/translations/locales/en.json +0 -183
  172. package/lib/unimaze-billing/src/translations/locales/is.json +0 -183
  173. package/lib/unimaze-billing/src/translations/locales.d.ts +0 -369
  174. package/lib/unimaze-billing/src/translations/locales.js +0 -11
  175. package/lib/unimaze-billing/src/utils/ApiUtility.d.ts +0 -29
  176. package/lib/unimaze-billing/src/utils/ApiUtility.js +0 -133
  177. package/lib/unimaze-billing/src/utils/BillingLineUtility.d.ts +0 -25
  178. package/lib/unimaze-billing/src/utils/BillingLineUtility.js +0 -190
  179. package/lib/unimaze-billing/src/utils/ConversionUtility.d.ts +0 -9
  180. package/lib/unimaze-billing/src/utils/ConversionUtility.js +0 -222
  181. package/lib/unimaze-billing/src/utils/FileUploadUtility.d.ts +0 -9
  182. package/lib/unimaze-billing/src/utils/FileUploadUtility.js +0 -45
  183. package/lib/unimaze-billing/src/utils/IntlUtility.d.ts +0 -6
  184. package/lib/unimaze-billing/src/utils/IntlUtility.js +0 -78
  185. package/lib/unimaze-billing/src/utils/LocationUtility.d.ts +0 -1
  186. package/lib/unimaze-billing/src/utils/LocationUtility.js +0 -81
  187. package/lib/unimaze-billing/src/utils/ReferenceIdentifierUtility.d.ts +0 -7
  188. package/lib/unimaze-billing/src/utils/ReferenceIdentifierUtility.js +0 -26
  189. package/lib/unimaze-billing/src/utils/RequirementsUtility.d.ts +0 -21
  190. package/lib/unimaze-billing/src/utils/RequirementsUtility.js +0 -237
  191. package/lib/unimaze-billing/src/utils/index.d.ts +0 -2
  192. package/lib/unimaze-billing/src/utils/index.js +0 -8
@@ -5,6 +5,7 @@ import React from "react";
5
5
  interface Props extends WrappedComponentProps {
6
6
  receiverRequirements: NewReceiverRequirements;
7
7
  fieldName: any;
8
+ invoiceLinesFormInstance: FormInstance;
8
9
  formInstance: FormInstance;
9
10
  currencies: FieldValues[];
10
11
  mobile: boolean;
@@ -11,7 +11,7 @@ var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
11
11
  var NewBillingLines_1 = require("./NewBillingLines");
12
12
  var CurrencySelector = function (props) {
13
13
  var _a;
14
- return react_1.default.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields.currencyCode, defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_currencyCode), defaultIsRequired: true, fieldName: [props.fieldName, "currencyCode"], initialValue: (_a = props.formInstance.getFieldValue(["invoice", "currencyCode"])) !== null && _a !== void 0 ? _a : props.currencies[0].key, style: { marginBottom: "-2px" } },
14
+ return react_1.default.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields.currencyCode, defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_currencyCode), defaultIsRequired: true, fieldName: [props.fieldName, "currencyCode"], initialValue: (_a = props.invoiceLinesFormInstance.getFieldValue(["invoice", "currencyCode"])) !== null && _a !== void 0 ? _a : props.currencies[0].key, style: { marginBottom: "-2px" } },
15
15
  react_1.default.createElement(antd_1.Select, { popupMatchSelectWidth: false, style: { width: props.mobile ? 64 : "auto" }, placeholder: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_currencyCode), onSelect: props.onSelect, disabled: props.disabled }, props.currencies.map(props.callbackfn)));
16
16
  };
17
17
  exports.default = (0, react_intl_1.injectIntl)(CurrencySelector);
@@ -249,7 +249,7 @@ var BillingLines = function (props) {
249
249
  react_1.default.createElement(antd_1.Form.List, { name: ["invoice", "invoiceLines"] }, function (fields, _a) {
250
250
  var add = _a.add, remove = _a.remove;
251
251
  return (react_1.default.createElement(antd_1.Flex, { vertical: true, gap: 20 }, fields.map(function (field, index) {
252
- return react_1.default.createElement(SingleBillingLine_1.default, { key: "".concat(index + "" + (field === null || field === void 0 ? void 0 : field.key)), fieldName: field.name, index: index, receiverRequirements: props.receiverRequirements, initialTaxCategory: taxCatType, outsideVatScope: props.outsideVatScope, formInstance: invoiceLinesForm, handleAddNewLine: handeAddNewLine, remove: handleRemove });
252
+ return react_1.default.createElement(SingleBillingLine_1.default, { key: "".concat(index + "" + (field === null || field === void 0 ? void 0 : field.key)), fieldName: field.name, index: index, receiverRequirements: props.receiverRequirements, initialTaxCategory: taxCatType, outsideVatScope: props.outsideVatScope, invoiceLinesFormInstance: invoiceLinesForm, formInstance: props.formInstance, handleAddNewLine: handeAddNewLine, remove: handleRemove });
253
253
  })));
254
254
  })));
255
255
  };
@@ -9,6 +9,7 @@ interface Props extends WrappedComponentProps {
9
9
  receiverRequirements: NewReceiverRequirements;
10
10
  outsideVatScope: boolean;
11
11
  initialTaxCategory: AvailableTaxCategoryTypeEnum;
12
+ invoiceLinesFormInstance: FormInstance;
12
13
  formInstance: FormInstance;
13
14
  handleAddNewLine(index: number): void;
14
15
  remove: (index: (number | number[])) => void;
@@ -105,7 +105,7 @@ var SingleBillingLine = function (props) {
105
105
  var _r = (0, react_1.useState)(undefined), addNewLinesTooltip = _r[0], setAddNewLinesTooltip = _r[1];
106
106
  var _s = React.useState(true), isSaveButtonDisabled = _s[0], setIsSaveButtonDisabled = _s[1];
107
107
  var _t = (0, react_1.useState)(false), isEditing = _t[0], setIsEditing = _t[1];
108
- var invoiceLines = (0, Form_1.useWatch)(["invoice", "invoiceLines"], props.formInstance);
108
+ var invoiceLines = (0, Form_1.useWatch)(["invoice", "invoiceLines"], props.invoiceLinesFormInstance);
109
109
  var width = (0, react_use_1.useWindowSize)().width;
110
110
  (0, react_1.useEffect)(function () {
111
111
  if (props.initialTaxCategory) {
@@ -115,7 +115,7 @@ var SingleBillingLine = function (props) {
115
115
  (0, react_1.useEffect)(function () {
116
116
  var _a;
117
117
  if (taxCatType) {
118
- props.formInstance.setFieldsValue({
118
+ props.invoiceLinesFormInstance.setFieldsValue({
119
119
  invoice: {
120
120
  invoiceLines: (_a = {},
121
121
  _a[index] = {
@@ -136,8 +136,8 @@ var SingleBillingLine = function (props) {
136
136
  }, [width]);
137
137
  // init
138
138
  (0, react_1.useEffect)(function () {
139
- if (props.formInstance) {
140
- var lines = props.formInstance.getFieldValue(["invoice", "invoiceLines"]) || [];
139
+ if (props.invoiceLinesFormInstance) {
140
+ var lines = props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"]) || [];
141
141
  var currentField = lines[fieldName];
142
142
  if (currentField) {
143
143
  setIsEditing(currentField.editing);
@@ -151,10 +151,10 @@ var SingleBillingLine = function (props) {
151
151
  }
152
152
  }, [invoiceLines]);
153
153
  var handleOnEdit = function () {
154
- var lines = props.formInstance.getFieldValue(["invoice", "invoiceLines"]) || [];
154
+ var lines = props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"]) || [];
155
155
  lines[fieldName].editing = true;
156
156
  setIsEditing(true);
157
- props.formInstance.setFieldValue(["invoice", "invoiceLines"], lines);
157
+ props.invoiceLinesFormInstance.setFieldValue(["invoice", "invoiceLines"], lines);
158
158
  };
159
159
  var handleRemove = function () {
160
160
  props.remove(fieldName);
@@ -176,7 +176,7 @@ var SingleBillingLine = function (props) {
176
176
  ["invoice", "invoiceLines", fieldName, "discountValue"],
177
177
  ["invoice", "invoiceLines", fieldName, "unitOfMeasure", "unit"],
178
178
  ];
179
- return [4 /*yield*/, props.formInstance.validateFields(fieldPaths, { validateOnly: true })
179
+ return [4 /*yield*/, props.invoiceLinesFormInstance.validateFields(fieldPaths, { validateOnly: true })
180
180
  .then(function () {
181
181
  setIsSaveButtonDisabled(false);
182
182
  setAddNewLinesTooltip(undefined);
@@ -200,9 +200,9 @@ var SingleBillingLine = function (props) {
200
200
  var debouncedValidateFormListFields = React.useCallback((0, lodash_1.debounce)(validateFormListFields, 500), [invoiceLines]);
201
201
  (0, react_1.useEffect)(function () {
202
202
  debouncedValidateFormListFields();
203
- }, [invoiceLines, props.formInstance.getFieldValue(["invoice", "currencyCode"])]);
203
+ }, [invoiceLines, props.invoiceLinesFormInstance.getFieldValue(["invoice", "currencyCode"])]);
204
204
  var getTaxableAmount = function () {
205
- var fieldValues = props.formInstance.getFieldsValue([
205
+ var fieldValues = props.invoiceLinesFormInstance.getFieldsValue([
206
206
  ["invoice", "invoiceLines", fieldName],
207
207
  ]);
208
208
  if (fieldValues &&
@@ -211,7 +211,7 @@ var SingleBillingLine = function (props) {
211
211
  fieldValues.invoice.invoiceLines[fieldName]) {
212
212
  var _a = fieldValues.invoice.invoiceLines[fieldName], discountValue = _a.discountValue, quantity = _a.quantity, unitPriceAmount = _a.unitPriceAmount;
213
213
  var taxableAmount = (0, BillingLineUtility_1.calculateTaxableAmount)(discountValue, quantity, unitPriceAmount, discountType);
214
- props.formInstance.setFields([
214
+ props.invoiceLinesFormInstance.setFields([
215
215
  {
216
216
  name: ["invoice", "invoiceLines", fieldName, "taxableAmount"],
217
217
  value: taxableAmount,
@@ -225,6 +225,7 @@ var SingleBillingLine = function (props) {
225
225
  return (React.createElement(antd_1.Select.Option, { value: currency.key, title: currency.name, key: currency.key }, currency.name));
226
226
  };
227
227
  var currencySelectorOnSelect = function (value) {
228
+ props.invoiceLinesFormInstance.setFieldsValue({ invoice: { currencyCode: value } });
228
229
  props.formInstance.setFieldsValue({ invoice: { currencyCode: value } });
229
230
  };
230
231
  var discountTypeSelectorOnSelectHandle = function (value) { return setDiscountType(value); };
@@ -235,7 +236,7 @@ var SingleBillingLine = function (props) {
235
236
  React.createElement(antd_1.Col, { span: 12 },
236
237
  React.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.quantity"], defaultIsRequired: true, fieldName: [fieldName, "quantity"], defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_quantity), verticalLabels: true, onlyLabelOnFirstInList: true, index: index }, (0, BillingLineUtility_1.getCorrectInputNode)("quantity", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_quantity), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.quantity"], true), React.createElement(UnitOfMeasureSelector_1.default, { receiverRequirements: props.receiverRequirements, fieldName: fieldName, mobile: isMobile })))),
237
238
  React.createElement(antd_1.Col, { span: 12 },
238
- React.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.unitPriceAmount"], defaultIsRequired: true, fieldName: [fieldName, "unitPriceAmount"], defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_unitPriceAmount), verticalLabels: true, onlyLabelOnFirstInList: true, index: index }, (0, BillingLineUtility_1.getCorrectInputNode)("unitPriceAmount", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_unitPriceAmount), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.unitPriceAmount"], true), React.createElement(CurrencySelector_1.default, { receiverRequirements: props.receiverRequirements, fieldName: fieldName, formInstance: props.formInstance, currencies: (0, RequirementsUtility_1.getCurrencies)(props.receiverRequirements, intl), mobile: isMobile, onSelect: currencySelectorOnSelect, disabled: isCurrencyDisabled, callbackfn: currencySelectorCallbackFunction }))))),
239
+ React.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.unitPriceAmount"], defaultIsRequired: true, fieldName: [fieldName, "unitPriceAmount"], defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_unitPriceAmount), verticalLabels: true, onlyLabelOnFirstInList: true, index: index }, (0, BillingLineUtility_1.getCorrectInputNode)("unitPriceAmount", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_unitPriceAmount), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.unitPriceAmount"], true), React.createElement(CurrencySelector_1.default, { receiverRequirements: props.receiverRequirements, fieldName: fieldName, invoiceLinesFormInstance: props.invoiceLinesFormInstance, formInstance: props.formInstance, currencies: (0, RequirementsUtility_1.getCurrencies)(props.receiverRequirements, intl), mobile: isMobile, onSelect: currencySelectorOnSelect, disabled: isCurrencyDisabled, callbackfn: currencySelectorCallbackFunction }))))),
239
240
  React.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.taxableAmount"], defaultIsRequired: false, fieldName: [fieldName, "taxableAmount"], defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_lineAmount), verticalLabels: true, onlyLabelOnFirstInList: true, index: index },
240
241
  React.createElement(antd_1.InputNumber, { style: { width: "100%" }, disabled: true, defaultValue: (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(getTaxableAmount(), props.intl) })),
241
242
  React.createElement(antd_1.Row, { gutter: 20 },
@@ -245,7 +246,7 @@ var SingleBillingLine = function (props) {
245
246
  React.createElement(antd_1.Select, { style: isMobile ? { maxWidth: "80%" } : {}, value: taxCatType, onChange: function (value) {
246
247
  var _a;
247
248
  setTaxCatType(value);
248
- props.formInstance.setFieldsValue({
249
+ props.invoiceLinesFormInstance.setFieldsValue({
249
250
  invoice: {
250
251
  invoiceLines: (_a = {},
251
252
  _a[index] = {
@@ -271,7 +272,7 @@ var SingleBillingLine = function (props) {
271
272
  },
272
273
  ], index: index },
273
274
  React.createElement(antd_1.Flex, { gap: "middle", align: "center" },
274
- (0, BillingLineUtility_1.getCorrectInputNode)("discountValue", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_discount), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.discountValue"], false), React.createElement(DiscountTypeSelector_1.default, { fieldName: fieldName, initialValue: discountType, onSelect: discountTypeSelectorOnSelectHandle, formInstance: props.formInstance }), false, props.formInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName].discountValue),
275
+ (0, BillingLineUtility_1.getCorrectInputNode)("discountValue", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_discount), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.discountValue"], false), React.createElement(DiscountTypeSelector_1.default, { fieldName: fieldName, initialValue: discountType, onSelect: discountTypeSelectorOnSelectHandle, formInstance: props.invoiceLinesFormInstance }), false, props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName].discountValue),
275
276
  React.createElement(tooltip_1.default, { title: (0, RequirementsUtility_1.getFieldLabelTooltipOverride)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.discountValue"], props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_discount_helpText)) }))))),
276
277
  React.createElement(antd_1.Form.Item, __assign({}, formLayout_1.fullWidthInput),
277
278
  React.createElement(antd_1.Tooltip, { title: addNewLinesTooltip },
@@ -280,6 +281,6 @@ var SingleBillingLine = function (props) {
280
281
  props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_labels_addButton))))));
281
282
  return (React.createElement(React.Fragment, null, isEditing
282
283
  ? editingRender
283
- : React.createElement(BillingLinePreview_1.default, { itemNo: (_a = props.formInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _a === void 0 ? void 0 : _a.itemNo, name: (_b = props.formInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _b === void 0 ? void 0 : _b.name, discountValue: (_c = props.formInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _c === void 0 ? void 0 : _c.discountValue, discountType: (_d = props.formInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _d === void 0 ? void 0 : _d.discountType, taxCategoryType: (_e = props.formInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _e === void 0 ? void 0 : _e.taxCategoryType, currencyCode: (_f = props.formInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _f === void 0 ? void 0 : _f.currencyCode, onEdit: handleOnEdit, quantity: (_g = props.formInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _g === void 0 ? void 0 : _g.quantity, taxableAmount: (_h = props.formInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _h === void 0 ? void 0 : _h.taxableAmount, unitPriceAmount: (_j = props.formInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _j === void 0 ? void 0 : _j.unitPriceAmount, unit: (_k = props.formInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _k === void 0 ? void 0 : _k.unitPriceAmount, unitOfMeasure: (_l = props.formInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _l === void 0 ? void 0 : _l.unitOfMeasure, onDelete: handleRemove })));
284
+ : React.createElement(BillingLinePreview_1.default, { itemNo: (_a = props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _a === void 0 ? void 0 : _a.itemNo, name: (_b = props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _b === void 0 ? void 0 : _b.name, discountValue: (_c = props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _c === void 0 ? void 0 : _c.discountValue, discountType: (_d = props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _d === void 0 ? void 0 : _d.discountType, taxCategoryType: (_e = props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _e === void 0 ? void 0 : _e.taxCategoryType, currencyCode: (_f = props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _f === void 0 ? void 0 : _f.currencyCode, onEdit: handleOnEdit, quantity: (_g = props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _g === void 0 ? void 0 : _g.quantity, taxableAmount: (_h = props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _h === void 0 ? void 0 : _h.taxableAmount, unitPriceAmount: (_j = props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _j === void 0 ? void 0 : _j.unitPriceAmount, unit: (_k = props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _k === void 0 ? void 0 : _k.unitPriceAmount, unitOfMeasure: (_l = props.invoiceLinesFormInstance.getFieldValue(["invoice", "invoiceLines"])[fieldName]) === null || _l === void 0 ? void 0 : _l.unitOfMeasure, onDelete: handleRemove })));
284
285
  };
285
286
  exports.default = (0, react_intl_1.injectIntl)(SingleBillingLine);
@@ -0,0 +1,51 @@
1
+ .component_header {
2
+ height: 3.3em;
3
+ background-color: #fff;
4
+ border-bottom: solid 1px #d9d9d9;
5
+ border-radius: 4px 4px 0 0;
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: space-between;
9
+ padding: 1em 2em;
10
+ }
11
+ .component_header_title {
12
+ font-size: 1.1em;
13
+ }
14
+ .component_header_title > span > i {
15
+ font-size: 20px;
16
+ }
17
+ .header_icon {
18
+ font-size: 1.5em;
19
+ margin-right: 0.75em;
20
+ color: #1890ff;
21
+ }
22
+ .header_right {
23
+ display: flex;
24
+ justify-content: flex-end;
25
+ }
26
+ @media screen and (max-width: 768px) {
27
+ .header_right {
28
+ justify-content: flex-start;
29
+ }
30
+ }
31
+ .header_right > button {
32
+ margin-bottom: unset !important;
33
+ }
34
+ .component_body {
35
+ border-radius: 0 0 4px 4px;
36
+ }
37
+ .component_wrapper {
38
+ align-self: stretch;
39
+ height: 100%;
40
+ background-color: #fff;
41
+ border: solid 1px #d9d9d9;
42
+ border-radius: 4px;
43
+ }
44
+ .component_wrapper_padding {
45
+ padding: 1em;
46
+ }
47
+ .umz_noValidationMessage .ant-form-item-explain {
48
+ height: 20px !important;
49
+ visibility: hidden !important;
50
+ }
51
+ /*# sourceMappingURL=index.css.map */
@@ -96,7 +96,7 @@
96
96
  "createInvoice_invoiceHadValidationErrors": "Reikningur hefur sannreyningarvillurs",
97
97
  "createInvoice_invoiceStepTitle": "Reikningur",
98
98
  "createInvoice_nextStep": "Halda áfram",
99
- "createInvoice_paymentStepTitle": "Greiðsla",
99
+ "createInvoice_paymentStepTitle": "Greiðsluháttur",
100
100
  "createInvoice_selectCustomerMsg": "Viðskiptavinur verður að vera valinn",
101
101
  "createInvoice_successfullySubmittedInvoiceMsg": "Sending reiknings tókst",
102
102
  "createInvoice_successfullyUploadedAttachmentMsg": "Það tókst að hlaða upp viðhenginu {attachment}",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unimaze/billing",
3
- "version": "0.21.44",
3
+ "version": "0.21.46",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -1,15 +0,0 @@
1
- import * as React from 'react';
2
- import { WrappedComponentProps } from "react-intl";
3
- import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
4
- import { FormInstance } from "antd/es/form";
5
- interface Props extends WrappedComponentProps {
6
- receiverRequirements: NewReceiverRequirements;
7
- formInstance: FormInstance;
8
- outsideVatScope: boolean;
9
- }
10
- declare const BillingLinesWithIntl: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
11
- forwardedRef?: React.Ref<any> | undefined;
12
- } & React.RefAttributes<any>> & {
13
- WrappedComponent: React.ComponentType<Props>;
14
- };
15
- export default BillingLinesWithIntl;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- var React = __importStar(require("react"));
27
- var react_intl_1 = require("react-intl");
28
- var antd_1 = require("antd");
29
- var NewNewBillingLines = function (props) {
30
- return (React.createElement(antd_1.Form.List, { name: ["invoice", "invoiceLines"] }, function (fields, _a) {
31
- var add = _a.add, remove = _a.remove;
32
- return (React.createElement(antd_1.Flex, { vertical: true }));
33
- }));
34
- };
35
- var BillingLinesWithIntl = (0, react_intl_1.injectIntl)(NewNewBillingLines);
36
- exports.default = BillingLinesWithIntl;
@@ -1 +0,0 @@
1
- export {};
@@ -1,14 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var antd_1 = require("antd");
7
- var form_item_1 = __importDefault(require("../form-item"));
8
- var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
9
- var BillingLineUtility_1 = require("../../../utils/BillingLineUtility");
10
- var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
11
- var react_1 = __importDefault(require("react"));
12
- var NewBillingLines_1 = require("./NewBillingLines");
13
- react_1.default.createElement(antd_1.Col, { span: 12 },
14
- react_1.default.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.unitPriceAmount"], defaultIsRequired: true, fieldName: [field.name, "unitPriceAmount"], defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_unitPriceAmount), verticalLabels: true, onlyLabelOnFirstInList: true, index: index }, (0, BillingLineUtility_1.getCorrectInputNode)("unitPriceAmount", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_unitPriceAmount), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.unitPriceAmount"], true), currencySelector)));
@@ -1,109 +0,0 @@
1
- "use strict";
2
- // import {Card, Col, Flex, FormInstance, Row, theme, Typography} from "antd";
3
- // import React from "react";
4
- // import { injectIntl, WrappedComponentProps} from "react-intl";
5
- // import {translationMessages} from "./index";
6
- // import {grey} from "@ant-design/colors";
7
- // import {PartyMetadata} from "../../../../../unimaze-api-clients/src/mapi";
8
- //
9
- // interface Props extends WrappedComponentProps {
10
- // form: FormInstance;
11
- // chosenCustomer: PartyMetadata;
12
- // }
13
- //
14
- // const InvoicePreviewCustomerSupplierInfo: React.FC<Props> = (props) => {
15
- // const {token} = theme.useToken();
16
- //
17
- // return (
18
- // <Card
19
- // bordered={false}
20
- // style={{backgroundColor: "#F5F5F5"}}
21
- // title={"LL"
22
- // // <Row gutter={20}>
23
- // // <Col span={12}>
24
- // // <Flex justify="space-between" align="flex-end" style={{fontWeight: 400}}>
25
- // // <Typography.Text>
26
- // // {"DSAAA"}
27
- // // {/*{props.intl.formatMessage(translationMessages.baseInformation_issueDate)}*/}
28
- // // </Typography.Text>
29
- // // <Typography.Text type="secondary" style={{fontSize: token.fontSizeSM}}>
30
- // // {props.form.getFieldValue(["invoice", "issueDate"])?.format("DD.MM.YYYY")}
31
- // // </Typography.Text>
32
- // // </Flex>
33
- // // </Col>
34
- // // <Col span={12} style={{borderLeft: `1px solid ${grey[0]}`}}>
35
- // // <Flex justify="space-between" align="flex-end" style={{fontWeight: 400}}>
36
- // // <Typography.Text>
37
- // // {props.intl.formatMessage(translationMessages.baseInformation_dueDate)}
38
- // // </Typography.Text>
39
- // // <Typography.Text type="secondary" style={{fontSize: token.fontSizeSM}}>
40
- // // {props.form.getFieldValue(["invoice", "dueDate"])?.format("DD.MM.YYYY")}
41
- // // </Typography.Text>
42
- // // </Flex>
43
- // // </Col>
44
- // // </Row>
45
- // }
46
- // >
47
- // <Flex vertical gap={"small"}>
48
- // {/*<Typography.Text style={{fontSize: token.fontSizeHeading4, fontWeight: 500}}>*/}
49
- // {/* {props.intl.formatMessage(translationMessages.customer_title)}:*/}
50
- // {/*</Typography.Text>*/}
51
- // {/*<Typography.Text type="secondary">{props.chosenCustomer.name}</Typography.Text>*/}
52
- // {/*<Typography.Text type="secondary">*/}
53
- // {/* {props.intl.formatMessage(translationMessages.customer_identifier)}:{" "}*/}
54
- // {/* {props.chosenCustomer.identifier}*/}
55
- // {/*</Typography.Text>*/}
56
- // {/*{props.chosenCustomer.address?.streetNameAndNumber &&*/}
57
- // {/* props.chosenCustomer.address?.postalZone &&*/}
58
- // {/* props.chosenCustomer.address?.city && (*/}
59
- // {/* <Typography.Text type="secondary">*/}
60
- // {/* {props.intl.formatMessage(translationMessages.customer_address_streetNameAndNumber)}*/}
61
- // {/* : {props.chosenCustomer.address.streetNameAndNumber},{" "}*/}
62
- // {/* {props.chosenCustomer.address.postalZone}{" "}*/}
63
- // {/* {props.chosenCustomer.address.city}*/}
64
- // {/* </Typography.Text>*/}
65
- // {/* )}*/}
66
- // {/*{props.form.getFieldValue(["invoice", "customer", "locationIdentifier"]) && (*/}
67
- // {/* <Typography.Text type="secondary">*/}
68
- // {/* {props.intl.formatMessage(translationMessages.baseInformation_costCenter)}:{" "}*/}
69
- // {/* {props.form.getFieldValue(["invoice", "customer", "locationIdentifier"])}*/}
70
- // {/* </Typography.Text>*/}
71
- // {/*)}*/}
72
- // {/*<Col span={8} style={{padding: 0}}>*/}
73
- // {/* <hr/>*/}
74
- // {/*</Col>*/}
75
- // {/*<Typography.Text style={{fontSize: token.fontSizeHeading4, fontWeight: 500}}>*/}
76
- // {/* {props.intl.formatMessage(translationMessages.supplier_title)}:*/}
77
- // {/*</Typography.Text>*/}
78
- // {/*<Typography.Text type="secondary">*/}
79
- // {/* {props.form.getFieldValue(["invoice", "supplier", "name"])}*/}
80
- // {/*</Typography.Text>*/}
81
- // {/*<Typography.Text type="secondary">*/}
82
- // {/* {props.intl.formatMessage(translationMessages.supplier_identifier)}:{" "}*/}
83
- // {/* {props.form.getFieldValue(["invoice", "supplier", "identifier"])}*/}
84
- // {/*</Typography.Text>*/}
85
- // {/*<Typography.Text type="secondary">*/}
86
- // {/* {props.intl.formatMessage(translationMessages.supplier_address_streetNameAndNumber)}*/}
87
- // {/* :{" "}*/}
88
- // {/* {props.form.getFieldValue(["invoice", "supplier", "address", "streetNameAndNumber",])}*/}
89
- // {/* , {props.form.getFieldValue(["invoice", "supplier", "address", "postalZone"])}{" "}*/}
90
- // {/* {props.form.getFieldValue(["invoice", "supplier", "address", "city"])}*/}
91
- // {/*</Typography.Text>*/}
92
- // {/*{props.form.getFieldValue(["invoice", "supplier", "contact", "telephone"]) && (*/}
93
- // {/* <Typography.Text type="secondary">*/}
94
- // {/* {props.intl.formatMessage(translationMessages.supplier_contact_phoneNumber)}:*/}
95
- // {/* {props.form.getFieldValue(["invoice", "supplier", "contact", "telephone"])}*/}
96
- // {/* </Typography.Text>*/}
97
- // {/*)}*/}
98
- // {/*{props.form.getFieldValue(["invoice", "supplier", "contact", "electronicMail"]) && (*/}
99
- // {/* <Typography.Text type="secondary">*/}
100
- // {/* {props.form.getFieldValue(["invoice", "supplier", "contact", "electronicMail"])}*/}
101
- // {/* </Typography.Text>*/}
102
- // {/*)}*/}
103
- // </Flex>
104
- // </Card>
105
- // );
106
- // };
107
- //
108
- // export default injectIntl(InvoicePreviewCustomerSupplierInfo);
109
- //
@@ -1,110 +0,0 @@
1
- "use strict";
2
- // import {Card, Flex, FormInstance, Typography} from "antd";
3
- // import React from "react";
4
- // import { injectIntl, WrappedComponentProps} from "react-intl";
5
- // import {translationMessages as invoicePreviewTranslations} from "./index";
6
- // import {translationMessages as paymentMethod_translationMessages} from "../payment-method";
7
- // import {PaymentMeansType} from "../../../../../unimaze-api-clients/src/mapi";
8
- // import {getFieldRequirements} from "../../../utils/RequirementsUtility";
9
- // import {AvailableFields} from "../../types/ReceiverRequirements";
10
- // import {NewReceiverRequirements} from "../../types/NewReceiverRequirements";
11
- //
12
- // interface Props extends WrappedComponentProps {
13
- // form: FormInstance;
14
- // receiverRequirements: NewReceiverRequirements;
15
- // }
16
- //
17
- // const InvoicePreviewPaymentInfo: React.FC<Props> = (props) => {
18
- //
19
- // const defaultPaymentMethods = [
20
- // {
21
- // key: PaymentMeansType.NotSpecified,
22
- // name: props.intl.formatMessage(paymentMethod_translationMessages.paymentMethod_labels_methods_undefined),
23
- // },
24
- // {
25
- // key: PaymentMeansType.MutuallyAgreed,
26
- // name: props.intl.formatMessage(
27
- // paymentMethod_translationMessages.paymentMethod_labels_methods_mutuallyAgreed
28
- // ),
29
- // },
30
- // {
31
- // key: PaymentMeansType.DomesticTransfer,
32
- // name: props.intl.formatMessage(
33
- // paymentMethod_translationMessages.paymentMethod_labels_methods_domesticTransfer
34
- // ),
35
- // },
36
- // {
37
- // key: PaymentMeansType.DomesticClaim,
38
- // name: props.intl.formatMessage(
39
- // paymentMethod_translationMessages.paymentMethod_labels_methods_domesticClaim
40
- // ),
41
- // },
42
- // ];
43
- //
44
- // const getPaymentMeansValue = (paymentMeansType: PaymentMeansType) => {
45
- // const paymentMeansTypes = getFieldRequirements(props.receiverRequirements, AvailableFields["paymentMeans.type"]);
46
- //
47
- // if (
48
- // paymentMeansTypes &&
49
- // paymentMeansTypes.hasOwnProperty("properties") &&
50
- // paymentMeansTypes.properties.hasOwnProperty("values") &&
51
- // paymentMeansTypes.properties.values
52
- // ) {
53
- // const paymentMeansValue = paymentMeansTypes.properties.values.find(
54
- // (value: any) => value.key === paymentMeansType
55
- // );
56
- // return paymentMeansValue?.name;
57
- // } else {
58
- // const paymentMeansValue = defaultPaymentMethods.find((value: any) => value.key === paymentMeansType);
59
- // return paymentMeansValue?.name;
60
- // }
61
- // };
62
- //
63
- // return (
64
- // <Card bordered={false} style={{backgroundColor: "#F5F5F5"}} size="small">
65
- // <Flex vertical style={{padding: "0 12px"}} gap={"small"}>
66
- // <Typography.Text style={{fontWeight: 700}}>
67
- // {props.intl.formatMessage(invoicePreviewTranslations.invoicePreview_paymentInfoTitle)}
68
- // </Typography.Text>
69
- // <Flex vertical>
70
- // <Typography.Text type="secondary">
71
- // {props.form.getFieldValue(["invoice", "supplier", "name"])} Kt:{" "}
72
- // {props.form.getFieldValue(["invoice", "supplier", "identifier"])}
73
- // </Typography.Text>
74
- // <Typography.Text type="secondary">
75
- // {getPaymentMeansValue(props.form.getFieldValue(["invoice", "paymentMeans", "type"]))}
76
- // </Typography.Text>
77
- // {props.form.getFieldValue(["invoice", "paymentMeans", "domesticTransfer"]) && (
78
- // <>
79
- // <Typography.Text type="secondary">
80
- // {props.intl.formatMessage(paymentMethod_translationMessages.paymentMethod_labels_domesticTransfer_accountNo)}:{" "}
81
- // {props.form.getFieldValue(["invoice", "paymentMeans", "domesticTransfer", "bankNumber",])}
82
- // -
83
- // {props.form.getFieldValue(["invoice", "paymentMeans", "domesticTransfer", "accountTypeNumber",])}
84
- // -
85
- // {props.form.getFieldValue(["invoice", "paymentMeans", "domesticTransfer", "accountNumber",])}
86
- // </Typography.Text>
87
- // {props.form.getFieldValue(["invoice", "paymentMeans", "domesticTransfer", "paymentIdentifier",]) && (
88
- // <Typography.Text type="secondary">
89
- // {props.intl.formatMessage(paymentMethod_translationMessages.paymentMethod_labels_domesticTransfer_paymentReference)}
90
- // :{" "}
91
- // {props.form.getFieldValue(["invoice", "paymentMeans", "domesticTransfer", "paymentIdentifier",])}
92
- // </Typography.Text>
93
- // )}
94
- // </>
95
- // )}
96
- // {props.form.getFieldValue(["invoice", "paymentMeans", "domesticClaim"]) && (
97
- // <Typography.Text type="secondary">
98
- // {props.form.getFieldValue(["invoice", "paymentMeans", "domesticClaim", "bankNumber",])}
99
- // -66-
100
- // {props.form.getFieldValue(["invoice", "paymentMeans", "domesticClaim", "accountNumber",])}
101
- // </Typography.Text>
102
- // )}
103
- // </Flex>
104
- // </Flex>
105
- // </Card>
106
- // );
107
- // };
108
- //
109
- // export default injectIntl(InvoicePreviewPaymentInfo);
110
- //