~argilsoft/+junk/mexico-localization-7.0

« back to all changes in this revision

Viewing changes to l10n_mx_diot_report/wizard/wizard_diot_report.py

  • Committer: Israel CA
  • Date: 2015-12-17 22:04:51 UTC
  • Revision ID: israel.cruz.argil@gmail.com-20151217220451-rnc16u3yeq7xml5m
Diot Fix - IVA 11%

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
                category = line.tax_id_secondary.tax_category_id.name or False
155
155
                amount_base = line.tax_id_secondary.amount or 0
156
156
                line_diot = False
157
 
                if (category == 'IVA' and amount_base in [0.16, 0.11, 0]) or\
 
157
                if (category == 'IVA' and amount_base in [0.16, 0]) or\
158
158
                    (category == 'IVA-EXENTO' and amount_base == 0) or category == 'IVA-RET':
159
159
                    line_diot = True
160
160
                if category in ('IVA', 'IVA-PART') and amount_base == 0.16 or\
161
161
                    line.tax_id_secondary.tax_diot == 'tax_16' and line_diot == False:
162
162
                    amount_16 = amount_base_tax or 0
163
 
                if category == 'IVA' and amount_base == 0.11 or\
164
 
                    line.tax_id_secondary.tax_diot == 'tax_11' and line_diot == False:
165
 
                    amount_11 = amount_base_tax or 0
 
163
                #if category == 'IVA' and amount_base == 0.11 or\
 
164
                #    line.tax_id_secondary.tax_diot == 'tax_11' and line_diot == False:
 
165
                #    amount_11 = amount_base_tax or 0
166
166
                if category == 'IVA' and amount_base == 0 or\
167
167
                    line.tax_id_secondary.tax_diot == 'tax_0' and line_diot == False:
168
168
                    amount_0 = amount_base_tax or 0
338
338
            'VAT for returns, discounts and rebates on purchases' : ' IVA correspondiente a las devoluciones, descuentos y bonificaciones'
339
339
            })
340
340
        sum_dic = {'type_of_third': '', 'value_of_acts_or_activities_paid_at_the_rate_of_16%' : 0,
341
 
            'value_of_acts_or_activities_paid_at_the_rate_of_11%_VAT' : 0,
 
341
            #'value_of_acts_or_activities_paid_at_the_rate_of_11%_VAT' : 0,
342
342
            'value_of_the_other_acts_or_activities_paid_at_the_rate_of_0%_VAT' : 0,
343
343
            'value_of_acts_or_activities_paid_by_those_who_do_not_pay_the_VAT_(Exempt)' : 0,
344
344
            'tax Withheld by the taxpayer' : 0}
363
363
               'tax Withheld by the taxpayer': int(round((values_diot[11]), 0)),
364
364
               })
365
365
            sum_dic.update({'value_of_acts_or_activities_paid_at_the_rate_of_16%' : sum_dic['value_of_acts_or_activities_paid_at_the_rate_of_16%'] + int(round((values_diot[7]), 0)),
366
 
                'value_of_acts_or_activities_paid_at_the_rate_of_11%_VAT' : sum_dic['value_of_acts_or_activities_paid_at_the_rate_of_11%_VAT'] + int(round((values_diot[8]), 0)),
 
366
                #'value_of_acts_or_activities_paid_at_the_rate_of_11%_VAT' : sum_dic['value_of_acts_or_activities_paid_at_the_rate_of_11%_VAT'] + int(round((values_diot[8]), 0)),
367
367
                'value_of_the_other_acts_or_activities_paid_at_the_rate_of_0%_VAT' : sum_dic['value_of_the_other_acts_or_activities_paid_at_the_rate_of_0%_VAT'] + int(round((values_diot[9]), 0)),
368
368
                'value_of_acts_or_activities_paid_by_those_who_do_not_pay_the_VAT_(Exempt)' : sum_dic['value_of_acts_or_activities_paid_by_those_who_do_not_pay_the_VAT_(Exempt)'] + int(round((values_diot[10]), 0)),
369
369
                'tax Withheld by the taxpayer' : sum_dic['tax Withheld by the taxpayer'] + int(round((values_diot[11]), 0)),
378
378
               'nationality': values_diot[6],
379
379
               'value_of_acts_or_activities_paid_at_the_rate_of_16%': int(
380
380
               round((values_diot[7]), 0)),
381
 
               'value_of_acts_or_activities_paid_at_the_rate_of_11%_VAT': int(
382
 
               round((values_diot[8]), 0)),
 
381
               #'value_of_acts_or_activities_paid_at_the_rate_of_11%_VAT': int(
 
382
               #round((values_diot[8]), 0)),
383
383
               'value_of_the_other_acts_or_activities_paid_at_the_rate_of'
384
384
               '_0%_VAT': int(round((values_diot[9]), 0)),
385
385
               'value_of_acts_or_activities_paid_by_those_who_do_not_pay_the'