Patch level :4.0 494
Files correlati : Ricompilazione Demo : [ ] Commento :controllo riga_uno migliorato git-svn-id: svn://10.65.10.50/trunk@14340 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
152d0924b5
commit
e41346408f
@ -178,17 +178,19 @@ bool TStampa_storico::stampa_primo_saldo(const int tipo)
|
||||
//..nient'altro
|
||||
const TRectype& recsalce = salce.curr();
|
||||
const int esercizio = recsalce.get_int(SALCE_CODES);
|
||||
const TDate& dataini = _esc[esercizio].inizio();
|
||||
const TDate& datainies = _esc[esercizio].inizio();
|
||||
const TDate& datafines = _esc[esercizio].fine();
|
||||
const int numele = recsalce.get_int("NUMELE");
|
||||
|
||||
TPrint_section& section1 = _form->get_rigauno(); //preparazione stampa riga dettaglio 1
|
||||
section1.reset_fields();
|
||||
const TDate dtcomp = cespite().get_date("DTCOMP");
|
||||
section1.reset();
|
||||
bool devo_stampare = false;
|
||||
|
||||
if ((dataini >= dtcomp && numele > 0) || (dataini == dtcomp && numele == 0)) //datasaldo >= data acquisto
|
||||
if ((datainies >= dtcomp && numele > 0) || (esercizio == _esc.date2esc(dtcomp) && numele == 0)) //datasaldo >= data acquisto
|
||||
{
|
||||
section1.find_field(FF_DATAUNO).set(dataini);
|
||||
section1.find_field(FF_DATAUNO).set(datainies);
|
||||
section1.find_field(FF_DESCRUNO).set(TR("Ripresa saldi"));
|
||||
section1.find_field(FF_NUMELEUNO).set(recsalce.get(SALCE_NUMELE));
|
||||
real sum = recsalce.get_real("CSTO");
|
||||
@ -215,10 +217,10 @@ bool TStampa_storico::stampa_primo_saldo(const int tipo)
|
||||
section1.find_field(FF_FONDIUNO).set(sum.string());
|
||||
devo_stampare |= sum != ZERO;
|
||||
}
|
||||
else // se dataini < data acquisto sono sbagliate le date
|
||||
else //cespite dopo l'esercizio selezionato ma che presenta un saldo precedente (improponibile)
|
||||
{
|
||||
section1.find_field(FF_DESCRUNO).set(TR("Data acquisto incongruente"));
|
||||
devo_stampare = true;
|
||||
section1.find_field(FF_DESCRUNO).set(TR("Data acq. errata"));
|
||||
devo_stampare = true;
|
||||
}
|
||||
|
||||
if (devo_stampare)
|
||||
@ -359,19 +361,20 @@ void TStampa_storico::print_percespite(const int tipo)
|
||||
|
||||
const int esercizio_finale = _mask->get_int(F_ESERCIZIO);
|
||||
const long pos = _form->cursor()->pos(); //memorizza posizione cursore
|
||||
|
||||
TRectype& recammmv = _form->cursor()->curr(LF_AMMMV); //scelta dei tipi ammort. su AMMMV
|
||||
|
||||
//scelta dei tipi ammort. su AMMMV
|
||||
TRectype& recammmv = _form->cursor()->curr(LF_AMMMV);
|
||||
bool continua = _form->cursor()->is_first_match(LF_AMMMV);
|
||||
while (recammmv.get_int("TPAMM") != tipo && continua)
|
||||
continua = _form->cursor()->next_match(LF_AMMMV);
|
||||
|
||||
|
||||
TPrint_section& sectot = _form->get_rigatot(); //resetta il totale elementi,valore,fondo amm.
|
||||
//resetta il totale elementi,valore,fondo amm.
|
||||
TPrint_section& sectot = _form->get_rigatot();
|
||||
sectot.find_field(FF_TOTELEM).set("");
|
||||
sectot.find_field(FF_TOTVALORE).set("");
|
||||
sectot.find_field(FF_TOTAMMO).set("");
|
||||
|
||||
TRectype& recmovce = _form->cursor()->curr(LF_MOVCE); // riga dettaglio 2
|
||||
TRectype& recmovce = _form->cursor()->curr(LF_MOVCE);
|
||||
TRelation& rel = *_form->relation();
|
||||
|
||||
//per prima cosa stampa il saldo iniziale primordiale
|
||||
|
Loading…
x
Reference in New Issue
Block a user