@unimaze/billing 0.1.2-rc.2 → 0.1.2-rc.4
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/lib/common/components/attachments/Attachment.js +1 -2
- package/lib/common/components/base-information/index.js +12 -12
- package/lib/common/components/billing-lines/index.d.ts +4 -4
- package/lib/common/components/billing-lines/index.js +12 -18
- package/lib/common/components/component-container/style/index.d.ts +1 -0
- package/lib/common/components/component-container/style/index.js +3 -0
- package/lib/common/components/delivery-location/index.js +4 -4
- package/lib/common/components/editable-cell/index.d.ts +1 -1
- package/lib/common/components/editable-cell/index.js +73 -5
- package/lib/common/components/editable-row/index.d.ts +5 -5
- package/lib/common/components/editable-row/index.js +8 -6
- package/lib/common/components/payer/index.js +10 -9
- package/lib/common/consts/validationRules.d.ts +2 -3
- package/lib/common/types/BillingLineMetadataOverride.d.ts +1 -0
- package/lib/common/types/ReceiverRequirements.d.ts +27 -0
- package/lib/common/types/ReceiverRequirements.js +51 -0
- package/lib/create-credit-note/index.js +1 -3
- package/lib/create-invoice/index.js +18 -9
- package/lib/src/common/components/billing-lines/index.d.ts +4 -4
- package/lib/src/common/components/editable-cell/index.d.ts +1 -1
- package/lib/src/common/components/editable-row/index.d.ts +5 -5
- package/lib/src/common/consts/validationRules.d.ts +2 -3
- package/lib/src/common/types/ReceiverRequirements.d.ts +27 -0
- package/lib/src/utils/ApiUtility.d.ts +14 -0
- package/lib/src/utils/ConversionUtility.d.ts +5 -0
- package/lib/src/utils/index.d.ts +2 -0
- package/lib/style/index.css +1268 -1268
- package/lib/style/index.d.ts +1 -0
- package/lib/style/index.js +3 -0
- package/lib/utils/ApiUtility.js +1 -1
- package/lib/utils/ConversionUtility.d.ts +5 -4
- package/lib/utils/ConversionUtility.js +39 -106
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +1 -2
- package/package.json +5 -3
- package/lib/src/common/components/attachments/Attachment.d.ts +0 -15
- package/lib/src/common/components/attachments/index.d.ts +0 -3
- package/lib/src/create-credit-note/index.d.ts +0 -9
- package/lib/src/index.d.ts +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.css";
|
package/lib/utils/ApiUtility.js
CHANGED
|
@@ -31,7 +31,7 @@ var submitInvoice = function (createSubmitInvoice, mapiBaseUrl, apiKey, callName
|
|
|
31
31
|
};
|
|
32
32
|
exports.submitInvoice = submitInvoice;
|
|
33
33
|
var createOptions = function (apiKey, callName, language) {
|
|
34
|
-
return __assign({ headers: __assign({ "Accept-Language": language ? language : "en" }, (apiKey && { Authorization: "Bearer apikey-" + apiKey })) }, (callName && { cancelToken: getCancelToken(callName) }));
|
|
34
|
+
return __assign({ headers: __assign({ "Accept-Language": language ? language : "en" }, (apiKey && { Authorization: "Bearer apikey-" + window.btoa(apiKey) })) }, (callName && { cancelToken: getCancelToken(callName) }));
|
|
35
35
|
};
|
|
36
36
|
var getCancelToken = function (callName) {
|
|
37
37
|
var cancelTokenSource = window[callName];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { InvoiceMetadataInput } from "@unimaze/api-clients/lib/mapi";
|
|
2
|
+
import { Store } from "antd/es/form/interface";
|
|
3
|
+
import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
|
|
4
|
+
declare const convertToInvoiceMetadataInput: (formValues: Store, issuer: ProfileOutput) => InvoiceMetadataInput;
|
|
5
|
+
export { /*convertToCreditNoteMetadataInput,*/ convertToInvoiceMetadataInput };
|
|
@@ -1,158 +1,91 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var convertToInvoiceMetadataInput = function (formValues) {
|
|
4
|
-
|
|
3
|
+
var convertToInvoiceMetadataInput = function (formValues, issuer) {
|
|
4
|
+
var resp = {
|
|
5
5
|
messageHandling: {
|
|
6
|
-
receiverIdentifier:
|
|
7
|
-
fallbackEmailAddress:
|
|
8
|
-
fallbackContactName:
|
|
6
|
+
receiverIdentifier: issuer.participantLegalIsoIdentifier,
|
|
7
|
+
fallbackEmailAddress: issuer.email,
|
|
8
|
+
fallbackContactName: issuer.name,
|
|
9
9
|
},
|
|
10
|
+
// MessageHandling is not part of the form
|
|
10
11
|
invoice: {
|
|
11
12
|
supplier: {
|
|
12
|
-
identifier:
|
|
13
|
+
identifier: issuer.participantLegalIsoIdentifier,
|
|
13
14
|
address: {
|
|
14
|
-
streetNameAndNumber:
|
|
15
|
-
postalZone:
|
|
16
|
-
city:
|
|
17
|
-
countryCode:
|
|
15
|
+
streetNameAndNumber: issuer.participantLegalAddressStreet,
|
|
16
|
+
postalZone: issuer.participantLegalAddressPostalCode,
|
|
17
|
+
city: issuer.participantLegalAddressCity,
|
|
18
|
+
countryCode: issuer.country,
|
|
18
19
|
countrySubEntity: "",
|
|
19
20
|
addressLine2: "",
|
|
20
21
|
addressLine3: ""
|
|
21
22
|
},
|
|
22
|
-
name:
|
|
23
|
+
name: issuer.name,
|
|
23
24
|
vatNumber: "",
|
|
24
25
|
contact: {
|
|
25
|
-
electronicMail:
|
|
26
|
+
electronicMail: issuer.email,
|
|
26
27
|
fax: "",
|
|
27
28
|
name: "",
|
|
28
|
-
telephone:
|
|
29
|
+
telephone: issuer.phoneNumber
|
|
29
30
|
}
|
|
30
31
|
},
|
|
32
|
+
// Supplier is pre filled, doesnt exist in the form || will be passed to already filled up form
|
|
31
33
|
customer: {
|
|
32
|
-
identifier:
|
|
34
|
+
identifier: formValues.invoice.customer.identifier,
|
|
33
35
|
address: {
|
|
34
|
-
streetNameAndNumber:
|
|
35
|
-
postalZone:
|
|
36
|
-
city:
|
|
37
|
-
countryCode:
|
|
36
|
+
streetNameAndNumber: formValues.invoice.customer.address.address,
|
|
37
|
+
postalZone: formValues.invoice.customer.address.zip,
|
|
38
|
+
city: formValues.invoice.customer.address.city,
|
|
39
|
+
countryCode: formValues.invoice.customer.address.country,
|
|
38
40
|
countrySubEntity: "",
|
|
39
41
|
addressLine2: "",
|
|
40
42
|
addressLine3: ""
|
|
43
|
+
// last 3 fileds in address are missing in form
|
|
41
44
|
},
|
|
42
|
-
name:
|
|
45
|
+
name: formValues.invoice.customer.name,
|
|
43
46
|
contact: {
|
|
44
|
-
electronicMail:
|
|
47
|
+
electronicMail: formValues.invoice.customer.contact.email,
|
|
45
48
|
fax: "",
|
|
46
|
-
name:
|
|
49
|
+
name: formValues.invoice.customer.contact.name,
|
|
47
50
|
telephone: ""
|
|
51
|
+
// fax, telephone do not exist in form
|
|
48
52
|
},
|
|
49
53
|
},
|
|
50
54
|
delivery: {
|
|
51
55
|
actualDeliveryDate: null,
|
|
52
56
|
address: {
|
|
53
|
-
streetNameAndNumber:
|
|
57
|
+
streetNameAndNumber: formValues.invoice.delivery.address.address,
|
|
54
58
|
postalZone: "",
|
|
55
|
-
city:
|
|
59
|
+
city: formValues.invoice.delivery.address.city,
|
|
56
60
|
countryCode: "",
|
|
57
61
|
countrySubEntity: "",
|
|
58
62
|
addressLine2: "",
|
|
59
63
|
addressLine3: ""
|
|
64
|
+
// Country code, postalZone, country sub entry, address2 and 3 missing from the form
|
|
60
65
|
},
|
|
61
|
-
locationIdentifier:
|
|
66
|
+
locationIdentifier: formValues.invoice.delivery.locationIdentifier,
|
|
62
67
|
partyName: ""
|
|
68
|
+
// partyName and actualDeliveryData are missing from the form
|
|
69
|
+
// Description is missing from convertToInvoiceMetadataInput but present in the form
|
|
63
70
|
},
|
|
64
|
-
issueDate:
|
|
71
|
+
issueDate: formValues.invoice.issueDate,
|
|
65
72
|
dueDate: null,
|
|
66
|
-
invoiceNo:
|
|
73
|
+
invoiceNo: formValues.invoice.invoiceNo,
|
|
67
74
|
paymentTerms: {
|
|
68
75
|
note: ""
|
|
69
76
|
},
|
|
70
|
-
|
|
77
|
+
// Payment terms doesnt exist in form
|
|
78
|
+
currencyCode: formValues.invoice.currency,
|
|
71
79
|
invoiceLines: [],
|
|
72
|
-
notes:
|
|
80
|
+
notes: formValues.invoice.notes,
|
|
73
81
|
payableAmount: 0,
|
|
74
82
|
orderReference: {
|
|
75
83
|
documentNo: "",
|
|
76
84
|
},
|
|
77
85
|
}
|
|
78
86
|
};
|
|
87
|
+
// tslint:disable-next-line:no-console
|
|
88
|
+
console.log(resp);
|
|
89
|
+
return resp;
|
|
79
90
|
};
|
|
80
91
|
exports.convertToInvoiceMetadataInput = convertToInvoiceMetadataInput;
|
|
81
|
-
var convertToCreditNoteMetadataInput = function (formValues) {
|
|
82
|
-
return {
|
|
83
|
-
messageHandling: {
|
|
84
|
-
receiverIdentifier: "",
|
|
85
|
-
fallbackEmailAddress: "",
|
|
86
|
-
fallbackContactName: "",
|
|
87
|
-
},
|
|
88
|
-
creditNote: {
|
|
89
|
-
supplier: {
|
|
90
|
-
identifier: "",
|
|
91
|
-
address: {
|
|
92
|
-
streetNameAndNumber: "",
|
|
93
|
-
postalZone: "",
|
|
94
|
-
city: "",
|
|
95
|
-
countryCode: "",
|
|
96
|
-
countrySubEntity: "",
|
|
97
|
-
addressLine2: "",
|
|
98
|
-
addressLine3: ""
|
|
99
|
-
},
|
|
100
|
-
name: "",
|
|
101
|
-
vatNumber: "",
|
|
102
|
-
contact: {
|
|
103
|
-
electronicMail: "",
|
|
104
|
-
fax: "",
|
|
105
|
-
name: "",
|
|
106
|
-
telephone: ""
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
customer: {
|
|
110
|
-
identifier: "",
|
|
111
|
-
address: {
|
|
112
|
-
streetNameAndNumber: "",
|
|
113
|
-
postalZone: "",
|
|
114
|
-
city: "",
|
|
115
|
-
countryCode: "",
|
|
116
|
-
countrySubEntity: "",
|
|
117
|
-
addressLine2: "",
|
|
118
|
-
addressLine3: ""
|
|
119
|
-
},
|
|
120
|
-
name: "",
|
|
121
|
-
contact: {
|
|
122
|
-
electronicMail: "",
|
|
123
|
-
fax: "",
|
|
124
|
-
name: "",
|
|
125
|
-
telephone: ""
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
delivery: {
|
|
129
|
-
actualDeliveryDate: null,
|
|
130
|
-
address: {
|
|
131
|
-
streetNameAndNumber: "",
|
|
132
|
-
postalZone: "",
|
|
133
|
-
city: "",
|
|
134
|
-
countryCode: "",
|
|
135
|
-
countrySubEntity: "",
|
|
136
|
-
addressLine2: "",
|
|
137
|
-
addressLine3: ""
|
|
138
|
-
},
|
|
139
|
-
locationIdentifier: "",
|
|
140
|
-
partyName: ""
|
|
141
|
-
},
|
|
142
|
-
issueDate: new Date(),
|
|
143
|
-
creditNoteNo: "",
|
|
144
|
-
currencyCode: "",
|
|
145
|
-
creditNoteLines: [],
|
|
146
|
-
notes: "",
|
|
147
|
-
payableAmount: 0,
|
|
148
|
-
orderReference: {
|
|
149
|
-
documentNo: "",
|
|
150
|
-
},
|
|
151
|
-
billingReferences: {
|
|
152
|
-
invoices: [],
|
|
153
|
-
creditNotes: [],
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
exports.convertToCreditNoteMetadataInput = convertToCreditNoteMetadataInput;
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { convertToInvoiceMetadataInput
|
|
1
|
+
export { convertToInvoiceMetadataInput } from "./ConversionUtility";
|
|
2
2
|
export { submitInvoice, CreateSubmitInvoice } from "./ApiUtility";
|
package/lib/utils/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var ConversionUtility_1 = require("./ConversionUtility");
|
|
4
|
-
exports.convertToInvoiceMetadataInput = ConversionUtility_1.convertToInvoiceMetadataInput;
|
|
5
|
-
exports.convertToCreditNoteMetadataInput = ConversionUtility_1.convertToCreditNoteMetadataInput;
|
|
4
|
+
exports.convertToInvoiceMetadataInput = ConversionUtility_1.convertToInvoiceMetadataInput; /*, convertToCreditNoteMetadataInput*/
|
|
6
5
|
var ApiUtility_1 = require("./ApiUtility");
|
|
7
6
|
exports.submitInvoice = ApiUtility_1.submitInvoice;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unimaze/billing",
|
|
3
|
-
"version": "0.1.2-rc.
|
|
3
|
+
"version": "0.1.2-rc.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@ant-design/compatible": "latest",
|
|
12
12
|
"@unimaze/api-clients": "^1.1.0",
|
|
13
|
-
"react-hot-loader": "^4.12.20"
|
|
13
|
+
"react-hot-loader": "^4.12.20",
|
|
14
|
+
"uuid": "latest"
|
|
14
15
|
},
|
|
15
16
|
"devDependencies": {
|
|
16
17
|
"@hot-loader/react-dom": "^16.13.0+4.12.20",
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
"@types/react": "16.9.34",
|
|
19
20
|
"@types/react-dom": "16.9.7",
|
|
20
21
|
"@types/react-intl": "^3.0.0",
|
|
22
|
+
"@types/uuid": "latest",
|
|
21
23
|
"antd": "4.3.3",
|
|
22
24
|
"awesome-typescript-loader": "^5.2.1",
|
|
23
25
|
"axios": "^0.19.2",
|
|
@@ -87,6 +89,6 @@
|
|
|
87
89
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
88
90
|
"repository": {
|
|
89
91
|
"type": "git",
|
|
90
|
-
"url": "https://bitbucket.org/unimaze/
|
|
92
|
+
"url": "https://bitbucket.org/unimaze/unimaze-billing.git"
|
|
91
93
|
}
|
|
92
94
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import '@ant-design/compatible/assets/index.css';
|
|
3
|
-
interface Props {
|
|
4
|
-
fieldName: string;
|
|
5
|
-
}
|
|
6
|
-
interface States {
|
|
7
|
-
file: any[];
|
|
8
|
-
}
|
|
9
|
-
declare class Attachment extends React.Component<Props, States> {
|
|
10
|
-
constructor(props: Props);
|
|
11
|
-
handleRemoveFile: () => void;
|
|
12
|
-
normFile: (e: any) => any;
|
|
13
|
-
render(): JSX.Element;
|
|
14
|
-
}
|
|
15
|
-
export default Attachment;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "antd/dist/antd.compact.css";
|
|
2
|
-
import "../style/index.css";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
|
|
5
|
-
interface Props {
|
|
6
|
-
issuer: ProfileOutput;
|
|
7
|
-
}
|
|
8
|
-
declare const CreateInvoice: React.FC<Props>;
|
|
9
|
-
export default CreateInvoice;
|
package/lib/src/index.d.ts
DELETED