Merge pull request #3476 from nabinhait/develop
Expense Approver Query and discount label
This commit is contained in:
commit
58996985ed
@ -452,7 +452,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "base_discount_amount",
|
"fieldname": "base_discount_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Discount Amount (Company Currency)",
|
"label": "Additional Discount Amount (Company Currency)",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@ -930,7 +930,7 @@
|
|||||||
"icon": "icon-file-text",
|
"icon": "icon-file-text",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2015-05-27 02:54:48.668118",
|
"modified": "2015-06-15 15:38:19.220184",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Purchase Invoice",
|
"name": "Purchase Invoice",
|
||||||
|
|||||||
@ -502,7 +502,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "base_discount_amount",
|
"fieldname": "base_discount_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Discount Amount (Company Currency)",
|
"label": "Additional Discount Amount (Company Currency)",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@ -1243,7 +1243,7 @@
|
|||||||
"icon": "icon-file-text",
|
"icon": "icon-file-text",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2015-05-27 02:48:02.897865",
|
"modified": "2015-06-15 15:38:08.543029",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Invoice",
|
"name": "Sales Invoice",
|
||||||
|
|||||||
@ -457,7 +457,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "base_discount_amount",
|
"fieldname": "base_discount_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Discount Amount (Company Currency)",
|
"label": "Additional Discount Amount (Company Currency)",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@ -873,7 +873,7 @@
|
|||||||
"icon": "icon-file-text",
|
"icon": "icon-file-text",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2015-06-02 17:15:44.711032",
|
"modified": "2015-06-15 15:38:56.794601",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Buying",
|
"module": "Buying",
|
||||||
"name": "Purchase Order",
|
"name": "Purchase Order",
|
||||||
|
|||||||
@ -439,7 +439,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "base_discount_amount",
|
"fieldname": "base_discount_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Discount Amount (Company Currency)",
|
"label": "Additional Discount Amount (Company Currency)",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@ -660,7 +660,7 @@
|
|||||||
"icon": "icon-shopping-cart",
|
"icon": "icon-shopping-cart",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2015-06-02 17:15:57.283516",
|
"modified": "2015-06-15 15:39:08.954248",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Buying",
|
"module": "Buying",
|
||||||
"name": "Supplier Quotation",
|
"name": "Supplier Quotation",
|
||||||
|
|||||||
@ -63,7 +63,7 @@ cur_frm.cscript.onload = function(doc,cdt,cdn) {
|
|||||||
|
|
||||||
cur_frm.set_query("exp_approver", function() {
|
cur_frm.set_query("exp_approver", function() {
|
||||||
return {
|
return {
|
||||||
filters: [["UserRole", "role", "=", "Expense Approver"]]
|
query: "erpnext.hr.doctype.expense_claim.expense_claim.get_expense_approver"
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,3 +59,12 @@ class ExpenseClaim(Document):
|
|||||||
for d in self.get('expenses'):
|
for d in self.get('expenses'):
|
||||||
if flt(d.sanctioned_amount) > flt(d.claim_amount):
|
if flt(d.sanctioned_amount) > flt(d.claim_amount):
|
||||||
frappe.throw(_("Sanctioned Amount cannot be greater than Claim Amount in Row {0}.").format(d.idx))
|
frappe.throw(_("Sanctioned Amount cannot be greater than Claim Amount in Row {0}.").format(d.idx))
|
||||||
|
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def get_expense_approver(doctype, txt, searchfield, start, page_len, filters):
|
||||||
|
return frappe.db.sql("""
|
||||||
|
select u.name, concat(u.first_name, ' ', u.last_name)
|
||||||
|
from tabUser u, tabUserRole r
|
||||||
|
where u.name = r.parent and r.role = 'Expense Approver' and u.name like %s
|
||||||
|
""", ("%" + txt + "%"))
|
||||||
@ -488,7 +488,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "base_discount_amount",
|
"fieldname": "base_discount_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Discount Amount (Company Currency)",
|
"label": "Additional Discount Amount (Company Currency)",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@ -858,7 +858,7 @@
|
|||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"max_attachments": 1,
|
"max_attachments": 1,
|
||||||
"modified": "2015-05-27 02:48:00.388847",
|
"modified": "2015-06-15 15:37:39.199814",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Quotation",
|
"name": "Quotation",
|
||||||
|
|||||||
@ -493,7 +493,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "base_discount_amount",
|
"fieldname": "base_discount_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Discount Amount (Company Currency)",
|
"label": "Additional Discount Amount (Company Currency)",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@ -1080,7 +1080,7 @@
|
|||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"modified": "2015-05-27 02:48:01.160307",
|
"modified": "2015-06-15 15:36:38.898462",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Sales Order",
|
"name": "Sales Order",
|
||||||
|
|||||||
@ -517,7 +517,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "base_discount_amount",
|
"fieldname": "base_discount_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Discount Amount (Company Currency)",
|
"label": "Additional Discount Amount (Company Currency)",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@ -1070,7 +1070,7 @@
|
|||||||
"idx": 1,
|
"idx": 1,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2015-05-27 02:47:59.778147",
|
"modified": "2015-06-15 15:37:54.699371",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Delivery Note",
|
"name": "Delivery Note",
|
||||||
|
|||||||
@ -443,7 +443,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "base_discount_amount",
|
"fieldname": "base_discount_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Discount Amount (Company Currency)",
|
"label": "Additional Discount Amount (Company Currency)",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@ -854,7 +854,7 @@
|
|||||||
"icon": "icon-truck",
|
"icon": "icon-truck",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2015-05-27 02:48:00.763945",
|
"modified": "2015-06-15 15:38:43.754869",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Purchase Receipt",
|
"name": "Purchase Receipt",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user