@unimaze/billing 0.1.0 → 0.1.2-rc.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 (101) hide show
  1. package/README.md +11 -3
  2. package/lib/common/components/attachments/Attachment.d.ts +8 -2
  3. package/lib/common/components/attachments/Attachment.js +33 -8
  4. package/lib/common/components/attachments/index.d.ts +9 -2
  5. package/lib/common/components/attachments/index.js +15 -6
  6. package/lib/common/components/base-information/ReferenceIdentifiers.d.ts +6 -0
  7. package/lib/common/components/base-information/ReferenceIdentifiers.js +40 -0
  8. package/lib/common/components/base-information/index.d.ts +6 -3
  9. package/lib/common/components/base-information/index.js +100 -81
  10. package/lib/common/components/billing-lines/BillingCalculations.d.ts +11 -0
  11. package/lib/common/components/billing-lines/BillingCalculations.js +61 -0
  12. package/lib/common/components/billing-lines/BillingTaxSummary.d.ts +10 -0
  13. package/lib/common/components/billing-lines/BillingTaxSummary.js +51 -0
  14. package/lib/common/components/billing-lines/billingLIneFormData.d.ts +7 -0
  15. package/lib/common/components/billing-lines/billingLIneFormData.js +63 -0
  16. package/lib/common/components/billing-lines/index.d.ts +10 -24
  17. package/lib/common/components/billing-lines/index.js +117 -39
  18. package/lib/common/components/customer/hardCoddedCustomer.d.ts +7 -0
  19. package/lib/common/components/{issuer/index.js → customer/hardCoddedCustomer.js} +5 -8
  20. package/lib/common/components/customer/index.d.ts +6 -0
  21. package/lib/common/components/customer/index.js +93 -0
  22. package/lib/common/components/delivery-location/index.d.ts +5 -2
  23. package/lib/common/components/delivery-location/index.js +43 -11
  24. package/lib/common/components/editable-cell/index.d.ts +1 -1
  25. package/lib/common/components/editable-cell/index.js +77 -11
  26. package/lib/common/components/editable-row/index.d.ts +5 -5
  27. package/lib/common/components/editable-row/index.js +8 -6
  28. package/lib/common/components/form-item/index.d.ts +21 -0
  29. package/lib/common/components/form-item/index.js +27 -0
  30. package/lib/common/components/index.d.ts +10 -5
  31. package/lib/common/components/index.js +20 -8
  32. package/lib/common/components/locale-intl/index.d.ts +10 -0
  33. package/lib/common/components/locale-intl/index.js +45 -0
  34. package/lib/common/components/payment-method/index.d.ts +6 -3
  35. package/lib/common/components/payment-method/index.js +67 -27
  36. package/lib/common/components/supplier/index.d.ts +6 -0
  37. package/lib/common/components/supplier/index.js +93 -0
  38. package/lib/common/consts/validationRules.d.ts +2 -3
  39. package/lib/common/consts/validationRules.js +1 -8
  40. package/lib/common/enums/index.d.ts +1 -1
  41. package/lib/common/enums/index.js +2 -4
  42. package/lib/common/types/BillingLineMetadataOverride.d.ts +2 -1
  43. package/lib/common/types/ReceiverRequirements.d.ts +81 -0
  44. package/lib/common/types/ReceiverRequirements.js +379 -0
  45. package/lib/create-credit-note/index.d.ts +2 -3
  46. package/lib/create-credit-note/index.js +17 -28
  47. package/lib/create-invoice/index.d.ts +1 -2
  48. package/lib/create-invoice/index.js +79 -21
  49. package/lib/example/src/index.d.ts +1 -1
  50. package/lib/index.d.ts +2 -3
  51. package/lib/index.js +8 -5
  52. package/lib/src/common/components/attachments/Attachment.d.ts +21 -0
  53. package/lib/src/common/components/attachments/index.d.ts +10 -0
  54. package/lib/src/common/components/base-information/ReferenceIdentifiers.d.ts +6 -0
  55. package/lib/src/common/components/base-information/index.d.ts +12 -0
  56. package/lib/src/common/components/billing-lines/BillingCalculations.d.ts +11 -0
  57. package/lib/src/common/components/billing-lines/BillingTaxSummary.d.ts +10 -0
  58. package/lib/src/common/components/billing-lines/billingLIneFormData.d.ts +7 -0
  59. package/lib/src/common/components/billing-lines/index.d.ts +13 -0
  60. package/lib/src/common/components/component-container/Content.d.ts +7 -0
  61. package/lib/src/common/components/component-container/Header.d.ts +9 -0
  62. package/lib/src/common/components/component-container/index.d.ts +10 -0
  63. package/lib/src/common/components/customer/index.d.ts +6 -0
  64. package/lib/src/common/components/delivery-location/index.d.ts +6 -0
  65. package/lib/src/common/components/editable-cell/index.d.ts +11 -0
  66. package/lib/src/common/components/editable-row/index.d.ts +6 -0
  67. package/lib/src/common/components/form-item/index.d.ts +21 -0
  68. package/lib/src/common/components/index.d.ts +10 -0
  69. package/lib/src/common/components/locale-intl/index.d.ts +10 -0
  70. package/lib/src/common/components/payment-method/index.d.ts +6 -0
  71. package/lib/src/common/components/supplier/index.d.ts +6 -0
  72. package/lib/src/common/consts/validationRules.d.ts +6 -0
  73. package/lib/src/common/types/ReceiverRequirements.d.ts +81 -0
  74. package/lib/src/create-invoice/index.d.ts +14 -0
  75. package/lib/src/translations/locales.d.ts +74 -0
  76. package/lib/src/utils/ApiUtility.d.ts +21 -0
  77. package/lib/src/utils/BillingLineUtility.d.ts +8 -0
  78. package/lib/src/utils/ConversionUtility.d.ts +5 -0
  79. package/lib/src/utils/RequirementsUtility.d.ts +5 -0
  80. package/lib/src/utils/billingLineFormData.d.ts +7 -0
  81. package/lib/src/utils/index.d.ts +2 -0
  82. package/lib/style/index.css +0 -1222
  83. package/lib/translations/locales/is.json +70 -0
  84. package/lib/translations/locales.d.ts +74 -0
  85. package/lib/translations/locales.js +10 -0
  86. package/lib/utils/ApiUtility.d.ts +21 -0
  87. package/lib/utils/ApiUtility.js +59 -0
  88. package/lib/utils/BillingLineUtility.d.ts +8 -0
  89. package/lib/utils/BillingLineUtility.js +66 -0
  90. package/lib/utils/ConversionUtility.d.ts +5 -0
  91. package/lib/utils/ConversionUtility.js +146 -0
  92. package/lib/utils/RequirementsUtility.d.ts +5 -0
  93. package/lib/utils/RequirementsUtility.js +23 -0
  94. package/lib/utils/billingLineFormData.d.ts +7 -0
  95. package/lib/utils/billingLineFormData.js +63 -0
  96. package/lib/utils/index.d.ts +2 -5
  97. package/lib/utils/index.js +5 -162
  98. package/package.json +22 -7
  99. package/lib/common/components/issuer/index.d.ts +0 -7
  100. package/lib/common/components/payer/index.d.ts +0 -3
  101. package/lib/common/components/payer/index.js +0 -50
@@ -1,6 +1,4 @@
1
1
  "use strict";
2
- function __export(m) {
3
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
- }
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- __export(require("./DocumentTypeEnum"));
3
+ var DocumentTypeEnum_1 = require("./DocumentTypeEnum");
4
+ exports.DocumentTypeEnum = DocumentTypeEnum_1.default;
@@ -1,4 +1,5 @@
1
- import { BillingLineMetadata, UnitOfMeasureMetadataUnitEnum } from "../../../../npm-unimaze-api-clients/lib/mapi/models";
1
+ import { BillingLineMetadata, UnitOfMeasureMetadataUnitEnum } from "@unimaze/api-clients/lib/mapi/models";
2
2
  export interface BillingLineMetadataOverride extends Omit<BillingLineMetadata, 'unitOfMeasure'> {
3
+ key: number;
3
4
  unitOfMeasure: UnitOfMeasureMetadataUnitEnum;
4
5
  }
@@ -0,0 +1,81 @@
1
+ interface Values {
2
+ key?: string;
3
+ label?: string;
4
+ values?: Values[];
5
+ }
6
+ interface FieldRequirement extends Values {
7
+ isRequired: boolean;
8
+ }
9
+ declare type ReceiverRequirements = {
10
+ [key in AvailableFields]?: FieldRequirement;
11
+ };
12
+ export declare enum AvailableFields {
13
+ "invoiceNo" = "invoiceNo",
14
+ "issueDate" = "issueDate",
15
+ "dueDate" = "dueDate",
16
+ "graceDate" = "graceDate",
17
+ "currencyCode" = "currencyCode",
18
+ "notes" = "notes",
19
+ "accountingCost" = "accountingCost",
20
+ "buyerReference" = "buyerReference",
21
+ "orderReference.documentNo" = "orderReference.documentNo",
22
+ "billingReferences.invoices" = "billingReferences.invoices",
23
+ "billingReferences.documentNo" = "billingReferences.documentNo",
24
+ "billingReferences.issueDate" = "billingReferences.issueDate",
25
+ "billingReferences.creditNotes" = "billingReferences.creditNotes",
26
+ "referenceIdentifiers.type" = "referenceIdentifiers.type",
27
+ "referenceIdentifiers.code" = "referenceIdentifiers.code",
28
+ "referenceIdentifiers.value" = "referenceIdentifiers.value",
29
+ "referenceIdentifiers" = "referenceIdentifiers",
30
+ "supplier.vatNumber" = "supplier.vatNumber",
31
+ "supplier.address.streetNameAndNumber" = "supplier.address.streetNameAndNumber",
32
+ "supplier.address.city" = "supplier.address.city",
33
+ "supplier.address.postalZone" = "supplier.address.postalZone",
34
+ "supplier.address.countryCode" = "supplier.address.countryCode",
35
+ "supplier.contact.name" = "supplier.contact.name",
36
+ "supplier.contact.electronicMail" = "supplier.contact.electronicMail",
37
+ "supplier.contact.telephone" = "supplier.contact.telephone",
38
+ "supplier.name" = "supplier.name",
39
+ "supplier.identifier" = "supplier.identifier",
40
+ "customer.address.streetNameAndNumber" = "customer.address.streetNameAndNumber",
41
+ "customer.address.city" = "customer.address.city",
42
+ "customer.address.postalZone" = "customer.address.postalZone",
43
+ "customer.address.countryCode" = "customer.address.countryCode",
44
+ "customer.contact.name" = "customer.contact.name",
45
+ "customer.contact.electronicMail" = "customer.contact.electronicMail",
46
+ "customer.contact.telephone" = "customer.contact.telephone",
47
+ "customer.name" = "customer.name",
48
+ "customer.identifier" = "customer.identifier",
49
+ "customer.locationIdentifier" = "customer.locationIdentifier",
50
+ "payee.name" = "payee.name",
51
+ "payee.identifier" = "payee.identifier",
52
+ "payee.sepaBankIdentification" = "payee.sepaBankIdentification",
53
+ "invoiceLines.itemNo" = "invoiceLines.itemNo",
54
+ "invoiceLines.name" = "invoiceLines.name",
55
+ "invoiceLines.quantity" = "invoiceLines.quantity",
56
+ "invoiceLines.uniteOfMeasure.unit" = "invoiceLines.unitOfMeasure.unit",
57
+ "invoiceLines.uniteOfMeasure.code" = "invoiceLines.unitOfMeasure.code",
58
+ "invoiceLines.priceAmount" = "invoiceLines.priceAmount",
59
+ "invoiceLines.taxCategoryType" = "invoiceLines.taxCategoryType",
60
+ "invoiceLines.taxableAmount" = "invoiceLines.taxableAmount",
61
+ "invoiceLines.taxAmount" = "invoiceLines.taxAmount",
62
+ "invoiceLines.taxPercentage" = "invoiceLines.taxPercentage",
63
+ "invoiceLines.discountValue" = "invoiceLines.discountValue",
64
+ "paymentTerms.note" = "paymentTerms.note",
65
+ "paymentMeans.type" = "paymentMeans.type",
66
+ "paymentMeans.internationalTransfer" = "paymentMeans.internationalTransfer",
67
+ "paymentMeans.domesticTransfer" = "paymentMeans.domesticTransfer",
68
+ "paymentMeans.domesticClaim" = "paymentMeans.domesticClaim",
69
+ "delivery.partyName" = "delivery.partyName",
70
+ "delivery.locationIdentifier" = "delivery.locationIdentifier",
71
+ "delivery.address.streetNameAndNumber" = "delivery.address.streetNameAndNumber",
72
+ "delivery.address.city" = "delivery.address.city",
73
+ "delivery.address.postalZone" = "delivery.address.postalZone",
74
+ "delivery.address.countryCode" = "delivery.address.countryCode",
75
+ "delivery.actualDeliveryDate" = "delivery.actualDeliveryDate",
76
+ "prepaidAmount" = "prepaidAmount",
77
+ "payableAmount" = "payableAmount",
78
+ "payableRoundingAmount" = "payableRoundingAmount"
79
+ }
80
+ export { ReceiverRequirements, FieldRequirement };
81
+ export declare const receiverRequirementsObject: ReceiverRequirements;
@@ -0,0 +1,379 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var AvailableFields;
4
+ (function (AvailableFields) {
5
+ AvailableFields["invoiceNo"] = "invoiceNo";
6
+ AvailableFields["issueDate"] = "issueDate";
7
+ AvailableFields["dueDate"] = "dueDate";
8
+ AvailableFields["graceDate"] = "graceDate";
9
+ AvailableFields["currencyCode"] = "currencyCode";
10
+ AvailableFields["notes"] = "notes";
11
+ AvailableFields["accountingCost"] = "accountingCost";
12
+ AvailableFields["buyerReference"] = "buyerReference";
13
+ AvailableFields["orderReference.documentNo"] = "orderReference.documentNo";
14
+ AvailableFields["billingReferences.invoices"] = "billingReferences.invoices";
15
+ AvailableFields["billingReferences.documentNo"] = "billingReferences.documentNo";
16
+ AvailableFields["billingReferences.issueDate"] = "billingReferences.issueDate";
17
+ AvailableFields["billingReferences.creditNotes"] = "billingReferences.creditNotes";
18
+ AvailableFields["referenceIdentifiers.type"] = "referenceIdentifiers.type";
19
+ AvailableFields["referenceIdentifiers.code"] = "referenceIdentifiers.code";
20
+ AvailableFields["referenceIdentifiers.value"] = "referenceIdentifiers.value";
21
+ AvailableFields["referenceIdentifiers"] = "referenceIdentifiers";
22
+ AvailableFields["supplier.vatNumber"] = "supplier.vatNumber";
23
+ AvailableFields["supplier.address.streetNameAndNumber"] = "supplier.address.streetNameAndNumber";
24
+ AvailableFields["supplier.address.city"] = "supplier.address.city";
25
+ AvailableFields["supplier.address.postalZone"] = "supplier.address.postalZone";
26
+ AvailableFields["supplier.address.countryCode"] = "supplier.address.countryCode";
27
+ AvailableFields["supplier.contact.name"] = "supplier.contact.name";
28
+ AvailableFields["supplier.contact.electronicMail"] = "supplier.contact.electronicMail";
29
+ AvailableFields["supplier.contact.telephone"] = "supplier.contact.telephone";
30
+ AvailableFields["supplier.name"] = "supplier.name";
31
+ AvailableFields["supplier.identifier"] = "supplier.identifier";
32
+ AvailableFields["customer.address.streetNameAndNumber"] = "customer.address.streetNameAndNumber";
33
+ AvailableFields["customer.address.city"] = "customer.address.city";
34
+ AvailableFields["customer.address.postalZone"] = "customer.address.postalZone";
35
+ AvailableFields["customer.address.countryCode"] = "customer.address.countryCode";
36
+ AvailableFields["customer.contact.name"] = "customer.contact.name";
37
+ AvailableFields["customer.contact.electronicMail"] = "customer.contact.electronicMail";
38
+ AvailableFields["customer.contact.telephone"] = "customer.contact.telephone";
39
+ AvailableFields["customer.name"] = "customer.name";
40
+ AvailableFields["customer.identifier"] = "customer.identifier";
41
+ AvailableFields["customer.locationIdentifier"] = "customer.locationIdentifier";
42
+ AvailableFields["payee.name"] = "payee.name";
43
+ AvailableFields["payee.identifier"] = "payee.identifier";
44
+ AvailableFields["payee.sepaBankIdentification"] = "payee.sepaBankIdentification";
45
+ AvailableFields["invoiceLines.itemNo"] = "invoiceLines.itemNo";
46
+ AvailableFields["invoiceLines.name"] = "invoiceLines.name";
47
+ AvailableFields["invoiceLines.quantity"] = "invoiceLines.quantity";
48
+ AvailableFields["invoiceLines.uniteOfMeasure.unit"] = "invoiceLines.unitOfMeasure.unit";
49
+ AvailableFields["invoiceLines.uniteOfMeasure.code"] = "invoiceLines.unitOfMeasure.code";
50
+ AvailableFields["invoiceLines.priceAmount"] = "invoiceLines.priceAmount";
51
+ AvailableFields["invoiceLines.taxCategoryType"] = "invoiceLines.taxCategoryType";
52
+ AvailableFields["invoiceLines.taxableAmount"] = "invoiceLines.taxableAmount";
53
+ AvailableFields["invoiceLines.taxAmount"] = "invoiceLines.taxAmount";
54
+ AvailableFields["invoiceLines.taxPercentage"] = "invoiceLines.taxPercentage";
55
+ AvailableFields["invoiceLines.discountValue"] = "invoiceLines.discountValue";
56
+ AvailableFields["paymentTerms.note"] = "paymentTerms.note";
57
+ AvailableFields["paymentMeans.type"] = "paymentMeans.type";
58
+ AvailableFields["paymentMeans.internationalTransfer"] = "paymentMeans.internationalTransfer";
59
+ AvailableFields["paymentMeans.domesticTransfer"] = "paymentMeans.domesticTransfer";
60
+ AvailableFields["paymentMeans.domesticClaim"] = "paymentMeans.domesticClaim";
61
+ AvailableFields["delivery.partyName"] = "delivery.partyName";
62
+ AvailableFields["delivery.locationIdentifier"] = "delivery.locationIdentifier";
63
+ AvailableFields["delivery.address.streetNameAndNumber"] = "delivery.address.streetNameAndNumber";
64
+ AvailableFields["delivery.address.city"] = "delivery.address.city";
65
+ AvailableFields["delivery.address.postalZone"] = "delivery.address.postalZone";
66
+ AvailableFields["delivery.address.countryCode"] = "delivery.address.countryCode";
67
+ AvailableFields["delivery.actualDeliveryDate"] = "delivery.actualDeliveryDate";
68
+ AvailableFields["prepaidAmount"] = "prepaidAmount";
69
+ AvailableFields["payableAmount"] = "payableAmount";
70
+ AvailableFields["payableRoundingAmount"] = "payableRoundingAmount";
71
+ })(AvailableFields = exports.AvailableFields || (exports.AvailableFields = {}));
72
+ exports.receiverRequirementsObject = {
73
+ invoiceNo: {
74
+ isRequired: true,
75
+ key: "",
76
+ },
77
+ issueDate: {
78
+ isRequired: true,
79
+ key: "",
80
+ },
81
+ dueDate: {
82
+ isRequired: true,
83
+ key: "",
84
+ },
85
+ graceDate: {
86
+ isRequired: false,
87
+ key: "",
88
+ },
89
+ currencyCode: {
90
+ isRequired: true,
91
+ key: "",
92
+ values: [{
93
+ key: "ISK",
94
+ label: "Icelandic krona (ISK)"
95
+ }]
96
+ },
97
+ notes: {
98
+ isRequired: false,
99
+ key: "",
100
+ },
101
+ accountingCost: {
102
+ isRequired: false,
103
+ key: "",
104
+ },
105
+ buyerReference: {
106
+ isRequired: false,
107
+ key: "",
108
+ },
109
+ "orderReference.documentNo": {
110
+ isRequired: true,
111
+ key: "",
112
+ },
113
+ "billingReferences.invoices": {
114
+ isRequired: false,
115
+ key: "",
116
+ },
117
+ "billingReferences.documentNo": {
118
+ isRequired: true,
119
+ key: "",
120
+ },
121
+ "billingReferences.issueDate": {
122
+ isRequired: false,
123
+ key: "",
124
+ },
125
+ "billingReferences.creditNotes": {
126
+ isRequired: false,
127
+ key: "",
128
+ },
129
+ // "referenceIdentifiers.type": {
130
+ // isRequired: false,
131
+ // key: "",
132
+ // label: "Reference identifier type"
133
+ // },
134
+ // "referenceIdentifiers.code": {
135
+ // isRequired: false,
136
+ // key: "",
137
+ // label: "Reference identifier code"
138
+ // },
139
+ // "referenceIdentifiers.value": {
140
+ // isRequired: true,
141
+ // key: "",
142
+ // label: "Reference identifier value"
143
+ // },
144
+ "referenceIdentifiers": {
145
+ "isRequired": true,
146
+ "key": "",
147
+ "values": [
148
+ {
149
+ "key": "AKY",
150
+ "label": "Bílnúmer",
151
+ "values": [
152
+ {
153
+ "key": "NY753",
154
+ "label": "NY753"
155
+ },
156
+ {
157
+ "key": "IS123"
158
+ },
159
+ {
160
+ "key": "RR888"
161
+ },
162
+ ]
163
+ },
164
+ {
165
+ "key": "SSN",
166
+ "label": "Kennitala" // "Social security number"
167
+ },
168
+ {
169
+ "key": "LOC",
170
+ "label": "Fasteignanúmer",
171
+ "values": [{
172
+ "key": "30909",
173
+ "label": "Mýrargata 26 (30909)"
174
+ },
175
+ {
176
+ "key": "34344",
177
+ "label": "Aragata 1 (34344)"
178
+ },
179
+ ]
180
+ }
181
+ ]
182
+ },
183
+ "supplier.vatNumber": {
184
+ isRequired: true,
185
+ key: "",
186
+ },
187
+ "supplier.address.streetNameAndNumber": {
188
+ isRequired: true,
189
+ key: "",
190
+ },
191
+ "supplier.address.city": {
192
+ isRequired: false,
193
+ key: "",
194
+ },
195
+ "supplier.address.postalZone": {
196
+ isRequired: false,
197
+ key: "",
198
+ },
199
+ "supplier.address.countryCode": {
200
+ isRequired: true,
201
+ key: "",
202
+ },
203
+ "supplier.contact.name": {
204
+ isRequired: false,
205
+ key: "",
206
+ },
207
+ "supplier.contact.electronicMail": {
208
+ isRequired: false,
209
+ key: "",
210
+ },
211
+ "supplier.contact.telephone": {
212
+ isRequired: false,
213
+ key: "",
214
+ },
215
+ "supplier.name": {
216
+ isRequired: true,
217
+ key: "",
218
+ },
219
+ "supplier.identifier": {
220
+ isRequired: true,
221
+ key: "",
222
+ },
223
+ "customer.address.streetNameAndNumber": {
224
+ isRequired: true,
225
+ key: "",
226
+ },
227
+ "customer.address.city": {
228
+ isRequired: false,
229
+ key: "",
230
+ },
231
+ "customer.address.postalZone": {
232
+ isRequired: false,
233
+ key: "",
234
+ },
235
+ "customer.address.countryCode": {
236
+ isRequired: true,
237
+ key: "",
238
+ },
239
+ "customer.contact.name": {
240
+ isRequired: false,
241
+ key: "",
242
+ },
243
+ "customer.contact.electronicMail": {
244
+ isRequired: false,
245
+ key: "",
246
+ },
247
+ "customer.contact.telephone": {
248
+ isRequired: false,
249
+ key: "",
250
+ },
251
+ "customer.name": {
252
+ isRequired: true,
253
+ key: "",
254
+ },
255
+ "customer.identifier": {
256
+ isRequired: true,
257
+ key: "",
258
+ },
259
+ "customer.locationIdentifier": {
260
+ isRequired: false,
261
+ key: "",
262
+ },
263
+ "payee.name": {
264
+ isRequired: true,
265
+ key: "",
266
+ },
267
+ "payee.identifier": {
268
+ isRequired: true,
269
+ key: "",
270
+ },
271
+ "payee.sepaBankIdentification": {
272
+ isRequired: false,
273
+ key: "",
274
+ },
275
+ "invoiceLines.itemNo": {
276
+ isRequired: true,
277
+ key: "",
278
+ },
279
+ "invoiceLines.name": {
280
+ isRequired: true,
281
+ key: "",
282
+ },
283
+ "invoiceLines.quantity": {
284
+ isRequired: true,
285
+ key: "",
286
+ },
287
+ "invoiceLines.unitOfMeasure.unit": {
288
+ isRequired: true,
289
+ key: "",
290
+ },
291
+ "invoiceLines.unitOfMeasure.code": {
292
+ isRequired: true,
293
+ key: "",
294
+ },
295
+ "invoiceLines.priceAmount": {
296
+ isRequired: true,
297
+ key: "",
298
+ },
299
+ "invoiceLines.taxCategoryType": {
300
+ isRequired: true,
301
+ key: "",
302
+ },
303
+ "invoiceLines.taxAmount": {
304
+ isRequired: true,
305
+ key: "",
306
+ },
307
+ "invoiceLines.taxableAmount": {
308
+ isRequired: true,
309
+ key: "",
310
+ },
311
+ "invoiceLines.taxPercentage": {
312
+ isRequired: true,
313
+ key: "",
314
+ },
315
+ "invoiceLines.discountValue": {
316
+ isRequired: true,
317
+ key: "",
318
+ },
319
+ "paymentTerms.note": {
320
+ isRequired: false,
321
+ key: "",
322
+ },
323
+ "paymentMeans.type": {
324
+ isRequired: true,
325
+ key: "",
326
+ },
327
+ "paymentMeans.internationalTransfer": {
328
+ isRequired: false,
329
+ key: "",
330
+ },
331
+ "paymentMeans.domesticTransfer": {
332
+ isRequired: false,
333
+ key: "",
334
+ },
335
+ "paymentMeans.domesticClaim": {
336
+ isRequired: false,
337
+ key: "",
338
+ },
339
+ "delivery.partyName": {
340
+ isRequired: false,
341
+ key: "",
342
+ },
343
+ "delivery.locationIdentifier": {
344
+ isRequired: false,
345
+ key: "",
346
+ },
347
+ "delivery.address.streetNameAndNumber": {
348
+ isRequired: false,
349
+ key: "",
350
+ },
351
+ "delivery.address.city": {
352
+ isRequired: false,
353
+ key: "",
354
+ },
355
+ "delivery.address.postalZone": {
356
+ isRequired: false,
357
+ key: "",
358
+ },
359
+ "delivery.address.countryCode": {
360
+ isRequired: false,
361
+ key: "",
362
+ },
363
+ "delivery.actualDeliveryDate": {
364
+ isRequired: false,
365
+ key: "",
366
+ },
367
+ prepaidAmount: {
368
+ isRequired: false,
369
+ key: "",
370
+ },
371
+ payableAmount: {
372
+ isRequired: false,
373
+ key: "",
374
+ },
375
+ payableRoundingAmount: {
376
+ isRequired: false,
377
+ key: "",
378
+ }
379
+ };
@@ -1,9 +1,8 @@
1
+ import "../style/index.css";
1
2
  import React from "react";
2
- import { CreateCorrectWithCreditRequest } from "@unimaze/api-clients/lib/mapi";
3
3
  import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
4
4
  interface Props {
5
- handleCorrectWithCredit: (createCorrectWithCreditRequest: CreateCorrectWithCreditRequest) => void;
6
- issuer: ProfileOutput;
5
+ customer: ProfileOutput;
7
6
  }
8
7
  declare const CreateInvoice: React.FC<Props>;
9
8
  export default CreateInvoice;
@@ -10,31 +10,23 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
- var __importStar = (this && this.__importStar) || function (mod) {
14
- if (mod && mod.__esModule) return mod;
15
- var result = {};
16
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
17
- result["default"] = mod;
18
- return result;
19
- };
20
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
21
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
22
15
  };
23
16
  Object.defineProperty(exports, "__esModule", { value: true });
24
- var react_1 = __importStar(require("react"));
17
+ require("../style/index.css");
18
+ var react_1 = __importDefault(require("react"));
25
19
  var antd_1 = require("antd");
26
- var payer_1 = __importDefault(require("../common/components/payer"));
27
- var issuer_1 = __importDefault(require("../common/components/issuer"));
28
- var base_information_1 = __importDefault(require("../common/components/base-information"));
29
- var billing_lines_1 = __importDefault(require("../common/components/billing-lines"));
30
- var attachments_1 = __importDefault(require("../common/components/attachments"));
31
- var _a = react_1.useState({
32
- conversationIdentifier: "test",
33
- creditNoteMetadataInput: {},
34
- messageId: "test_mid",
35
- more: false,
36
- services: [],
37
- }), createCorrectWithCreditRequest = _a[0], setCreateCorrectWithCreditRequest = _a[1];
20
+ var components_1 = require("../common/components");
21
+ // const [createCorrectWithCreditRequest, setCreateCorrectWithCreditRequest] = useState<CreateCorrectWithCreditRequest>(
22
+ // {
23
+ // conversationIdentifier: "test",
24
+ // creditNoteMetadataInput: {} as CreditNoteMetadataInput,
25
+ // messageId: "test_mid",
26
+ // more: false,
27
+ // services: [],
28
+ // }
29
+ // );
38
30
  var form = antd_1.Form.useForm()[0];
39
31
  var handleSetBillingLineMetadata = function (formInstance, billingLineMetadata) {
40
32
  formInstance.setFieldsValue({
@@ -60,15 +52,12 @@ var CreateInvoice = function (props) {
60
52
  react_1.default.createElement("h1", null, "Credit note"),
61
53
  react_1.default.createElement(antd_1.Row, { gutter: [16, 16] },
62
54
  react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 12 }, xl: { span: 12 } },
63
- react_1.default.createElement(payer_1.default, null)),
64
- react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 12 }, xl: { span: 12 } },
65
- react_1.default.createElement(issuer_1.default, { issuer: props.issuer })),
55
+ react_1.default.createElement(components_1.Supplier, null)),
56
+ react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 12 }, xl: { span: 12 } }),
66
57
  react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 12 }, xl: { span: 8 } },
67
- react_1.default.createElement(base_information_1.default, { form: form, documentType: "creditNote" })),
68
- react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 24 }, xl: { span: 16 } },
69
- react_1.default.createElement(billing_lines_1.default, { setBillingLineMetadata: handleSetBillingLineMetadata, form: form })),
70
- react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 24 }, xl: { span: 24 } },
71
- react_1.default.createElement(attachments_1.default, null)),
58
+ react_1.default.createElement(components_1.BaseInformation, { form: form, documentType: "creditNote" })),
59
+ react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 24 }, xl: { span: 16 } }),
60
+ react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 24 }, xl: { span: 24 } }),
72
61
  react_1.default.createElement(antd_1.Col, { span: 24 },
73
62
  react_1.default.createElement(antd_1.Button, { type: "primary", htmlType: "submit" }, "Submit")))));
74
63
  };
@@ -1,10 +1,9 @@
1
- import "antd/dist/antd.compact.css";
2
1
  import "../style/index.css";
3
2
  import React from "react";
4
3
  import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
5
4
  import { CommonProps } from "../common/types/CommonProps";
6
5
  interface Props extends CommonProps {
7
- issuer: ProfileOutput;
6
+ customer: ProfileOutput;
8
7
  }
9
8
  /**
10
9
  * Component for creating a form for creating an invoice and submitting it to the MAPI transaction services