Mode of Payment added to POS Profile
This commit is contained in:
parent
621d6eac3c
commit
75b00e3958
@ -77,6 +77,51 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "warehouse",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Warehouse",
|
||||||
|
"oldfieldname": "warehouse",
|
||||||
|
"oldfieldtype": "Link",
|
||||||
|
"options": "Warehouse",
|
||||||
|
"permlevel": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 1,
|
||||||
|
"fieldname": "letter_head",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Letter Head",
|
||||||
|
"oldfieldname": "letter_head",
|
||||||
|
"oldfieldtype": "Select",
|
||||||
|
"options": "Letter Head",
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "tc_name",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Terms and Conditions",
|
||||||
|
"oldfieldname": "tc_name",
|
||||||
|
"oldfieldtype": "Link",
|
||||||
|
"options": "Terms and Conditions",
|
||||||
|
"permlevel": 0,
|
||||||
|
"read_only": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 1,
|
||||||
|
"fieldname": "select_print_heading",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"in_filter": 0,
|
||||||
|
"label": "Print Heading",
|
||||||
|
"oldfieldname": "select_print_heading",
|
||||||
|
"oldfieldtype": "Select",
|
||||||
|
"options": "Print Heading",
|
||||||
|
"permlevel": 0,
|
||||||
|
"read_only": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "column_break0",
|
"fieldname": "column_break0",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
@ -105,6 +150,14 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 0
|
"reqd": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "mode_of_payment",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Mode of Payment",
|
||||||
|
"options": "Mode of Payment",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "cash_bank_account",
|
"fieldname": "cash_bank_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@ -139,17 +192,6 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 0
|
"reqd": 0
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldname": "warehouse",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"label": "Warehouse",
|
|
||||||
"oldfieldname": "warehouse",
|
|
||||||
"oldfieldtype": "Link",
|
|
||||||
"options": "Warehouse",
|
|
||||||
"permlevel": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"reqd": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fieldname": "cost_center",
|
"fieldname": "cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@ -161,16 +203,6 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldname": "taxes_and_charges",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"label": "Taxes and Charges",
|
|
||||||
"oldfieldname": "charge",
|
|
||||||
"oldfieldtype": "Link",
|
|
||||||
"options": "Sales Taxes and Charges Template",
|
|
||||||
"permlevel": 0,
|
|
||||||
"read_only": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fieldname": "write_off_account",
|
"fieldname": "write_off_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@ -190,43 +222,19 @@
|
|||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"fieldname": "taxes_and_charges",
|
||||||
"fieldname": "letter_head",
|
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Letter Head",
|
"label": "Taxes and Charges",
|
||||||
"oldfieldname": "letter_head",
|
"oldfieldname": "charge",
|
||||||
"oldfieldtype": "Select",
|
|
||||||
"options": "Letter Head",
|
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 1,
|
|
||||||
"read_only": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "tc_name",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"label": "Terms and Conditions",
|
|
||||||
"oldfieldname": "tc_name",
|
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Terms and Conditions",
|
"options": "Sales Taxes and Charges Template",
|
||||||
"permlevel": 0,
|
|
||||||
"read_only": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_on_submit": 1,
|
|
||||||
"fieldname": "select_print_heading",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"in_filter": 0,
|
|
||||||
"label": "Print Heading",
|
|
||||||
"oldfieldname": "select_print_heading",
|
|
||||||
"oldfieldtype": "Select",
|
|
||||||
"options": "Print Heading",
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 0
|
"read_only": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "icon-cog",
|
"icon": "icon-cog",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"modified": "2015-05-20 05:38:44.482696",
|
"modified": "2015-07-07 08:56:04.381471",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "POS Profile",
|
"name": "POS Profile",
|
||||||
|
@ -169,6 +169,7 @@ class SalesInvoice(SellingController):
|
|||||||
if pos:
|
if pos:
|
||||||
if not for_validate and not self.customer:
|
if not for_validate and not self.customer:
|
||||||
self.customer = pos.customer
|
self.customer = pos.customer
|
||||||
|
self.mode_of_payment = pos.mode_of_payment
|
||||||
# self.set_customer_defaults()
|
# self.set_customer_defaults()
|
||||||
|
|
||||||
for fieldname in ('territory', 'naming_series', 'currency', 'taxes_and_charges', 'letter_head', 'tc_name',
|
for fieldname in ('territory', 'naming_series', 'currency', 'taxes_and_charges', 'letter_head', 'tc_name',
|
||||||
|
@ -401,7 +401,8 @@ erpnext.pos.PointOfSale = Class.extend({
|
|||||||
|
|
||||||
this.with_modes_of_payment(function() {
|
this.with_modes_of_payment(function() {
|
||||||
// prefer cash payment!
|
// prefer cash payment!
|
||||||
var default_mode = me.modes_of_payment.indexOf(__("Cash"))!==-1 ? __("Cash") : undefined;
|
var default_mode = me.frm.doc.mode_of_payment ? me.frm.doc.mode_of_payment :
|
||||||
|
me.modes_of_payment.indexOf(__("Cash"))!==-1 ? __("Cash") : undefined;
|
||||||
|
|
||||||
// show payment wizard
|
// show payment wizard
|
||||||
var dialog = new frappe.ui.Dialog({
|
var dialog = new frappe.ui.Dialog({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user