From 8956c6726725ee7dc7b665738920fb46eb884d61 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 5 Jul 2013 16:23:19 +0530 Subject: [PATCH 1/7] [icons] added icons to forms, toolbars, moduleview, doclistview, reportview --- home/page/activity/activity.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/page/activity/activity.js b/home/page/activity/activity.js index e412a23650..137edb83e5 100644 --- a/home/page/activity/activity.js +++ b/home/page/activity/activity.js @@ -56,7 +56,7 @@ erpnext.ActivityFeed = Class.extend({ // link if(data.doc_name && data.feed_type!='Login') { - data.link = repl('%(doc_name)s', data) + data.link = wn.format(data.doc_name, {"fieldtype":"Link", "options":data.doc_type}) } else { data.link = ""; } From e6af313bfa4688c2afbd87a1fee9efecf569494e Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 5 Jul 2013 16:25:17 +0530 Subject: [PATCH 2/7] [icons] added icons to forms, toolbars, moduleview, doclistview, reportview --- stock/doctype/item/item.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock/doctype/item/item.txt b/stock/doctype/item/item.txt index 548be2f49c..54725a1d25 100644 --- a/stock/doctype/item/item.txt +++ b/stock/doctype/item/item.txt @@ -2,7 +2,7 @@ { "creation": "2013-05-03 10:45:46", "docstatus": 0, - "modified": "2013-07-05 14:43:01", + "modified": "2013-07-05 16:24:34", "modified_by": "Administrator", "owner": "Administrator" }, @@ -14,7 +14,7 @@ "description": "A Product or a Service that is bought, sold or kept in stock.", "doctype": "DocType", "document_type": "Master", - "icon": "icon-circle", + "icon": "icon-tag", "max_attachments": 1, "module": "Stock", "name": "__common__", From 1439854b27e8a502335016c7260d79fb2fa8b314 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 5 Jul 2013 16:28:00 +0530 Subject: [PATCH 3/7] [icons] added icons to forms, toolbars, moduleview, doclistview, reportview --- setup/doctype/currency_exchange/currency_exchange.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/doctype/currency_exchange/currency_exchange.txt b/setup/doctype/currency_exchange/currency_exchange.txt index f90ecc20b4..db2083910c 100644 --- a/setup/doctype/currency_exchange/currency_exchange.txt +++ b/setup/doctype/currency_exchange/currency_exchange.txt @@ -2,7 +2,7 @@ { "creation": "2013-06-20 15:40:29", "docstatus": 0, - "modified": "2013-07-05 14:33:47", + "modified": "2013-07-05 16:26:11", "modified_by": "Administrator", "owner": "Administrator" }, @@ -11,7 +11,7 @@ "description": "Specify Exchange Rate to convert one currency into another", "doctype": "DocType", "document_type": "Master", - "icon": "icon-bitcoin", + "icon": "icon-exchange", "module": "Setup", "name": "__common__" }, From 22bf5f4dbdb199e3fa9cc72be3c712ac1196ea8b Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 5 Jul 2013 16:33:54 +0530 Subject: [PATCH 4/7] [icons] added icons to forms, toolbars, moduleview, doclistview, reportview --- stock/page/stock_home/stock_home.js | 1 + 1 file changed, 1 insertion(+) diff --git a/stock/page/stock_home/stock_home.js b/stock/page/stock_home/stock_home.js index a59fe07438..4528cd4832 100644 --- a/stock/page/stock_home/stock_home.js +++ b/stock/page/stock_home/stock_home.js @@ -111,6 +111,7 @@ wn.module_page["Stock"] = [ { "route":"Sales Browser/Item Group", "label": wn._("Item Group"), + "doctype": "Item Group", "description": wn._("Item classification.") }, { From f7de3769325e26e94a09c0c7dabedab0d3c24864 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 5 Jul 2013 16:50:43 +0530 Subject: [PATCH 5/7] [sales invoice] added progress bar of payment --- accounts/doctype/sales_invoice/sales_invoice.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accounts/doctype/sales_invoice/sales_invoice.js b/accounts/doctype/sales_invoice/sales_invoice.js index 6989ad274b..7d43bbee0d 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.js +++ b/accounts/doctype/sales_invoice/sales_invoice.js @@ -55,7 +55,8 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte wn.set_route("general-ledger"); }); - cur_frm.dashboard.add_progress() + var percent_paid = cint(flt(doc.grand_total - doc.outstanding_amount) / flt(doc.grand_total) * 100); + cur_frm.dashboard.add_progress(percent_paid + "% Paid", percent_paid); cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); From 8f48db33d2e65177545fb01b671e3aa5150c957e Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 5 Jul 2013 16:54:40 +0530 Subject: [PATCH 6/7] [sales invoice] added progress bar of payment --- accounts/doctype/sales_invoice/sales_invoice_list.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/doctype/sales_invoice/sales_invoice_list.js b/accounts/doctype/sales_invoice/sales_invoice_list.js index e83611aff0..5b6230da05 100644 --- a/accounts/doctype/sales_invoice/sales_invoice_list.js +++ b/accounts/doctype/sales_invoice/sales_invoice_list.js @@ -1,10 +1,10 @@ // render wn.listview_settings['Sales Invoice'] = { add_fields: ["`tabSales Invoice`.grand_total", "`tabSales Invoice`.outstanding_amount"], - add_columns: [{"content":"paid_amount", width:"10%", type:"bar-graph", + add_columns: [{"content":"Percent Paid", width:"10%", type:"bar-graph", label: "Payment Received"}], prepare_data: function(data) { - data.paid_amount = flt(data.grand_total) ? (((flt(data.grand_total) - + data["Percent Paid"] = flt(data.grand_total) ? (((flt(data.grand_total) - flt(data.outstanding_amount)) / flt(data.grand_total)) * 100) : 0; } }; From 29ea5d014ed6cb9ed865f86103ac58952efa4801 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 5 Jul 2013 17:23:14 +0530 Subject: [PATCH 7/7] [sales common] [fix] calculate outstanding amount only for docstatus=0 on client side --- selling/doctype/sales_common/sales_common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selling/doctype/sales_common/sales_common.js b/selling/doctype/sales_common/sales_common.js index 27c82f6cf4..cf757a6cea 100644 --- a/selling/doctype/sales_common/sales_common.js +++ b/selling/doctype/sales_common/sales_common.js @@ -397,7 +397,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ // NOTE: // write_off_amount is only for POS Invoice // total_advance is only for non POS Invoice - if(this.frm.doc.doctype == "Sales Invoice" && this.frm.doc.docstatus < 2) { + if(this.frm.doc.doctype == "Sales Invoice" && this.frm.doc.docstatus==0) { wn.model.round_floats_in(this.frm.doc, ["grand_total", "total_advance", "write_off_amount", "paid_amount"]); var total_amount_to_pay = this.frm.doc.grand_total - this.frm.doc.write_off_amount;