Patch level : 10.1048

Files correlati     : ve0.ve6.exe
Ricompilazione Demo : [ ]
Commento            :

Corretto il segno suil saldaconto in valuta le note di credito registrate come fatture


git-svn-id: svn://10.65.10.50/branches/R_10_00@22371 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2011-07-05 15:42:50 +00:00
parent f4d91b41a5
commit fbc795ba4a

View File

@ -2687,7 +2687,7 @@ error_type TContabilizzazione::write_scadenze(TDocumento& doc)
const real totdoc(head.get(MOV_TOTDOC));
const real totdocval(head.get(MOV_TOTDOCVAL));
const bool in_valuta = cambio.in_valuta();
const bool swapped = test_swap();
const bool swapped = !in_valuta && test_swap();
const TCurrency_documento td((in_valuta ? totdocval : totdoc) * (swapped ? -1 : 1), doc);
partita.put(PART_IMPTOTDOC, totdoc);
@ -2738,7 +2738,13 @@ error_type TContabilizzazione::write_scadenze(TDocumento& doc)
TCurrency val1(totdoc);
TCurrency_documento ant(anticipo.get_num(), doc);
ant.change_to_firm_val();
val1 -= ant + val2 + val3;
val1 -= ant + val2 + val3;
if (test_swap())
{
val1 = -val1;
val2 = -val2;
val3 = -val3;
}
// Cosi' corregge eventuali scompensi di poche lirette
pag.set_total_valuta(pagtotimponibili, pagtotimposte, pagtotspese, val1, val2, val3);
}