[grid-reports] [page] bug fix for double 'show' call, fixed ledger reports links

This commit is contained in:
Rushabh Mehta 2013-07-01 15:17:36 +05:30
parent 36af6a02ad
commit 4cd0a07290
4 changed files with 6 additions and 18 deletions

View File

@ -56,8 +56,6 @@ cur_frm.cscript.is_opening = function(doc, cdt, cdn) {
if (doc.is_opening == 'Yes') unhide_field('aging_date');
}
//Set debit and credit to zero on adding new row
//----------------------------------------------
cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){
var d = locals[cdt][cdn];
if(d.idx == 1){
@ -66,9 +64,6 @@ cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){
}
}
// Get Outstanding of Payable & Sales Invoice
// -----------------------------------------------
cur_frm.cscript.against_voucher = function(doc,cdt,cdn) {
var d = locals[cdt][cdn];
if (d.against_voucher && !flt(d.debit)) {

View File

@ -22,10 +22,7 @@ wn.pages['general-ledger'].onload = function(wrapper) {
});
erpnext.general_ledger = new erpnext.GeneralLedger(wrapper);
wrapper.appframe.add_home_breadcrumb()
wrapper.appframe.add_module_icon("Accounts")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}

View File

@ -20,13 +20,12 @@ erpnext.stock.StockController = wn.ui.form.Controller.extend({
show_stock_ledger: function() {
var me = this;
this.frm.add_custom_button("Show Stock Ledger", function() {
var args = {
voucher_no: cur_frm.doc.name,
from_date: wn.datetime.str_to_user(cur_frm.doc.posting_date),
to_date: wn.datetime.str_to_user(cur_frm.doc.posting_date)
wn.route_options = {
voucher_no: me.frm.doc.name,
from_date: cur_frm.doc.posting_date,
to_date: cur_frm.doc.posting_date
};
wn.set_route('stock-ledger',
$.map(args, function(val, key) { return key+"="+val; }).join("&&"));
wn.set_route('stock-ledger');
}, "icon-bar-chart");
}
});

View File

@ -22,10 +22,7 @@ wn.pages['stock-ledger'].onload = function(wrapper) {
});
new erpnext.StockLedger(wrapper);
wrapper.appframe.add_home_breadcrumb()
wrapper.appframe.add_module_icon("Stock")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
wn.require("app/js/stock_grid_report.js");