Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Nabin Hait 2013-07-25 16:06:39 +05:30
commit 54caa86437
9 changed files with 43 additions and 21 deletions

View File

@ -30,7 +30,7 @@ wn.pages['voucher-import-tool'].onload = function(wrapper) {
args: { args: {
method: "accounts.page.voucher_import_tool.voucher_import_tool.upload" method: "accounts.page.voucher_import_tool.voucher_import_tool.upload"
}, },
callback: function(r) { callback: function(fid, filename, r) {
wrapper.waiting.toggle(false); wrapper.waiting.toggle(false);
$(wrapper).find(".messages").toggle(true).html( $(wrapper).find(".messages").toggle(true).html(
r.join("<div style='margin:4px; border-top:1px solid #aaa;'></div>")) r.join("<div style='margin:4px; border-top:1px solid #aaa;'></div>"))

View File

@ -113,14 +113,17 @@ wn.module_page["Buying"] = [
{ {
"label":wn._("Item-wise Purchase History"), "label":wn._("Item-wise Purchase History"),
route: "query-report/Item-wise Purchase History", route: "query-report/Item-wise Purchase History",
doctype: "Item"
}, },
{ {
"label":wn._("Purchase In Transit"), "label":wn._("Purchase In Transit"),
route: "query-report/Purchase In Transit", route: "query-report/Purchase In Transit",
doctype: "Purchase Order"
}, },
{ {
"label":wn._("Requested Items To Be Ordered"), "label":wn._("Requested Items To Be Ordered"),
route: "query-report/Requested Items To Be Ordered", route: "query-report/Requested Items To Be Ordered",
doctype: "Material Request"
}, },
{ {
"label":wn._("Purchase Order Trends"), "label":wn._("Purchase Order Trends"),
@ -130,6 +133,7 @@ wn.module_page["Buying"] = [
{ {
"label":wn._("Item-wise Last Purchase Rate"), "label":wn._("Item-wise Last Purchase Rate"),
route: "query-report/Item-wise Last Purchase Rate", route: "query-report/Item-wise Last Purchase Rate",
doctype: "Item"
} }
] ]
} }

View File

@ -52,13 +52,13 @@ erpnext.hr.AttendanceControlPanel = wn.ui.form.Controller.extend({
method: 'hr.doctype.upload_attendance.upload_attendance.upload' method: 'hr.doctype.upload_attendance.upload_attendance.upload'
}, },
sample_url: "e.g. http://example.com/somefile.csv", sample_url: "e.g. http://example.com/somefile.csv",
callback: function(r) { callback: function(fid, filename, r) {
var $log_wrapper = $(cur_frm.fields_dict.import_log.wrapper).empty(); var $log_wrapper = $(cur_frm.fields_dict.import_log.wrapper).empty();
if(!r.messages) r.messages = []; if(!r.messages) r.messages = [];
// replace links if error has occured // replace links if error has occured
if(r.exc || r.error) { if(r.exc || r.error) {
r.messages = $.map(r.messages, function(v) { r.messages = $.map(r.message.messages, function(v) {
var msg = v.replace("Inserted", "Valid") var msg = v.replace("Inserted", "Valid")
.replace("Updated", "Valid").split("<"); .replace("Updated", "Valid").split("<");
if (msg.length > 1) { if (msg.length > 1) {
@ -73,7 +73,7 @@ erpnext.hr.AttendanceControlPanel = wn.ui.form.Controller.extend({
.concat(r.messages) .concat(r.messages)
} else { } else {
r.messages = ["<h4 style='color:green'>Import Successful!</h4>"]. r.messages = ["<h4 style='color:green'>Import Successful!</h4>"].
concat(r.messages) concat(r.message.messages)
} }
$.each(r.messages, function(i, v) { $.each(r.messages, function(i, v) {

View File

@ -168,23 +168,28 @@ wn.module_page["HR"] = [
items: [ items: [
{ {
"label":wn._("Employee Leave Balance"), "label":wn._("Employee Leave Balance"),
route: "query-report/Employee Leave Balance" route: "query-report/Employee Leave Balance",
doctype: "Leave Application"
}, },
{ {
"label":wn._("Employee Birthday"), "label":wn._("Employee Birthday"),
route: "query-report/Employee Birthday" route: "query-report/Employee Birthday",
doctype: "Employee"
}, },
{ {
"label":wn._("Employee Information"), "label":wn._("Employee Information"),
route: "Report/Employee/Employee Information" route: "Report/Employee/Employee Information",
doctype: "Employee"
}, },
{ {
"label":wn._("Monthly Salary Register"), "label":wn._("Monthly Salary Register"),
route: "query-report/Monthly Salary Register" route: "query-report/Monthly Salary Register",
doctype: "Salary Slip"
}, },
{ {
"label":wn._("Monthly Attendance Sheet"), "label":wn._("Monthly Attendance Sheet"),
route: "query-report/Monthly Attendance Sheet" route: "query-report/Monthly Attendance Sheet",
doctype: "Attendance"
}, },
] ]
} }

View File

@ -67,6 +67,7 @@ wn.module_page["Manufacturing"] = [
{ {
"label":wn._("Issued Items Against Production Order"), "label":wn._("Issued Items Against Production Order"),
route: "query-report/Issued Items Against Production Order", route: "query-report/Issued Items Against Production Order",
doctype:"Production Order"
}, },
] ]
} }

View File

@ -158,27 +158,33 @@ wn.module_page["Selling"] = [
items: [ items: [
{ {
"label":wn._("Customer Addresses And Contacts"), "label":wn._("Customer Addresses And Contacts"),
route: "query-report/Customer Addresses And Contacts" route: "query-report/Customer Addresses And Contacts",
doctype: "Contact"
}, },
{ {
"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: "Sales Order"
}, },
{ {
"label":wn._("Sales Person-wise Transaction Summary"), "label":wn._("Sales Person-wise Transaction Summary"),
route: "query-report/Sales Person-wise Transaction Summary" route: "query-report/Sales Person-wise Transaction Summary",
doctype: "Sales Order"
}, },
{ {
"label":wn._("Item-wise Sales History"), "label":wn._("Item-wise Sales History"),
route: "query-report/Item-wise Sales History" route: "query-report/Item-wise Sales History",
doctype: "Item"
}, },
{ {
"label":wn._("Territory Target Variance (Item Group-Wise)"), "label":wn._("Territory Target Variance (Item Group-Wise)"),
route: "query-report/Territory Target Variance Item Group-Wise" route: "query-report/Territory Target Variance Item Group-Wise",
doctype: "Territory"
}, },
{ {
"label":wn._("Sales Person Target Variance (Item Group-Wise)"), "label":wn._("Sales Person Target Variance (Item Group-Wise)"),
route: "query-report/Sales Person Target Variance Item Group-Wise" route: "query-report/Sales Person Target Variance Item Group-Wise",
doctype: "Sales Person",
}, },
{ {
"label":wn._("Customers Not Buying Since Long Time"), "label":wn._("Customers Not Buying Since Long Time"),
@ -198,10 +204,12 @@ wn.module_page["Selling"] = [
{ {
"label":wn._("Available Stock for Packing Items"), "label":wn._("Available Stock for Packing Items"),
route: "query-report/Available Stock for Packing Items", route: "query-report/Available Stock for Packing Items",
doctype: "Item",
}, },
{ {
"label":wn._("Pending SO Items For Purchase Request"), "label":wn._("Pending SO Items For Purchase Request"),
route: "query-report/Pending SO Items For Purchase Request" route: "query-report/Pending SO Items For Purchase Request",
doctype: "Sales Order"
}, },
] ]
} }

View File

@ -108,8 +108,8 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
method: 'stock.doctype.stock_reconciliation.stock_reconciliation.upload' method: 'stock.doctype.stock_reconciliation.stock_reconciliation.upload'
}, },
sample_url: "e.g. http://example.com/somefile.csv", sample_url: "e.g. http://example.com/somefile.csv",
callback: function(r) { callback: function(fid, filename, r) {
me.frm.set_value("reconciliation_json", JSON.stringify(r)); me.frm.set_value("reconciliation_json", JSON.stringify(r.message));
me.show_reconciliation_data(); me.show_reconciliation_data();
me.frm.save(); me.frm.save();
} }

View File

@ -203,23 +203,27 @@ wn.module_page["Stock"] = [
{ {
"label":wn._("Purchase In Transit"), "label":wn._("Purchase In Transit"),
route: "query-report/Purchase In Transit", route: "query-report/Purchase In Transit",
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"
}, },
{ {
"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"
}, },
{ {
"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"
}, },
{ {
"label":wn._("Item Prices"), "label":wn._("Item Prices"),
route: "query-report/Item Prices", route: "query-report/Item Prices",
doctype: "Price List"
}, },
{ {
"label":wn._("Itemwise Recommended Reorder Level"), "label":wn._("Itemwise Recommended Reorder Level"),

View File

@ -28,9 +28,9 @@ cur_frm.cscript.setup_upload = function() {
select_doctype: cur_frm.doc.select_doctype select_doctype: cur_frm.doc.select_doctype
}, },
sample_url: "e.g. http://example.com/somefile.csv", sample_url: "e.g. http://example.com/somefile.csv",
callback: function(r) { callback: function(fid, filename, r) {
$log.empty().html("<hr>"); $log.empty().html("<hr>");
$.each(r, function(i, v) { $.each(r.message, function(i, v) {
$("<div>" + v + "</div>").appendTo($log); $("<div>" + v + "</div>").appendTo($log);
}); });
} }