@mulmoclaude/accounting-plugin 0.2.0 → 0.3.1

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/vue.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ACCOUNTING_ACTIONS, ACCOUNTING_API, ACCOUNTING_BOOKS_CHANNEL, FISCAL_YEAR_ENDS, SUPPORTED_COUNTRY_CODES, SUPPORTED_CURRENCY_CODES, bookChannel, countryHasFeature, currentFiscalYearRange, currentQuarterRange, decemberOfPreviousYearString, errorMessage, formatAmount, formatAmountNumeric, inputStepFor, isSupportedCountryCode, lastMonthOfPreviousQuarterString, localDateString, localMonthString, localizedCountryName, localizedCurrencyName, previousFiscalYearRange, previousMonthString, previousQuarterRange, resolveFiscalYearEnd } from "./shared.js";
1
+ import { ACCOUNTING_ACTIONS, ACCOUNTING_API, ACCOUNTING_BOOKS_CHANNEL, FISCAL_YEAR_END_MONTHS, SUPPORTED_COUNTRY_CODES, SUPPORTED_CURRENCY_CODES, bookChannel, countryHasFeature, currentFiscalYearRange, currentQuarterRange, decemberOfPreviousYearString, errorMessage, fiscalYearEndMonthLabel, formatAmount, formatAmountNumeric, inputStepFor, isSupportedCountryCode, lastMonthOfPreviousQuarterString, localDateString, localMonthString, localizedCountryName, localizedCurrencyName, previousFiscalYearRange, previousMonthString, previousQuarterRange, resolveFiscalYearEnd } from "./shared.js";
2
2
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, effectScope, nextTick, normalizeClass, onMounted, onUnmounted, openBlock, reactive, ref, renderList, toDisplayString, unref, vModelSelect, vModelText, watch, watchEffect, withDirectives, withKeys, withModifiers } from "vue";
3
3
  import { createI18n } from "vue-i18n";
4
4
  //#region src/vue/hostContext.ts
@@ -58,11 +58,7 @@ var i18n = createI18n({
58
58
  countryPlaceholder: "Select a country…",
59
59
  countryHint: "The country sets the tax jurisdiction so the assistant can give country-specific advice (T-number for Japan, VAT ID for the EU, etc.).",
60
60
  fiscalYearEndLabel: "Fiscal year end",
61
- fiscalYearEndQ1: "March 31 (Q1)",
62
- fiscalYearEndQ2: "June 30 (Q2)",
63
- fiscalYearEndQ3: "September 30 (Q3)",
64
- fiscalYearEndQ4: "December 31 (Q4)",
65
- fiscalYearEndHint: "Determines the fiscal year boundary used by the date-range shortcuts in this book. Default is December 31 (Q4 — calendar year).",
61
+ fiscalYearEndHint: "Determines the fiscal year boundary used by the date-range shortcuts in this book. Pick the month whose last day the fiscal year ends on. Default is December (calendar year).",
66
62
  placeholder: "Pick a book…",
67
63
  firstRunHint: "Pick a name, currency, country, and fiscal year end for your first book. The currency is set per-book and is hard to change once you start booking entries."
68
64
  },
@@ -273,11 +269,7 @@ var i18n = createI18n({
273
269
  countryPlaceholder: "国を選択…",
274
270
  countryHint: "国を設定すると税の管轄が決まり、アシスタントが国別のアドバイス(日本のT番号、EUのVAT IDなど)を提供できます。",
275
271
  fiscalYearEndLabel: "会計年度末日",
276
- fiscalYearEndQ1: "3月31日 (Q1)",
277
- fiscalYearEndQ2: "6月30日 (Q2)",
278
- fiscalYearEndQ3: "9月30日 (Q3)",
279
- fiscalYearEndQ4: "12月31日 (Q4)",
280
- fiscalYearEndHint: "この帳簿の日付範囲ショートカットで使う会計年度の境界を決めます。デフォルトは12月31日(Q4 — 暦年)。",
272
+ fiscalYearEndHint: "この帳簿の日付範囲ショートカットで使う会計年度の境界を決めます。会計年度が終わる月(その月末日)を選びます。デフォルトは12月(暦年)。",
281
273
  placeholder: "帳簿を選択…",
282
274
  firstRunHint: "最初の帳簿の名前・通貨・国・会計年度末日を選んでください。通貨は帳簿ごとに固定で、仕訳を入力した後の変更は難しくなります。"
283
275
  },
@@ -488,11 +480,7 @@ var i18n = createI18n({
488
480
  countryPlaceholder: "选择国家/地区…",
489
481
  countryHint: "国家/地区决定税务管辖,助手可据此提供本地化建议(日本T号、欧盟VAT ID等)。",
490
482
  fiscalYearEndLabel: "财年结束日",
491
- fiscalYearEndQ1: "3月31日 (Q1)",
492
- fiscalYearEndQ2: "6月30日 (Q2)",
493
- fiscalYearEndQ3: "9月30日 (Q3)",
494
- fiscalYearEndQ4: "12月31日 (Q4)",
495
- fiscalYearEndHint: "决定本账簿日期范围快捷方式所使用的财年边界。默认 12月31日(Q4 — 自然年)。",
483
+ fiscalYearEndHint: "决定本账簿日期范围快捷方式所使用的财年边界。请选择财年结束的月份(该月最后一天)。默认 12月(自然年)。",
496
484
  placeholder: "选择账簿…",
497
485
  firstRunHint: "请为第一本账簿选择名称、货币、国家/地区与财年结束日。货币按账簿固定,登账后再更改会比较困难。"
498
486
  },
@@ -703,11 +691,7 @@ var i18n = createI18n({
703
691
  countryPlaceholder: "국가 선택…",
704
692
  countryHint: "국가를 설정하면 세무 관할이 결정되어 어시스턴트가 국가별 안내(일본 T-번호, EU VAT ID 등)를 제공할 수 있습니다.",
705
693
  fiscalYearEndLabel: "회계연도 종료일",
706
- fiscalYearEndQ1: "331일 (Q1)",
707
- fiscalYearEndQ2: "6월 30일 (Q2)",
708
- fiscalYearEndQ3: "9월 30일 (Q3)",
709
- fiscalYearEndQ4: "12월 31일 (Q4)",
710
- fiscalYearEndHint: "이 장부의 날짜 범위 단축 메뉴에 사용되는 회계연도 경계를 결정합니다. 기본값은 12월 31일(Q4 — 달력 연도)입니다.",
694
+ fiscalYearEndHint: "이 장부의 날짜 범위 단축 메뉴에 사용되는 회계연도 경계를 결정합니다. 회계연도가 끝나는 (그 달의 마지막 날)을 선택하세요. 기본값은 12월(달력 연도)입니다.",
711
695
  placeholder: "장부 선택…",
712
696
  firstRunHint: "첫 장부의 이름, 통화, 국가, 회계연도 종료일을 선택하세요. 통화는 장부별로 설정되며 분개를 시작한 뒤에는 변경이 어렵습니다."
713
697
  },
@@ -918,11 +902,7 @@ var i18n = createI18n({
918
902
  countryPlaceholder: "Selecciona un país…",
919
903
  countryHint: "El país define la jurisdicción fiscal para que el asistente pueda dar consejos específicos (T-number en Japón, ID de IVA en la UE, etc.).",
920
904
  fiscalYearEndLabel: "Cierre del ejercicio",
921
- fiscalYearEndQ1: "31 de marzo (Q1)",
922
- fiscalYearEndQ2: "30 de junio (Q2)",
923
- fiscalYearEndQ3: "30 de septiembre (Q3)",
924
- fiscalYearEndQ4: "31 de diciembre (Q4)",
925
- fiscalYearEndHint: "Define el límite del ejercicio para los atajos de rango de fechas de este libro. Por defecto: 31 de diciembre (Q4 — año natural).",
905
+ fiscalYearEndHint: "Define el límite del ejercicio para los atajos de rango de fechas de este libro. Elige el mes en cuyo último día cierra el ejercicio. Por defecto: diciembre (año natural).",
926
906
  placeholder: "Elige un libro…",
927
907
  firstRunHint: "Elige el nombre, la moneda, el país y el cierre de ejercicio de tu primer libro. La moneda se fija por libro y es difícil cambiarla una vez que empieces a registrar asientos."
928
908
  },
@@ -1133,11 +1113,7 @@ var i18n = createI18n({
1133
1113
  countryPlaceholder: "Selecione um país…",
1134
1114
  countryHint: "O país define a jurisdição fiscal para que o assistente possa dar conselhos específicos (T-number no Japão, ID de IVA na UE, etc.).",
1135
1115
  fiscalYearEndLabel: "Encerramento do exercício",
1136
- fiscalYearEndQ1: "31 de março (Q1)",
1137
- fiscalYearEndQ2: "30 de junho (Q2)",
1138
- fiscalYearEndQ3: "30 de setembro (Q3)",
1139
- fiscalYearEndQ4: "31 de dezembro (Q4)",
1140
- fiscalYearEndHint: "Define o limite do exercício social usado pelos atalhos de período deste livro. Padrão: 31 de dezembro (Q4 — ano civil).",
1116
+ fiscalYearEndHint: "Define o limite do exercício social usado pelos atalhos de período deste livro. Escolha o mês em cujo último dia o exercício encerra. Padrão: dezembro (ano civil).",
1141
1117
  placeholder: "Selecione um livro…",
1142
1118
  firstRunHint: "Escolha o nome, a moeda, o país e o encerramento do exercício do seu primeiro livro. A moeda é definida por livro e fica difícil alterar depois de começar a lançar."
1143
1119
  },
@@ -1348,11 +1324,7 @@ var i18n = createI18n({
1348
1324
  countryPlaceholder: "Sélectionner un pays…",
1349
1325
  countryHint: "Le pays définit la juridiction fiscale afin que l'assistant puisse donner des conseils ciblés (T-number au Japon, ID TVA dans l'UE, etc.).",
1350
1326
  fiscalYearEndLabel: "Clôture de l'exercice",
1351
- fiscalYearEndQ1: "31 mars (Q1)",
1352
- fiscalYearEndQ2: "30 juin (Q2)",
1353
- fiscalYearEndQ3: "30 septembre (Q3)",
1354
- fiscalYearEndQ4: "31 décembre (Q4)",
1355
- fiscalYearEndHint: "Définit la limite de l'exercice utilisée par les raccourcis de plage de dates de ce livre. Par défaut : 31 décembre (Q4 — année civile).",
1327
+ fiscalYearEndHint: "Définit la limite de l'exercice utilisée par les raccourcis de plage de dates de ce livre. Choisissez le mois au dernier jour duquel l'exercice se clôture. Par défaut : décembre (année civile).",
1356
1328
  placeholder: "Sélectionner un livre…",
1357
1329
  firstRunHint: "Choisissez le nom, la devise, le pays et la clôture de l'exercice de votre premier livre. La devise est figée par livre et difficile à changer une fois les écritures commencées."
1358
1330
  },
@@ -1563,11 +1535,7 @@ var i18n = createI18n({
1563
1535
  countryPlaceholder: "Land auswählen…",
1564
1536
  countryHint: "Das Land legt die Steuerjurisdiktion fest, damit der Assistent länderspezifische Hinweise geben kann (T-Nummer in Japan, USt-IdNr. in der EU usw.).",
1565
1537
  fiscalYearEndLabel: "Geschäftsjahresende",
1566
- fiscalYearEndQ1: "31. März (Q1)",
1567
- fiscalYearEndQ2: "30. Juni (Q2)",
1568
- fiscalYearEndQ3: "30. September (Q3)",
1569
- fiscalYearEndQ4: "31. Dezember (Q4)",
1570
- fiscalYearEndHint: "Bestimmt die Geschäftsjahresgrenze, die für die Datumsbereich-Schnellauswahl in diesem Buch verwendet wird. Standard: 31. Dezember (Q4 — Kalenderjahr).",
1538
+ fiscalYearEndHint: "Bestimmt die Geschäftsjahresgrenze, die für die Datumsbereich-Schnellauswahl in diesem Buch verwendet wird. Wähle den Monat, an dessen letztem Tag das Geschäftsjahr endet. Standard: Dezember (Kalenderjahr).",
1571
1539
  placeholder: "Buch auswählen…",
1572
1540
  firstRunHint: "Wählen Sie Name, Währung, Land und Geschäftsjahresende für Ihr erstes Buch. Die Währung ist pro Buch fest und nach den ersten Buchungen schwer zu ändern."
1573
1541
  },
@@ -1917,7 +1885,7 @@ var NewBookForm_default = /* @__PURE__ */ defineComponent({
1917
1885
  const name = ref("");
1918
1886
  const currency = ref("USD");
1919
1887
  const country = ref(guessDefaultCountry(locale.value));
1920
- const fiscalYearEnd = ref("Q4");
1888
+ const fiscalYearEnd = ref(12);
1921
1889
  const creating = ref(false);
1922
1890
  const error = ref(null);
1923
1891
  const nameInput = ref(null);
@@ -1932,9 +1900,9 @@ var NewBookForm_default = /* @__PURE__ */ defineComponent({
1932
1900
  code,
1933
1901
  label: `${code} — ${localizedCountryName(code, locale.value)}`
1934
1902
  })));
1935
- const fiscalYearEndOptions = computed(() => FISCAL_YEAR_ENDS.map((value) => ({
1903
+ const fiscalYearEndOptions = computed(() => FISCAL_YEAR_END_MONTHS.map((value) => ({
1936
1904
  value,
1937
- label: t(`pluginAccounting.bookSwitcher.fiscalYearEnd${value}`)
1905
+ label: fiscalYearEndMonthLabel(value, locale.value)
1938
1906
  })));
1939
1907
  const wrapperClass = computed(() => props.fullPage ? "flex-1 bg-white flex items-center justify-center p-6 overflow-auto" : "fixed inset-0 z-50 bg-black/20 flex items-center justify-center");
1940
1908
  const showCancel = computed(() => props.cancelable && !props.fullPage);
@@ -4708,14 +4676,14 @@ var BookSettings_default = /* @__PURE__ */ defineComponent({
4708
4676
  const showAdvanced = ref(false);
4709
4677
  const selectedName = ref(props.bookName);
4710
4678
  const selectedCountry = ref(props.country ?? "");
4711
- const selectedFiscalYearEnd = ref(props.fiscalYearEnd ?? "Q4");
4679
+ const selectedFiscalYearEnd = ref(resolveFiscalYearEnd(props.fiscalYearEnd));
4712
4680
  const countryOptions = computed(() => SUPPORTED_COUNTRY_CODES.map((code) => ({
4713
4681
  code,
4714
4682
  label: `${code} — ${localizedCountryName(code, locale.value)}`
4715
4683
  })));
4716
- const fiscalYearEndOptions = computed(() => FISCAL_YEAR_ENDS.map((value) => ({
4684
+ const fiscalYearEndOptions = computed(() => FISCAL_YEAR_END_MONTHS.map((value) => ({
4717
4685
  value,
4718
- label: t(`pluginAccounting.bookSwitcher.fiscalYearEnd${value}`)
4686
+ label: fiscalYearEndMonthLabel(value, locale.value)
4719
4687
  })));
4720
4688
  const hasPendingChanges = computed(() => {
4721
4689
  const nameChanged = selectedName.value.trim() !== props.bookName;
@@ -4788,7 +4756,7 @@ var BookSettings_default = /* @__PURE__ */ defineComponent({
4788
4756
  updateError.value = null;
4789
4757
  selectedName.value = props.bookName;
4790
4758
  selectedCountry.value = props.country ?? "";
4791
- selectedFiscalYearEnd.value = props.fiscalYearEnd ?? "Q4";
4759
+ selectedFiscalYearEnd.value = resolveFiscalYearEnd(props.fiscalYearEnd);
4792
4760
  showAdvanced.value = false;
4793
4761
  });
4794
4762
  watch(() => props.bookName, (next) => {
@@ -4798,7 +4766,7 @@ var BookSettings_default = /* @__PURE__ */ defineComponent({
4798
4766
  selectedCountry.value = next ?? "";
4799
4767
  });
4800
4768
  watch(() => props.fiscalYearEnd, (next) => {
4801
- selectedFiscalYearEnd.value = next ?? "Q4";
4769
+ selectedFiscalYearEnd.value = resolveFiscalYearEnd(next);
4802
4770
  });
4803
4771
  return (_ctx, _cache) => {
4804
4772
  return openBlock(), createElementBlock("div", _hoisted_1$2, [