changed Bütün Element Qrupları to All Item Groups
This commit is contained in:
parent
2400aff025
commit
590c1ff45d
|
|
@ -3,6 +3,141 @@ from frappe.custom.doctype.custom_field.custom_field import create_custom_field
|
||||||
|
|
||||||
def create_custom_fields():
|
def create_custom_fields():
|
||||||
custom_fields = {
|
custom_fields = {
|
||||||
|
"Asset": [
|
||||||
|
# Main Asset Type field
|
||||||
|
dict(
|
||||||
|
fieldname='custom_asset_type',
|
||||||
|
label='Asset Type',
|
||||||
|
fieldtype='Select',
|
||||||
|
options='\nKənd təsərrüfatı təyinatlı torpaq sahələri\nSənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xidməti və digər xüsusi təyinatlı torpaq sahələri',
|
||||||
|
insert_after='asset_name',
|
||||||
|
reqd=0,
|
||||||
|
in_list_view=1,
|
||||||
|
columns=6
|
||||||
|
),
|
||||||
|
|
||||||
|
# === AGRICULTURAL LAND SECTION ===
|
||||||
|
dict(
|
||||||
|
fieldname='agricultural_land_section',
|
||||||
|
label='Agricultural Land Information',
|
||||||
|
fieldtype='Section Break',
|
||||||
|
insert_after='custom_asset_type',
|
||||||
|
collapsible=1,
|
||||||
|
depends_on='eval:doc.custom_asset_type == "Kənd təsərrüfatı təyinatlı torpaq sahələri"'
|
||||||
|
),
|
||||||
|
|
||||||
|
dict(
|
||||||
|
fieldname='agricultural_purpose',
|
||||||
|
label='Purpose',
|
||||||
|
fieldtype='Select',
|
||||||
|
options='\nTəyinatı üzrə istifadə edilməyən kənd təsərrüfatı torpaqları üzrə hesablanmış vergi məbləği\nTəyinatı üzrə istifadə edilən və ya irriqasiya, meliorasiya və digər aqrotexniki səbəblərdən təyinatı üzrə istifadə edilməsi mümkün olmayan kənd təsərrüfatı torpaqları üzrə verginin məbləği',
|
||||||
|
insert_after='agricultural_land_section',
|
||||||
|
depends_on='eval:doc.custom_asset_type == "Kənd təsərrüfatı təyinatlı torpaq sahələri"',
|
||||||
|
reqd=0
|
||||||
|
),
|
||||||
|
|
||||||
|
dict(
|
||||||
|
fieldname='cadastral_district_name',
|
||||||
|
label='Name of the Cadastral Valuation District',
|
||||||
|
fieldtype='Link',
|
||||||
|
options='Cadastral Valuation District',
|
||||||
|
insert_after='agricultural_purpose',
|
||||||
|
depends_on='eval:doc.custom_asset_type == "Kənd təsərrüfatı təyinatlı torpaq sahələri"',
|
||||||
|
reqd=0
|
||||||
|
),
|
||||||
|
|
||||||
|
dict(
|
||||||
|
fieldname='cadastral_district_code',
|
||||||
|
label='Code of the Cadastral Valuation District',
|
||||||
|
fieldtype='Data',
|
||||||
|
insert_after='cadastral_district_name',
|
||||||
|
depends_on='eval:doc.custom_asset_type == "Kənd təsərrüfatı təyinatlı torpaq sahələri"',
|
||||||
|
read_only=1
|
||||||
|
),
|
||||||
|
|
||||||
|
dict(
|
||||||
|
fieldname='quality_groups',
|
||||||
|
label='Quality Groups',
|
||||||
|
fieldtype='Select',
|
||||||
|
options='\nI\nII\nIII\nIV\nV',
|
||||||
|
insert_after='cadastral_district_code',
|
||||||
|
depends_on='eval:doc.custom_asset_type == "Kənd təsərrüfatı təyinatlı torpaq sahələri"',
|
||||||
|
reqd=0
|
||||||
|
),
|
||||||
|
|
||||||
|
dict(
|
||||||
|
fieldname='agricultural_land_purpose',
|
||||||
|
label='Purpose of the Land Plot',
|
||||||
|
fieldtype='Select',
|
||||||
|
options='\nƏkin, dinc və çoxillik əkmələr\nBiçənək, örüş və otlaqlar',
|
||||||
|
insert_after='quality_groups',
|
||||||
|
depends_on='eval:doc.custom_asset_type == "Kənd təsərrüfatı təyinatlı torpaq sahələri"',
|
||||||
|
reqd=0
|
||||||
|
),
|
||||||
|
|
||||||
|
# === INDUSTRIAL/COMMERCIAL LAND SECTION ===
|
||||||
|
dict(
|
||||||
|
fieldname='industrial_land_section',
|
||||||
|
label='Industrial/Commercial Land Information',
|
||||||
|
fieldtype='Section Break',
|
||||||
|
insert_after='agricultural_land_purpose',
|
||||||
|
collapsible=1,
|
||||||
|
depends_on='eval:doc.custom_asset_type == "Sənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xidməti və digər xüsusi təyinatlı torpaq sahələri"'
|
||||||
|
),
|
||||||
|
|
||||||
|
dict(
|
||||||
|
fieldname='territorial_unit_name',
|
||||||
|
label='Name of the Territorial Unit',
|
||||||
|
fieldtype='Select',
|
||||||
|
options='\nBakı\nGəncə, Sumqayıt, Xırdalan, Abşeron\nDigər şəhərlər (rayon tabeliyində olan şəhərlər istisna olmaqla), Rayon mərkəzləri\nRayon tabeçiliyində olan şəhərlərdə, qəsəbələrdə və kəndlərdə (Bakı və Sumqayıt şəhərlərinin qəsəbə və kəndləri istisna olmaqla)',
|
||||||
|
insert_after='industrial_land_section',
|
||||||
|
depends_on='eval:doc.custom_asset_type == "Sənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xidməti və digər xüsusi təyinatlı torpaq sahələri"',
|
||||||
|
reqd=0
|
||||||
|
),
|
||||||
|
|
||||||
|
dict(
|
||||||
|
fieldname='territorial_unit_code',
|
||||||
|
label='Code of the Territorial Unit',
|
||||||
|
fieldtype='Data',
|
||||||
|
insert_after='territorial_unit_name',
|
||||||
|
depends_on='eval:doc.custom_asset_type == "Sənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xidməti və digər xüsusi təyinatlı torpaq sahələri"'
|
||||||
|
),
|
||||||
|
|
||||||
|
dict(
|
||||||
|
fieldname='industrial_land_purpose',
|
||||||
|
label='Purpose of the Land Plot',
|
||||||
|
fieldtype='Select',
|
||||||
|
options='\nSənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xid-ti və dig. xüs. təy-tlı sahələr\nYaşayış fondları, həyətyanı və bağsahələri üzrə sahələr',
|
||||||
|
insert_after='territorial_unit_code',
|
||||||
|
depends_on='eval:doc.custom_asset_type == "Sənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xidməti və digər xüsusi təyinatlı torpaq sahələri"',
|
||||||
|
reqd=0
|
||||||
|
),
|
||||||
|
|
||||||
|
dict(
|
||||||
|
fieldname='mining_note',
|
||||||
|
label='Note on Mining',
|
||||||
|
fieldtype='Check',
|
||||||
|
insert_after='industrial_land_purpose',
|
||||||
|
depends_on='eval:doc.custom_asset_type == "Sənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xidməti və digər xüsusi təyinatlı torpaq sahələri"'
|
||||||
|
),
|
||||||
|
|
||||||
|
# === COMMON SECTION (ALWAYS VISIBLE) ===
|
||||||
|
dict(
|
||||||
|
fieldname='common_land_section',
|
||||||
|
label='Common Information',
|
||||||
|
fieldtype='Section Break',
|
||||||
|
insert_after='mining_note',
|
||||||
|
collapsible=1
|
||||||
|
),
|
||||||
|
|
||||||
|
dict(
|
||||||
|
fieldname='tax_exempt_area',
|
||||||
|
label='Tax-exempt Area',
|
||||||
|
fieldtype='Data',
|
||||||
|
insert_after='common_land_section',
|
||||||
|
description='Enter the tax-exempt area value'
|
||||||
|
)
|
||||||
|
],
|
||||||
"Payment Entry": [
|
"Payment Entry": [
|
||||||
dict(
|
dict(
|
||||||
fieldname='custom_note',
|
fieldname='custom_note',
|
||||||
|
|
@ -292,104 +427,6 @@ def create_custom_fields():
|
||||||
columns=2
|
columns=2
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
"Asset": [
|
|
||||||
# Asset Type field
|
|
||||||
dict(
|
|
||||||
fieldname='asset_type',
|
|
||||||
label='Asset Type',
|
|
||||||
fieldtype='Select',
|
|
||||||
options='Kənd təsərrüfatı təyinatlı torpaq sahələri\nSənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xidməti və digər xüsusi təyinatlı torpaq sahələri',
|
|
||||||
insert_after='asset_name'
|
|
||||||
),
|
|
||||||
# Land Information Section (only for agricultural land)
|
|
||||||
dict(
|
|
||||||
fieldname='land_information_section',
|
|
||||||
label='Land Information',
|
|
||||||
fieldtype='Section Break',
|
|
||||||
insert_after='asset_type',
|
|
||||||
depends_on='eval:doc.asset_type == "Kənd təsərrüfatı təyinatlı torpaq sahələri"',
|
|
||||||
collapsible=1
|
|
||||||
),
|
|
||||||
# Purpose field
|
|
||||||
dict(
|
|
||||||
fieldname='purpose',
|
|
||||||
label='Purpose',
|
|
||||||
fieldtype='Select',
|
|
||||||
options='Təyinatı üzrə istifadə edilməyən kənd təsərrüfatı torpaqları üzrə hesablanmış vergi məbləği\n Təyinatı üzrə istifadə edilən və ya irriqasiya, meliorasiya və digər aqrotexniki səbəblərdən təyinatı üzrə istifadə edilməsi mümkün olmayan kənd təsərrüfatı torpaqları üzrə verginin məbləği',
|
|
||||||
insert_after='land_information_section',
|
|
||||||
depends_on='eval:doc.asset_type == "Kənd təsərrüfatı təyinatlı torpaq sahələri"'
|
|
||||||
),
|
|
||||||
# Cadastral valuation district
|
|
||||||
dict(
|
|
||||||
fieldname='cadastral_valuation_district',
|
|
||||||
label='Name of the cadastral valuation district where the land plot is located',
|
|
||||||
fieldtype='Link',
|
|
||||||
options='Cadastral Valuation District',
|
|
||||||
insert_after='purpose',
|
|
||||||
depends_on='eval:doc.asset_type == "Kənd təsərrüfatı təyinatlı torpaq sahələri"'
|
|
||||||
),
|
|
||||||
# Quality groups
|
|
||||||
dict(
|
|
||||||
fieldname='quality_groups',
|
|
||||||
label='Quality groups',
|
|
||||||
fieldtype='Select',
|
|
||||||
options='I\nII\nIII\nIV\nV',
|
|
||||||
insert_after='cadastral_valuation_district',
|
|
||||||
depends_on='eval:doc.asset_type == "Kənd təsərrüfatı təyinatlı torpaq sahələri"'
|
|
||||||
),
|
|
||||||
# Purpose of the land plot
|
|
||||||
dict(
|
|
||||||
fieldname='purpose_of_land_plot',
|
|
||||||
label='Purpose of the land plot',
|
|
||||||
fieldtype='Select',
|
|
||||||
options='Əkin, dinc və çoxillik əkmələr\nBiçənək, örüş və otlaqlar',
|
|
||||||
insert_after='quality_groups',
|
|
||||||
depends_on='eval:doc.asset_type == "Kənd təsərrüfatı təyinatlı torpaq sahələri"'
|
|
||||||
),
|
|
||||||
# Industrial Land Information Section (only for industrial land)
|
|
||||||
dict(
|
|
||||||
fieldname='industrial_land_information_section',
|
|
||||||
label='Industrial Land Information',
|
|
||||||
fieldtype='Section Break',
|
|
||||||
insert_after='purpose_of_land_plot',
|
|
||||||
depends_on='eval:doc.asset_type == "Sənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xidməti və digər xüsusi təyinatlı torpaq sahələri"',
|
|
||||||
collapsible=1
|
|
||||||
),
|
|
||||||
# Name of the territorial unit for industrial land
|
|
||||||
dict(
|
|
||||||
fieldname='territorial_unit_industrial',
|
|
||||||
label='Name of the territorial unit where the land plot is located',
|
|
||||||
fieldtype='Select',
|
|
||||||
options='Bakı\nGəncə, Sumqayıt, Xırdalan, Abşeron\nDigər şəhərlər (rayon tabeliyində olan şəhərlər istisna olmaqla), Rayon mərkəzləri\nRayon tabeçiliyində olan şəhərlərdə, qəsəbələrdə və kəndlərdə (Bakı və Sumqayıt şəhərlərinin qəsəbə və kəndləri istisna olmaqla)',
|
|
||||||
insert_after='industrial_land_information_section',
|
|
||||||
depends_on='eval:doc.asset_type == "Sənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xidməti və digər xüsusi təyinatlı torpaq sahələri"'
|
|
||||||
),
|
|
||||||
# Purpose of the land plot for industrial land
|
|
||||||
dict(
|
|
||||||
fieldname='purpose_of_land_plot_industrial',
|
|
||||||
label='Purpose of the land plot',
|
|
||||||
fieldtype='Select',
|
|
||||||
options='Sənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xid-ti və dig. xüs. təy-tlı sahələr\nYaşayış fondları, həyətyanı və bağsahələri üzrə sahələr',
|
|
||||||
insert_after='territorial_unit_industrial',
|
|
||||||
depends_on='eval:doc.asset_type == "Sənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xidməti və digər xüsusi təyinatlı torpaq sahələri"'
|
|
||||||
),
|
|
||||||
# Note on mining
|
|
||||||
dict(
|
|
||||||
fieldname='note_on_mining',
|
|
||||||
label='Note on mining',
|
|
||||||
fieldtype='Check',
|
|
||||||
insert_after='purpose_of_land_plot_industrial',
|
|
||||||
depends_on='eval:doc.asset_type == "Sənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xidməti və digər xüsusi təyinatlı torpaq sahələri"'
|
|
||||||
),
|
|
||||||
# Tax-exempt area (shared field for both asset types)
|
|
||||||
dict(
|
|
||||||
fieldname='tax_exempt_area',
|
|
||||||
label='Tax-exempt area',
|
|
||||||
fieldtype='Data',
|
|
||||||
insert_after='note_on_mining',
|
|
||||||
depends_on='eval:doc.asset_type && (doc.asset_type == "Kənd təsərrüfatı təyinatlı torpaq sahələri" || doc.asset_type == "Sənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xidməti və digər xüsusi təyinatlı torpaq sahələri")'
|
|
||||||
)
|
|
||||||
],
|
|
||||||
"Item": [
|
"Item": [
|
||||||
# Product Group Code field in Details tab
|
# Product Group Code field in Details tab
|
||||||
dict(
|
dict(
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@ app_include_js = [
|
||||||
"/assets/jey_erp/js/account_tree_custom.js",
|
"/assets/jey_erp/js/account_tree_custom.js",
|
||||||
"/assets/jey_erp/js/sales_invoice.js",
|
"/assets/jey_erp/js/sales_invoice.js",
|
||||||
"/assets/jey_erp/js/sales_invoice_vat.js",
|
"/assets/jey_erp/js/sales_invoice_vat.js",
|
||||||
"/assets/jey_erp/js/sales_order_vat.js"
|
"/assets/jey_erp/js/sales_order_vat.js",
|
||||||
|
"/assets/jey_erp/js/asset.js",
|
||||||
]
|
]
|
||||||
|
|
||||||
doctype_js = {
|
doctype_js = {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,205 @@
|
||||||
|
frappe.ui.form.on('Asset', {
|
||||||
|
refresh: function(frm) {
|
||||||
|
setup_asset_fields(frm);
|
||||||
|
},
|
||||||
|
|
||||||
|
custom_asset_type: function(frm) {
|
||||||
|
setup_asset_fields(frm);
|
||||||
|
clear_dependent_fields(frm);
|
||||||
|
},
|
||||||
|
|
||||||
|
cadastral_district_name: function(frm) {
|
||||||
|
if (frm.doc.cadastral_district_name) {
|
||||||
|
frappe.db.get_value('Cadastral Valuation District',
|
||||||
|
frm.doc.cadastral_district_name, 'district_code')
|
||||||
|
.then(r => {
|
||||||
|
if (r.message && r.message.district_code) {
|
||||||
|
frm.set_value('cadastral_district_code', r.message.district_code);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
frm.set_value('cadastral_district_code', '');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
validate: function(frm) {
|
||||||
|
if (!frm.doc.custom_asset_type) {
|
||||||
|
frappe.msgprint(__('Please select an Asset Type'));
|
||||||
|
frappe.validated = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate agricultural land fields
|
||||||
|
if (frm.doc.custom_asset_type === "Kənd təsərrüfatı təyinatlı torpaq sahələri") {
|
||||||
|
const required_fields = [
|
||||||
|
['agricultural_purpose', 'Purpose'],
|
||||||
|
['cadastral_district_name', 'Name of the Cadastral Valuation District'],
|
||||||
|
['quality_groups', 'Quality Groups'],
|
||||||
|
['agricultural_land_purpose', 'Purpose of the Land Plot']
|
||||||
|
];
|
||||||
|
|
||||||
|
for (let [field, label] of required_fields) {
|
||||||
|
if (!frm.doc[field]) {
|
||||||
|
frappe.msgprint(__(`${label} is required for Agricultural Land`));
|
||||||
|
frappe.validated = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate industrial land fields
|
||||||
|
if (frm.doc.custom_asset_type === "Sənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xidməti və digər xüsusi təyinatlı torpaq sahələri") {
|
||||||
|
const required_fields = [
|
||||||
|
['territorial_unit_name', 'Name of the Territorial Unit'],
|
||||||
|
['industrial_land_purpose', 'Purpose of the Land Plot']
|
||||||
|
];
|
||||||
|
|
||||||
|
for (let [field, label] of required_fields) {
|
||||||
|
if (!frm.doc[field]) {
|
||||||
|
frappe.msgprint(__(`${label} is required for Industrial/Commercial Land`));
|
||||||
|
frappe.validated = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function setup_asset_fields(frm) {
|
||||||
|
const asset_type = frm.doc.custom_asset_type;
|
||||||
|
|
||||||
|
// Hide all conditional sections initially
|
||||||
|
hide_all_conditional_fields(frm);
|
||||||
|
|
||||||
|
if (!asset_type) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (asset_type === "Kənd təsərrüfatı təyinatlı torpaq sahələri") {
|
||||||
|
setup_agricultural_fields(frm);
|
||||||
|
} else if (asset_type === "Sənaye, tikinti, nəqliyyat, rabitə, ticarət-məişət xidməti və digər xüsusi təyinatlı torpaq sahələri") {
|
||||||
|
setup_industrial_fields(frm);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show common section for both types
|
||||||
|
show_common_fields(frm);
|
||||||
|
|
||||||
|
frm.refresh_fields();
|
||||||
|
}
|
||||||
|
|
||||||
|
function hide_all_conditional_fields(frm) {
|
||||||
|
const agricultural_fields = [
|
||||||
|
'agricultural_land_section',
|
||||||
|
'agricultural_purpose',
|
||||||
|
'cadastral_district_name',
|
||||||
|
'cadastral_district_code',
|
||||||
|
'quality_groups',
|
||||||
|
'agricultural_land_purpose'
|
||||||
|
];
|
||||||
|
|
||||||
|
const industrial_fields = [
|
||||||
|
'industrial_land_section',
|
||||||
|
'territorial_unit_name',
|
||||||
|
'territorial_unit_code',
|
||||||
|
'industrial_land_purpose',
|
||||||
|
'mining_note'
|
||||||
|
];
|
||||||
|
|
||||||
|
const common_fields = [
|
||||||
|
'common_land_section',
|
||||||
|
'tax_exempt_area'
|
||||||
|
];
|
||||||
|
|
||||||
|
[...agricultural_fields, ...industrial_fields, ...common_fields].forEach(fieldname => {
|
||||||
|
frm.set_df_property(fieldname, 'hidden', 1);
|
||||||
|
frm.set_df_property(fieldname, 'reqd', 0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function setup_agricultural_fields(frm) {
|
||||||
|
const agricultural_fields = [
|
||||||
|
'agricultural_land_section',
|
||||||
|
'agricultural_purpose',
|
||||||
|
'cadastral_district_name',
|
||||||
|
'cadastral_district_code',
|
||||||
|
'quality_groups',
|
||||||
|
'agricultural_land_purpose'
|
||||||
|
];
|
||||||
|
|
||||||
|
agricultural_fields.forEach(fieldname => {
|
||||||
|
frm.set_df_property(fieldname, 'hidden', 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
const required_agricultural_fields = [
|
||||||
|
'agricultural_purpose',
|
||||||
|
'cadastral_district_name',
|
||||||
|
'quality_groups',
|
||||||
|
'agricultural_land_purpose'
|
||||||
|
];
|
||||||
|
|
||||||
|
required_agricultural_fields.forEach(fieldname => {
|
||||||
|
frm.set_df_property(fieldname, 'reqd', 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Set descriptions
|
||||||
|
frm.set_df_property('agricultural_purpose', 'description',
|
||||||
|
'Select the purpose for agricultural land taxation');
|
||||||
|
frm.set_df_property('cadastral_district_name', 'description',
|
||||||
|
'Select the cadastral valuation district');
|
||||||
|
frm.set_df_property('cadastral_district_code', 'description',
|
||||||
|
'Auto-populated from selected district');
|
||||||
|
}
|
||||||
|
|
||||||
|
function setup_industrial_fields(frm) {
|
||||||
|
const industrial_fields = [
|
||||||
|
'industrial_land_section',
|
||||||
|
'territorial_unit_name',
|
||||||
|
'territorial_unit_code',
|
||||||
|
'industrial_land_purpose',
|
||||||
|
'mining_note'
|
||||||
|
];
|
||||||
|
|
||||||
|
industrial_fields.forEach(fieldname => {
|
||||||
|
frm.set_df_property(fieldname, 'hidden', 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
const required_industrial_fields = [
|
||||||
|
'territorial_unit_name',
|
||||||
|
'industrial_land_purpose'
|
||||||
|
];
|
||||||
|
|
||||||
|
required_industrial_fields.forEach(fieldname => {
|
||||||
|
frm.set_df_property(fieldname, 'reqd', 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Set descriptions
|
||||||
|
frm.set_df_property('territorial_unit_name', 'description',
|
||||||
|
'Select the appropriate territorial unit');
|
||||||
|
frm.set_df_property('industrial_land_purpose', 'description',
|
||||||
|
'Specify the purpose of the industrial/commercial land plot');
|
||||||
|
frm.set_df_property('mining_note', 'description',
|
||||||
|
'Check if this relates to mining operations');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function clear_dependent_fields(frm) {
|
||||||
|
const all_conditional_fields = [
|
||||||
|
'agricultural_purpose',
|
||||||
|
'cadastral_district_name',
|
||||||
|
'cadastral_district_code',
|
||||||
|
'quality_groups',
|
||||||
|
'agricultural_land_purpose',
|
||||||
|
'territorial_unit_name',
|
||||||
|
'territorial_unit_code',
|
||||||
|
'industrial_land_purpose',
|
||||||
|
'mining_note',
|
||||||
|
'tax_exempt_area'
|
||||||
|
];
|
||||||
|
|
||||||
|
all_conditional_fields.forEach(fieldname => {
|
||||||
|
frm.set_value(fieldname, '');
|
||||||
|
});
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue