added more umumi fields to land tax declaration
This commit is contained in:
parent
792227fcd6
commit
43e8dc69b8
|
|
@ -32,25 +32,43 @@ function recalculate_totals(frm) {
|
||||||
if (!frm.doc.əlavə_1 || !Array.isArray(frm.doc.əlavə_1)) {
|
if (!frm.doc.əlavə_1 || !Array.isArray(frm.doc.əlavə_1)) {
|
||||||
frm.set_value('601umumi', 0);
|
frm.set_value('601umumi', 0);
|
||||||
frm.set_value('602umumi', 0);
|
frm.set_value('602umumi', 0);
|
||||||
|
frm.set_value('601umumi_sahə', 0);
|
||||||
|
frm.set_value('602umumi_sahə', 0);
|
||||||
|
frm.set_value('601cəlb', 0);
|
||||||
|
frm.set_value('602cəlb', 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let total_601 = 0;
|
let total_601 = 0;
|
||||||
let total_602 = 0;
|
let total_602 = 0;
|
||||||
|
let total_601_area = 0;
|
||||||
|
let total_602_area = 0;
|
||||||
|
let total_601_exempt = 0;
|
||||||
|
let total_602_exempt = 0;
|
||||||
|
|
||||||
frm.doc.əlavə_1.forEach(function(row) {
|
frm.doc.əlavə_1.forEach(function(row) {
|
||||||
let code = row.bəyannaməsətrininkoduvəadı || '';
|
let code = row.bəyannaməsətrininkoduvəadı || '';
|
||||||
let tax = parseFloat(row.vergiməbləğimanatla) || 0;
|
let tax = parseFloat(row.vergiməbləğimanatla) || 0;
|
||||||
|
let total_area = parseFloat(row.torpaqsahəsi6001kodlarüzrəkvmetrlə6002kodlarüzrəhektarlaümumi) || 0;
|
||||||
|
let exempt_area = parseFloat(row.torpaqsahəsi6001kodlarüzrəkvmetrlə6002kodlarüzrəhektarla) || 0;
|
||||||
|
|
||||||
if (code.startsWith('600.1')) {
|
if (code.startsWith('600.1')) {
|
||||||
total_601 += tax;
|
total_601 += tax;
|
||||||
|
total_601_area += total_area;
|
||||||
|
total_601_exempt += exempt_area;
|
||||||
} else if (code.startsWith('600.2')) {
|
} else if (code.startsWith('600.2')) {
|
||||||
total_602 += tax;
|
total_602 += tax;
|
||||||
|
total_602_area += total_area;
|
||||||
|
total_602_exempt += exempt_area;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
frm.set_value('601umumi', total_601);
|
frm.set_value('601umumi', total_601);
|
||||||
frm.set_value('602umumi', total_602);
|
frm.set_value('602umumi', total_602);
|
||||||
|
frm.set_value('601umumi_sahə', total_601_area);
|
||||||
|
frm.set_value('602umumi_sahə', total_602_area);
|
||||||
|
frm.set_value('601cəlb', total_601_exempt);
|
||||||
|
frm.set_value('602cəlb', total_602_exempt);
|
||||||
}
|
}
|
||||||
|
|
||||||
function reload_assets_for_year(frm, year) {
|
function reload_assets_for_year(frm, year) {
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,10 @@
|
||||||
"vergim\u0259bl\u0259\u011fimanatla3",
|
"vergim\u0259bl\u0259\u011fimanatla3",
|
||||||
"601umumi",
|
"601umumi",
|
||||||
"602umumi",
|
"602umumi",
|
||||||
|
"601umumi_sah\u0259",
|
||||||
|
"602umumi_sah\u0259",
|
||||||
|
"601c\u0259lb",
|
||||||
|
"602c\u0259lb",
|
||||||
"\u0259lav\u0259_2_tab",
|
"\u0259lav\u0259_2_tab",
|
||||||
"html_ybie",
|
"html_ybie",
|
||||||
"section_break_hnrj",
|
"section_break_hnrj",
|
||||||
|
|
@ -378,6 +382,30 @@
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "601umumi_sah\u0259",
|
||||||
|
"fieldtype": "Float",
|
||||||
|
"hidden": 1,
|
||||||
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "602umumi_sah\u0259",
|
||||||
|
"fieldtype": "Float",
|
||||||
|
"hidden": 1,
|
||||||
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "601c\u0259lb",
|
||||||
|
"fieldtype": "Float",
|
||||||
|
"hidden": 1,
|
||||||
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "602c\u0259lb",
|
||||||
|
"fieldtype": "Float",
|
||||||
|
"hidden": 1,
|
||||||
|
"read_only": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "verginin_hesablanmas\u0131",
|
"fieldname": "verginin_hesablanmas\u0131",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
|
|
@ -406,6 +434,7 @@
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"row_format": "Dynamic",
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"states": []
|
"states": []
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue