fixes in sales/purchase invoice list view

This commit is contained in:
Nabin Hait 2013-04-22 12:01:01 +05:30
parent bbd8dddd56
commit f19822b041
4 changed files with 173 additions and 74 deletions

View File

@ -1,9 +1,9 @@
// render // render
wn.listview_settings['Purchase Invoice'] = { wn.listview_settings['Purchase Invoice'] = {
add_fields: ["`tabPurchase Invoice`.grand_total", "`tabPurchase Invoice`.outstanding_amount"], add_fields: ["`tabPurchase Invoice`.grand_total", "`tabPurchase Invoice`.outstanding_amount"],
add_columns: [{"content":"outstanding_amount", width:"10%", type:"bar-graph", label: "Paid"}], add_columns: [{"content":"paid_amount", width:"10%", type:"bar-graph", label: "Paid"}],
prepare_data: function(data) { prepare_data: function(data) {
data.outstanding_amount = ((flt(data.grand_total) - data.paid_amount = flt(data.grand_total) ? (((flt(data.grand_total) -
flt(data.outstanding_amount)) / flt(data.grand_total)) * 100; flt(data.outstanding_amount)) / flt(data.grand_total)) * 100) : 0;
} }
}; };

View File

@ -159,7 +159,6 @@ cur_frm.cscript.update_stock = function(doc, dt, dn) {
cur_frm.cscript.hide_fields(doc, dt, dn); cur_frm.cscript.hide_fields(doc, dt, dn);
} }
cur_frm.cscript.warehouse = function(doc, cdt , cdn) { cur_frm.cscript.warehouse = function(doc, cdt , cdn) {
var d = locals[cdt][cdn]; var d = locals[cdt][cdn];
if (!d.item_code) { msgprint("please enter item code first"); return }; if (!d.item_code) { msgprint("please enter item code first"); return };

View File

@ -1,8 +1,8 @@
[ [
{ {
"creation": "2013-03-22 18:37:25", "creation": "2013-04-19 11:00:14",
"docstatus": 0, "docstatus": 0,
"modified": "2013-03-22 18:38:13", "modified": "2013-04-22 11:59:28",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -44,7 +44,8 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Basic Info", "label": "Basic Info",
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -52,6 +53,7 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"print_hide": 0, "print_hide": 0,
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -65,6 +67,7 @@
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "INV\nINV/10-11/", "options": "INV\nINV/10-11/",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
@ -74,7 +77,8 @@
"label": "Is POS", "label": "Is POS",
"oldfieldname": "is_pos", "oldfieldname": "is_pos",
"oldfieldtype": "Check", "oldfieldtype": "Check",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"depends_on": "eval:doc.is_pos==1", "depends_on": "eval:doc.is_pos==1",
@ -84,7 +88,8 @@
"label": "Update Stock", "label": "Update Stock",
"oldfieldname": "update_stock", "oldfieldname": "update_stock",
"oldfieldtype": "Check", "oldfieldtype": "Check",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"description": "The account to which you will pay (have paid) the money to.", "description": "The account to which you will pay (have paid) the money to.",
@ -97,6 +102,7 @@
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Account", "options": "Account",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"reqd": 1, "reqd": 1,
"search_index": 1 "search_index": 1
}, },
@ -110,7 +116,8 @@
"oldfieldname": "customer", "oldfieldname": "customer",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Customer", "options": "Customer",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -160,7 +167,8 @@
"doctype": "DocField", "doctype": "DocField",
"fieldname": "column_break1", "fieldname": "column_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"oldfieldtype": "Column Break" "oldfieldtype": "Column Break",
"read_only": 0
}, },
{ {
"default": "Today", "default": "Today",
@ -174,6 +182,7 @@
"oldfieldname": "posting_date", "oldfieldname": "posting_date",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"print_hide": 0, "print_hide": 0,
"read_only": 0,
"reqd": 1, "reqd": 1,
"search_index": 1 "search_index": 1
}, },
@ -188,6 +197,7 @@
"no_copy": 1, "no_copy": 1,
"oldfieldname": "due_date", "oldfieldname": "due_date",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"read_only": 0,
"reqd": 1, "reqd": 1,
"search_index": 0 "search_index": 0
}, },
@ -198,14 +208,16 @@
"label": "Mode of Payment", "label": "Mode of Payment",
"oldfieldname": "mode_of_payment", "oldfieldname": "mode_of_payment",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "link:Mode of Payment" "options": "link:Mode of Payment",
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "items", "fieldname": "items",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Items", "label": "Items",
"oldfieldtype": "Section Break" "oldfieldtype": "Section Break",
"read_only": 0
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
@ -215,25 +227,29 @@
"label": "Entries", "label": "Entries",
"oldfieldname": "entries", "oldfieldname": "entries",
"oldfieldtype": "Table", "oldfieldtype": "Table",
"options": "Sales Invoice Item" "options": "Sales Invoice Item",
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "sales_bom_help", "fieldname": "sales_bom_help",
"fieldtype": "HTML", "fieldtype": "HTML",
"label": "Sales BOM Help", "label": "Sales BOM Help",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "section_break0", "fieldname": "section_break0",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"options": "Simple" "options": "Simple",
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "col_break26", "fieldname": "col_break26",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -255,12 +271,14 @@
"fieldtype": "Button", "fieldtype": "Button",
"label": "Re-Calculate Values", "label": "Re-Calculate Values",
"oldfieldtype": "Button", "oldfieldtype": "Button",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "col_break25", "fieldname": "col_break25",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -272,7 +290,8 @@
"oldfieldname": "sales_order_main", "oldfieldname": "sales_order_main",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Sales Order", "options": "Sales Order",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"description": "Select Items from Delivery Note", "description": "Select Items from Delivery Note",
@ -283,7 +302,8 @@
"oldfieldname": "delivery_note_main", "oldfieldname": "delivery_note_main",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Delivery Note", "options": "Delivery Note",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -291,18 +311,21 @@
"fieldtype": "Button", "fieldtype": "Button",
"label": "Get Items", "label": "Get Items",
"oldfieldtype": "Button", "oldfieldtype": "Button",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "currency_section", "fieldname": "currency_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Price List and Currency" "label": "Price List and Currency",
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "col_break27", "fieldname": "col_break27",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -314,6 +337,7 @@
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "link:Price List", "options": "link:Price List",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
@ -324,6 +348,7 @@
"label": "Price List Currency", "label": "Price List Currency",
"options": "Currency", "options": "Currency",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
@ -333,12 +358,14 @@
"fieldtype": "Float", "fieldtype": "Float",
"label": "Price List Currency Conversion Rate", "label": "Price List Currency Conversion Rate",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "column_break2", "fieldname": "column_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -350,6 +377,7 @@
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "Currency", "options": "Currency",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
@ -362,6 +390,7 @@
"oldfieldname": "conversion_rate", "oldfieldname": "conversion_rate",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
@ -369,7 +398,8 @@
"fieldname": "taxes", "fieldname": "taxes",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Taxes and Charges", "label": "Taxes and Charges",
"oldfieldtype": "Section Break" "oldfieldtype": "Section Break",
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -379,7 +409,8 @@
"oldfieldname": "charge", "oldfieldname": "charge",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Sales Taxes and Charges Master", "options": "Sales Taxes and Charges Master",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -387,7 +418,8 @@
"fieldtype": "Button", "fieldtype": "Button",
"label": "Get Taxes and Charges", "label": "Get Taxes and Charges",
"oldfieldtype": "Button", "oldfieldtype": "Button",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
@ -397,7 +429,8 @@
"label": "Taxes and Charges1", "label": "Taxes and Charges1",
"oldfieldname": "other_charges", "oldfieldname": "other_charges",
"oldfieldtype": "Table", "oldfieldtype": "Table",
"options": "Sales Taxes and Charges" "options": "Sales Taxes and Charges",
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -405,7 +438,8 @@
"fieldtype": "Button", "fieldtype": "Button",
"label": "Calculate Taxes and Charges", "label": "Calculate Taxes and Charges",
"oldfieldtype": "Button", "oldfieldtype": "Button",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -424,7 +458,8 @@
"fieldtype": "HTML", "fieldtype": "HTML",
"label": "Taxes and Charges Calculation", "label": "Taxes and Charges Calculation",
"oldfieldtype": "HTML", "oldfieldtype": "HTML",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -432,7 +467,8 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Totals", "label": "Totals",
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -440,6 +476,7 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -508,6 +545,7 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -569,12 +607,14 @@
"doctype": "DocField", "doctype": "DocField",
"fieldname": "payments_section", "fieldname": "payments_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Payments" "label": "Payments",
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "column_break3", "fieldname": "column_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -585,7 +625,8 @@
"oldfieldname": "paid_amount", "oldfieldname": "paid_amount",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -595,12 +636,14 @@
"oldfieldname": "cash_bank_account", "oldfieldname": "cash_bank_account",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Account", "options": "Account",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "column_break4", "fieldname": "column_break4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -608,7 +651,8 @@
"fieldname": "write_off_outstanding_amount_automatically", "fieldname": "write_off_outstanding_amount_automatically",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Write Off Outstanding Amount", "label": "Write Off Outstanding Amount",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -616,7 +660,8 @@
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Write Off Amount", "label": "Write Off Amount",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -624,7 +669,8 @@
"fieldtype": "Link", "fieldtype": "Link",
"label": "Write Off Account", "label": "Write Off Account",
"options": "Account", "options": "Account",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -632,14 +678,16 @@
"fieldtype": "Link", "fieldtype": "Link",
"label": "Write Off Cost Center", "label": "Write Off Cost Center",
"options": "Cost Center", "options": "Cost Center",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "terms_section_break", "fieldname": "terms_section_break",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Terms and Conditions", "label": "Terms and Conditions",
"oldfieldtype": "Section Break" "oldfieldtype": "Section Break",
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -649,7 +697,8 @@
"oldfieldname": "tc_name", "oldfieldname": "tc_name",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Terms and Conditions", "options": "Terms and Conditions",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -658,7 +707,8 @@
"label": "Get Terms and Conditions", "label": "Get Terms and Conditions",
"oldfieldtype": "Button", "oldfieldtype": "Button",
"options": "get_tc_details", "options": "get_tc_details",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -667,7 +717,8 @@
"label": "Terms and Conditions HTML", "label": "Terms and Conditions HTML",
"oldfieldtype": "HTML", "oldfieldtype": "HTML",
"options": "You can add Terms and Notes that will be printed in the Transaction", "options": "You can add Terms and Notes that will be printed in the Transaction",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -675,18 +726,21 @@
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"label": "Terms and Conditions Details", "label": "Terms and Conditions Details",
"oldfieldname": "terms", "oldfieldname": "terms",
"oldfieldtype": "Text Editor" "oldfieldtype": "Text Editor",
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "contact_section", "fieldname": "contact_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Contact Info" "label": "Contact Info",
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "col_break23", "fieldname": "col_break23",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -695,7 +749,8 @@
"fieldtype": "Link", "fieldtype": "Link",
"label": "Customer Address", "label": "Customer Address",
"options": "Address", "options": "Address",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -703,12 +758,14 @@
"fieldtype": "Link", "fieldtype": "Link",
"label": "Contact Person", "label": "Contact Person",
"options": "Contact", "options": "Contact",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "col_break24", "fieldname": "col_break24",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -719,6 +776,7 @@
"label": "Territory", "label": "Territory",
"options": "Territory", "options": "Territory",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"reqd": 1, "reqd": 1,
"search_index": 0 "search_index": 0
}, },
@ -730,6 +788,7 @@
"label": "Customer Group", "label": "Customer Group",
"options": "Customer Group", "options": "Customer Group",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"search_index": 0 "search_index": 0
}, },
{ {
@ -738,7 +797,8 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "More Info", "label": "More Info",
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -746,6 +806,7 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -760,6 +821,7 @@
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "No\nYes", "options": "No\nYes",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"search_index": 0 "search_index": 0
}, },
{ {
@ -770,7 +832,8 @@
"label": "Aging Date", "label": "Aging Date",
"oldfieldname": "aging_date", "oldfieldname": "aging_date",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -780,7 +843,8 @@
"no_copy": 1, "no_copy": 1,
"oldfieldname": "posting_time", "oldfieldname": "posting_time",
"oldfieldtype": "Time", "oldfieldtype": "Time",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
@ -791,7 +855,8 @@
"oldfieldname": "letter_head", "oldfieldname": "letter_head",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "link:Letter Head", "options": "link:Letter Head",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -801,6 +866,7 @@
"no_copy": 1, "no_copy": 1,
"options": "No\nYes", "options": "No\nYes",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"report_hide": 0 "report_hide": 0
}, },
{ {
@ -822,7 +888,8 @@
"oldfieldname": "campaign", "oldfieldname": "campaign",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Campaign", "options": "Campaign",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"description": "Track this Sales Invoice against any Project", "description": "Track this Sales Invoice against any Project",
@ -834,6 +901,7 @@
"oldfieldname": "project_name", "oldfieldname": "project_name",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Project", "options": "Project",
"read_only": 0,
"search_index": 1 "search_index": 1
}, },
{ {
@ -847,6 +915,7 @@
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Print Heading", "options": "Print Heading",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"report_hide": 1 "report_hide": 1
}, },
{ {
@ -854,7 +923,8 @@
"fieldname": "column_break8", "fieldname": "column_break8",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -864,7 +934,8 @@
"oldfieldname": "source", "oldfieldname": "source",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -876,6 +947,7 @@
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Company", "options": "Company",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"reqd": 1, "reqd": 1,
"search_index": 0 "search_index": 0
}, },
@ -890,6 +962,7 @@
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "link:Fiscal Year", "options": "link:Fiscal Year",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"reqd": 1, "reqd": 1,
"search_index": 0 "search_index": 0
}, },
@ -914,7 +987,8 @@
"no_copy": 1, "no_copy": 1,
"oldfieldname": "amendment_date", "oldfieldname": "amendment_date",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"depends_on": "eval:!doc.__islocal", "depends_on": "eval:!doc.__islocal",
@ -936,6 +1010,7 @@
"oldfieldname": "remarks", "oldfieldname": "remarks",
"oldfieldtype": "Text", "oldfieldtype": "Text",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"reqd": 0 "reqd": 0
}, },
{ {
@ -944,7 +1019,8 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Advances", "label": "Advances",
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -953,7 +1029,8 @@
"label": "Get Advances Received", "label": "Get Advances Received",
"oldfieldtype": "Button", "oldfieldtype": "Button",
"options": "get_advances", "options": "get_advances",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -963,14 +1040,16 @@
"oldfieldname": "advance_adjustment_details", "oldfieldname": "advance_adjustment_details",
"oldfieldtype": "Table", "oldfieldtype": "Table",
"options": "Sales Invoice Advance", "options": "Sales Invoice Advance",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "packing_list", "fieldname": "packing_list",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Packing List", "label": "Packing List",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -978,7 +1057,8 @@
"fieldtype": "Table", "fieldtype": "Table",
"label": "Packing Details", "label": "Packing Details",
"options": "Delivery Note Packing Item", "options": "Delivery Note Packing Item",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -986,7 +1066,8 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Sales Team", "label": "Sales Team",
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -994,6 +1075,7 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -1005,7 +1087,8 @@
"oldfieldname": "sales_partner", "oldfieldname": "sales_partner",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Sales Partner", "options": "Sales Partner",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -1013,6 +1096,7 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -1022,7 +1106,8 @@
"label": "Commission Rate (%)", "label": "Commission Rate (%)",
"oldfieldname": "commission_rate", "oldfieldname": "commission_rate",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -1032,14 +1117,16 @@
"oldfieldname": "total_commission", "oldfieldname": "total_commission",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "section_break2", "fieldname": "section_break2",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"options": "Simple", "options": "Simple",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -1049,7 +1136,8 @@
"oldfieldname": "sales_team", "oldfieldname": "sales_team",
"oldfieldtype": "Table", "oldfieldtype": "Table",
"options": "Sales Team", "options": "Sales Team",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"depends_on": "eval:doc.docstatus<2", "depends_on": "eval:doc.docstatus<2",
@ -1057,13 +1145,15 @@
"fieldname": "recurring_invoice", "fieldname": "recurring_invoice",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Recurring Invoice", "label": "Recurring Invoice",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "column_break11", "fieldname": "column_break11",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -1075,7 +1165,8 @@
"fieldtype": "Check", "fieldtype": "Check",
"label": "Convert into Recurring Invoice", "label": "Convert into Recurring Invoice",
"no_copy": 1, "no_copy": 1,
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
@ -1087,7 +1178,8 @@
"label": "Recurring Type", "label": "Recurring Type",
"no_copy": 1, "no_copy": 1,
"options": "Monthly\nQuarterly\nHalf-yearly\nYearly", "options": "Monthly\nQuarterly\nHalf-yearly\nYearly",
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
@ -1098,7 +1190,8 @@
"fieldtype": "Int", "fieldtype": "Int",
"label": "Repeat on Day of Month", "label": "Repeat on Day of Month",
"no_copy": 1, "no_copy": 1,
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
@ -1109,7 +1202,8 @@
"fieldtype": "Date", "fieldtype": "Date",
"label": "Invoice Period From Date", "label": "Invoice Period From Date",
"no_copy": 1, "no_copy": 1,
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
@ -1120,7 +1214,8 @@
"fieldtype": "Date", "fieldtype": "Date",
"label": "Invoice Period To Date", "label": "Invoice Period To Date",
"no_copy": 1, "no_copy": 1,
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -1128,6 +1223,7 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"no_copy": 0, "no_copy": 0,
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
@ -1139,7 +1235,8 @@
"fieldtype": "Small Text", "fieldtype": "Small Text",
"label": "Notification Email Address", "label": "Notification Email Address",
"no_copy": 1, "no_copy": 1,
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"depends_on": "eval:doc.convert_into_recurring_invoice==1", "depends_on": "eval:doc.convert_into_recurring_invoice==1",
@ -1172,7 +1269,8 @@
"fieldtype": "Date", "fieldtype": "Date",
"label": "End Date", "label": "End Date",
"no_copy": 1, "no_copy": 1,
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -1184,6 +1282,7 @@
"oldfieldname": "against_income_account", "oldfieldname": "against_income_account",
"oldfieldtype": "Small Text", "oldfieldtype": "Small Text",
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"report_hide": 1 "report_hide": 1
}, },
{ {
@ -1193,7 +1292,8 @@
"hidden": 1, "hidden": 1,
"label": "File List", "label": "File List",
"no_copy": 1, "no_copy": 1,
"print_hide": 1 "print_hide": 1,
"read_only": 0
}, },
{ {
"amend": 1, "amend": 1,

View File

@ -1,9 +1,9 @@
// render // render
wn.listview_settings['Sales Invoice'] = { wn.listview_settings['Sales Invoice'] = {
add_fields: ["`tabSales Invoice`.grand_total", "`tabSales Invoice`.outstanding_amount"], add_fields: ["`tabSales Invoice`.grand_total", "`tabSales Invoice`.outstanding_amount"],
add_columns: [{"content":"outstanding_amount", width:"10%", type:"bar-graph"}], add_columns: [{"content":"paid_amount", width:"10%", type:"bar-graph", "label": "Paid"}],
prepare_data: function(data) { prepare_data: function(data) {
data.outstanding_amount = (flt(data.grand_total) - data.paid_amount = flt(data.grand_total) ? (((flt(data.grand_total) -
flt(data.outstanding_amount)) / flt(data.grand_total) * 100; flt(data.outstanding_amount)) / flt(data.grand_total)) * 100) : 0;
} }
}; };