[fix] journal voucher to fetch company currency
This commit is contained in:
parent
fb6d410e60
commit
a7a06a77dd
@ -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');
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user