Correzioni alla list movimenti e registri
git-svn-id: svn://10.65.10.50/trunk@938 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d213fb20d1
commit
e1ec472777
@ -119,11 +119,11 @@ public:
|
|||||||
bool segnala_errori_primariga();
|
bool segnala_errori_primariga();
|
||||||
bool segnala_errori_ogniriga();
|
bool segnala_errori_ogniriga();
|
||||||
bool segnala_errori_iva();
|
bool segnala_errori_iva();
|
||||||
bool contropartita();
|
bool contropartita(int, int, long, char);
|
||||||
void stampa_errori_rmov();
|
void stampa_errori_rmov();
|
||||||
void stampa_errori_mov();
|
void stampa_errori_mov();
|
||||||
void stampa_errori_iva(int*,const char*,const int,const int);
|
void stampa_errori_iva(int*,const char*,const int,const int);
|
||||||
void stampa_errori_contropartita();
|
void stampa_errori_contropartita(int, int, long, char);
|
||||||
void stampa_intestazione();
|
void stampa_intestazione();
|
||||||
void incrementa_totali();
|
void incrementa_totali();
|
||||||
void compila_clifo();
|
void compila_clifo();
|
||||||
@ -600,6 +600,10 @@ void TListaMov_application::stampa_errori_rmov()
|
|||||||
TDate datareg = rec.get_date(RMV_DATAREG);
|
TDate datareg = rec.get_date(RMV_DATAREG);
|
||||||
char sez = rec.get_char(RMV_SEZIONE);
|
char sez = rec.get_char(RMV_SEZIONE);
|
||||||
char tipo = rec.get_char(RMV_TIPOC);
|
char tipo = rec.get_char(RMV_TIPOC);
|
||||||
|
int gruppoc = rec.get_int(RMV_GRUPPOC);
|
||||||
|
int contoc = rec.get_int(RMV_CONTOC);
|
||||||
|
long sottocontoc = rec.get_long(RMV_SOTTOCONTOC);
|
||||||
|
char tipoc = rec.get_char(RMV_TIPOCC);
|
||||||
|
|
||||||
bool g = FALSE;
|
bool g = FALSE;
|
||||||
char t;
|
char t;
|
||||||
@ -679,19 +683,20 @@ void TListaMov_application::stampa_errori_rmov()
|
|||||||
set_row(_nr++, "@11gCodice gruppo/conto/sottoconto non presente in Saldi p.d.c.");
|
set_row(_nr++, "@11gCodice gruppo/conto/sottoconto non presente in Saldi p.d.c.");
|
||||||
|
|
||||||
//TRecnotype numrec = current_cursor()->file(LF_RMOV).recno();
|
//TRecnotype numrec = current_cursor()->file(LF_RMOV).recno();
|
||||||
//stampa_errori_contropartita();
|
if (gruppoc != 0 || contoc != 0 || sottocontoc != 0l)
|
||||||
|
stampa_errori_contropartita(gruppoc, contoc, sottocontoc, tipoc);
|
||||||
//current_cursor()->file(LF_RMOV).readat(numrec);
|
//current_cursor()->file(LF_RMOV).readat(numrec);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TListaMov_application::stampa_errori_contropartita()
|
void TListaMov_application::stampa_errori_contropartita(int gruppo, int conto, long sottoconto, char t)
|
||||||
{
|
{
|
||||||
TLocalisamfile& rmov = current_cursor()->file(LF_RMOV);
|
//TLocalisamfile& rmov = current_cursor()->file(LF_RMOV);
|
||||||
char t;
|
//int gruppo = rmov.get_int (RMV_GRUPPOC);
|
||||||
int gruppo = rmov.get_int (RMV_GRUPPOC);
|
//int conto = rmov.get_int (RMV_CONTOC);
|
||||||
int conto = rmov.get_int (RMV_CONTOC);
|
//long sottoconto = rmov.get_long(RMV_SOTTOCONTOC);
|
||||||
long sottoconto = rmov.get_long(RMV_SOTTOCONTOC);
|
//char t;
|
||||||
|
|
||||||
bool g = FALSE;
|
bool g = FALSE;
|
||||||
|
|
||||||
TConto tc;
|
TConto tc;
|
||||||
TRectype pc (_pcon->curr());
|
TRectype pc (_pcon->curr());
|
||||||
tc.set(gruppo,0,0l);
|
tc.set(gruppo,0,0l);
|
||||||
@ -702,7 +707,7 @@ void TListaMov_application::stampa_errori_contropartita()
|
|||||||
set_row(_nr++, "@11gCodice gruppo/conto/sottoconto di contropartita non presente in Piano dei Conti");
|
set_row(_nr++, "@11gCodice gruppo/conto/sottoconto di contropartita non presente in Piano dei Conti");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
t = pc.get_char(PCN_TMCF);
|
//t = pc.get_char(PCN_TMCF);
|
||||||
tc.set(gruppo,conto,sottoconto);
|
tc.set(gruppo,conto,sottoconto);
|
||||||
if (t != 'C' && t != 'F')
|
if (t != 'C' && t != 'F')
|
||||||
{
|
{
|
||||||
@ -715,7 +720,7 @@ void TListaMov_application::stampa_errori_contropartita()
|
|||||||
set_row(_nr++, "@11gCodice gruppo/conto/sottoconto di contropartita sospeso in Piano dei Conti");
|
set_row(_nr++, "@11gCodice gruppo/conto/sottoconto di contropartita sospeso in Piano dei Conti");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (sottoconto != 0l)
|
||||||
{
|
{
|
||||||
TLocalisamfile clifo(LF_CLIFO);
|
TLocalisamfile clifo(LF_CLIFO);
|
||||||
clifo.setkey(1);
|
clifo.setkey(1);
|
||||||
@ -1687,13 +1692,13 @@ else _err.set(3);
|
|||||||
}
|
}
|
||||||
|
|
||||||
//controlli sulla contropartita
|
//controlli sulla contropartita
|
||||||
bool TListaMov_application::contropartita()
|
bool TListaMov_application::contropartita(int gruppo, int conto, long sottoconto, char t)
|
||||||
{
|
{
|
||||||
char t;
|
//char t;
|
||||||
TLocalisamfile rmov(LF_RMOV,FALSE);
|
//TLocalisamfile rmov(LF_RMOV,FALSE);
|
||||||
int gruppo = rmov.get_int (RMV_GRUPPOC);
|
//int gruppo = rmov.get_int (RMV_GRUPPOC);
|
||||||
int conto = rmov.get_int (RMV_CONTOC);
|
//int conto = rmov.get_int (RMV_CONTOC);
|
||||||
long sottoconto = rmov.get_long(RMV_SOTTOCONTOC);
|
//long sottoconto = rmov.get_long(RMV_SOTTOCONTOC);
|
||||||
|
|
||||||
TConto tc;
|
TConto tc;
|
||||||
TRectype pc (_pcon->curr());
|
TRectype pc (_pcon->curr());
|
||||||
@ -1703,7 +1708,7 @@ bool TListaMov_application::contropartita()
|
|||||||
tc.set(gruppo,conto,0l);
|
tc.set(gruppo,conto,0l);
|
||||||
if (!tc.read(pc))
|
if (!tc.read(pc))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else t = pc.get_char(PCN_TMCF);
|
//else t = pc.get_char(PCN_TMCF);
|
||||||
tc.set(gruppo,conto,sottoconto);
|
tc.set(gruppo,conto,sottoconto);
|
||||||
if (t != 'C' && t != 'F')
|
if (t != 'C' && t != 'F')
|
||||||
{
|
{
|
||||||
@ -1716,7 +1721,7 @@ bool TListaMov_application::contropartita()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (sottoconto != 0l)
|
||||||
{
|
{
|
||||||
TLocalisamfile clifo(LF_CLIFO);
|
TLocalisamfile clifo(LF_CLIFO);
|
||||||
clifo.setkey(1);
|
clifo.setkey(1);
|
||||||
@ -1739,10 +1744,10 @@ bool TListaMov_application::contropartita()
|
|||||||
bool TListaMov_application::segnala_errori_ogniriga()
|
bool TListaMov_application::segnala_errori_ogniriga()
|
||||||
{
|
{
|
||||||
TLocalisamfile& rmov = current_cursor()->file(LF_RMOV);
|
TLocalisamfile& rmov = current_cursor()->file(LF_RMOV);
|
||||||
int gruppo, conto, anno;
|
int gruppo, conto, anno, gruppoc, contoc;
|
||||||
long sottoconto;
|
long sottoconto, sottocontoc;
|
||||||
TDate datareg;
|
TDate datareg;
|
||||||
char sez, tipo, t;
|
char sez, tipo, t, tipoc;
|
||||||
|
|
||||||
if (current_cursor()->is_first_match(LF_RMOV))
|
if (current_cursor()->is_first_match(LF_RMOV))
|
||||||
{
|
{
|
||||||
@ -1758,6 +1763,10 @@ bool TListaMov_application::segnala_errori_ogniriga()
|
|||||||
gruppo = rec.get_int(RMV_GRUPPO);
|
gruppo = rec.get_int(RMV_GRUPPO);
|
||||||
conto = rec.get_int(RMV_CONTO);
|
conto = rec.get_int(RMV_CONTO);
|
||||||
sottoconto = rec.get_long(RMV_SOTTOCONTO);
|
sottoconto = rec.get_long(RMV_SOTTOCONTO);
|
||||||
|
gruppoc = rec.get_int(RMV_GRUPPOC);
|
||||||
|
contoc = rec.get_int(RMV_CONTOC);
|
||||||
|
sottocontoc = rec.get_long(RMV_SOTTOCONTOC);
|
||||||
|
tipoc = rec.get_char(RMV_TIPOCC);
|
||||||
anno = rec.get_int(RMV_ANNOES);
|
anno = rec.get_int(RMV_ANNOES);
|
||||||
datareg = rec.get_date(RMV_DATAREG);
|
datareg = rec.get_date(RMV_DATAREG);
|
||||||
sez = rec.get_char(RMV_SEZIONE);
|
sez = rec.get_char(RMV_SEZIONE);
|
||||||
@ -1765,15 +1774,14 @@ bool TListaMov_application::segnala_errori_ogniriga()
|
|||||||
|
|
||||||
TConto tc (gruppo,conto,sottoconto);
|
TConto tc (gruppo,conto,sottoconto);
|
||||||
|
|
||||||
/*
|
// TRecnotype numerorec = rmov.recno();
|
||||||
TRecnotype numerorec = rmov.recno();
|
if (contropartita(gruppoc, contoc, sottocontoc, tipoc))
|
||||||
if (contropartita())
|
// {
|
||||||
{
|
// rmov.readat(nrec);
|
||||||
rmov.readat(nrec);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
// }
|
||||||
rmov.readat(numerorec);
|
// rmov.readat(numerorec);
|
||||||
*/
|
|
||||||
if (anno != _annoeser || datareg != _datareg)
|
if (anno != _annoeser || datareg != _datareg)
|
||||||
{
|
{
|
||||||
rmov.readat(nrec);
|
rmov.readat(nrec);
|
||||||
@ -2227,7 +2235,9 @@ void TListaMov_application::init_print(const TMask& msk)
|
|||||||
set_real_picture("###.###.###.###");
|
set_real_picture("###.###.###.###");
|
||||||
|
|
||||||
TDate data (msk.get(F_DATASTAMPA));
|
TDate data (msk.get(F_DATASTAMPA));
|
||||||
|
|
||||||
printer().setdate(data);
|
printer().setdate(data);
|
||||||
|
printer().footerlen(5);
|
||||||
|
|
||||||
switch (_tipo_lista)
|
switch (_tipo_lista)
|
||||||
{
|
{
|
||||||
|
100
cg/cg4400.cpp
100
cg/cg4400.cpp
@ -22,11 +22,12 @@ bool CG4400_application::filter_func (const TRelation * r)
|
|||||||
if ( (datareg < app()._data_da || datareg > app()._data_a ) || (!datareg.ok()) )
|
if ( (datareg < app()._data_da || datareg > app()._data_a ) || (!datareg.ok()) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
//if (app()._tipo_stampa == 2 || app()._tipo_stampa == 4) //stampa di bollato
|
|
||||||
if (app()._tipo_stampa != 1) //stampa di bollato
|
if (app()._tipo_stampa != 1) //stampa di bollato
|
||||||
if (regst) //il movimento e' gia' stato stampato in forma definitiva
|
if (regst) //il movimento e' gia' stato stampato in forma definitiva
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (datareg.month() < app()._stampa_mese)
|
||||||
|
app()._stampa_mese = datareg.month();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -826,7 +827,6 @@ int CG4400_application::riga_rmoviva()
|
|||||||
int tipodet, tipocr, tipoatt;
|
int tipodet, tipocr, tipoatt;
|
||||||
bool intra;
|
bool intra;
|
||||||
|
|
||||||
//_cur->save_status();
|
|
||||||
TLocalisamfile& rmoviva = _cur->file(LF_RMOVIVA);
|
TLocalisamfile& rmoviva = _cur->file(LF_RMOVIVA);
|
||||||
bool ok = _cur->is_first_match(LF_RMOVIVA);
|
bool ok = _cur->is_first_match(LF_RMOVIVA);
|
||||||
int nrec = 0;
|
int nrec = 0;
|
||||||
@ -865,7 +865,6 @@ int CG4400_application::riga_rmoviva()
|
|||||||
|
|
||||||
ok = _cur->next_match(LF_RMOVIVA);
|
ok = _cur->next_match(LF_RMOVIVA);
|
||||||
}
|
}
|
||||||
//_cur->restore_status();
|
|
||||||
rmoviva.readat(nr);
|
rmoviva.readat(nr);
|
||||||
|
|
||||||
return nrec;
|
return nrec;
|
||||||
@ -968,11 +967,9 @@ bool CG4400_application::controlla_mov()
|
|||||||
{
|
{
|
||||||
TLocalisamfile mov (LF_MOV);
|
TLocalisamfile mov (LF_MOV);
|
||||||
bool ok = TRUE;
|
bool ok = TRUE;
|
||||||
bool first = TRUE;
|
|
||||||
byte tipo;
|
byte tipo;
|
||||||
TString16 ditta = "";
|
TString16 ditta = "";
|
||||||
TRecnotype rec = _tabreg->recno();
|
TRecnotype rec = _tabreg->recno();
|
||||||
_stampa_mese = 0;
|
|
||||||
for (mov.first(); !mov.eof(); mov.next())
|
for (mov.first(); !mov.eof(); mov.next())
|
||||||
{
|
{
|
||||||
TString16 reg = mov.get(MOV_REG);
|
TString16 reg = mov.get(MOV_REG);
|
||||||
@ -990,12 +987,6 @@ bool CG4400_application::controlla_mov()
|
|||||||
if (!stampato)
|
if (!stampato)
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
}
|
}
|
||||||
if ( datareg.year() == _annoes && first)
|
|
||||||
if (!stampato)
|
|
||||||
{
|
|
||||||
_stampa_mese = datareg.month();
|
|
||||||
first = FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_tabreg->readat(rec);
|
_tabreg->readat(rec);
|
||||||
@ -1333,7 +1324,6 @@ void CG4400_application::set_page_tot_reg()
|
|||||||
|
|
||||||
rr = stampa_prospetto();
|
rr = stampa_prospetto();
|
||||||
|
|
||||||
//if (_nrec > 0) //numero di records di rmoviva
|
|
||||||
if (_esiste_riga_iva && _stampa)
|
if (_esiste_riga_iva && _stampa)
|
||||||
{
|
{
|
||||||
real tot_imponib, tot_imposta, tot_lordo, tot_imponibp, tot_impostap, tot_lordop;
|
real tot_imponib, tot_imposta, tot_lordo, tot_imponibp, tot_impostap, tot_lordop;
|
||||||
@ -1603,7 +1593,15 @@ bool CG4400_application::compila_reg(const TMask& m)
|
|||||||
codtab << _annoes << _codreg;
|
codtab << _annoes << _codreg;
|
||||||
_tabreg->zero();
|
_tabreg->zero();
|
||||||
_tabreg->put("CODTAB", codtab);
|
_tabreg->put("CODTAB", codtab);
|
||||||
if (_tabreg->read() == NOERR)
|
if (_tabreg->read() != NOERR)
|
||||||
|
{
|
||||||
|
if (_tipo_stampa != 3)
|
||||||
|
{
|
||||||
|
warning_box("Il registro IVA specificato non esiste nella \n Ditta %ld", _ditta);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
_tipo_reg = _tabreg->get_int("I0");
|
_tipo_reg = _tabreg->get_int("I0");
|
||||||
if (_tipo_reg == 1 || _tipo_reg == 2) //registro iva
|
if (_tipo_reg == 1 || _tipo_reg == 2) //registro iva
|
||||||
@ -1611,13 +1609,7 @@ bool CG4400_application::compila_reg(const TMask& m)
|
|||||||
cod_lib_un = _tabreg->get("S6");
|
cod_lib_un = _tabreg->get("S6");
|
||||||
sca_vid = _tabreg->get_date("D0");
|
sca_vid = _tabreg->get_date("D0");
|
||||||
if (_tipo_stampa != 1)
|
if (_tipo_stampa != 1)
|
||||||
{
|
|
||||||
_u_data = _tabreg->get_date ("D3");
|
_u_data = _tabreg->get_date ("D3");
|
||||||
/*
|
|
||||||
if (!_u_data.ok())
|
|
||||||
_u_data = format("01/01/%4d", _annoes);
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
if ( _tipo_stampa == 2 || _tipo_stampa == 4 )
|
if ( _tipo_stampa == 2 || _tipo_stampa == 4 )
|
||||||
{
|
{
|
||||||
if (_u_data.ok())
|
if (_u_data.ok())
|
||||||
@ -1665,11 +1657,7 @@ bool CG4400_application::compila_reg(const TMask& m)
|
|||||||
_attivita = desc_attivita();
|
_attivita = desc_attivita();
|
||||||
_desc_lib = _tabreg->get ("S0");
|
_desc_lib = _tabreg->get ("S0");
|
||||||
}
|
}
|
||||||
}
|
else return FALSE;
|
||||||
else if (_tipo_stampa != 3)
|
|
||||||
{
|
|
||||||
warning_box("Il registro IVA specificato non esiste nella \n Ditta %ld", _ditta);
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -2008,8 +1996,6 @@ void CG4400_application::aggiorna_reg()
|
|||||||
TTable Tabreg ("REG");
|
TTable Tabreg ("REG");
|
||||||
TTable TabInl ("%INL");
|
TTable TabInl ("%INL");
|
||||||
int mese;
|
int mese;
|
||||||
//long pag;
|
|
||||||
//long stampate;
|
|
||||||
|
|
||||||
word ultimast = get_page_number();
|
word ultimast = get_page_number();
|
||||||
if (_stampa_tutti_i_registri) //ho fatto un salto pagina dopo avere stampato un registro
|
if (_stampa_tutti_i_registri) //ho fatto un salto pagina dopo avere stampato un registro
|
||||||
@ -2088,18 +2074,14 @@ void CG4400_application::aggiorna_reg()
|
|||||||
TString16 numero_riga = cod_inl.mid(7,6);
|
TString16 numero_riga = cod_inl.mid(7,6);
|
||||||
cod << codtab << numero_riga;
|
cod << codtab << numero_riga;
|
||||||
}
|
}
|
||||||
//long numini = _pagine_stampate + 1;
|
|
||||||
nuovo.put("CODTAB", cod);
|
nuovo.put("CODTAB", cod);
|
||||||
nuovo.put("I0", (long)_annoes);
|
nuovo.put("I0", (long)_annoes);
|
||||||
nuovo.put("I1", (long)_fino_a_mese); // su libro unico ho un solo mese in gioco!
|
nuovo.put("I1", (long)_fino_a_mese); // su libro unico ho un solo mese in gioco!
|
||||||
nuovo.put("I2", (long)(_primast + 1)); // numero iniziale pagina libro unico
|
nuovo.put("I2", (long)(_primast + 1)); // numero iniziale pagina libro unico
|
||||||
//nuovo.put("I3", (long)(_primast + ultimast)); // numero finale pagina libro unico
|
|
||||||
nuovo.put("I3", (long)(_u_stampata)); // numero finale pagina libro unico
|
nuovo.put("I3", (long)(_u_stampata)); // numero finale pagina libro unico
|
||||||
nuovo.put("I4", get_firm());
|
nuovo.put("I4", get_firm());
|
||||||
nuovo.put("S0", _codreg);
|
nuovo.put("S0", _codreg);
|
||||||
nuovo.put("S1", _codice_vidi);
|
nuovo.put("S1", _codice_vidi);
|
||||||
//nuovo.put("I5", (long)numini); //numero iniziale pagina registro utente
|
|
||||||
//nuovo.put("I6", (long)(numini + ultimast - 1)); //numero finale pagina registro utente
|
|
||||||
nuovo.put("I5", (long)(_numini + 1));
|
nuovo.put("I5", (long)(_numini + 1));
|
||||||
nuovo.put("I6", (long)_pagine_stampate);
|
nuovo.put("I6", (long)_pagine_stampate);
|
||||||
|
|
||||||
@ -2108,7 +2090,6 @@ void CG4400_application::aggiorna_reg()
|
|||||||
else
|
else
|
||||||
TabInl.write(nuovo);
|
TabInl.write(nuovo);
|
||||||
|
|
||||||
//_u_stampata += ultimast; //ultima pagina stampata sul libro unico
|
|
||||||
aggiorna_lib();
|
aggiorna_lib();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2346,7 +2327,6 @@ bool CG4400_application::set_print(int n)
|
|||||||
_rif_vid = m.get_bool(RIF_VID);
|
_rif_vid = m.get_bool(RIF_VID);
|
||||||
_primast = _u_stampata;
|
_primast = _u_stampata;
|
||||||
_data_da = format("01/%02d/%04d", _fino_a_mese, _annoes);
|
_data_da = format("01/%02d/%04d", _fino_a_mese, _annoes);
|
||||||
//set_page_number(_u_stampata + 1);
|
|
||||||
}
|
}
|
||||||
if (_fino_a_mese == 12)
|
if (_fino_a_mese == 12)
|
||||||
{
|
{
|
||||||
@ -2407,6 +2387,7 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
|
|||||||
_ditta = _ditte->row(i).get_long(1);
|
_ditta = _ditte->row(i).get_long(1);
|
||||||
_frequiva = _ditte->row(i).get_char(3);
|
_frequiva = _ditte->row(i).get_char(3);
|
||||||
_intesta_liq = FALSE;
|
_intesta_liq = FALSE;
|
||||||
|
_stampa_mese = 13;
|
||||||
TApplication::set_firm(_ditta);
|
TApplication::set_firm(_ditta);
|
||||||
look_lia();
|
look_lia();
|
||||||
ok = compila_reg(m);
|
ok = compila_reg(m);
|
||||||
@ -2427,10 +2408,9 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
|
|||||||
ok = controlla_liquidazione();
|
ok = controlla_liquidazione();
|
||||||
if (!ok) continue;
|
if (!ok) continue;
|
||||||
}
|
}
|
||||||
(*_cur) = 0L;
|
(*_cur) = 0L; //la filter function viene chiamata quando posiziono il cursore
|
||||||
|
if (_stampa_mese == 13) _stampa_mese = 0;
|
||||||
const long item = _cur->items();
|
const long item = _cur->items();
|
||||||
if (item > 0) //cioe' se ci sono dei movimenti da stampare
|
|
||||||
{
|
|
||||||
if (_tipo_stampa == 2 || _tipo_stampa == 4)
|
if (_tipo_stampa == 2 || _tipo_stampa == 4)
|
||||||
{
|
{
|
||||||
TMask mb("cg4400b");
|
TMask mb("cg4400b");
|
||||||
@ -2446,19 +2426,22 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
|
|||||||
KEY tasto = mb.run();
|
KEY tasto = mb.run();
|
||||||
if (tasto != K_ENTER) continue;
|
if (tasto != K_ENTER) continue;
|
||||||
}
|
}
|
||||||
|
if (item > 0l)
|
||||||
|
{
|
||||||
if (_tipo_stampa != 1)
|
if (_tipo_stampa != 1)
|
||||||
{
|
{
|
||||||
TFilename t;
|
TFilename t;
|
||||||
t.temp();
|
t.temp();
|
||||||
send_message('C',t, _fino_a_mese);
|
send_message('C',t, _fino_a_mese);
|
||||||
}
|
}
|
||||||
|
|
||||||
print();
|
print();
|
||||||
|
|
||||||
if (_tipo_stampa != 3 && _liquidazione)
|
if (_tipo_stampa != 3 && _liquidazione)
|
||||||
stampa_liq_mesi_succ();
|
stampa_liq_mesi_succ();
|
||||||
}
|
}
|
||||||
else //non ci sono movimenti da stampare nel periodo richiesto!
|
else //non ci sono movimenti da stampare nel periodo richiesto!
|
||||||
{
|
{
|
||||||
_mov_empty = TRUE;
|
_mov_empty = TRUE;
|
||||||
if (_liquidazione)
|
if (_liquidazione)
|
||||||
{
|
{
|
||||||
@ -2491,23 +2474,24 @@ else //non ci sono movimenti da stampare nel periodo richiesto!
|
|||||||
if (fexist(nomef))
|
if (fexist(nomef))
|
||||||
{
|
{
|
||||||
_intesta_liq = TRUE;
|
_intesta_liq = TRUE;
|
||||||
if (m > da) printer().formfeed();
|
//if (m > da) printer().formfeed();
|
||||||
merge_export_file(t,FALSE,TRUE);
|
merge_export_file(t,FALSE,TRUE);
|
||||||
|
printer().formfeed();
|
||||||
_intesta_liq = FALSE;
|
_intesta_liq = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printer().close();
|
}
|
||||||
|
if (printer().isopen()) printer().close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (_tipo_stampa == 3 && _rif_vid)
|
||||||
if (_tipo_stampa == 3 && _rif_vid)
|
{
|
||||||
{
|
|
||||||
_intesta_vidi = TRUE;
|
_intesta_vidi = TRUE;
|
||||||
stampa_vidi(); //stampa riferimenti vidimazione
|
stampa_vidi(); //stampa riferimenti vidimazione
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else //stampa tutti i registri
|
else //stampa tutti i registri
|
||||||
{
|
{
|
||||||
TString16 codtab, cod_lib_un;
|
TString16 codtab, cod_lib_un;
|
||||||
int anno;
|
int anno;
|
||||||
TDate sca_vid;
|
TDate sca_vid;
|
||||||
@ -2576,14 +2560,16 @@ else //stampa tutti i registri
|
|||||||
_stampa_ind_ditta = _tabreg->get_bool ("B9");
|
_stampa_ind_ditta = _tabreg->get_bool ("B9");
|
||||||
_stampa_ind_comp = _tabreg->get_bool ("B5");
|
_stampa_ind_comp = _tabreg->get_bool ("B5");
|
||||||
_stampa_cred_pre = _tabreg->get_bool ("B4");
|
_stampa_cred_pre = _tabreg->get_bool ("B4");
|
||||||
|
|
||||||
|
_stampa_mese = 13;
|
||||||
|
|
||||||
_cur->set_filterfunction(NULL);
|
_cur->set_filterfunction(NULL);
|
||||||
_cur->set_filterfunction(filter_func);
|
_cur->set_filterfunction(filter_func);
|
||||||
|
|
||||||
// Vado a vedere se ci sono movimenti
|
// Vado a vedere se ci sono movimenti
|
||||||
(*_cur) = 0L;
|
(*_cur) = 0L;
|
||||||
|
if (_stampa_mese == 13) _stampa_mese = 0;
|
||||||
const long items = _cur->items();
|
const long items = _cur->items();
|
||||||
if (items > 0)
|
|
||||||
{
|
|
||||||
if (_tipo_stampa == 2 || _tipo_stampa == 4)
|
if (_tipo_stampa == 2 || _tipo_stampa == 4)
|
||||||
{
|
{
|
||||||
TMask mb("cg4400b");
|
TMask mb("cg4400b");
|
||||||
@ -2599,6 +2585,8 @@ else //stampa tutti i registri
|
|||||||
KEY tasto = mb.run();
|
KEY tasto = mb.run();
|
||||||
if (tasto != K_ENTER) continue;
|
if (tasto != K_ENTER) continue;
|
||||||
}
|
}
|
||||||
|
if (items > 0l)
|
||||||
|
{
|
||||||
if (_tipo_stampa != 1)
|
if (_tipo_stampa != 1)
|
||||||
{
|
{
|
||||||
if (_liquidazione) //per i registri "validi" eseguo il controllo liquidazione
|
if (_liquidazione) //per i registri "validi" eseguo il controllo liquidazione
|
||||||
@ -2651,13 +2639,13 @@ else //stampa tutti i registri
|
|||||||
if (fexist(nomef))
|
if (fexist(nomef))
|
||||||
{
|
{
|
||||||
_intesta_liq = TRUE;
|
_intesta_liq = TRUE;
|
||||||
if (m > da) printer().formfeed();
|
|
||||||
merge_export_file(t,FALSE,TRUE);
|
merge_export_file(t,FALSE,TRUE);
|
||||||
|
printer().formfeed();
|
||||||
_intesta_liq = FALSE;
|
_intesta_liq = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printer().close();
|
|
||||||
}
|
}
|
||||||
|
if (printer().isopen()) printer().close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_tipo_stampa == 3 && _rif_vid)
|
if (_tipo_stampa == 3 && _rif_vid)
|
||||||
@ -2669,11 +2657,11 @@ else //stampa tutti i registri
|
|||||||
} //for
|
} //for
|
||||||
if (msg)
|
if (msg)
|
||||||
message_box("Ditta %ld: Nessun registro soddisfa i parametri indicati", _ditta);
|
message_box("Ditta %ld: Nessun registro soddisfa i parametri indicati", _ditta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TApplication::set_firm(__firm);
|
TApplication::set_firm(__firm);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2702,8 +2690,8 @@ void CG4400_application::stampa_liq_mesi_succ()
|
|||||||
_intesta_liq = FALSE;
|
_intesta_liq = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printer().close();
|
|
||||||
}
|
}
|
||||||
|
if (printer().isopen()) printer().close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG4400_application::send_message(char tipo, const TFilename& nome, int mese)
|
void CG4400_application::send_message(char tipo, const TFilename& nome, int mese)
|
||||||
|
@ -13,9 +13,7 @@
|
|||||||
#include <sheet.h>
|
#include <sheet.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <prefix.h>
|
#include <prefix.h>
|
||||||
|
#include "conto.h"
|
||||||
#include "conto.h" // CI VOGLIONO LE VIRGOLETTE! CAPITELA!
|
|
||||||
|
|
||||||
#include <nditte.h>
|
#include <nditte.h>
|
||||||
#include <anagr.h>
|
#include <anagr.h>
|
||||||
#include <comuni.h>
|
#include <comuni.h>
|
||||||
|
@ -29,6 +29,7 @@ LISTBOX U_MESE 10
|
|||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 3 5 "Stampa mese "
|
PROMPT 3 5 "Stampa mese "
|
||||||
FLAGS "MD"
|
FLAGS "MD"
|
||||||
|
ITEM "00|Nessuno"
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER U_PAGINA 4
|
NUMBER U_PAGINA 4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user