@powerhousedao/contributor-billing 0.0.11 → 0.0.13
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/dist/document-models/invoice/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/document-model.js +14 -36
- package/dist/document-models/invoice/gen/general/actions.d.ts +2 -5
- package/dist/document-models/invoice/gen/general/actions.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/general/creators.d.ts +2 -5
- package/dist/document-models/invoice/gen/general/creators.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/general/creators.js +0 -3
- package/dist/document-models/invoice/gen/general/object.d.ts +1 -4
- package/dist/document-models/invoice/gen/general/object.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/general/object.js +1 -10
- package/dist/document-models/invoice/gen/general/operations.d.ts +1 -4
- package/dist/document-models/invoice/gen/general/operations.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/items/actions.d.ts +3 -2
- package/dist/document-models/invoice/gen/items/actions.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/items/creators.d.ts +3 -2
- package/dist/document-models/invoice/gen/items/creators.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/items/creators.js +1 -0
- package/dist/document-models/invoice/gen/items/object.d.ts +2 -1
- package/dist/document-models/invoice/gen/items/object.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/items/object.js +4 -1
- package/dist/document-models/invoice/gen/items/operations.d.ts +2 -1
- package/dist/document-models/invoice/gen/items/operations.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/reducer.js +4 -12
- package/dist/document-models/invoice/gen/schema/types.d.ts +14 -17
- package/dist/document-models/invoice/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/schema/zod.d.ts +3 -5
- package/dist/document-models/invoice/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/schema/zod.js +19 -26
- package/dist/document-models/invoice/gen/utils.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/utils.js +2 -1
- package/dist/document-models/invoice/index.d.ts +1 -3
- package/dist/document-models/invoice/index.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/general.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/general.js +1 -40
- package/dist/document-models/invoice/src/reducers/items.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/items.js +29 -0
- package/dist/document-models/invoice/src/tests/general.test.js +0 -10
- package/dist/editors/invoice/InvoicePDF.d.ts.map +1 -1
- package/dist/editors/invoice/InvoicePDF.js +24 -6
- package/dist/editors/invoice/components/countryForm.d.ts.map +1 -1
- package/dist/editors/invoice/components/countryForm.js +1 -1
- package/dist/editors/invoice/editor.d.ts.map +1 -1
- package/dist/editors/invoice/editor.js +37 -23
- package/dist/editors/invoice/legalEntity/legalEntity.d.ts +5 -3
- package/dist/editors/invoice/legalEntity/legalEntity.d.ts.map +1 -1
- package/dist/editors/invoice/legalEntity/legalEntity.js +4 -4
- package/dist/editors/invoice/lineItemTags/lineItemTags.d.ts +3 -3
- package/dist/editors/invoice/lineItemTags/lineItemTags.d.ts.map +1 -1
- package/dist/editors/invoice/lineItemTags/lineItemTags.js +24 -15
- package/dist/editors/invoice/lineItemTags/tagMapping.d.ts +1 -0
- package/dist/editors/invoice/lineItemTags/tagMapping.d.ts.map +1 -1
- package/dist/editors/invoice/lineItemTags/tagMapping.js +15 -0
- package/dist/editors/invoice/lineItems.d.ts +3 -3
- package/dist/editors/invoice/lineItems.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationManager.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationManager.js +3 -2
- package/dist/editors/invoice/validation/validationRules.d.ts +2 -1
- package/dist/editors/invoice/validation/validationRules.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationRules.js +26 -2
- package/dist/style.css +9 -11
- package/dist/subgraphs/invoice/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/invoice/resolvers.js +9 -23
- package/dist/subgraphs/invoice/schema.d.ts.map +1 -1
- package/dist/subgraphs/invoice/schema.js +18 -31
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import { CountryForm } from "../components/countryForm.js";
|
|
|
6
6
|
import { InputField } from "../components/inputField.js";
|
|
7
7
|
const FieldLabel = ({ children }) => (_jsx("label", { className: "block text-sm font-medium text-gray-700", children: children }));
|
|
8
8
|
export const LegalEntityMainSection = (props) => {
|
|
9
|
-
const { value, onChange, disabled,
|
|
9
|
+
const { value, onChange, disabled, mainCountryValidation, bankCountryValidation, streetaddressvalidation, cityvalidation, postalcodevalidation, payeremailvalidation, ...divProps } = props;
|
|
10
10
|
const handleInputChange = (field) => (e) => {
|
|
11
11
|
// No-op
|
|
12
12
|
};
|
|
@@ -23,7 +23,7 @@ export const LegalEntityMainSection = (props) => {
|
|
|
23
23
|
onChange({ [field]: e.target.value });
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
return (_jsxs("div", { ...divProps, className: twMerge("rounded-lg border border-gray-200 bg-white p-6 mb-2", props.className), children: [_jsx("h3", { className: "mb-4 text-lg font-semibold text-gray-900", children: "Basic Information" }), _jsxs("div", { className: "space-y-6", children: [_jsx("div", { className: "space-y-2", children: _jsx(InputField, { value: value.name ?? "", label: "Name", placeholder: "Legal Entity Name", onBlur: handleTextareaBlur("name"), handleInputChange: handleTextareaChange("name"), className: "h-10 w-full text-md mb-2" }) }), _jsx("div", { className: "space-y-2", children: _jsx(InputField, { value: value.id ?? "", label: "Tax ID / Corp. Reg", placeholder: "332...", onBlur: handleTextareaBlur("id"), handleInputChange: handleTextareaChange("id"), className: "h-10 w-full text-md mb-2" }) }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-4", children: [_jsx(InputField, { value: value.streetAddress ?? "", label: "Address", placeholder: "Street Address", onBlur: handleTextareaBlur("streetAddress"), handleInputChange: handleTextareaChange("streetAddress"), className: "h-10 w-full text-md mb-2", validation: streetaddressvalidation }), _jsx(InputField, { value: value.extendedAddress ?? "", placeholder: "Extended Address", onBlur: handleTextareaBlur("extendedAddress"), handleInputChange: handleTextareaChange("extendedAddress"), className: "h-10 w-full text-md mb-2" })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsx("div", { className: "space-y-2", children: _jsx(InputField, { value: value.city ?? "", label: "City", placeholder: "City", onBlur: handleTextareaBlur("city"), handleInputChange: handleTextareaChange("city"), className: "h-10 w-full text-md mb-2", validation: cityvalidation }) }), _jsx("div", { className: "space-y-2", children: _jsx(InputField, { value: value.stateProvince ?? "", label: "State/Province", placeholder: "State/Province", onBlur: handleTextareaBlur("stateProvince"), handleInputChange: handleTextareaChange("stateProvince"), className: "h-10 w-full text-md mb-2" }) })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsx("div", { className: "space-y-2", children: _jsx(InputField, { value: value.postalCode ?? "", label: "Postal Code", placeholder: "Postal Code", onBlur: handleTextareaBlur("postalCode"), handleInputChange: handleTextareaChange("postalCode"), className: "h-10 w-full text-md mb-2", validation: postalcodevalidation }) }), _jsxs("div", { className: "space-y-2", children: [_jsx(FieldLabel, { children: "Country" }), _jsx(CountryForm, { country: value.country ?? "", handleInputChange: handleInputChange("country"), handleBlur: handleBlur("country"), className: "h-10 w-full text-md mb-2", validation:
|
|
26
|
+
return (_jsxs("div", { ...divProps, className: twMerge("rounded-lg border border-gray-200 bg-white p-6 mb-2", props.className), children: [_jsx("h3", { className: "mb-4 text-lg font-semibold text-gray-900", children: "Basic Information" }), _jsxs("div", { className: "space-y-6", children: [_jsx("div", { className: "space-y-2", children: _jsx(InputField, { value: value.name ?? "", label: "Name", placeholder: "Legal Entity Name", onBlur: handleTextareaBlur("name"), handleInputChange: handleTextareaChange("name"), className: "h-10 w-full text-md mb-2" }) }), _jsx("div", { className: "space-y-2", children: _jsx(InputField, { value: value.id ?? "", label: "Tax ID / Corp. Reg", placeholder: "332...", onBlur: handleTextareaBlur("id"), handleInputChange: handleTextareaChange("id"), className: "h-10 w-full text-md mb-2" }) }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-4", children: [_jsx(InputField, { value: value.streetAddress ?? "", label: "Address", placeholder: "Street Address", onBlur: handleTextareaBlur("streetAddress"), handleInputChange: handleTextareaChange("streetAddress"), className: "h-10 w-full text-md mb-2", validation: streetaddressvalidation }), _jsx(InputField, { value: value.extendedAddress ?? "", placeholder: "Extended Address", onBlur: handleTextareaBlur("extendedAddress"), handleInputChange: handleTextareaChange("extendedAddress"), className: "h-10 w-full text-md mb-2" })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsx("div", { className: "space-y-2", children: _jsx(InputField, { value: value.city ?? "", label: "City", placeholder: "City", onBlur: handleTextareaBlur("city"), handleInputChange: handleTextareaChange("city"), className: "h-10 w-full text-md mb-2", validation: cityvalidation }) }), _jsx("div", { className: "space-y-2", children: _jsx(InputField, { value: value.stateProvince ?? "", label: "State/Province", placeholder: "State/Province", onBlur: handleTextareaBlur("stateProvince"), handleInputChange: handleTextareaChange("stateProvince"), className: "h-10 w-full text-md mb-2" }) })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsx("div", { className: "space-y-2", children: _jsx(InputField, { value: value.postalCode ?? "", label: "Postal Code", placeholder: "Postal Code", onBlur: handleTextareaBlur("postalCode"), handleInputChange: handleTextareaChange("postalCode"), className: "h-10 w-full text-md mb-2", validation: postalcodevalidation }) }), _jsxs("div", { className: "space-y-2", children: [_jsx(FieldLabel, { children: "Country" }), _jsx(CountryForm, { country: value.country ?? "", handleInputChange: handleInputChange("country"), handleBlur: handleBlur("country"), className: "h-10 w-full text-md mb-2", validation: mainCountryValidation })] })] })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsx("div", { className: "space-y-2", children: _jsx(InputField, { value: value.email ?? "", label: "Email", placeholder: "Email", onBlur: handleTextareaBlur("email"), handleInputChange: handleTextareaChange("email"), className: "h-10 w-full text-md mb-2", validation: payeremailvalidation }) }), _jsx("div", { className: "space-y-2", children: _jsx(InputField, { value: value.tel ?? "", label: "Telephone", placeholder: "Telephone", onBlur: handleTextareaBlur("tel"), handleInputChange: handleTextareaChange("tel"), className: "h-10 w-full text-md mb-2" }) })] })] })] }));
|
|
27
27
|
};
|
|
28
28
|
// Helper to flatten LegalEntity to EditLegalEntityInput
|
|
29
29
|
function flattenLegalEntityToEditInput(legalEntity) {
|
|
@@ -52,12 +52,12 @@ function flattenLegalEntityToEditInput(legalEntity) {
|
|
|
52
52
|
email: legalEntity.contactInfo?.email ?? "",
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
export function LegalEntityForm({ legalEntity, onChangeInfo, onChangeBank, onChangeWallet, basicInfoDisabled, bankDisabled, walletDisabled, currency, status, walletvalidation,
|
|
55
|
+
export function LegalEntityForm({ legalEntity, onChangeInfo, onChangeBank, onChangeWallet, basicInfoDisabled, bankDisabled, walletDisabled, currency, status, walletvalidation, mainCountryValidation, bankCountryValidation, ibanvalidation, bicvalidation, banknamevalidation, streetaddressvalidation, cityvalidation, postalcodevalidation, payeremailvalidation, }) {
|
|
56
56
|
// Handler for main info section
|
|
57
57
|
const handleChangeInfo = (update) => {
|
|
58
58
|
if (!onChangeInfo)
|
|
59
59
|
return;
|
|
60
60
|
onChangeInfo(update);
|
|
61
61
|
};
|
|
62
|
-
return (_jsxs("div", { className: "space-y-8", children: [!basicInfoDisabled && !!onChangeInfo && (_jsx(LegalEntityMainSection, { onChange: handleChangeInfo, value: flattenLegalEntityToEditInput(legalEntity),
|
|
62
|
+
return (_jsxs("div", { className: "space-y-8", children: [!basicInfoDisabled && !!onChangeInfo && (_jsx(LegalEntityMainSection, { onChange: handleChangeInfo, value: flattenLegalEntityToEditInput(legalEntity), mainCountryValidation: mainCountryValidation, streetaddressvalidation: streetaddressvalidation, cityvalidation: cityvalidation, postalcodevalidation: postalcodevalidation, payeremailvalidation: payeremailvalidation })), !walletDisabled && !!onChangeWallet && (_jsx(LegalEntityWalletSection, { onChange: onChangeWallet, value: legalEntity.paymentRouting?.wallet || {}, currency: currency, status: status, walletvalidation: walletvalidation })), !bankDisabled && !!onChangeBank && (_jsx(LegalEntityBankSection, { onChange: onChangeBank, value: legalEntity.paymentRouting?.bank || {}, countryvalidation: bankCountryValidation, ibanvalidation: ibanvalidation, bicvalidation: bicvalidation, banknamevalidation: banknamevalidation }))] }));
|
|
63
63
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Dispatch } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { InvoiceTag } from "../../../document-models/invoice/index.js";
|
|
3
3
|
interface TagAssignmentRow {
|
|
4
4
|
id: string;
|
|
5
5
|
item: string;
|
|
6
6
|
period: string;
|
|
7
7
|
expenseAccount: string;
|
|
8
8
|
total: string;
|
|
9
|
-
lineItemTag:
|
|
9
|
+
lineItemTag: InvoiceTag[];
|
|
10
10
|
}
|
|
11
11
|
interface LineItemTagsTableProps {
|
|
12
12
|
lineItems: TagAssignmentRow[];
|
|
13
13
|
onClose: () => void;
|
|
14
14
|
dispatch: Dispatch<any>;
|
|
15
|
-
paymentAccounts:
|
|
15
|
+
paymentAccounts: InvoiceTag[];
|
|
16
16
|
}
|
|
17
17
|
export declare function LineItemTagsTable({ lineItems, onClose, dispatch, paymentAccounts, }: LineItemTagsTableProps): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineItemTags.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/lineItemTags/lineItemTags.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKjC,OAAO,
|
|
1
|
+
{"version":3,"file":"lineItemTags.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/lineItemTags/lineItemTags.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKjC,OAAO,EAAW,UAAU,EAAE,MAAM,2CAA2C,CAAC;AAGhF,UAAU,gBAAgB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,UAAU,sBAAsB;IAC9B,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IACxB,eAAe,EAAE,UAAU,EAAE,CAAC;CAC/B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,OAAO,EACP,QAAQ,EACR,eAAe,GAChB,EAAE,sBAAsB,2CA6LxB"}
|
|
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { X, Tag } from "lucide-react";
|
|
3
3
|
import { Button } from "@powerhousedao/design-system";
|
|
4
4
|
import { Select, DatePicker } from "@powerhousedao/document-engineering/ui";
|
|
5
|
-
import { expenseAccountOptions } from "./tagMapping.js";
|
|
6
|
-
import { actions
|
|
5
|
+
import { expenseAccountOptions, paymentAccountOptions } from "./tagMapping.js";
|
|
6
|
+
import { actions } from "../../../document-models/invoice/index.js";
|
|
7
7
|
import { InputField } from "../components/inputField.js";
|
|
8
8
|
export function LineItemTagsTable({ lineItems, onClose, dispatch, paymentAccounts, }) {
|
|
9
9
|
const handleReset = () => {
|
|
@@ -18,13 +18,20 @@ export function LineItemTagsTable({ lineItems, onClose, dispatch, paymentAccount
|
|
|
18
18
|
}));
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
|
-
//
|
|
22
|
-
paymentAccounts.forEach((
|
|
23
|
-
dispatch(actions.
|
|
21
|
+
// Reset the payment account to empty value
|
|
22
|
+
paymentAccounts.forEach((tag) => {
|
|
23
|
+
dispatch(actions.setInvoiceTag({
|
|
24
|
+
dimension: tag.dimension,
|
|
25
|
+
value: "",
|
|
26
|
+
label: "",
|
|
27
|
+
}));
|
|
24
28
|
});
|
|
25
29
|
};
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
// Get the last payment account value from the paymentAccounts to display in the payment account select
|
|
31
|
+
const selectedPaymentAccountValue = paymentAccounts && paymentAccounts.length > 0
|
|
32
|
+
? (paymentAccounts[paymentAccounts.length - 1].value ?? "")
|
|
33
|
+
: "";
|
|
34
|
+
return (_jsxs("div", { className: "w-full", children: [_jsxs("div", { className: "flex items-center justify-between border-b border-gray-200 p-6 bg-white z-10", children: [_jsxs("span", { className: "flex items-center gap-2", children: [_jsx("h2", { className: "text-2xl font-semibold text-gray-900", children: "Assign Tags " }), _jsx(Tag, { style: { width: 28, height: 28, color: "white", fill: "#475264" } })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs(Button, { color: "light", size: "medium", onClick: handleReset, children: ["Reset", " "] }), _jsx("button", { onClick: onClose, className: "rounded-full p-2 hover:bg-gray-100", children: _jsx(X, { size: 24, className: "text-gray-500" }) })] })] }), _jsx("div", { className: "overflow-x-auto rounded-lg border border-gray-200", children: _jsxs("table", { className: "w-full border-collapse bg-white", children: [_jsx("thead", { className: "bg-gray-50 z-10", children: _jsxs("tr", { children: [_jsx("th", { className: "border-b border-gray-200 p-3 text-left", children: "Item" }), _jsx("th", { className: "border-b border-gray-200 p-3 text-left", children: "Period" }), _jsx("th", { className: "border-b border-gray-200 p-3 text-left", children: "Xero Expense Account" }), _jsx("th", { className: "border-b border-gray-200 p-3 text-right", children: "Total" })] }) }), _jsx("tbody", { children: lineItems.map((item) => (_jsxs("tr", { className: "hover:bg-gray-50", children: [_jsx("td", { className: "border-b border-gray-200 p-3", children: _jsx(InputField, { value: item.item, handleInputChange: (e) => { }, onBlur: (e) => {
|
|
28
35
|
dispatch(actions.editLineItem({
|
|
29
36
|
id: item.id,
|
|
30
37
|
description: e.target.value,
|
|
@@ -51,12 +58,14 @@ export function LineItemTagsTable({ lineItems, onClose, dispatch, paymentAccount
|
|
|
51
58
|
value: value,
|
|
52
59
|
label: expenseAccountOptions.find((option) => option.value === value)?.label,
|
|
53
60
|
}));
|
|
54
|
-
} }) }), _jsx("td", { className: "border-b border-gray-200 p-3 text-right font-medium", children: item.total })] }, item.id))) })] }) }), _jsx("div", { className: "border-t border-gray-200 p-6", children: _jsxs("div", { className: "flex items-center justify-end gap-4", children: [_jsx("label", { className: "text-lg font-medium text-gray-900", children: "Payment Account" }), _jsx(Select, { options:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
} }) }), _jsx("td", { className: "border-b border-gray-200 p-3 text-right font-medium", children: item.total })] }, item.id))) })] }) }), _jsx("div", { className: "border-t border-gray-200 p-6", children: _jsxs("div", { className: "flex items-center justify-end gap-4", children: [_jsx("label", { className: "text-lg font-medium text-gray-900", children: "Payment Account" }), _jsx(Select, { options: paymentAccountOptions, value: paymentAccountOptions.find((option) => option.value === selectedPaymentAccountValue)?.value ?? "", placeholder: "Select Payment Account", searchable: true, onChange: (value) => {
|
|
62
|
+
const selectedLabel = paymentAccountOptions.find((option) => option.value === value)
|
|
63
|
+
?.label || "";
|
|
64
|
+
const cleanLabel = selectedLabel.replace(/\s+\w+$/, "").trim();
|
|
65
|
+
dispatch(actions.setInvoiceTag({
|
|
66
|
+
dimension: "xero-payment-account",
|
|
67
|
+
value: value,
|
|
68
|
+
label: cleanLabel,
|
|
69
|
+
}));
|
|
70
|
+
}, style: { width: "230px" } })] }) })] }));
|
|
62
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagMapping.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/lineItemTags/tagMapping.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAEtE,eAAO,MAAM,qBAAqB,EAAE,YAAY,EA6D/C,CAAC"}
|
|
1
|
+
{"version":3,"file":"tagMapping.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/lineItemTags/tagMapping.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAEtE,eAAO,MAAM,qBAAqB,EAAE,YAAY,EA6D/C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,YAAY,EAc/C,CAAC"}
|
|
@@ -60,3 +60,18 @@ export const expenseAccountOptions = [
|
|
|
60
60
|
{ label: "Retained Earnings", value: "960" },
|
|
61
61
|
{ label: "Owner A Share Capital", value: "970" }
|
|
62
62
|
];
|
|
63
|
+
export const paymentAccountOptions = [
|
|
64
|
+
{ label: "Clearing Account USD", value: "USD" },
|
|
65
|
+
{ label: "Clearing Account EUR", value: "EUR" },
|
|
66
|
+
{ label: "Clearing Account DKK", value: "DKK" },
|
|
67
|
+
{ label: "Clearing Account GBP", value: "GBP" },
|
|
68
|
+
{ label: "Clearing Account JPY", value: "JPY" },
|
|
69
|
+
{ label: "Clearing Account CNY", value: "CNY" },
|
|
70
|
+
{ label: "Clearing Account CHF", value: "CHF" },
|
|
71
|
+
{ label: "Wallet USDS", value: "USDS" },
|
|
72
|
+
{ label: "Wallet DAI", value: "DAI" },
|
|
73
|
+
{ label: "Wallet EURe", value: "EURe" },
|
|
74
|
+
{ label: "Wallet SKY", value: "SKY" },
|
|
75
|
+
{ label: "Wallet MKR", value: "MKR" },
|
|
76
|
+
{ label: "Wallet USDC", value: "USDC" },
|
|
77
|
+
];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditInvoiceInput, DeleteLineItemInput,
|
|
1
|
+
import { EditInvoiceInput, DeleteLineItemInput, InvoiceTag } from "../../document-models/invoice/index.js";
|
|
2
2
|
import { Dispatch } from "react";
|
|
3
3
|
export declare function formatNumber(value: number): string;
|
|
4
4
|
type LineItem = {
|
|
@@ -11,7 +11,7 @@ type LineItem = {
|
|
|
11
11
|
totalPriceTaxIncl: number;
|
|
12
12
|
unitPriceTaxExcl: number;
|
|
13
13
|
unitPriceTaxIncl: number;
|
|
14
|
-
lineItemTag:
|
|
14
|
+
lineItemTag: InvoiceTag[];
|
|
15
15
|
};
|
|
16
16
|
type LineItemsTableProps = {
|
|
17
17
|
readonly lineItems: LineItem[];
|
|
@@ -21,7 +21,7 @@ type LineItemsTableProps = {
|
|
|
21
21
|
readonly onDeleteItem: (input: DeleteLineItemInput) => void;
|
|
22
22
|
readonly onUpdateCurrency: (input: EditInvoiceInput) => void;
|
|
23
23
|
readonly dispatch: Dispatch<any>;
|
|
24
|
-
readonly paymentAccounts:
|
|
24
|
+
readonly paymentAccounts: InvoiceTag[];
|
|
25
25
|
};
|
|
26
26
|
export declare function LineItemsTable({ lineItems, currency, onAddItem, onUpdateItem, onDeleteItem, onUpdateCurrency, dispatch, paymentAccounts }: LineItemsTableProps): import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineItems.d.ts","sourceRoot":"","sources":["../../../editors/invoice/lineItems.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"lineItems.d.ts","sourceRoot":"","sources":["../../../editors/invoice/lineItems.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAC3G,OAAO,EAA0D,QAAQ,EAAE,MAAM,OAAO,CAAC;AAqBzF,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAsBlD;AAED,KAAK,QAAQ,GAAG;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B,CAAC;AAuNF,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,SAAS,EAAE,QAAQ,EAAE,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAChD,QAAQ,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC5D,QAAQ,CAAC,gBAAgB,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7D,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,UAAU,EAAE,CAAC;CACxC,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,eAAe,EAChB,EAAE,mBAAmB,2CA+IrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validationManager.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/validation/validationManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAInE,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,gBAAgB,CAAC;IAC1D,SAAS,EAAE;QACP,UAAU,EAAE,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;QAClC,iBAAiB,EAAE;YACf,IAAI,EAAE,MAAM,EAAE,CAAC;YACf,EAAE,EAAE,MAAM,EAAE,CAAC;SAChB,CAAC;KACL,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;
|
|
1
|
+
{"version":3,"file":"validationManager.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/validation/validationManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAInE,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,gBAAgB,CAAC;IAC1D,SAAS,EAAE;QACP,UAAU,EAAE,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;QAClC,iBAAiB,EAAE;YACf,IAAI,EAAE,MAAM,EAAE,CAAC;YACf,EAAE,EAAE,MAAM,EAAE,CAAC;SAChB,CAAC;KACL,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AA+BF,wBAAgB,aAAa,CACzB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,GAAG,EACV,OAAO,EAAE,iBAAiB,GAC3B,gBAAgB,GAAG,IAAI,CAqBzB;AAGD,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,OAAO,EAAE,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAalC;AAGD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAE5D;AAGD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAKxD"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { accountNumberRule, bicNumberRule, bankNameRule,
|
|
1
|
+
import { accountNumberRule, bicNumberRule, bankNameRule, currencyRule, ethereumAddressRule, invoiceNumberRule, issuerPostalCodeRule, issuerStreetAddressRule, issuerCityRule, payerEmailRule, lineItemRule, mainCountryRule, bankCountryRule } from "./validationRules.js";
|
|
2
2
|
// Validation rules registry
|
|
3
3
|
const validationRules = [];
|
|
4
4
|
// Register rules
|
|
5
5
|
validationRules.push(invoiceNumberRule);
|
|
6
6
|
validationRules.push(ethereumAddressRule);
|
|
7
7
|
validationRules.push(currencyRule);
|
|
8
|
-
validationRules.push(
|
|
8
|
+
validationRules.push(mainCountryRule);
|
|
9
|
+
validationRules.push(bankCountryRule);
|
|
9
10
|
validationRules.push(accountNumberRule);
|
|
10
11
|
validationRules.push(bicNumberRule);
|
|
11
12
|
validationRules.push(bankNameRule);
|
|
@@ -2,7 +2,8 @@ import { ValidationRule } from "./validationManager.js";
|
|
|
2
2
|
export declare const invoiceNumberRule: ValidationRule;
|
|
3
3
|
export declare const ethereumAddressRule: ValidationRule;
|
|
4
4
|
export declare const currencyRule: ValidationRule;
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const mainCountryRule: ValidationRule;
|
|
6
|
+
export declare const bankCountryRule: ValidationRule;
|
|
6
7
|
export declare const accountNumberRule: ValidationRule;
|
|
7
8
|
export declare const bicNumberRule: ValidationRule;
|
|
8
9
|
export declare const bankNameRule: ValidationRule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validationRules.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/validation/validationRules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAmBxD,eAAO,MAAM,iBAAiB,EAAE,cAuB/B,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,cA8BjC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,cAuB1B,CAAC;AAEF,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"validationRules.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/validation/validationRules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAmBxD,eAAO,MAAM,iBAAiB,EAAE,cAuB/B,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,cA8BjC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,cAuB1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAuB7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAuB7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cA8B/B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAkC3B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,cAuB1B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,cAuBrC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cAuB5B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,cAuBlC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cA8B5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,cAuB1B,CAAC"}
|
|
@@ -92,8 +92,8 @@ export const currencyRule = {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
export const
|
|
96
|
-
field: '
|
|
95
|
+
export const mainCountryRule = {
|
|
96
|
+
field: 'mainCountry',
|
|
97
97
|
validate: (value) => {
|
|
98
98
|
if (!value || value.trim() === '') {
|
|
99
99
|
return {
|
|
@@ -116,6 +116,30 @@ export const countryRule = {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
+
export const bankCountryRule = {
|
|
120
|
+
field: 'bankCountry',
|
|
121
|
+
validate: (value) => {
|
|
122
|
+
if (!value || value.trim() === '') {
|
|
123
|
+
return {
|
|
124
|
+
isValid: false,
|
|
125
|
+
message: 'Bank country is required',
|
|
126
|
+
severity: 'warning'
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return {
|
|
130
|
+
isValid: true,
|
|
131
|
+
message: '',
|
|
132
|
+
severity: 'none'
|
|
133
|
+
};
|
|
134
|
+
},
|
|
135
|
+
appliesTo: {
|
|
136
|
+
currencies: ['USD', 'EUR', 'GBP', 'JPY', 'CNY', 'CHF'],
|
|
137
|
+
statusTransitions: {
|
|
138
|
+
from: ['DRAFT'],
|
|
139
|
+
to: ['ISSUED']
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
119
143
|
export const accountNumberRule = {
|
|
120
144
|
field: 'accountNum',
|
|
121
145
|
validate: (value) => {
|
package/dist/style.css
CHANGED
|
@@ -281,6 +281,9 @@
|
|
|
281
281
|
.z-50 {
|
|
282
282
|
z-index: 50;
|
|
283
283
|
}
|
|
284
|
+
.col-span-1 {
|
|
285
|
+
grid-column: span 1 / span 1;
|
|
286
|
+
}
|
|
284
287
|
.container {
|
|
285
288
|
width: 100%;
|
|
286
289
|
@media (width >= 40rem) {
|
|
@@ -381,6 +384,9 @@
|
|
|
381
384
|
.h-10 {
|
|
382
385
|
height: calc(var(--spacing) * 10);
|
|
383
386
|
}
|
|
387
|
+
.h-32 {
|
|
388
|
+
height: calc(var(--spacing) * 32);
|
|
389
|
+
}
|
|
384
390
|
.h-full {
|
|
385
391
|
height: 100%;
|
|
386
392
|
}
|
|
@@ -435,9 +441,6 @@
|
|
|
435
441
|
.resize {
|
|
436
442
|
resize: both;
|
|
437
443
|
}
|
|
438
|
-
.grid-cols-1 {
|
|
439
|
-
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
440
|
-
}
|
|
441
444
|
.grid-cols-2 {
|
|
442
445
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
443
446
|
}
|
|
@@ -468,9 +471,6 @@
|
|
|
468
471
|
.gap-4 {
|
|
469
472
|
gap: calc(var(--spacing) * 4);
|
|
470
473
|
}
|
|
471
|
-
.gap-6 {
|
|
472
|
-
gap: calc(var(--spacing) * 6);
|
|
473
|
-
}
|
|
474
474
|
.space-y-1 {
|
|
475
475
|
:where(& > :not(:last-child)) {
|
|
476
476
|
--tw-space-y-reverse: 0;
|
|
@@ -654,6 +654,9 @@
|
|
|
654
654
|
.pt-4 {
|
|
655
655
|
padding-top: calc(var(--spacing) * 4);
|
|
656
656
|
}
|
|
657
|
+
.pt-6 {
|
|
658
|
+
padding-top: calc(var(--spacing) * 6);
|
|
659
|
+
}
|
|
657
660
|
.pr-8 {
|
|
658
661
|
padding-right: calc(var(--spacing) * 8);
|
|
659
662
|
}
|
|
@@ -914,11 +917,6 @@
|
|
|
914
917
|
padding: calc(var(--spacing) * 0);
|
|
915
918
|
}
|
|
916
919
|
}
|
|
917
|
-
.md\:col-start-2 {
|
|
918
|
-
@media (width >= 48rem) {
|
|
919
|
-
grid-column-start: 2;
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
920
|
.md\:grid-cols-2 {
|
|
923
921
|
@media (width >= 48rem) {
|
|
924
922
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/invoice/resolvers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAQ3D,eAAO,MAAM,YAAY,GAAI,UAAU,QAAQ,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/invoice/resolvers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAQ3D,eAAO,MAAM,YAAY,GAAI,UAAU,QAAQ,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CA8SnE,CAAC"}
|
|
@@ -99,27 +99,6 @@ export const getResolvers = (subgraph) => {
|
|
|
99
99
|
await reactor.addAction(driveId, docId, actions.deleteRef({ ...args.input }));
|
|
100
100
|
return doc.revision.global + 1;
|
|
101
101
|
},
|
|
102
|
-
Invoice_addPaymentAccount: async (_, args) => {
|
|
103
|
-
const driveId = args.driveId || DEFAULT_DRIVE_ID;
|
|
104
|
-
const docId = args.docId || "";
|
|
105
|
-
const doc = await reactor.getDocument(driveId, docId);
|
|
106
|
-
await reactor.addAction(driveId, docId, actions.addPaymentAccount({ ...args.input }));
|
|
107
|
-
return doc.revision.global + 1;
|
|
108
|
-
},
|
|
109
|
-
Invoice_editPaymentAccount: async (_, args) => {
|
|
110
|
-
const driveId = args.driveId || DEFAULT_DRIVE_ID;
|
|
111
|
-
const docId = args.docId || "";
|
|
112
|
-
const doc = await reactor.getDocument(driveId, docId);
|
|
113
|
-
await reactor.addAction(driveId, docId, actions.editPaymentAccount({ ...args.input }));
|
|
114
|
-
return doc.revision.global + 1;
|
|
115
|
-
},
|
|
116
|
-
Invoice_deletePaymentAccount: async (_, args) => {
|
|
117
|
-
const driveId = args.driveId || DEFAULT_DRIVE_ID;
|
|
118
|
-
const docId = args.docId || "";
|
|
119
|
-
const doc = await reactor.getDocument(driveId, docId);
|
|
120
|
-
await reactor.addAction(driveId, docId, actions.deletePaymentAccount({ ...args.input }));
|
|
121
|
-
return doc.revision.global + 1;
|
|
122
|
-
},
|
|
123
102
|
Invoice_editIssuer: async (_, args) => {
|
|
124
103
|
const driveId = args.driveId || DEFAULT_DRIVE_ID;
|
|
125
104
|
const docId = args.docId || "";
|
|
@@ -190,9 +169,16 @@ export const getResolvers = (subgraph) => {
|
|
|
190
169
|
await reactor.addAction(driveId, docId, actions.setLineItemTag({ ...args.input }));
|
|
191
170
|
return doc.revision.global + 1;
|
|
192
171
|
},
|
|
193
|
-
|
|
194
|
-
|
|
172
|
+
Invoice_setInvoiceTag: async (_, args) => {
|
|
173
|
+
const driveId = args.driveId || DEFAULT_DRIVE_ID;
|
|
174
|
+
const docId = args.docId || "";
|
|
175
|
+
const doc = await reactor.getDocument(driveId, docId);
|
|
176
|
+
await reactor.addAction(driveId, docId, actions.setInvoiceTag({ ...args.input }));
|
|
177
|
+
return doc.revision.global + 1;
|
|
178
|
+
},
|
|
195
179
|
Invoice_processGnosisPayment,
|
|
180
|
+
Invoice_createRequestFinancePayment,
|
|
181
|
+
Invoice_uploadInvoicePdfChunk,
|
|
196
182
|
},
|
|
197
183
|
};
|
|
198
184
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../subgraphs/invoice/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../subgraphs/invoice/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,MAAM,EAAE,YA8cpB,CAAC"}
|
|
@@ -16,7 +16,8 @@ export const schema = gql `
|
|
|
16
16
|
lineItems: [InvoiceLineItem!]!
|
|
17
17
|
totalPriceTaxExcl: Float!
|
|
18
18
|
totalPriceTaxIncl: Float!
|
|
19
|
-
|
|
19
|
+
invoiceTags: [InvoiceTag!]! # e.g. {'xero-payment-account', '090', 'PowerhouseUSD'}
|
|
20
|
+
notes: String
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
type Ref {
|
|
@@ -102,13 +103,13 @@ export const schema = gql `
|
|
|
102
103
|
unitPriceTaxIncl: Float!
|
|
103
104
|
totalPriceTaxExcl: Float!
|
|
104
105
|
totalPriceTaxIncl: Float!
|
|
105
|
-
lineItemTag: [
|
|
106
|
+
lineItemTag: [InvoiceTag!]
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
type
|
|
109
|
-
dimension: String!
|
|
110
|
-
value: String!
|
|
111
|
-
label: String
|
|
109
|
+
type InvoiceTag {
|
|
110
|
+
dimension: String! # "xero-expense-account", "xero-payment-account", "accounting-period", ...
|
|
111
|
+
value: String! # "627", ..., "090", ..., "2025/05", "2025/Q1", ...
|
|
112
|
+
label: String # "Marketing", ..., "Business Bank", ..., "May 2025"
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
union LegalEntityId = LegalEntityTaxId | LegalEntityCorporateRegistrationId
|
|
@@ -191,21 +192,6 @@ export const schema = gql `
|
|
|
191
192
|
docId: PHID
|
|
192
193
|
input: Invoice_DeleteRefInput
|
|
193
194
|
): Int
|
|
194
|
-
Invoice_addPaymentAccount(
|
|
195
|
-
driveId: String
|
|
196
|
-
docId: PHID
|
|
197
|
-
input: Invoice_AddPaymentAccountInput
|
|
198
|
-
): Int
|
|
199
|
-
Invoice_editPaymentAccount(
|
|
200
|
-
driveId: String
|
|
201
|
-
docId: PHID
|
|
202
|
-
input: Invoice_EditPaymentAccountInput
|
|
203
|
-
): Int
|
|
204
|
-
Invoice_deletePaymentAccount(
|
|
205
|
-
driveId: String
|
|
206
|
-
docId: PHID
|
|
207
|
-
input: Invoice_DeletePaymentAccountInput
|
|
208
|
-
): Int
|
|
209
195
|
Invoice_editIssuer(
|
|
210
196
|
driveId: String
|
|
211
197
|
docId: PHID
|
|
@@ -256,6 +242,11 @@ export const schema = gql `
|
|
|
256
242
|
docId: PHID
|
|
257
243
|
input: Invoice_SetLineItemTagInput
|
|
258
244
|
): Int
|
|
245
|
+
Invoice_setInvoiceTag(
|
|
246
|
+
driveId: String
|
|
247
|
+
docId: PHID
|
|
248
|
+
input: Invoice_SetInvoiceTagInput
|
|
249
|
+
): Int
|
|
259
250
|
Invoice_uploadInvoicePdfChunk(
|
|
260
251
|
chunk: String!
|
|
261
252
|
chunkIndex: Int!
|
|
@@ -311,6 +302,7 @@ export const schema = gql `
|
|
|
311
302
|
dateDue: String
|
|
312
303
|
dateDelivered: String
|
|
313
304
|
currency: String
|
|
305
|
+
notes: String
|
|
314
306
|
}
|
|
315
307
|
input Invoice_EditStatusInput {
|
|
316
308
|
status: Status!
|
|
@@ -326,16 +318,6 @@ export const schema = gql `
|
|
|
326
318
|
input Invoice_DeleteRefInput {
|
|
327
319
|
id: OID!
|
|
328
320
|
}
|
|
329
|
-
input Invoice_AddPaymentAccountInput {
|
|
330
|
-
paymentAccount: String!
|
|
331
|
-
}
|
|
332
|
-
input Invoice_EditPaymentAccountInput {
|
|
333
|
-
existingPaymentAccount: String!
|
|
334
|
-
newPaymentAccount: String!
|
|
335
|
-
}
|
|
336
|
-
input Invoice_DeletePaymentAccountInput {
|
|
337
|
-
paymentAccount: String!
|
|
338
|
-
}
|
|
339
321
|
|
|
340
322
|
"""
|
|
341
323
|
Module: Parties
|
|
@@ -474,4 +456,9 @@ export const schema = gql `
|
|
|
474
456
|
value: String!
|
|
475
457
|
label: String
|
|
476
458
|
}
|
|
459
|
+
input Invoice_SetInvoiceTagInput {
|
|
460
|
+
dimension: String!
|
|
461
|
+
value: String!
|
|
462
|
+
label: String
|
|
463
|
+
}
|
|
477
464
|
`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/contributor-billing",
|
|
3
3
|
"description": "Document models that help contributors of open organisations get paid anonymously for their work on a monthly basis.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|