buhanka-finance-app 1.75.0 → 1.76.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.
Files changed (2) hide show
  1. package/index.html +3 -2
  2. package/package.json +1 -1
package/index.html CHANGED
@@ -309,7 +309,7 @@ tr.subtotal>td:first-child{color:var(--accent);box-shadow:inset 3px 0 0 var(--ac
309
309
 
310
310
  <script>
311
311
  /* ============================================================ БУХАНКА · Финансы v2 ============================================================ */
312
- const APP_VERSION='10.9';
312
+ const APP_VERSION='10.9.1';
313
313
  const SCHEMA=9; /* версия структуры данных; растёт при доработках */
314
314
  const STORE_KEY='buhanka_finance_v9';/* НЕ МЕНЯТЬ НИКОГДА — иначе данные «слетят» при обновлении файла */
315
315
  const LEGACY_KEYS=['buhanka_finance_v8','buhanka_finance_v7','buhanka_finance_v6','buhanka_finance_v5'];
@@ -949,6 +949,7 @@ function cfGroupRaw(cat){
949
949
  if(/оборудован|ремонт|обеспечительн|капвлож/.test(c)) return 'inv';
950
950
  return 'op';
951
951
  }
952
+ function isIncomeCat(cat){ const c=(ST.opCats||[]).find(x=>x.name===cat); return c?c.grp==='in':(cat==='Выручка'); }
952
953
  function cfGroup(cat){
953
954
  const c=(ST.opCats||[]).find(x=>x.name===cat);
954
955
  if(c) return c.grp==='in'?'op':c.grp;
@@ -1018,7 +1019,7 @@ function cfDayMatrix(mi){
1018
1019
  if(g==='fin'){ fin[o.category]=(fin[o.category]||0)+(o.type==='Доход'?amt:-amt); return; }
1019
1020
  if(g==='inv'){ inv[o.category]=(inv[o.category]||0)+(o.type==='Доход'?amt:-amt); return; }
1020
1021
  if(o.type==='Доход'){ const ch=opChannel(o); inc[ch]=(inc[ch]||0)+amt; }
1021
- else if(g==='in'){ const ch=opChannel(o); inc[ch]=(inc[ch]||0)-amt; } /* возврат покупки — минус к выручке */
1022
+ else if(isIncomeCat(o.category)){ const ch=opChannel(o); inc[ch]=(inc[ch]||0)-amt; } /* возврат покупки — минус к выручке */
1022
1023
  else exp[o.category]=(exp[o.category]||0)+amt; });
1023
1024
  if(!actual){ /* прогноз: постоянные расходы + ручные правки */
1024
1025
  CHANNELS.forEach(([k])=>{ const m=planVal(mo,d,'ch:'+k); if(m!=null) inc[k]=m; });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buhanka-finance-app",
3
- "version": "1.75.0",
3
+ "version": "1.76.0",
4
4
  "description": "Buhanka bakery finance dashboard — single-file web app",
5
5
  "license": "MIT",
6
6
  "files": [