Correzione MI3571, relativa alla stampa scaduto nel caso in cui
si inserisca prima l'incasso e poi la fattura. git-svn-id: svn://10.65.10.50/trunk@4265 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
633cf6d5c6
commit
5e9f4971ca
@ -221,11 +221,12 @@ void TStampaScaduto::compute_all(TPartita& p)
|
||||
if (_tipost == fornitori) norm = 'A';
|
||||
pag.normalize((norm=='D') ? 'A' : 'D'); scd.normalize(norm); bf.normalize((norm=='D') ? 'A' : 'D');
|
||||
real res,a,b; a = pag.valore(); b = scd.valore(); buonf += bf.valore();
|
||||
if (_uns > 0.0) // Rettifica i pagamenti con i non assegnati
|
||||
res = b - a;
|
||||
if (_uns > 0.0) // Rettifica i pagamenti con i non assegnati (calcolo sul residuo: scadenza-pagamento)
|
||||
{
|
||||
real gap = (_uns > a ? a : _uns);
|
||||
real gap = (_uns > res ? res : _uns); // questo e' quanto manca per completare questa scadenza
|
||||
a += gap;
|
||||
_uns -= gap;
|
||||
_uns -= gap; // aggiorna la cache..
|
||||
}
|
||||
if (_unsnc > 0.0) // Rettifica le scadenze con le N.C non assegnate.
|
||||
{
|
||||
@ -425,8 +426,8 @@ bool TStampaScaduto::preprocess_page(int file, int counter)
|
||||
|
||||
// Se c'e' qualcosa da stampare (ovvero almeno un importo non nullo)
|
||||
const bool to_print = !_residuo.empty() || !_nonscad.empty() || !_sc_1.empty() || !_sc_2.empty() ||
|
||||
!_sc_3.empty() || !_sc_4.empty() || !_sc_5.empty() || !_sc_6.empty() || !_sc_7.empty() ||
|
||||
(_tipost == clienti && !_buonfin.empty());
|
||||
!_sc_3.empty() || !_sc_4.empty() || !_sc_5.empty() || !_sc_6.empty() || !_sc_7.empty() ||
|
||||
(_tipost == clienti && !_buonfin.empty());
|
||||
if (to_print)
|
||||
{
|
||||
if (curr.get_int(PART_NRIGA) == 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user