fiscal year auto-fetch added to c-form, installation_note, stock_reconciliation, customer_issue, maintanence_visit & removed for Expense Claim

This commit is contained in:
Neil Trini Lasrado
2014-10-08 12:55:06 +05:30
parent 565d986198
commit 9614b552fd
7 changed files with 56 additions and 19 deletions

View File

@@ -2,6 +2,7 @@
// License: GNU General Public License v3. See license.txt
frappe.provide("erpnext.support");
frappe.require("assets/erpnext/js/utils.js");
frappe.ui.form.on_change("Customer Issue", "customer", function(frm) {
erpnext.utils.get_party_details(frm) });
@@ -89,3 +90,11 @@ cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
return{ query: "erpnext.controllers.queries.customer_query" } }
cur_frm.cscript.company = function(doc, cdt, cdn) {
erpnext.get_fiscal_year(doc.company, doc.complaint_date);
}
cur_frm.cscript.complaint_date = function(doc, cdt, cdn){
erpnext.get_fiscal_year(doc.company, doc.complaint_date);
}

View File

@@ -2,6 +2,7 @@
// License: GNU General Public License v3. See license.txt
frappe.provide("erpnext.support");
frappe.require("assets/erpnext/js/utils.js");
frappe.ui.form.on_change("Maintenance Visit", "customer", function(frm) {
erpnext.utils.get_party_details(frm) });
@@ -92,3 +93,11 @@ cur_frm.cscript.item_code = function(doc, cdt, cdn) {
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
return {query: "erpnext.controllers.queries.customer_query" }
}
cur_frm.cscript.company = function(doc, cdt, cdn) {
erpnext.get_fiscal_year(doc.company, doc.mntc_date);
}
cur_frm.cscript.mntc_date = function(doc, cdt, cdn){
erpnext.get_fiscal_year(doc.company, doc.mntc_date);
}