[layout] cleaned up Sales Invoice

This commit is contained in:
Rushabh Mehta 2015-08-20 18:01:40 +05:30
parent b6398be232
commit f24f6044bd
4 changed files with 2199 additions and 373 deletions

View File

@ -133,8 +133,8 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
}, },
is_pos: function(doc, dt, dn, callback_fn) { is_pos: function(doc, dt, dn, callback_fn) {
if(cur_frm.doc.__missing_values_set) return;
cur_frm.cscript.hide_fields(this.frm.doc); cur_frm.cscript.hide_fields(this.frm.doc);
if(cur_frm.doc.__missing_values_set) return;
if(cint(this.frm.doc.is_pos)) { if(cint(this.frm.doc.is_pos)) {
if(!this.frm.doc.company) { if(!this.frm.doc.company) {
this.frm.set_value("is_pos", 0); this.frm.set_value("is_pos", 0);

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "barcode", "fieldname": "barcode",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@ -29,6 +31,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "item_code", "fieldname": "item_code",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@ -51,6 +55,28 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_name", "fieldname": "item_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@ -72,24 +98,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "col_break1", "bold": 0,
"fieldtype": "Column Break", "collapsible": 0,
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "customer_item_code", "fieldname": "customer_item_code",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@ -109,6 +119,30 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "section_break_6",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Edit Description",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"hidden": 0, "hidden": 0,
@ -132,13 +166,14 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "image", "bold": 0,
"fieldtype": "Attach", "collapsible": 0,
"hidden": 1, "fieldname": "column_break_8",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Image",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
@ -152,6 +187,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image_view", "fieldname": "image_view",
"fieldtype": "Image", "fieldtype": "Image",
"hidden": 0, "hidden": 0,
@ -173,13 +210,37 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image",
"fieldtype": "Attach",
"hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Image",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "quantity_and_rate", "fieldname": "quantity_and_rate",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Quantity and Rate", "label": "",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
@ -192,6 +253,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "qty", "fieldname": "qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@ -213,6 +276,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "price_list_rate", "fieldname": "price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@ -235,6 +300,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "price_list_rate", "depends_on": "price_list_rate",
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Percent", "fieldtype": "Percent",
@ -257,6 +324,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break2", "fieldname": "col_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@ -275,6 +344,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "stock_uom", "fieldname": "stock_uom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@ -295,6 +366,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_price_list_rate", "fieldname": "base_price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@ -317,6 +390,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break1", "fieldname": "section_break1",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@ -335,6 +410,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "rate", "fieldname": "rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@ -357,6 +434,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amount", "fieldname": "amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@ -379,6 +458,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break3", "fieldname": "col_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@ -397,6 +478,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_rate", "fieldname": "base_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@ -419,6 +502,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_amount", "fieldname": "base_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@ -441,6 +526,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "pricing_rule", "fieldname": "pricing_rule",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@ -461,6 +548,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_21", "fieldname": "section_break_21",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@ -480,6 +569,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_rate", "fieldname": "net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@ -501,6 +592,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_amount", "fieldname": "net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@ -522,6 +615,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_24", "fieldname": "column_break_24",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@ -541,6 +636,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_rate", "fieldname": "base_net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@ -562,6 +659,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_amount", "fieldname": "base_net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@ -583,13 +682,15 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "accounting", "fieldname": "accounting",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Accounting", "label": "Accounting Details",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
@ -602,6 +703,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "income_account", "fieldname": "income_account",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@ -626,6 +729,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "expense_account", "fieldname": "expense_account",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@ -647,6 +752,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break4", "fieldname": "col_break4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@ -665,6 +772,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": ":Company", "default": ":Company",
"fieldname": "cost_center", "fieldname": "cost_center",
"fieldtype": "Link", "fieldtype": "Link",
@ -690,13 +799,16 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "eval:doc.serial_no || doc.batch_no",
"fieldname": "warehouse_and_reference", "fieldname": "warehouse_and_reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Warehouse and Reference", "label": "Stock Details",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
@ -709,6 +821,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "warehouse", "fieldname": "warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@ -731,6 +845,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "serial_no", "fieldname": "serial_no",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 0, "hidden": 0,
@ -752,6 +868,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "batch_no", "fieldname": "batch_no",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@ -772,6 +890,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "item_group", "fieldname": "item_group",
"fieldtype": "Link", "fieldtype": "Link",
@ -795,6 +915,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "brand", "fieldname": "brand",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@ -816,6 +938,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_tax_rate", "fieldname": "item_tax_rate",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
@ -837,6 +961,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break5", "fieldname": "col_break5",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@ -855,6 +981,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "actual_batch_qty", "fieldname": "actual_batch_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@ -877,6 +1005,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "actual_qty", "fieldname": "actual_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@ -898,6 +1028,30 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "edit_references",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "References",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "time_log_batch", "fieldname": "time_log_batch",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@ -918,6 +1072,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "sales_order", "fieldname": "sales_order",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@ -940,6 +1096,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "so_detail", "fieldname": "so_detail",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@ -961,6 +1119,29 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_50",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "delivery_note", "fieldname": "delivery_note",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@ -983,6 +1164,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "dn_detail", "fieldname": "dn_detail",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@ -1004,6 +1187,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "delivered_qty", "fieldname": "delivered_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@ -1023,8 +1208,31 @@
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_54",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "page_break", "fieldname": "page_break",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@ -1051,7 +1259,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"modified": "2015-08-19 12:45:54.989734", "modified": "2015-08-20 17:18:52.752064",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Sales Invoice Item", "name": "Sales Invoice Item",

View File

@ -714,7 +714,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
}).join("\n"); }).join("\n");
if(!rows) return ""; if(!rows) return "";
return '<p><a href="#" onclick="$(\'.tax-break-up\').toggleClass(\'hide\'); return false;">Show / Hide tax break-up</a><br><br></p>\ return '<p><a class="h6 text-muted" href="#" onclick="$(\'.tax-break-up\').toggleClass(\'hide\'); return false;">'
+ __("Show tax break-up") + '</a><br><br></p>\
<div class="tax-break-up hide" style="overflow-x: auto;"><table class="table table-bordered table-hover">\ <div class="tax-break-up hide" style="overflow-x: auto;"><table class="table table-bordered table-hover">\
<thead><tr>' + headings + '</tr></thead> \ <thead><tr>' + headings + '</tr></thead> \
<tbody>' + rows + '</tbody> \ <tbody>' + rows + '</tbody> \