@unimaze/billing 0.1.2-rc.4 → 0.1.2-rc.6
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.
- package/README.md +11 -3
- package/lib/common/components/attachments/index.js +2 -2
- package/lib/common/components/base-information/index.js +2 -5
- package/lib/common/components/billing-lines/index.js +4 -9
- package/lib/common/components/customer/index.d.ts +7 -0
- package/lib/common/components/customer/index.js +25 -0
- package/lib/common/components/delivery-location/index.js +2 -5
- package/lib/common/components/index.d.ts +10 -5
- package/lib/common/components/index.js +20 -8
- package/lib/common/components/payer/index.js +1 -1
- package/lib/common/components/payment-method/index.js +2 -5
- package/lib/common/components/supplier/index.d.ts +3 -0
- package/lib/common/components/supplier/index.js +49 -0
- package/lib/common/enums/index.d.ts +1 -1
- package/lib/common/enums/index.js +2 -4
- package/lib/common/types/ReceiverRequirements.d.ts +1 -3
- package/lib/common/types/ReceiverRequirements.js +0 -11
- package/lib/create-credit-note/index.d.ts +1 -2
- package/lib/create-credit-note/index.js +5 -9
- package/lib/create-invoice/index.d.ts +1 -2
- package/lib/create-invoice/index.js +8 -14
- package/lib/example/src/index.d.ts +1 -1
- package/lib/index.js +5 -0
- package/lib/src/common/components/attachments/Attachment.d.ts +15 -0
- package/lib/src/common/components/attachments/index.d.ts +3 -0
- package/lib/src/common/components/customer/index.d.ts +7 -0
- package/lib/src/common/components/index.d.ts +10 -0
- package/lib/src/common/components/issuer/index.d.ts +1 -1
- package/lib/src/common/components/supplier/index.d.ts +3 -0
- package/lib/src/common/types/ReceiverRequirements.d.ts +1 -3
- package/lib/src/create-invoice/index.d.ts +1 -2
- package/lib/src/utils/ConversionUtility.d.ts +1 -1
- package/lib/src/utils/RequirementsUtility.d.ts +3 -0
- package/lib/style/index.css +1268 -1268
- package/lib/utils/ConversionUtility.d.ts +1 -1
- package/lib/utils/ConversionUtility.js +23 -24
- package/lib/utils/RequirementsUtility.d.ts +3 -0
- package/lib/utils/RequirementsUtility.js +13 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InvoiceMetadataInput } from "@unimaze/api-clients/lib/mapi";
|
|
2
2
|
import { Store } from "antd/es/form/interface";
|
|
3
3
|
import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
|
|
4
|
-
declare const convertToInvoiceMetadataInput: (formValues: Store,
|
|
4
|
+
declare const convertToInvoiceMetadataInput: (formValues: Store, customer: ProfileOutput) => InvoiceMetadataInput;
|
|
5
5
|
export { /*convertToCreditNoteMetadataInput,*/ convertToInvoiceMetadataInput };
|
|
@@ -1,52 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var convertToInvoiceMetadataInput = function (formValues,
|
|
3
|
+
var convertToInvoiceMetadataInput = function (formValues, customer) {
|
|
4
4
|
var resp = {
|
|
5
5
|
messageHandling: {
|
|
6
|
-
receiverIdentifier:
|
|
7
|
-
fallbackEmailAddress:
|
|
8
|
-
fallbackContactName:
|
|
6
|
+
receiverIdentifier: formValues.invoice.supplier.identifier,
|
|
7
|
+
fallbackEmailAddress: formValues.invoice.supplier.contact.email,
|
|
8
|
+
fallbackContactName: formValues.invoice.supplier.contact.name,
|
|
9
9
|
},
|
|
10
|
-
// MessageHandling is not part of the form
|
|
11
10
|
invoice: {
|
|
12
|
-
|
|
13
|
-
identifier:
|
|
11
|
+
customer: {
|
|
12
|
+
identifier: customer.participantLegalIsoIdentifier,
|
|
14
13
|
address: {
|
|
15
|
-
streetNameAndNumber:
|
|
16
|
-
postalZone:
|
|
17
|
-
city:
|
|
18
|
-
countryCode:
|
|
14
|
+
streetNameAndNumber: customer.participantLegalAddressStreet,
|
|
15
|
+
postalZone: customer.participantLegalAddressPostalCode,
|
|
16
|
+
city: customer.participantLegalAddressCity,
|
|
17
|
+
countryCode: customer.country,
|
|
19
18
|
countrySubEntity: "",
|
|
20
19
|
addressLine2: "",
|
|
21
20
|
addressLine3: ""
|
|
22
21
|
},
|
|
23
|
-
name:
|
|
24
|
-
vatNumber: "",
|
|
22
|
+
name: customer.name,
|
|
25
23
|
contact: {
|
|
26
|
-
electronicMail:
|
|
24
|
+
electronicMail: customer.email,
|
|
27
25
|
fax: "",
|
|
28
26
|
name: "",
|
|
29
|
-
telephone:
|
|
27
|
+
telephone: customer.phoneNumber
|
|
30
28
|
}
|
|
31
29
|
},
|
|
32
30
|
// Supplier is pre filled, doesnt exist in the form || will be passed to already filled up form
|
|
33
|
-
|
|
34
|
-
identifier: formValues.invoice.
|
|
31
|
+
supplier: {
|
|
32
|
+
identifier: formValues.invoice.supplier.identifier,
|
|
35
33
|
address: {
|
|
36
|
-
streetNameAndNumber: formValues.invoice.
|
|
37
|
-
postalZone: formValues.invoice.
|
|
38
|
-
city: formValues.invoice.
|
|
39
|
-
countryCode: formValues.invoice.
|
|
34
|
+
streetNameAndNumber: formValues.invoice.supplier.address.address,
|
|
35
|
+
postalZone: formValues.invoice.supplier.address.zip,
|
|
36
|
+
city: formValues.invoice.supplier.address.city,
|
|
37
|
+
countryCode: formValues.invoice.supplier.address.country,
|
|
40
38
|
countrySubEntity: "",
|
|
41
39
|
addressLine2: "",
|
|
42
40
|
addressLine3: ""
|
|
43
41
|
// last 3 fileds in address are missing in form
|
|
44
42
|
},
|
|
45
|
-
|
|
43
|
+
vatNumber: "",
|
|
44
|
+
name: formValues.invoice.supplier.name,
|
|
46
45
|
contact: {
|
|
47
|
-
electronicMail: formValues.invoice.
|
|
46
|
+
electronicMail: formValues.invoice.supplier.contact.email,
|
|
48
47
|
fax: "",
|
|
49
|
-
name: formValues.invoice.
|
|
48
|
+
name: formValues.invoice.supplier.contact.name,
|
|
50
49
|
telephone: ""
|
|
51
50
|
// fax, telephone do not exist in form
|
|
52
51
|
},
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AvailableFields, FieldRequirement, ReceiverRequirements } from "../common/types/ReceiverRequirements";
|
|
2
|
+
export declare const getReceiverRequirements: (recRequirements: ReceiverRequirements, key: AvailableFields) => FieldRequirement;
|
|
3
|
+
export declare const getReceiverRequirementsLabelWithDefault: (recRequirements: ReceiverRequirements, key: AvailableFields, defaultLabel: string) => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getReceiverRequirements = function (recRequirements, key) {
|
|
4
|
+
return recRequirements[key];
|
|
5
|
+
};
|
|
6
|
+
exports.getReceiverRequirementsLabelWithDefault = function (recRequirements, key, defaultLabel) {
|
|
7
|
+
if (recRequirements[key].label) {
|
|
8
|
+
return recRequirements[key].label;
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return defaultLabel;
|
|
12
|
+
}
|
|
13
|
+
};
|