company wise letter head feature added
This commit is contained in:
parent
b0b7e7fdf8
commit
31a92bd9d9
@ -413,3 +413,8 @@ def get_outstanding_invoices(amount_query, account, party_type, party):
|
|||||||
})
|
})
|
||||||
|
|
||||||
return all_outstanding_vouchers
|
return all_outstanding_vouchers
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def get_letter_head(company):
|
||||||
|
return frappe.db.get_value("Company",company,"default_letter_head")
|
||||||
|
|
||||||
|
@ -230,6 +230,8 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
|||||||
if (this.frm.doc.posting_date) var date = this.frm.doc.posting_date;
|
if (this.frm.doc.posting_date) var date = this.frm.doc.posting_date;
|
||||||
else var date = this.frm.doc.transaction_date;
|
else var date = this.frm.doc.transaction_date;
|
||||||
erpnext.get_fiscal_year(this.frm.doc.company, date, fn);
|
erpnext.get_fiscal_year(this.frm.doc.company, date, fn);
|
||||||
|
|
||||||
|
erpnext.get_letter_head(this.frm.doc.company);
|
||||||
},
|
},
|
||||||
|
|
||||||
transaction_date: function() {
|
transaction_date: function() {
|
||||||
|
@ -99,6 +99,20 @@ $.extend(erpnext, {
|
|||||||
d.show();
|
d.show();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get_letter_head: function(company) {
|
||||||
|
frappe.call({
|
||||||
|
type:"GET",
|
||||||
|
method: "erpnext.accounts.utils.get_letter_head",
|
||||||
|
args: {
|
||||||
|
"company": company
|
||||||
|
},
|
||||||
|
callback: function(r) {
|
||||||
|
if (!r.exe) cur_frm.set_value("letter_head", r.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -186,6 +186,14 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "default_letter_head",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Default Letter Head",
|
||||||
|
"options": "Letter Head",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"depends_on": "eval:!doc.__islocal",
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "cost_center",
|
"fieldname": "cost_center",
|
||||||
@ -364,7 +372,7 @@
|
|||||||
],
|
],
|
||||||
"icon": "icon-building",
|
"icon": "icon-building",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"modified": "2014-11-27 18:15:48.909416",
|
"modified": "2014-12-15 11:14:12.090020",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Setup",
|
"module": "Setup",
|
||||||
"name": "Company",
|
"name": "Company",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user