[fix] journal voucher to fetch company currency

This commit is contained in:
Akhilesh Darjee 2013-09-12 13:59:06 +05:30
parent fb6d410e60
commit a7a06a77dd
2 changed files with 5 additions and 1 deletions

View File

@ -79,6 +79,10 @@ cur_frm.cscript.refresh = function(doc) {
} }
} }
cur_frm.cscript.company = function(doc, cdt, cdn) {
cur_frm.refresh_fields();
}
cur_frm.cscript.is_opening = function(doc, cdt, cdn) { cur_frm.cscript.is_opening = function(doc, cdt, cdn) {
hide_field('aging_date'); hide_field('aging_date');
if (doc.is_opening == 'Yes') unhide_field('aging_date'); if (doc.is_opening == 'Yes') unhide_field('aging_date');

View File

@ -178,7 +178,7 @@ class DocType(AccountsController):
if account_type == 'Bank or Cash': if account_type == 'Bank or Cash':
company_currency = get_company_currency(self.doc.company) company_currency = get_company_currency(self.doc.company)
amt = flt(d.debit) and d.debit or d.credit amt = flt(d.debit) and d.debit or d.credit
self.doc.total_amount = company_currency +' '+ cstr(amt) self.doc.total_amount = company_currency + ' ' + cstr(amt)
from webnotes.utils import money_in_words from webnotes.utils import money_in_words
self.doc.total_amount_in_words = money_in_words(amt, company_currency) self.doc.total_amount_in_words = money_in_words(amt, company_currency)