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

This commit is contained in:
Anand Doshi 2013-03-26 18:47:01 +05:30
commit c09831f8f2
4 changed files with 22 additions and 16 deletions

View File

@ -177,10 +177,15 @@ cur_frm.cscript.allocated_amount = function(doc,cdt,cdn) {
cur_frm.cscript.make_bank_voucher = function() { cur_frm.cscript.make_bank_voucher = function() {
$c('accounts.get_default_bank_account', { company: cur_frm.doc.company }, function(r, rt) { wn.call({
if(!r.exc) { method: "accounts.doctype.journal_voucher.journal_voucher.get_default_bank_cash_account",
args: {
"company": cur_frm.doc.company,
"voucher_type": "Bank Voucher"
},
callback: function(r) {
cur_frm.cscript.make_jv(cur_frm.doc, null, null, r.message); cur_frm.cscript.make_jv(cur_frm.doc, null, null, r.message);
} }
}); });
} }
@ -289,8 +294,9 @@ cur_frm.cscript.make_jv = function(doc, dt, dn, bank_account) {
// credit to bank // credit to bank
var d1 = wn.model.add_child(jv, 'Journal Voucher Detail', 'entries'); var d1 = wn.model.add_child(jv, 'Journal Voucher Detail', 'entries');
d1.account = bank_account; d1.account = bank_account.account;
d1.credit = doc.outstanding_amount; d1.credit = doc.outstanding_amount;
d1.balance = bank_account.balance;
loaddoc('Journal Voucher', jv.name); loaddoc('Journal Voucher', jv.name);
} }

View File

@ -159,7 +159,7 @@ erpnext.AccountsChart = Class.extend({
rename: function() { rename: function() {
var node = this.selected_node(); var node = this.selected_node();
wn.model.rename_doc(this.ctype, node.data('label'), function(new_name) { wn.model.rename_doc(this.ctype, node.data('label'), function(new_name) {
node.data('label', new_name).find(".tree-label").html(new_name); node.parents("ul:first").parent().find(".tree-link:first").trigger("reload");
}); });
}, },
delete: function() { delete: function() {

View File

@ -77,14 +77,10 @@ for r in res:
r.append(net_total) r.append(net_total)
#Get tax for account heads #Get tax for account heads
acc_head_tax = sql("""select account_head, sum(tax_amount) acc_head_tax = sql("""select account_head,
from `tabPurchase Taxes and Charges` sum(if(add_deduct_tax='Add', tax_amount, -tax_amount))
where parent = '%s' from `tabPurchase Taxes and Charges` where parent = %s and parenttype = 'Purchase Invoice'
and parenttype = 'Purchase Invoice' and category in ('Total', 'Valuation and Total') group by account_head""", r[col_idx['ID']])
and add_deduct_tax = 'Add'
and category in ('Total', 'Valuation and Total')
group by account_head
""" %(r[col_idx['ID']],))
#Convert the result to dictionary for easy retrieval #Convert the result to dictionary for easy retrieval
acc_head_tax_dict = {} acc_head_tax_dict = {}

View File

@ -76,9 +76,13 @@ div.web-footer, div.web-footer a {
box-shadow: none; box-shadow: none;
} }
{% if doc.top_bar_background == doc.page_background %}.navbar-inner { .navbar-inner {
border-bottom: 1px solid #{{ get_hex_shade(doc.page_background or "ffffff", 15) }}; border-bottom: 1px solid {% if doc.top_bar_background == doc.page_background -%}
}{% endif %} #{{ get_hex_shade(doc.page_background or "ffffff", 15) }};
{%- else -%}
transparent;
{%- endif %}
}
.navbar-inverse .brand, .navbar-inverse .brand,
.navbar-inverse .brand:hover, .navbar-inverse .brand:hover,