def total_text(self,montant): devis = 'ARIARY' text=convertion.trad(montant,devis) #print inv_obj.name #res=inv_obj.write(self.cr, self.uid,self.id,{'printed':True}) #text=text[1:].capitalize() return text
def total_text(self, montant): devis = 'ARIARY' text = convertion.trad(montant, devis) #print inv_obj.name #res=inv_obj.write(self.cr, self.uid,self.id,{'printed':True}) #text=text[1:].capitalize() return text
def get_total(self, company_id, fiscalyear_id, trimester): all_lines = self._get_lines(company_id, fiscalyear_id, trimester) total_mois1 = total_mois2 = total_mois3 = salaire = ztotal_page = 0.0 for line in all_lines: total_mois1 += float(line['mois1'] or 0.0) total_mois2 += float(line['mois2'] or 0.0) total_mois3 += float(line['mois3'] or 0.0) salaire += float(line['total'] or 0.0) params_obj = self.pool.get('hr.payroll.parametres') ids_params = params_obj.search(self.cr, self.uid, [('fiscalyear_id', '=', fiscalyear_id)]) param = params_obj.read(self.cr, self.uid, ids_params[0]) cot_obj = self.pool.get('hr.payroll.cotisation') ids_cot = params_obj.search(self.cr, self.uid, []) cot = cot_obj.read(self.cr, self.uid, ids_cot[0]) taux_accident_travail = cot['tauxAT'] taux_securite_soc = cot['tauxsalarial'] + cot['tauxpatronal'] # taux_accident_travail='taux_accident_travail' in param.keys() and param['taux_accident_travail'] or 0.5 taux_cnss = 25.75 montant_accident_travail = salaire * taux_accident_travail / 100.0 montant_securite_soc = salaire * taux_securite_soc / 100.0 montant_total = montant_securite_soc + montant_accident_travail total_page = total_mois1 + total_mois2 + total_mois3 res = { 'total_mois1': total_mois1, 'total_mois2': total_mois2, 'total_mois3': total_mois3, 'total_page': total_page, 'salaire': salaire, 'taux_cnss': taux_cnss, 'taux_accident_travail': taux_accident_travail, 'taux_securite_soc': taux_securite_soc, 'total_taux': taux_cnss + taux_accident_travail, 'montant_accident_travail': montant_accident_travail, 'montant_securite_soc': montant_securite_soc, 'montant_total': montant_total, 'montant_total_text': convertion.trad(montant_total, 'Dinar'), 'montant_salaire_text': convertion.trad(salaire, 'Dinar') } # print '**res**',res return res
def get_total(self, company_id, fiscalyear_id, trimester): all_lines = self._get_lines(company_id, fiscalyear_id, trimester) total_mois1 = total_mois2 = total_mois3 = salaire = sub_total = 0.0 for line in all_lines: total_mois1 += float(line['mois1'] or 0.0) total_mois2 += float(line['mois2'] or 0.0) total_mois3 += float(line['mois3'] or 0.0) salaire += float(line['total'] or 0.0) params_obj = self.pool.get('hr.payroll.parametres') ids_params = params_obj.search(self.cr, self.uid, [('fiscalyear_id', '=', fiscalyear_id)]) param = params_obj.read(self.cr, self.uid, ids_params[0]) taux_accident_travail = 'taux_accident_travail' in param.keys( ) and param['taux_accident_travail'] or 0.5 cots_obj = self.pool.get('hr.payroll.cotisation') ids_cots = cots_obj.search(self.cr, self.uid, [('code', '=', 'CNSS')]) cortis = cots_obj.read(self.cr, self.uid, ids_cots[0]) taux_cotisation = 'tauxTotal' in cortis.keys( ) and cortis['tauxTotal'] or 25.0 taux_cnss = taux_cotisation montant_accident_travail = salaire * taux_accident_travail / 100.0 montant_cnss = salaire * taux_cnss / 100.0 montant_total = montant_cnss + montant_accident_travail res = { 'total_mois1': total_mois1, 'total_mois2': total_mois2, 'total_mois3': total_mois3, 'salaire': salaire, 'taux_cnss': taux_cnss, 'taux_accident_travail': taux_accident_travail, 'taux_cotisation': taux_cotisation, 'total_taux': taux_cnss + taux_accident_travail, 'montant_cnss': montant_cnss, 'montant_accident_travail': montant_accident_travail, 'montant_total': montant_total, 'montant_total_text': convertion.trad(montant_total, 'Dinar') } return res
def _amount_to_text(self, montant): devis = 'Dinar' return convertion.trad(montant, devis)
def total_text(self, montant): devis = 'Dirham' return convertion.trad(montant, devis)
def total_text(self,montant): devis = 'Ariary' return convertion.trad(montant, devis)
def get_amount_letter(self): amount = convertion.trad(self.amount_total, 'DH') return amount
def get_amount_letter(self): amount = convertion.trad(self.amount_total,'DH') amount = amount + ' TTC' return amount
def get_amount_letter(self): amount = convertion.trad(self.tarif_a_payer, 'Dinar') return amount
def get_amount_letter(self): amount = convertion.trad(int(self.amount_total), '') return amount
def get_tax_amount_letter(self): amount = convertion.trad(int(self.taxAmount), '') return amount
def total_text(self, montant, devise=False): devis = devise text = convertion.trad(montant, devis) #text=text[1:].capitalize() return text
def total_text(self, montant): devis = "Ariary" text = convertion.trad(montant, devis) # text=text[1:].capitalize() return text
def total_text(self, montant): devis = 'Ariary' text = convertion.trad(montant, devis) #text=text[1:].capitalize() return text
def get_reste_payer_letter(self): amount = convertion.trad(self.reste_a_payer, 'Dinar') return amount
def total_text(self, montant): devis = 'AR' print montant text = convertion.trad(montant, devis) return text
def get_amount_letter(self): amount = convertion.trad(self.price, 'Dinar') return amount
def total_text(self, montant): devis = 'Ariary' return convertion.trad(montant, devis)
def total_text(self,montant): devis = 'Dirham' return convertion.trad(montant, devis)
def total_text(self, montant): devis = "AR" print montant text = convertion.trad(montant, devis) return text
def total_text(self,montant,devise=False): devis = devise text=convertion.trad(montant,devis) #text=text[1:].capitalize() return text