From e151c787686e9243ce4ab558b3834ff6ae9fca1e Mon Sep 17 00:00:00 2001 From: angelo Date: Mon, 30 Dec 1996 09:53:17 +0000 Subject: [PATCH] Correzione MI3531, relativo all'arrotondamento degli importi corrispettivi misti. git-svn-id: svn://10.65.10.50/trunk@4033 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg4304.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cg/cg4304.cpp b/cg/cg4304.cpp index c5e027ed9..85309626b 100755 --- a/cg/cg4304.cpp +++ b/cg/cg4304.cpp @@ -387,8 +387,6 @@ void TLiquidazione_app::describe_viaggio(int month, const char* codatt) // credito di costo precedente (CHECK annuale) d->_r8 = credito_costo_prec(month); - d->_r7 = (d->_r4 * CENTO)/(d->_r4 + d->_r6); d->_r7.round(2); // percentuale - d->_r9 = (d->_r1 * d->_r7)/CENTO; // Solita minchiatina dell'arrotondamento alle 1000 lirette se siamo in annuale if (month == 13) { @@ -400,10 +398,16 @@ void TLiquidazione_app::describe_viaggio(int month, const char* codatt) d->_r5.round(ROUND_MILLELIRE); d->_r6.round(ROUND_MILLELIRE); d->_r8.round(ROUND_MILLELIRE); - d->_r9.round(ROUND_MILLELIRE); } + + d->_r7 = (d->_r4 * CENTO)/(d->_r4 + d->_r6); d->_r7.round(2); // percentuale + d->_r9 = (d->_r1 * d->_r7)/CENTO; + + if (month==13) + d->_r9.round(ROUND_MILLELIRE); else d->_r9.round(ROUND_LIRA); + // Calcola l'iva a debito, visto che servira' anche nel calcolo liquidazione (solo annuale) const real aliva = aliquota_agvia(); const real alcnt = aliva + CENTO;