mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-17 10:36:31 +00:00
[minor] save last company in multi-company scenario
This commit is contained in:
@@ -190,8 +190,11 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
if (this.frm.doc.posting_date) var date = this.frm.doc.posting_date;
|
||||
else var date = this.frm.doc.transaction_date;
|
||||
erpnext.get_fiscal_year(this.frm.doc.company, date, fn);
|
||||
|
||||
erpnext.get_letter_head(this.frm.doc.company);
|
||||
|
||||
if(this.frm.doc.company) {
|
||||
erpnext.last_selected_company = this.frm.doc.company;
|
||||
}
|
||||
},
|
||||
|
||||
transaction_date: function() {
|
||||
|
||||
@@ -41,6 +41,8 @@ $.extend(erpnext, {
|
||||
if(companies.length === 1) {
|
||||
if(!cur_frm.doc.company) cur_frm.set_value("company", companies[0]);
|
||||
cur_frm.toggle_display("company", false);
|
||||
} else if(erpnext.last_selected_company) {
|
||||
if(!cur_frm.doc.company) cur_frm.set_value("company", erpnext.last_selected_company);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -76,8 +78,8 @@ $.extend(erpnext, {
|
||||
"options": "Serial No",
|
||||
"label": __("Serial No"),
|
||||
"get_query": function () {
|
||||
return {
|
||||
filters: {
|
||||
return {
|
||||
filters: {
|
||||
item_code:grid_row.doc.item_code ,
|
||||
warehouse:grid_row.doc.warehouse
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user