Pulizia stampe (cg1 - fase 1).
git-svn-id: svn://10.65.10.50/trunk@51 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ec0c54497d
commit
5f96e2e4ea
24
cg/cg1.cpp
24
cg/cg1.cpp
@ -9,14 +9,22 @@ int main(int argc,char** argv)
|
||||
const int n = (argc > 1) ? atoi(argv[1]+1) : -1;
|
||||
switch(n)
|
||||
{
|
||||
case 0: cg1100(argc,argv); break;
|
||||
case 1: cg1200(argc,argv); break;
|
||||
case 2: cg1300(argc,argv); break;
|
||||
case 3: cg1400(argc,argv); break;
|
||||
case 4: cg1500(argc,argv); break;
|
||||
// case 5: cg1600(argc,argv); break;
|
||||
case 6: cg1700(argc,argv); break;
|
||||
default: error_box(usage, argv[0]); break;
|
||||
case 0:
|
||||
cg1100(argc,argv); break;
|
||||
case 1:
|
||||
cg1200(argc,argv); break;
|
||||
case 2:
|
||||
cg1300(argc,argv); break;
|
||||
case 3:
|
||||
cg1400(argc,argv); break;
|
||||
case 4:
|
||||
cg1500(argc,argv); break;
|
||||
case 5:
|
||||
cg1600(argc,argv); break;
|
||||
case 6:
|
||||
cg1700(argc,argv); break;
|
||||
default:
|
||||
error_box(usage, argv[0]); break;
|
||||
}
|
||||
|
||||
return n < 0;
|
||||
|
2
cg/cg1.h
2
cg/cg1.h
@ -21,7 +21,7 @@ int cg1200(int argc, char* argv[]);
|
||||
int cg1300(int argc, char* argv[]);
|
||||
int cg1400(int argc, char* argv[]);
|
||||
int cg1500(int argc, char* argv[]);
|
||||
//int cg1600(int argc, char* argv[]);
|
||||
int cg1600(int argc, char* argv[]);
|
||||
int cg1700(int argc, char* argv[]);
|
||||
|
||||
#endif // __CG1_H
|
||||
|
196
cg/cg1100.cpp
196
cg/cg1100.cpp
@ -3,14 +3,16 @@
|
||||
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <scanner.h>
|
||||
// #include <scanner.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
#include <lffiles.h>
|
||||
#include <sort.h>
|
||||
#include <pconti.h>
|
||||
#include <mailbox.h>
|
||||
#include <execp.h>
|
||||
|
||||
#include <lffiles.h>
|
||||
#include <pconti.h>
|
||||
#include "cg1.h"
|
||||
#include "cg1100.h"
|
||||
|
||||
@ -25,7 +27,7 @@ enum stampe {
|
||||
senza_IV_direttiva=3,
|
||||
con_ana_bil=4,
|
||||
senza_ana_bil=5
|
||||
};
|
||||
};
|
||||
|
||||
class CG1100_application : public TPrintapp
|
||||
{
|
||||
@ -63,31 +65,35 @@ public:
|
||||
void set_senza_ana ();
|
||||
|
||||
const char * decodifica_codanabil (const char * );
|
||||
const char * decodifica_IV_sez (const char * );
|
||||
const char * decodifica_IV_dir (const char * , const char * , const char * , int);
|
||||
// const char * decodifica_IV_sez (const char * );
|
||||
const char * decodifica_IV_dir (const char * sezivd,
|
||||
const char * lettivd = "",
|
||||
const char * numrivd = "",
|
||||
int numivd = 0);
|
||||
void process_link(int id, const char* txt);
|
||||
|
||||
CG1100_application() : _tab (TAB_IVD), _tab_anabil (TAB_ANABIL) {}
|
||||
};
|
||||
|
||||
void CG1100_application::process_link(int id, const char* txt)
|
||||
{
|
||||
TString ss = "1|"; ss << txt;
|
||||
TMessage fs(cmd2name("cg0","0"), MSG_LN, ss);
|
||||
TMailbox m;
|
||||
m.send(fs);
|
||||
TExternal_app cg0("cg -0");
|
||||
if (cg0.run()) beep();
|
||||
}
|
||||
|
||||
print_action CG1100_application::postprocess_page(int file,int counter)
|
||||
{
|
||||
switch (_tipo_stampa)
|
||||
{
|
||||
case completa:
|
||||
break;
|
||||
|
||||
case con_IV_direttiva:
|
||||
const char * buf;
|
||||
if ( (buf = _sort->retrieve()) != NULL)
|
||||
{
|
||||
(*_rec) = buf;
|
||||
return REPEAT_PAGE;
|
||||
}
|
||||
break;
|
||||
|
||||
case senza_IV_direttiva:
|
||||
case senza_ana_bil:
|
||||
break;
|
||||
|
||||
case con_IV_direttiva:
|
||||
case con_ana_bil:
|
||||
{
|
||||
const char * buf;
|
||||
@ -98,10 +104,6 @@ print_action CG1100_application::postprocess_page(int file,int counter)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case senza_ana_bil:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
@ -117,12 +119,11 @@ void CG1100_application::set_page(int file,int counter)
|
||||
set_completa();
|
||||
break;
|
||||
case con_IV_direttiva:
|
||||
case con_ana_bil:
|
||||
break;
|
||||
case senza_IV_direttiva:
|
||||
set_senza_IV();
|
||||
break;
|
||||
case con_ana_bil:
|
||||
break;
|
||||
case senza_ana_bil:
|
||||
set_senza_ana ();
|
||||
break;
|
||||
@ -222,13 +223,6 @@ bool CG1100_application::preprocess_print (int file,int counter)
|
||||
switch (_tipo_stampa)
|
||||
{
|
||||
case con_IV_direttiva:
|
||||
if ((buf = _sort->retrieve()) != NULL)
|
||||
{
|
||||
(*_rec) = buf;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
case con_ana_bil:
|
||||
if ((buf = _sort->retrieve()) != NULL)
|
||||
{
|
||||
@ -245,7 +239,7 @@ bool CG1100_application::preprocess_print (int file,int counter)
|
||||
|
||||
void CG1100_application::set_con_IV()
|
||||
{
|
||||
// campi della classe
|
||||
// campi della classe
|
||||
TString c1, c2, c3;
|
||||
int c4;
|
||||
TString descr_IV_sez, descr_IV_dir;
|
||||
@ -254,10 +248,10 @@ void CG1100_application::set_con_IV()
|
||||
TString o1, o2,o3;
|
||||
int o4;
|
||||
|
||||
// Descrizioni
|
||||
// Descrizioni
|
||||
TString d1;
|
||||
|
||||
// gruppo, conto e sottoconto
|
||||
// gruppo, conto e sottoconto
|
||||
int g,c,s;
|
||||
|
||||
c1 = _rec->get(PCN_SEZIVD);
|
||||
@ -265,7 +259,7 @@ void CG1100_application::set_con_IV()
|
||||
c3 = _rec->get(PCN_NUMRIVD);
|
||||
c4 = _rec->get_int(PCN_NUMIVD);
|
||||
|
||||
descr_IV_sez = decodifica_IV_sez (c1);
|
||||
descr_IV_sez = decodifica_IV_dir (c1);
|
||||
descr_IV_dir = decodifica_IV_dir (c1, c2, c3, c4);
|
||||
|
||||
o1 = _rec->get (PCN_SEZIVDOPP);
|
||||
@ -290,9 +284,9 @@ void CG1100_application::set_con_IV()
|
||||
|
||||
set_row (2, "@18g%40s", (const char *) descr_IV_dir);
|
||||
|
||||
set_row (2, "@60g%03d.", (const char *) g);
|
||||
set_row (2, "@64g%03d.", (const char *) c);
|
||||
set_row (2, "@68g%06d", (const char *) s);
|
||||
set_row (2, "@60g$[r]%03d$[n].", (const char *) g);
|
||||
set_row (2, "@64g$[r]%03d$[n].", (const char *) c);
|
||||
set_row (2, "@68g$[r]%06d$[n]", (const char *) s);
|
||||
|
||||
set_row (2, "@78g%2d", (const char *) c4);
|
||||
|
||||
@ -304,9 +298,9 @@ void CG1100_application::set_senza_IV()
|
||||
|
||||
reset_row (1);
|
||||
|
||||
set_row (1, "@1g@pn", FLD(lnum,PCN_GRUPPO, "@@@.") );
|
||||
set_row (1, "@5g@pn", FLD(lnum,PCN_CONTO, "@@@.") );
|
||||
set_row (1, "@9g@pn", FLD(lnum, PCN_SOTTOCONTO, "@@@@@@") );
|
||||
set_row (1, "@1g$[r]@pn$[n]", FLD(lnum,PCN_GRUPPO, "@@@.") );
|
||||
set_row (1, "@5g$[r]@pn$[n]", FLD(lnum,PCN_CONTO, "@@@.") );
|
||||
set_row (1, "@9g$[r]@pn$[n]", FLD(lnum, PCN_SOTTOCONTO, "@@@@@@") );
|
||||
|
||||
set_row (1, "@16g@50s", FLD(lnum,PCN_DESCR) );
|
||||
|
||||
@ -321,17 +315,17 @@ void CG1100_application::set_senza_IV()
|
||||
set_row (1, "@107g@f", FLD(lnum, PCN_COMPENS) );
|
||||
set_row (1, "@114g@1n", FLD(lnum, PCN_TIPOSPRIC) );
|
||||
set_row (1, "@120g@1s", FLD(lnum, PCN_SEZSALDI) );
|
||||
// set_row (1, "@118g@f", FLD(lnum, PCN_STSOTTAB));
|
||||
// set_row (1, "@118g@f", FLD(lnum, PCN_STSOTTAB));
|
||||
}
|
||||
|
||||
void CG1100_application::set_con_ana()
|
||||
{
|
||||
TString CodTabAnabil, DescrCodTabAnabil(30);
|
||||
// Descrizioni
|
||||
// Descrizioni
|
||||
TString d1;
|
||||
const char * d;
|
||||
|
||||
// gruppo, conto e sottoconto
|
||||
// gruppo, conto e sottoconto
|
||||
int g,c;
|
||||
long s;
|
||||
char tmcf;
|
||||
@ -352,12 +346,11 @@ void CG1100_application::set_con_ana()
|
||||
CodTabAnabil = _rec->get(PCN_CODCBL);
|
||||
set_row (1, "%-10s", (const char *)CodTabAnabil);
|
||||
|
||||
// DescrCodTabAnabil = decodifica_codanabil(CodTabAnabil);
|
||||
set_row (1, "@15g%-10s", (const char *)DescrCodTabAnabil);
|
||||
|
||||
set_row (1, "@61g%03d.", g );
|
||||
set_row (1, "%03d.", c );
|
||||
set_row (1, "%06ld", s );
|
||||
set_row (1, "@61g$[r]%03d$[n].", g );
|
||||
set_row (1, "$[r]%03d$[n].", c );
|
||||
set_row (1, "$[r]%06ld$[n]", s );
|
||||
|
||||
int r=1;
|
||||
while ((d = desc_conto.get()) != NULL)
|
||||
@ -374,9 +367,9 @@ void CG1100_application::set_senza_ana()
|
||||
|
||||
reset_row (1);
|
||||
|
||||
set_row (1, "@1g@pn", FLD(lnum,PCN_GRUPPO, "@@@.") );
|
||||
set_row (1, "@5g@pn", FLD(lnum,PCN_CONTO, "@@@.") );
|
||||
set_row (1, "@9g@pn", FLD(lnum, PCN_SOTTOCONTO, "@@@@@@") );
|
||||
set_row (1, "@1g$[r]@pn$[n]", FLD(lnum,PCN_GRUPPO, "@@@.") );
|
||||
set_row (1, "@5$[r]g@pn$[n]", FLD(lnum,PCN_CONTO, "@@@.") );
|
||||
set_row (1, "@9$[r]g@pn$[n]", FLD(lnum, PCN_SOTTOCONTO, "@@@@@@") );
|
||||
|
||||
set_row (1, "@16g@50s", FLD(lnum,PCN_DESCR) );
|
||||
|
||||
@ -391,7 +384,6 @@ void CG1100_application::set_senza_ana()
|
||||
set_row (1, "@107g@f", FLD(lnum, PCN_COMPENS) );
|
||||
set_row (1, "@114g@1n", FLD(lnum, PCN_TIPOSPRIC) );
|
||||
set_row (1, "@120g@1s", FLD(lnum, PCN_SEZSALDI) );
|
||||
// set_row (1, "@118g@f", FLD(lnum, PCN_STSOTTAB));
|
||||
}
|
||||
|
||||
|
||||
@ -401,9 +393,9 @@ void CG1100_application::set_completa()
|
||||
|
||||
reset_row (1);
|
||||
|
||||
set_row (1, "@1g@pn", FLD(lnum,PCN_GRUPPO, "@@@.") );
|
||||
set_row (1, "@5g@pn", FLD(lnum,PCN_CONTO, "@@@.") );
|
||||
set_row (1, "@9g@pn", FLD(lnum, PCN_SOTTOCONTO, "@@@@@@") );
|
||||
set_row (1, "@1g$[r]@pn$[n]", FLD(lnum,PCN_GRUPPO, "@@@.") );
|
||||
set_row (1, "@5g$[r]@pn$[n]", FLD(lnum,PCN_CONTO, "@@@.") );
|
||||
set_row (1, "@9g$[r]@pn", FLD(lnum, PCN_SOTTOCONTO, "@@@@@@") );
|
||||
|
||||
set_row (1, "@16g@50s", FLD(lnum,PCN_DESCR) );
|
||||
|
||||
@ -418,7 +410,6 @@ void CG1100_application::set_completa()
|
||||
set_row (1, "@107g@f", FLD(lnum, PCN_COMPENS) );
|
||||
set_row (1, "@114g@1n", FLD(lnum, PCN_TIPOSPRIC) );
|
||||
set_row (1, "@120g@1s", FLD(lnum, PCN_SEZSALDI) );
|
||||
// set_row (1, "@118g@f", FLD(lnum, PCN_STSOTTAB));
|
||||
}
|
||||
|
||||
bool CG1100_application::elabora_riga()
|
||||
@ -426,62 +417,46 @@ bool CG1100_application::elabora_riga()
|
||||
static int old_gruppo = 0;
|
||||
int new_gruppo = 0, new_conto = 0;
|
||||
long new_sottoc = 0l;
|
||||
TRectype& curr_rec = *_rec;
|
||||
|
||||
switch (_tipo_stampa)
|
||||
{
|
||||
case completa:
|
||||
case senza_ana_bil:
|
||||
case senza_IV_direttiva:
|
||||
{
|
||||
TRectype curr_rec = current_cursor()->curr(LF_PCON);
|
||||
curr_rec = current_cursor()->curr(LF_PCON); break;
|
||||
case con_ana_bil:
|
||||
case con_IV_direttiva:
|
||||
curr_rec = *_rec; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
new_gruppo = curr_rec.get_int(PCN_GRUPPO);
|
||||
new_conto = curr_rec.get_int(PCN_CONTO);
|
||||
new_sottoc = curr_rec.get_long(PCN_SOTTOCONTO);
|
||||
// se e' un sottoconto stampo sotttab in 127
|
||||
if ((new_gruppo != 0) && (new_conto != 0) && (new_sottoc != 0))
|
||||
if (new_gruppo != 0 && new_conto != 0)
|
||||
{
|
||||
// se e' un sottoconto stampo sotttab in 127
|
||||
if (new_sottoc != 0)
|
||||
{
|
||||
set_row (1, "@127g@f", FLD(LF_PCON, PCN_STSOTTAB));
|
||||
set_row (1, "@124g ");
|
||||
}
|
||||
else
|
||||
// se e' un conto stampo sotttab in 124
|
||||
if ((new_gruppo != 0) && (new_conto != 0) && (new_sottoc == 0))
|
||||
// se e' un conto stampo sotttab in 124
|
||||
{
|
||||
set_row (1, "@124g@f", FLD(LF_PCON, PCN_STSOTTAB));
|
||||
set_row (1, "@127g ");
|
||||
}
|
||||
break;
|
||||
}
|
||||
case con_ana_bil:
|
||||
case con_IV_direttiva:
|
||||
new_gruppo = _rec->get_int(PCN_GRUPPO);
|
||||
new_conto = _rec->get_int(PCN_CONTO);
|
||||
new_sottoc = _rec->get_long(PCN_SOTTOCONTO);
|
||||
// se e' un sottoconto stampo sotttab in 127
|
||||
if ((new_gruppo != 0) && (new_conto != 0) && (new_sottoc != 0))
|
||||
{
|
||||
set_row (1, "@127g%c", (char)_rec->get_bool(PCN_STSOTTAB));
|
||||
set_row (1, "@124g ");
|
||||
}
|
||||
else
|
||||
// se e' un conto stampo sotttab in 124
|
||||
if ((new_gruppo != 0) && (new_conto != 0) && (new_sottoc == 0))
|
||||
{
|
||||
set_row (1, "@124g%c", (char)_rec->get_bool(PCN_STSOTTAB));
|
||||
set_row (1, "@127g ");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// Gestione salto pagina
|
||||
|
||||
// Gestione salto pagina
|
||||
if (old_gruppo == 0) old_gruppo = new_gruppo;
|
||||
|
||||
if (new_gruppo != old_gruppo)
|
||||
if (_salto_pag && new_gruppo != old_gruppo)
|
||||
{
|
||||
const bool salta = old_gruppo > 0;
|
||||
old_gruppo = new_gruppo;
|
||||
if (_salto_pag) return TRUE;
|
||||
return salta;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
@ -490,9 +465,6 @@ bool CG1100_application::preprocess_page(int file,int counter)
|
||||
{
|
||||
if (elabora_riga())
|
||||
printer().formfeed();
|
||||
// set_auto_ff(TRUE);
|
||||
// else
|
||||
// set_auto_ff(FALSE);
|
||||
|
||||
if (_tipo_stampa == con_IV_direttiva) set_con_IV();
|
||||
if (_tipo_stampa == con_ana_bil) set_con_ana();
|
||||
@ -512,6 +484,7 @@ bool CG1100_application::set_print(int)
|
||||
|
||||
intesta (_tipo_stampa);
|
||||
scegli_cur();
|
||||
enable_link("Collegamento Piano dei conti : ", 'r');
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@ -519,13 +492,11 @@ bool CG1100_application::set_print(int)
|
||||
|
||||
void CG1100_application::intesta (stampe tipo)
|
||||
{
|
||||
int soh; // riga d'inizio dell'intestazione
|
||||
int soh = 1; // riga d'inizio dell'intestazione
|
||||
TString sep(132);
|
||||
|
||||
reset_header ();
|
||||
|
||||
soh=1;
|
||||
|
||||
sep << "Ditta : " << get_firm();
|
||||
sep.left_just(132);
|
||||
|
||||
@ -587,7 +558,10 @@ const char * CG1100_application::decodifica_IV_dir (const char * sezivd, const c
|
||||
TString dep (CODTABLEN);
|
||||
|
||||
_tab.curr().zero();
|
||||
dep << format ("%1s%1s%8s%02d", sezivd, lettivd, numrivd, numivd);
|
||||
if (numrivd != 0)
|
||||
dep.format("%1s%1s%8s%02d", sezivd, lettivd, numrivd, numivd);
|
||||
else
|
||||
dep.format("%1s%1s%8s", sezivd, lettivd, numrivd);
|
||||
|
||||
_tab.curr().put("CODTAB", (const char*)dep);
|
||||
_tab.read();
|
||||
@ -597,7 +571,7 @@ const char * CG1100_application::decodifica_IV_dir (const char * sezivd, const c
|
||||
|
||||
const char * CG1100_application::decodifica_codanabil (const char * codpcab)
|
||||
{
|
||||
// TString dep (CODTABLEN);
|
||||
// TString dep (CODTABLEN);
|
||||
// non sara' un tabella ma un file
|
||||
_tab_anabil.curr().zero();
|
||||
|
||||
@ -607,20 +581,20 @@ const char * CG1100_application::decodifica_codanabil (const char * codpcab)
|
||||
return _tab_anabil.curr().get ("S0");
|
||||
}
|
||||
|
||||
const char * CG1100_application::decodifica_IV_sez (const char * sezivd)
|
||||
{
|
||||
TString dep (CODTABLEN);
|
||||
TString dep2(CODTABLEN);
|
||||
//const char * CG1100_application::decodifica_IV_sez (const char * sezivd)
|
||||
//{
|
||||
// TString dep (CODTABLEN);
|
||||
// TString dep2(CODTABLEN);
|
||||
|
||||
_tab.zero();
|
||||
dep << format ("%1s", sezivd);
|
||||
_tab.put("CODTAB", dep);
|
||||
_tab.read();
|
||||
dep2 = _tab.get("CODTAB");
|
||||
if (dep != dep2)
|
||||
_tab.zero();
|
||||
return _tab.get ("S0");
|
||||
}
|
||||
// _tab.zero();
|
||||
// dep << format ("%1s", sezivd);
|
||||
// _tab.put("CODTAB", dep);
|
||||
// _tab.read();
|
||||
// dep2 = _tab.get("CODTAB");
|
||||
// if (dep != dep2)
|
||||
// _tab.zero();
|
||||
// return _tab.get ("S0");
|
||||
//}
|
||||
|
||||
void CG1100_application::user_create()
|
||||
{
|
||||
|
104
cg/cg1200.cpp
104
cg/cg1200.cpp
@ -2,7 +2,12 @@
|
||||
#include <mask.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
#include <mailbox.h>
|
||||
#include <execp.h>
|
||||
|
||||
#include <clifo.h>
|
||||
#include <saldi.h>
|
||||
#include <comuni.h>
|
||||
#include "cg1200a.h"
|
||||
#include "cg1200b.h"
|
||||
|
||||
@ -55,6 +60,7 @@ public:
|
||||
void set_elenco();
|
||||
void set_rubriche();
|
||||
void set_etichette();
|
||||
void process_link(int id, const char* txt);
|
||||
|
||||
CG1200_App() : TPrintapp(), _piva(30), _telefono(50),
|
||||
_name(60)
|
||||
@ -62,6 +68,7 @@ public:
|
||||
_rel = NULL; _pr_type = undefined; _startrow = 2; _startcol = 3;
|
||||
_rows_et = 9; _cols_et = 40;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -70,6 +77,27 @@ public:
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
|
||||
void CG1200_App::process_link(int id, const char* txt)
|
||||
{
|
||||
TString ss = "1|";
|
||||
switch (_pr_what)
|
||||
{
|
||||
case clienti :
|
||||
ss << "C|"; break;
|
||||
case fornitori :
|
||||
ss << "F|"; break;
|
||||
case both :
|
||||
default :
|
||||
break;
|
||||
}
|
||||
ss << txt;
|
||||
TMessage fs(cmd2name("cg0","1"), MSG_LN, ss);
|
||||
TMailbox m;
|
||||
m.send(fs);
|
||||
TExternal_app cg0("cg -1");
|
||||
if (cg0.run()) beep();
|
||||
}
|
||||
|
||||
TRectype& CG1200_App::look_com(TString& cod)
|
||||
{
|
||||
_comuni->curr().zero();
|
||||
@ -97,27 +125,27 @@ bool CG1200_App::preprocess_page(int counter)
|
||||
{
|
||||
// se non movimentato
|
||||
_saldi->curr().zero();
|
||||
_saldi->curr().put("GRUPPO",get_field(LF_CLIFO,"GRUPPO"));
|
||||
_saldi->curr().put("CONTO",get_field(LF_CLIFO,"CONTO"));
|
||||
_saldi->curr().put("SOTTOCONTO",get_field(LF_CLIFO,"CODCF"));
|
||||
_saldi->curr().put(SLD_GRUPPO,get_field(LF_CLIFO,CLI_GRUPPO));
|
||||
_saldi->curr().put(SLD_CONTO,get_field(LF_CLIFO, CLI_CONTO));
|
||||
_saldi->curr().put(SLD_SOTTOCONTO,get_field(LF_CLIFO,CLI_CODCF));
|
||||
_saldi->read();
|
||||
if (_saldi->curr().get("GRUPPO") == get_field(LF_CLIFO,"GRUPPO") &&
|
||||
_saldi->curr().get("CONTO") == get_field(LF_CLIFO,"CONTO") &&
|
||||
_saldi->curr().get("SOTTOCONTO") == get_field(LF_CLIFO,"CODCF"))
|
||||
if (_saldi->curr().get(SLD_GRUPPO) == get_field(LF_CLIFO, CLI_GRUPPO) &&
|
||||
_saldi->curr().get(SLD_CONTO) == get_field(LF_CLIFO,CLI_CONTO) &&
|
||||
_saldi->curr().get(SLD_SOTTOCONTO) == get_field(LF_CLIFO,CLI_CODCF))
|
||||
// OSTIA! e' MOVIMENTATO!
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// set variable fields
|
||||
_piva = get_field(LF_CLIFO,"COFI");
|
||||
if (_piva.empty()) _piva = get_field(LF_CLIFO,"PAIV");
|
||||
_telefono = get_field(LF_CLIFO,"PTEL");
|
||||
_piva = get_field(LF_CLIFO, CLI_COFI);
|
||||
if (_piva.empty()) _piva = get_field(LF_CLIFO, CLI_PAIV);
|
||||
_telefono = get_field(LF_CLIFO, CLI_PTEL);
|
||||
if (!_telefono.empty()) _telefono << "/";
|
||||
_telefono << get_field(LF_CLIFO,"TEL");
|
||||
_telefono << get_field(LF_CLIFO, CLI_TEL);
|
||||
|
||||
_name = get_field(LF_CLIFO,"RAGSOC");
|
||||
_name = get_field(LF_CLIFO, CLI_RAGSOC);
|
||||
|
||||
if (strcmp(get_field(LF_CLIFO,"TIPOAPER"),"F") == 0)
|
||||
if (strcmp(get_field(LF_CLIFO, CLI_TIPOAPER),"F") == 0)
|
||||
{
|
||||
TString surname = _name.mid(30,50); surname.trim();
|
||||
_name = _name.mid(0,30); _name.trim();
|
||||
@ -193,19 +221,19 @@ void CG1200_App::set_elenco()
|
||||
set_header(6,"@55gCodice per allegato@90gPercipiente 770");
|
||||
set_header(7, (const char *)(TString(132).fill('-')));
|
||||
// body
|
||||
set_row(1,"@pn #s@55g@s@91g@s @s@117g@s #s",
|
||||
FLD(LF_CLIFO, "CODCF","@@@@@@"),
|
||||
set_row(1,"$[r]@pn$[n} #s@55g@s@91g@s @s@117g@s #s",
|
||||
FLD(LF_CLIFO, CLI_CODCF,"@@@@@@"),
|
||||
(const char*)_name,
|
||||
FLD(LF_CLIFO, "INDCF"),
|
||||
FLD(LF_CLIFO, "CAPCF"),
|
||||
FLD(LF_COMUNI,"DENCOM"),
|
||||
FLD(LF_COMUNI,"PROVCOM"),
|
||||
FLD(LF_CLIFO, CLI_INDCF),
|
||||
FLD(LF_CLIFO, CLI_CAPCF),
|
||||
FLD(LF_COMUNI,COM_DENCOM),
|
||||
FLD(LF_COMUNI,COM_PROVCOM),
|
||||
(const char*)_telefono);
|
||||
set_row(2,"@54g#s@90g@2n @2n @pn",
|
||||
(const char *)_piva,
|
||||
FLD(LF_CLIFO,"GRUPPORIC"),
|
||||
FLD(LF_CLIFO,"CONTORIC"),
|
||||
FLD(LF_CLIFO,"SOTTOCRIC","@@@@@@"));
|
||||
FLD(LF_CLIFO,CLI_GRUPPORIC),
|
||||
FLD(LF_CLIFO,CLI_CONTORIC),
|
||||
FLD(LF_CLIFO, CLI_SOTTOCRIC,"@@@@@@"));
|
||||
|
||||
for(int i = 0; i < _interline; i++)
|
||||
set_row(i+3,"");
|
||||
@ -224,13 +252,13 @@ void CG1200_App::set_rubriche()
|
||||
"@104gPr Partita iva Telefono");
|
||||
set_header(5, (const char *)(TString(132).fill('-')));
|
||||
// body
|
||||
set_row(1,"@pn #s@55g@s@91g@s @s@117g@s #s",
|
||||
FLD(LF_CLIFO,"CODCF","@@@@@@"),
|
||||
set_row(1,"$[r]@pn$[n] #s@55g@s@91g@s @s@117g@s #s",
|
||||
FLD(LF_CLIFO,CLI_CODCF,"@@@@@@"),
|
||||
(const char *)_name,
|
||||
FLD(LF_CLIFO,"INDCF"),
|
||||
FLD(LF_CLIFO,"CAPCF"),
|
||||
FLD(LF_COMUNI,"DENCOM"),
|
||||
FLD(LF_COMUNI,"PROVCOM"),
|
||||
FLD(LF_CLIFO,CLI_INDCF),
|
||||
FLD(LF_CLIFO, CLI_CAPCF),
|
||||
FLD(LF_COMUNI, COM_DENCOM),
|
||||
FLD(LF_COMUNI, COM_PROVCOM),
|
||||
(const char*)_telefono);
|
||||
}
|
||||
|
||||
@ -278,12 +306,12 @@ void CG1200_App::set_etichette()
|
||||
set_row(_startrow, format("@%dg#%ds",_startcol, _cols_et - _startcol),
|
||||
(const char*)_name);
|
||||
set_row(_startrow+1, format("@%dg@%ds",_startcol, _cols_et - _startcol),
|
||||
FLD(LF_CLIFO,"INDCF"));
|
||||
FLD(LF_CLIFO, CLI_INDCF));
|
||||
set_row(_startrow+2, format("@%dg@5s @%ds @2s",_startcol,
|
||||
_cols_et - _startcol - 9),
|
||||
FLD(LF_CLIFO,"CAPCF"),
|
||||
FLD(LF_COMUNI,"DENCOM"),
|
||||
FLD(LF_COMUNI,"PROVCOM"));
|
||||
FLD(LF_CLIFO, CLI_CAPCF),
|
||||
FLD(LF_COMUNI, COM_DENCOM),
|
||||
FLD(LF_COMUNI, COM_PROVCOM));
|
||||
|
||||
for (i = _startrow+3; i <= _rows_et; i++)
|
||||
set_row(i,"");
|
||||
@ -316,6 +344,8 @@ bool CG1200_App::set_print(int)
|
||||
|
||||
_sort = atoi(mask.get(RDB_CG12_SORT));
|
||||
_pr_what = (pw)atoi(mask.get(RDB_CG12_TYPE));
|
||||
if (_pr_what != both && _pr_type != rubriche)
|
||||
enable_link("Collegamento Archivio clienti e fornitori : ", 'r');
|
||||
_interline = atoi(mask.get(LST_CG12_INTERLINE));
|
||||
_mov_only = mask.get(CHK_CG12_MOVIM) == "X";
|
||||
|
||||
@ -351,15 +381,15 @@ bool CG1200_App::set_print(int)
|
||||
tr1.zero(); tr2.zero();
|
||||
if (_sort == 1)
|
||||
{
|
||||
tr1.put("CODCF",cod_from);
|
||||
tr2.put("CODCF",cod_to);
|
||||
tr1.put("TIPOCF", _pr_what == clienti ? "C" : "F");
|
||||
tr2.put("TIPOCF", _pr_what == clienti ? "C" : "F");
|
||||
tr1.put(CLI_CODCF,cod_from);
|
||||
tr2.put(CLI_CODCF,cod_to);
|
||||
tr1.put(CLI_TIPOCF, _pr_what == clienti ? "C" : "F");
|
||||
tr2.put(CLI_TIPOCF, _pr_what == clienti ? "C" : "F");
|
||||
}
|
||||
else
|
||||
{
|
||||
tr1.put("RAGSOC",cod_from);
|
||||
tr2.put("RAGSOC",cod_to);
|
||||
tr1.put(CLI_RAGSOC,cod_from);
|
||||
tr2.put(CLI_RAGSOC,cod_to);
|
||||
}
|
||||
current_cursor()->setregion(cod_from.empty() ? NULL : &tr1,
|
||||
cod_to.empty() ? NULL : &tr2);
|
||||
|
618
cg/cg1500.cpp
618
cg/cg1500.cpp
File diff suppressed because it is too large
Load Diff
656
cg/cg1600.cpp
656
cg/cg1600.cpp
File diff suppressed because it is too large
Load Diff
@ -50,9 +50,9 @@ $(EP)cg0500a.msk : cg0500a.uml
|
||||
|
||||
$(O)/cg1.o: cg1.cpp $(I10) $(I24) $(I32)
|
||||
|
||||
$(O)/cg1100.o: cg1100.cpp $(I6) $(I10) $(I24) $(I27) $(I33) cg1100.h
|
||||
$(O)/cg1100.o: cg1100.cpp $(I6) $(I10) $(I24) $(I27) $(I33) $(I47) $(I48) cg1100.h $(IP)pconti.h
|
||||
|
||||
$(O)/cg1200.o: cg1200.cpp $(I6) $(I10) $(I24) $(I27) $(I33) cg1200a.h
|
||||
$(O)/cg1200.o: cg1200.cpp $(I6) $(I10) $(I24) $(I27) $(I33) $(I47) $(I48) cg1200a.h $(IP)saldi.h $(IP)clifo.h $(IP)comuni.h
|
||||
|
||||
$(O)/cg1300.o: cg1200.cpp $(I24) $(I31) $(I33) $(I51)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user