Merge lp:~a-camilli/openobject-italia/7.0-fix-deductible_vat_qty into lp:~openobject-italia-core-devs/openobject-italia/italian-addons-7.0

Proposed by Alessandro Camilli
Status: Needs review
Proposed branch: lp:~a-camilli/openobject-italia/7.0-fix-deductible_vat_qty
Merge into: lp:~openobject-italia-core-devs/openobject-italia/italian-addons-7.0
Diff against target: 13 lines (+2/-2)
1 file modified
l10n_it_partially_deductible_vat/account.py (+2/-2)
To merge this branch: bzr merge lp:~a-camilli/openobject-italia/7.0-fix-deductible_vat_qty
Reviewer Review Type Date Requested Status
Lorenzo Battistini Needs Information
Review via email: mp+193733@code.launchpad.net

Description of the change

Correzione x errato calcolo iva detraibile nel caso in cui sulla riga della fattura la qta sia maggiore di 1

To post a comment you must log in.
Revision history for this message
Lorenzo Battistini (elbati) wrote :

Ciao Alessandro,
non sarebbe meglio fare la divisione per la quantità direttamente nelle righe dove vengono calcolati 'base_ind' e 'base_ded' (91, 92)?
In questo modo l'arrotondamento viene fatto una volta sola da 'Decimal'

review: Needs Information
Revision history for this message
Alessandro Camilli (a-camilli) wrote :

se facciamo così, allora cambierei le variabili da:
base_ind a price_ind
e
base_ded a price_ded

Revision history for this message
Lorenzo Battistini (elbati) wrote :

On 11/06/2013 07:58 AM, Alessandro Camilli wrote:
> se facciamo così, allora cambierei le variabili da:
> base_ind a price_ind
> e
> base_ded a price_ded
>

Se ricordo bene si chiamano 'base' perchè si tratta di imponibili.
Comunque se è più chiaro va bene anche price.

Revision history for this message
Lorenzo Battistini (elbati) wrote :

This project is now hosted on https://github.com/OCA/l10n-italy. Please move your proposal there. This guide may help you https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub

Unmerged revisions

226. By Alessandro Camilli

correzione iva detraibile con qta diversa da 1 su riga fattura

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_it_partially_deductible_vat/account.py'
2--- l10n_it_partially_deductible_vat/account.py 2013-05-23 16:55:09 +0000
3+++ l10n_it_partially_deductible_vat/account.py 2013-11-04 07:07:12 +0000
4@@ -91,8 +91,8 @@
5 base_ind = float(Decimal(str(totalex * ind_tax_obj.amount)).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP))
6 base_ded = float(Decimal(str(totalex - base_ind)).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP))
7 tax_total = float(Decimal(str(tax['balance'])).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP))
8- ind_tax['price_unit'] = base_ind
9- tax['price_unit'] = base_ded
10+ ind_tax['price_unit'] = round(base_ind/quantity, self.pool.get('decimal.precision').precision_get(cr, uid, 'Product Price'))
11+ tax['price_unit'] = round(base_ded/quantity, self.pool.get('decimal.precision').precision_get(cr, uid, 'Product Price'))
12
13 return res
14

Subscribers

People subscribed via source and target branches