diff --git a/taxes_az/taxes_az/doctype/property_tax_gov/ARXITEKTURA_RU.md b/taxes_az/taxes_az/doctype/property_tax_gov/ARXITEKTURA_RU.md deleted file mode 100644 index 25704ce..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov/ARXITEKTURA_RU.md +++ /dev/null @@ -1,218 +0,0 @@ -# Property Tax Gov — полный разбор - -## Назначение - -Это доктайп для формирования **декларации по налогу на имущество** (Əmlak vergisinin -bəyannaməsi) для азербайджанской системы E-Taxes. Он берёт данные об основных средствах -(Asset) из ERPNext, агрегирует их, рассчитывает налог по формулам, извлечённым из самого -кабинета new.e-taxes.gov.az, и экспортирует результат в XML для подачи. - -Это часть пилота **Property Tax Gov** — нового семейства доктайпов с расчётом «по странице, -без авторизации», заменяющего старые `property_tax_return_ai`. - -## Файлы доктайпа - -| Файл | Роль | -|------|------| -| `property_tax_gov.json` | Определение полей: 3 таба, ~8 дочерних таблиц | -| `property_tax_gov.py` | Бэкенд: агрегация Asset → строки таблиц + мост к Node-калькулятору | -| `property_tax_gov.js` | Клиент: автозаполнение, расчёт формул, валидация, XML-экспорт | -| `gns_property_calc.bundle.js` | Извлечённый из кабинета ГНС `useCalculation` (эталон формул) | -| `gns_property_calc_cli.js` | stdin/stdout-обёртка Node для bundle | - ---- - -## 1. Структура формы (JSON) - -Три основных таба: - -1. **Ümumi məlumat** (Общая информация) — шапка декларации: налоговый орган - (`vergiorqanı` — большой Select со всеми территориальными управлениями), год (`il`), - ВОЕН, ФИО/название плательщика, тип плательщика (Hüquqi/Fiziki), вид деклараций и т.д. - -2. **Əmlak vergisinin hesablanması** (Расчёт налога на имущество) — 8 «cədvəl» - (расчётных таблиц): - - `vergi_hesab_1ci` / `vergi_hesab_1ci_1` — остаток на начало года (501) / на дату создания (503) - - `vergi_hesab_2ci` — остаток на конец года (504) - - `vergi_hesab_3cu` — сверхзастрахованные ОС (505) - - `vergi_hesab_4cu` — ставка налога (506), `vergi_hesab_4cu_1` — кол-во месяцев (507) - - `vergi_hesab_5ci` — рассчитанный налог (509/510) - - `vergi_hesab_6ci` — сумма к уплате в бюджет (511) - -3. **Əlavə 1** (`elave_1`) и **Əlavə 2** (`elave_2`) — два приложения, **источники данных**: - - **Əlavə 1** — имущество, **освобождённое** от налога, сгруппированное по статьям НК - (199.1, 199.4.1, 207.3 …). Ключевое поле строки — `azadolmasəbəbi` (основание освобождения). - - **Əlavə 2** — имущество, **подлежащее** налогообложению, по категориям (Binalar, - Mənzillər, Nəqliyyat vasitələri …). Ключевое поле — `vergiyəcəlbolunanəmlaklarınkateqoriyası`. - -### Ключевая развилка: два режима - -Два взаимоисключающих чекбокса в шапке управляют всей логикой: - -- **`tam_il`** (Tam İl) — компания работала **полный год**. -- **`il_erzinde`** (İl Ərzində) — компания **создана в течение года** (неполный период). - -Клиентский код (`setup_checkbox_exclusivity`, обработчики `tam_il`/`il_erzinde`) гарантирует, -что ровно один из них всегда включён. - ---- - -## 2. Автозаполнение из Asset (Python-бэкенд) - -Когда выбран год и режим, JS вызывает `reload_property_tax_data()` → серверный -`populate_property_tax_tables()`. - -**Поток данных:** - -``` -tabAsset (docstatus=1, company, purchase_date<=to_date) - │ - ├─ taxable_asset_type заполнен ──→ get_taxable_assets_aggregated() ──→ Əlavə 2 - └─ industrial/tax_exempt_tax_article ─→ get_tax_exempt_assets_aggregated() ─→ Əlavə 1 -``` - -Сердце расчёта — `get_asset_balances_using_standard_logic()`. Это **точная репликация -стандартного отчёта ERPNext «Asset Depreciations and Balances»**: - -- `get_asset_cost_details` — валовая стоимость (на начало периода, новые покупки, - проданные/списанные/капитализированные); -- `get_asset_depreciation_details` — накопленная амортизация из GL Entry - (через `tabAsset Category Account`); -- `get_asset_value_adjustments` — переоценки. - -Из них считается `net_asset_value_as_on_from_date/to_date` (остаточная стоимость). -Плюс `insurance_value` = (застрахованная сумма − валовая стоимость), если объект -застрахован выше стоимости. - -**Версионная совместимость:** код проверяет колонки таблицы Asset и сам выбирает -`gross_purchase_amount` / `net_purchase_amount` / `purchase_amount`, потому что ERPNext v15 -переименовал поле (`gross_purchase_amount` → `net_purchase_amount`). - -**Сопоставление со строками таблиц** — нечёткое (fuzzy): -- `extract_article_number()` достаёт «199.1» из «Vergi Məcəlləsinin 199.1-ci maddəsinə əsasən» - регуляркой; -- `find_matching_azadolma_sebeb()` ищет строку Əlavə 1, чей `azadolmasəbəbi` содержит этот номер; -- `find_matching_category()` сопоставляет `taxable_asset_type` со строкой Əlavə 2 по частичному - вхождению («Mənzillər» ↔ «1.5 Mənzillər»). - -**Бизнес-правило для İl Ərzində:** если у компании, созданной в течение года, нет новых покупок -(`value_of_new_purchase < 0.01`), все поля строки обнуляются. Также в зависимости от режима -данные кладутся в разные колонки: в `tam_il` — в «остаток на начало года» (501), -в `il_erzinde` — в «принято на учёт в течение года» (503). - -Сервер возвращает не строки, а **карты `{ключ_строки: {поле: значение}}`**, а уже клиент -применяет их к существующим строкам через `update_child_table_values()`. - ---- - -## 3. Расчётный движок (клиент) - -Здесь самое тонкое место. Файл содержит **два поколения кода расчёта**, и работает только второе. - -### Старый код (строки 269–919) -Ручные функции: `calculate_509_1`, `calculate_509_2`, `calculate_binalar_totals`, -`calculate_elave_*_totals`, `calculate_vergi_hesab_3cu_totals`. Они напрямую считали формулы: -- `509.1 = ((501.1 + 504.1) / 2) * 1% + 505.1 * 1%` (полный год); -- `509.2 = ((503.1 + 504.1) / 24 * 507) * 1% + 505.1 * 1%` (неполный год, 507 = число месяцев). - -### Новый код (строки 1042–1264) — **активный** - -В конце файла все шесть `calculate_*` **переопределены заново** как тонкие делегаторы: - -```js -function calculate_509_1(frm) { gns_property_recalc(frm); } -// ... и т.д. -``` - -Это работает за счёт **hoisting функций в JS: последнее объявление побеждает**. То есть все -старые триггеры (обработчики дочерних таблиц на строках 924–1040) теперь незаметно вызывают -новый единый движок `gns_property_recalc()`. Старые тела функций мертвы, но оставлены. - -**Как считает новый движок** (`_gns_property_recalc_now`): - -1. `ptgov_sum()` суммирует строки `elave_1` → объект `a1` (приложение 1, освобождённые), - `elave_2` → `a2` (облагаемые). При суммировании Əlavə 2 исключаются «итоговые» строки — - родитель «1. Binalar» и «CƏMİ» (`ptgov_is_excluded_e2`). -2. `full = !il_erzinde`, `months` берётся из строки 507. -3. `ptgov_calc_byArticle()` строит карту `{номер_статьи: значение}` — те же формулы, что и в - старом коде, но в одном месте, с округлением half-up до 2 знаков (`ptgov_round2`). Облагается - **только** Əlavə 2; 511 (к уплате) = 509. -4. Результаты разносятся по всем выходным cədvəl-таблицам: по номеру статьи (`ptgov_article` - парсит «509.1» из метки `göstəricilər`) в поле `manatla`; ставка 506 → `faizlə = 1`. - -**Защита от рекурсии:** флаг `frm.__ptgov_writing` ставится перед записью значений, чтобы наши же -`set_value` не зациклили обработчики `manatla`. Плюс debounce 250 мс (`_ptgov_timer`). - -### Про Node-мост (`compute_via_gns` + bundle) -По задумке предполагалось гонять **родной калькулятор кабинета** (`useCalculation`, извлечённый -в `gns_property_calc.bundle.js`) офлайн через Node-subprocess. Сейчас же, как явно сказано в -комментарии (строки 1103–1107), **формулы переписаны нативно в JS**, а bundle и -`compute_via_gns` остаются в репо как **эталонный источник**, из которого формулы выведены и -сверены. То есть в рантайме Node не вызывается — всё считается в браузере. - ---- - -## 4. Условная логика отображения - -`apply_conditional_table_logic()` показывает/прячет таблицы под режим: -- `tam_il` → видна `vergi_hesab_1ci` (501); строки 509.1/511.1 в 5-й/6-й таблицах; -- `il_erzinde` → видны `vergi_hesab_1ci_1` (503) и `vergi_hesab_4cu_1` (месяцы); строки - 509.2/511.2; колонки 501.x скрываются (`toggle_field_readonly`). - -Строки 5-й/6-й таблиц **полностью пересоздаются** под режим (`filter_vergi_hesab_5ci_rows`), -при этом старые значения сохраняются в `window.property_tax_saved_values` и восстанавливаются. - -`calculate_months_for_vergi_hesab_4cu_1()` (Python) находит самый ранний Asset по -`available_for_use_date` в году и считает число месяцев до конца года для формулы 509.2. - ---- - -## 5. Валидация - -`validate_minimum_asset_value()` — только в режиме `il_erzinde`: стоимость ОС в колонках -503.1/503.2 не может быть **< 500 манат** (но > 0). При нарушении: -- блокирует сохранение (`frm.validated = false`); -- подсвечивает ячейки красным (`highlight_invalid_cells`); -- показывает HTML-предупреждение и ставит 🔴 в заголовок таба (`update_tab_title`). - ---- - -## 6. Шаблонные строки и кнопки - -- `ptgov_ensure_rows()` — при `refresh` заполняет пустые дочерние таблицы каноническими наборами - строк (`PTGOV_E1_ROWS` — 23 статьи освобождения, `PTGOV_E2_ROWS` — 12 категорий, cədvəl-таблицы - — из `options` поля `göstəricilər`). -- `ptgov_set_readonly()` — делает вычисляемые колонки (`manatla`, `faizlə`) read-only. -- Кнопки: **«Şablon sətirləri yarat»** (создать шаблонные строки), **«ГНС ilə hesabla»** - (пересчитать вручную), **«Export XML»** (через `xml_mapping_tool.generate_xml`). - ---- - -## Сводный поток работы - -``` -Пользователь: выбирает год + режим (Tam İl / İl Ərzində) - ↓ -JS reload_property_tax_data → Python populate_property_tax_tables - ↓ -tabAsset → агрегация (ERPNext balance-логика) → карты {строка: значения} - ↓ -JS раскладывает по Əlavə 1 / Əlavə 2 - ↓ -любое изменение строки → gns_property_recalc (debounce 250ms) - ↓ -ptgov_sum → ptgov_calc_byArticle → разнос по cədvəl (501→511) - ↓ -валидация (min 500 ман.) → Export XML → подача в E-Taxes -``` - ---- - -## Главное при правках этого файла - -1. Активен только **второй** блок расчёта (делегаторы внизу). Старые `calculate_509_*` — - мёртвый код, переопределён hoisting'ом. Правь `ptgov_calc_byArticle`, а не их. -2. Сопоставление Asset ↔ строки таблиц — **нечёткое по подстроке**, легко ломается при - изменении меток строк. -3. Поля имеют азербайджанские имена с диакритикой (`göstəricilər`, `manatla`) — копируй точно. -4. Node-мост (`compute_via_gns`) сейчас не в рантайме, а как эталон формул. diff --git a/taxes_az/taxes_az/doctype/property_tax_gov/__init__.py b/taxes_az/taxes_az/doctype/property_tax_gov/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/taxes_az/taxes_az/doctype/property_tax_gov/gns_property_calc.bundle.js b/taxes_az/taxes_az/doctype/property_tax_gov/gns_property_calc.bundle.js deleted file mode 100644 index 3c4fb1d..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov/gns_property_calc.bundle.js +++ /dev/null @@ -1,72 +0,0 @@ -// AUTO-GENERATED. GNS property-tax calc (useCalculation, mod 87523), self-contained. -// Real GNS code: modules 26769, 594291, 87523 (87523=calc, 594291=decimal lib, 26769=enums). -// Stubbed: form plumbing + 623225 indicator maps rebuilt from real source. -'use strict'; -(function () { - var M = {}; - M["26769"] = function (a,i,n){n.r(i),n.d(i,{Appendix1Indicators:()=>I,Appendix2Indicators:()=>L,CalculatedTaxIndicators:()=>f,CalculationIndicators:()=>S,CreateDateIndicators:()=>z,EndYearIndicators:()=>x,ExcessPricesIndicators:()=>M,LiquidateIndicators:()=>V,MonthCountFromStartPeriodIndicator:()=>A,MonthCountToLiquidationIndicator:()=>C,ObjectActivity:()=>v,PrePeriodIndicators:()=>h,PrefillId:()=>g,ShouldBePaidIndicators:()=>p,TaxDegreeIndicator:()=>T});var l,c,t,r,s,d,o,e,m,y,_,u,q,b,k,v=((l={}).OBJECT_FULL_ACTIVITY="OBJECT_FULL_ACTIVITY",l.OBJECT_ESTABLISHED="OBJECT_ESTABLISHED",l.LIQUIDATION="LIQUIDATION",l),g=((c={}).TAX_FREE="taxFree",c.TAXABLE="taxable",c),z=((t={})._1033="_1033",t._1022="_1022",t._1023="_1023",t._1024="_1024",t),V=((r={})._1035="_1035",r._1019="_1019",r._1020="_1020",r._1021="_1021",r),h=((s={})._1015="_1015",s._1016="_1016",s._1017="_1017",s._1018="_1018",s),x=((d={})._1034="_1034",d._1025="_1025",d._1026="_1026",d._1027="_1027",d),M=((o={})._1029="_1029",o._1028="_1028",o._1030="_1030",o),f=((e={})._1012="_1012",e._1013="_1013",e._1014="_1014",e._8001="_8001",e),p=((m={})._8003="_8003",m._8004="_8004",m._8005="_8005",m),T=((y={}).taxDegree="taxDegree",y),A=((_={}).monthCountFromStartPeriod="monthCountFromStartPeriod",_),C=((u={}).monthCountToLiquidation="monthCountToLiquidation",u),I=((q={})._1199="_1199",q._1200="_1200",q._1201="_1201",q._1202="_1202",q._1203="_1203",q._1218="_1218",q._1204="_1204",q._1205="_1205",q._1206="_1206",q._1207="_1207",q._1209="_1209",q._1210="_1210",q._1211="_1211",q._1212="_1212",q._1219="_1219",q._1220="_1220",q._1221="_1221",q._1555="_1555",q._1222="_1222",q._1223="_1223",q._1556="_1556",q._1213="_1213",q._1214="_1214",q._1215="_1215",q._1100="_1100",q),L=((b={})._5001="_5001",b._5002="_5002",b._5003="_5003",b._5004="_5004",b._5005="_5005",b._5006="_5006",b._5007="_5007",b._5008="_5008",b._5009="_5009",b._5012="_5012",b._5010="_5010",b._5011="_5011",b),S=((k={})._1015="_1015",k._1016="_1016",k._1017="_1017",k._1018="_1018",k._1035="_1035",k._1019="_1019",k._1020="_1020",k._1021="_1021",k._1033="_1033",k._1022="_1022",k._1023="_1023",k._1024="_1024",k._1034="_1034",k._1025="_1025",k._1026="_1026",k._1027="_1027",k._1029="_1029",k._1028="_1028",k._1030="_1030",k._1012="_1012",k._1013="_1013",k._1014="_1014",k._8001="_8001",k._8003="_8003",k._8004="_8004",k._8005="_8005",k)}; - M["594291"] = function (e){e.exports=function(){function e(o,a){if(!(this instanceof e))return new e(o,a);var s=Math.pow(10,(a=Object.assign({},n,a)).precision);this.intValue=o=t(o,a),this.value=o/s,a.increment=a.increment||1/s,a.groups=a.useVedic?r:i,this.s=a,this.p=s}function t(t,n){var i=!(2I});var a=i(594291),n=i.n(a),o=i(349785),d=i(837592),r=i(385548),c=i(871076),l=i(191673),s=i(26769),u=i(623225);let I=e=>{var t,i,a,I,p,v,x,_,T,A,m,E,O,V,S,y,P;let C,h,N,{objectActivity:L}=e,f=(0,o.xW)(),b=f.watch(u.stepKey),D=f.watch(c.stepKey),g=f.watch(l.stepKey),B=(I={[s.ObjectActivity.LIQUIDATION]:{[u.prePeriodIndicators["501"]]:n()(null==g?void 0:g.periodStartTotal).add(null==b||null==(m=b.prePeriodCalculations)?void 0:m[u.prePeriodIndicators["501.2"]]).value,[u.prePeriodIndicators["501.1"]]:null==g?void 0:g.periodStartTotal,[u.prePeriodIndicators["501.2"]]:null==D?void 0:D.periodStartTotal},[s.ObjectActivity.OBJECT_FULL_ACTIVITY]:{[u.prePeriodIndicators["501"]]:n()(null==g?void 0:g.periodStartTotal).add(null==b||null==(E=b.prePeriodCalculations)?void 0:E[u.prePeriodIndicators["501.2"]]).value,[u.prePeriodIndicators["501.1"]]:null==g?void 0:g.periodStartTotal,[u.prePeriodIndicators["501.2"]]:null==D?void 0:D.periodStartTotal},[s.ObjectActivity.OBJECT_ESTABLISHED]:{[u.prePeriodIndicators["501"]]:void 0,[u.prePeriodIndicators["501.1"]]:void 0,[u.prePeriodIndicators["501.1.1"]]:void 0,[u.prePeriodIndicators["501.2"]]:void 0}},void 0===I)?void 0:I[L],j=(p={[s.ObjectActivity.LIQUIDATION]:{[u.liquidateIndicators["502"]]:n()(null==g?void 0:g.onCancelDateTotal).add(null==D?void 0:D.removedTotal).value,[u.liquidateIndicators["502.1"]]:null==g?void 0:g.onCancelDateTotal,[u.liquidateIndicators["502.2"]]:null==D?void 0:D.removedTotal},[s.ObjectActivity.OBJECT_ESTABLISHED]:{[u.liquidateIndicators["502"]]:void 0,[u.liquidateIndicators["502.1"]]:void 0,[u.liquidateIndicators["502.1.1"]]:void 0,[u.liquidateIndicators["502.2"]]:void 0},[s.ObjectActivity.OBJECT_FULL_ACTIVITY]:{[u.liquidateIndicators["502"]]:void 0,[u.liquidateIndicators["502.1"]]:void 0,[u.liquidateIndicators["502.1.1"]]:void 0,[u.liquidateIndicators["502.2"]]:void 0}},void 0===p)?void 0:p[L],R=(v={[s.ObjectActivity.OBJECT_ESTABLISHED]:{[u.createDateIndicators["503"]]:n()(null==g?void 0:g.onCreateDateTotal).add(null==D?void 0:D.createdTotal).value,[u.createDateIndicators["503.1"]]:null==g?void 0:g.onCreateDateTotal,[u.createDateIndicators["503.2"]]:null==D?void 0:D.createdTotal},[s.ObjectActivity.LIQUIDATION]:{[u.createDateIndicators["503"]]:void 0,[u.createDateIndicators["503.1"]]:void 0,[u.createDateIndicators["503.1.1"]]:void 0,[u.createDateIndicators["503.2"]]:void 0},[s.ObjectActivity.OBJECT_FULL_ACTIVITY]:{[u.createDateIndicators["503"]]:void 0,[u.createDateIndicators["503.1"]]:void 0,[u.createDateIndicators["503.1.1"]]:void 0,[u.createDateIndicators["503.2"]]:void 0}},void 0===v)?void 0:v[L],Y=(x={[s.ObjectActivity.OBJECT_ESTABLISHED]:{[u.endYearIndicators["504"]]:null==(O=n()(null==g?void 0:g.periodEndTotal).add(null==D?void 0:D.endYearTotal))?void 0:O.value,[u.endYearIndicators["504.1"]]:null==g?void 0:g.periodEndTotal,[u.endYearIndicators["504.2"]]:null==D?void 0:D.endYearTotal},[s.ObjectActivity.OBJECT_FULL_ACTIVITY]:{[u.endYearIndicators["504"]]:null==(V=n()(null==g?void 0:g.periodEndTotal).add(null==D?void 0:D.endYearTotal))?void 0:V.value,[u.endYearIndicators["504.1"]]:null==g?void 0:g.periodEndTotal,[u.endYearIndicators["504.2"]]:null==D?void 0:D.endYearTotal},[s.ObjectActivity.LIQUIDATION]:{[u.endYearIndicators["504"]]:void 0,[u.endYearIndicators["504.1"]]:void 0,[u.endYearIndicators["504.1.1"]]:void 0,[u.endYearIndicators["504.2"]]:void 0}},void 0===x)?void 0:x[L],K=(_={[s.ObjectActivity.LIQUIDATION]:{monthCountFromStartPeriod:void 0,monthCountToLiquidation:null==b?void 0:b.monthCountToLiquidation},[s.ObjectActivity.OBJECT_ESTABLISHED]:{monthCountFromStartPeriod:null==b?void 0:b.monthCountFromStartPeriod,monthCountToLiquidation:void 0},[s.ObjectActivity.OBJECT_FULL_ACTIVITY]:{monthCountFromStartPeriod:void 0,monthCountToLiquidation:void 0}},void 0===_)?void 0:_[L],F={[u.excessPricesIndicators["505"]]:n()(null==g?void 0:g.excessInsuredTotal).add(null==D?void 0:D.overTotal).value,[u.excessPricesIndicators["505.1"]]:null==g?void 0:g.excessInsuredTotal,[u.excessPricesIndicators["505.2"]]:null==D?void 0:D.overTotal},q=(C=n()(null==g?void 0:g.periodStartTotal,{precision:4}).add(null==g?void 0:g.periodEndTotal).divide(200).add(n()(null==g?void 0:g.excessInsuredTotal,{precision:4}).divide(100)).value,h=n()(null==g?void 0:g.onCreateDateTotal,{precision:4}).add(null==g?void 0:g.periodEndTotal).divide(24).multiply(null==b?void 0:b.monthCountFromStartPeriod).divide(100).add(n()(null==g?void 0:g.excessInsuredTotal,{precision:4}).divide(100)).value,N=n()(null==g?void 0:g.periodStartTotal,{precision:10}).add(null==g?void 0:g.onCancelDateTotal).divide(24).multiply(null==b?void 0:b.monthCountToLiquidation).divide(100).add(n()(null==g?void 0:g.excessInsuredTotal,{precision:2}).divide(100)).value,T={[s.ObjectActivity.LIQUIDATION]:{[u.calculatedTaxIndicators["509.1"]]:void 0,[u.calculatedTaxIndicators["509.2"]]:void 0,[u.calculatedTaxIndicators["509.3"]]:n()(N).value},[s.ObjectActivity.OBJECT_ESTABLISHED]:{[u.calculatedTaxIndicators["509.1"]]:void 0,[u.calculatedTaxIndicators["509.3"]]:void 0,[u.calculatedTaxIndicators["509.2"]]:n()(h).value},[s.ObjectActivity.OBJECT_FULL_ACTIVITY]:{[u.calculatedTaxIndicators["509.2"]]:void 0,[u.calculatedTaxIndicators["509.3"]]:void 0,[u.calculatedTaxIndicators["509.1"]]:n()(C).value}},void 0===T)?void 0:T[L],w=(A={[s.ObjectActivity.LIQUIDATION]:{[u.shouldBePaidTaxIndicators["511.1"]]:void 0,[u.shouldBePaidTaxIndicators["511.2"]]:void 0,[u.shouldBePaidTaxIndicators["511.3"]]:n()(null==q?void 0:q[u.calculatedTaxIndicators["509.3"]]).subtract(null==b||null==(S=b.calculatedTax)?void 0:S[u.calculatedTaxIndicators["510"]]).value},[s.ObjectActivity.OBJECT_ESTABLISHED]:{[u.shouldBePaidTaxIndicators["511.1"]]:void 0,[u.shouldBePaidTaxIndicators["511.3"]]:void 0,[u.shouldBePaidTaxIndicators["511.2"]]:n()(null==q?void 0:q[u.calculatedTaxIndicators["509.2"]]).subtract(null==b||null==(y=b.calculatedTax)?void 0:y[u.calculatedTaxIndicators["510"]]).value},[s.ObjectActivity.OBJECT_FULL_ACTIVITY]:{[u.shouldBePaidTaxIndicators["511.2"]]:void 0,[u.shouldBePaidTaxIndicators["511.3"]]:void 0,[u.shouldBePaidTaxIndicators["511.1"]]:n()(null==q?void 0:q[u.calculatedTaxIndicators["509.1"]]).subtract(null==b||null==(P=b.calculatedTax)?void 0:P[u.calculatedTaxIndicators["510"]]).value}},void 0===A)?void 0:A[L];return(0,r.Pc)("".concat(u.stepKey,".prePeriodCalculations.").concat([u.prePeriodIndicators["501"]]),null==B?void 0:B[u.prePeriodIndicators["501"]]),(0,r.Pc)("".concat(u.stepKey,".prePeriodCalculations.").concat([u.prePeriodIndicators["501.1"]]),null==B?void 0:B[u.prePeriodIndicators["501.1"]]),(0,r.Pc)("".concat(u.stepKey,".prePeriodCalculations.").concat([u.prePeriodIndicators["501.2"]]),null==B?void 0:B[u.prePeriodIndicators["501.2"]]),(0,r.Pc)("".concat(u.stepKey,".liquidateCalculations.").concat([u.liquidateIndicators["502"]]),null==j?void 0:j[u.liquidateIndicators["502"]]),(0,r.Pc)("".concat(u.stepKey,".liquidateCalculations.").concat([u.liquidateIndicators["502.1"]]),null==j?void 0:j[u.liquidateIndicators["502.1"]]),(0,r.Pc)("".concat(u.stepKey,".liquidateCalculations.").concat([u.liquidateIndicators["502.2"]]),null==j?void 0:j[u.liquidateIndicators["502.2"]]),(0,r.Pc)("".concat(u.stepKey,".createDateCalculations.").concat([u.createDateIndicators["503"]]),null==R?void 0:R[u.createDateIndicators["503"]]),(0,r.Pc)("".concat(u.stepKey,".createDateCalculations.").concat([u.createDateIndicators["503.1"]]),null==R?void 0:R[u.createDateIndicators["503.1"]]),(0,r.Pc)("".concat(u.stepKey,".createDateCalculations.").concat([u.createDateIndicators["503.2"]]),null==R?void 0:R[u.createDateIndicators["503.2"]]),(0,r.Pc)("".concat(u.stepKey,".endYearCalculations.").concat([u.endYearIndicators["504"]]),null==Y?void 0:Y[u.endYearIndicators["504"]]),(0,r.Pc)("".concat(u.stepKey,".endYearCalculations.").concat([u.endYearIndicators["504.1"]]),null==Y?void 0:Y[u.endYearIndicators["504.1"]]),(0,r.Pc)("".concat(u.stepKey,".endYearCalculations.").concat([u.endYearIndicators["504.2"]]),null==Y?void 0:Y[u.endYearIndicators["504.2"]]),(0,r.Pc)("".concat(u.stepKey,".excessPrices.").concat([u.excessPricesIndicators["505"]]),null==F?void 0:F[u.excessPricesIndicators["505"]]),(0,r.Pc)("".concat(u.stepKey,".excessPrices.").concat([u.excessPricesIndicators["505.1"]]),null==F?void 0:F[u.excessPricesIndicators["505.1"]]),(0,r.Pc)("".concat(u.stepKey,".excessPrices.").concat([u.excessPricesIndicators["505.2"]]),null==F?void 0:F[u.excessPricesIndicators["505.2"]]),(0,r.Pc)("".concat(u.stepKey,".monthCountFromStartPeriod"),null==K?void 0:K.monthCountFromStartPeriod),(0,r.Pc)("".concat(u.stepKey,".monthCountToLiquidation"),null==K?void 0:K.monthCountToLiquidation),(0,r.Pc)("".concat(u.stepKey,".calculatedTax.").concat(u.calculatedTaxIndicators["509.1"]),null==q?void 0:q[u.calculatedTaxIndicators["509.1"]]),(0,r.Pc)("".concat(u.stepKey,".calculatedTax.").concat(u.calculatedTaxIndicators["509.2"]),null==q?void 0:q[u.calculatedTaxIndicators["509.2"]]),(0,r.Pc)("".concat(u.stepKey,".calculatedTax.").concat(u.calculatedTaxIndicators["509.3"]),null==q?void 0:q[u.calculatedTaxIndicators["509.3"]]),(0,r.Pc)("".concat(u.stepKey,".shouldBePaidTax.").concat(u.shouldBePaidTaxIndicators["511.1"]),null==w?void 0:w[u.shouldBePaidTaxIndicators["511.1"]]),(0,r.Pc)("".concat(u.stepKey,".shouldBePaidTax.").concat(u.shouldBePaidTaxIndicators["511.2"]),null==w?void 0:w[u.shouldBePaidTaxIndicators["511.2"]]),(0,r.Pc)("".concat(u.stepKey,".shouldBePaidTax.").concat(u.shouldBePaidTaxIndicators["511.3"]),null==w?void 0:w[u.shouldBePaidTaxIndicators["511.3"]]),(0,r.Pc)("".concat(c.stepKey,".taxFree.validation.").concat(u.calculatedTaxIndicators["509.1"]),null!=(t=null==q?void 0:q[u.calculatedTaxIndicators["509.1"]])?t:0),(0,r.Pc)("".concat(c.stepKey,".taxFree.validation.").concat(u.calculatedTaxIndicators["509.2"]),null!=(i=null==q?void 0:q[u.calculatedTaxIndicators["509.2"]])?i:0),(0,r.Pc)("".concat(c.stepKey,".taxFree.validation.").concat(u.calculatedTaxIndicators["509.3"]),null!=(a=null==q?void 0:q[u.calculatedTaxIndicators["509.3"]])?a:0),(0,d.useTriggerEffect)(f,"".concat(u.stepKey,".prePeriodCalculations.").concat([u.prePeriodIndicators["501.1"]]),"".concat(u.stepKey,".prePeriodCalculations.").concat([u.prePeriodIndicators["501.1.1"]])),(0,d.useTriggerEffect)(f,"".concat(u.stepKey,".liquidateCalculations.").concat([u.liquidateIndicators["502.1"]]),"".concat(u.stepKey,".liquidateCalculations.").concat([u.liquidateIndicators["502.1.1"]])),(0,d.useTriggerEffect)(f,"".concat(u.stepKey,".createDateCalculations.").concat([u.createDateIndicators["503.1"]]),"".concat(u.stepKey,".createDateCalculations.").concat([u.createDateIndicators["503.1.1"]])),(0,d.useTriggerEffect)(f,"".concat(u.stepKey,".endYearCalculations.").concat([u.endYearIndicators["504.1"]]),"".concat(u.stepKey,".endYearCalculations.").concat([u.endYearIndicators["504.1.1"]])),b}}; - - var cache = {}; - function req(id) { - id = String(id); - if (cache[id]) return cache[id].exports; - var m = cache[id] = { exports: {} }; - M[id].call(m.exports, m, m.exports, req); - return m.exports; - } - req.n = function (m) { return (m && m.__esModule) ? function () { return m.default; } : function () { return m; }; }; - req.d = function (e, defs) { for (var k in defs) if (!Object.prototype.hasOwnProperty.call(e, k)) Object.defineProperty(e, k, { enumerable: true, get: defs[k] }); }; - req.r = function (e) { if (typeof Symbol !== 'undefined' && Symbol.toStringTag) Object.defineProperty(e, Symbol.toStringTag, { value: 'Module' }); Object.defineProperty(e, '__esModule', { value: true }); }; - req.o = function (o, k) { return Object.prototype.hasOwnProperty.call(o, k); }; - - var ctx = { input: {}, out: {} }; - var IND = req('26769'); - // ---- stubs (seed cache so req() returns them; their deps never load) ---- - cache['349785'] = { exports: { xW: function () { return { watch: function (k) { return ctx.input[k]; } }; } } }; - cache['385548'] = { exports: { Pc: function (path, value) { ctx.out[path] = value; } } }; - cache['837592'] = { exports: { useTriggerEffect: function () {} } }; - cache['871076'] = { exports: { stepKey: 'appendix1' } }; - cache['191673'] = { exports: { stepKey: 'appendix2' } }; - cache['623225'] = { exports: { - stepKey: "calculation", - prePeriodIndicators: (function(u){ return ({[u.CalculationIndicators._1015]:"501",[u.CalculationIndicators._1016]:"501.1",[u.CalculationIndicators._1017]:"501.1.1",[u.CalculationIndicators._1018]:"501.2",501:u.CalculationIndicators._1015,"501.1":u.CalculationIndicators._1016,"501.1.1":u.CalculationIndicators._1017,"501.2":u.CalculationIndicators._1018}); })(IND), - endYearIndicators: (function(u){ return ({[u.CalculationIndicators._1034]:"504",[u.CalculationIndicators._1025]:"504.1",[u.CalculationIndicators._1026]:"504.1.1",[u.CalculationIndicators._1027]:"504.2",504:u.CalculationIndicators._1034,"504.1":u.CalculationIndicators._1025,"504.1.1":u.CalculationIndicators._1026,"504.2":u.CalculationIndicators._1027}); })(IND), - excessPricesIndicators: (function(u){ return ({[u.CalculationIndicators._1029]:"505",[u.CalculationIndicators._1028]:"505.1",[u.CalculationIndicators._1030]:"505.2",505:u.CalculationIndicators._1029,"505.1":u.CalculationIndicators._1028,"505.2":u.CalculationIndicators._1030}); })(IND), - calculatedTaxIndicators: (function(u){ return ({[u.CalculationIndicators._1012]:"509.1",[u.CalculationIndicators._1013]:"509.2",[u.CalculationIndicators._1014]:"509.3",[u.CalculationIndicators._8001]:"510","509.1":u.CalculationIndicators._1012,"509.2":u.CalculationIndicators._1013,"509.3":u.CalculationIndicators._1014,510:u.CalculationIndicators._8001}); })(IND), - liquidateIndicators: (function(u){ return ({[u.CalculationIndicators._1035]:"502",[u.CalculationIndicators._1019]:"502.1",[u.CalculationIndicators._1020]:"502.1.1",[u.CalculationIndicators._1021]:"502.2",502:u.CalculationIndicators._1035,"502.1":u.CalculationIndicators._1019,"502.1.1":u.CalculationIndicators._1020,"502.2":u.CalculationIndicators._1021}); })(IND), - createDateIndicators: (function(u){ return ({[u.CalculationIndicators._1033]:"503",[u.CalculationIndicators._1022]:"503.1",[u.CalculationIndicators._1023]:"503.1.1",[u.CalculationIndicators._1024]:"503.2",503:u.CalculationIndicators._1033,"503.1":u.CalculationIndicators._1022,"503.1.1":u.CalculationIndicators._1023,"503.2":u.CalculationIndicators._1024}); })(IND), - shouldBePaidTaxIndicators: (function(u){ return ({[u.CalculationIndicators._8003]:"511.1",[u.CalculationIndicators._8004]:"511.2",[u.CalculationIndicators._8005]:"511.3","511.1":u.CalculationIndicators._8003,"511.2":u.CalculationIndicators._8004,"511.3":u.CalculationIndicators._8005}); })(IND), - } }; - - var useCalculation = req('87523').useCalculation; - - // code -> article number, merged from all 623225 indicator maps (they are bidirectional) - var MAPS = cache['623225'].exports; - var CODE2ART = {}; - ['prePeriodIndicators','endYearIndicators','excessPricesIndicators','calculatedTaxIndicators', - 'liquidateIndicators','createDateIndicators','shouldBePaidTaxIndicators'].forEach(function (nm) { - var m = MAPS[nm] || {}; - for (var k in m) if (k.charAt(0) === '_') CODE2ART[k] = m[k]; // entries keyed by code -> article - }); - - function calc(input) { - input = input || {}; - ctx.input = { calculation: input.calculation || {}, appendix1: input.appendix1 || {}, appendix2: input.appendix2 || {} }; - ctx.out = {}; - useCalculation({ objectActivity: input.objectActivity }); - // flat {articleNumber: value} for non-null calculation.* outputs - var byArticle = {}; - for (var path in ctx.out) { - var v = ctx.out[path]; - if (v === undefined || v === null) continue; - if (path.indexOf('calculation.') !== 0) continue; // ignore appendix*.validation mirrors - var code = path.split('.').pop(); - var art = CODE2ART[code]; - if (art != null) byArticle[art] = v; - } - return { paths: ctx.out, byArticle: byArticle }; - } - module.exports = { calc: calc }; -})(); diff --git a/taxes_az/taxes_az/doctype/property_tax_gov/gns_property_calc_cli.js b/taxes_az/taxes_az/doctype/property_tax_gov/gns_property_calc_cli.js deleted file mode 100644 index da79b5a..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov/gns_property_calc_cli.js +++ /dev/null @@ -1,12 +0,0 @@ -// CLI: stdin JSON model -> stdout JSON of computed {path: value}. Used by property_tax_gov.py. -const { calc } = require('./gns_property_calc.bundle.js'); -let d = ''; -process.stdin.on('data', (c) => (d += c)); -process.stdin.on('end', () => { - try { - process.stdout.write(JSON.stringify(calc(JSON.parse(d || '{}')))); - } catch (e) { - process.stderr.write(String((e && e.stack) || e)); - process.exit(1); - } -}); diff --git a/taxes_az/taxes_az/doctype/property_tax_gov/property_tax_gov.js b/taxes_az/taxes_az/doctype/property_tax_gov/property_tax_gov.js deleted file mode 100644 index c6c0b8b..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov/property_tax_gov.js +++ /dev/null @@ -1,1264 +0,0 @@ -// Код для экспорта XML и автоматического заполнения из Asset -frappe.ui.form.on('Property Tax Gov', { - refresh: function(frm) { - // Add Export XML button - frm.add_custom_button(__('Export XML'), function() { - frappe.call({ - method: 'taxes_az.taxes_az.doctype.xml_mapping_tool.xml_mapping_tool.generate_xml', - args: { - mapping_tool: 'Property Tax Gov', - doctype: 'Property Tax Gov', - docname: frm.docname - }, - callback: function(r) { - if (r.message) { - // Создаем временный элемент для скачивания - var element = document.createElement('a'); - element.setAttribute('href', 'data:text/xml;charset=utf-8,' + encodeURIComponent(r.message)); - element.setAttribute('download', frm.docname + '.xml'); - element.style.display = 'none'; - document.body.appendChild(element); - element.click(); - document.body.removeChild(element); - - frappe.show_alert({ - message: __('XML file generated and downloaded'), - indicator: 'green' - }); - } - } - }); - }, __('Actions')); - - // Ensure checkbox exclusivity on load - setup_checkbox_exclusivity(frm); - - // Toggle field readonly based on il_erzinde checkbox - toggle_field_readonly(frm); - - // Apply conditional table logic after client scripts have populated tables - setTimeout(() => { - apply_conditional_table_logic(frm); - }, 100); - - // Calculate binalar totals on load - calculate_binalar_totals(frm); - - // Calculate totals for Elave 1 and Elave 2 - calculate_elave_1_totals(frm); - calculate_elave_2_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - - // Validate minimum asset values - validate_minimum_asset_value(frm); - - // Calculate 509.1 and 509.2 on load - calculate_509_1(frm); - calculate_509_2(frm); - }, - - // Handle year changes - il: function(frm) { - if (frm.doc.il && (frm.doc.tam_il || frm.doc.il_erzinde)) { - reload_property_tax_data(frm); - } - calculate_509_1(frm); - calculate_509_2(frm); - }, - - // Checkbox handlers - ensure mutual exclusivity - tam_il: function(frm) { - if (frm.doc.tam_il) { - frm.set_value('il_erzinde', 0); - toggle_field_readonly(frm); - - // Apply conditional logic when switching to tam_il - apply_conditional_table_logic(frm); - - // Clear warnings when switching to tam_il - validate_minimum_asset_value(frm); - - // Calculate 509.1 and 509.2 - calculate_509_1(frm); - calculate_509_2(frm); - - if (frm.doc.il) { - reload_property_tax_data(frm); - } - } else if (!frm.doc.il_erzinde) { - // If unchecking tam_il and il_erzinde is also unchecked, default to tam_il - frm.set_value('tam_il', 1); - } - }, - - il_erzinde: function(frm) { - if (frm.doc.il_erzinde) { - frm.set_value('tam_il', 0); - toggle_field_readonly(frm); - - // Apply conditional logic when switching to il_erzinde - apply_conditional_table_logic(frm); - - // Validate when checking il_erzinde - validate_minimum_asset_value(frm); - - // Calculate 509.1 and 509.2 - calculate_509_1(frm); - calculate_509_2(frm); - - if (frm.doc.il) { - reload_property_tax_data(frm); - } - } else if (!frm.doc.tam_il) { - // If unchecking il_erzinde and tam_il is also unchecked, default to tam_il - frm.set_value('tam_il', 1); - } else { - // Clear warnings when unchecking il_erzinde - validate_minimum_asset_value(frm); - calculate_509_1(frm); - calculate_509_2(frm); - } - }, - - validate: function(frm) { - return validate_minimum_asset_value(frm); - } -}); - -function setup_checkbox_exclusivity(frm) { - // Ensure at least one is always checked - if (!frm.doc.tam_il && !frm.doc.il_erzinde) { - frm.set_value('tam_il', 1); - } - // Ensure only one is checked - if (frm.doc.tam_il && frm.doc.il_erzinde) { - frm.set_value('il_erzinde', 0); - } -} - -function toggle_field_readonly(frm) { - // Если выбран "İl Ərzində", поля 501.1 и 501.2 должны быть скрыты - const hide_column = frm.doc.il_erzinde ? 1 : 0; // 1 = скрыть, 0 = показать - - // Для əlavə 2 (taxable assets) - поле 501.1 - if (frm.get_field('elave_2')) { - const grid = frm.get_field('elave_2').grid; - grid.update_docfield_property('hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyəri', 'hidden', hide_column); - grid.reset_grid(); - } - - // Для əlavə 1 (tax exempt assets) - поле 501.2 - if (frm.get_field('elave_1')) { - const grid = frm.get_field('elave_1').grid; - grid.update_docfield_property('hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyərimanatla5012', 'hidden', hide_column); - grid.reset_grid(); - } -} - -// ==================== CONDITIONAL TABLE VISIBILITY AND FILTERING ==================== -// Show/hide tables and filter rows based on tam_il vs il_erzinde selection - -function apply_conditional_table_logic(frm) { - const is_tam_il = frm.doc.tam_il; - const is_il_erzinde = frm.doc.il_erzinde; - - toggle_vergi_hesab_1ci_tables(frm, is_tam_il, is_il_erzinde); - filter_vergi_hesab_5ci_rows(frm, is_tam_il, is_il_erzinde); - filter_vergi_hesab_6ci_rows(frm, is_tam_il, is_il_erzinde); -} - -function toggle_vergi_hesab_1ci_tables(frm, is_tam_il, is_il_erzinde) { - // Hide vergi_hesab_1ci if il_erzinde is checked - frm.set_df_property('vergi_hesab_1ci', 'hidden', is_il_erzinde ? 1 : 0); - - // Hide vergi_hesab_1ci_1 if tam_il is checked - frm.set_df_property('vergi_hesab_1ci_1', 'hidden', is_tam_il ? 1 : 0); - - // Hide vergi_hesab_4cu_1 if tam_il is checked (показывать только для İl Ərzində) - frm.set_df_property('vergi_hesab_4cu_1', 'hidden', is_tam_il ? 1 : 0); - - frm.refresh_field('vergi_hesab_1ci'); - frm.refresh_field('vergi_hesab_1ci_1'); - frm.refresh_field('vergi_hesab_4cu_1'); -} - -function filter_vergi_hesab_5ci_rows(frm, is_tam_il, is_il_erzinde) { - // Initialize global storage for saved values - if (!window.property_tax_saved_values) { - window.property_tax_saved_values = { - vergi_hesab_5ci: {}, - vergi_hesab_6ci: {} - }; - } - - // Save current values before clearing - (frm.doc.vergi_hesab_5ci || []).forEach(row => { - if (row.göstəricilər) { - window.property_tax_saved_values.vergi_hesab_5ci[row.göstəricilər] = row.manatla || 0; - } - }); - - // Define which rows should exist for current mode - let required_rows = []; - if (is_tam_il) { - required_rows = [ - '509.1 Vergi ödəyicisi il ərzində tam fəaliyyət göstərdiyi halda:', - '510 Vergi məcəlləsinin 199.21-ci maddəsinə əsasən azaldılmalı əmlak vergisinin məbləği' - ]; - } else if (is_il_erzinde) { - required_rows = [ - '509.2 Hesabat ili ərzində yaradıldığı (uçota alındığı) və ya əmlak vergisi ödəyicisi olduğu halda:', - '510 Vergi məcəlləsinin 199.21-ci maddəsinə əsasən azaldılmalı əmlak vergisinin məbləği' - ]; - } - - // Clear table and recreate with required rows - frm.clear_table('vergi_hesab_5ci'); - required_rows.forEach(row_text => { - let new_row = frm.add_child('vergi_hesab_5ci'); - new_row.göstəricilər = row_text; - // Restore saved value if exists, otherwise 0 - new_row.manatla = window.property_tax_saved_values.vergi_hesab_5ci[row_text] || 0; - }); - - frm.refresh_field('vergi_hesab_5ci'); -} - -function filter_vergi_hesab_6ci_rows(frm, is_tam_il, is_il_erzinde) { - // Initialize global storage for saved values (if not already done) - if (!window.property_tax_saved_values) { - window.property_tax_saved_values = { - vergi_hesab_5ci: {}, - vergi_hesab_6ci: {} - }; - } - - // Save current values before clearing - (frm.doc.vergi_hesab_6ci || []).forEach(row => { - if (row.göstəricilər) { - window.property_tax_saved_values.vergi_hesab_6ci[row.göstəricilər] = row.manatla || 0; - } - }); - - // Define which rows should exist for current mode - let required_rows = []; - if (is_tam_il) { - required_rows = [ - '511.1 Müəssisə il ərzində tam fəaliyyət göstərdiyi halda' - ]; - } else if (is_il_erzinde) { - required_rows = [ - '511.2 Müəssisə il ərzində yarandığı halda' - ]; - } - - // Clear table and recreate with required rows - frm.clear_table('vergi_hesab_6ci'); - required_rows.forEach(row_text => { - let new_row = frm.add_child('vergi_hesab_6ci'); - new_row.göstəricilər = row_text; - // Restore saved value if exists, otherwise 0 - new_row.manatla = window.property_tax_saved_values.vergi_hesab_6ci[row_text] || 0; - }); - - frm.refresh_field('vergi_hesab_6ci'); -} - -// ==================== END CONDITIONAL LOGIC ==================== - -function calculate_binalar_totals(frm) { - if (!frm.doc.elave_2 || !frm.doc.elave_2.length) { - return; - } - - // Найти строки 1.1-1.6 и строку 1 - const subcategories = []; - let binalar_row = null; - - frm.doc.elave_2.forEach(row => { - const category = row.vergiyəcəlbolunanəmlaklarınkateqoriyası || ''; - - if (category === '1. Binalar, tikilil\u0259r v\u0259 qur\u011fular') { - binalar_row = row; - } else if (category.match(/^1\.[1-6]/)) { - // Строки 1.1, 1.2, 1.3, 1.4, 1.5, 1.6 - subcategories.push(row); - } - }); - - // Если нет строки 1, ничего не делаем - if (!binalar_row) { - return; - } - - // Суммируем все числовые поля - const fields_to_sum = [ - 'hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyəri', // 501.1 - 'ləğvolunmatarixinəəsasvəsaitlərinqalıqdəyəri', // 502.1 - 'hesabatilierzindeuçotaalınan', // 503.1 - 'hesabatilinsonunaəsasvəsaitlərinqalıqdəyəri', // 504.1 - 'artıqqiymətəəsasvəsaitlərindəyəri505' // 505.1 - ]; - - fields_to_sum.forEach(field => { - let total = 0; - subcategories.forEach(subrow => { - total += flt(subrow[field]); - }); - - frappe.model.set_value(binalar_row.doctype, binalar_row.name, field, total); - }); -} - -function calculate_elave_1_totals(frm) { - if (!frm.doc.elave_1 || !frm.doc.elave_1.length) { - return; - } - - // Найти итоговую строку "Vergidən azad olunan əmlakın CƏMİ dəyəri:" - let total_row = null; - const other_rows = []; - - frm.doc.elave_1.forEach(row => { - const azadolma = row.azadolmasəbəbi || ''; - - if (azadolma === 'Vergidən azad olunan əmlakın CƏMİ dəyəri:') { - total_row = row; - } else { - // Все остальные строки для суммирования - other_rows.push(row); - } - }); - - // Если нет итоговой строки, ничего не делаем - if (!total_row) { - return; - } - - // Суммируем все числовые поля из всех строк (кроме итоговой) - const fields_to_sum = [ - 'hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyərimanatla5012', // 501.2 - 'ləğvolunmatarixinəəsasvəsaitlərinqalıqdəyəri', // 502.2 - 'hesabatiliərzindəəsasvəsaitlərinqalıqdəyəri', // 503.2 - 'ilinsonunaəsasvəsaitlərinqalıqdəyəri', // 504.2 - 'artıqqiymətəəsasvəsaitlərindəyəri' // 505.2 - ]; - - fields_to_sum.forEach(field => { - let total = 0; - other_rows.forEach(row => { - total += flt(row[field]); - }); - - frappe.model.set_value(total_row.doctype, total_row.name, field, total); - }); -} - -function calculate_elave_2_totals(frm) { - if (!frm.doc.elave_2 || !frm.doc.elave_2.length) { - return; - } - - // Найти итоговую строку "Vergiyə cəlb olunan əmlakın CƏMİ dəyəri:" - let total_row = null; - const other_rows = []; - - frm.doc.elave_2.forEach(row => { - const category = row.vergiyəcəlbolunanəmlaklarınkateqoriyası || ''; - - if (category === 'Vergiyə cəlb olunan əmlakın CƏMİ dəyəri:') { - total_row = row; - } else if (category !== '1. Binalar, tikililər və qurğular') { - // Все остальные строки для суммирования (кроме итоговой и строки Binalar) - other_rows.push(row); - } - }); - - // Если нет итоговой строки, ничего не делаем - if (!total_row) { - return; - } - - // Суммируем все числовые поля из всех строк (кроме итоговой и Binalar) - const fields_to_sum = [ - 'hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyəri', // 501.1 - 'ləğvolunmatarixinəəsasvəsaitlərinqalıqdəyəri', // 502.1 - 'hesabatilierzindeuçotaalınan', // 503.1 - 'hesabatilinsonunaəsasvəsaitlərinqalıqdəyəri', // 504.1 - 'artıqqiymətəəsasvəsaitlərindəyəri505' // 505.1 (страхование) - ]; - - fields_to_sum.forEach(field => { - let total = 0; - other_rows.forEach(row => { - total += flt(row[field]); - }); - - frappe.model.set_value(total_row.doctype, total_row.name, field, total); - }); -} - -function reload_property_tax_data(frm) { - // Validate required fields - if (!frm.doc.il) { - frappe.msgprint(__('Please select a year (İl) first')); - return; - } - - if (!frm.doc.tam_il && !frm.doc.il_erzinde) { - frappe.msgprint(__('Please select either Tam İl or İl Ərzində')); - return; - } - - // Show loading indicator - frappe.dom.freeze(__('Loading property tax data...')); - - // Calculate date range from year - const from_date = `${frm.doc.il}-01-01`; - const to_date = `${frm.doc.il}-12-31`; - const calculation_mode = frm.doc.tam_il ? 'tam_il' : 'il_erzinde'; - - // Get default company - const company = frappe.defaults.get_user_default('Company'); - - // Call server-side method - frappe.call({ - method: 'taxes_az.taxes_az.doctype.property_tax_gov.property_tax_gov.populate_property_tax_tables', - args: { - company: company, - year: frm.doc.il, - from_date: from_date, - to_date: to_date, - calculation_mode: calculation_mode, - existing_elave_1: frm.doc.elave_1 || [], - existing_elave_2: frm.doc.elave_2 || [] - }, - callback: function(r) { - frappe.dom.unfreeze(); - - if (r.message && r.message.success) { - // Update Əlavə 1 (Tax Exempt) - update_child_table_values(frm, 'elave_1', r.message.elave_1_data); - - // Update Əlavə 2 (Taxable) - update_child_table_values(frm, 'elave_2', r.message.elave_2_data); - - // Update vergi_hesab_4cu_1 based on il_erzinde checkbox - update_vergi_hesab_4cu_1(frm, company); - - frm.refresh_fields(); - - // Calculate 509.1 and 509.2 after data reload - calculate_509_1(frm); - calculate_509_2(frm); - - frappe.show_alert({ - message: __('Property tax data loaded successfully'), - indicator: 'green' - }); - } else { - frappe.msgprint({ - title: __('Error'), - message: r.message ? r.message.error : __('Failed to load data'), - indicator: 'red' - }); - } - }, - error: function(err) { - frappe.dom.unfreeze(); - frappe.msgprint({ - title: __('Error'), - message: __('Server error while loading data'), - indicator: 'red' - }); - } - }); -} - -function update_child_table_values(frm, table_name, data_map) { - if (!frm.doc[table_name]) { - return; - } - - frm.doc[table_name].forEach(function(row) { - // Find matching data based on the identifier field - let matching_key = null; - - if (table_name === 'elave_1') { - matching_key = row['azadolmasəbəbi']; - } else if (table_name === 'elave_2') { - matching_key = row['vergiyəcəlbolunanəmlaklarınkateqoriyası']; - } - - // Update row with values from data_map - if (matching_key && data_map[matching_key]) { - const field_data = data_map[matching_key]; - - Object.keys(field_data).forEach(function(field) { - const value = field_data[field]; - frappe.model.set_value(row.doctype, row.name, field, value); - }); - } - }); - - // After updating all rows, recalculate totals - if (table_name === 'elave_2') { - calculate_binalar_totals(frm); - calculate_elave_2_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - // Validate after auto-populating Əlavə 2 - try { - validate_minimum_asset_value(frm); - } catch (e) { - console.log('Validation error:', e); - } - } else if (table_name === 'elave_1') { - calculate_elave_1_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - // Validate after auto-populating Əlavə 1 - try { - validate_minimum_asset_value(frm); - } catch (e) { - console.log('Validation error:', e); - } - } -} - -// ==================== UPDATE VERGI_HESAB_4CU_1 ==================== -// Update the 'ayla' field in vergi_hesab_4cu_1 based on earliest Asset - -function update_vergi_hesab_4cu_1(frm, company) { - if (frm.doc.il_erzinde) { - // Расчет месяцев только для İl Ərzində режима - frappe.call({ - method: 'taxes_az.taxes_az.doctype.property_tax_gov.property_tax_gov.calculate_months_for_vergi_hesab_4cu_1', - args: { - company: company, - year: frm.doc.il - }, - callback: function(r) { - if (r.message !== undefined && frm.doc.vergi_hesab_4cu_1 && frm.doc.vergi_hesab_4cu_1.length > 0) { - // Обновить первую строку - const first_row = frm.doc.vergi_hesab_4cu_1[0]; - frappe.model.set_value(first_row.doctype, first_row.name, 'ayla', r.message); - frm.refresh_field('vergi_hesab_4cu_1'); - } - } - }); - } else { - // Очистить поле ayla если tam_il - if (frm.doc.vergi_hesab_4cu_1 && frm.doc.vergi_hesab_4cu_1.length > 0) { - const first_row = frm.doc.vergi_hesab_4cu_1[0]; - frappe.model.set_value(first_row.doctype, first_row.name, 'ayla', 0); - frm.refresh_field('vergi_hesab_4cu_1'); - } - } -} - -// ==================== MINIMUM ASSET VALUE VALIDATION ==================== -// Validate that asset values in columns 503.1 and 503.2 are >= 500 AZN -// when il_erzinde mode is selected - -function validate_minimum_asset_value(frm) { - // Only run if il_erzinde is checked - if (!frm.doc.il_erzinde) { - // Hide warnings and allow save - const field1 = frm.get_field('warning_elave_1_html'); - const field2 = frm.get_field('warning_elave_2_html'); - if (field1) field1.$wrapper.hide(); - if (field2) field2.$wrapper.hide(); - - // Remove emoji from both tabs - show_warning_if_needed(frm, 'elave_1', false); - show_warning_if_needed(frm, 'elave_2', false); - - // Clear any cell highlights - highlight_invalid_cells(frm, [], []); - - return true; - } - - let has_error_elave_1 = false; - let has_error_elave_2 = false; - let invalid_rows_1 = []; - let invalid_rows_2 = []; - - // Check Əlavə 1 (column 503.2) - (frm.doc.elave_1 || []).forEach((row, idx) => { - let value = row.hesabatiliərzindəəsasvəsaitlərinqalıqdəyəri; - - // Skip if value is null, undefined, or empty - if (value === null || value === undefined || value === '') { - return; - } - - // Convert to number (handle both comma and dot as decimal separator) - let numValue = parseFloat(String(value).replace(',', '.')); - - // Only flag as invalid if: value is a valid number, greater than 0, and less than 500 - if (!isNaN(numValue) && numValue > 0 && numValue < 500) { - has_error_elave_1 = true; - invalid_rows_1.push({name: row.name, value: numValue, category: row.azadolmasəbəbi}); - } - }); - - // Check Əlavə 2 (column 503.1) - (frm.doc.elave_2 || []).forEach((row, idx) => { - let value = row.hesabatilierzindeuçotaalınan; - - // Skip if value is null, undefined, or empty - if (value === null || value === undefined || value === '') { - return; - } - - // Convert to number (handle both comma and dot as decimal separator) - let numValue = parseFloat(String(value).replace(',', '.')); - - // Only flag as invalid if: value is a valid number, greater than 0, and less than 500 - if (!isNaN(numValue) && numValue > 0 && numValue < 500) { - has_error_elave_2 = true; - invalid_rows_2.push({name: row.name, value: numValue, category: row.vergiyəcəlbolunanəmlaklarınkateqoriyası}); - } - }); - - // Debug logging - if (invalid_rows_1.length > 0) { - console.log('Əlavə 1 invalid rows:', invalid_rows_1.map(r => ({name: r.name, value: r.value}))); - } - if (invalid_rows_2.length > 0) { - console.log('Əlavə 2 invalid rows:', invalid_rows_2.map(r => ({name: r.name, value: r.value}))); - } - - // Highlight invalid cells in red - highlight_invalid_cells(frm, invalid_rows_1, invalid_rows_2); - - // Show/hide warnings and set validation state - show_warning_if_needed(frm, 'elave_1', has_error_elave_1); - show_warning_if_needed(frm, 'elave_2', has_error_elave_2); - - // Block save if any errors - if (has_error_elave_1 || has_error_elave_2) { - frm.validated = false; - return false; - } - - return true; -} - -function show_warning_if_needed(frm, table_name, has_error) { - const field_name = `warning_${table_name}_html`; - const field = frm.get_field(field_name); - - if (!field) return; - - if (has_error) { - // Unhide the field - frm.set_df_property(field_name, 'hidden', 0); - - // Show red warning message - const warning_html = ` -
-

- ⚠️ Əsas vəsaitlərin dəyəri 500 manatdan az ola bilməz -

-
- `; - field.$wrapper.html(warning_html); - field.$wrapper.show(); - - // Add red emoji to tab title - update_tab_title(frm, table_name, true); - } else { - // Hide warning - field.$wrapper.hide(); - frm.set_df_property(field_name, 'hidden', 1); - update_tab_title(frm, table_name, false); - } -} - -function update_tab_title(frm, table_name, has_error) { - const tab_map = { - 'elave_1': 'Əlavə 1', - 'elave_2': 'Əlavə 2' - }; - - const base_title = tab_map[table_name]; - if (!base_title) return; - - // Find tab element and update title - const tab_title = has_error ? `🔴 ${base_title}` : base_title; - - // Update tab title using jQuery/DOM - setTimeout(() => { - try { - // Find all tabs and update the matching one - $('.form-tabs .nav-link').each(function() { - const $tab = $(this); - const text = $tab.text().trim(); - - // Check if this is the tab we want to update (with or without emoji) - if (text === base_title || text === `🔴 ${base_title}` || text.includes(base_title)) { - // Always set to the correct state (with or without emoji) - $tab.text(tab_title); - console.log(`Updated tab "${base_title}" to: "${tab_title}"`); - } - }); - } catch (e) { - console.log('Could not update tab title:', e); - } - }, 200); -} - -function highlight_invalid_cells(frm, invalid_rows_1, invalid_rows_2) { - // Clear any existing highlights first - setTimeout(() => { - try { - // Remove previous highlights from both tables - target the whole cell div - $('[data-fieldname="elave_1"] [data-fieldname="hesabatiliərzindəəsasvəsaitlərinqalıqdəyəri"]').css({ - 'background-color': '', - 'border': '', - 'box-shadow': '' - }); - $('[data-fieldname="elave_2"] [data-fieldname="hesabatilierzindeuçotaalınan"]').css({ - 'background-color': '', - 'border': '', - 'box-shadow': '' - }); - - // Highlight Əlavə 1 invalid cells (503.2) - if (invalid_rows_1.length > 0) { - console.log('Highlighting Əlavə 1 invalid rows:', invalid_rows_1.map(r => r.name)); - invalid_rows_1.forEach(item => { - // Use data-name instead of data-idx for accurate row matching - const $cell = $(`[data-fieldname="elave_1"] .grid-row[data-name="${item.name}"] [data-fieldname="hesabatiliərzindəəsasvəsaitlərinqalıqdəyəri"]`); - console.log(` Row ${item.name}: Found ${$cell.length} elements`); - if ($cell.length > 0) { - $cell.css({ - 'background-color': '#ffe6e6', - 'border': '2px solid #ff0000' - }); - } - }); - } - - // Highlight Əlavə 2 invalid cells (503.1) - if (invalid_rows_2.length > 0) { - console.log('Highlighting Əlavə 2 invalid rows:', invalid_rows_2.map(r => r.name)); - invalid_rows_2.forEach(item => { - // Use data-name instead of data-idx for accurate row matching - const $cell = $(`[data-fieldname="elave_2"] .grid-row[data-name="${item.name}"] [data-fieldname="hesabatilierzindeuçotaalınan"]`); - console.log(` Row ${item.name}: Found ${$cell.length} elements`); - if ($cell.length > 0) { - $cell.css({ - 'background-color': '#ffe6e6', - 'border': '2px solid #ff0000' - }); - } - }); - } - } catch (e) { - console.log('Could not highlight cells:', e); - } - }, 300); -} - -// ==================== END VALIDATION ==================== - -// ==================== FORMULA 509.1 CALCULATION (TAM İL) ==================== -// Calculate field 509.1 based on formula: ((501.1 + 504.1) / 2) * 1% + 505.1 * 1% - -function calculate_509_1(frm) { - // Only calculate when tam_il is checked - if (!frm.doc.tam_il) { - return; - } - - // Get value from field 501.1 (manatla from vergi_hesab_1ci) - let value_501_1 = 0; - (frm.doc.vergi_hesab_1ci || []).forEach(row => { - // Точное совпадение: после "501.1" должен быть пробел (не 501.1.1) - if (row.göstəricilər && row.göstəricilər.startsWith('501.1 ')) { - value_501_1 = flt(row.manatla); - } - }); - - // Get value from field 504.1 (manatla from vergi_hesab_2ci) - let value_504_1 = 0; - (frm.doc.vergi_hesab_2ci || []).forEach(row => { - // Точное совпадение: после "504.1" должен быть пробел (не 504.1.1) - if (row.göstəricilər && row.göstəricilər.startsWith('504.1 ')) { - value_504_1 = flt(row.manatla); - } - }); - - // Get value from field 505.1 (sığorta from vergi_hesab_3cu) - let value_505_1 = 0; - (frm.doc.vergi_hesab_3cu || []).forEach(row => { - if (row.göstəricilər && row.göstəricilər.startsWith('505.1 ')) { - value_505_1 = flt(row.manatla); - } - }); - - // Calculate: ((501.1 + 504.1) / 2) * 1% + 505.1 * 1% - let result = ((value_501_1 + value_504_1) / 2) * 0.01 + value_505_1 * 0.01; - - // Set value to field 509.1 (manatla in vergi_hesab_5ci) - (frm.doc.vergi_hesab_5ci || []).forEach(row => { - // Точное совпадение: после "509.1" должен быть пробел - if (row.göstəricilər && row.göstəricilər.startsWith('509.1 ')) { - frappe.model.set_value(row.doctype, row.name, 'manatla', result); - } - }); - - // Set the same value to field 511.1 (manatla in vergi_hesab_6ci) - (frm.doc.vergi_hesab_6ci || []).forEach(row => { - // Точное совпадение: после "511.1" должен быть пробел - if (row.göstəricilər && row.göstəricilər.startsWith('511.1 ')) { - frappe.model.set_value(row.doctype, row.name, 'manatla', result); - } - }); -} - -// ==================== FORMULA 509.2 CALCULATION (İL ƏRZİNDƏ) ==================== -// Calculate field 509.2 based on formula: ((503.1 + 504.1) / 24 * 507) * 1% + 505.1 * 1% - -function calculate_509_2(frm) { - // Only calculate when il_erzinde is checked - if (!frm.doc.il_erzinde) { - return; - } - - // Get value from field 507 (ayla from vergi_hesab_4cu_1 first row) - let value_507 = 0; - if (frm.doc.vergi_hesab_4cu_1 && frm.doc.vergi_hesab_4cu_1.length > 0) { - value_507 = flt(frm.doc.vergi_hesab_4cu_1[0].ayla); - } - - // Get value from field 503.1 (manatla from vergi_hesab_1ci_1) - let value_503_1 = 0; - (frm.doc.vergi_hesab_1ci_1 || []).forEach(row => { - // Точное совпадение: после "503.1" должен быть пробел, а не точка (чтобы не совпадало с 503.1.1) - if (row.göstəricilər && row.göstəricilər.startsWith('503.1 ')) { - value_503_1 = flt(row.manatla); - } - }); - - // Get value from field 504.1 (manatla from vergi_hesab_2ci) - let value_504_1 = 0; - (frm.doc.vergi_hesab_2ci || []).forEach(row => { - // Точное совпадение: после "504.1" должен быть пробел, а не точка (чтобы не совпадало с 504.1.1) - if (row.göstəricilər && row.göstəricilər.startsWith('504.1 ')) { - value_504_1 = flt(row.manatla); - } - }); - - // Get value from field 505.1 (sığorta from vergi_hesab_3cu) - let value_505_1 = 0; - (frm.doc.vergi_hesab_3cu || []).forEach(row => { - if (row.göstəricilər && row.göstəricilər.startsWith('505.1 ')) { - value_505_1 = flt(row.manatla); - } - }); - - // Calculate: ((503.1 + 504.1) / 24 * 507) * 1% + 505.1 * 1% - let result = ((value_503_1 + value_504_1) / 24 * value_507) * 0.01 + value_505_1 * 0.01; - - // Set value to field 509.2 (manatla in vergi_hesab_5ci) - (frm.doc.vergi_hesab_5ci || []).forEach(row => { - // Точное совпадение: после "509.2" должен быть пробел - if (row.göstəricilər && row.göstəricilər.startsWith('509.2 ')) { - frappe.model.set_value(row.doctype, row.name, 'manatla', result); - } - }); - - // Set the same value to field 511.2 (manatla in vergi_hesab_6ci) - (frm.doc.vergi_hesab_6ci || []).forEach(row => { - // Точное совпадение: после "511.2" должен быть пробел - if (row.göstəricilər && row.göstəricilər.startsWith('511.2 ')) { - frappe.model.set_value(row.doctype, row.name, 'manatla', result); - } - }); -} - -// ==================== END FORMULA 509.2 ==================== - -// ==================== CALCULATE VERGI HESAB 3CU (INSURANCE TOTALS) ==================== - -function calculate_vergi_hesab_3cu_totals(frm) { - // Sum insurance from elave_1 (tax-exempt) → 505.2 - // Exclude total row: "Vergidən azad olunan əmlakın CƏMİ dəyəri:" - let sum_505_2 = 0; - (frm.doc.elave_1 || []).forEach(row => { - const azadolma = row.azadolmasəbəbi || ''; - if (azadolma !== 'Vergidən azad olunan əmlakın CƏMİ dəyəri:') { - sum_505_2 += flt(row.artıqqiymətəəsasvəsaitlərindəyəri); - } - }); - - // Sum insurance from elave_2 (taxable) → 505.1 - // Exclude total rows: "1. Binalar, tikililər və qurğular" and "Vergiyə cəlb olunan əmlakın CƏMİ dəyəri:" - let sum_505_1 = 0; - (frm.doc.elave_2 || []).forEach(row => { - const category = row.vergiyəcəlbolunanəmlaklarınkateqoriyası || ''; - if (category !== '1. Binalar, tikililər və qurğular' && - category !== 'Vergiyə cəlb olunan əmlakın CƏMİ dəyəri:') { - sum_505_1 += flt(row.artıqqiymətəəsasvəsaitlərindəyəri505); - } - }); - - // Set values in vergi_hesab_3cu - (frm.doc.vergi_hesab_3cu || []).forEach(row => { - if (row.göstəricilər && row.göstəricilər.startsWith('505.1 ')) { - frappe.model.set_value(row.doctype, row.name, 'manatla', sum_505_1); - } else if (row.göstəricilər && row.göstəricilər.startsWith('505.2 ')) { - frappe.model.set_value(row.doctype, row.name, 'manatla', sum_505_2); - } else if (row.göstəricilər && row.göstəricilər.startsWith('505 ')) { - frappe.model.set_value(row.doctype, row.name, 'manatla', sum_505_1 + sum_505_2); - } - }); -} - -// ==================== END VERGI HESAB 3CU ==================== - -// Обработчики для дочерней таблицы Elave 2 - автоматический пересчет суммы binalar -frappe.ui.form.on('Property Tax Gov Elave 2', { - form_render: function(frm, cdt, cdn) { - // Скрыть колонку при рендеринге формы строки - toggle_field_readonly(frm); - }, - - // При изменении любого числового поля - пересчитать totals - hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyəri: function(frm, cdt, cdn) { - calculate_binalar_totals(frm); - calculate_elave_2_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - }, - ləğvolunmatarixinəəsasvəsaitlərinqalıqdəyəri: function(frm, cdt, cdn) { - calculate_binalar_totals(frm); - calculate_elave_2_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - }, - hesabatilierzindeuçotaalınan: function(frm, cdt, cdn) { - calculate_binalar_totals(frm); - calculate_elave_2_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - validate_minimum_asset_value(frm); - }, - hesabatilinsonunaəsasvəsaitlərinqalıqdəyəri: function(frm, cdt, cdn) { - calculate_binalar_totals(frm); - calculate_elave_2_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - }, - artıqqiymətəəsasvəsaitlərindəyəri505: function(frm, cdt, cdn) { - calculate_binalar_totals(frm); - calculate_elave_2_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - }, - - // При удалении строки - пересчитать - elave_2_remove: function(frm, cdt, cdn) { - calculate_binalar_totals(frm); - calculate_elave_2_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - } -}); - -// Обработчики для дочерней таблицы Elave 1 -frappe.ui.form.on('Property Tax Gov Elave 1', { - form_render: function(frm, cdt, cdn) { - // Скрыть колонку при рендеринге формы строки - toggle_field_readonly(frm); - }, - - // При изменении любого числового поля - пересчитать totals - hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyərimanatla5012: function(frm, cdt, cdn) { - calculate_elave_1_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - }, - ləğvolunmatarixinəəsasvəsaitlərinqalıqdəyəri: function(frm, cdt, cdn) { - calculate_elave_1_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - }, - hesabatiliərzindəəsasvəsaitlərinqalıqdəyəri: function(frm, cdt, cdn) { - calculate_elave_1_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - validate_minimum_asset_value(frm); - }, - ilinsonunaəsasvəsaitlərinqalıqdəyəri: function(frm, cdt, cdn) { - calculate_elave_1_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - }, - artıqqiymətəəsasvəsaitlərindəyəri: function(frm, cdt, cdn) { - calculate_elave_1_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - }, - - // При удалении строки - пересчитать - elave_1_remove: function(frm, cdt, cdn) { - calculate_elave_1_totals(frm); - calculate_vergi_hesab_3cu_totals(frm); - } -}); - -// ==================== CHILD TABLE EVENT HANDLERS FOR 509.1 & 509.2 FORMULAS ==================== - -// Event handler for vergi_hesab_1ci changes (field 501 for 509.1 formula) -frappe.ui.form.on('Property Tax Gov Emlak vergi hesablamasi 1ci cedvel', { - manatla: function(frm, cdt, cdn) { - calculate_509_1(frm); - } -}); - -// Event handler for vergi_hesab_4cu_1 changes (field 507 for 509.2 formula) -frappe.ui.form.on('Property Tax Gov Emlak vergi hesablamasi 4cu cedvel 1', { - ayla: function(frm, cdt, cdn) { - calculate_509_2(frm); - } -}); - -// Event handler for vergi_hesab_1ci_1 changes (field 503.1 for 509.2 formula) -frappe.ui.form.on('Property Tax Gov Emlak vergi hesablamasi 1ci cedvel 1', { - manatla: function(frm, cdt, cdn) { - calculate_509_2(frm); - } -}); - -// Event handler for vergi_hesab_2ci changes (fields 504 for 509.1 and 504.1 for 509.2) -frappe.ui.form.on('Property Tax Gov Emlak vergi hesablamasi 2ci cedvel', { - manatla: function(frm, cdt, cdn) { - calculate_509_1(frm); - calculate_509_2(frm); - } -}); - -// Event handler for vergi_hesab_3cu changes (field 505 - insurance) -frappe.ui.form.on('Property Tax Gov Emlak vergi hesablamasi 3cu cedvel', { - manatla: function(frm, cdt, cdn) { - calculate_509_1(frm); - calculate_509_2(frm); - } -}); - -/* ============================================================================= - * GNS-driven calculation (offline, via whitelisted compute_via_gns -> Node bundle - * running the cabinet's own useCalculation). Replaces the hand-coded formulas: - * the six calculate_* functions below are re-declared as thin delegators (JS - * hoisting: last declaration wins), so every existing trigger now routes here. - * Field mapping derived from this doctype's own fields + the extracted GNS schema. - * ============================================================================= */ - -// elave_1 (taxFree) row column -> GNS appendix1 input key -const PTGOV_E1 = { - periodStart: 'hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyərimanatla5012', - created: 'hesabatiliərzindəəsasvəsaitlərinqalıqdəyəri', - removed: 'ləğvolunmatarixinəəsasvəsaitlərinqalıqdəyəri', - endYear: 'ilinsonunaəsasvəsaitlərinqalıqdəyəri', - over: 'artıqqiymətəəsasvəsaitlərindəyəri', -}; -// elave_2 (taxable) row column -> GNS appendix2 input key -const PTGOV_E2 = { - periodStart: 'hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyəri', - onCreate: 'hesabatilierzindeuçotaalınan', - onCancel: 'ləğvolunmatarixinəəsasvəsaitlərinqalıqdəyəri', - periodEnd: 'hesabatilinsonunaəsasvəsaitlərinqalıqdəyəri', - excess: 'artıqqiymətəəsasvəsaitlərindəyəri505', -}; -// calculation cedvel tables that RECEIVE GNS outputs by article number -const PTGOV_OUT_TABLES = [ - 'vergi_hesab_1ci', 'vergi_hesab_1ci_1', 'vergi_hesab_2ci', - 'vergi_hesab_3cu', 'vergi_hesab_5ci', 'vergi_hesab_6ci', -]; - -function ptgov_article(label) { - const m = String(label || '').match(/^\s*(\d+(?:\.\d+)*)/); - return m ? m[1] : null; -} - -function ptgov_sum(rows, map, skip) { - const t = {}; for (const k in map) t[k] = 0; - (rows || []).forEach(function (r) { - if (skip && skip(r)) return; - for (const k in map) t[k] += flt(r[map[k]]); - }); - return t; -} - -// appendix2: exclude the parent "1. Binalar" row (=_5001, it sums children 1.1–1.6) -// and the "CƏMİ" total row, per the GNS aggregation rule. -function ptgov_is_excluded_e2(r) { - const art = ptgov_article(r.vergiyəcəlbolunanəmlaklarınkateqoriyası); - return art === '1' || art === null; -} - -let _ptgov_timer = null; -function gns_property_recalc(frm) { - if (!frm || frm.__ptgov_writing) return; // ignore recalc retriggered by our own writes - clearTimeout(_ptgov_timer); - _ptgov_timer = setTimeout(function () { _gns_property_recalc_now(frm); }, 250); -} - -// half-up rounding to 2 decimals (matches the cabinet's decimal rounding) -function ptgov_round2(x) { return Math.round((flt(x) + Number.EPSILON) * 100) / 100; } - -// LOCAL implementation of the property-tax formulas. The formulas/logic were extracted & -// verified from the GNS cabinet (new.e-taxes.gov.az) — see .etaxes_notes/scratch/calc_extract. -// Only the +,-,*,/ run here (locally, offline). The cabinet is the SOURCE of the formulas, -// not a runtime dependency; compute_via_gns + the extracted bundle stay in the repo as the -// reference from which these were derived. -// a1 = appendix1 (taxFree) totals, a2 = appendix2 (taxable) totals, full = Tam İl -function ptgov_calc_byArticle(a1, a2, full, months) { - const RATE = 0.01; // 506 taxDegree = 1% for legal entities - const by = {}; - if (full) { - // 501 prePeriod (beginning of year): total = taxable + tax-exempt - by['501.1'] = a2.periodStart; // taxable residual - by['501.2'] = a1.periodStart; // tax-exempt residual - by['501'] = a2.periodStart + a1.periodStart; - } else { - // 503 createDate (newly established during the year) - by['503.1'] = a2.onCreate; - by['503.2'] = a1.created; - by['503'] = a2.onCreate + a1.created; - } - // 504 endYear - by['504.1'] = a2.periodEnd; - by['504.2'] = a1.endYear; - by['504'] = a2.periodEnd + a1.endYear; - // 505 excess-insured - by['505.1'] = a2.excess; - by['505.2'] = a1.over; - by['505'] = a2.excess + a1.over; - // 509 calculated tax — only taxable (appendix2) is taxed; 511 shouldBePaid mirrors it - let tax; - if (full) { - tax = ptgov_round2((a2.periodStart + a2.periodEnd) / 2 * RATE + a2.excess * RATE); - by['509.1'] = tax; by['511.1'] = tax; - } else { - tax = ptgov_round2((a2.onCreate + a2.periodEnd) / 24 * flt(months) * RATE + a2.excess * RATE); - by['509.2'] = tax; by['511.2'] = tax; - } - return by; -} - -function _gns_property_recalc_now(frm) { - const a1 = ptgov_sum(frm.doc.elave_1, PTGOV_E1); - const a2 = ptgov_sum(frm.doc.elave_2, PTGOV_E2, ptgov_is_excluded_e2); - const full = !frm.doc.il_erzinde; - let months = 0; - (frm.doc.vergi_hesab_4cu_1 || []).forEach(function (r) { - if (ptgov_article(r.göstəricilər) === '507') months = flt(r.ayla); - }); - const byArt = ptgov_calc_byArticle(a1, a2, full, months); - - frm.__ptgov_writing = true; // guard: our set_value writes retrigger manatla handlers - try { - PTGOV_OUT_TABLES.forEach(function (tbl) { - (frm.doc[tbl] || []).forEach(function (row) { - const art = ptgov_article(row.göstəricilər); - frappe.model.set_value(row.doctype, row.name, 'manatla', flt(byArt[art] || 0)); - }); - }); - (frm.doc.vergi_hesab_4cu || []).forEach(function (row) { - if (ptgov_article(row.göstəricilər) === '506') { - frappe.model.set_value(row.doctype, row.name, 'faizlə', 1); - } - }); - } finally { - PTGOV_OUT_TABLES.concat(['vergi_hesab_4cu']).forEach(function (t) { frm.refresh_field(t); }); - setTimeout(function () { frm.__ptgov_writing = false; }, 0); // release after sync triggers flush - } -} - -// ---- delegators: override the old hand-coded calc (hoisting: these win) ---- -function calculate_binalar_totals(frm) { gns_property_recalc(frm); } -function calculate_elave_1_totals(frm) { gns_property_recalc(frm); } -function calculate_elave_2_totals(frm) { gns_property_recalc(frm); } -function calculate_vergi_hesab_3cu_totals(frm) { gns_property_recalc(frm); } -function calculate_509_1(frm) { gns_property_recalc(frm); } -function calculate_509_2(frm) { gns_property_recalc(frm); } - -// ---- template rows: identical to the original doctype's Default Client Scripts ---- -// elave_1/elave_2 use the exact curated row sets; cedvel tables use their göstərici options. -const PTGOV_E1_ROWS = [ - "Vergi Məcəlləsinin 199.1-ci maddəsinə əsasən azaldılmalı əmlak vergisinin məbləği", - "Vergi Məcəlləsinin 199.4.1-ci maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.4.2-ci maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.4.3-cü maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.4.4-cü maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.4.1-1-ci maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.5-ci maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.7-ci maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.8-ci maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.9-cu maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.11-cu maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.14-cu maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.15-cu maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.16-cı maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.17-ci maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.18-ci maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.19-cu maddəsinə əsasən:", - "Vergi Məcəlləsinin 199.20-ci maddəsinə əsasən:", - "Vergi Məcəlləsinin 227.1-ci maddəsinə əsasən:", - "Qanunla təsdiq olunmuş hasilatın pay bölgüsü haqqında, əsas boru kəməri haqqında və digər bu qəbildən olan sazişlərdə və ya qanunlarda, o cümlədən neft və qaz haqqında, ixrac məqsədli neft-qaz fəaliyyəti üzrə:", - "Xüsusi iqtisadi zonalar haqqında qanunlarda nəzərdə tutulan əmlaklar üzrə:", - "Azərbaycan Respublikasının tərəfdar çıxdığı beynəlxalq müqavilələr üzrə:", - "Vergidən azad olunan əmlakın CƏMİ dəyəri:", -]; -const PTGOV_E2_ROWS = [ - "1. Binalar, tikililər və qurğular", - "1.1 Çoxmərtəbəli (çoxmənzilli) yaşayış binaları", - "1.2 Qeyri-yaşayış binaları (sahələri)", - "1.3 Əmlak kompleksi kimi müəssisələr", - "1.4 Qurğular", - "1.5 Mənzillər", - "1.6 Fərdi yaşayış və bağ evləri", - "2 Maşınlar və avadanlıqlar", - "3 Yüksək texnologiyalar məhsulu olan hesablama texnikası", - "4 Nəqliyyat vasitələri", - "5 Digər əsas vəsaitlər", - "Vergiyə cəlb olunan əmlakın CƏMİ dəyəri:", -]; -const PTGOV_CEDVEL_TABLES = ['vergi_hesab_1ci', 'vergi_hesab_1ci_1', 'vergi_hesab_2ci', 'vergi_hesab_3cu', - 'vergi_hesab_4cu', 'vergi_hesab_4cu_1', 'vergi_hesab_5ci', 'vergi_hesab_6ci']; - -function ptgov_ensure_rows(frm) { - let added = false; - function fill(tbl, fld, vals) { - if ((frm.doc[tbl] || []).length) return; // already has rows -> skip - vals.forEach(function (v) { frm.add_child(tbl)[fld] = v; }); - if (vals.length) { frm.refresh_field(tbl); added = true; } - } - fill('elave_1', 'azadolmasəbəbi', PTGOV_E1_ROWS); - fill('elave_2', 'vergiyəcəlbolunanəmlaklarınkateqoriyası', PTGOV_E2_ROWS); - PTGOV_CEDVEL_TABLES.forEach(function (tbl) { - const field = frm.get_field(tbl); - if (!field) return; - const df = frappe.meta.get_docfield(field.df.options, 'göstəricilər'); - const opts = ((df && df.options) || '').split('\n').filter(function (x) { return x.trim(); }); - fill(tbl, 'göstəricilər', opts); - }); - return added; -} - -// make computed output columns read-only (the cedvel manatla/faizlə are calc results) -function ptgov_set_readonly(frm) { - const cols = [['vergi_hesab_1ci', 'manatla'], ['vergi_hesab_1ci_1', 'manatla'], ['vergi_hesab_2ci', 'manatla'], - ['vergi_hesab_3cu', 'manatla'], ['vergi_hesab_5ci', 'manatla'], ['vergi_hesab_6ci', 'manatla'], - ['vergi_hesab_4cu', 'faizlə']]; - cols.forEach(function (pair) { - const f = frm.get_field(pair[0]); - if (f && f.grid) f.grid.update_docfield_property(pair[1], 'read_only', 1); - }); -} - -// manual recalc button (autofill runs automatically on İl / Tam İl / İl Ərzində change) -frappe.ui.form.on('Property Tax Gov', { - refresh: function (frm) { - ptgov_ensure_rows(frm); // populate empty child tables with their template rows - ptgov_set_readonly(frm); // lock computed cedvel columns - frm.add_custom_button('Şablon sətirləri yarat', function () { - if (ptgov_ensure_rows(frm)) frappe.show_alert({ message: 'Şablon sətirləri yaradıldı', indicator: 'green' }); - }); - frm.add_custom_button('ГНС ilə hesabla', function () { _gns_property_recalc_now(frm); }); - }, -}); diff --git a/taxes_az/taxes_az/doctype/property_tax_gov/property_tax_gov.json b/taxes_az/taxes_az/doctype/property_tax_gov/property_tax_gov.json deleted file mode 100644 index 67ad4fe..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov/property_tax_gov.json +++ /dev/null @@ -1,385 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2025-01-13 14:18:26.085350", - "default_view": "List", - "doctype": "DocType", - "engine": "InnoDB", - "field_order": [ - "\u00fcmumi_m\u0259lumat_tab", - "html_pegz", - "idar\u0259", - "vergiorqan\u0131", - "vergid\u00f6vr\u00fc", - "il", - "tam_il", - "il_erzinde", - "\u015f\u0259xsi", - "v\u00f6en", - "soyad\u0131", - "atas\u0131n\u0131nad\u0131", - "mobn\u00f6mr\u02591", - "mobn\u00f6mr\u02592", - "column_break_yjgp", - "\u00f6d\u0259yicitipi", - "ad\u0131", - "\u015f\u0259h\u0259rn\u00f6mr\u0259si1", - "\u015f\u0259h\u0259rn\u00f6mr\u0259si2", - "section_break_pcfz", - "\u0259sasf\u0259aliyy\u0259tn\u00f6v\u00fcn\u00fcnkodu", - "t\u0259qdimolunmu\u015f\u0259lav\u0259l\u0259rinsay\u0131", - "b\u0259yannam\u0259ninn\u00f6v\u00fc", - "d\u0259qiql\u0259\u015fdirilmi\u015fb\u0259yannam\u0259nint\u0259qdimedilm\u0259sibar\u0259d\u0259bildiri\u015f", - "column_break_xcxz", - "section_break_vfvd", - "b\u0259yan_edil\u0259c\u0259k_m\u0259lumat\u0131m_yoxdur", - "section_break_wnwr", - "column_break_dblg", - "s\u0259tirl\u0259rd\u0259nbirinise\u00e7in", - "\u0259mlak_vergisinin_hesablanmas\u0131_tab", - "html_ikbb", - "vergi_hesab_1ci", - "html_uhqz", - "vergi_hesab_1ci_1", - "section_break_bhtd", - "html_umxi", - "vergi_hesab_2ci", - "section_break_fugy", - "html_exjg", - "vergi_hesab_3cu", - "section_break_bhet", - "html_tuak", - "vergi_hesab_4cu", - "vergi_hesab_4cu_1", - "section_break_cnpg", - "html_mxir", - "vergi_hesab_5ci", - "section_break_klzd", - "html_ctml", - "vergi_hesab_6ci", - "\u0259lav\u0259_1_tab", - "html_hken", - "warning_elave_1_html", - "elave_1", - "\u0259lav\u0259_2_tab", - "html_ybie", - "elave_2" - ], - "fields": [ - { - "fieldname": "\u00fcmumi_m\u0259lumat_tab", - "fieldtype": "Tab Break", - "label": "\u00dcmumi m\u0259lumat" - }, - { - "fieldname": "html_pegz", - "fieldtype": "HTML", - "options": "

\u018fmlak vergisinin b\u0259yannam\u0259si

" - }, - { - "fieldname": "vergiorqan\u0131", - "fieldtype": "Select", - "label": "Vergi orqan\u0131", - "options": "2 sayl\u0131 \u018frazi Vergil\u0259r Ba\u015f idar\u0259si\tSumqay\u0131t\t02\n3 sayl\u0131 \u018frazi Vergil\u0259r \u0130dar\u0259si\tQuba\t03\n4 sayl\u0131 \u018frazi Vergil\u0259r \u0130dar\u0259si\t\u015eamax\u0131\t04\n5 sayl\u0131 \u018frazi Vergil\u0259r \u0130dar\u0259si\t\u015eirvan\t05\n6 sayl\u0131 \u018frazi Vergil\u0259r Ba\u015f \u0130dar\u0259si\tL\u0259nk\u0259ran\t06\nQaraba\u011f \u018frazi Vergil\u0259r Ba\u015f \u0130dar\u0259si\tA\u011fdam, F\u00fczuli, \u015eu\u015fa, Xocal\u0131, Xocav\u0259nd\t07\n8 sayl\u0131 \u018frazi Vergil\u0259r \u0130dar\u0259si\tBeyl\u0259qan\t08\n9 sayl\u0131 \u018frazi Vergil\u0259r \u0130dar\u0259si\tG\u00f6y\u00e7ay\t09\n10 sayl\u0131 \u018frazi Vergil\u0259r \u0130dar\u0259si\tQ\u0259b\u0259l\u0259\t10\n11 sayl\u0131 \u018frazi Vergil\u0259r Ba\u015f \u0130dar\u0259si\tYevlax\t11\n12 sayl\u0131 \u018frazi Vergil\u0259r Ba\u015f \u0130dar\u0259si\tG\u0259nc\u0259\t12\n13 sayl\u0131 \u018frazi Vergil\u0259r \u0130dar\u0259si\tZaqatala\t13\n14 sayl\u0131 \u018frazi Vergil\u0259r \u0130dar\u0259si\t\u015e\u0259mkir\t14\nD\u00f6vl\u0259t Vergi xidm\u0259tinin Milli G\u0259lirl\u0259r Ba\u015f idar\u0259si\tBak\u0131\t16\nD\u00f6vl\u0259t Vergi xidm\u0259tinin Bak\u0131 \u015f\u0259h\u0259ri Lokal G\u0259lirl\u0259r Ba\u015f idar\u0259si\tBak\u0131\t19\nD\u00f6vl\u0259t Vergi xidm\u0259tinin Bak\u0131 \u015f\u0259h\u0259ri Ki\u00e7ik Sahibkarl\u0131qla \u0130\u015f \u00fczr\u0259 Ba\u015f idar\u0259si\tBak\u0131\t39\nNax\u00e7\u0131van \u015f\u0259h\u0259ri \u00fczr\u0259 Vergil\u0259r \u0130dar\u0259si\tNax\u00e7\u0131van\t27\n2 sayl\u0131 \u018frazi Vergil\u0259r \u0130dar\u0259si (Nax\u00e7\u0131van MR)\t\u015e\u0259rur, S\u0259d\u0259r\u0259k, K\u0259ng\u0259rli\t30\n3 sayl\u0131 \u018frazi Vergil\u0259r \u0130dar\u0259si (Nax\u00e7\u0131van MR)\t\u015eahbuz, Bab\u0259k\t26\n4 sayl\u0131 \u018frazi Vergil\u0259r \u0130dar\u0259si (Nax\u00e7\u0131van MR)\tCulfa, Ordubad\t24\n\u015e\u0259rqi Z\u0259ng\u0259zur \u018frazi Vergil\u0259r \u0130dar\u0259si\tC\u0259bray\u0131l, K\u0259lb\u0259c\u0259r, La\u00e7\u0131n, Qubadl\u0131, Z\u0259ngilan\t55" - }, - { - "fieldname": "vergid\u00f6vr\u00fc", - "fieldtype": "Select", - "label": "Vergi d\u00f6vr\u00fc", - "options": "\u0130llik" - }, - { - "fieldname": "il", - "fieldtype": "Int", - "label": "\u0130l", - "length": 4 - }, - { - "default": "1", - "fieldname": "tam_il", - "fieldtype": "Check", - "label": "Tam \u0130l" - }, - { - "default": "0", - "fieldname": "il_erzinde", - "fieldtype": "Check", - "label": "\u0130l \u018frzind\u0259" - }, - { - "fieldname": "\u015f\u0259xsi", - "fieldtype": "Section Break", - "label": "\u015e\u0259xsi" - }, - { - "fieldname": "v\u00f6en", - "fieldtype": "Int", - "label": "V\u00d6EN" - }, - { - "fieldname": "soyad\u0131", - "fieldtype": "Data", - "label": "Soyad\u0131" - }, - { - "fieldname": "atas\u0131n\u0131nad\u0131", - "fieldtype": "Data", - "label": "Atas\u0131n\u0131n ad\u0131" - }, - { - "fieldname": "mobn\u00f6mr\u02591", - "fieldtype": "Int", - "label": "Mob n\u00f6mr\u0259 1" - }, - { - "fieldname": "mobn\u00f6mr\u02592", - "fieldtype": "Int", - "label": "Mob n\u00f6mr\u0259 2" - }, - { - "fieldname": "column_break_yjgp", - "fieldtype": "Column Break" - }, - { - "fieldname": "\u00f6d\u0259yicitipi", - "fieldtype": "Select", - "label": "\u00d6d\u0259yici tipi", - "options": "H\u00fcquqi\nFiziki" - }, - { - "fieldname": "ad\u0131", - "fieldtype": "Data", - "label": "Ad\u0131" - }, - { - "fieldname": "\u015f\u0259h\u0259rn\u00f6mr\u0259si1", - "fieldtype": "Int", - "label": "\u015e\u0259h\u0259r n\u00f6mr\u0259si 1" - }, - { - "fieldname": "\u015f\u0259h\u0259rn\u00f6mr\u0259si2", - "fieldtype": "Int", - "label": "\u015e\u0259h\u0259r n\u00f6mr\u0259si 2" - }, - { - "fieldname": "section_break_pcfz", - "fieldtype": "Section Break" - }, - { - "fieldname": "\u0259sasf\u0259aliyy\u0259tn\u00f6v\u00fcn\u00fcnkodu", - "fieldtype": "Int", - "label": "\u018fsas f\u0259aliyy\u0259t n\u00f6v\u00fcn\u00fcn kodu" - }, - { - "fieldname": "t\u0259qdimolunmu\u015f\u0259lav\u0259l\u0259rinsay\u0131", - "fieldtype": "Int", - "label": "T\u0259qdim olunmu\u015f \u0259lav\u0259l\u0259rin say\u0131" - }, - { - "fieldname": "b\u0259yannam\u0259ninn\u00f6v\u00fc", - "fieldtype": "Select", - "label": "B\u0259yannam\u0259nin n\u00f6v\u00fc", - "options": "Cari\nD\u0259qiql\u0259\u015fdirilmi\u015f\nL\u0259\u011fv olma\nL\u0259\u011fvin d\u0259qiql\u0259\u015fdirilmi\u015fi\nAnaloji\nK\u00f6n\u00fcll\u00fc a\u00e7\u0131qlama" - }, - { - "fieldname": "d\u0259qiql\u0259\u015fdirilmi\u015fb\u0259yannam\u0259nint\u0259qdimedilm\u0259sibar\u0259d\u0259bildiri\u015f", - "fieldtype": "Float", - "label": "D\u0259qiql\u0259\u015fdirilmi\u015f b\u0259yannam\u0259nin t\u0259qdim edilm\u0259si bar\u0259d\u0259 bildiri\u015fin n\u00f6mr\u0259si", - "precision": "2" - }, - { - "fieldname": "column_break_xcxz", - "fieldtype": "Column Break" - }, - { - "fieldname": "section_break_vfvd", - "fieldtype": "Section Break" - }, - { - "default": "0", - "fieldname": "b\u0259yan_edil\u0259c\u0259k_m\u0259lumat\u0131m_yoxdur", - "fieldtype": "Check", - "label": "B\u0259yan edil\u0259c\u0259k m\u0259lumat\u0131m yoxdur" - }, - { - "fieldname": "html_ikbb", - "fieldtype": "HTML", - "options": "

Hesabat ilinin \u0259vv\u0259lin\u0259

" - }, - { - "fieldname": "\u0259lav\u0259_1_tab", - "fieldtype": "Tab Break", - "js_parent_subtab": "Verginin hesablanmas\u0131", - "label": "\u018flav\u0259 1" - }, - { - "fieldname": "html_ctml", - "fieldtype": "HTML", - "options": "

B\u00fcdc\u0259y\u0259 \u00f6d\u0259nilm\u0259li verginin m\u0259bl\u0259\u011fi

" - }, - { - "fieldname": "html_hken", - "fieldtype": "HTML", - "options": "

Vergid\u0259n azad olunan \u0259mlak\u0131n d\u0259y\u0259ri haqq\u0131nda m\u0259lumat

" - }, - { - "fieldname": "html_ybie", - "fieldtype": "HTML", - "options": "

Vergiy\u0259 c\u0259lb olunan \u0259sas v\u0259saitin d\u0259y\u0259ri haqq\u0131nda m\u0259lumat

" - }, - { - "fieldname": "warning_elave_1_html", - "fieldtype": "HTML", - "hidden": 1 - }, - { - "fieldname": "\u0259mlak_vergisinin_hesablanmas\u0131_tab", - "fieldtype": "Tab Break", - "label": "\u018fmlak vergisinin hesablanmas\u0131" - }, - { - "fieldname": "\u0259lav\u0259_2_tab", - "fieldtype": "Tab Break", - "js_parent_subtab": "Verginin hesablanmas\u0131", - "label": "\u018flav\u0259 2" - }, - { - "fieldname": "section_break_fugy", - "fieldtype": "Section Break" - }, - { - "fieldname": "html_exjg", - "fieldtype": "HTML", - "options": "

Art\u0131q qiym\u0259t\u0259 s\u0131\u011fortalanan \u0259sas v\u0259saitl\u0259r

" - }, - { - "fieldname": "section_break_bhet", - "fieldtype": "Section Break" - }, - { - "fieldname": "html_tuak", - "fieldtype": "HTML" - }, - { - "fieldname": "section_break_bhtd", - "fieldtype": "Section Break" - }, - { - "fieldname": "html_umxi", - "fieldtype": "HTML", - "options": "

Hesabat ilinin sonuna

" - }, - { - "fieldname": "section_break_cnpg", - "fieldtype": "Section Break" - }, - { - "fieldname": "html_mxir", - "fieldtype": "HTML", - "options": "

Hesablanm\u0131\u015f verginin m\u0259bl\u0259\u011fi

" - }, - { - "fieldname": "idar\u0259", - "fieldtype": "Section Break", - "label": "\u0130dar\u0259" - }, - { - "fieldname": "section_break_klzd", - "fieldtype": "Section Break" - }, - { - "fieldname": "vergi_hesab_1ci", - "fieldtype": "Table", - "options": "Property Tax Gov Emlak vergi hesablamasi 1ci cedvel" - }, - { - "fieldname": "vergi_hesab_2ci", - "fieldtype": "Table", - "options": "Property Tax Gov Emlak vergi hesablamasi 2ci cedvel" - }, - { - "fieldname": "vergi_hesab_3cu", - "fieldtype": "Table", - "options": "Property Tax Gov Emlak vergi hesablamasi 3cu cedvel" - }, - { - "fieldname": "vergi_hesab_4cu", - "fieldtype": "Table", - "options": "Property Tax Gov Emlak vergi hesablamasi 4cu cedvel" - }, - { - "fieldname": "vergi_hesab_5ci", - "fieldtype": "Table", - "options": "Property Tax Gov Emlak vergi hesablamasi 5ci cedvel" - }, - { - "fieldname": "vergi_hesab_6ci", - "fieldtype": "Table", - "options": "Property Tax Gov Emlak vergi hesablamasi 6ci cedvel" - }, - { - "fieldname": "elave_1", - "fieldtype": "Table", - "options": "Property Tax Gov Elave 1" - }, - { - "fieldname": "elave_2", - "fieldtype": "Table", - "options": "Property Tax Gov Elave 2" - }, - { - "fieldname": "section_break_wnwr", - "fieldtype": "Section Break" - }, - { - "default": "M\u00fc\u0259ssis\u0259 il \u0259rzind\u0259 tam f\u0259aliyy\u0259t g\u00f6st\u0259rdiyi halda", - "fieldname": "s\u0259tirl\u0259rd\u0259nbirinise\u00e7in", - "fieldtype": "Select", - "label": "S\u0259tirl\u0259rd\u0259n birini se\u00e7in", - "options": "M\u00fc\u0259ssis\u0259 il \u0259rzind\u0259 yarand\u0131\u011f\u0131 halda\nM\u00fc\u0259ssis\u0259 il \u0259rzind\u0259 tam f\u0259aliyy\u0259t g\u00f6st\u0259rdiyi halda" - }, - { - "fieldname": "column_break_dblg", - "fieldtype": "Column Break" - }, - { - "fieldname": "html_uhqz", - "fieldtype": "HTML", - "options": "

M\u00fc\u0259ssis\u0259nin yaranma v\u0259 ya \u0259mlak vergisinin \u00f6d\u0259yicisi olma tarixin\u0259

" - }, - { - "fieldname": "vergi_hesab_1ci_1", - "fieldtype": "Table", - "options": "Property Tax Gov Emlak vergi hesablamasi 1ci cedvel 1" - }, - { - "fieldname": "vergi_hesab_4cu_1", - "fieldtype": "Table", - "options": "Property Tax Gov Emlak vergi hesablamasi 4cu cedvel 1" - } - ], - "index_web_pages_for_search": 1, - "links": [], - "modified": "2025-12-29 18:27:42.028445", - "modified_by": "Administrator", - "module": "Taxes Az", - "name": "Property Tax Gov", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "write": 1 - } - ], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/taxes_az/taxes_az/doctype/property_tax_gov/property_tax_gov.py b/taxes_az/taxes_az/doctype/property_tax_gov/property_tax_gov.py deleted file mode 100644 index e8a421a..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov/property_tax_gov.py +++ /dev/null @@ -1,886 +0,0 @@ -# Copyright (c) 2025, Jey Soft and contributors -# For license information, please see license.txt - -import frappe -from frappe.model.document import Document -from frappe.utils import flt, add_days -import re -import json - - -class PropertyTaxGov(Document): - pass - - -# --------------------------------------------------------------------------- -# GNS calc bridge — runs the cabinet's OWN calculation code (useCalculation, -# extracted from new.e-taxes.gov.az declaration bundle) offline via Node. -# No authorization / no network: the calc is pure functions over the model. -# Bundle: gns_property_calc.bundle.js + gns_property_calc_cli.js (this dir). -# --------------------------------------------------------------------------- - -def _node_bin(): - import shutil, glob - n = shutil.which("node") - if n: - return n - cands = sorted(glob.glob("/home/frappe/.nvm/versions/node/*/bin/node")) - return cands[-1] if cands else "node" - - -@frappe.whitelist() -def compute_via_gns(payload): - """Compute property-tax indicators with the GNS cabinet's own JS calc. - - payload: dict (or JSON string) shaped as - { - "objectActivity": "OBJECT_FULL_ACTIVITY" | "OBJECT_ESTABLISHED" | "LIQUIDATION", - "calculation": {"monthCountFromStartPeriod": int, "monthCountToLiquidation": int, ...}, - "appendix1": {"periodStartTotal","endYearTotal","overTotal","removedTotal","createdTotal"}, - "appendix2": {"periodStartTotal","periodEndTotal","excessInsuredTotal","onCreateDateTotal","onCancelDateTotal"} - } - Returns dict {"..": value, ...} exactly as the cabinet computes. - """ - import os, subprocess - - if isinstance(payload, str): - payload = json.loads(payload) - - cli = os.path.join(os.path.dirname(os.path.abspath(__file__)), "gns_property_calc_cli.js") - try: - proc = subprocess.run( - [_node_bin(), cli], - input=json.dumps(payload), - capture_output=True, text=True, timeout=30, - ) - except Exception as e: - frappe.throw(f"GNS calc invocation failed: {e}") - - if proc.returncode != 0: - frappe.throw(f"GNS calc error: {(proc.stderr or '')[:800]}") - return json.loads(proc.stdout or "{}") - - -@frappe.whitelist() -def populate_property_tax_tables(company, year, from_date, to_date, calculation_mode, existing_elave_1, existing_elave_2): - """ - Main method to populate Property Tax Gov child tables from Asset data - - Args: - company: Company name - year: Tax year (integer) - from_date: Start date (YYYY-MM-DD) - to_date: End date (YYYY-MM-DD) - calculation_mode: 'tam_il' or 'il_erzinde' - existing_elave_1: Existing Əlavə 1 rows (JSON array) - existing_elave_2: Existing Əlavə 2 rows (JSON array) - - Returns: - Dictionary with elave_1_data and elave_2_data mappings - """ - try: - # Parse JSON if needed - if isinstance(existing_elave_1, str): - existing_elave_1 = json.loads(existing_elave_1) - if isinstance(existing_elave_2, str): - existing_elave_2 = json.loads(existing_elave_2) - - # Get aggregated asset data - taxable_aggregated = get_taxable_assets_aggregated(company, from_date, to_date) - tax_exempt_aggregated = get_tax_exempt_assets_aggregated(company, from_date, to_date) - - # Map to rows with proper field names based on calculation_mode - # Use fuzzy matching for Əlavə 2 (Taxable Assets) - elave_2_data = {} - for category, data in taxable_aggregated.items(): - # Find matching row by partial match (e.g., "Mənzillər" matches "1.5 Mənzillər") - matching_key = find_matching_category(category, existing_elave_2) - - if matching_key: - if calculation_mode == 'tam_il': - elave_2_data[matching_key] = { - 'hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyəri': data['value_as_on_from_date'], - 'hesabatilinsonunaəsasvəsaitlərinqalıqdəyəri': data['net_asset_value_as_on_to_date'], - 'hesabatilierzindeuçotaalınan': 0, - 'artıqqiymətəəsasvəsaitlərindəyəri505': data['insurance_value'] - } - else: # il_erzinde - # Бизнес-правило: Для компаний, созданных в течение года (İl Ərzində), - # если нет новых покупок (value_of_new_purchase < 0.01), то все поля = 0 - if flt(data.get('value_of_new_purchase', 0)) >= 0.01: - elave_2_data[matching_key] = { - 'hesabatilierzindeuçotaalınan': data['value_of_new_purchase'], - 'hesabatilinsonunaəsasvəsaitlərinqalıqdəyəri': data['net_asset_value_as_on_to_date'], - 'hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyəri': 0, - 'artıqqiymətəəsasvəsaitlərindəyəri505': data['insurance_value'] - } - else: - # Нет новых покупок - очистить все поля - elave_2_data[matching_key] = { - 'hesabatilierzindeuçotaalınan': 0, - 'hesabatilinsonunaəsasvəsaitlərinqalıqdəyəri': 0, - 'hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyəri': 0, - 'artıqqiymətəəsasvəsaitlərindəyəri505': 0 - } - - # Map to rows with fuzzy matching for Əlavə 1 (Tax Exempt Assets) - elave_1_data = {} - for article_number, data in tax_exempt_aggregated.items(): - # Find matching row by article number in "Azadolma səbəbi" - matching_key = find_matching_azadolma_sebeb(article_number, existing_elave_1) - - if matching_key: - if calculation_mode == 'tam_il': - elave_1_data[matching_key] = { - 'hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyərimanatla5012': data['value_as_on_from_date'], - 'ilinsonunaəsasvəsaitlərinqalıqdəyəri': data['net_asset_value_as_on_to_date'], - 'hesabatiliərzindəəsasvəsaitlərinqalıqdəyəri': 0, - 'artıqqiymətəəsasvəsaitlərindəyəri': data['insurance_value'] - } - else: # il_erzinde - # Бизнес-правило: Для компаний, созданных в течение года (İl Ərzində), - # если нет новых покупок (value_of_new_purchase < 0.01), то все поля = 0 - if flt(data.get('value_of_new_purchase', 0)) >= 0.01: - elave_1_data[matching_key] = { - 'hesabatiliərzindəəsasvəsaitlərinqalıqdəyəri': data['value_of_new_purchase'], - 'ilinsonunaəsasvəsaitlərinqalıqdəyəri': data['net_asset_value_as_on_to_date'], - 'hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyərimanatla5012': 0, - 'artıqqiymətəəsasvəsaitlərindəyəri': data['insurance_value'] - } - else: - # Нет новых покупок - очистить все поля - elave_1_data[matching_key] = { - 'hesabatiliərzindəəsasvəsaitlərinqalıqdəyəri': 0, - 'ilinsonunaəsasvəsaitlərinqalıqdəyəri': 0, - 'hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyərimanatla5012': 0, - 'artıqqiymətəəsasvəsaitlərindəyəri': 0 - } - - return { - 'success': True, - 'elave_1_data': elave_1_data, - 'elave_2_data': elave_2_data - } - - except Exception as e: - frappe.log_error(f"Error in populate_property_tax_tables: {str(e)}", "Property Tax Gov") - return { - 'success': False, - 'error': str(e) - } - - -def get_taxable_assets_aggregated(company, from_date, to_date): - """ - Get aggregated data for taxable assets grouped by taxable_asset_type - - Returns: - Dictionary: { - 'taxable_asset_type_value': { - 'value_as_on_from_date': float, - 'value_of_new_purchase': float, - 'net_asset_value_as_on_to_date': float - } - } - """ - # Get all assets with taxable_asset_type populated - assets_with_taxable_type = frappe.db.sql(""" - SELECT - name, - taxable_asset_type - FROM - `tabAsset` - WHERE - docstatus = 1 - AND company = %(company)s - AND taxable_asset_type IS NOT NULL - AND taxable_asset_type != '' - AND purchase_date <= %(to_date)s - """, { - 'company': company, - 'to_date': to_date - }, as_dict=True) - - if not assets_with_taxable_type: - return {} - - # Get asset balances - asset_names = [asset['name'] for asset in assets_with_taxable_type] - asset_balances = get_asset_balances_using_standard_logic(company, from_date, to_date, asset_names) - - # Aggregate by taxable_asset_type - aggregated = {} - - for asset in assets_with_taxable_type: - asset_type = asset['taxable_asset_type'] - - # Find balance for this asset - balance = next( - (b for b in asset_balances if b['asset'] == asset['name']), - {} - ) - - # Initialize if not exists - if asset_type not in aggregated: - aggregated[asset_type] = { - 'value_as_on_from_date': 0.0, - 'value_of_new_purchase': 0.0, - 'net_asset_value_as_on_to_date': 0.0, - 'insurance_value': 0.0 - } - - # Accumulate values - aggregated[asset_type]['value_as_on_from_date'] += flt(balance.get('value_as_on_from_date', 0)) - aggregated[asset_type]['value_of_new_purchase'] += flt(balance.get('value_of_new_purchase', 0)) - aggregated[asset_type]['net_asset_value_as_on_to_date'] += flt(balance.get('net_asset_value_as_on_to_date', 0)) - aggregated[asset_type]['insurance_value'] += flt(balance.get('insurance_value', 0)) - - return aggregated - - -def get_tax_exempt_assets_aggregated(company, from_date, to_date): - """ - Get aggregated data for tax exempt assets grouped by tax article - - Returns: - Dictionary: { - 'tax_article_number': { # e.g., '199.1', '207.3' - 'value_as_on_from_date': float, - 'value_of_new_purchase': float, - 'net_asset_value_as_on_to_date': float - } - } - """ - # Get all assets with industrial_tax_article or tax_exempt_tax_article - # Exclude agricultural_tax_article as per requirements - assets_with_tax_articles = frappe.db.sql(""" - SELECT - a.name, - a.industrial_tax_article, - a.tax_exempt_tax_article, - COALESCE(NULLIF(a.industrial_tax_article, ''), a.tax_exempt_tax_article) as tax_article - FROM - `tabAsset` a - WHERE - a.docstatus = 1 - AND a.company = %(company)s - AND ( - (a.industrial_tax_article IS NOT NULL AND a.industrial_tax_article != '') - OR (a.tax_exempt_tax_article IS NOT NULL AND a.tax_exempt_tax_article != '') - ) - AND a.purchase_date <= %(to_date)s - """, { - 'company': company, - 'to_date': to_date - }, as_dict=True) - - if not assets_with_tax_articles: - return {} - - # Get asset balances - asset_names = [asset['name'] for asset in assets_with_tax_articles] - asset_balances = get_asset_balances_using_standard_logic(company, from_date, to_date, asset_names) - - # Aggregate by tax article number - aggregated = {} - - for asset in assets_with_tax_articles: - # Extract article number from Tax Article name - tax_article_full = asset['tax_article'] - article_number = extract_article_number(tax_article_full) - - if not article_number: - continue - - # Find balance for this asset - balance = next( - (b for b in asset_balances if b['asset'] == asset['name']), - {} - ) - - # Initialize if not exists - if article_number not in aggregated: - aggregated[article_number] = { - 'value_as_on_from_date': 0.0, - 'value_of_new_purchase': 0.0, - 'net_asset_value_as_on_to_date': 0.0, - 'insurance_value': 0.0 - } - - # Accumulate values - aggregated[article_number]['value_as_on_from_date'] += flt(balance.get('value_as_on_from_date', 0)) - aggregated[article_number]['value_of_new_purchase'] += flt(balance.get('value_of_new_purchase', 0)) - aggregated[article_number]['net_asset_value_as_on_to_date'] += flt(balance.get('net_asset_value_as_on_to_date', 0)) - aggregated[article_number]['insurance_value'] += flt(balance.get('insurance_value', 0)) - - return aggregated - - -def extract_article_number(tax_article_name): - """ - Extract article number from Tax Article name - - Examples: - "Vergi Məcəlləsinin 199.1-ci maddəsinə əsasən" → "199.1" - "Vergi Məcəlləsinin 207.3-cü maddəsinə əsasən" → "207.3" - "Vergi Məcəlləsinin 199.4.1-ci maddəsinə əsasən" → "199.4.1" - - Returns: - String: Article number or None if not found - """ - if not tax_article_name: - return None - - # Pattern to match article numbers like 199.1, 207.3, 199.4.1-1, 227.1 - pattern = r'(\d+(?:\.\d+)*(?:-\d+)?)' - match = re.search(pattern, tax_article_name) - - if match: - return match.group(1) - - return None - - -def find_matching_azadolma_sebeb(article_number, existing_rows): - """ - Find the "Azadolma səbəbi" value that contains the given article number - - Args: - article_number: String like "199.1" or "207.3" - existing_rows: List of existing Əlavə 1 rows - - Returns: - The matching "Azadolma səbəbi" value or None - """ - if not article_number: - return None - - for row in existing_rows: - azadolma_sebeb = row.get('azadolmasəbəbi', '') - if article_number in azadolma_sebeb: - return azadolma_sebeb - - return None - - -def find_matching_category(asset_category, existing_rows): - """ - Find matching category in Əlavə 2 rows using partial match - - Examples: - Asset has: "Mənzillər" - Row has: "1.5 Mənzillər" - Result: Match found - - Asset has: "Qeyri-yaşayış binaları (sahələri)" - Row has: "1.2 Qeyri-yaşayış binaları (sahələri)" - Result: Match found - - Args: - asset_category: Category from Asset's taxable_asset_type field - existing_rows: List of existing Əlavə 2 rows - - Returns: - The matching "Vergiyə cəlb olunan əmlakların kateqoriyası" value or None - """ - if not asset_category: - return None - - for row in existing_rows: - row_category = row.get('vergiyəcəlbolunanəmlaklarınkateqoriyası', '') - - # Check if asset_category is contained in row_category (e.g., "Mənzillər" in "1.5 Mənzillər") - if asset_category in row_category: - return row_category - - # Also check reverse - if row_category is contained in asset_category - # (in case asset has full name with prefix) - if row_category in asset_category: - return row_category - - return None - - -def get_asset_balances_using_standard_logic(company, from_date, to_date, asset_names): - """ - Calculate asset balances using ERPNext's Asset Depreciations and Balances report logic - - Returns: - List of dictionaries with asset balances - """ - if not asset_names: - return [] - - # Check ERPNext version for field compatibility - version_info = check_erpnext_version() - purchase_amount_field = version_info['purchase_amount_field'] - has_capitalization = version_info['has_capitalization'] - - # Get asset details (gross values) - asset_details = get_asset_cost_details( - company, from_date, to_date, asset_names, - purchase_amount_field, has_capitalization - ) - - # Get depreciation details - asset_depreciation = get_asset_depreciation_details( - company, from_date, to_date, asset_names - ) - - # Get value adjustments - asset_adjustments = get_asset_value_adjustments( - company, from_date, to_date, asset_names - ) - - # Combine and calculate net values - result = [] - - for asset_detail in asset_details: - asset_name = asset_detail.get('name') - - # Find depreciation - depreciation = next( - (dep for dep in asset_depreciation if dep['asset'] == asset_name), - {} - ) - - # Find adjustments - adjustments = asset_adjustments.get(asset_name, { - 'adjustment_before_from_date': 0.0, - 'adjustment_till_to_date': 0.0 - }) - - # Calculate values following ERPNext standard report logic - value_as_on_from_date = flt(asset_detail.get('cost_as_on_from_date', 0)) - value_as_on_from_date += adjustments['adjustment_before_from_date'] - - value_of_new_purchase = flt(asset_detail.get('cost_of_new_purchase', 0)) - - adjustment_during_period = ( - adjustments['adjustment_till_to_date'] - - adjustments['adjustment_before_from_date'] - ) - - value_as_on_to_date = ( - value_as_on_from_date + - value_of_new_purchase - - flt(asset_detail.get('cost_of_sold_asset', 0)) - - flt(asset_detail.get('cost_of_scrapped_asset', 0)) - - flt(asset_detail.get('cost_of_capitalized_asset', 0)) + - adjustment_during_period - ) - - accumulated_depreciation_as_on_from_date = flt( - depreciation.get('accumulated_depreciation_as_on_from_date', 0) - ) - - accumulated_depreciation_as_on_to_date = ( - accumulated_depreciation_as_on_from_date + - flt(depreciation.get('depreciation_amount_during_the_period', 0)) - - flt(depreciation.get('depreciation_eliminated_during_the_period', 0)) - - flt(depreciation.get('depreciation_eliminated_via_reversal', 0)) - ) - - net_asset_value_as_on_from_date = ( - value_as_on_from_date - accumulated_depreciation_as_on_from_date - ) - - net_asset_value_as_on_to_date = ( - value_as_on_to_date - accumulated_depreciation_as_on_to_date - ) - - # Calculate insurance value (Insured value - Gross Purchase Amount) - # Version-compat: ERPNext v15 renamed Asset.gross_purchase_amount -> net_purchase_amount - # (patch v15_0/rename_gross_purchase_amount_to_net_purchase_amount). Use the same field - # the rest of this cost logic uses (purchase_amount_field), with explicit fallback. - _asset_cols = frappe.db.get_table_columns('Asset') - if 'gross_purchase_amount' in _asset_cols: - _gross_field = 'gross_purchase_amount' - elif 'net_purchase_amount' in _asset_cols: - _gross_field = 'net_purchase_amount' - else: - _gross_field = 'purchase_amount' - insured_value = flt(frappe.db.get_value('Asset', asset_name, 'insured_value') or 0) - gross_purchase_amount = flt(frappe.db.get_value('Asset', asset_name, _gross_field) or 0) - # Only calculate difference if insured_value is actually set (> 0) - insurance_difference = (insured_value - gross_purchase_amount) if insured_value > 0 else 0 - - balance_result = { - 'asset': asset_name, - 'value_as_on_from_date': value_as_on_from_date, - 'value_of_new_purchase': value_of_new_purchase, - 'net_asset_value_as_on_from_date': net_asset_value_as_on_from_date, - 'net_asset_value_as_on_to_date': net_asset_value_as_on_to_date, - 'insurance_value': insurance_difference - } - result.append(balance_result) - - return result - - -def check_erpnext_version(): - """Check ERPNext version for field compatibility""" - columns = frappe.db.get_table_columns("Asset") - has_net_purchase_amount = "net_purchase_amount" in columns - has_capitalization = "Asset Capitalization" in frappe.get_all("DocType", pluck="name") - - return { - "purchase_amount_field": "net_purchase_amount" if has_net_purchase_amount else "gross_purchase_amount", - "has_capitalization": has_capitalization - } - - -def get_asset_cost_details(company, from_date, to_date, asset_names, purchase_amount_field, has_capitalization): - """Get asset cost details (mimics ERPNext standard report)""" - - asset_placeholders = ", ".join(["%s"] * len(asset_names)) - - capitalization_check = "" - if has_capitalization: - capitalization_check = """ - AND NOT EXISTS( - SELECT 1 FROM `tabAsset Capitalization Asset Item` acai - JOIN `tabAsset Capitalization` ac ON acai.parent = ac.name - WHERE acai.asset = a.name - AND ac.posting_date < %s - AND ac.docstatus = 1 - ) - """ - else: - # В версии 15 просто исключаем активы где есть запись в Asset Capitalization Asset Item - capitalization_check = " AND NOT EXISTS(SELECT name FROM `tabAsset Capitalization Asset Item` WHERE asset = a.name)" - - query = f""" - SELECT - a.name, - IFNULL(SUM( - CASE - WHEN a.purchase_date < %s THEN - CASE - WHEN IFNULL(a.disposal_date, 0) = 0 OR a.disposal_date >= %s - THEN a.{purchase_amount_field} - ELSE 0 - END - ELSE 0 - END - ), 0) as cost_as_on_from_date, - - IFNULL(SUM( - CASE - WHEN a.purchase_date >= %s - THEN a.{purchase_amount_field} - ELSE 0 - END - ), 0) as cost_of_new_purchase, - - IFNULL(SUM( - CASE - WHEN IFNULL(a.disposal_date, 0) != 0 - AND a.disposal_date >= %s - AND a.disposal_date <= %s - THEN - CASE WHEN a.status = 'Sold' THEN a.{purchase_amount_field} ELSE 0 END - ELSE 0 - END - ), 0) as cost_of_sold_asset, - - IFNULL(SUM( - CASE - WHEN IFNULL(a.disposal_date, 0) != 0 - AND a.disposal_date >= %s - AND a.disposal_date <= %s - THEN - CASE WHEN a.status = 'Scrapped' THEN a.{purchase_amount_field} ELSE 0 END - ELSE 0 - END - ), 0) as cost_of_scrapped_asset, - - IFNULL(SUM( - CASE - WHEN IFNULL(a.disposal_date, 0) != 0 - AND a.disposal_date >= %s - AND a.disposal_date <= %s - THEN - CASE WHEN a.status = 'Capitalized' THEN a.{purchase_amount_field} ELSE 0 END - ELSE 0 - END - ), 0) as cost_of_capitalized_asset - FROM - `tabAsset` a - WHERE - a.docstatus = 1 - AND a.company = %s - AND a.purchase_date <= %s - AND a.name IN ({asset_placeholders}) - {capitalization_check} - GROUP BY a.name - """ - - values = [ - from_date, # cost_as_on_from_date condition 1 - from_date, # cost_as_on_from_date condition 2 - from_date, # cost_of_new_purchase - from_date, # cost_of_sold_asset condition 1 - to_date, # cost_of_sold_asset condition 2 - from_date, # cost_of_scrapped_asset condition 1 - to_date, # cost_of_scrapped_asset condition 2 - from_date, # cost_of_capitalized_asset condition 1 - to_date, # cost_of_capitalized_asset condition 2 - company, # company filter - to_date, # purchase_date filter - *asset_names # asset names for IN clause - ] - - if has_capitalization: - values.append(from_date) - - return frappe.db.sql(query, values, as_dict=True) - - -def get_asset_depreciation_details(company, from_date, to_date, asset_names): - """Get asset depreciation details (mimics ERPNext standard report)""" - - asset_placeholders = ", ".join(["%s"] * len(asset_names)) - - query = f""" - SELECT - results.name as asset, - SUM(results.accumulated_depreciation_as_on_from_date) as accumulated_depreciation_as_on_from_date, - SUM(results.depreciation_eliminated_during_the_period) as depreciation_eliminated_during_the_period, - SUM(results.depreciation_amount_during_the_period) as depreciation_amount_during_the_period, - SUM(results.depreciation_eliminated_via_reversal) as depreciation_eliminated_via_reversal - FROM ( - SELECT - a.name as name, - IFNULL(SUM( - CASE - WHEN gle.posting_date < %s - AND (IFNULL(a.disposal_date, 0) = 0 OR a.disposal_date >= %s) - THEN gle.debit - ELSE 0 - END - ), 0) as accumulated_depreciation_as_on_from_date, - - IFNULL(SUM( - CASE - WHEN gle.posting_date <= %s - AND IFNULL(a.disposal_date, 0) = 0 - THEN gle.credit - ELSE 0 - END - ), 0) as depreciation_eliminated_via_reversal, - - IFNULL(SUM( - CASE - WHEN IFNULL(a.disposal_date, 0) != 0 - AND a.disposal_date >= %s - AND a.disposal_date <= %s - AND gle.posting_date <= a.disposal_date - THEN gle.debit - ELSE 0 - END - ), 0) as depreciation_eliminated_during_the_period, - - IFNULL(SUM( - CASE - WHEN gle.posting_date >= %s - AND gle.posting_date <= %s - AND (IFNULL(a.disposal_date, 0) = 0 OR gle.posting_date <= a.disposal_date) - THEN gle.debit - ELSE 0 - END - ), 0) as depreciation_amount_during_the_period - FROM - `tabGL Entry` gle - JOIN - `tabAsset` a ON gle.against_voucher = a.name - JOIN - `tabAsset Category Account` aca ON aca.parent = a.asset_category - AND aca.company_name = %s - JOIN - `tabCompany` company ON company.name = %s - WHERE - a.docstatus = 1 - AND a.company = %s - AND a.purchase_date <= %s - AND gle.is_cancelled = 0 - AND gle.account = IFNULL(aca.depreciation_expense_account, company.depreciation_expense_account) - AND a.name IN ({asset_placeholders}) - GROUP BY a.name - - UNION - - SELECT - a.name as name, - IFNULL(SUM( - CASE - WHEN IFNULL(a.disposal_date, 0) != 0 - AND a.disposal_date < %s - THEN 0 - ELSE a.opening_accumulated_depreciation - END - ), 0) as accumulated_depreciation_as_on_from_date, - 0 as depreciation_eliminated_via_reversal, - IFNULL(SUM( - CASE - WHEN a.disposal_date >= %s - AND a.disposal_date <= %s - THEN a.opening_accumulated_depreciation - ELSE 0 - END - ), 0) as depreciation_eliminated_during_the_period, - 0 as depreciation_amount_during_the_period - FROM - `tabAsset` a - WHERE - a.docstatus = 1 - AND a.company = %s - AND a.purchase_date <= %s - AND a.name IN ({asset_placeholders}) - GROUP BY a.name - ) as results - GROUP BY results.name - """ - - values = [ - from_date, # accumulated_depreciation_as_on_from_date condition 1 - from_date, # accumulated_depreciation_as_on_from_date condition 2 - to_date, # depreciation_eliminated_via_reversal - from_date, # depreciation_eliminated_during_the_period condition 1 - to_date, # depreciation_eliminated_during_the_period condition 2 - from_date, # depreciation_amount_during_the_period condition 1 - to_date, # depreciation_amount_during_the_period condition 2 - company, # aca.company_name - company, # company.name - company, # a.company - to_date, # a.purchase_date - *asset_names, # asset names for IN clause (first SELECT) - from_date, # disposal_date condition (second SELECT) - from_date, # disposal_date condition (second SELECT) - to_date, # disposal_date condition (second SELECT) - company, # a.company (second SELECT) - to_date, # a.purchase_date (second SELECT) - *asset_names # asset names for IN clause (second SELECT) - ] - - return frappe.db.sql(query, values, as_dict=True) - - -def get_asset_value_adjustments(company, from_date, to_date, asset_names): - """Get asset value adjustments (mimics ERPNext standard report)""" - - asset_placeholders = ", ".join(["%s"] * len(asset_names)) - - query = f""" - SELECT - a.name AS asset, - IFNULL( - SUM( - CASE - WHEN gle.posting_date < %s - AND (a.disposal_date IS NULL OR a.disposal_date >= %s) - THEN gle.debit - gle.credit - ELSE 0 - END - ), - 0) AS value_adjustment_before_from_date, - IFNULL( - SUM( - CASE - WHEN gle.posting_date <= %s - AND (a.disposal_date IS NULL OR a.disposal_date >= %s) - THEN gle.debit - gle.credit - ELSE 0 - END - ), - 0) AS value_adjustment_till_to_date - FROM - `tabGL Entry` gle - JOIN - `tabAsset` a ON gle.against_voucher = a.name - JOIN - `tabAsset Category Account` aca ON aca.parent = a.asset_category - AND aca.company_name = %s - WHERE - gle.is_cancelled = 0 - AND a.docstatus = 1 - AND a.company = %s - AND a.purchase_date <= %s - AND gle.account = aca.fixed_asset_account - AND a.name IN ({asset_placeholders}) - GROUP BY a.name - """ - - values = [ - from_date, # value_adjustment_before_from_date condition 1 - from_date, # value_adjustment_before_from_date condition 2 - to_date, # value_adjustment_till_to_date condition 1 - to_date, # value_adjustment_till_to_date condition 2 - company, # aca.company_name - company, # a.company - to_date, # a.purchase_date - *asset_names # asset names for IN clause - ] - - result = frappe.db.sql(query, values, as_dict=True) - - # Convert to dictionary - adjustment_map = {} - for r in result: - adjustment_map[r['asset']] = { - 'adjustment_before_from_date': flt(r.get('value_adjustment_before_from_date', 0)), - 'adjustment_till_to_date': flt(r.get('value_adjustment_till_to_date', 0)) - } - - return adjustment_map - - -@frappe.whitelist() -def calculate_months_for_vergi_hesab_4cu_1(company, year): - """ - Находит самый ранний Asset по available_for_use_date в указанном году - и возвращает количество месяцев от этого месяца до конца года (включительно) - - Args: - company: Название компании - year: Год для поиска (integer) - - Returns: - Integer: Количество месяцев (1-12) или 0 если нет Assets - """ - try: - # Найти самый ранний Asset в году - # docstatus = 1 означает статус "Submitted" (не Draft и не Cancelled) - earliest_asset = frappe.db.sql(""" - SELECT MIN(available_for_use_date) as earliest_date - FROM `tabAsset` - WHERE company = %(company)s - AND docstatus = 1 - AND available_for_use_date IS NOT NULL - AND YEAR(available_for_use_date) = %(year)s - """, { - 'company': company, - 'year': year - }, as_dict=True) - - if not earliest_asset or not earliest_asset[0].get('earliest_date'): - return 0 - - earliest_date = earliest_asset[0]['earliest_date'] - - # Получить номер месяца (1-12) - from datetime import datetime - if isinstance(earliest_date, str): - earliest_date = datetime.strptime(earliest_date, '%Y-%m-%d') - - month = earliest_date.month - - # Вычислить количество месяцев от этого месяца до конца года (не включая этот месяц) - # Январь (1) → 12-1=11 месяцев, Март (3) → 12-3=9 месяцев, Сентябрь (9) → 12-9=3 месяца - months_count = 12 - month - - return months_count - - except Exception as e: - frappe.log_error(f"Error in calculate_months_for_vergi_hesab_4cu_1: {str(e)}", "Property Tax Gov") - return 0 diff --git a/taxes_az/taxes_az/doctype/property_tax_gov/test_property_tax_gov.py b/taxes_az/taxes_az/doctype/property_tax_gov/test_property_tax_gov.py deleted file mode 100644 index 2338a1a..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov/test_property_tax_gov.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2025, Jey Soft and Contributors -# See license.txt - -# import frappe -from frappe.tests.utils import FrappeTestCase - - -class TestPropertyTaxGov(FrappeTestCase): - pass diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_elave_1/__init__.py b/taxes_az/taxes_az/doctype/property_tax_gov_elave_1/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_elave_1/property_tax_gov_elave_1.json b/taxes_az/taxes_az/doctype/property_tax_gov_elave_1/property_tax_gov_elave_1.json deleted file mode 100644 index 37d2735..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_elave_1/property_tax_gov_elave_1.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2025-01-13 15:04:47.107017", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "azadolmasəbəbi", - "hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyərimanatla5012", - "ləğvolunmatarixinəəsasvəsaitlərinqalıqdəyəri", - "hesabatiliərzindəəsasvəsaitlərinqalıqdəyəri", - "ilinsonunaəsasvəsaitlərinqalıqdəyəri", - "artıqqiymətəəsasvəsaitlərindəyəri" - ], - "fields": [ - { - "fieldname": "azadolmasəbəbi", - "fieldtype": "Select", - "in_list_view": 1, - "label": "Azadolma səbəbi", - "options": "Vergi Məcəlləsinin 199.1-ci maddəsinə əsasən:\nVergi Məcəlləsinin 199.4.1-ci maddəsinə əsasən:\nVergi Məcəlləsinin 199.4.2-ci maddəsinə əsasən:\nVergi Məcəlləsinin 199.4.3-cü maddəsinə əsasən:\nVergi Məcəlləsinin 199.4.4-cü maddəsinə əsasən:\nVergi Məcəlləsinin 199.4.1-1-ci maddəsinə əsasən:\nVergi Məcəlləsinin 199.5-ci maddəsinə əsasən:\nVergi Məcəlləsinin 199.7-ci maddəsinə əsasən:\nVergi Məcəlləsinin 199.8-ci maddəsinə əsasən:\nVergi Məcəlləsinin 199.9-cu maddəsinə əsasən:\nVergi Məcəlləsinin 199.11-cu maddəsinə əsasən:\nVergi Məcəlləsinin 199.14-cu maddəsinə əsasən:\nVergi Məcəlləsinin 199.15-cu maddəsinə əsasən:\nVergi Məcəlləsinin 199.16-cı maddəsinə əsasən:\nVergi Məcəlləsinin 199.17-ci maddəsinə əsasən:\nVergi Məcəlləsinin 199.18-ci maddəsinə əsasən:\nVergi Məcəlləsinin 199.19-cu maddəsinə əsasən:\nVergi Məcəlləsinin 227.1-ci maddəsinə əsasən:\nQanunla təsdiq olunmuş hasilatın pay bölgüsü haqqında, əsas boru kəməri haqqında və digər bu qəbildən olan sazişlərdə və ya qanunlarda, o cümlədən neft və qaz haqqında, ixrac məqsədli neft-qaz fəaliyyəti üzrə:\nXüsusi iqtisadi zonalar haqqında qanunlarda nəzərdə tutulan əmlaklar üzrə:\nAzərbaycan Respublikasının tərəfdar çıxdığı beynəlxalq müqavilələr üzrə:\nVergidən azad olunan əmlakın CƏMİ dəyəri:", - "read_only": 1, - "length": 255 - }, - { - "fieldname": "hesabatiliərzindəəsasvəsaitlərinqalıqdəyəri", - "fieldtype": "Float", - "precision": "2", - "in_list_view": 1, - "label": "Yeni yaradıldığı (uçota alındığı) və ya əmlak vergisi ödəyicisi olma tarixinə əsas vəsaitlərin qalıq dəyəri (manatla) (503.2)\t", - "read_only": 1 - }, - { - "fieldname": "ləğvolunmatarixinəəsasvəsaitlərinqalıqdəyəri", - "fieldtype": "Float", - "precision": "2", - "in_list_view": 1, - "label": "Vergi ödəyicisinin ləğv olunma və ya uçotdan çıxarılma tarixinə əsas vəsaitlərin qalıq dəyəri (manatla) (502.2)", - "read_only": 1 - }, - { - "fieldname": "ilinsonunaəsasvəsaitlərinqalıqdəyəri", - "fieldtype": "Float", - "precision": "2", - "in_list_view": 1, - "label": "Vergi ödəyicisinin ilin sonuna əsas vəsaitlərinin qalıq dəyəri (manatla) (504.2)" - }, - { - "fieldname": "artıqqiymətəəsasvəsaitlərindəyəri", - "fieldtype": "Float", - "precision": "2", - "in_list_view": 1, - "label": "Artıq qiymətə sığortalanan əsas vəsaitlərin dəyəri (manatla) (505.2)" - }, - { - "fieldname": "hesabatilininəvvəlinəəsasvəsaitlərinqalıqdəyərimanatla5012", - "fieldtype": "Float", - "precision": "2", - "in_list_view": 1, - "label": "Hesabat ilinin əvvəlinə əsas vəsaitlərin qalıq dəyəri (manatla) (501.2)" - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2025-08-05 14:25:59.341379", - "modified_by": "Administrator", - "module": "Taxes Az", - "name": "Property Tax Gov Elave 1", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_elave_1/property_tax_gov_elave_1.py b/taxes_az/taxes_az/doctype/property_tax_gov_elave_1/property_tax_gov_elave_1.py deleted file mode 100644 index 6ad0af6..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_elave_1/property_tax_gov_elave_1.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2025, Jey Soft and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class PropertyTaxGovElave1(Document): - pass diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_elave_2/__init__.py b/taxes_az/taxes_az/doctype/property_tax_gov_elave_2/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_elave_2/property_tax_gov_elave_2.json b/taxes_az/taxes_az/doctype/property_tax_gov_elave_2/property_tax_gov_elave_2.json deleted file mode 100644 index 455629c..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_elave_2/property_tax_gov_elave_2.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2025-01-13 16:36:30.780093", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "vergiy\u0259c\u0259lbolunan\u0259mlaklar\u0131nkateqoriyas\u0131", - "hesabatilinin\u0259vv\u0259lin\u0259\u0259sasv\u0259saitl\u0259rinqal\u0131qd\u0259y\u0259ri", - "l\u0259\u011fvolunmatarixin\u0259\u0259sasv\u0259saitl\u0259rinqal\u0131qd\u0259y\u0259ri", - "hesabatilierzindeu\u00e7otaal\u0131nan", - "hesabatilinsonuna\u0259sasv\u0259saitl\u0259rinqal\u0131qd\u0259y\u0259ri", - "art\u0131qqiym\u0259t\u0259\u0259sasv\u0259saitl\u0259rind\u0259y\u0259ri505" - ], - "fields": [ - { - "fieldname": "l\u0259\u011fvolunmatarixin\u0259\u0259sasv\u0259saitl\u0259rinqal\u0131qd\u0259y\u0259ri", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Vergi \u00f6d\u0259yicisinin l\u0259\u011fv olunma v\u0259 ya u\u00e7otdan \u00e7\u0131xar\u0131lma tarixin\u0259 \u0259sas v\u0259saitl\u0259rin qal\u0131q d\u0259y\u0259ri (manatla) (502.1)", - "precision": "2" - }, - { - "fieldname": "vergiy\u0259c\u0259lbolunan\u0259mlaklar\u0131nkateqoriyas\u0131", - "fieldtype": "Select", - "in_list_view": 1, - "label": "Vergiy\u0259 c\u0259lb olunan \u0259mlaklar\u0131n kateqoriyas\u0131", - "options": "1. Binalar, tikilil\u0259r v\u0259 qur\u011fular\n1.1 \u00c7oxm\u0259rt\u0259b\u0259li (\u00e7oxm\u0259nzilli) ya\u015fay\u0131\u015f binalar\u0131\n1.2 Qeyri-ya\u015fay\u0131\u015f binalar\u0131 (sah\u0259l\u0259ri)\n1.3 \u018fmlak kompleksi kimi m\u00fc\u0259ssis\u0259l\u0259r\n1.4 Qur\u011fular\n1.5 M\u0259nzill\u0259r\n1.6 F\u0259rdi ya\u015fay\u0131\u015f v\u0259 ba\u011f evl\u0259ri\n2 Ma\u015f\u0131nlar v\u0259 avadanl\u0131qlar\n3 Y\u00fcks\u0259k texnologiyalar m\u0259hsulu olan hesablama texnikas\u0131\n4 N\u0259qliyyat vasit\u0259l\u0259ri\n5 Dig\u0259r \u0259sas v\u0259saitl\u0259r\nVergiy\u0259 c\u0259lb olunan \u0259mlak\u0131n C\u018fM\u0130 d\u0259y\u0259ri:", - "read_only": 1 - }, - { - "fieldname": "hesabatilinin\u0259vv\u0259lin\u0259\u0259sasv\u0259saitl\u0259rinqal\u0131qd\u0259y\u0259ri", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Hesabat ilinin \u0259vv\u0259lin\u0259 \u0259sas v\u0259saitl\u0259rin qal\u0131q d\u0259y\u0259ri (manatla) (501.1)", - "precision": "2" - }, - { - "fieldname": "hesabatilierzindeu\u00e7otaal\u0131nan", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Hesabat ili \u0259rzind\u0259 yarand\u0131\u011f\u0131 (u\u00e7ota al\u0131nd\u0131\u011f\u0131) v\u0259 ya \u0259mlak vergisi \u00f6d\u0259yicisi olma tarixin\u0259 \u0259sas v\u0259saitl\u0259rin qal\u0131q d\u0259y\u0259ri (manatla) (503.1)", - "precision": "2", - "read_only": 1 - }, - { - "fieldname": "hesabatilinsonuna\u0259sasv\u0259saitl\u0259rinqal\u0131qd\u0259y\u0259ri", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Hesabat ilinin sonuna \u0259sas v\u0259saitl\u0259rinin qal\u0131q d\u0259y\u0259ri (manatla) (504.1)", - "precision": "2" - }, - { - "fieldname": "art\u0131qqiym\u0259t\u0259\u0259sasv\u0259saitl\u0259rind\u0259y\u0259ri505", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Art\u0131q qiym\u0259t\u0259 s\u0131\u011fotalanan \u0259sas v\u0259saitl\u0259rin d\u0259y\u0259ri (manatla) (505.1)", - "precision": "2" - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2026-01-08 18:48:57.656460", - "modified_by": "Administrator", - "module": "Taxes Az", - "name": "Property Tax Gov Elave 2", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_elave_2/property_tax_gov_elave_2.py b/taxes_az/taxes_az/doctype/property_tax_gov_elave_2/property_tax_gov_elave_2.py deleted file mode 100644 index 2184c1a..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_elave_2/property_tax_gov_elave_2.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2025, Jey Soft and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class PropertyTaxGovElave2(Document): - pass diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel/__init__.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel.json b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel.json deleted file mode 100644 index bced511..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2025-01-13 14:28:57.994528", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "g\u00f6st\u0259ricil\u0259r", - "manatla" - ], - "fields": [ - { - "fieldname": "g\u00f6st\u0259ricil\u0259r", - "fieldtype": "Select", - "in_list_view": 1, - "label": "G\u00f6st\u0259ricil\u0259r", - "options": "501. \u018fmlak\u0131n \u00fcmumi qal\u0131q d\u0259y\u0259ri\n501.1 Vergiy\u0259 c\u0259lb olunan \u0259mlak\u0131n qal\u0131q d\u0259y\u0259ri\n501.1.1 Qeyri-kommersiya f\u0259aliyy\u0259tind\u0259 istifad\u0259 olunan \u0259mlak\u0131n qal\u0131q d\u0259y\u0259ri\n501.2 Vergid\u0259n azad olunan \u0259mlak\u0131n qal\u0131q d\u0259y\u0259ri", - "read_only": 1 - }, - { - "fieldname": "manatla", - "fieldtype": "Float", - "precision": "2", - "in_list_view": 1, - "label": "Manatla" - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2025-08-04 19:47:26.620548", - "modified_by": "Administrator", - "module": "Taxes Az", - "name": "Property Tax Gov Emlak vergi hesablamasi 1ci cedvel", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel.py deleted file mode 100644 index 606655e..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2025, Jey Soft and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class PropertyTaxGovEmlakvergihesablamasi1cicedvel(Document): - pass diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel_1/__init__.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel_1/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel_1/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel_1.json b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel_1/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel_1.json deleted file mode 100644 index 63f3089..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel_1/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel_1.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2025-08-04 12:02:18.835114", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "g\u00f6st\u0259ricil\u0259r", - "manatla" - ], - "fields": [ - { - "fieldname": "g\u00f6st\u0259ricil\u0259r", - "fieldtype": "Select", - "in_list_view": 1, - "label": "G\u00f6st\u0259ricil\u0259r", - "options": "503. \u018fmlak\u0131n \u00fcmumi d\u0259y\u0259ri\n503.1 Vergiy\u0259 c\u0259lb olunan \u0259mlak\u0131n d\u0259y\u0259ri\n503.1.1 Qeyri-kommersiya f\u0259aliyy\u0259tind\u0259 istifad\u0259 olunan \u0259mlak\u0131n d\u0259y\u0259ri\n503.2 Vergid\u0259n azad olunan \u0259mlak\u0131n d\u0259y\u0259ri", - "read_only": 1 - }, - { - "fieldname": "manatla", - "fieldtype": "Float", - "precision": "2", - "in_list_view": 1, - "label": "Manatla" - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2025-08-04 19:38:26.382915", - "modified_by": "Administrator", - "module": "Taxes Az", - "name": "Property Tax Gov Emlak vergi hesablamasi 1ci cedvel 1", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel_1/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel_1.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel_1/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel_1.py deleted file mode 100644 index 027df65..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel_1/property_tax_gov_emlak_vergi_hesablamasi_1ci_cedvel_1.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2025, Jey Soft and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class PropertyTaxGovEmlakvergihesablamasi1cicedvel1(Document): - pass diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_2ci_cedvel/__init__.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_2ci_cedvel/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_2ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_2ci_cedvel.json b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_2ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_2ci_cedvel.json deleted file mode 100644 index 0de3de2..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_2ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_2ci_cedvel.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2025-01-13 14:36:20.467665", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "g\u00f6st\u0259ricil\u0259r", - "manatla" - ], - "fields": [ - { - "fieldname": "g\u00f6st\u0259ricil\u0259r", - "fieldtype": "Select", - "in_list_view": 1, - "label": "G\u00f6st\u0259ricil\u0259r", - "options": "504. \u018fmlak\u0131n \u00fcmumi qal\u0131q d\u0259y\u0259ri\n504.1 Vergiy\u0259 c\u0259lb olunan \u0259mlak\u0131n qal\u0131q d\u0259y\u0259ri\n504.1.1 Qeyri-kommersiya f\u0259aliyy\u0259tind\u0259 istifad\u0259 olunan \u0259mlak\u0131n qal\u0131q d\u0259y\u0259ri\n504.2 Vergid\u0259n azad olunan \u0259mlak\u0131n qal\u0131q d\u0259y\u0259ri", - "read_only": 1 - }, - { - "fieldname": "manatla", - "fieldtype": "Float", - "precision": "2", - "in_list_view": 1, - "label": "Manatla" - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2025-08-04 12:00:07.915973", - "modified_by": "Administrator", - "module": "Taxes Az", - "name": "Property Tax Gov Emlak vergi hesablamasi 2ci cedvel", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_2ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_2ci_cedvel.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_2ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_2ci_cedvel.py deleted file mode 100644 index 4afd606..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_2ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_2ci_cedvel.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2025, Jey Soft and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class PropertyTaxGovEmlakvergihesablamasi2cicedvel(Document): - pass diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_3cu_cedvel/__init__.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_3cu_cedvel/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_3cu_cedvel/property_tax_gov_emlak_vergi_hesablamasi_3cu_cedvel.json b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_3cu_cedvel/property_tax_gov_emlak_vergi_hesablamasi_3cu_cedvel.json deleted file mode 100644 index 9bfe4a8..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_3cu_cedvel/property_tax_gov_emlak_vergi_hesablamasi_3cu_cedvel.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2025-01-13 14:35:10.099838", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "g\u00f6st\u0259ricil\u0259r", - "manatla" - ], - "fields": [ - { - "fieldname": "g\u00f6st\u0259ricil\u0259r", - "fieldtype": "Select", - "in_list_view": 1, - "label": "G\u00f6st\u0259ricil\u0259r", - "options": "505 Art\u0131q qiym\u0259t\u0259 s\u0131\u011fortalanan \u0259mlak\u0131n d\u0259y\u0259ri\n505.1 Vergiy\u0259 c\u0259lb olunan art\u0131q qiym\u0259t\u0259 s\u0131\u011fortalanan \u0259mlak\u0131n d\u0259y\u0259ri\n505.2 Vergid\u0259n azad olunan art\u0131q qiym\u0259t\u0259 s\u0131\u011fortalanan \u0259mlak\u0131n d\u0259y\u0259ri", - "read_only": 1 - }, - { - "fieldname": "manatla", - "fieldtype": "Float", - "precision": "2", - "in_list_view": 1, - "label": "Manatla" - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2025-08-04 12:00:44.910640", - "modified_by": "Administrator", - "module": "Taxes Az", - "name": "Property Tax Gov Emlak vergi hesablamasi 3cu cedvel", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_3cu_cedvel/property_tax_gov_emlak_vergi_hesablamasi_3cu_cedvel.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_3cu_cedvel/property_tax_gov_emlak_vergi_hesablamasi_3cu_cedvel.py deleted file mode 100644 index 99dc397..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_3cu_cedvel/property_tax_gov_emlak_vergi_hesablamasi_3cu_cedvel.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2025, Jey Soft and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class PropertyTaxGovEmlakvergihesablamasi3cucedvel(Document): - pass diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel/__init__.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel.json b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel.json deleted file mode 100644 index 862495b..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2025-01-13 14:36:07.154586", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "g\u00f6st\u0259ricil\u0259r", - "faizl\u0259" - ], - "fields": [ - { - "fieldname": "g\u00f6st\u0259ricil\u0259r", - "fieldtype": "Select", - "in_list_view": 1, - "label": "G\u00f6st\u0259ricil\u0259r", - "options": "506 Verginin d\u0259r\u0259c\u0259si", - "read_only": 1 - }, - { - "fieldname": "faizl\u0259", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Faizl\u0259 %", - "precision": "2", - "read_only": 1 - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2025-12-29 18:09:10.263087", - "modified_by": "Administrator", - "module": "Taxes Az", - "name": "Property Tax Gov Emlak vergi hesablamasi 4cu cedvel", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel.py deleted file mode 100644 index 4ce9f38..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2025, Jey Soft and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class PropertyTaxGovEmlakvergihesablamasi4cucedvel(Document): - pass diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel_1/__init__.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel_1/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel_1/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel_1.json b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel_1/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel_1.json deleted file mode 100644 index a9fbe13..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel_1/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel_1.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2025-08-04 19:40:22.377464", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "g\u00f6st\u0259ricil\u0259r", - "ayla" - ], - "fields": [ - { - "fieldname": "g\u00f6st\u0259ricil\u0259r", - "fieldtype": "Select", - "in_list_view": 1, - "label": "G\u00f6st\u0259ricil\u0259r", - "options": "507 M\u00fc\u0259ssis\u0259 yarand\u0131\u011f\u0131 aydan sonra ilin sonuna q\u0259d\u0259r olan aylar\u0131n say\u0131", - "read_only": 1 - }, - { - "fieldname": "ayla", - "fieldtype": "Float", - "precision": "2", - "in_list_view": 1, - "label": "Ayla" - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2025-08-04 19:41:48.738524", - "modified_by": "Administrator", - "module": "Taxes Az", - "name": "Property Tax Gov Emlak vergi hesablamasi 4cu cedvel 1", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel_1/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel_1.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel_1/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel_1.py deleted file mode 100644 index 01070db..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel_1/property_tax_gov_emlak_vergi_hesablamasi_4cu_cedvel_1.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2025, Jey Soft and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class PropertyTaxGovEmlakvergihesablamasi4cucedvel1(Document): - pass diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_5ci_cedvel/__init__.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_5ci_cedvel/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_5ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_5ci_cedvel.json b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_5ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_5ci_cedvel.json deleted file mode 100644 index f0adca0..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_5ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_5ci_cedvel.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2025-01-13 15:00:15.158446", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "g\u00f6st\u0259ricil\u0259r", - "manatla" - ], - "fields": [ - { - "fieldname": "g\u00f6st\u0259ricil\u0259r", - "fieldtype": "Select", - "in_list_view": 1, - "label": "G\u00f6st\u0259ricil\u0259r", - "options": "509.1 Vergi \u00f6d\u0259yicisi il \u0259rzind\u0259 tam f\u0259aliyy\u0259t g\u00f6st\u0259rdiyi halda:\n509.2 Hesabat ili \u0259rzind\u0259 yarad\u0131ld\u0131\u011f\u0131 (u\u00e7ota al\u0131nd\u0131\u011f\u0131) v\u0259 ya \u0259mlak vergisi \u00f6d\u0259yicisi oldu\u011fu halda:\n510 Vergi m\u0259c\u0259ll\u0259sinin 199.21-ci madd\u0259sin\u0259 \u0259sas\u0259n azald\u0131lmal\u0131 \u0259mlak vergisinin m\u0259bl\u0259\u011fi" - }, - { - "fieldname": "manatla", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Manatla", - "precision": "2" - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2026-01-07 14:25:22.271312", - "modified_by": "Administrator", - "module": "Taxes Az", - "name": "Property Tax Gov Emlak vergi hesablamasi 5ci cedvel", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_5ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_5ci_cedvel.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_5ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_5ci_cedvel.py deleted file mode 100644 index a06c213..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_5ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_5ci_cedvel.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2025, Jey Soft and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class PropertyTaxGovEmlakvergihesablamasi5cicedvel(Document): - pass diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_6ci_cedvel/__init__.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_6ci_cedvel/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_6ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_6ci_cedvel.json b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_6ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_6ci_cedvel.json deleted file mode 100644 index cb5d11d..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_6ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_6ci_cedvel.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2025-08-04 14:47:33.216880", - "default_view": "List", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "g\u00f6st\u0259ricil\u0259r", - "manatla" - ], - "fields": [ - { - "fieldname": "g\u00f6st\u0259ricil\u0259r", - "fieldtype": "Select", - "in_list_view": 1, - "label": "G\u00f6st\u0259ricil\u0259r", - "options": "511.1 M\u00fc\u0259ssis\u0259 il \u0259rzind\u0259 tam f\u0259aliyy\u0259t g\u00f6st\u0259rdiyi halda\n511.2 M\u00fc\u0259ssis\u0259 il \u0259rzind\u0259 yarand\u0131\u011f\u0131 halda", - "read_only": 1 - }, - { - "fieldname": "manatla", - "fieldtype": "Float", - "precision": "2", - "in_list_view": 1, - "label": "Manatla", - "read_only": 1 - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2025-08-04 21:25:48.999866", - "modified_by": "Administrator", - "module": "Taxes Az", - "name": "Property Tax Gov Emlak vergi hesablamasi 6ci cedvel", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_6ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_6ci_cedvel.py b/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_6ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_6ci_cedvel.py deleted file mode 100644 index a404b79..0000000 --- a/taxes_az/taxes_az/doctype/property_tax_gov_emlak_vergi_hesablamasi_6ci_cedvel/property_tax_gov_emlak_vergi_hesablamasi_6ci_cedvel.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2025, Jey Soft and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class PropertyTaxGovEmlakvergihesablamasi6cicedvel(Document): - pass