Patch level : 12.0 928
Files correlati : cg1.3x3 cg1500a.msk cg1600a.msk Commento : - Stampa Bilancio IV Direttiva CEE con movimenti provvisori. - Stampa bilanci senza apertura definitiva (Segnalazione Cosea)
This commit is contained in:
parent
d8246ee2f5
commit
3b7abf5cd6
@ -858,11 +858,13 @@ bool TStampa_bilanci::bil_sez_contr()
|
||||
for (_pcn->first(); !_pcn->eof(); _pcn->next())
|
||||
{
|
||||
_prog->addstatus(1);
|
||||
|
||||
|
||||
g = _pcn->get_int (PCN_GRUPPO);
|
||||
c = _pcn->get_int (PCN_CONTO);
|
||||
s = _pcn->get_long(PCN_SOTTOCONTO);
|
||||
|
||||
if (c != _cp)
|
||||
|
||||
if (c != _cp)
|
||||
cambiato = TRUE;
|
||||
|
||||
if ( (((_cp != -1) && (c != _cp)) || ((_gp != -1) && (g != _gp))) &&
|
||||
@ -1750,15 +1752,8 @@ bool TStampa_bilanci::calcola(int g, int c, long s)
|
||||
data = rmov.get_date(RMV_DATAREG);
|
||||
num_reg = rmov.get_long(RMV_NUMREG);
|
||||
|
||||
const char provvis = mov.get_char(MOV_PROVVIS);
|
||||
const TString4 provvis = mov.get(MOV_PROVVIS);
|
||||
const TDate datacomp = mov.get_date(MOV_DATACOMP);
|
||||
|
||||
if (_stampa_mov_prov == 0x1 && provvis != '\0') //bilancio normale (non comprende i provvisori)
|
||||
continue;
|
||||
|
||||
if (!(_stampa_mov_prov & 0x1) && provvis == '\0') //bilancio dei soli provvisori
|
||||
continue;
|
||||
|
||||
const TString& codcaus = mov.get(MOV_CODCAUS);
|
||||
const char causap = causali.decode(codcaus)[0];
|
||||
|
||||
@ -1782,47 +1777,53 @@ bool TStampa_bilanci::calcola(int g, int c, long s)
|
||||
continue;
|
||||
|
||||
//calcolo i movimenti del periodo
|
||||
if ( data_reg >= _datada && data_reg <= _dataa)
|
||||
if ( data_reg >= _datada && data_reg <= _dataa)
|
||||
if ((causap == 'A' && _dataini.ok() && _dataini != _datada) || (causap != 'A'))
|
||||
{
|
||||
conto_mov = TRUE;
|
||||
if (sezione == 'D')
|
||||
_mov_periodo_dare += importo;
|
||||
else
|
||||
_mov_periodo_avere += importo;
|
||||
_u_max = fnc_max(_u_max, data);
|
||||
if (causap == 'A')
|
||||
_mov_ap = TRUE;
|
||||
}
|
||||
if (((_stampa_mov_prov & 0x1) && provvis.blank()) ||
|
||||
((_stampa_mov_prov & 0x2) && ((provvis == "P") || (provvis == "N"))) ||
|
||||
((_stampa_mov_prov & 0x4) && (provvis == "B")) || ((_stampa_mov_prov & 0x8) && (provvis == "C")))
|
||||
{
|
||||
conto_mov = true;
|
||||
if (sezione == 'D')
|
||||
_mov_periodo_dare += importo;
|
||||
else
|
||||
_mov_periodo_avere += importo;
|
||||
_u_max = fnc_max(_u_max, data);
|
||||
if (causap == 'A')
|
||||
_mov_ap = true;
|
||||
}
|
||||
|
||||
//il saldo inizio es. e' dato dall'importo dare - importo avere di quei movimenti che hanno causale == apertura e data reg >= data inizio es. e <= data limite sup.
|
||||
if (_datada == _dataini) //calcolo il saldo iniziale
|
||||
{
|
||||
if (causap == 'A')
|
||||
if ((_stampa_mov_prov & 0x1) && (causap == 'A'))
|
||||
{
|
||||
if ( (data_reg >= _dataini) && (data_reg <= _dataa) )
|
||||
if ( (data_reg >= _dataini) && (data_reg <= _dataa) )
|
||||
{
|
||||
if (sezione == 'D')
|
||||
if (sezione == 'D')
|
||||
_saldo_ini_dare += importo;
|
||||
else
|
||||
_saldo_ini_avere += importo;
|
||||
_u_max = fnc_max(_u_max, data);
|
||||
conto_mov = _mov_ap = TRUE;
|
||||
conto_mov = _mov_ap = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (_datada > _dataini) //calcolo i progressivi precedenti
|
||||
if ( (data_reg >= data_start) && (data_reg < _datada) )
|
||||
{
|
||||
if (sezione == 'D')
|
||||
_prg_prec_dare += importo;
|
||||
else
|
||||
_prg_prec_avere += importo;
|
||||
_u_max = fnc_max(_u_max, data);
|
||||
conto_mov = TRUE;
|
||||
if (causap == 'A')
|
||||
_mov_ap = TRUE;
|
||||
}
|
||||
if (((_stampa_mov_prov & 0x1) && provvis.blank()) ||
|
||||
((_stampa_mov_prov & 0x2) && ((provvis == "P") || (provvis == "N"))) ||
|
||||
((_stampa_mov_prov & 0x4) && (provvis == "B")) || ((_stampa_mov_prov & 0x8) && (provvis == "C")))
|
||||
{
|
||||
if (sezione == 'D')
|
||||
_prg_prec_dare += importo;
|
||||
else
|
||||
_prg_prec_avere += importo;
|
||||
_u_max = fnc_max(_u_max, data);
|
||||
conto_mov = true;
|
||||
if (causap == 'A')
|
||||
_mov_ap = true;
|
||||
}
|
||||
}
|
||||
return conto_mov;
|
||||
}
|
||||
@ -1849,7 +1850,7 @@ bool TStampa_bilanci::ricerca_cf(int g,int c,char tipocf,int ib, real& saldo_fin
|
||||
if (_tipo_stampa1 == 1) //bil. di verifica per data limite
|
||||
{
|
||||
//modifica del 21/11/1995
|
||||
_mov_ap = FALSE;
|
||||
_mov_ap = false;
|
||||
//modifica del 19/06. Vedi appunti per capire
|
||||
bool movimentato = calcola(g,c,s);
|
||||
|
||||
@ -1903,7 +1904,19 @@ bool TStampa_bilanci::ricerca_cf(int g,int c,char tipocf,int ib, real& saldo_fin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if (_annoes != 0 && (ib == 1 || ib == 2 || ib == 5))
|
||||
{
|
||||
saldo_iniziale += sld.saldofin_esprec(_annoes, g, c, s, false, _stampa_mov_prov);
|
||||
//modifica del 21/11/1995
|
||||
if (saldo_iniziale > ZERO)
|
||||
_saldo_ini_dare = saldo_iniziale;
|
||||
else
|
||||
_saldo_ini_avere = -saldo_iniziale;
|
||||
//fine
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2168,10 +2181,10 @@ void TStampa_bilanci::riempi_record(char t,int g,int c,long s,
|
||||
{
|
||||
cli_for cf;
|
||||
cf.tipocf = t;
|
||||
sprintf(cf.gruppo, "%03d", g);
|
||||
sprintf(cf.conto, "%03d", c);
|
||||
sprintf(cf.codcf, "%06ld", s);
|
||||
sprintf(cf.ragsoc, "%s", rs);
|
||||
sprintf_s(cf.gruppo, "%03d", g);
|
||||
sprintf_s(cf.conto, "%03d", c);
|
||||
sprintf_s(cf.codcf, "%06ld", s);
|
||||
sprintf_s(cf.ragsoc, "%s", rs);
|
||||
if ( s == 999999L )
|
||||
{
|
||||
if ( (_datada == _dataini)||(_tipo_stampa1 != 1) )
|
||||
@ -2395,8 +2408,8 @@ void TStampa_bilanci::leggi_clifo(const TArray& gccf)
|
||||
}
|
||||
else //bilancio di verifica all'ultima immissione
|
||||
{
|
||||
_indbil = cerca_indbil(g,c);
|
||||
movimentato = sld.ultima_immissione_verifica(anno,g,c,codcf,_indbil,_stampa_mov_prov);
|
||||
_indbil = cerca_indbil(g,c);
|
||||
movimentato = sld.ultima_immissione_verifica(anno,g,c,codcf,_indbil,_stampa_mov_prov);
|
||||
|
||||
if (_stampa_mov_prov & 0x1)
|
||||
if (!movimentato /* && _stampac!=1 */ )
|
||||
@ -2404,9 +2417,9 @@ void TStampa_bilanci::leggi_clifo(const TArray& gccf)
|
||||
saldo_iniziale = sld.saldofin_esprec(anno,g,c,codcf,false,_stampa_mov_prov);
|
||||
|
||||
if (movimentato)
|
||||
saldo_iniziale = sld.saldoini();
|
||||
saldo_iniziale = sld.saldoini();
|
||||
|
||||
if (movimentato || _stampac != 1 || saldo_iniziale != ZERO)
|
||||
if (movimentato || _stampac != 1 || saldo_iniziale != ZERO)
|
||||
{
|
||||
_mov_periodo_dare = sld.prgdare();
|
||||
_mov_periodo_avere = sld.prgavere();
|
||||
|
@ -236,11 +236,11 @@ BEGIN
|
||||
HELP "Tipo di bilancio di verifica"
|
||||
GROUP 2
|
||||
ITEM "1|Bilancio"
|
||||
MESSAGE SHOW,F_HIDE_CLIFO|SHOW,F_PRINT_FULL_CODE
|
||||
MESSAGE SHOW,4@|HIDE,5@|HIDE,6@
|
||||
ITEM "2|Saldi di mastro"
|
||||
MESSAGE HIDE,F_HIDE_CLIFO|HIDE,F_PRINT_FULL_CODE
|
||||
MESSAGE SHOW,4@|HIDE,5@|HIDE,6@
|
||||
ITEM "3|Situazione C/F"
|
||||
MESSAGE HIDE,F_HIDE_CLIFO|HIDE,F_PRINT_FULL_CODE
|
||||
MESSAGE HIDE,4@|SHOW,5@|SHOW,6@
|
||||
END
|
||||
|
||||
RADIOBUTTON F_STAMPAC 36
|
||||
@ -248,7 +248,7 @@ BEGIN
|
||||
PROMPT 34 1 "@bTipo stampa"
|
||||
ITEM "1|Conti movimentati"
|
||||
ITEM "2|Conti con saldo diverso da zero"
|
||||
GROUP 2
|
||||
GROUP 4
|
||||
END
|
||||
|
||||
RADIOBUTTON F_STAMPAV 36
|
||||
@ -257,7 +257,8 @@ BEGIN
|
||||
ITEM "1|Conti movimentati"
|
||||
ITEM "2|Conti con saldo diverso da zero"
|
||||
ITEM "3|Tutti i conti"
|
||||
GROUP 1 2
|
||||
FLAGS "H"
|
||||
GROUP 6
|
||||
END
|
||||
|
||||
BOOLEAN F_SEPARATOR
|
||||
@ -276,11 +277,13 @@ END
|
||||
BOOLEAN F_HIDE_CLIFO
|
||||
BEGIN
|
||||
PROMPT 2 10 "Non stampare il dettaglio dei clienti/fornitori"
|
||||
GROUP 4
|
||||
END
|
||||
|
||||
BOOLEAN F_PRINT_FULL_CODE
|
||||
BEGIN
|
||||
PROMPT 2 11 "Stampa il codice completo"
|
||||
GROUP 4
|
||||
END
|
||||
|
||||
LIST F_SITUAZIONE 11
|
||||
@ -289,7 +292,8 @@ BEGIN
|
||||
ITEM " |Entrambi"
|
||||
ITEM "C|Clienti"
|
||||
ITEM "F|Fornitori"
|
||||
GROUP 2
|
||||
FLAGS "H"
|
||||
GROUP 6
|
||||
END
|
||||
|
||||
LIST F_ORDINAMENTO 11
|
||||
@ -297,7 +301,8 @@ BEGIN
|
||||
PROMPT 2 11 "Tipo ordinamento "
|
||||
ITEM "1|Per codice"
|
||||
ITEM "2|Alfabetico"
|
||||
GROUP 2
|
||||
FLAGS "H"
|
||||
GROUP 6
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 55 6
|
||||
|
@ -198,7 +198,6 @@ class TStampa_IVdirettiva : public TPrintapp
|
||||
real _totale_parziale,_totale_parziale_raf;
|
||||
real _tot_parz_sld,_tot_parz_sld_d,_tot_parz_sld_a,_tot_parz_prg_d;
|
||||
real _tot_parz_prg_a,_tot_parz_mov_d,_tot_parz_mov_a;
|
||||
real _nuovo_tot_saldo_d, _nuovo_tot_saldo_a;
|
||||
int _i;
|
||||
bool _reset_righe_stampa,_totale_attivita_gia_stampato,_totale_passivita_gia_stampato,_statopatr_no_stamp;
|
||||
bool _sbilancio_ordine, _quadratura, _prima_dopo;
|
||||
@ -312,28 +311,28 @@ void TStampa_IVdirettiva::set_bil_key(bil_ivd* b, char sezione, char lettera,
|
||||
//all'ordinamento del sort, i record dei conti d'ordine per ultimi
|
||||
|
||||
b->let = (conti_ordine && lettera == '\0' && sezione < '3') ? 'Z' : lettera;
|
||||
strcpy(b->numr, numero_romano);
|
||||
sprintf(b->num , "%-6s", numero);
|
||||
strcpy_s(b->numr, numero_romano);
|
||||
sprintf_s(b->num , "%-6s", numero);
|
||||
if (gruppo < 0)
|
||||
{
|
||||
strcpy(b->gruppo, "ZZZ");
|
||||
strcpy(b->conto, "ZZZ");
|
||||
strcpy(b->sottoc, "ZZZZZZ");
|
||||
strcpy_s(b->gruppo, "ZZZ");
|
||||
strcpy_s(b->conto, "ZZZ");
|
||||
strcpy_s(b->sottoc, "ZZZZZZ");
|
||||
b->tipocf = ' ';
|
||||
}
|
||||
else
|
||||
if (gruppo == 0)
|
||||
{
|
||||
strcpy(b->gruppo, "AAA");
|
||||
strcpy(b->conto, "AAA");
|
||||
strcpy(b->sottoc, "AAAAAA");
|
||||
strcpy_s(b->gruppo, "AAA");
|
||||
strcpy_s(b->conto, "AAA");
|
||||
strcpy_s(b->sottoc, "AAAAAA");
|
||||
b->tipocf = ' ';
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(b->gruppo , "%3d", gruppo);
|
||||
sprintf(b->conto , "%3d", conto);
|
||||
sprintf(b->sottoc , "%6ld", sottoconto);
|
||||
sprintf_s(b->gruppo , "%3d", gruppo);
|
||||
sprintf_s(b->conto , "%3d", conto);
|
||||
sprintf_s(b->sottoc , "%6ld", sottoconto);
|
||||
b->tipocf = tipocf;
|
||||
}
|
||||
}
|
||||
@ -1368,14 +1367,12 @@ void TStampa_IVdirettiva::crea_sort_piano_conti_verifica()
|
||||
lettera = let[0];
|
||||
numerorom = pconti.get(PCN_NUMRIVD);
|
||||
numero = pconti.get(PCN_NUMIVD);
|
||||
real app;
|
||||
|
||||
|
||||
saldo = ZERO;
|
||||
sld_prg_dare = ZERO;
|
||||
sld_prg_avere = ZERO;
|
||||
mov_dare = ZERO;
|
||||
mov_avere = ZERO;
|
||||
app = ZERO;
|
||||
|
||||
//Senza questo controllo conto_prec quando viene letto un gruppo verrebbe
|
||||
//settato a 0 (il conto non c'e'), quindi nella eventuale lettura del conto
|
||||
@ -1469,57 +1466,39 @@ void TStampa_IVdirettiva::crea_sort_piano_conti_verifica()
|
||||
mov_avere = _mov_periodo_avere;
|
||||
saldo = sld_prg_dare-sld_prg_avere+mov_dare-mov_avere;
|
||||
|
||||
//modifica del 27/11/1995
|
||||
_nuovo_tot_saldo_d += mov_dare;
|
||||
_nuovo_tot_saldo_a += mov_avere;
|
||||
_nuovo_tot_saldo_d += sld_prg_dare;
|
||||
_nuovo_tot_saldo_a += sld_prg_avere;
|
||||
//fine modifica
|
||||
}
|
||||
else if (_dataini > _data_ini_ese)
|
||||
{
|
||||
sld_prg_dare = _prg_prec_dare;
|
||||
sld_prg_avere = _prg_prec_avere;
|
||||
mov_dare = _mov_periodo_dare;
|
||||
mov_avere = _mov_periodo_avere;
|
||||
saldo = sld_prg_dare-sld_prg_avere+mov_dare-mov_avere;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (_dataini > _data_ini_ese)
|
||||
{
|
||||
sld_prg_dare = _prg_prec_dare;
|
||||
sld_prg_avere = _prg_prec_avere;
|
||||
mov_dare = _mov_periodo_dare;
|
||||
mov_avere = _mov_periodo_avere;
|
||||
saldo = sld_prg_dare-sld_prg_avere+mov_dare-mov_avere;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (_tipo_stampa == 2)
|
||||
{
|
||||
if (!_sld->ultima_immissione_verifica(_anno_esercizio,g,c,s,indbil,_stampa_mov_prov))
|
||||
continue;
|
||||
app = _sld->saldoini();
|
||||
//fine modifica 11/11/1997
|
||||
|
||||
if (app < ZERO)
|
||||
{
|
||||
sld_prg_dare = ZERO;
|
||||
sld_prg_avere = -app;
|
||||
}
|
||||
else
|
||||
{
|
||||
sld_prg_dare = app;
|
||||
sld_prg_avere = ZERO;
|
||||
}
|
||||
mov_dare = _sld->prgdare();
|
||||
mov_avere = _sld->prgavere();
|
||||
saldo = sld_prg_dare-sld_prg_avere+mov_dare-mov_avere;
|
||||
|
||||
//modifica del 05/04/1995
|
||||
if (!(saldo.is_zero() && _stampamov))
|
||||
{
|
||||
_nuovo_tot_saldo_d += mov_dare;
|
||||
_nuovo_tot_saldo_a += mov_avere;
|
||||
const real nuovo = _sld->saldoinisusaldi();
|
||||
if (nuovo >= ZERO)
|
||||
_nuovo_tot_saldo_d += nuovo;
|
||||
else
|
||||
_nuovo_tot_saldo_a -= nuovo;
|
||||
}
|
||||
//fine modifica
|
||||
}
|
||||
{
|
||||
if (!_sld->ultima_immissione_verifica(_anno_esercizio, g, c, s, indbil, _stampa_mov_prov) && (!_intera_struttura || (_stampamov)))
|
||||
continue;
|
||||
real saldoini = _sld->saldoini();
|
||||
//fine modifica 11/11/1997
|
||||
|
||||
if (saldoini > ZERO)
|
||||
{
|
||||
sld_prg_dare = saldoini;
|
||||
sld_prg_avere = ZERO;
|
||||
}
|
||||
else
|
||||
{
|
||||
sld_prg_dare = ZERO;
|
||||
sld_prg_avere = -saldoini;
|
||||
}
|
||||
mov_dare = _sld->prgdare();
|
||||
mov_avere = _sld->prgavere();
|
||||
saldo = sld_prg_dare - sld_prg_avere + mov_dare - mov_avere;
|
||||
}
|
||||
|
||||
if (classe_conto)
|
||||
{
|
||||
@ -1620,12 +1599,6 @@ void TStampa_IVdirettiva::sottoc_clifo_verifica(int g,int c,int anno,char tipocf
|
||||
mov_avere = _mov_periodo_avere;
|
||||
saldo = sld_prg_dare-sld_prg_avere+mov_dare-mov_avere;
|
||||
|
||||
//modifica 27/11/1995
|
||||
_nuovo_tot_saldo_d += mov_dare;
|
||||
_nuovo_tot_saldo_a += mov_avere;
|
||||
_nuovo_tot_saldo_d += sld_prg_dare;
|
||||
_nuovo_tot_saldo_a += sld_prg_avere;
|
||||
//fine modifica
|
||||
}
|
||||
else if (_dataini > _data_ini_ese)
|
||||
{
|
||||
@ -1638,15 +1611,16 @@ void TStampa_IVdirettiva::sottoc_clifo_verifica(int g,int c,int anno,char tipocf
|
||||
}
|
||||
else
|
||||
if (_tipo_stampa == 2)
|
||||
{
|
||||
//modifica 05/04/1994
|
||||
if (!_sld->ultima_immissione_verifica(_anno_esercizio,g,c,s,indbil,_stampa_mov_prov))
|
||||
{
|
||||
if (indbil == 1 || indbil == 2 || indbil == 5)
|
||||
app = _sld->saldofin_esprec(_anno_esercizio,g,c,s);
|
||||
}
|
||||
else app = _sld->saldoini();
|
||||
//fine modifica
|
||||
{
|
||||
//modifica 05/04/1994
|
||||
if (_stampa_mov_prov & 0x1)
|
||||
if (!_sld->ultima_immissione_verifica(_anno_esercizio,g,c,s,indbil,_stampa_mov_prov))
|
||||
{
|
||||
if (indbil == 1 || indbil == 2 || indbil == 5)
|
||||
app = _sld->saldofin_esprec(_anno_esercizio,g,c,s);
|
||||
}
|
||||
else app = _sld->saldoini();
|
||||
//fine modifica
|
||||
if (app < ZERO)
|
||||
{
|
||||
app = -app;
|
||||
@ -1662,21 +1636,6 @@ void TStampa_IVdirettiva::sottoc_clifo_verifica(int g,int c,int anno,char tipocf
|
||||
mov_avere = _sld->prgavere();
|
||||
saldo = sld_prg_dare-sld_prg_avere+mov_dare-mov_avere;
|
||||
|
||||
//modifica 05/04/1994
|
||||
if (!(saldo == ZERO && _stampamov))
|
||||
{
|
||||
_nuovo_tot_saldo_d += mov_dare;
|
||||
_nuovo_tot_saldo_a += mov_avere;
|
||||
real nuovo = _sld->saldoinisusaldi();
|
||||
if (nuovo > ZERO)
|
||||
_nuovo_tot_saldo_d += nuovo;
|
||||
else
|
||||
{
|
||||
nuovo = -nuovo;
|
||||
_nuovo_tot_saldo_a += nuovo;
|
||||
}
|
||||
}
|
||||
//fine modifica
|
||||
}
|
||||
|
||||
if (stsottbil)
|
||||
@ -1830,7 +1789,7 @@ bool TStampa_IVdirettiva::calcola_saldo(real& saldo, real& saldo_raf,int g,int c
|
||||
}
|
||||
else if (_databilrafr == _data_fine_raf)
|
||||
{
|
||||
if (!_sld->ultima_immissione_bilancio(_anno_esercizio_raf,g,c,s,indbil,_stampa_mov_prov,false)) // W96SALDI : ho aggiunto il parametro false
|
||||
if (!_sld->ultima_immissione_bilancio(_anno_esercizio_raf,g,c,s,indbil,_stampa_mov_prov, false)) // W96SALDI : ho aggiunto il parametro false
|
||||
{ // per dire che nel calcola del saldo non deve
|
||||
if (!_sld->esiste_saldo() || !_sld->significativo()) // includere il saldo di chiusura
|
||||
no_movimentato_raf = true;
|
||||
@ -1853,114 +1812,142 @@ bool TStampa_IVdirettiva::calcola_saldo(real& saldo, real& saldo_raf,int g,int c
|
||||
}
|
||||
|
||||
bool TStampa_IVdirettiva::calcola(int g, int c, long s,
|
||||
const TDate& fine_es, const TDate& fine_es_prec)
|
||||
const TDate& fine_es, const TDate& fine_es_prec)
|
||||
{
|
||||
TLocalisamfile rmov(LF_RMOV);
|
||||
TLocalisamfile mov (LF_MOV);
|
||||
TDecoder causali(LF_CAUSALI, CAU_MOVAP);
|
||||
TLocalisamfile rmov(LF_RMOV);
|
||||
TLocalisamfile mov(LF_MOV);
|
||||
TDecoder causali(LF_CAUSALI, CAU_MOVAP);
|
||||
|
||||
TString sezione;
|
||||
real importo;
|
||||
int annoe;
|
||||
long num_reg;
|
||||
char provvis;
|
||||
TDate datareg, datacomp, data;
|
||||
bool conto_mov = false;
|
||||
TString sezione;
|
||||
real importo;
|
||||
int annoe;
|
||||
long num_reg;
|
||||
TString4 provvis;
|
||||
TDate datareg, datacomp, data;
|
||||
bool conto_mov = false;
|
||||
|
||||
_mov_periodo_dare = ZERO;
|
||||
_mov_periodo_avere = ZERO;
|
||||
_prg_prec_dare = ZERO;
|
||||
_prg_prec_avere = ZERO;
|
||||
_saldo_ini_dare = ZERO;
|
||||
_saldo_ini_avere = ZERO;
|
||||
_mov_periodo_dare = ZERO;
|
||||
_mov_periodo_avere = ZERO;
|
||||
_prg_prec_dare = ZERO;
|
||||
_prg_prec_avere = ZERO;
|
||||
_saldo_ini_dare = ZERO;
|
||||
_saldo_ini_avere = ZERO;
|
||||
|
||||
rmov.setkey(2);
|
||||
rmov.zero();
|
||||
rmov.put(RMV_GRUPPO,g);
|
||||
if (c != 0)
|
||||
rmov.put(RMV_CONTO,c);
|
||||
if (s != 0)
|
||||
rmov.put(RMV_SOTTOCONTO,s);
|
||||
TRectype rec(rmov.curr());
|
||||
rmov.setkey(2);
|
||||
rmov.zero();
|
||||
rmov.put(RMV_GRUPPO, g);
|
||||
if (c != 0)
|
||||
rmov.put(RMV_CONTO, c);
|
||||
if (s != 0)
|
||||
rmov.put(RMV_SOTTOCONTO, s);
|
||||
TRectype rec(rmov.curr());
|
||||
|
||||
rmov.read(_isgteq);
|
||||
for ( ; !rmov.eof(); rmov.next())
|
||||
{
|
||||
if (rmov.curr() != rec) break;
|
||||
|
||||
annoe = rmov.get_int(RMV_ANNOES);
|
||||
datareg = rmov.get_date(RMV_DATAREG);
|
||||
num_reg = rmov.get_long(RMV_NUMREG);
|
||||
sezione = rmov.get(RMV_SEZIONE);
|
||||
importo = rmov.get_real(RMV_IMPORTO);
|
||||
|
||||
mov.setkey(1);
|
||||
mov.zero();
|
||||
mov.put(MOV_NUMREG, num_reg);
|
||||
mov.read();
|
||||
if (mov.bad()) mov.zero();
|
||||
provvis = mov.get_char(MOV_PROVVIS);
|
||||
datacomp = mov.get_date(MOV_DATACOMP);
|
||||
|
||||
if (_stampa_mov_prov == 1 && provvis != '\0') //bilancio normale (non comprende i provvisori)
|
||||
continue;
|
||||
rmov.read(_isgteq);
|
||||
for (; !rmov.eof(); rmov.next())
|
||||
{
|
||||
if (rmov.curr() != rec) break;
|
||||
|
||||
if (_stampa_mov_prov == 3 && provvis == '\0') //bilancio dei soli provvisori
|
||||
continue;
|
||||
annoe = rmov.get_int(RMV_ANNOES);
|
||||
datareg = rmov.get_date(RMV_DATAREG);
|
||||
num_reg = rmov.get_long(RMV_NUMREG);
|
||||
sezione = rmov.get(RMV_SEZIONE);
|
||||
importo = rmov.get_real(RMV_IMPORTO);
|
||||
|
||||
const TString& codcaus = mov.get(MOV_CODCAUS);
|
||||
char movap = causali.decode(codcaus)[0];
|
||||
movap = toupper(movap);
|
||||
|
||||
if (movap == 'C' && // la causale e' di chiusura
|
||||
!_quadratura) // Non e' richiesta la quadratura con il Libro Giornale (Modifica
|
||||
continue; // del 18-06-96 richiesta da Patrizia in seguito alla modifica dei SALDI
|
||||
mov.setkey(1);
|
||||
mov.zero();
|
||||
mov.put(MOV_NUMREG, num_reg);
|
||||
mov.read();
|
||||
if (mov.bad()) mov.zero();
|
||||
provvis = mov.get(MOV_PROVVIS);
|
||||
datacomp = mov.get_date(MOV_DATACOMP);
|
||||
|
||||
if (_annoese == 0)
|
||||
data = datareg;
|
||||
if (_annoese != 0)
|
||||
data = datacomp;
|
||||
|
||||
if (importo == ZERO)
|
||||
continue;
|
||||
|
||||
//calcolo i movimenti del periodo
|
||||
const TString& codcaus = mov.get(MOV_CODCAUS);
|
||||
char movap = causali.decode(codcaus)[0];
|
||||
movap = toupper(movap);
|
||||
|
||||
if ( (data >= _dataini) && (data <= _datafine) )
|
||||
if ((movap == 'A' && _data_ini_ese != _dataini) || (movap != 'A'))
|
||||
{
|
||||
conto_mov = true;
|
||||
if (sezione == "D")
|
||||
_mov_periodo_dare += importo;
|
||||
else _mov_periodo_avere += importo;
|
||||
}
|
||||
if (movap == 'C' && // la causale e' di chiusura
|
||||
!_quadratura) // Non e' richiesta la quadratura con il Libro Giornale (Modifica
|
||||
continue; // del 18-06-96 richiesta da Patrizia in seguito alla modifica dei SALDI
|
||||
|
||||
//il saldo inizio es. e' dato dall'importo dare - importo avere di quei movimenti che hanno causale == apertura e data reg >= data inizio es. e <= data limite sup.
|
||||
|
||||
if (_dataini == _data_ini_ese) //calcolo il saldo iniziale
|
||||
{
|
||||
if (movap == 'A')
|
||||
{
|
||||
if (data >= _data_ini_ese && data <= _datafine)
|
||||
{
|
||||
if (sezione == "D")
|
||||
_saldo_ini_dare += importo;
|
||||
else _saldo_ini_avere += importo;
|
||||
conto_mov = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (_dataini > _data_ini_ese) //calcolo i progressivi precedenti
|
||||
if ( (data >= _data_ini_ese) && (data < _dataini) )
|
||||
{
|
||||
if (sezione == "D")
|
||||
_prg_prec_dare += importo;
|
||||
else _prg_prec_avere += importo;
|
||||
|
||||
conto_mov = true;
|
||||
}
|
||||
}
|
||||
return conto_mov;
|
||||
if (_annoese == 0)
|
||||
data = datareg;
|
||||
if (_annoese != 0)
|
||||
data = datacomp;
|
||||
|
||||
if (importo == ZERO)
|
||||
continue;
|
||||
|
||||
//calcolo i movimenti del periodo
|
||||
|
||||
if ((data >= _dataini) && (data <= _datafine))
|
||||
if ((movap == 'A' && _data_ini_ese != _dataini) || (movap != 'A'))
|
||||
if (((_stampa_mov_prov & 0x1) && provvis.blank()) ||
|
||||
((_stampa_mov_prov & 0x2) && ((provvis == "P") || (provvis == "N"))) ||
|
||||
((_stampa_mov_prov & 0x4) && (provvis == "B")) || ((_stampa_mov_prov & 0x8) && (provvis == "C")))
|
||||
{
|
||||
conto_mov = true;
|
||||
if (sezione == "D")
|
||||
_mov_periodo_dare += importo;
|
||||
else _mov_periodo_avere += importo;
|
||||
}
|
||||
|
||||
//il saldo inizio es. e' dato dall'importo dare - importo avere di quei movimenti che hanno causale == apertura e data reg >= data inizio es. e <= data limite sup.
|
||||
|
||||
if (_dataini == _data_ini_ese) //calcolo il saldo iniziale
|
||||
{
|
||||
if ((_stampa_mov_prov & 0x1) && (movap == 'A'))
|
||||
{
|
||||
if (data >= _data_ini_ese && data <= _datafine)
|
||||
{
|
||||
if (sezione == "D")
|
||||
_saldo_ini_dare += importo;
|
||||
else _saldo_ini_avere += importo;
|
||||
conto_mov = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if (_dataini > _data_ini_ese) //calcolo i progressivi precedenti
|
||||
if ((data >= _data_ini_ese) && (data < _dataini))
|
||||
if (((_stampa_mov_prov & 0x1) && provvis.blank()) ||
|
||||
((_stampa_mov_prov & 0x2) && ((provvis == "P") || (provvis == "N"))) ||
|
||||
((_stampa_mov_prov & 0x4) && (provvis == "B")) || ((_stampa_mov_prov & 0x8) && (provvis == "C")))
|
||||
{
|
||||
if (sezione == "D")
|
||||
_prg_prec_dare += importo;
|
||||
else _prg_prec_avere += importo;
|
||||
|
||||
conto_mov = true;
|
||||
}
|
||||
if ((_stampa_mov_prov & 0x1) && (_saldo_ini_dare == ZERO) && (_saldo_ini_avere == ZERO))
|
||||
{
|
||||
TBill conto(g, c, s);
|
||||
int indbil = conto.indicatore_bilancio();
|
||||
|
||||
if (g == 20 && c == 22 && s == 22)
|
||||
int i = 1;
|
||||
if ((indbil == 1) || (indbil == 2) || (indbil == 5))
|
||||
{
|
||||
TSaldo saldo;
|
||||
const int annoes = esercizi().date2esc(fine_es);
|
||||
|
||||
real si = saldo.saldofin_esprec(annoes, g, c, s);
|
||||
|
||||
if (si > ZERO)
|
||||
{
|
||||
_saldo_ini_dare = si;
|
||||
conto_mov = true;
|
||||
}
|
||||
else
|
||||
if (si < ZERO)
|
||||
{
|
||||
_saldo_ini_avere = -si;
|
||||
conto_mov = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return conto_mov || (_intera_struttura || (!_stampamov));
|
||||
}
|
||||
|
||||
bool TStampa_IVdirettiva::set_print(int)
|
||||
@ -1976,8 +1963,11 @@ bool TStampa_IVdirettiva::set_print(int)
|
||||
_stampacod = _msk->get_bool(F_STAMPACOD);
|
||||
_stampa_modulo = _msk->get_bool(F_STAMPAMODULO);
|
||||
_tipo_bilancio = _msk->get_int(F_TIPOBIL);
|
||||
_stampa_mov_prov = _msk->get_int(F_STAMPAMOVPROV);
|
||||
_quadratura = _msk->get_bool(F_QUADRATURA);
|
||||
_stampa_mov_prov = _msk->get_bool(F_NORMALI) ? 0x1 : 0; // qui
|
||||
_stampa_mov_prov |= _msk->get_bool(F_PROVVM) ? 0x2 : 0; // qui
|
||||
_stampa_mov_prov |= _msk->get_bool(F_PROVVB) ? 0x4 : 0; // qui
|
||||
_stampa_mov_prov |= _msk->get_bool(F_PROVVC) ? 0x8 : 0; // qui
|
||||
_quadratura = _msk->get_bool(F_QUADRATURA);
|
||||
_noseparator = _msk->get_bool(F_SEPARATOR);
|
||||
|
||||
if (_tipo_bilancio == 1)
|
||||
@ -3071,8 +3061,10 @@ void TStampa_IVdirettiva::stampa_totali_verifica()
|
||||
set_row (_i,"@47g%r", &_tot_num_prg_d);
|
||||
if (_tot_num_prg_a != ZERO)
|
||||
set_row (_i,"@64g%r", &_tot_num_prg_a);
|
||||
set_row (_i,"@81g%r", &_tot_num_mov_d);
|
||||
set_row (_i,"@98g%r", &_tot_num_mov_a);
|
||||
if (_tot_num_mov_d != ZERO)
|
||||
set_row (_i,"@81g%r", &_tot_num_mov_d);
|
||||
if (_tot_num_mov_a != ZERO)
|
||||
set_row (_i,"@98g%r", &_tot_num_mov_a);
|
||||
if (!_stampa_modulo)
|
||||
stampa_saldo_132(_tot_num_saldo);
|
||||
else
|
||||
@ -3093,8 +3085,10 @@ void TStampa_IVdirettiva::stampa_totali_verifica()
|
||||
set_row (_i,"@47g%r", &_tot_parz_prg_d);
|
||||
if (_tot_parz_prg_a != ZERO)
|
||||
set_row (_i,"@64g%r", &_tot_parz_prg_a);
|
||||
set_row (_i,"@81g%r", &_tot_parz_mov_d);
|
||||
set_row (_i,"@98g%r", &_tot_parz_mov_a);
|
||||
if (_tot_parz_mov_d != ZERO)
|
||||
set_row (_i,"@81g%r", &_tot_parz_mov_d);
|
||||
if (_tot_parz_mov_a != ZERO)
|
||||
set_row (_i,"@98g%r", &_tot_parz_mov_a);
|
||||
_risimp_fatto = true;
|
||||
if (_num.not_empty())
|
||||
{
|
||||
@ -3142,8 +3136,10 @@ void TStampa_IVdirettiva::stampa_totali_verifica()
|
||||
set_row (_i,"@47g%r", &_tot_num_prg_d);
|
||||
if (_tot_num_prg_a != ZERO)
|
||||
set_row (_i,"@64g%r", &_tot_num_prg_a);
|
||||
set_row (_i,"@81g%r", &_tot_num_mov_d);
|
||||
set_row (_i,"@98g%r", &_tot_num_mov_a);
|
||||
if (_tot_num_mov_d != ZERO)
|
||||
set_row (_i,"@81g%r", &_tot_num_mov_d);
|
||||
if (_tot_num_mov_a != ZERO)
|
||||
set_row (_i,"@98g%r", &_tot_num_mov_a);
|
||||
if (!_stampa_modulo)
|
||||
stampa_saldo_132(_tot_num_saldo);
|
||||
else
|
||||
@ -3165,8 +3161,10 @@ void TStampa_IVdirettiva::stampa_totali_verifica()
|
||||
set_row (_i,"@47g%r", &_tot_numr_prg_d);
|
||||
if (_tot_numr_prg_a != ZERO)
|
||||
set_row (_i,"@64g%r", &_tot_numr_prg_a);
|
||||
set_row (_i,"@81g%r", &_tot_numr_mov_d);
|
||||
set_row (_i,"@98g%r", &_tot_numr_mov_a);
|
||||
if (_tot_numr_mov_d != ZERO)
|
||||
set_row (_i,"@81g%r", &_tot_numr_mov_d);
|
||||
if (_tot_numr_mov_a != ZERO)
|
||||
set_row (_i,"@98g%r", &_tot_numr_mov_a);
|
||||
if (!_stampa_modulo)
|
||||
stampa_saldo_132(_tot_numr_saldo);
|
||||
else
|
||||
@ -3214,8 +3212,10 @@ void TStampa_IVdirettiva::stampa_totali_verifica()
|
||||
set_row (_i,"@47g%r", &_tot_num_prg_d);
|
||||
if (_tot_num_prg_a != ZERO)
|
||||
set_row (_i,"@64g%r", &_tot_num_prg_a);
|
||||
set_row (_i,"@81g%r", &_tot_num_mov_d);
|
||||
set_row (_i,"@98g%r", &_tot_num_mov_a);
|
||||
if (_tot_num_mov_d != ZERO)
|
||||
set_row (_i,"@81g%r", &_tot_num_mov_d);
|
||||
if (_tot_num_mov_a != ZERO)
|
||||
set_row (_i,"@98g%r", &_tot_num_mov_a);
|
||||
if (!_stampa_modulo)
|
||||
stampa_saldo_132(_tot_num_saldo);
|
||||
else
|
||||
@ -3237,8 +3237,10 @@ void TStampa_IVdirettiva::stampa_totali_verifica()
|
||||
set_row (_i,"@47g%r", &_tot_numr_prg_d);
|
||||
if (_tot_numr_prg_a != ZERO)
|
||||
set_row (_i,"@64g%r", &_tot_numr_prg_a);
|
||||
set_row (_i,"@81g%r", &_tot_numr_mov_d);
|
||||
set_row (_i,"@98g%r", &_tot_numr_mov_a);
|
||||
if (_tot_numr_mov_d != ZERO)
|
||||
set_row (_i,"@81g%r", &_tot_numr_mov_d);
|
||||
if (_tot_numr_mov_a != ZERO)
|
||||
set_row (_i,"@98g%r", &_tot_numr_mov_a);
|
||||
if (!_stampa_modulo)
|
||||
stampa_saldo_132(_tot_numr_saldo);
|
||||
else
|
||||
@ -3260,8 +3262,10 @@ void TStampa_IVdirettiva::stampa_totali_verifica()
|
||||
set_row (_i,"@47g%r", &_tot_let_prg_d);
|
||||
if (_tot_let_prg_a != ZERO)
|
||||
set_row (_i,"@64g%r", &_tot_let_prg_a);
|
||||
set_row (_i,"@81g%r", &_tot_let_mov_d);
|
||||
set_row (_i,"@98g%r", &_tot_let_mov_a);
|
||||
if (_tot_let_mov_d != ZERO)
|
||||
set_row (_i,"@81g%r", &_tot_let_mov_d);
|
||||
if (_tot_let_mov_a != ZERO)
|
||||
set_row (_i,"@98g%r", &_tot_let_mov_a);
|
||||
}
|
||||
else
|
||||
if (_sez_stamp != '9')
|
||||
@ -3274,8 +3278,10 @@ void TStampa_IVdirettiva::stampa_totali_verifica()
|
||||
set_row (_i,"@47g%r", &_tot_let_prg_d);
|
||||
if (_tot_let_prg_a != ZERO)
|
||||
set_row (_i,"@64g%r", &_tot_let_prg_a);
|
||||
set_row (_i,"@81g%r", &_tot_let_mov_d);
|
||||
set_row (_i,"@98g%r", &_tot_let_mov_a);
|
||||
if (_tot_let_mov_d != ZERO)
|
||||
set_row (_i,"@81g%r", &_tot_let_mov_d);
|
||||
if (_tot_let_mov_a != ZERO)
|
||||
set_row (_i,"@98g%r", &_tot_let_mov_a);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3320,8 +3326,12 @@ void TStampa_IVdirettiva::stampa_totali_verifica()
|
||||
|
||||
void TStampa_IVdirettiva::stampa_saldo_198(real& saldo_d,real& saldo_a)
|
||||
{
|
||||
set_row (_i,"@46g!@80g!@114g!%r@132g%r", &saldo_d, &saldo_a);
|
||||
saldo_d = saldo_a = ZERO;
|
||||
set_row(_i, "@46g!@80g!@114g!");
|
||||
if (saldo_d != ZERO)
|
||||
set_row(_i, "%r@132g%r", &saldo_d);
|
||||
if (saldo_a != ZERO)
|
||||
set_row(_i, "@132g%r", &saldo_a);
|
||||
saldo_d = saldo_a = ZERO;
|
||||
}
|
||||
|
||||
void TStampa_IVdirettiva::stampa_saldo_132(const real& saldo)
|
||||
@ -3338,9 +3348,9 @@ void TStampa_IVdirettiva::stampa_saldo_132(const real& saldo)
|
||||
_tot_sez_saldo = 'D';
|
||||
}
|
||||
|
||||
set_row (_i,"@46g!@80g!@114g!%r", &sld);
|
||||
set_row (_i,"@46g!@80g!@114g!");
|
||||
if (!sld.is_zero())
|
||||
set_row (_i,"@131g%c", _tot_sez_saldo);
|
||||
set_row (_i,"%r@131g%c", &sld, _tot_sez_saldo);
|
||||
}
|
||||
|
||||
print_action TStampa_IVdirettiva::postprocess_page(int file, int counter)
|
||||
@ -3710,8 +3720,10 @@ bool TStampa_IVdirettiva::preprocess_stampa_verifica(int counter)
|
||||
set_row (_i,"@47g%r", &_tot_gen_prg_d);
|
||||
if (_tot_gen_prg_a != ZERO)
|
||||
set_row (_i,"@64g%r", &_tot_gen_prg_a);
|
||||
set_row (_i,"@81g%r", &_tot_gen_mov_d);
|
||||
set_row (_i,"@98g%r", &_tot_gen_mov_a);
|
||||
if (_tot_gen_mov_d != ZERO)
|
||||
set_row (_i,"@81g%r", &_tot_gen_mov_d);
|
||||
if (_tot_gen_mov_a != ZERO)
|
||||
set_row (_i,"@98g%r", &_tot_gen_mov_a);
|
||||
|
||||
if (!_stampa_modulo)
|
||||
stampa_saldo_132(_tot_gen_saldo);
|
||||
@ -3721,11 +3733,14 @@ bool TStampa_IVdirettiva::preprocess_stampa_verifica(int counter)
|
||||
//modifica 05/04/1995
|
||||
if ((_tipo_stampa == 1 && _dataini == _data_ini_ese) || _tipo_stampa == 2)
|
||||
{
|
||||
_i++;
|
||||
const real tot_d = _tot_gen_prg_d + _tot_gen_mov_d;
|
||||
const real tot_a = _tot_gen_prg_a + _tot_gen_mov_a;
|
||||
|
||||
_i++;
|
||||
if (_tipo_stampa == 1 && _dataini == _data_ini_ese)
|
||||
set_row(_i,FR("****** ******** TOTALE CON MOVIM. DI APERTURA@46g!@80g!@81g%r@98g%r@114g!"),&_nuovo_tot_saldo_d,&_nuovo_tot_saldo_a);
|
||||
set_row(_i,FR("****** ******** TOTALE CON MOVIM. DI APERTURA@46g!@80g!@81g%r@98g%r@114g!"),&tot_d, &tot_a);
|
||||
else
|
||||
set_row(_i,FR("****** ******** TOTALE CON SALDI INIZIALI@46g!@80g!@81g%r@98g%r@114g!"),&_nuovo_tot_saldo_d,&_nuovo_tot_saldo_a);
|
||||
set_row(_i,FR("****** ******** TOTALE CON SALDI INIZIALI@46g!@80g!@81g%r@98g%r@114g!"),&tot_d, &tot_a);
|
||||
}
|
||||
//fine modifica
|
||||
|
||||
@ -4366,21 +4381,24 @@ void TStampa_IVdirettiva::setta_righe_verifica()
|
||||
set_row (_i,"@64g%r", &_sld_prg_avere);
|
||||
}
|
||||
|
||||
set_row (_i,"@81g%r", &_mov_dare);
|
||||
set_row (_i,"@98g%r", &_mov_avere);
|
||||
if (_stampa_modulo)
|
||||
if (_mov_dare != ZERO)
|
||||
set_row (_i,"@81g%r", &_mov_dare);
|
||||
if (_mov_avere != ZERO)
|
||||
set_row (_i,"@98g%r", &_mov_avere);
|
||||
set_row(_i, "@46g!@80g!@114g!");
|
||||
if (_stampa_modulo)
|
||||
{
|
||||
if (_sez_saldo == 'D')
|
||||
set_row (_i,"@46g!@80g!@114g!%r", &_sale);
|
||||
else
|
||||
set_row (_i,"@46g!@80g!@114g!@132g%r", &_sale);
|
||||
if (_sale != ZERO)
|
||||
{
|
||||
if (_sez_saldo == 'D')
|
||||
set_row(_i, "%r", &_sale);
|
||||
else
|
||||
set_row(_i, "@132g%r", &_sale);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
set_row (_i,"@46g!@80g!@114g!%r", &_sale);
|
||||
if (_sale != ZERO)
|
||||
set_row (_i,"@131g%c", _sez_saldo);
|
||||
}
|
||||
set_row (_i,"%r@131g%c", &_sale, _sez_saldo);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -4425,20 +4443,22 @@ void TStampa_IVdirettiva::setta_righe_verifica()
|
||||
|
||||
set_row (_i,"@81g%r", &_mov_dare);
|
||||
set_row (_i,"@99g%r", &_mov_avere);
|
||||
if (_stampa_modulo)
|
||||
set_row(_i, "@46g!@80g!@114g!");
|
||||
if (_stampa_modulo)
|
||||
{
|
||||
if (_sez_saldo == 'D')
|
||||
set_row (_i,"@46g!@80g!@114g!%r", &_sale);
|
||||
else
|
||||
set_row (_i,"@46g!@80g!@114g!@132g%r", &_sale);
|
||||
if (_sale != ZERO)
|
||||
{
|
||||
if (_sez_saldo == 'D')
|
||||
set_row(_i, "%r", &_sale);
|
||||
else
|
||||
set_row(_i, "@132g%r", &_sale);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
set_row (_i,"@115g%r", &_sale);
|
||||
if (_sale != ZERO)
|
||||
set_row (_i,"@131g%c", _sez_saldo);
|
||||
set_row (_i,"@46g!@80g!@114g!");
|
||||
}
|
||||
set_row (_i,"@115g%r@131g%c", &_sale, _sez_saldo);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4517,7 +4537,25 @@ void TStampa_IVdirettiva::crea_intestazione()
|
||||
set_header (2,FR("@131gData@116g%s"),(const char*) _datastampa.string());
|
||||
else
|
||||
set_header (2,FR("@105gData@111g%s"),(const char*) _datastampa.string());
|
||||
|
||||
if (_stampa_mov_prov > 0x1)
|
||||
{
|
||||
TString tipoprovv;
|
||||
TString riga;
|
||||
|
||||
if ((_stampa_mov_prov & 0x1))
|
||||
tipoprovv << TR("Movimenti : Normali");
|
||||
if (_stampa_mov_prov > 0x1)
|
||||
tipoprovv << TR(" Provvisori :");
|
||||
if (_stampa_mov_prov & 0x2)
|
||||
tipoprovv << TR(" Manuali");
|
||||
if (_stampa_mov_prov & 0x4)
|
||||
tipoprovv << TR(" Competenza costi/ricavi");
|
||||
if (_stampa_mov_prov & 0x8)
|
||||
tipoprovv << TR(" Cespiti");
|
||||
riga.overwrite(tipoprovv, (132 - tipoprovv.len()) / 2);
|
||||
set_header(3, FR("%s"), (const char*) riga);
|
||||
}
|
||||
|
||||
if (_tipo_bilancio == 1)
|
||||
intesta_scalare();
|
||||
else
|
||||
@ -4532,39 +4570,39 @@ void TStampa_IVdirettiva::intesta_verifica_fissa()
|
||||
if (_tipo_stampa == 1)
|
||||
{
|
||||
if (_dataini == _data_ini_ese)
|
||||
set_header(5,FR("@54gMOVIMENTI DI APERTURA@87gMOVIMENTI DEL PERIODO"));
|
||||
set_header(6,FR("@54gMOVIMENTI DI APERTURA@87gMOVIMENTI DEL PERIODO"));
|
||||
else if (_dataini > _data_ini_ese)
|
||||
set_header(5,FR("@54gPROGRESSIVI PRECEDENTI@87gMOVIMENTI DEL PERIODO"));
|
||||
set_header(6,FR("@54gPROGRESSIVI PRECEDENTI@87gMOVIMENTI DEL PERIODO"));
|
||||
}
|
||||
else if (_tipo_stampa == 2)
|
||||
set_header(5,FR("@57gSALDO INIZIALE@87gMOVIMENTI DEL PERIODO"));
|
||||
set_header(6,FR("@57gSALDO INIZIALE@87gMOVIMENTI DEL PERIODO"));
|
||||
|
||||
if (_stampa_modulo)
|
||||
set_header(5,FR("@129gSALDO"));
|
||||
set_header(6,FR("@129gSALDO"));
|
||||
|
||||
set_header(5,"@46g!@80g!@114g!");
|
||||
set_header(6,"@46g!@80g!@114g!");
|
||||
|
||||
if (_stampa_modulo)
|
||||
{
|
||||
set_header(5,"@147g!");
|
||||
set_header(6,"@147g!");
|
||||
set_header(7,"@147g!");
|
||||
}
|
||||
|
||||
set_header(6,"@46g!@80g!@114g!");
|
||||
set_header(7,"@46g!@80g!@114g!");
|
||||
app = "---------------------------------";
|
||||
if (_stampa_modulo)
|
||||
{
|
||||
set_header(6,"@47g%s@81g%s@115g%s", (const char*) app, (const char*) app,(const char*) app);
|
||||
set_header(7,FR("@1gdescrizione voce@46g!@53gDare@63g!@69gAvere@80g!@87gDare@97g!@103gAvere@114g!@122gDare@131g!@138gAvere@147g!"));
|
||||
set_header(7,"@47g%s@81g%s@115g%s", (const char*) app, (const char*) app,(const char*) app);
|
||||
set_header(8,FR("@1gdescrizione voce@46g!@53gDare@63g!@69gAvere@80g!@87gDare@97g!@103gAvere@114g!@122gDare@131g!@138gAvere@147g!"));
|
||||
sep1.fill('-'); //Stampa 132 - (sep(132))
|
||||
set_header (8, (const char *) sep1);
|
||||
set_header (9, (const char *) sep1);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_header(6,"@47g%s@81g%s@122gSALDO", (const char*) app, (const char*) app);
|
||||
set_header(7,FR("@1gdescrizione voce@46g!@53gDare@63g!@69gAvere@80g!@87gDare@97g!@103gAvere@114g!"));
|
||||
set_header(7,"@47g%s@81g%s@122gSALDO", (const char*) app, (const char*) app);
|
||||
set_header(8,FR("@1gdescrizione voce@46g!@53gDare@63g!@69gAvere@80g!@87gDare@97g!@103gAvere@114g!"));
|
||||
sep.fill('-'); //Stampa 132 - (sep(132))
|
||||
set_header (8, (const char *) sep);
|
||||
set_header (9, (const char *) sep);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4578,44 +4616,44 @@ void TStampa_IVdirettiva::intesta_scalare()
|
||||
TString16 d1r(_data_ini_raf.string());
|
||||
TString16 d2r(_data_fine_raf.string());
|
||||
|
||||
set_header (3,TR("STAMPA BILANCIO CONFORME ALLA IV DIRETTIVA"));
|
||||
set_header (3,FR("@80gEs. %s/%s"), (const char*)d1e, (const char*)d2e); /**/
|
||||
set_header (4,TR("STAMPA BILANCIO CONFORME ALLA IV DIRETTIVA"));
|
||||
set_header (4,FR("@80gEs. %s/%s"), (const char*)d1e, (const char*)d2e); /**/
|
||||
if (_annoeserafr != 0 || _databilrafr != botime)
|
||||
{
|
||||
set_header (3,FR("@107gEs. %s/%s"), (const char*)d1r, (const char*)d2r); /**/
|
||||
set_header (4,FR("@107gEs. %s/%s"), (const char*)d1r, (const char*)d2r); /**/
|
||||
databilrafrstr = _databilrafr.string();
|
||||
set_header (4,FR("@112galla data@122g%s"), (const char*) databilrafrstr);
|
||||
set_header (5,FR("@112galla data@122g%s"), (const char*) databilrafrstr);
|
||||
}
|
||||
if (_tipo_stampa == 1)
|
||||
{
|
||||
datalimitestr = _datalimite.string();
|
||||
set_header (4,FR("@86galla data@96g%s"), (const char*) datalimitestr);
|
||||
set_header (5,FR("@86galla data@96g%s"), (const char*) datalimitestr);
|
||||
}
|
||||
else if (_tipo_stampa == 2)
|
||||
set_header (4,FR("@90gall'ultima immissione"));
|
||||
set_header (5,FR("@90gall'ultima immissione"));
|
||||
|
||||
sep.fill('-'); //Stampa 132 - (sep(132))
|
||||
set_header (5, (const char *) sep);
|
||||
set_header (6, (const char *) sep);
|
||||
}
|
||||
|
||||
void TStampa_IVdirettiva::intesta_verifica()
|
||||
{
|
||||
set_header (3,TR("@0gBILANCIO DI VERIFICA IV DIRETTIVA"));
|
||||
set_header (4,TR("@0gBILANCIO DI VERIFICA IV DIRETTIVA"));
|
||||
|
||||
if (_tipo_stampa == 1)
|
||||
{
|
||||
TString datainistr = _dataini.string();
|
||||
TString datafinestr = _datafine.string();
|
||||
set_header (3,FR("@43gdalla data@54g%s alla data %s"),
|
||||
set_header (4,FR("@43gdalla data@54g%s alla data %s"),
|
||||
|
||||
(const char*)datainistr, (const char*) datafinestr);
|
||||
}
|
||||
else if (_tipo_stampa == 2)
|
||||
set_header (3,FR("@42gall'ultima immissione"));
|
||||
set_header (4,FR("@42gall'ultima immissione"));
|
||||
|
||||
TString sep;
|
||||
sep.fill('-', _stampa_modulo ? 147 : 132);
|
||||
set_header (4, sep);
|
||||
set_header (5, sep);
|
||||
|
||||
intesta_verifica_fissa();
|
||||
}
|
||||
@ -4655,6 +4693,8 @@ bool TStampa_IVdirettiva::user_create()
|
||||
_msk->set_handler(F_DATAFINE, data_fine);
|
||||
_msk->set_handler(F_DATABILRAF, data_bil_raff);
|
||||
_msk->set_handler(F_ANNORAFFR, anno_ese_raff);
|
||||
_msk->set(F_NORMALI, "X");
|
||||
|
||||
_sez_utile = ini_get_string(CONFIG_DITTA, "CG", "SezIVDUtile", "9")[0];
|
||||
_lett_utile = ini_get_string(CONFIG_DITTA, "CG", "LettIVDUtile", "E")[0];
|
||||
_classe_utile = ini_get_string(CONFIG_DITTA, "CG", "ClasseIVDUtile", "");
|
||||
|
@ -21,10 +21,13 @@
|
||||
#define F_DATAFINE 115
|
||||
#define F_ANNOESE 116
|
||||
#define F_ANNORAFFR 117
|
||||
#define F_STAMPAMOVPROV 118
|
||||
#define F_NORMALI 118
|
||||
#define F_QUADRATURA 119
|
||||
#define F_SEPARATOR 120
|
||||
#define F_PICTURE 121
|
||||
#define F_PROVVM 122
|
||||
#define F_PROVVB 123
|
||||
#define F_PROVVC 124
|
||||
|
||||
#endif // __CG1600_H
|
||||
|
||||
|
@ -99,7 +99,7 @@ END
|
||||
LIST F_TIPOSTAMPA1 23
|
||||
BEGIN
|
||||
PROMPT 4 7 "Tipo stampa "
|
||||
ITEM "1|Per data "
|
||||
ITEM "1|Per data limite"
|
||||
MESSAGE HIDE,F_DATALIM
|
||||
MESSAGE RESET,F_DATALIM
|
||||
MESSAGE SHOW,F_STAMPAINT|SHOW,F_STAMPACOD|SHOW,F_STAMPAMOV
|
||||
@ -166,6 +166,8 @@ BOOLEAN F_STAMPAINT
|
||||
BEGIN
|
||||
PROMPT 4 11 "Stampa intera struttura"
|
||||
HELP "Indicare se ottenere un stampa completa nella sua struttura"
|
||||
MESSAGE RESET,F_STAMPAMOV
|
||||
MESSAGE TRUE ENABLE,F_STAMPAMOV
|
||||
END
|
||||
|
||||
BOOLEAN F_STAMPACOD
|
||||
@ -180,35 +182,39 @@ BEGIN
|
||||
HELP "Indicare se non stampare i movimenti con saldo nullo"
|
||||
END
|
||||
|
||||
/*
|
||||
BOOLEAN F_STAMPAMOVPROV
|
||||
BOOLEAN F_NORMALI
|
||||
BEGIN
|
||||
PROMPT 41 12 "Stampa movimenti provvisori"
|
||||
HELP "Indicare se stampare anche i movimenti provvisori"
|
||||
PROMPT 4 13 "Movimenti : Normali"
|
||||
END
|
||||
*/
|
||||
|
||||
LIST F_STAMPAMOVPROV 15
|
||||
BOOLEAN F_PROVVM
|
||||
BEGIN
|
||||
PROMPT 41 12 "Bilancio "
|
||||
ITEM "1|Normale"
|
||||
ITEM "2|Globale"
|
||||
ITEM "3|Solo provvisori"
|
||||
PROMPT 30 13 "Provvisori : Manuali"
|
||||
END
|
||||
|
||||
BOOLEAN F_PROVVB
|
||||
BEGIN
|
||||
PROMPT 53 13 "Comp. costi/ricavi"
|
||||
END
|
||||
|
||||
BOOLEAN F_PROVVC
|
||||
BEGIN
|
||||
PROMPT 75 13 "Cespiti"
|
||||
END
|
||||
|
||||
BOOLEAN F_STAMPAMODULO
|
||||
BEGIN
|
||||
PROMPT 4 13 "Stampa su modulo 198"
|
||||
PROMPT 4 14 "Stampa su modulo 198"
|
||||
END
|
||||
|
||||
BOOLEAN F_QUADRATURA
|
||||
BEGIN
|
||||
PROMPT 4 14 "Quadratura con Libro Giornale"
|
||||
PROMPT 4 15 "Quadratura con Libro Giornale"
|
||||
END
|
||||
|
||||
BOOLEAN F_SEPARATOR
|
||||
BEGIN
|
||||
PROMPT 4 15 "Non stampare il separatre delle migliaia"
|
||||
PROMPT 4 16 "Non stampare il separatre delle migliaia"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
@ -97,11 +97,16 @@ TSaldo::TSaldo() : _saldi(LF_SALDI), _saldoiniziale(ZERO), _saldo_iniziale(ZERO)
|
||||
|
||||
real TSaldo::saldofin_esprec(int annoes, int g, int c, long s, bool saldo_chiusura, int provv)
|
||||
{
|
||||
_significativo = false;
|
||||
_significativo = false;
|
||||
|
||||
const int annoesprec = EsePre(annoes);
|
||||
const TRectype recsaldo(_saldi.curr());
|
||||
|
||||
if (!ricerca_progr_prec(annoesprec, g, c, s)) // non ci sono esercizi prima del primo
|
||||
{
|
||||
_saldi.curr() = recsaldo;
|
||||
return ZERO;
|
||||
}
|
||||
|
||||
const char flag = _saldi.get(SLD_FLAGSALINI)[0];
|
||||
const real saldo = _saldi.get_real(SLD_SALDO);
|
||||
@ -140,6 +145,7 @@ real TSaldo::saldofin_esprec(int annoes, int g, int c, long s, bool saldo_chiusu
|
||||
}
|
||||
|
||||
_significativo = !tot.is_zero();
|
||||
_saldi.curr() = recsaldo;
|
||||
return tot;
|
||||
}
|
||||
|
||||
@ -282,7 +288,7 @@ bool TSaldo::ultima_immissione_verifica(int annoes,int g,int c,long s,int indbil
|
||||
//Si considerano i saldi e non piu' i movimenti
|
||||
char sezione;
|
||||
bool esito = false;
|
||||
|
||||
real pdarepro, paverepro, pdareprob, pavereprob, pdareproc, pavereproc;
|
||||
_saldo_iniziale = ZERO;
|
||||
_saldoiniziale = ZERO;
|
||||
_prg_dare = ZERO;
|
||||
@ -290,6 +296,8 @@ bool TSaldo::ultima_immissione_verifica(int annoes,int g,int c,long s,int indbil
|
||||
_saldo = ZERO;
|
||||
_saldofin = ZERO;
|
||||
_sezsf = ' ';
|
||||
_movimentato = false;
|
||||
_prec = false;
|
||||
|
||||
for (int i = 0; i < 12; i++)
|
||||
{
|
||||
@ -303,24 +311,16 @@ bool TSaldo::ultima_immissione_verifica(int annoes,int g,int c,long s,int indbil
|
||||
_saldi.put(SLD_CONTO,c);
|
||||
_saldi.put(SLD_SOTTOCONTO,s);
|
||||
_saldi.put(SLD_FLSCA, "");
|
||||
|
||||
if (_saldi.read() == NOERR)
|
||||
{
|
||||
// int annoe = _saldi.get_int(SLD_ANNOES);
|
||||
// int gruppo = _saldi.get_int(SLD_GRUPPO);
|
||||
// int conto = _saldi.get_int(SLD_CONTO);
|
||||
// long sottoconto = _saldi.get_long(SLD_SOTTOCONTO);
|
||||
{
|
||||
if (provv & 0x1) //bilancio normale (senza provvisori)
|
||||
{
|
||||
_saldo_iniziale = _saldi.get_real(SLD_SALDO);
|
||||
_prg_dare = _saldi.get_real(SLD_PDARE);
|
||||
_prg_avere = _saldi.get_real(SLD_PAVERE);
|
||||
|
||||
sezione = _saldi.get_char(SLD_FLAGSALINI);
|
||||
_sezsf = _saldi.get_char(SLD_FLAGSALFIN); // W96SALDI del 19-06-96 modifica richiesta
|
||||
_saldofin = _saldi.get_real(SLD_SALDOFIN); // da PATRIZIA
|
||||
|
||||
if (provv == 1) //bilancio normale (senza provvisori)
|
||||
if (_saldo_iniziale.is_zero() && _prg_dare.is_zero() && _prg_avere.is_zero())
|
||||
return esito;
|
||||
if (sezione == 'A')
|
||||
_saldo_iniziale = -_saldo_iniziale;
|
||||
if (_sezsf == 'A')
|
||||
@ -329,37 +329,42 @@ bool TSaldo::ultima_immissione_verifica(int annoes,int g,int c,long s,int indbil
|
||||
_saldoiniziale = _saldo_iniziale; //saldo iniziale presente sul record saldi
|
||||
//non comprensivo del saldo finale es.precedente
|
||||
|
||||
if (_saldo_iniziale.is_zero() && !(provv & 0x1))
|
||||
{
|
||||
if (indbil == 1 || indbil == 2 || indbil == 5)
|
||||
_saldo_iniziale += saldofin_esprec(annoes, g, c, s, false, provv);
|
||||
}
|
||||
|
||||
esito = true;
|
||||
_saldo = _saldo_iniziale + _saldofin;
|
||||
if (!(provv & 0x1))
|
||||
{
|
||||
_prg_dare = ZERO;
|
||||
_prg_avere = ZERO;
|
||||
}
|
||||
|
||||
if (provv & 0x2)
|
||||
{
|
||||
_prg_dare += _saldi.get_real(SLD_PDAREPRO);
|
||||
_prg_avere += _saldi.get_real(SLD_PAVEREPRO);
|
||||
}
|
||||
if (provv & 0x4)
|
||||
{
|
||||
_prg_dare += _saldi.get_real(SLD_PDAREPROB);
|
||||
_prg_avere += _saldi.get_real(SLD_PAVEREPROB);
|
||||
}
|
||||
if (provv & 0x8)
|
||||
{
|
||||
_prg_dare += _saldi.get_real(SLD_PDAREPROC);
|
||||
_prg_avere += _saldi.get_real(SLD_PAVEREPROC);
|
||||
}
|
||||
pdarepro = _saldi.get_real(SLD_PDAREPRO);
|
||||
paverepro = _saldi.get_real(SLD_PAVEREPRO);
|
||||
pdareprob = _saldi.get_real(SLD_PDAREPROB);
|
||||
pavereprob = _saldi.get_real(SLD_PAVEREPROB);
|
||||
pdareproc = _saldi.get_real(SLD_PDAREPROC);
|
||||
pavereproc = _saldi.get_real(SLD_PAVEREPROC);
|
||||
}
|
||||
return esito;
|
||||
if (provv & 0x1 && _saldo_iniziale.is_zero())
|
||||
if (indbil == 1 || indbil == 2 || indbil == 5)
|
||||
{
|
||||
_prec = true;
|
||||
_saldo_iniziale += saldofin_esprec(annoes, g, c, s, false, provv);
|
||||
}
|
||||
if ((provv == 1) && (_saldo_iniziale == ZERO) && (_prg_dare == ZERO) && (_prg_avere == ZERO))
|
||||
return false;
|
||||
if (provv & 0x2)
|
||||
{
|
||||
_prg_dare += pdarepro;
|
||||
_prg_avere += paverepro;
|
||||
}
|
||||
if (provv & 0x4)
|
||||
{
|
||||
_prg_dare += pdareprob;
|
||||
_prg_avere += pavereprob;
|
||||
}
|
||||
if (provv & 0x8)
|
||||
{
|
||||
_prg_dare += pdareproc;
|
||||
_prg_avere += pavereproc;
|
||||
}
|
||||
_saldo = _saldo_iniziale + _prg_dare - _prg_avere;
|
||||
if (provv == 1)
|
||||
_saldo += _saldofin;
|
||||
_movimentato = (_saldo_iniziale != ZERO) || (_prg_dare != ZERO) || (_prg_avere != ZERO);
|
||||
return _movimentato;
|
||||
}
|
||||
|
||||
//per bilancio a sezioni contrapposte all'ultima immissione
|
||||
@ -379,6 +384,7 @@ bool TSaldo::ultima_immissione_bilancio(int annoes,int g,int c,long s,int indbil
|
||||
bool esito = false;
|
||||
|
||||
_saldo_iniziale = ZERO;
|
||||
_saldoiniziale = ZERO;
|
||||
_prg_dare = ZERO;
|
||||
_prg_avere = ZERO;
|
||||
_saldo = ZERO;
|
||||
@ -387,6 +393,7 @@ bool TSaldo::ultima_immissione_bilancio(int annoes,int g,int c,long s,int indbil
|
||||
_rec_presente_ec = false;
|
||||
_rec_presente_ep = false;
|
||||
_prec = false;
|
||||
_movimentato = false;
|
||||
|
||||
for (int i = 0; i < 12; i++)
|
||||
{
|
||||
@ -400,67 +407,63 @@ bool TSaldo::ultima_immissione_bilancio(int annoes,int g,int c,long s,int indbil
|
||||
_saldi.put(SLD_CONTO,c);
|
||||
_saldi.put(SLD_SOTTOCONTO,s);
|
||||
_saldi.put(SLD_FLSCA, "");
|
||||
|
||||
if (_saldi.read() == NOERR)
|
||||
{
|
||||
// annoe = _saldi.get_int(SLD_ANNOES);
|
||||
// gruppo = _saldi.get_int(SLD_GRUPPO);
|
||||
// conto = _saldi.get_int(SLD_CONTO);
|
||||
// sottoconto = _saldi.get_long(SLD_SOTTOCONTO);
|
||||
_rec_presente_ec = true;
|
||||
if (provv & 0x1) //bilancio normale (senza provvisori)
|
||||
{
|
||||
_saldo_iniziale = _saldi.get_real(SLD_SALDO);
|
||||
_prg_dare = _saldi.get_real(SLD_PDARE);
|
||||
_prg_avere = _saldi.get_real(SLD_PAVERE);
|
||||
pdarepro = _saldi.get_real(SLD_PDAREPRO);
|
||||
paverepro = _saldi.get_real(SLD_PAVEREPRO);
|
||||
pdareprob = _saldi.get_real(SLD_PDAREPROB);
|
||||
pavereprob = _saldi.get_real(SLD_PAVEREPROB);
|
||||
pdareproc = _saldi.get_real(SLD_PDAREPROC);
|
||||
pavereproc = _saldi.get_real(SLD_PAVEREPROC);
|
||||
sezione = _saldi.get_char(SLD_FLAGSALINI);
|
||||
_sezsf = _saldi.get_char(SLD_FLAGSALFIN);
|
||||
_saldofin = _saldi.get_real(SLD_SALDOFIN);
|
||||
|
||||
esito = false;
|
||||
if (provv & 0x1)
|
||||
esito |= (_saldo_iniziale != ZERO || _prg_dare != ZERO || _prg_avere != ZERO);
|
||||
if (provv & 0x2) // (con provvisori manuali)
|
||||
esito |= (pdarepro != ZERO || paverepro != ZERO);
|
||||
if (provv & 0x4) // (con provvisori bilancio costi/ricavi)
|
||||
esito |= (pdareprob != ZERO || pavereprob != ZERO);
|
||||
if (provv & 0x8) // (con provvisori cespiti)
|
||||
esito |= (pdareproc != ZERO || pavereproc != ZERO);
|
||||
|
||||
if (sezione == 'A')
|
||||
_saldo_iniziale = -_saldo_iniziale;
|
||||
|
||||
if (saldo_chiusura) // W96SALDI modifica inserita per il discorso di inclusione oppure
|
||||
if (_sezsf == 'A') // no del saldo di chiusura inserita il 09-07-96
|
||||
_saldofin = -_saldofin;
|
||||
|
||||
_rec_presente_ec = esito;
|
||||
}
|
||||
|
||||
if (_saldo_iniziale.is_zero() && (provv & 0x1))
|
||||
if (indbil == 1 || indbil == 2 || indbil == 5)
|
||||
{
|
||||
_prec = true;
|
||||
_saldo_iniziale += saldofin_esprec(annoes, g, c, s, false, provv);
|
||||
}
|
||||
|
||||
_saldo = ZERO;
|
||||
if (provv & 0x1)
|
||||
_saldo += _saldo_iniziale + _prg_dare - _prg_avere;
|
||||
if (provv & 0x2) // (con provvisori manuali)
|
||||
_saldo += pdarepro - paverepro;
|
||||
if (provv & 0x4) // (con provvisori bilancio costi/ricavi)
|
||||
_saldo += pdareprob - pavereprob;
|
||||
if (provv & 0x8) // (con provvisori cespiti)
|
||||
_saldo += pdareproc - pavereproc;
|
||||
if (saldo_chiusura && (provv & 0x1)) // W96SALDI modifica inserita per il discorso di inclusione oppure
|
||||
_saldo += _saldofin; // no del saldo di chiusura inserita il 09-07-96
|
||||
|
||||
return esito;
|
||||
_saldoiniziale = _saldo_iniziale; //saldo iniziale presente sul record saldi
|
||||
//non comprensivo del saldo finale es.precedente
|
||||
}
|
||||
pdarepro = _saldi.get_real(SLD_PDAREPRO);
|
||||
paverepro = _saldi.get_real(SLD_PAVEREPRO);
|
||||
pdareprob = _saldi.get_real(SLD_PDAREPROB);
|
||||
pavereprob = _saldi.get_real(SLD_PAVEREPROB);
|
||||
pdareproc = _saldi.get_real(SLD_PDAREPROC);
|
||||
pavereproc = _saldi.get_real(SLD_PAVEREPROC);
|
||||
}
|
||||
if (_saldo_iniziale.is_zero() && (provv & 0x1))
|
||||
if (indbil == 1 || indbil == 2 || indbil == 5)
|
||||
{
|
||||
_prec = true;
|
||||
_saldo_iniziale += saldofin_esprec(annoes, g, c, s, false, provv);
|
||||
}
|
||||
if ((provv == 1) && (_saldo_iniziale == ZERO) && (_prg_dare == ZERO) && (_prg_avere == ZERO))
|
||||
return false;
|
||||
|
||||
if (provv & 0x2)
|
||||
{
|
||||
_prg_dare += pdarepro;
|
||||
_prg_avere += paverepro;
|
||||
}
|
||||
if (provv & 0x4)
|
||||
{
|
||||
_prg_dare += pdareprob;
|
||||
_prg_avere += pavereprob;
|
||||
}
|
||||
if (provv & 0x8)
|
||||
{
|
||||
_prg_dare += pdareproc;
|
||||
_prg_avere += pavereproc;
|
||||
}
|
||||
_saldo = _saldo_iniziale + _prg_dare - _prg_avere;
|
||||
if (saldo_chiusura && (provv & 0x1)) // W96SALDI modifica inserita per il discorso di inclusione oppure
|
||||
_saldo += _saldofin; // no del saldo di chiusura inserita il 09-07-96
|
||||
_movimentato = (_saldo_iniziale != ZERO) || (_prg_dare != ZERO) || (_prg_avere != ZERO);
|
||||
return _movimentato;
|
||||
}
|
||||
|
||||
const real& TSaldo::saldo_periodo(int g, int c, long s, const TDate& dal, const TDate& al,
|
||||
int indbil, int provv)
|
||||
|
Loading…
x
Reference in New Issue
Block a user