Correzioni a mastrini registri liquidazione e progressivi IVA
git-svn-id: svn://10.65.10.50/trunk@1252 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4090498c78
commit
b8c361eaca
@ -28,7 +28,7 @@ END
|
|||||||
|
|
||||||
NUMBER F_ANNO 4
|
NUMBER F_ANNO 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 3 3 "Anno liquidazione "
|
PROMPT 3 3 "Anno liquidazione "
|
||||||
HELP "Anno di cui si effettua la liquidazione"
|
HELP "Anno di cui si effettua la liquidazione"
|
||||||
FLAGS "A"
|
FLAGS "A"
|
||||||
CHECKTYPE REQUIRED
|
CHECKTYPE REQUIRED
|
||||||
@ -36,7 +36,7 @@ END
|
|||||||
|
|
||||||
RADIOBUTTON F_TIPO 18
|
RADIOBUTTON F_TIPO 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 3 5 "Tipo progressivi "
|
PROMPT 3 5 "Tipo progressivi "
|
||||||
HELP "Tipo di riepilogo da effettuare"
|
HELP "Tipo di riepilogo da effettuare"
|
||||||
ITEM "1|Vendite"
|
ITEM "1|Vendite"
|
||||||
MESSAGE HIDE,F_TIPOTABE|HIDE,F_TIPOTABEL|SHOW,F_TIPOTAB
|
MESSAGE HIDE,F_TIPOTABE|HIDE,F_TIPOTABEL|SHOW,F_TIPOTAB
|
||||||
@ -49,7 +49,7 @@ END
|
|||||||
|
|
||||||
RADIOBUTTON F_TIPO1 18
|
RADIOBUTTON F_TIPO1 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 3 5 "Tipo progressivi "
|
PROMPT 3 5 "Tipo progressivi "
|
||||||
HELP "Tipo di riepilogo da effettuare"
|
HELP "Tipo di riepilogo da effettuare"
|
||||||
ITEM "1|Vendite"
|
ITEM "1|Vendite"
|
||||||
MESSAGE HIDE,F_TIPOTABE|HIDE,F_TIPOTABEL|HIDE,F_TIPOTAB
|
MESSAGE HIDE,F_TIPOTABE|HIDE,F_TIPOTABEL|HIDE,F_TIPOTAB
|
||||||
@ -74,7 +74,7 @@ END
|
|||||||
|
|
||||||
STRING F_CODIVA 4
|
STRING F_CODIVA 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 3 10 "Codice IVA "
|
PROMPT 3 10 "Codice IVA "
|
||||||
HELP "Aliquota IVA da riepilogare"
|
HELP "Aliquota IVA da riepilogare"
|
||||||
FLAGS "U"
|
FLAGS "U"
|
||||||
USE %IVA
|
USE %IVA
|
||||||
@ -91,7 +91,7 @@ END
|
|||||||
|
|
||||||
RADIOBUTTON F_TIPOTAB 38
|
RADIOBUTTON F_TIPOTAB 38
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 3 12 "Tipo tabella "
|
PROMPT 3 12 "Tipo tabella "
|
||||||
HELP "Tipo di tabella da visualizzare"
|
HELP "Tipo di tabella da visualizzare"
|
||||||
ITEM "1|Vendite in genere"
|
ITEM "1|Vendite in genere"
|
||||||
ITEM "2|Vendite in sospensione d'imposta"
|
ITEM "2|Vendite in sospensione d'imposta"
|
||||||
@ -99,7 +99,7 @@ END
|
|||||||
|
|
||||||
STRING F_ATTIVITA 5
|
STRING F_ATTIVITA 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 3 10 "Codice attivita' "
|
PROMPT 3 10 "Codice attivita' "
|
||||||
HELP "Codice dell'attivita' di cui si vuole il riepilogo"
|
HELP "Codice dell'attivita' di cui si vuole il riepilogo"
|
||||||
USE LF_ATTIV
|
USE LF_ATTIV
|
||||||
JOIN %AIS TO LF_ATTIV INTO CODTAB=CODATT
|
JOIN %AIS TO LF_ATTIV INTO CODTAB=CODATT
|
||||||
@ -114,7 +114,7 @@ END
|
|||||||
|
|
||||||
NUMBER F_TIPOTABEL 1
|
NUMBER F_TIPOTABEL 1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 3 12 "Tipo tabella "
|
PROMPT 3 12 "Tipo tabella "
|
||||||
HELP "Tipo di tabella da visualizzare"
|
HELP "Tipo di tabella da visualizzare"
|
||||||
SHEET "Tipo|Descrizione@50"
|
SHEET "Tipo|Descrizione@50"
|
||||||
ITEM "1|Acquisti beni per rivendita"
|
ITEM "1|Acquisti beni per rivendita"
|
||||||
@ -128,7 +128,7 @@ END
|
|||||||
|
|
||||||
NUMBER F_TIPOTABE 1
|
NUMBER F_TIPOTABE 1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 3 12 "Tipo tabella "
|
PROMPT 3 12 "Tipo tabella "
|
||||||
HELP "Tipo di tabella da visualizzare"
|
HELP "Tipo di tabella da visualizzare"
|
||||||
SHEET "Tipo|Descrizione@50"
|
SHEET "Tipo|Descrizione@50"
|
||||||
ITEM "1|Acquisti in genere"
|
ITEM "1|Acquisti in genere"
|
||||||
|
@ -27,9 +27,9 @@ END
|
|||||||
|
|
||||||
DATE F_DATASTAMPA
|
DATE F_DATASTAMPA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 3 4 "Data stampa "
|
PROMPT 3 4 "Data stampa "
|
||||||
HELP "Data in cui viene effettuata la stampa"
|
HELP "Data in cui viene effettuata la stampa"
|
||||||
FLAGS "A"
|
FLAGS "A"
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_ANNO 4
|
NUMBER F_ANNO 4
|
||||||
|
113
cg/cg3200.cpp
113
cg/cg3200.cpp
@ -34,18 +34,19 @@ class TMastrini_application : public TPrintapp
|
|||||||
friend bool sottoc_handler_ini (TMask_field& f, KEY k);
|
friend bool sottoc_handler_ini (TMask_field& f, KEY k);
|
||||||
friend bool sottoc_handler_fine (TMask_field& f, KEY k);
|
friend bool sottoc_handler_fine (TMask_field& f, KEY k);
|
||||||
|
|
||||||
TDociva_array _b;
|
TDociva_array _b;
|
||||||
TRelation* _rel;
|
TRelation* _rel;
|
||||||
TMask* _msk;
|
TMask* _msk;
|
||||||
TTable* _tabivd, * _tabtpd, * _tabreg, * _tabesc;
|
TTable* _tabivd, * _tabtpd, * _tabreg, * _tabesc;
|
||||||
TLocalisamfile* _mov;
|
TLocalisamfile* _mov;
|
||||||
TLocalisamfile* _nditte;
|
TLocalisamfile* _nditte;
|
||||||
TLocalisamfile* _unloc;
|
TLocalisamfile* _unloc;
|
||||||
TLocalisamfile* _comuni;
|
TLocalisamfile* _comuni;
|
||||||
TLocalisamfile* _clifo;
|
TLocalisamfile* _clifo;
|
||||||
TLocalisamfile* _caus;
|
TLocalisamfile* _caus;
|
||||||
TSaldo* _sld;
|
TSaldo* _sld;
|
||||||
|
TParagraph_string* _d18,* _d23,* _d30;
|
||||||
|
|
||||||
TDate _data_ini,_data_fine,_data_finese,_data_finesesucc,_ultima_data_reg;
|
TDate _data_ini,_data_fine,_data_finese,_data_finesesucc,_ultima_data_reg;
|
||||||
TDate _datareg,_datadoc,_data_inizioese,_datareg_stampa,_inizioes;
|
TDate _datareg,_datadoc,_data_inizioese,_datareg_stampa,_inizioes;
|
||||||
int _cur1,_gruppo,_conto,_numcarat,_stampanum,_numivd,_annoiva;
|
int _cur1,_gruppo,_conto,_numcarat,_stampanum,_numivd,_annoiva;
|
||||||
@ -787,6 +788,8 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
|||||||
|
|
||||||
case LF_RMOV:
|
case LF_RMOV:
|
||||||
{
|
{
|
||||||
|
//int rw = 1;
|
||||||
|
|
||||||
// Ricerca la contropartita di quel movimento
|
// Ricerca la contropartita di quel movimento
|
||||||
TLocalisamfile& rmov = current_cursor()->file(LF_RMOV);
|
TLocalisamfile& rmov = current_cursor()->file(LF_RMOV);
|
||||||
|
|
||||||
@ -869,37 +872,49 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
|||||||
_numgio = atol(_mov->curr().get(MOV_NUMGIO));
|
_numgio = atol(_mov->curr().get(MOV_NUMGIO));
|
||||||
|
|
||||||
_descrizione = current_cursor()->curr(LF_RMOV).get(RMV_DESCR);
|
_descrizione = current_cursor()->curr(LF_RMOV).get(RMV_DESCR);
|
||||||
|
|
||||||
if (_numcarat == 1) // Stampa 132 caratteri
|
if (_numcarat == 1) // Stampa 132 caratteri
|
||||||
{
|
{
|
||||||
if (_descrizione != "")
|
if (_descrizione != "")
|
||||||
{
|
{
|
||||||
|
*_d23 = (const char*) _descrizione;
|
||||||
if (_descrizionemov != "")
|
if (_descrizionemov != "")
|
||||||
{
|
{
|
||||||
set_row (1,"@42g%.18s", (const char*) _descrizionemov);
|
*_d18 = (const char*) _descrizionemov;
|
||||||
set_row (1,"@61g%.23s", (const char*) _descrizione);
|
set_row(1, "@42g#a", _d18);
|
||||||
|
set_row(1, "@61g#a", _d23);
|
||||||
}
|
}
|
||||||
else if (_descrizionemov == "")
|
else if (_descrizionemov == "")
|
||||||
{
|
{
|
||||||
set_row (1,"@42g%.18s", (const char*) _descrcaus);
|
*_d18 = (const char*) _descrcaus;
|
||||||
set_row (1,"@61g%.23s", (const char*) _descrizione);
|
set_row(1, "@42g#a", _d18);
|
||||||
}
|
set_row(1, "@61g#a", _d23);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (_descrizione == "")
|
else if (_descrizione == "")
|
||||||
if (_descrizionemov != "")
|
if (_descrizionemov != "")
|
||||||
{
|
{
|
||||||
set_row (1,"@42g%.18s", (const char*) _descrcaus);
|
*_d23 = (const char*) _descrizionemov;
|
||||||
set_row (1,"@61g%.23s", (const char*) _descrizionemov);
|
*_d18 = (const char*) _descrcaus;
|
||||||
|
set_row (1,"@42g#a", _d18);
|
||||||
|
set_row (1,"@61g#a", _d23);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (_descrizionemov == "")
|
if (_descrizionemov == "")
|
||||||
{
|
{
|
||||||
conto(_gruppocontr,_contocontr,FALSE);
|
conto(_gruppocontr,_contocontr,FALSE);
|
||||||
TConto tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
TConto tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||||
TString descr_contr = tc.descrizione();
|
TString80 descr_contr = tc.descrizione();
|
||||||
set_row (1,"@42g%.18s", (const char*) _descrcaus);
|
//set_row (1,"@42g%.18s", (const char*) _descrcaus);
|
||||||
|
//if (descr_contr != "Sconosciuto")
|
||||||
|
// set_row (1,"@61g%.23s", (const char*) descr_contr);
|
||||||
|
*_d18 = (const char*) _descrcaus;
|
||||||
|
set_row (1,"@42g#a", _d18);
|
||||||
if (descr_contr != "Sconosciuto")
|
if (descr_contr != "Sconosciuto")
|
||||||
set_row (1,"@61g%.23s", (const char*) descr_contr);
|
{
|
||||||
|
*_d23 = (const char*) descr_contr;
|
||||||
|
set_row (1,"@61g#a", _d23);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -907,22 +922,31 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
|||||||
{
|
{
|
||||||
if (_descrizione != "")
|
if (_descrizione != "")
|
||||||
{
|
{
|
||||||
|
*_d30 = (const char*) _descrizione;
|
||||||
if (_descrizionemov != "")
|
if (_descrizionemov != "")
|
||||||
{
|
{
|
||||||
set_row (1,"@46g%.23s", (const char*) _descrizionemov);
|
*_d23 = (const char*) _descrizionemov;
|
||||||
set_row (1,"@70g%.30s", (const char*) _descrizione);
|
set_row (1,"@46g#a", _d23);
|
||||||
|
set_row (1,"@70g#a", _d30);
|
||||||
}
|
}
|
||||||
else if (_descrizionemov == "")
|
else if (_descrizionemov == "")
|
||||||
{
|
{
|
||||||
set_row (1,"@46g%.23s", (const char*) _descrcaus);
|
//set_row (1,"@46g%.23s", (const char*) _descrcaus);
|
||||||
set_row (1,"@70g%.30s", (const char*) _descrizione);
|
//set_row (1,"@70g%.30s", (const char*) _descrizione);
|
||||||
}
|
*_d23 = (const char*) _descrcaus;
|
||||||
|
set_row(1, "@46g#a", _d23);
|
||||||
|
set_row(1, "@70g#a", _d30);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (_descrizione == "")
|
else if (_descrizione == "")
|
||||||
if (_descrizionemov != "")
|
if (_descrizionemov != "")
|
||||||
{
|
{
|
||||||
set_row (1,"@46g%.23s", (const char*) _descrcaus);
|
//set_row (1,"@46g%.23s", (const char*) _descrcaus);
|
||||||
set_row (1,"@70g%.30s", (const char*) _descrizionemov);
|
//set_row (1,"@70g%.30s", (const char*) _descrizionemov);
|
||||||
|
*_d30 = (const char*) _descrizionemov;
|
||||||
|
*_d23 = (const char*) _descrcaus;
|
||||||
|
set_row (1,"@46g#a", _d23);
|
||||||
|
set_row (1,"@70g#a", _d30);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (_descrizionemov == "")
|
if (_descrizionemov == "")
|
||||||
@ -930,9 +954,16 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
|||||||
conto(_gruppocontr,_contocontr,FALSE);
|
conto(_gruppocontr,_contocontr,FALSE);
|
||||||
TConto tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
TConto tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||||
TString descr_contr = tc.descrizione();
|
TString descr_contr = tc.descrizione();
|
||||||
set_row (1,"@46g%.23s", (const char*) _descrcaus);
|
//set_row (1,"@46g%.23s", (const char*) _descrcaus);
|
||||||
|
//if (descr_contr != "Sconosciuto")
|
||||||
|
// set_row (1,"@70g%.30s", (const char*) descr_contr);
|
||||||
|
*_d23 = (const char*) _descrcaus;
|
||||||
|
set_row (1,"@46g#a", _d23);
|
||||||
if (descr_contr != "Sconosciuto")
|
if (descr_contr != "Sconosciuto")
|
||||||
set_row (1,"@70g%.30s", (const char*) descr_contr);
|
{
|
||||||
|
*_d30 = (const char*) descr_contr;
|
||||||
|
set_row (1,"@70g#a", _d30);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2150,10 +2181,10 @@ int TMastrini_application::ricerca_gruppo(int start)
|
|||||||
else
|
else
|
||||||
descriz2 = "";
|
descriz2 = "";
|
||||||
|
|
||||||
set_row(3,"@27g%-30s",(const char*) descrizione_gruppo());
|
set_row(3,"@27g%-.30s",(const char*) descrizione_gruppo());
|
||||||
set_row(3,"@59g%-30s",(const char*) descrizione_conto());
|
set_row(3,"@59g%-.30s",(const char*) descrizione_conto());
|
||||||
|
|
||||||
set_row(3,"@91g%-30s",(const char*) _descr);
|
set_row(3,"@91g%-.41s",(const char*) _descr);
|
||||||
set_row(4, "@0gClasse@12g%c", _lettivd);
|
set_row(4, "@0gClasse@12g%c", _lettivd);
|
||||||
set_row(4, "@14g%-8s",(const char*) _numrivd);
|
set_row(4, "@14g%-8s",(const char*) _numrivd);
|
||||||
if (_numivd != 0)
|
if (_numivd != 0)
|
||||||
@ -2267,7 +2298,12 @@ bool TMastrini_application::user_create()
|
|||||||
_tabreg = new TTable (TAB_REG);
|
_tabreg = new TTable (TAB_REG);
|
||||||
_tabesc = new TTable (TAB_ESC);
|
_tabesc = new TTable (TAB_ESC);
|
||||||
_sld = new TSaldo ();
|
_sld = new TSaldo ();
|
||||||
|
|
||||||
|
_d18 = new TParagraph_string ("",18);
|
||||||
|
_d23 = new TParagraph_string ("",23);
|
||||||
|
_d30 = new TParagraph_string ("",30);
|
||||||
|
|
||||||
|
|
||||||
_msk = new TMask("cg3200a");
|
_msk = new TMask("cg3200a");
|
||||||
_msk->set_handler(F_SOTTOCINI_CONTO, sottoc_handler_ini);
|
_msk->set_handler(F_SOTTOCINI_CONTO, sottoc_handler_ini);
|
||||||
_msk->set_handler(F_SOTTOCINI_CLIENTE, sottoc_handler_ini);
|
_msk->set_handler(F_SOTTOCINI_CLIENTE, sottoc_handler_ini);
|
||||||
@ -2306,6 +2342,9 @@ bool TMastrini_application::user_destroy()
|
|||||||
delete _tabreg;
|
delete _tabreg;
|
||||||
delete _tabesc;
|
delete _tabesc;
|
||||||
delete _sld;
|
delete _sld;
|
||||||
|
delete _d18;
|
||||||
|
delete _d23;
|
||||||
|
delete _d30;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ inline TLiquidazione_app& app()
|
|||||||
|
|
||||||
TLiquidazione_app::TLiquidazione_app() :
|
TLiquidazione_app::TLiquidazione_app() :
|
||||||
_ditte(NULL), _selected(10000),
|
_ditte(NULL), _selected(10000),
|
||||||
_year(4), _nomiditte(100), _firm_bookmark(-1)
|
_year(4), _nomiditte(100)
|
||||||
{
|
{
|
||||||
_isprint = _is_interactive = _canprint = TRUE;
|
_isprint = _is_interactive = _canprint = TRUE;
|
||||||
_isplafond = _printonly = _is_visliq = FALSE;
|
_isplafond = _printonly = _is_visliq = FALSE;
|
||||||
|
140
cg/cg4400.cpp
140
cg/cg4400.cpp
@ -1860,7 +1860,41 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
|||||||
|
|
||||||
_datareg = mov.get_date(MOV_DATAREG);
|
_datareg = mov.get_date(MOV_DATAREG);
|
||||||
|
|
||||||
if (_tipo_stampa != 3 && _liquidazione)
|
/*
|
||||||
|
if (_tipo_stampa != 3 && _liquidazione)
|
||||||
|
{
|
||||||
|
int da;
|
||||||
|
if (_tipo_stampa == 1)
|
||||||
|
da = _data_da.month();
|
||||||
|
else da = 1;
|
||||||
|
int a = _datareg.month();
|
||||||
|
for (int m = da; m < a; m++)
|
||||||
|
{
|
||||||
|
if (!_st_liq[m])
|
||||||
|
if (stampo_liquidazione(m))
|
||||||
|
{
|
||||||
|
_datareg = format("01/%02d/%4d", m, _annoes); //serve per la preprocess_header (intestazione per la stampa liquidazione)
|
||||||
|
TFilename t;
|
||||||
|
t.temp("reg");
|
||||||
|
if (_tipo_stampa == 1)
|
||||||
|
send_message('S', t, m);
|
||||||
|
else send_message('s', t, m);
|
||||||
|
TString80 nomef; nomef = t.path(); nomef << "\\" << t.name();
|
||||||
|
if (fexist(nomef))
|
||||||
|
{
|
||||||
|
_intesta_liq = TRUE;
|
||||||
|
merge_export_file(t,FALSE,TRUE);
|
||||||
|
printer().formfeed();
|
||||||
|
_intesta_liq = FALSE;
|
||||||
|
reset_print();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_st_liq[m] = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (_tipo_stampa != 3 && _liquidazione)
|
||||||
{
|
{
|
||||||
int da;
|
int da;
|
||||||
if (_tipo_stampa == 1)
|
if (_tipo_stampa == 1)
|
||||||
@ -1875,21 +1909,32 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
|||||||
_datareg = format("01/%02d/%4d", m, _annoes); //serve per la preprocess_header (intestazione per la stampa liquidazione)
|
_datareg = format("01/%02d/%4d", m, _annoes); //serve per la preprocess_header (intestazione per la stampa liquidazione)
|
||||||
TFilename t;
|
TFilename t;
|
||||||
t.temp("reg");
|
t.temp("reg");
|
||||||
if (_tipo_stampa == 1)
|
if (_scelta == B0_settato || _scelta == prosegui_stampa)
|
||||||
send_message('S', t, m);
|
{
|
||||||
else send_message('s', t, m);
|
if (_tipo_stampa == 1)
|
||||||
TString80 nomef; nomef = t.path(); nomef << "\\" << t.name();
|
send_message('S',t, m);
|
||||||
if (fexist(nomef))
|
else send_message('s',t, m);
|
||||||
|
}
|
||||||
|
else //_scelta == prosegui_cal_stampa
|
||||||
|
{
|
||||||
|
if (_tipo_stampa == 1)
|
||||||
|
send_message('L', t, m);
|
||||||
|
else send_message('l', t, m);
|
||||||
|
}
|
||||||
|
//TString80 nomef; nomef = t.path(); nomef << "\\" << t.name();
|
||||||
|
//if (fexist(nomef))
|
||||||
|
if (fexist(t))
|
||||||
{
|
{
|
||||||
_intesta_liq = TRUE;
|
_intesta_liq = TRUE;
|
||||||
|
printer().footerlen(0);
|
||||||
merge_export_file(t,FALSE,TRUE);
|
merge_export_file(t,FALSE,TRUE);
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
_intesta_liq = FALSE;
|
_intesta_liq = FALSE;
|
||||||
reset_print();
|
reset_print();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_st_liq[m] = TRUE;
|
_st_liq[m] = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_datareg = mov.get_date(MOV_DATAREG);
|
_datareg = mov.get_date(MOV_DATAREG);
|
||||||
@ -1899,6 +1944,7 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
|||||||
{
|
{
|
||||||
_auto_intraf = FALSE;
|
_auto_intraf = FALSE;
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
|
printer().footerlen(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
_dataregp = _datareg;
|
_dataregp = _datareg;
|
||||||
@ -2143,6 +2189,21 @@ void CG4400_application::scrivi_reg()
|
|||||||
else Tabreg.put("I8", (long)_datareg.month());
|
else Tabreg.put("I8", (long)_datareg.month());
|
||||||
|
|
||||||
Tabreg.rewrite();
|
Tabreg.rewrite();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_tipo_stampa == 3)
|
||||||
|
{
|
||||||
|
TString16 cod = "";
|
||||||
|
TTable lbu ("%LBU");
|
||||||
|
|
||||||
|
cod << _annoes << _codlib;
|
||||||
|
lbu.zero();
|
||||||
|
lbu.put("CODTAB", cod);
|
||||||
|
if (lbu.read() == NOERR)
|
||||||
|
{
|
||||||
|
lbu.put("I0", (long) _fino_a_mese);
|
||||||
|
lbu.rewrite();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2361,12 +2422,14 @@ void CG4400_application::liq_b0_settato()
|
|||||||
if (_tipo_stampa == 1)
|
if (_tipo_stampa == 1)
|
||||||
send_message('S',f, _datareg.month());
|
send_message('S',f, _datareg.month());
|
||||||
else send_message('s',f, _datareg.month());
|
else send_message('s',f, _datareg.month());
|
||||||
TString80 nomef;
|
//TString80 nomef;
|
||||||
nomef = f.path(); nomef << "\\" << f.name();
|
//nomef = f.path(); nomef << "\\" << f.name();
|
||||||
if (fexist(nomef))
|
//if (fexist(nomef))
|
||||||
|
if (fexist(f))
|
||||||
{
|
{
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
_intesta_liq = TRUE;
|
_intesta_liq = TRUE;
|
||||||
|
printer().footerlen(0);
|
||||||
merge_export_file(f,FALSE,TRUE);
|
merge_export_file(f,FALSE,TRUE);
|
||||||
_intesta_liq = FALSE;
|
_intesta_liq = FALSE;
|
||||||
}
|
}
|
||||||
@ -2421,6 +2484,7 @@ print_action CG4400_application::postprocess_page (int file, int counter)
|
|||||||
{
|
{
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
_intesta_liq = TRUE;
|
_intesta_liq = TRUE;
|
||||||
|
printer().footerlen(0);
|
||||||
merge_export_file(_t,FALSE,TRUE);
|
merge_export_file(_t,FALSE,TRUE);
|
||||||
_intesta_liq = FALSE;
|
_intesta_liq = FALSE;
|
||||||
}
|
}
|
||||||
@ -2507,7 +2571,6 @@ bool CG4400_application::set_print(int n)
|
|||||||
else _stampa_width = 198;
|
else _stampa_width = 198;
|
||||||
if (_stampa_len != 0)
|
if (_stampa_len != 0)
|
||||||
printer().formlen(_stampa_len);
|
printer().formlen(_stampa_len);
|
||||||
else printer().formlen(66);
|
|
||||||
//Se stampa di prova l'utente indica data_da e data_a
|
//Se stampa di prova l'utente indica data_da e data_a
|
||||||
if (_tipo_stampa == 1)
|
if (_tipo_stampa == 1)
|
||||||
{
|
{
|
||||||
@ -2667,12 +2730,13 @@ void CG4400_application::no_movimenti()
|
|||||||
send_message('L', f, m);
|
send_message('L', f, m);
|
||||||
else send_message('l', f, m);
|
else send_message('l', f, m);
|
||||||
}
|
}
|
||||||
TString80 nomef;
|
//TString80 nomef;
|
||||||
nomef = f.path(); nomef << "\\" << f.name();
|
//nomef = f.path(); nomef << "\\" << f.name();
|
||||||
if (fexist(nomef))
|
//if (fexist(nomef))
|
||||||
|
if (fexist(f))
|
||||||
{
|
{
|
||||||
_intesta_liq = TRUE;
|
_intesta_liq = TRUE;
|
||||||
//if (m > da) printer().formfeed();
|
printer().footerlen(0);
|
||||||
merge_export_file(f,FALSE,TRUE);
|
merge_export_file(f,FALSE,TRUE);
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
_intesta_liq = FALSE;
|
_intesta_liq = FALSE;
|
||||||
@ -2699,7 +2763,7 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
|
|||||||
_primast = _u_stampata;
|
_primast = _u_stampata;
|
||||||
_ok_vidi = FALSE;
|
_ok_vidi = FALSE;
|
||||||
_stampa_mese = 13;
|
_stampa_mese = 13;
|
||||||
_scelta = controlla_b0();
|
//_scelta = controlla_b0();
|
||||||
|
|
||||||
TApplication::set_firm(_ditta);
|
TApplication::set_firm(_ditta);
|
||||||
look_lia();
|
look_lia();
|
||||||
@ -2711,14 +2775,17 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
|
|||||||
TApplication::set_firm(__firm);
|
TApplication::set_firm(__firm);
|
||||||
return fatal_box("Finire di stampare registri anno precedente");
|
return fatal_box("Finire di stampare registri anno precedente");
|
||||||
}
|
}
|
||||||
if (!_stampa_tutti_i_registri)
|
|
||||||
_cur->set_filterfunction(filter_func);
|
|
||||||
if (!_stampa_tutti_i_registri)
|
if (!_stampa_tutti_i_registri)
|
||||||
{
|
{
|
||||||
|
_scelta = controlla_b0();
|
||||||
|
_cur->set_filterfunction(filter_func);
|
||||||
ok = setta_mask(i);
|
ok = setta_mask(i);
|
||||||
if (!ok) continue;
|
if (!ok) continue;
|
||||||
if (_liquidazione)
|
if (_liquidazione)
|
||||||
{
|
{
|
||||||
|
if (_tipo_stampa == 2 || _tipo_stampa == 4)
|
||||||
|
_size_header = _stampa_ind_ditta ? 8 : 6;
|
||||||
|
else _size_header = 8;
|
||||||
clear_stliq();
|
clear_stliq();
|
||||||
_scelta = controlla_liquidazione();
|
_scelta = controlla_liquidazione();
|
||||||
if (_scelta == non_proseguire)
|
if (_scelta == non_proseguire)
|
||||||
@ -2816,6 +2883,9 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
|
|||||||
|
|
||||||
if (_liquidazione)
|
if (_liquidazione)
|
||||||
{
|
{
|
||||||
|
if (_tipo_stampa == 2 || _tipo_stampa == 4)
|
||||||
|
_size_header = _stampa_ind_ditta ? 8 : 6;
|
||||||
|
else _size_header = 8;
|
||||||
clear_stliq();
|
clear_stliq();
|
||||||
_scelta = controlla_liquidazione();
|
_scelta = controlla_liquidazione();
|
||||||
if (_scelta == non_proseguire)
|
if (_scelta == non_proseguire)
|
||||||
@ -2848,8 +2918,9 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
|
|||||||
}
|
}
|
||||||
} //for
|
} //for
|
||||||
if (msg)
|
if (msg)
|
||||||
message_box("Ditta %ld: Nessun registro soddisfa i parametri indicati", _ditta);
|
if ( (_tipo_stampa != 3) || (_tipo_stampa == 3 && _fino_a_mese == 1) ) //il messaggio seguente, nel caso di stampa su libro unico,
|
||||||
}
|
message_box("Ditta %ld: nessun registro soddisfa i parametri indicati", _ditta); //viene gia' dato nell'handler (che scatta pero' se il mese di
|
||||||
|
} //stampa e' diverso da gennaio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TApplication::set_firm(__firm);
|
TApplication::set_firm(__firm);
|
||||||
@ -2873,12 +2944,14 @@ void CG4400_application::stampa_liq_mesi_succ()
|
|||||||
if (_tipo_stampa == 1)
|
if (_tipo_stampa == 1)
|
||||||
send_message('S',t, m);
|
send_message('S',t, m);
|
||||||
else send_message('s',t,m);
|
else send_message('s',t,m);
|
||||||
TString80 nomef; nomef = t.path(); nomef << "\\" << t.name();
|
//TString80 nomef; nomef = t.path(); nomef << "\\" << t.name();
|
||||||
if (fexist(nomef))
|
//if (fexist(nomef))
|
||||||
|
if (fexist(t))
|
||||||
{
|
{
|
||||||
_intesta_liq = TRUE;
|
_intesta_liq = TRUE;
|
||||||
if (m > da) printer().formfeed();
|
if (m > da) printer().formfeed();
|
||||||
merge_export_file(t,FALSE,TRUE);
|
printer().footerlen(0);
|
||||||
|
merge_export_file(t,FALSE,TRUE);
|
||||||
_intesta_liq = FALSE;
|
_intesta_liq = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2904,13 +2977,14 @@ void CG4400_application::send_message(char tipo, const TFilename& nome, int mese
|
|||||||
ss.add(tipo);
|
ss.add(tipo);
|
||||||
ss.add(_data_stampa.string());
|
ss.add(_data_stampa.string());
|
||||||
ss.add(nome);
|
ss.add(nome);
|
||||||
|
ss.add(_size_header);
|
||||||
ss.add("x");
|
ss.add("x");
|
||||||
|
|
||||||
TMessage liq (app, "RCL", ss);
|
TMessage liq (app, "RCL", ss);
|
||||||
liq.send();
|
liq.send();
|
||||||
|
|
||||||
TExternal_app pn(app);
|
TExternal_app pn(app);
|
||||||
pn.run();
|
pn.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG4400_application::set_ditte(TMask& m)
|
bool CG4400_application::set_ditte(TMask& m)
|
||||||
@ -3034,7 +3108,7 @@ int CG4400_application::stampa_intestazione()
|
|||||||
}
|
}
|
||||||
riga.overwrite (format("Partita iva %s Codice fiscale %s", (const char*)_paiva, (const char*)_cofi));
|
riga.overwrite (format("Partita iva %s Codice fiscale %s", (const char*)_paiva, (const char*)_cofi));
|
||||||
set_header (r, riga);
|
set_header (r, riga);
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3116,7 +3190,7 @@ void CG4400_application::preprocess_header()
|
|||||||
set_header(r++,riga);
|
set_header(r++,riga);
|
||||||
set_header(r,"");
|
set_header(r,"");
|
||||||
}
|
}
|
||||||
else
|
else //non sto stampando la liquidazione
|
||||||
{
|
{
|
||||||
r++;
|
r++;
|
||||||
set_header(r, riga);
|
set_header(r, riga);
|
||||||
@ -3200,7 +3274,7 @@ void CG4400_application::preprocess_header()
|
|||||||
set_header(r++, "@38gGeneralita'");
|
set_header(r++, "@38gGeneralita'");
|
||||||
|
|
||||||
set_header(r, riga);
|
set_header(r, riga);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int cg4400 (int argc, char * argv[])
|
int cg4400 (int argc, char * argv[])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user