@unimaze/billing 0.5.0-sjova.0 → 0.6.0-rc.0

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 (71) hide show
  1. package/lib/common/components/base-information/ReferenceIdentifiers.d.ts +8 -2
  2. package/lib/common/components/base-information/ReferenceIdentifiers.js +100 -25
  3. package/lib/common/components/base-information/index.d.ts +5 -1
  4. package/lib/common/components/base-information/index.js +28 -71
  5. package/lib/common/components/billing-lines/NewBillingLines.d.ts +3 -1
  6. package/lib/common/components/billing-lines/NewBillingLines.js +8 -8
  7. package/lib/common/components/customer/index.d.ts +3 -1
  8. package/lib/common/components/customer/index.js +1 -1
  9. package/lib/common/components/delivery-location/index.d.ts +6 -2
  10. package/lib/common/components/delivery-location/index.js +5 -24
  11. package/lib/common/components/form-item/index.d.ts +4 -2
  12. package/lib/common/components/form-item/index.js +3 -4
  13. package/lib/common/components/payment-method/index.d.ts +3 -1
  14. package/lib/common/components/payment-method/index.js +60 -24
  15. package/lib/common/components/supplier/index.d.ts +3 -1
  16. package/lib/common/components/supplier/index.js +9 -45
  17. package/lib/common/types/AppConfiguration.d.ts +11 -1
  18. package/lib/common/types/CommonProps.d.ts +3 -0
  19. package/lib/common/types/NewReceiverRequirements.d.ts +25 -0
  20. package/lib/common/types/NewReceiverRequirements.js +2 -0
  21. package/lib/common/types/ReceiverRequirements.d.ts +0 -1
  22. package/lib/common/types/ReceiverRequirements.js +318 -310
  23. package/lib/create-credit-note/index.d.ts +4 -3
  24. package/lib/create-credit-note/index.js +1 -1
  25. package/lib/create-invoice/IntlLoader.js +1 -1
  26. package/lib/create-invoice/index.d.ts +1 -1
  27. package/lib/create-invoice/index.js +28 -8
  28. package/lib/example/src/index.d.ts +1 -0
  29. package/lib/src/common/components/attachments/Attachment.d.ts +18 -0
  30. package/lib/src/common/components/attachments/index.d.ts +6 -0
  31. package/lib/src/common/components/base-information/ReferenceIdentifiers.d.ts +18 -0
  32. package/lib/src/common/components/base-information/index.d.ts +13 -0
  33. package/lib/src/common/components/billing-lines/BillingCalculations.d.ts +11 -0
  34. package/lib/src/common/components/billing-lines/BillingTaxSummary.d.ts +10 -0
  35. package/lib/src/common/components/billing-lines/index.d.ts +28 -0
  36. package/lib/src/common/components/component-container/Content.d.ts +7 -0
  37. package/lib/src/common/components/component-container/Header.d.ts +9 -0
  38. package/lib/src/common/components/component-container/index.d.ts +11 -0
  39. package/lib/src/common/components/customer/index.d.ts +18 -0
  40. package/lib/src/common/components/delivery-location/index.d.ts +10 -0
  41. package/lib/src/common/components/editable-cell/index.d.ts +15 -0
  42. package/lib/src/common/components/editable-row/index.d.ts +5 -0
  43. package/lib/src/common/components/form-item/index.d.ts +28 -0
  44. package/lib/src/common/components/index.d.ts +10 -0
  45. package/lib/src/common/components/payment-method/index.d.ts +11 -0
  46. package/lib/src/common/components/payment-method/paymentMethodForConversion.d.ts +9 -0
  47. package/lib/src/common/components/supplier/index.d.ts +12 -0
  48. package/lib/src/common/consts/formLayout.d.ts +74 -0
  49. package/lib/src/common/consts/validationRules.d.ts +6 -0
  50. package/lib/src/common/types/ReceiverRequirements.d.ts +80 -0
  51. package/lib/src/create-invoice/IntlLoader.d.ts +14 -0
  52. package/lib/src/create-invoice/index.d.ts +11 -0
  53. package/lib/src/translations/locales.d.ts +142 -0
  54. package/lib/src/utils/ApiUtility.d.ts +21 -0
  55. package/lib/src/utils/BillingLineUtility.d.ts +10 -0
  56. package/lib/src/utils/ConversionUtility.d.ts +8 -0
  57. package/lib/src/utils/IntlUtility.d.ts +4 -0
  58. package/lib/src/utils/RequirementsUtility.d.ts +6 -0
  59. package/lib/src/utils/index.d.ts +2 -0
  60. package/lib/translations/locales/is.json +3 -3
  61. package/lib/translations/locales.d.ts +3 -3
  62. package/lib/utils/BillingLineUtility.d.ts +1 -1
  63. package/lib/utils/ReferenceIdentifierUtility.d.ts +6 -0
  64. package/lib/utils/ReferenceIdentifierUtility.js +24 -0
  65. package/lib/utils/RequirementsUtility.d.ts +5 -4
  66. package/lib/utils/RequirementsUtility.js +42 -17
  67. package/package.json +2 -2
  68. package/lib/utils/FileUploadUtility.d.ts +0 -7
  69. package/lib/utils/FileUploadUtility.js +0 -26
  70. package/lib/utils/FormatingUtility.d.ts +0 -2
  71. package/lib/utils/FormatingUtility.js +0 -6
@@ -69,313 +69,321 @@ var AvailableFields;
69
69
  AvailableFields["payableAmount"] = "payableAmount";
70
70
  AvailableFields["payableRoundingAmount"] = "payableRoundingAmount";
71
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
- label: "Íslensk króna (ISK)"
96
- }]
97
- },
98
- notes: {
99
- isRequired: false,
100
- key: "",
101
- },
102
- accountingCost: {
103
- isRequired: false,
104
- key: "",
105
- },
106
- buyerReference: {
107
- isRequired: true,
108
- key: "",
109
- label: "Tjónsnúmer / Tilvísun kaupanda" // Claim number / Buyer reference
110
- },
111
- "orderReference.documentNo": {
112
- isRequired: true,
113
- key: "",
114
- },
115
- "billingReferences.invoices": {
116
- isRequired: false,
117
- key: "",
118
- },
119
- "billingReferences.documentNo": {
120
- isRequired: true,
121
- key: "",
122
- },
123
- "billingReferences.issueDate": {
124
- isRequired: false,
125
- key: "",
126
- },
127
- "billingReferences.creditNotes": {
128
- isRequired: false,
129
- key: "",
130
- },
131
- // "referenceIdentifiers.type": {
132
- // isRequired: false,
133
- // key: "",
134
- // label: "Reference identifier type"
135
- // },
136
- // "referenceIdentifiers.code": {
137
- // isRequired: false,
138
- // key: "",
139
- // label: "Reference identifier code"
140
- // },
141
- // "referenceIdentifiers.value": {
142
- // isRequired: true,
143
- // key: "",
144
- // label: "Reference identifier value"
145
- // },
146
- "referenceIdentifiers": {
147
- "isRequired": true,
148
- "key": "",
149
- "values": [
150
- {
151
- "key": "AKY",
152
- "label": "Bílnúmer",
153
- "values": [
154
- {
155
- "key": "NY753",
156
- "label": "NY753"
157
- },
158
- {
159
- "key": "IS123"
160
- },
161
- {
162
- "key": "RR888"
163
- },
164
- ]
165
- },
166
- {
167
- "key": "ARR",
168
- "label": "Kennitala" // "Social security number"
169
- },
170
- {
171
- "key": "LOC",
172
- "label": "Fasteignanúmer",
173
- "values": [{
174
- "key": "30909",
175
- "label": "Mýrargata 26 (30909)"
176
- },
177
- {
178
- "key": "34344",
179
- "label": "Aragata 1 (34344)"
180
- },
181
- ]
182
- }
183
- ]
184
- },
185
- "supplier.vatNumber": {
186
- isRequired: false,
187
- key: "",
188
- },
189
- "supplier.address.streetNameAndNumber": {
190
- isRequired: true,
191
- key: "",
192
- },
193
- "supplier.address.city": {
194
- isRequired: false,
195
- key: "",
196
- },
197
- "supplier.address.postalZone": {
198
- isRequired: false,
199
- key: "",
200
- },
201
- "supplier.address.countryCode": {
202
- isRequired: true,
203
- key: "",
204
- },
205
- "supplier.contact.name": {
206
- isRequired: false,
207
- key: "",
208
- },
209
- "supplier.contact.electronicMail": {
210
- isRequired: false,
211
- key: "",
212
- },
213
- "supplier.contact.telephone": {
214
- isRequired: false,
215
- key: "",
216
- },
217
- "supplier.name": {
218
- isRequired: true,
219
- key: "",
220
- },
221
- "supplier.identifier": {
222
- isRequired: true,
223
- key: "",
224
- },
225
- "customer.address.streetNameAndNumber": {
226
- isRequired: true,
227
- key: "",
228
- },
229
- "customer.address.city": {
230
- isRequired: false,
231
- key: "",
232
- },
233
- "customer.address.postalZone": {
234
- isRequired: false,
235
- key: "",
236
- },
237
- "customer.address.countryCode": {
238
- isRequired: true,
239
- key: "",
240
- },
241
- "customer.contact.name": {
242
- isRequired: false,
243
- key: "",
244
- },
245
- "customer.contact.electronicMail": {
246
- isRequired: false,
247
- key: "",
248
- },
249
- "customer.contact.telephone": {
250
- isRequired: false,
251
- key: "",
252
- },
253
- "customer.name": {
254
- isRequired: true,
255
- key: "",
256
- },
257
- "customer.identifier": {
258
- isRequired: true,
259
- key: "",
260
- },
261
- "customer.locationIdentifier": {
262
- isRequired: false,
263
- key: "",
264
- },
265
- "payee.name": {
266
- isRequired: true,
267
- key: "",
268
- },
269
- "payee.identifier": {
270
- isRequired: true,
271
- key: "",
272
- },
273
- "payee.sepaBankIdentification": {
274
- isRequired: false,
275
- key: "",
276
- },
277
- "invoiceLines.itemNo": {
278
- isRequired: true,
279
- key: "",
280
- },
281
- "invoiceLines.name": {
282
- isRequired: true,
283
- key: "",
284
- },
285
- "invoiceLines.quantity": {
286
- isRequired: true,
287
- key: "",
288
- },
289
- "invoiceLines.unitOfMeasure.unit": {
290
- isRequired: true,
291
- key: "",
292
- },
293
- "invoiceLines.unitOfMeasure.code": {
294
- isRequired: true,
295
- key: "",
296
- },
297
- "invoiceLines.unitPriceAmount": {
298
- isRequired: true,
299
- key: "",
300
- },
301
- "invoiceLines.taxCategoryType": {
302
- isRequired: true,
303
- key: "",
304
- },
305
- "invoiceLines.taxAmount": {
306
- isRequired: true,
307
- key: "",
308
- },
309
- "invoiceLines.taxableAmount": {
310
- isRequired: true,
311
- key: "",
312
- },
313
- "invoiceLines.taxPercentage": {
314
- isRequired: true,
315
- key: "",
316
- },
317
- "invoiceLines.discountValue": {
318
- isRequired: true,
319
- key: "",
320
- },
321
- "paymentTerms.note": {
322
- isRequired: false,
323
- key: "",
324
- },
325
- "paymentMeans.type": {
326
- isRequired: true,
327
- key: "",
328
- },
329
- "paymentMeans.internationalTransfer": {
330
- isRequired: false,
331
- key: "",
332
- },
333
- "paymentMeans.domesticTransfer": {
334
- isRequired: false,
335
- key: "",
336
- },
337
- "paymentMeans.domesticClaim": {
338
- isRequired: false,
339
- key: "",
340
- },
341
- "delivery.partyName": {
342
- isRequired: false,
343
- key: "",
344
- },
345
- "delivery.locationIdentifier": {
346
- isRequired: false,
347
- key: "",
348
- },
349
- "delivery.address.streetNameAndNumber": {
350
- isRequired: false,
351
- key: "",
352
- },
353
- "delivery.address.city": {
354
- isRequired: false,
355
- key: "",
356
- },
357
- "delivery.address.postalZone": {
358
- isRequired: false,
359
- key: "",
360
- },
361
- "delivery.address.countryCode": {
362
- isRequired: false,
363
- key: "",
364
- },
365
- "delivery.actualDeliveryDate": {
366
- isRequired: false,
367
- key: "",
368
- },
369
- prepaidAmount: {
370
- isRequired: false,
371
- key: "",
372
- },
373
- payableAmount: {
374
- isRequired: false,
375
- key: "",
376
- },
377
- payableRoundingAmount: {
378
- isRequired: false,
379
- key: "",
380
- }
381
- };
72
+ // export const receiverRequirementsObject: ReceiverRequirements = {
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
+ // label: "Íslensk króna (ISK)"
96
+ // }]
97
+ // },
98
+ // notes: {
99
+ // isRequired: false,
100
+ // key: "",
101
+ // },
102
+ // accountingCost: {
103
+ // isRequired: false,
104
+ // key: "",
105
+ // },
106
+ // buyerReference: {
107
+ // isRequired: true,
108
+ // key: "",
109
+ // label: "Tjónsnúmer / Tilvísun kaupanda" // Claim number / Buyer reference
110
+ // },
111
+ // "orderReference.documentNo": {
112
+ // isRequired: true,
113
+ // key: "",
114
+ // },
115
+ // "billingReferences.invoices": {
116
+ // isRequired: false,
117
+ // key: "",
118
+ // },
119
+ // "billingReferences.documentNo": {
120
+ // isRequired: true,
121
+ // key: "",
122
+ // },
123
+ // "billingReferences.issueDate": {
124
+ // isRequired: false,
125
+ // key: "",
126
+ // },
127
+ // "billingReferences.creditNotes": {
128
+ // isRequired: false,
129
+ // key: "",
130
+ // },
131
+ // // "referenceIdentifiers.type": {
132
+ // // isRequired: false,
133
+ // // key: "",
134
+ // // label: "Reference identifier type"
135
+ // // },
136
+ // // "referenceIdentifiers.code": {
137
+ // // isRequired: false,
138
+ // // key: "",
139
+ // // label: "Reference identifier code"
140
+ // // },
141
+ // // "referenceIdentifiers.value": {
142
+ // // isRequired: true,
143
+ // // key: "",
144
+ // // label: "Reference identifier value"
145
+ // // },
146
+ // "referenceIdentifiers": {
147
+ // "isRequired": true,
148
+ // "key": "",
149
+ // "values": [
150
+ // {
151
+ // "key": "AKY",
152
+ // "label": "Bílnúmer",
153
+ // "values": [
154
+ // {
155
+ // "key": "NY753",
156
+ // "label": "NY753"
157
+ // }, // displaed as "NY753"
158
+ // {
159
+ // "key": "IS123"
160
+ // }, // display key
161
+ // {
162
+ // "key": "RR888"
163
+ // }, // display key
164
+ // ]
165
+ // },
166
+ // {
167
+ // "key": "ARR", // WAS SSN!!!!
168
+ // "label": "Kennitala" // "Social security number"
169
+ // },
170
+ // {
171
+ // "key": "LOC",
172
+ // "label": "Fasteignanúmer", // Place or location identifier
173
+ // "values": [{
174
+ // "key": "30909",
175
+ // "label": "Mýrargata 26 (30909)"
176
+ // }, // displayed as "Mýrargata 26 (30909)"
177
+ // {
178
+ // "key": "34344",
179
+ // "label": "Aragata 1 (34344)"
180
+ // }, // displayed as "Aragata (34344)"
181
+ // ]
182
+ // }
183
+ // ]
184
+ // },
185
+ //
186
+ // "supplier.vatNumber": {
187
+ // isRequired: false, // NBNB: this is by request from Sjova, but as the VAT number is required in model validation, we are inserting N/A if this field is empty
188
+ // key: "",
189
+ // },
190
+ // "supplier.address.streetNameAndNumber": {
191
+ // isRequired: true,
192
+ // key: "",
193
+ // },
194
+ // "supplier.address.city": {
195
+ // isRequired: false,
196
+ // key: "",
197
+ // },
198
+ // "supplier.address.postalZone": {
199
+ // isRequired: false,
200
+ // key: "",
201
+ // },
202
+ // "supplier.address.countryCode": {
203
+ // isRequired: true,
204
+ // key: "",
205
+ // },
206
+ // "supplier.contact.name": {
207
+ // isRequired: false,
208
+ // key: "",
209
+ // },
210
+ // "supplier.contact.electronicMail": {
211
+ // isRequired: false,
212
+ // key: "",
213
+ // },
214
+ // "supplier.contact.telephone": {
215
+ // isRequired: false,
216
+ // key: "",
217
+ // },
218
+ // "supplier.name": {
219
+ // isRequired: true,
220
+ // key: "",
221
+ // },
222
+ // "supplier.identifier": {
223
+ // isRequired: true,
224
+ // key: "",
225
+ // },
226
+ //
227
+ // "customer.address.streetNameAndNumber": {
228
+ // isRequired: true,
229
+ // key: "",
230
+ // },
231
+ // "customer.address.city": {
232
+ // isRequired: false,
233
+ // key: "",
234
+ // },
235
+ // "customer.address.postalZone": {
236
+ // isRequired: false,
237
+ // key: "",
238
+ // },
239
+ // "customer.address.countryCode": {
240
+ // isRequired: true,
241
+ // key: "",
242
+ // },
243
+ // "customer.contact.name": {
244
+ // isRequired: false,
245
+ // key: "",
246
+ // },
247
+ // "customer.contact.electronicMail": {
248
+ // isRequired: false,
249
+ // key: "",
250
+ // },
251
+ // "customer.contact.telephone": {
252
+ // isRequired: false,
253
+ // key: "",
254
+ // },
255
+ // "customer.name": {
256
+ // isRequired: true,
257
+ // key: "",
258
+ // },
259
+ // "customer.identifier": {
260
+ // isRequired: true,
261
+ // key: "",
262
+ // },
263
+ // "customer.locationIdentifier": {
264
+ // isRequired: false,
265
+ // key: "",
266
+ // },
267
+ //
268
+ // "payee.name": {
269
+ // isRequired: true,
270
+ // key: "",
271
+ // },
272
+ // "payee.identifier": {
273
+ // isRequired: true,
274
+ // key: "",
275
+ // },
276
+ // "payee.sepaBankIdentification": {
277
+ // isRequired: false,
278
+ // key: "",
279
+ // },
280
+ //
281
+ // "invoiceLines.itemNo": {
282
+ // isRequired: true,
283
+ // key: "",
284
+ // },
285
+ // "invoiceLines.name": {
286
+ // isRequired: true,
287
+ // key: "",
288
+ // },
289
+ // "invoiceLines.quantity": {
290
+ // isRequired: true,
291
+ // key: "",
292
+ // },
293
+ // "invoiceLines.unitOfMeasure.unit": {
294
+ // isRequired: true,
295
+ // key: "",
296
+ // },
297
+ // "invoiceLines.unitOfMeasure.code": {
298
+ // isRequired: true,
299
+ // key: "",
300
+ // },
301
+ // "invoiceLines.unitPriceAmount": {
302
+ // isRequired: true,
303
+ // key: "",
304
+ // },
305
+ // "invoiceLines.taxCategoryType": {
306
+ // isRequired: true,
307
+ // key: "",
308
+ // },
309
+ // "invoiceLines.taxAmount": {
310
+ // isRequired: true,
311
+ // key: "",
312
+ // },
313
+ // "invoiceLines.taxableAmount": {
314
+ // isRequired: true,
315
+ // key: "",
316
+ // },
317
+ // "invoiceLines.taxPercentage": {
318
+ // isRequired: true,
319
+ // key: "",
320
+ // },
321
+ // "invoiceLines.discountValue": {
322
+ // isRequired: true,
323
+ // key: "",
324
+ // },
325
+ //
326
+ // "paymentTerms.note": {
327
+ // isRequired: false,
328
+ // key: "",
329
+ // },
330
+ // "paymentMeans.type": {
331
+ // isRequired: true,
332
+ // key: "",
333
+ // },
334
+ //
335
+ // "paymentMeans.internationalTransfer": {
336
+ // isRequired: false,
337
+ // key: "",
338
+ // },
339
+ // "paymentMeans.domesticTransfer": {
340
+ // isRequired: false,
341
+ // key: "",
342
+ // },
343
+ // "paymentMeans.domesticClaim": {
344
+ // isRequired: false,
345
+ // key: "",
346
+ // },
347
+ //
348
+ // "delivery.partyName": {
349
+ // isRequired: false,
350
+ // key: "",
351
+ // },
352
+ // "delivery.locationIdentifier": {
353
+ // isRequired: false,
354
+ // key: "",
355
+ // },
356
+ // "delivery.address.streetNameAndNumber": {
357
+ // isRequired: false, // ??
358
+ // key: "",
359
+ // },
360
+ // "delivery.address.city": {
361
+ // isRequired: false,
362
+ // key: "",
363
+ // },
364
+ // "delivery.address.postalZone": {
365
+ // isRequired: false,
366
+ // key: "",
367
+ // },
368
+ // "delivery.address.countryCode": {
369
+ // isRequired: false, // ??
370
+ // key: "",
371
+ // },
372
+ // "delivery.actualDeliveryDate": {
373
+ // isRequired: false,
374
+ // key: "",
375
+ // },
376
+ //
377
+ // prepaidAmount: {
378
+ // isRequired: false,
379
+ // key: "",
380
+ // },
381
+ // payableAmount: {
382
+ // isRequired: false,
383
+ // key: "",
384
+ // },
385
+ // payableRoundingAmount: {
386
+ // isRequired: false,
387
+ // key: "",
388
+ // }
389
+ // };
@@ -1,8 +1,9 @@
1
1
  import "../style/index.css";
2
2
  import React from "react";
3
- import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
4
- interface Props {
5
- customer: ProfileOutput;
3
+ import { CommonProps } from "../common/types/CommonProps";
4
+ import { ProfileOutputWithApiKey } from "../common/types/AppConfiguration";
5
+ interface Props extends CommonProps {
6
+ customer: ProfileOutputWithApiKey;
6
7
  }
7
8
  declare const CreateInvoice: React.FC<Props>;
8
9
  export default CreateInvoice;