~dmesoluciones/+junk/sacsa_contract

« back to all changes in this revision

Viewing changes to report/account_voucher.py

  • Committer: Jorge Medina
  • Date: 2019-06-25 23:49:26 UTC
  • Revision ID: jorge.medina@dmesoluciones.com-20190625234926-dsd0zjoe7vo11yc5
ciudad estado, correccion campos

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
        })
47
47
 
48
48
    def _get_date_to_text(self, date):
49
 
        MES=["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"]
 
49
        MES=["ENERO", "FEBRERO", "MARZO", "ABRIL", "MAYO", "JUNIO", "JULIO", "AGOSTO", "SEPTIEMBRE", "OCTUBRE", "NOVIEMBRE", "DICIEMBRE"]
50
50
        dates = str(date).split('/')
51
51
        if len(dates) > 1:
52
52
            m = int(dates[1])
53
 
            return dates[0] + " de " + str(MES[m-1]) + " de " + dates[2]
 
53
            return dates[0] + " DE " + str(MES[m-1]) + " DE " + dates[2]
54
54
        else:
55
55
            dates = str(date).split('-')
56
56
            m = int(dates[1])
57
 
            return dates[2] + " de " + str(MES[m-1]) + " de " + dates[0]
 
57
            return dates[2] + " DE " + str(MES[m-1]) + " DE " + dates[0]
58
58
 
59
59
    def _convert_to_words(self, voucher):
60
60
        return amount_to_text_es_MX.get_amount_to_text(self, voucher.amount, 'es_cheque', "MXN")