Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
c09831f8f2
@ -177,8 +177,13 @@ cur_frm.cscript.allocated_amount = function(doc,cdt,cdn) {
|
||||
|
||||
|
||||
cur_frm.cscript.make_bank_voucher = function() {
|
||||
$c('accounts.get_default_bank_account', { company: cur_frm.doc.company }, function(r, rt) {
|
||||
if(!r.exc) {
|
||||
wn.call({
|
||||
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);
|
||||
}
|
||||
});
|
||||
@ -289,8 +294,9 @@ cur_frm.cscript.make_jv = function(doc, dt, dn, bank_account) {
|
||||
|
||||
// credit to bank
|
||||
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.balance = bank_account.balance;
|
||||
|
||||
loaddoc('Journal Voucher', jv.name);
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ erpnext.AccountsChart = Class.extend({
|
||||
rename: function() {
|
||||
var node = this.selected_node();
|
||||
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() {
|
||||
|
@ -77,14 +77,10 @@ for r in res:
|
||||
r.append(net_total)
|
||||
|
||||
#Get tax for account heads
|
||||
acc_head_tax = sql("""select account_head, sum(tax_amount)
|
||||
from `tabPurchase Taxes and Charges`
|
||||
where parent = '%s'
|
||||
and parenttype = 'Purchase Invoice'
|
||||
and add_deduct_tax = 'Add'
|
||||
and category in ('Total', 'Valuation and Total')
|
||||
group by account_head
|
||||
""" %(r[col_idx['ID']],))
|
||||
acc_head_tax = sql("""select account_head,
|
||||
sum(if(add_deduct_tax='Add', tax_amount, -tax_amount))
|
||||
from `tabPurchase Taxes and Charges` where parent = %s and parenttype = 'Purchase Invoice'
|
||||
and category in ('Total', 'Valuation and Total') group by account_head""", r[col_idx['ID']])
|
||||
|
||||
#Convert the result to dictionary for easy retrieval
|
||||
acc_head_tax_dict = {}
|
||||
|
@ -76,9 +76,13 @@ div.web-footer, div.web-footer a {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
{% if doc.top_bar_background == doc.page_background %}.navbar-inner {
|
||||
border-bottom: 1px solid #{{ get_hex_shade(doc.page_background or "ffffff", 15) }};
|
||||
}{% endif %}
|
||||
.navbar-inner {
|
||||
border-bottom: 1px solid {% if doc.top_bar_background == doc.page_background -%}
|
||||
#{{ get_hex_shade(doc.page_background or "ffffff", 15) }};
|
||||
{%- else -%}
|
||||
transparent;
|
||||
{%- endif %}
|
||||
}
|
||||
|
||||
.navbar-inverse .brand,
|
||||
.navbar-inverse .brand:hover,
|
||||
|
Loading…
x
Reference in New Issue
Block a user