customer and supplier dashboard set to company currency

This commit is contained in:
Akhilesh Darjee 2014-02-12 11:29:08 +05:30
parent 2735733d1f
commit f2b7cd65a9
3 changed files with 69 additions and 69 deletions

View File

@ -46,9 +46,9 @@ cur_frm.cscript.make_dashboard = function(doc) {
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) { if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) {
cur_frm.dashboard.set_headline( cur_frm.dashboard.set_headline(
wn._("Total Billing This Year: ") + "<b>" wn._("Total Billing This Year: ") + "<b>"
+ format_currency(r.message.total_billing, cur_frm.doc.default_currency) + format_currency(r.message.total_billing, erpnext.get_currency(cur_frm.doc.company))
+ '</b> / <span class="text-muted">' + wn._("Unpaid") + ": <b>" + '</b> / <span class="text-muted">' + wn._("Unpaid") + ": <b>"
+ format_currency(r.message.total_unpaid, cur_frm.doc.default_currency) + format_currency(r.message.total_unpaid, erpnext.get_currency(cur_frm.doc.company))
+ '</b></span>'); + '</b></span>');
} }
cur_frm.dashboard.set_badge_count(r.message); cur_frm.dashboard.set_badge_count(r.message);

View File

@ -60,9 +60,9 @@ cur_frm.cscript.setup_dashboard = function(doc) {
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) { if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) {
cur_frm.dashboard.set_headline( cur_frm.dashboard.set_headline(
wn._("Total Billing This Year: ") + "<b>" wn._("Total Billing This Year: ") + "<b>"
+ format_currency(r.message.total_billing, cur_frm.doc.default_currency) + format_currency(r.message.total_billing, erpnext.get_currency(cur_frm.doc.company))
+ '</b> / <span class="text-muted">' + wn._("Unpaid") + ": <b>" + '</b> / <span class="text-muted">' + wn._("Unpaid") + ": <b>"
+ format_currency(r.message.total_unpaid, cur_frm.doc.default_currency) + format_currency(r.message.total_unpaid, erpnext.get_currency(cur_frm.doc.company))
+ '</b></span>'); + '</b></span>');
} }
cur_frm.dashboard.set_badge_count(r.message); cur_frm.dashboard.set_badge_count(r.message);

View File

@ -60,46 +60,46 @@ wn.module_page["Stock"] = [
icon: "icon-wrench", icon: "icon-wrench",
items: [ items: [
{ {
"doctype":"Stock Reconciliation", doctype: "Stock Reconciliation",
"label": wn._("Stock Reconciliation"), label: wn._("Stock Reconciliation"),
description: wn._("Upload stock balance via csv.") description: wn._("Upload stock balance via csv.")
}, },
{ {
"doctype":"Installation Note", doctype: "Installation Note",
"label": wn._("Installation Note"), label: wn._("Installation Note"),
description: wn._("Installation record for a Serial No.") description: wn._("Installation record for a Serial No.")
}, },
{ {
"label": wn._("Packing Slip"), label: wn._("Packing Slip"),
"doctype":"Packing Slip", doctype: "Packing Slip",
description: wn._("Split Delivery Note into packages.") description: wn._("Split Delivery Note into packages.")
}, },
{ {
"doctype":"Price List", doctype: "Price List",
"label": wn._("Price List"), label: wn._("Price List"),
"description": wn._("Multiple Price list.") description: wn._("Multiple Price list.")
}, },
{ {
"doctype":"Item Price", doctype: "Item Price",
"label": wn._("Item Price"), label: wn._("Item Price"),
"description": wn._("Multiple Item prices.") description: wn._("Multiple Item prices.")
}, },
{ {
"doctype":"Quality Inspection", doctype: "Quality Inspection",
"label": wn._("Quality Inspection"), label: wn._("Quality Inspection"),
description: wn._("Incoming quality inspection.") description: wn._("Incoming quality inspection.")
}, },
{ {
"route":"Form/Landed Cost Wizard/Landed Cost Wizard", route: "Form/Landed Cost Wizard/Landed Cost Wizard",
"label": wn._("Landed Cost Wizard"), label: wn._("Landed Cost Wizard"),
description: wn._("Distribute transport overhead across items."), description: wn._("Distribute transport overhead across items."),
doctype: "Landed Cost Wizard" doctype: "Landed Cost Wizard"
}, },
{ {
"route":"Form/Stock UOM Replace Utility/Stock UOM Replace Utility", route: "Form/Stock UOM Replace Utility/Stock UOM Replace Utility",
"label": wn._("UOM Replace Utility"), label: wn._("UOM Replace Utility"),
description: wn._("Change UOM for an Item."), description: wn._("Change UOM for an Item."),
"doctype": "Stock UOM Replace Utility" doctype: "Stock UOM Replace Utility"
}, },
] ]
}, },
@ -108,26 +108,26 @@ wn.module_page["Stock"] = [
icon: "icon-cog", icon: "icon-cog",
items: [ items: [
{ {
"label": wn._("Stock Settings"), label: wn._("Stock Settings"),
"route": "Form/Stock Settings", route: "Form/Stock Settings",
"doctype":"Stock Settings", doctype: "Stock Settings",
"description": wn._("Settings for Stock Module") description: wn._("Settings for Stock Module")
}, },
{ {
"route":"Sales Browser/Item Group", route: "Sales Browser/Item Group",
"label": wn._("Item Group"), label: wn._("Item Group"),
"doctype": "Item Group", doctype: "Item Group",
"description": wn._("Item classification.") description: wn._("Item classification.")
}, },
{ {
"doctype":"UOM", doctype: "UOM",
"label": wn._("Unit of Measure") + " (UOM)", label: wn._("Unit of Measure") + " (UOM)",
"description": wn._("e.g. Kg, Unit, Nos, m") description: wn._("e.g. Kg, Unit, Nos, m")
}, },
{ {
"doctype":"Brand", doctype: "Brand",
"label": wn._("Brand"), label: wn._("Brand"),
"description": wn._("Brand master.") description: wn._("Brand master.")
} }
] ]
}, },
@ -137,24 +137,29 @@ wn.module_page["Stock"] = [
icon: "icon-table", icon: "icon-table",
items: [ items: [
{ {
"label":wn._("Stock Ledger"), label: wn._("Stock Ledger"),
doctype: "Item", doctype: "Item",
route: "query-report/Stock Ledger" route: "query-report/Stock Ledger"
}, },
{ {
"label":wn._("Stock Balance"), label: wn._("Stock Balance"),
page: "stock-balance" page: "stock-balance"
}, },
{ {
"label":wn._("Stock Projected Qty"), label: wn._("Stock Projected Qty"),
doctype: "Item", doctype: "Item",
route: "query-report/Stock Projected Qty" route: "query-report/Stock Projected Qty"
}, },
{ {
"label":wn._("Stock Ageing"), label: wn._("Stock Ageing"),
doctype: "Item", doctype: "Item",
route: "query-report/Stock Ageing" route: "query-report/Stock Ageing"
}, },
{
label: wn._("Item-wise Price List Rate"),
route: "Report/Item Price/Item-wise Price List Rate",
doctype: "Item Price"
},
] ]
}, },
{ {
@ -163,7 +168,7 @@ wn.module_page["Stock"] = [
icon: "icon-bar-chart", icon: "icon-bar-chart",
items: [ items: [
{ {
"label":wn._("Stock Analytics"), label: wn._("Stock Analytics"),
page: "stock-analytics" page: "stock-analytics"
}, },
] ]
@ -174,77 +179,72 @@ wn.module_page["Stock"] = [
icon: "icon-list", icon: "icon-list",
items: [ items: [
{ {
"label":wn._("Ordered Items To Be Delivered"), label: wn._("Ordered Items To Be Delivered"),
route: "query-report/Ordered Items To Be Delivered", route: "query-report/Ordered Items To Be Delivered",
doctype: "Delivery Note" doctype: "Delivery Note"
}, },
{ {
"label":wn._("Purchase Order Items To Be Received"), label: wn._("Purchase Order Items To Be Received"),
route: "query-report/Purchase Order Items To Be Received", route: "query-report/Purchase Order Items To Be Received",
doctype: "Purchase Receipt" doctype: "Purchase Receipt"
}, },
{ {
"label":wn._("Item Shortage Report"), label: wn._("Item Shortage Report"),
route: "Report/Bin/Item Shortage Report", route: "Report/Bin/Item Shortage Report",
doctype: "Purchase Receipt" doctype: "Purchase Receipt"
}, },
{ {
"label":wn._("Serial No Service Contract Expiry"), label: wn._("Serial No Service Contract Expiry"),
route: "Report/Serial No/Serial No Service Contract Expiry", route: "Report/Serial No/Serial No Service Contract Expiry",
doctype: "Serial No" doctype: "Serial No"
}, },
{ {
"label":wn._("Serial No Status"), label: wn._("Serial No Status"),
route: "Report/Serial No/Serial No Status", route: "Report/Serial No/Serial No Status",
doctype: "Serial No" doctype: "Serial No"
}, },
{ {
"label":wn._("Serial No Warranty Expiry"), label: wn._("Serial No Warranty Expiry"),
route: "Report/Serial No/Serial No Warranty Expiry", route: "Report/Serial No/Serial No Warranty Expiry",
doctype: "Serial No" doctype: "Serial No"
}, },
{ {
"label":wn._("Item-wise Price List Rate"), label: wn._("Purchase In Transit"),
route: "Report/Item Price/Item-wise Price List Rate",
doctype: "Item Price"
},
{
"label":wn._("Purchase In Transit"),
route: "query-report/Purchase In Transit", route: "query-report/Purchase In Transit",
doctype: "Purchase Order" doctype: "Purchase Order"
}, },
{ {
"label":wn._("Requested Items To Be Transferred"), label: wn._("Requested Items To Be Transferred"),
route: "query-report/Requested Items To Be Transferred", route: "query-report/Requested Items To Be Transferred",
doctype: "Material Request" doctype: "Material Request"
}, },
{ {
"label":wn._("Batch-Wise Balance History"), label: wn._("Batch-Wise Balance History"),
route: "query-report/Batch-Wise Balance History", route: "query-report/Batch-Wise Balance History",
doctype: "Batch" doctype: "Batch"
}, },
{ {
"label":wn._("Warehouse-Wise Stock Balance"), label: wn._("Warehouse-Wise Stock Balance"),
route: "query-report/Warehouse-Wise Stock Balance", route: "query-report/Warehouse-Wise Stock Balance",
doctype: "Warehouse" doctype: "Warehouse"
}, },
{ {
"label":wn._("Item Prices"), label: wn._("Item Prices"),
route: "query-report/Item Prices", route: "query-report/Item Prices",
doctype: "Price List" doctype: "Price List"
}, },
{ {
"label":wn._("Itemwise Recommended Reorder Level"), label: wn._("Itemwise Recommended Reorder Level"),
route: "query-report/Itemwise Recommended Reorder Level", route: "query-report/Itemwise Recommended Reorder Level",
doctype: "Item" doctype: "Item"
}, },
{ {
"label":wn._("Delivery Note Trends"), label: wn._("Delivery Note Trends"),
route: "query-report/Delivery Note Trends", route: "query-report/Delivery Note Trends",
doctype: "Delivery Note" doctype: "Delivery Note"
}, },
{ {
"label":wn._("Purchase Receipt Trends"), label: wn._("Purchase Receipt Trends"),
route: "query-report/Purchase Receipt Trends", route: "query-report/Purchase Receipt Trends",
doctype: "Purchase Receipt" doctype: "Purchase Receipt"
}, },