Default currency for company fixed
diff --git a/accounts/doctype/form_16a/form_16a.py b/accounts/doctype/form_16a/form_16a.py
index 66880ed..7d569b7 100644
--- a/accounts/doctype/form_16a/form_16a.py
+++ b/accounts/doctype/form_16a/form_16a.py
@@ -15,9 +15,9 @@
 convert_to_lists = webnotes.conn.convert_to_lists
 	
 # -----------------------------------------------------------------------------------------
+from utilities.transaction_base import TransactionBase
 
-
-class DocType:
+class DocType(TransactionBase):
   def __init__(self,d,dl):
     self.doc, self.doclist = d, dl
   
@@ -97,5 +97,6 @@
     for d in getlist(self.doclist,'form_16A_tax_details'):
       tot=flt(tot)+flt(d.total_tax_deposited)
     
-    self.doc.total_amount = flt(tot)
-    self.doc.in_words = get_obj('Sales Common').get_total_in_words(get_defaults()['currency'], self.doc.total_amount)
+    dcc = TransactionBase().get_company_currency(self.doc.company)
+    self.doc.total_amount = flt(tot)    
+    self.doc.in_words = get_obj('Sales Common').get_total_in_words(dcc, self.doc.total_amount)
diff --git a/accounts/doctype/gl_control/gl_control.py b/accounts/doctype/gl_control/gl_control.py
index 2a862ed..d88b618 100644
--- a/accounts/doctype/gl_control/gl_control.py
+++ b/accounts/doctype/gl_control/gl_control.py
@@ -15,7 +15,7 @@
 convert_to_lists = webnotes.conn.convert_to_lists
 	
 # -----------------------------------------------------------------------------------------
-
+from utilities.transaction_base import TransactionBase
 
 class DocType:
   def __init__(self,d,dl):
@@ -34,9 +34,9 @@
     #  pl[r[0]] = flt(flt(inc) - flt(exp))    
     return {'cl':[r[0] for r in ret]}#, 'pl':pl}
     
-  def get_company_currency(self,arg=''):  
-    ret = sql("select default_currency from tabCompany where name=%s and docstatus != 2", arg)    
-    return ret[0]
+  def get_company_currency(self,arg=''):      
+    dcc = TransactionBase().get_company_currency(arg)    
+    return dcc
 
   # Get current balance
   # --------------------
diff --git a/accounts/doctype/journal_voucher/journal_voucher.py b/accounts/doctype/journal_voucher/journal_voucher.py
index cb10555..4f5e67a 100644
--- a/accounts/doctype/journal_voucher/journal_voucher.py
+++ b/accounts/doctype/journal_voucher/journal_voucher.py
@@ -15,7 +15,7 @@
 convert_to_lists = webnotes.conn.convert_to_lists
 	
 # -----------------------------------------------------------------------------------------
-
+from utilities.transaction_base import TransactionBase
 
 class DocType:
   def __init__(self,d,dl):
@@ -238,7 +238,7 @@
       if self.doc.total_debit > 0:
         self.get_tds_category_account()
         if self.doc.supplier_account and self.doc.tds_category:
-          get_obj('TDS Control').get_tds_amount(self)
+          get_obj('TDS Control').get_tds_amount(self)          
 
         
   #--------------------------------------------------------------------------------------------------------
@@ -333,6 +333,7 @@
   # ------------------------
   def set_print_format_fields(self):
     for d in getlist(self.doclist, 'entries'):
+      #msgprint(self.doc.company)
       chk_type = sql("select master_type, account_type from `tabAccount` where name='%s'" % d.account)
       master_type, acc_type = chk_type and cstr(chk_type[0][0]) or '', chk_type and cstr(chk_type[0][1]) or ''
       if master_type in ['Supplier', 'Customer']:
@@ -340,9 +341,10 @@
           self.doc.pay_to_recd_from = get_value(master_type, ' - '.join(d.account.split(' - ')[:-1]), master_type == 'Customer' and 'customer_name' or 'supplier_name')
       
       if acc_type == 'Bank or Cash':
-        amt = cint(d.debit) and d.debit or d.credit
-        self.doc.total_amount = get_defaults()['currency']+'. '+ cstr(amt)
-        self.doc.total_amount_in_words = get_obj('Sales Common').get_total_in_words(get_defaults()['currency'], cstr(amt))
+        dcc = TransactionBase().get_company_currency(self.doc.company)
+        amt = cint(d.debit) and d.debit or d.credit	
+        self.doc.total_amount = dcc +' '+ cstr(amt)
+        self.doc.total_amount_in_words = get_obj('Sales Common').get_total_in_words(dcc, cstr(amt))
 
 
   # --------------------------------
diff --git a/accounts/doctype/receivable_voucher/receivable_voucher.py b/accounts/doctype/receivable_voucher/receivable_voucher.py
index c12c390..6fac40d 100644
--- a/accounts/doctype/receivable_voucher/receivable_voucher.py
+++ b/accounts/doctype/receivable_voucher/receivable_voucher.py
@@ -311,7 +311,8 @@
 	# Set totals in words
 	#--------------------
 	def set_in_words(self):
-		self.doc.in_words = get_obj('Sales Common').get_total_in_words(get_defaults()['currency'], self.doc.rounded_total)
+		dcc = TransactionBase().get_company_currency(self.doc.company)
+		self.doc.in_words = get_obj('Sales Common').get_total_in_words(dcc, self.doc.rounded_total)
 		self.doc.in_words_export = get_obj('Sales Common').get_total_in_words(self.doc.currency, self.doc.rounded_total_export)
 
 	# Clear Advances
diff --git a/accounts/page/accounts_browser/accounts_browser.js b/accounts/page/accounts_browser/accounts_browser.js
index 1cca1e1..38acfc9 100644
--- a/accounts/page/accounts_browser/accounts_browser.js
+++ b/accounts/page/accounts_browser/accounts_browser.js
@@ -210,7 +210,7 @@
 	  }
 	  $c_obj('GL Control', 'get_company_currency', pscript.ab_company_sel.value, callback);	  	        
 	  
-      d.balance.innerHTML = (dcc ? dcc : sys_defaults.currency)+ ' ' + (r.balance ? fmt_money(r.balance) :'0.00');
+      d.balance.innerHTML = (dcc)+ ' ' + (r.balance ? fmt_money(r.balance) :'0.00');
     }
     //cost center group/ledger area
     else{
diff --git a/crm/doctype/quotation/quotation.py b/crm/doctype/quotation/quotation.py
index caa0430..aed868e 100644
--- a/crm/doctype/quotation/quotation.py
+++ b/crm/doctype/quotation/quotation.py
@@ -207,7 +207,8 @@
     sales_com_obj.check_conversion_rate(self)
     
     # Get total in words
-    self.doc.in_words = sales_com_obj.get_total_in_words(get_defaults()['currency'], self.doc.rounded_total)
+    dcc = TransactionBase().get_company_currency(self.doc.company)
+    self.doc.in_words = sales_com_obj.get_total_in_words(dcc, self.doc.rounded_total)
     self.doc.in_words_export = sales_com_obj.get_total_in_words(self.doc.currency, self.doc.rounded_total_export)
 
   def on_update(self):
diff --git a/crm/doctype/sales_order/sales_order.py b/crm/doctype/sales_order/sales_order.py
index e1e15f1..11842fb 100644
--- a/crm/doctype/sales_order/sales_order.py
+++ b/crm/doctype/sales_order/sales_order.py
@@ -305,7 +305,8 @@
     sales_com_obj.make_packing_list(self,'sales_order_details')
     
         # get total in words
-    self.doc.in_words = sales_com_obj.get_total_in_words(get_defaults()['currency'], self.doc.rounded_total)
+    dcc = TransactionBase().get_company_currency(self.doc.company)    
+    self.doc.in_words = sales_com_obj.get_total_in_words(dcc, self.doc.rounded_total)
     self.doc.in_words_export = sales_com_obj.get_total_in_words(self.doc.currency, self.doc.rounded_total_export)
     
     # set SO status
diff --git a/material_management/doctype/delivery_note/delivery_note.py b/material_management/doctype/delivery_note/delivery_note.py
index b223da4..74e6f8a 100644
--- a/material_management/doctype/delivery_note/delivery_note.py
+++ b/material_management/doctype/delivery_note/delivery_note.py
@@ -175,7 +175,8 @@
     sales_com_obj.get_allocated_sum(self)  # this is to verify that the allocated % of sales persons is 100%    
     sales_com_obj.check_conversion_rate(self)
     # ::::::: Get total in Words ::::::::
-    self.doc.in_words = sales_com_obj.get_total_in_words(get_defaults()['currency'], self.doc.rounded_total)
+    dcc = TransactionBase().get_company_currency(self.doc.company)
+    self.doc.in_words = sales_com_obj.get_total_in_words(dcc, self.doc.rounded_total)
     self.doc.in_words_export = sales_com_obj.get_total_in_words(self.doc.currency, self.doc.rounded_total_export)
     
     # ::::::: Set actual qty for each item in selected warehouse :::::::
diff --git a/payroll/doctype/salary_slip/salary_slip.py b/payroll/doctype/salary_slip/salary_slip.py
index e952da2..9c94885 100644
--- a/payroll/doctype/salary_slip/salary_slip.py
+++ b/payroll/doctype/salary_slip/salary_slip.py
@@ -15,9 +15,9 @@
 convert_to_lists = webnotes.conn.convert_to_lists
 	
 # -----------------------------------------------------------------------------------------
+from utilities.transaction_base import TransactionBase
 
-
-class DocType:
+class DocType(TransactionBase):
   def __init__(self,doc,doclist=[]):
     self.doc = doc
     self.doclist = doclist
@@ -118,7 +118,8 @@
   #=======================================================
   def validate(self):
     self.check_existing()
-    self.doc.total_in_words  = get_obj('Sales Common').get_total_in_words(get_defaults()['currency'], self.doc.rounded_total)
+    dcc = TransactionBase().get_company_currency(self.doc.company)
+    self.doc.total_in_words  = get_obj('Sales Common').get_total_in_words(dcc, self.doc.rounded_total)
     
   # ON SUBMIT
   #=======================================================
diff --git a/settings/doctype/authorization_control/authorization_control.py b/settings/doctype/authorization_control/authorization_control.py
index 9e8186b..4036ecf 100644
--- a/settings/doctype/authorization_control/authorization_control.py
+++ b/settings/doctype/authorization_control/authorization_control.py
@@ -15,9 +15,9 @@
 convert_to_lists = webnotes.conn.convert_to_lists
 	
 # -----------------------------------------------------------------------------------------
+from utilities.transaction_base import TransactionBase
 
-
-class DocType:
+class DocType(TransactionBase):
   def __init__(self, d, dl):
     self.doc, self.doclist = d, dl
 
@@ -42,7 +42,8 @@
       if not has_common(appr_roles, webnotes.user.get_roles()) and not has_common(appr_users, session['user']):
         msg, add_msg = '',''
         if max_amount:
-          if based_on == 'Grand Total': msg = "since Grand Total exceeds %s. %s" % (get_defaults()['currency'], flt(max_amount))
+          dcc = TransactionBase().get_company_currency(self.doc.company)
+          if based_on == 'Grand Total': msg = "since Grand Total exceeds %s. %s" % (dcc, flt(max_amount))
           elif based_on == 'Itemwise Discount': msg = "since Discount exceeds %s for Item Code : %s" % (cstr(max_amount)+'%', item)
           elif based_on == 'Average Discount' or based_on == 'Customerwise Discount': msg = "since Discount exceeds %s" % (cstr(max_amount)+'%')
         
diff --git a/srm/doctype/purchase_order/purchase_order.py b/srm/doctype/purchase_order/purchase_order.py
index 7c02e65..7d9e1da 100644
--- a/srm/doctype/purchase_order/purchase_order.py
+++ b/srm/doctype/purchase_order/purchase_order.py
@@ -133,7 +133,8 @@
     
       
      # get total in words
-    self.doc.in_words = pc_obj.get_total_in_words(get_defaults().get('currency') and get_defaults()['currency'] or 'INR', self.doc.grand_total)
+    dcc = TransactionBase().get_company_currency(self.doc.company)
+    self.doc.in_words = pc_obj.get_total_in_words(dcc, self.doc.grand_total)
     self.doc.in_words_import = pc_obj.get_total_in_words(self.doc.currency, self.doc.grand_total_import)
   
   # update bin
diff --git a/utilities/transaction_base.py b/utilities/transaction_base.py
index e170700..332e201 100644
--- a/utilities/transaction_base.py
+++ b/utilities/transaction_base.py
@@ -1,5 +1,5 @@
 import webnotes
-from webnotes.utils import load_json, cint, cstr, flt
+from webnotes.utils import load_json, cint, cstr, flt, get_defaults
 from webnotes.model.doc import Document, addchild, removechild, getchildren
 from webnotes.model.doclist import getlist, copy_doclist
 from webnotes import msgprint
@@ -202,3 +202,10 @@
 			ch.incentives = d and flt(d[3]) or 0
 			ch.idx = idx
 			idx += 1
+			
+	# Get Company Specific Default Currency
+	# -------------------------------------
+	def get_company_currency(self, name):
+		ret = sql("select default_currency from tabCompany where name = '%s'" %(name))
+		dcc = ret and ret[0][0] or get_defaults()['currency']						
+		return dcc