@mulmoclaude/accounting-plugin 0.3.2 → 1.0.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.
- package/dist/server.cjs +6 -6
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +6 -6
- package/dist/server.js.map +1 -1
- package/dist/style.css +6 -5
- package/package.json +11 -11
package/dist/server.js
CHANGED
|
@@ -1914,7 +1914,7 @@ async function handleOpenBook(rest) {
|
|
|
1914
1914
|
};
|
|
1915
1915
|
}
|
|
1916
1916
|
async function handleGetReport(rest) {
|
|
1917
|
-
const kind =
|
|
1917
|
+
const kind = typeof rest.kind === "string" ? rest.kind : "";
|
|
1918
1918
|
const periodInput = rest.period;
|
|
1919
1919
|
const bookId = rest.bookId;
|
|
1920
1920
|
if (kind === "balance") {
|
|
@@ -1946,7 +1946,7 @@ var ACTION_HANDLERS = {
|
|
|
1946
1946
|
[ACCOUNTING_ACTIONS.getBooks]: () => listBooks(),
|
|
1947
1947
|
[ACCOUNTING_ACTIONS.createBook]: async (rest) => {
|
|
1948
1948
|
const result = await createBook({
|
|
1949
|
-
name:
|
|
1949
|
+
name: typeof rest.name === "string" ? rest.name : "",
|
|
1950
1950
|
currency: typeof rest.currency === "string" ? rest.currency : void 0,
|
|
1951
1951
|
country: typeof rest.country === "string" ? rest.country : void 0,
|
|
1952
1952
|
fiscalYearEnd: rest.fiscalYearEnd
|
|
@@ -1958,7 +1958,7 @@ var ACTION_HANDLERS = {
|
|
|
1958
1958
|
},
|
|
1959
1959
|
[ACCOUNTING_ACTIONS.updateBook]: async (rest) => {
|
|
1960
1960
|
const result = await updateBook({
|
|
1961
|
-
bookId:
|
|
1961
|
+
bookId: typeof rest.bookId === "string" ? rest.bookId : "",
|
|
1962
1962
|
name: typeof rest.name === "string" ? rest.name : void 0,
|
|
1963
1963
|
country: typeof rest.country === "string" ? rest.country : void 0,
|
|
1964
1964
|
fiscalYearEnd: rest.fiscalYearEnd
|
|
@@ -1969,7 +1969,7 @@ var ACTION_HANDLERS = {
|
|
|
1969
1969
|
};
|
|
1970
1970
|
},
|
|
1971
1971
|
[ACCOUNTING_ACTIONS.deleteBook]: (rest) => deleteBook({
|
|
1972
|
-
bookId:
|
|
1972
|
+
bookId: typeof rest.bookId === "string" ? rest.bookId : "",
|
|
1973
1973
|
confirm: rest.confirm === true
|
|
1974
1974
|
}),
|
|
1975
1975
|
[ACCOUNTING_ACTIONS.getAccounts]: (rest) => listAccounts({ bookId: rest.bookId }),
|
|
@@ -1983,7 +1983,7 @@ var ACTION_HANDLERS = {
|
|
|
1983
1983
|
}),
|
|
1984
1984
|
[ACCOUNTING_ACTIONS.voidEntry]: (rest) => voidEntry({
|
|
1985
1985
|
bookId: rest.bookId,
|
|
1986
|
-
entryId:
|
|
1986
|
+
entryId: typeof rest.entryId === "string" ? rest.entryId : "",
|
|
1987
1987
|
reason: rest.reason,
|
|
1988
1988
|
voidDate: rest.voidDate
|
|
1989
1989
|
}),
|
|
@@ -1996,7 +1996,7 @@ var ACTION_HANDLERS = {
|
|
|
1996
1996
|
[ACCOUNTING_ACTIONS.getOpeningBalances]: (rest) => getOpeningBalances({ bookId: rest.bookId }),
|
|
1997
1997
|
[ACCOUNTING_ACTIONS.setOpeningBalances]: (rest) => setOpeningBalances({
|
|
1998
1998
|
bookId: rest.bookId,
|
|
1999
|
-
asOfDate:
|
|
1999
|
+
asOfDate: typeof rest.asOfDate === "string" ? rest.asOfDate : "",
|
|
2000
2000
|
lines: rest.lines ?? [],
|
|
2001
2001
|
memo: rest.memo
|
|
2002
2002
|
}),
|