Merge lp:~inddiana/sisb/sisb_fix_configuracion_ctas_ret_municipal into lp:sisb

Proposed by [SISB] Aryrosa Fuentes
Status: Merged
Merged at revision: 989
Proposed branch: lp:~inddiana/sisb/sisb_fix_configuracion_ctas_ret_municipal
Merge into: lp:sisb
Diff against target: 43 lines (+4/-4)
2 files modified
l10n_ve_withholding_muni/model/invoice.py (+2/-2)
l10n_ve_withholding_muni/model/wh_muni.py (+2/-2)
To merge this branch: bzr merge lp:~inddiana/sisb/sisb_fix_configuracion_ctas_ret_municipal
Reviewer Review Type Date Requested Status
Juan Lugo Pending
Review via email: mp+341900@code.launchpad.net

Description of the change

[FIX] Ajuste en la creacion del asiento contable de la retencion municipal cuando es factura o nota de credito.

To post a comment you must log in.
989. By [SISB] Aryrosa Fuentes

[FIX] Ajuste en la creacion del asiento contable de la retencion municipal cuando es factura o nota de credito.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_ve_withholding_muni/model/invoice.py'
2--- l10n_ve_withholding_muni/model/invoice.py 2013-05-02 20:32:39 +0000
3+++ l10n_ve_withholding_muni/model/invoice.py 2018-03-22 13:27:26 +0000
4@@ -104,7 +104,7 @@
5 direction = types[invoice.type]
6
7 for tax_brw in to_wh:
8- if types[invoice.type]==1:
9+ if invoice.type in ('in_invoice','in_refund'):
10 acc = tax_brw.wh_id.company_id.wh_muni_collected_account_id and tax_brw.wh_id.company_id.wh_muni_collected_account_id.id or False
11 else:
12 acc = tax_brw.wh_id.company_id.wh_muni_paid_account_id and tax_brw.wh_id.company_id.wh_muni_paid_account_id.id or False
13@@ -120,7 +120,7 @@
14 'currency_id': False,
15 'name':name
16 }))
17-
18+
19 return res
20
21 account_invoice()
22
23=== modified file 'l10n_ve_withholding_muni/model/wh_muni.py'
24--- l10n_ve_withholding_muni/model/wh_muni.py 2013-08-07 19:29:16 +0000
25+++ l10n_ve_withholding_muni/model/wh_muni.py 2018-03-22 13:27:26 +0000
26@@ -348,7 +348,7 @@
27
28 ]
29
30- def onchange_invoice_id(self, cr, uid, ids, type, invoice_id=False,base_amount=0.0,wh_muni_rate=10.0,context=None):
31+ def onchange_invoice_id(self, cr, uid, ids, type, invoice_id=False,base_amount=0.0,wh_muni_rate=0.10,context=None):
32 if context is None: context = {}
33 res = {}
34 inv_obj = self.pool.get('account.invoice')
35@@ -364,7 +364,7 @@
36
37 inv_brw = inv_obj.browse(cr, uid, invoice_id)
38 base_amount = base_amount or inv_brw.amount_untaxed
39- wh_muni_rate = wh_muni_rate or inv_brw.wh_muni_rate or 10.0
40+ wh_muni_rate = wh_muni_rate or inv_brw.wh_muni_rate or 0.10
41 wh_amount = base_amount * wh_muni_rate/100.0
42 inv_ref = inv_brw.reference or ''
43 res = {'value': {

Subscribers

People subscribed via source and target branches