@mulmoclaude/accounting-plugin 1.2.2 → 2.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/bodyFields.d.ts +10 -3
- package/dist/server/bodyFields.d.ts.map +1 -1
- package/dist/server/io.d.ts.map +1 -1
- package/dist/server/journal.d.ts +5 -5
- package/dist/server/journal.d.ts.map +1 -1
- package/dist/server/report.d.ts +2 -2
- package/dist/server/report.d.ts.map +1 -1
- package/dist/server/router.d.ts.map +1 -1
- package/dist/server/service.d.ts +24 -24
- package/dist/server/service.d.ts.map +1 -1
- package/dist/server/snapshotCache.d.ts.map +1 -1
- package/dist/server/timeSeries.d.ts +1 -1
- package/dist/server/timeSeries.d.ts.map +1 -1
- package/dist/server.cjs +74 -55
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +74 -55
- package/dist/server.js.map +1 -1
- package/dist/shared/fiscalYear.d.ts.map +1 -1
- package/dist/shared/types.d.ts +14 -14
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/{shared-xYPtGNvH.js → shared-BZAAF-I4.js} +8 -9
- package/dist/shared-BZAAF-I4.js.map +1 -0
- package/dist/{shared-KHOWwwiZ.cjs → shared-BpFVwa6Y.cjs} +8 -9
- package/dist/shared-BpFVwa6Y.cjs.map +1 -0
- package/dist/shared.cjs +1 -1
- package/dist/shared.js +1 -1
- package/dist/style.css +10 -10
- package/dist/vue/View.vue.d.ts.map +1 -1
- package/dist/vue/api.d.ts +16 -16
- package/dist/vue/api.d.ts.map +1 -1
- package/dist/vue/components/AccountEditor.vue.d.ts +2 -2
- package/dist/vue/components/AccountRow.vue.d.ts +2 -2
- package/dist/vue/components/AccountsList.vue.d.ts +2 -2
- package/dist/vue/components/AccountsModal.vue.d.ts +2 -2
- package/dist/vue/components/BalanceSheet.vue.d.ts +1 -1
- package/dist/vue/components/BookSettings.vue.d.ts +4 -4
- package/dist/vue/components/BookSettings.vue.d.ts.map +1 -1
- package/dist/vue/components/BookSwitcher.vue.d.ts +3 -3
- package/dist/vue/components/DateRangePicker.vue.d.ts +2 -2
- package/dist/vue/components/DateRangePicker.vue.d.ts.map +1 -1
- package/dist/vue/components/JournalEntryForm.vue.d.ts +4 -4
- package/dist/vue/components/JournalEntryForm.vue.d.ts.map +1 -1
- package/dist/vue/components/JournalList.vue.d.ts +6 -6
- package/dist/vue/components/JournalList.vue.d.ts.map +1 -1
- package/dist/vue/components/Ledger.vue.d.ts +3 -3
- package/dist/vue/components/Ledger.vue.d.ts.map +1 -1
- package/dist/vue/components/NewBookForm.vue.d.ts +2 -2
- package/dist/vue/components/OpeningBalancesForm.vue.d.ts +1 -1
- package/dist/vue/components/OpeningBalancesForm.vue.d.ts.map +1 -1
- package/dist/vue/components/ProfitLoss.vue.d.ts +3 -3
- package/dist/vue/components/ProfitLoss.vue.d.ts.map +1 -1
- package/dist/vue.cjs +22 -12
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.js +22 -12
- package/dist/vue.js.map +1 -1
- package/package.json +5 -5
- package/dist/shared-KHOWwwiZ.cjs.map +0 -1
- package/dist/shared-xYPtGNvH.js.map +0 -1
package/dist/vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as resolveFiscalYearEnd, C as currentFiscalYearRange, E as fiscalYearEndMonthLabel, F as isUnknownArray, H as ACCOUNTING_API, I as ACCOUNTING_BOOKS_CHANNEL, L as BOOK_EVENT_KINDS, M as errorMessage, O as previousFiscalYearRange, P as isRecord, R as bookChannel, S as FISCAL_YEAR_END_MONTHS, U as ACCOUNTING_ACTIONS, _ as SUPPORTED_COUNTRY_CODES, a as localDateString, b as localizedCountryName, c as previousMonthString, d as formatAmountNumeric, i as lastMonthOfPreviousQuarterString, k as previousQuarterRange, l as SUPPORTED_CURRENCY_CODES, m as localizedCurrencyName, o as localMonthString, p as inputStepFor, r as decemberOfPreviousYearString, u as formatAmount, v as countryHasFeature, w as currentQuarterRange, y as isSupportedCountryCode, z as ACCOUNT_TYPES } from "./shared-
|
|
1
|
+
import { A as resolveFiscalYearEnd, C as currentFiscalYearRange, E as fiscalYearEndMonthLabel, F as isUnknownArray, H as ACCOUNTING_API, I as ACCOUNTING_BOOKS_CHANNEL, L as BOOK_EVENT_KINDS, M as errorMessage, O as previousFiscalYearRange, P as isRecord, R as bookChannel, S as FISCAL_YEAR_END_MONTHS, U as ACCOUNTING_ACTIONS, _ as SUPPORTED_COUNTRY_CODES, a as localDateString, b as localizedCountryName, c as previousMonthString, d as formatAmountNumeric, i as lastMonthOfPreviousQuarterString, k as previousQuarterRange, l as SUPPORTED_CURRENCY_CODES, m as localizedCurrencyName, o as localMonthString, p as inputStepFor, r as decemberOfPreviousYearString, u as formatAmount, v as countryHasFeature, w as currentQuarterRange, y as isSupportedCountryCode, z as ACCOUNT_TYPES } from "./shared-BZAAF-I4.js";
|
|
2
2
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, nextTick, normalizeClass, onMounted, onUnmounted, openBlock, reactive, ref, renderList, toDisplayString, unref, vModelSelect, vModelText, watch, withDirectives, withKeys, withModifiers } from "vue";
|
|
3
3
|
import { createPluginI18n } from "@mulmoclaude/core/plugin-vue/i18n";
|
|
4
4
|
//#region src/vue/hostContext.ts
|
|
@@ -2234,7 +2234,7 @@ function isValidAccountCode(code) {
|
|
|
2234
2234
|
}
|
|
2235
2235
|
function typeForCode(code) {
|
|
2236
2236
|
if (!isValidAccountCode(code)) return null;
|
|
2237
|
-
const leading = Number.parseInt(code
|
|
2237
|
+
const leading = Number.parseInt(code.charAt(0), 10);
|
|
2238
2238
|
return ACCOUNT_TYPES.find((type) => ACCOUNT_TYPE_PREFIX[type] === leading) ?? null;
|
|
2239
2239
|
}
|
|
2240
2240
|
function codeMatchesType(code, type) {
|
|
@@ -3233,7 +3233,7 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
3233
3233
|
};
|
|
3234
3234
|
//#endregion
|
|
3235
3235
|
//#region src/vue/components/JournalEntryForm.vue
|
|
3236
|
-
var JournalEntryForm_default = /*#__PURE__*/ _plugin_vue_export_helper_default(JournalEntryForm_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
3236
|
+
var JournalEntryForm_default = /*#__PURE__*/ _plugin_vue_export_helper_default(JournalEntryForm_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-d5dcae53"]]);
|
|
3237
3237
|
//#endregion
|
|
3238
3238
|
//#region src/vue/components/JournalList.vue?vue&type=script&setup=true&lang.ts
|
|
3239
3239
|
var _hoisted_1$8 = { class: "flex flex-col h-full gap-3" };
|
|
@@ -3665,7 +3665,7 @@ var JournalList_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
3665
3665
|
]);
|
|
3666
3666
|
};
|
|
3667
3667
|
}
|
|
3668
|
-
}), [["__scopeId", "data-v-
|
|
3668
|
+
}), [["__scopeId", "data-v-8ec9519f"]]);
|
|
3669
3669
|
//#endregion
|
|
3670
3670
|
//#region src/vue/components/OpeningBalancesForm.vue?vue&type=script&setup=true&lang.ts
|
|
3671
3671
|
var _hoisted_1$7 = { class: "flex items-center justify-between gap-2" };
|
|
@@ -3756,12 +3756,21 @@ var OpeningBalancesForm_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
3756
3756
|
credit: null
|
|
3757
3757
|
};
|
|
3758
3758
|
}
|
|
3759
|
+
const accountRows = computed(() => bsAccounts.value.flatMap((account) => {
|
|
3760
|
+
const row = rows.value[account.code];
|
|
3761
|
+
return row ? [{
|
|
3762
|
+
account,
|
|
3763
|
+
row
|
|
3764
|
+
}] : [];
|
|
3765
|
+
}));
|
|
3759
3766
|
function onDebitInput(code) {
|
|
3760
3767
|
const row = rows.value[code];
|
|
3768
|
+
if (!row) return;
|
|
3761
3769
|
if (row.debit !== null && row.debit !== 0) row.credit = null;
|
|
3762
3770
|
}
|
|
3763
3771
|
function onCreditInput(code) {
|
|
3764
3772
|
const row = rows.value[code];
|
|
3773
|
+
if (!row) return;
|
|
3765
3774
|
if (row.credit !== null && row.credit !== 0) row.debit = null;
|
|
3766
3775
|
}
|
|
3767
3776
|
const imbalance = computed(() => {
|
|
@@ -3881,7 +3890,7 @@ var OpeningBalancesForm_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
3881
3890
|
createElementVNode("th", _hoisted_11$5, toDisplayString(unref(t)("pluginAccounting.entryForm.accountLabel")), 1),
|
|
3882
3891
|
createElementVNode("th", _hoisted_12$5, toDisplayString(unref(t)("pluginAccounting.entryForm.debitLabel")), 1),
|
|
3883
3892
|
createElementVNode("th", _hoisted_13$5, toDisplayString(unref(t)("pluginAccounting.entryForm.creditLabel")), 1)
|
|
3884
|
-
])]), createElementVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
3893
|
+
])]), createElementVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(accountRows.value, ({ account, row }) => {
|
|
3885
3894
|
return openBlock(), createElementBlock("tr", {
|
|
3886
3895
|
key: account.code,
|
|
3887
3896
|
class: "border-b border-gray-100"
|
|
@@ -3892,7 +3901,7 @@ var OpeningBalancesForm_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
3892
3901
|
createElementVNode("span", _hoisted_16$4, toDisplayString(account.type), 1)
|
|
3893
3902
|
]),
|
|
3894
3903
|
createElementVNode("td", _hoisted_17$4, [withDirectives(createElementVNode("input", {
|
|
3895
|
-
"onUpdate:modelValue": ($event) =>
|
|
3904
|
+
"onUpdate:modelValue": ($event) => row.debit = $event,
|
|
3896
3905
|
type: "number",
|
|
3897
3906
|
step: step.value,
|
|
3898
3907
|
min: "0",
|
|
@@ -3901,12 +3910,12 @@ var OpeningBalancesForm_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
3901
3910
|
onInput: ($event) => onDebitInput(account.code)
|
|
3902
3911
|
}, null, 40, _hoisted_18$4), [[
|
|
3903
3912
|
vModelText,
|
|
3904
|
-
|
|
3913
|
+
row.debit,
|
|
3905
3914
|
void 0,
|
|
3906
3915
|
{ number: true }
|
|
3907
3916
|
]])]),
|
|
3908
3917
|
createElementVNode("td", _hoisted_19$4, [withDirectives(createElementVNode("input", {
|
|
3909
|
-
"onUpdate:modelValue": ($event) =>
|
|
3918
|
+
"onUpdate:modelValue": ($event) => row.credit = $event,
|
|
3910
3919
|
type: "number",
|
|
3911
3920
|
step: step.value,
|
|
3912
3921
|
min: "0",
|
|
@@ -3915,7 +3924,7 @@ var OpeningBalancesForm_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
3915
3924
|
onInput: ($event) => onCreditInput(account.code)
|
|
3916
3925
|
}, null, 40, _hoisted_20$4), [[
|
|
3917
3926
|
vModelText,
|
|
3918
|
-
|
|
3927
|
+
row.credit,
|
|
3919
3928
|
void 0,
|
|
3920
3929
|
{ number: true }
|
|
3921
3930
|
]])])
|
|
@@ -3941,7 +3950,7 @@ var OpeningBalancesForm_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
3941
3950
|
}, null, 8, ["book-id", "accounts"])) : createCommentVNode("", true)], 64);
|
|
3942
3951
|
};
|
|
3943
3952
|
}
|
|
3944
|
-
}), [["__scopeId", "data-v-
|
|
3953
|
+
}), [["__scopeId", "data-v-eb577d9f"]]);
|
|
3945
3954
|
//#endregion
|
|
3946
3955
|
//#region src/vue/components/AccountsList.vue?vue&type=script&setup=true&lang.ts
|
|
3947
3956
|
var _hoisted_1$6 = {
|
|
@@ -5001,10 +5010,11 @@ var View_default = /* @__PURE__ */ defineComponent({
|
|
|
5001
5010
|
const { version: bookVersion } = useAccountingChannel(activeBookId);
|
|
5002
5011
|
useAccountingBooksChannel(() => void refetchBooks());
|
|
5003
5012
|
function pickInitialBookId() {
|
|
5004
|
-
|
|
5013
|
+
const [firstBook] = books.value;
|
|
5014
|
+
if (!firstBook) return null;
|
|
5005
5015
|
const requested = initialPayload.value.bookId;
|
|
5006
5016
|
if (requested && books.value.some((book) => book.id === requested)) return requested;
|
|
5007
|
-
return
|
|
5017
|
+
return firstBook.id;
|
|
5008
5018
|
}
|
|
5009
5019
|
async function refetchBooks() {
|
|
5010
5020
|
loadingBooks.value = true;
|