added client side functions and mode_of_payment defaults
This commit is contained in:
parent
586ac7c977
commit
535d6c4d91
@ -4,7 +4,7 @@
|
|||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"creation": "2012-07-03 13:30:49",
|
"creation": "2012-07-03 13:30:49",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"modified": "2012-12-04 16:31:20"
|
"modified": "2012-12-04 16:33:37"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"autoname": "field:mode_of_payment",
|
"autoname": "field:mode_of_payment",
|
||||||
@ -57,7 +57,7 @@
|
|||||||
"options": "Company"
|
"options": "Company"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Will be automatically updated in POS Invoice when this mode is selected.",
|
"description": "Default Bank / Cash account will be automatically updated in POS Invoice when this mode is selected.",
|
||||||
"colour": "White:FFF",
|
"colour": "White:FFF",
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"label": "Default Account",
|
"label": "Default Account",
|
||||||
|
|||||||
@ -900,7 +900,9 @@ def assign_task_to_owner(inv, msg, users):
|
|||||||
|
|
||||||
@webnotes.whitelist()
|
@webnotes.whitelist()
|
||||||
def get_bank_cash_account(mode_of_payment):
|
def get_bank_cash_account(mode_of_payment):
|
||||||
|
val = webnotes.conn.get_value("Mode of Payment", mode_of_payment, "default_account")
|
||||||
|
if not val:
|
||||||
|
webnotes.msgprint("Default Account not set in Mode of Payment: ")
|
||||||
return {
|
return {
|
||||||
"cash_bank_account": webnotes.conn.get_value("Mode of Payment",
|
"cash_bank_account": val
|
||||||
mode_of_payment, "default_account")
|
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user