Corretti da Parma lista movimenti , mastrini, stampa clienti/fornitori , giornale
git-svn-id: svn://10.65.10.50/trunk@584 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c5c76c0c94
commit
b8d3d63b6c
426
cg/cg1200.cpp
426
cg/cg1200.cpp
@ -11,9 +11,12 @@
|
|||||||
#include <mov.h>
|
#include <mov.h>
|
||||||
#include <comuni.h>
|
#include <comuni.h>
|
||||||
#include <cfven.h>
|
#include <cfven.h>
|
||||||
#include <indsp.h>
|
#include <indsp.h>
|
||||||
|
|
||||||
|
#include "cg1.h"
|
||||||
#include "cg1200a.h"
|
#include "cg1200a.h"
|
||||||
#include "cg1200b.h"
|
#include "cg1200b.h"
|
||||||
|
#include <pconti.h>
|
||||||
|
|
||||||
#define COMRF_ALIAS 50
|
#define COMRF_ALIAS 50
|
||||||
#define COMNASC_ALIAS 51
|
#define COMNASC_ALIAS 51
|
||||||
@ -23,6 +26,9 @@ enum pw { clienti = 1, fornitori = 2, both = 3 };
|
|||||||
|
|
||||||
bool mask2_reset_fields(TMask_field& mf, KEY k);
|
bool mask2_reset_fields(TMask_field& mf, KEY k);
|
||||||
|
|
||||||
|
extern char __tmp [MAXSTR];
|
||||||
|
static TFixed_string tmp(__tmp, MAXSTR);
|
||||||
|
|
||||||
class CG1200_App : public TPrintapp
|
class CG1200_App : public TPrintapp
|
||||||
{
|
{
|
||||||
friend bool mask2_reset_fields(TMask_field& mf, KEY k);
|
friend bool mask2_reset_fields(TMask_field& mf, KEY k);
|
||||||
@ -38,18 +44,22 @@ class CG1200_App : public TPrintapp
|
|||||||
TLocalisamfile* _comuni;
|
TLocalisamfile* _comuni;
|
||||||
|
|
||||||
// etichette
|
// etichette
|
||||||
int _startrow, _rows_et, _cols_et, _startcol;
|
int _startrow, _rows_et, _cols_et, _startcol;
|
||||||
|
|
||||||
// variable field slots
|
// variable field slots
|
||||||
TString _piva, _cpercip, _fax, _telex, _name, _telefono, _indir,
|
TString _piva,_cpercip,_fax,_telex,_name,_telefono,_indir,_localita;
|
||||||
_localita;
|
TString _cod_from,_cod_to,_data_stampa,_cofi,_d_c_ric,_d_alleg;
|
||||||
|
TString _datanas;
|
||||||
|
long _codice;
|
||||||
|
char _tipocf,_tipoaper;
|
||||||
|
bool _gia_iniziati_fornitori;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual bool preprocess_page(int file, int counter);
|
virtual bool preprocess_page(int file, int counter);
|
||||||
virtual bool preprocess_print(int file, int counter);
|
virtual bool preprocess_print(int file, int counter);
|
||||||
virtual print_action postprocess_print(int file, int counter);
|
virtual print_action postprocess_print(int file, int counter);
|
||||||
|
virtual void preprocess_header();
|
||||||
virtual void user_create();
|
virtual void user_create();
|
||||||
virtual bool destroy();
|
virtual bool destroy();
|
||||||
virtual bool set_print(int);
|
virtual bool set_print(int);
|
||||||
@ -66,7 +76,13 @@ public:
|
|||||||
void set_rubriche();
|
void set_rubriche();
|
||||||
void set_etichette();
|
void set_etichette();
|
||||||
void set_vendite(int f, int c) ;
|
void set_vendite(int f, int c) ;
|
||||||
void process_link(int id, const char* txt);
|
void process_link(int id, const char* txt);
|
||||||
|
void ultimo_codice(char tipo);
|
||||||
|
const char* compatta_ragsoc(TString& ragsoc,char tipoaper);
|
||||||
|
void header_elenco();
|
||||||
|
void header_rubriche();
|
||||||
|
const char* descrizione_conto_ric(int,int,long);
|
||||||
|
const char* descrizione_allegato(char,long);
|
||||||
|
|
||||||
CG1200_App() : TPrintapp(),_piva(18), _cpercip(10), _fax(50), _telex(50),
|
CG1200_App() : TPrintapp(),_piva(18), _cpercip(10), _fax(50), _telex(50),
|
||||||
_name(60), _telefono(90), _indir(70), _localita(90)
|
_name(60), _telefono(90), _indir(70), _localita(90)
|
||||||
@ -106,9 +122,46 @@ const char* CG1200_App::look_tab(const char* tabname, TString& cod,
|
|||||||
return tab.curr().get(fld);
|
return tab.curr().get(fld);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* CG1200_App::descrizione_conto_ric(int gruppo, int conto, long sottoc)
|
||||||
|
{
|
||||||
|
TLocalisamfile pconti(LF_PCON, FALSE);
|
||||||
|
|
||||||
|
pconti.setkey(1);
|
||||||
|
pconti.zero();
|
||||||
|
pconti.put(PCN_GRUPPO, gruppo);
|
||||||
|
pconti.put(PCN_CONTO, conto);
|
||||||
|
pconti.put(PCN_SOTTOCONTO, sottoc);
|
||||||
|
pconti.read();
|
||||||
|
if (pconti.bad())
|
||||||
|
pconti.zero();
|
||||||
|
tmp = pconti.get(PCN_DESCR);
|
||||||
|
|
||||||
|
return (__tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* CG1200_App::descrizione_allegato(char tipocf,long cod)
|
||||||
|
{
|
||||||
|
TLocalisamfile clifo(LF_CLIFO, FALSE);
|
||||||
|
|
||||||
|
clifo.setkey(1);
|
||||||
|
clifo.zero();
|
||||||
|
clifo.put(CLI_TIPOCF, tipocf);
|
||||||
|
clifo.put(CLI_CODCF , cod);
|
||||||
|
clifo.read();
|
||||||
|
if (clifo.bad())
|
||||||
|
clifo.zero();
|
||||||
|
_tipoaper = clifo.get_char(CLI_TIPOAPER);
|
||||||
|
tmp = clifo.get(CLI_RAGSOC);
|
||||||
|
|
||||||
|
return (__tmp);
|
||||||
|
}
|
||||||
|
|
||||||
bool CG1200_App::preprocess_page(int file, int counter)
|
bool CG1200_App::preprocess_page(int file, int counter)
|
||||||
{
|
{
|
||||||
TString s;
|
TString s;
|
||||||
|
int g_ric,c_ric;
|
||||||
|
long s_ric,codall;
|
||||||
|
|
||||||
switch (file)
|
switch (file)
|
||||||
{
|
{
|
||||||
case LF_CLIFO:
|
case LF_CLIFO:
|
||||||
@ -127,9 +180,13 @@ bool CG1200_App::preprocess_page(int file, int counter)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_tipocf = current_cursor()->curr(LF_CLIFO).get_char(CLI_TIPOCF);
|
||||||
|
|
||||||
// set variable fields
|
// set variable fields
|
||||||
_piva = get_field(LF_CLIFO, CLI_COFI);
|
_cofi = get_field(LF_CLIFO, CLI_COFI);
|
||||||
if (_piva.empty()) _piva = get_field(LF_CLIFO, CLI_PAIV);
|
//_piva = get_field(LF_CLIFO, CLI_COFI);
|
||||||
|
//if (_piva.empty()) _piva = get_field(LF_CLIFO, CLI_PAIV);
|
||||||
|
_piva = get_field(LF_CLIFO, CLI_PAIV);
|
||||||
_telefono = get_field(LF_CLIFO, CLI_PTEL);
|
_telefono = get_field(LF_CLIFO, CLI_PTEL);
|
||||||
if (!_telefono.empty()) _telefono << "/";
|
if (!_telefono.empty()) _telefono << "/";
|
||||||
_telefono << get_field(LF_CLIFO, CLI_TEL) << " ";
|
_telefono << get_field(LF_CLIFO, CLI_TEL) << " ";
|
||||||
@ -145,8 +202,31 @@ bool CG1200_App::preprocess_page(int file, int counter)
|
|||||||
_telex = get_field(LF_CLIFO, CLI_PTELEX);
|
_telex = get_field(LF_CLIFO, CLI_PTELEX);
|
||||||
if (!_telex.empty()) _telex << "/";
|
if (!_telex.empty()) _telex << "/";
|
||||||
_telex << get_field(LF_CLIFO, CLI_TELEX);
|
_telex << get_field(LF_CLIFO, CLI_TELEX);
|
||||||
_indir = get_field(LF_CLIFO, CLI_INDCF);
|
_indir = get_field(LF_CLIFO, CLI_INDCF);
|
||||||
|
g_ric = atoi(get_field(LF_CLIFO, CLI_GRUPPORIC));
|
||||||
|
c_ric = atoi(get_field(LF_CLIFO, CLI_CONTORIC));
|
||||||
|
s_ric = atol(get_field(LF_CLIFO, CLI_SOTTOCRIC));
|
||||||
|
codall = atol(get_field(LF_CLIFO, CLI_CODALLEG));
|
||||||
|
_datanas = get_field(LF_CLIFO, CLI_DATANASC);
|
||||||
|
const TString16 tipoaper(get_field(LF_CLIFO, CLI_TIPOAPER));
|
||||||
|
|
||||||
|
_d_alleg = "";
|
||||||
|
if (codall != 0)
|
||||||
|
{
|
||||||
|
_d_alleg = descrizione_allegato(_tipocf,codall);
|
||||||
|
if (_tipoaper == 'F')
|
||||||
|
{
|
||||||
|
TString surname = _d_alleg.mid(30,50); surname.trim();
|
||||||
|
_d_alleg = _d_alleg.mid(0,30); _d_alleg.trim();
|
||||||
|
_d_alleg << " " << surname;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_d_c_ric = descrizione_conto_ric(g_ric,c_ric,s_ric);
|
||||||
|
|
||||||
|
_d_c_ric = _d_c_ric.mid(0,31);
|
||||||
|
_d_alleg = _d_alleg.mid(0,26);
|
||||||
|
|
||||||
if (!_indir.empty()) _indir << " ";
|
if (!_indir.empty()) _indir << " ";
|
||||||
_indir << get_field(LF_CLIFO, CLI_CIVCF);
|
_indir << get_field(LF_CLIFO, CLI_CIVCF);
|
||||||
|
|
||||||
@ -157,7 +237,7 @@ bool CG1200_App::preprocess_page(int file, int counter)
|
|||||||
_name = get_field(LF_CLIFO, CLI_RAGSOC);
|
_name = get_field(LF_CLIFO, CLI_RAGSOC);
|
||||||
s = get_field(LF_CLIFO, CLI_CODANAGPER);
|
s = get_field(LF_CLIFO, CLI_CODANAGPER);
|
||||||
_cpercip = "";
|
_cpercip = "";
|
||||||
const TString16 tipoaper(get_field(LF_CLIFO, CLI_TIPOAPER));
|
|
||||||
|
|
||||||
if (s.not_empty()) _cpercip << tipoaper << " " << s;
|
if (s.not_empty()) _cpercip << tipoaper << " " << s;
|
||||||
|
|
||||||
@ -166,6 +246,21 @@ bool CG1200_App::preprocess_page(int file, int counter)
|
|||||||
TString surname = _name.mid(30,50); surname.trim();
|
TString surname = _name.mid(30,50); surname.trim();
|
||||||
_name = _name.mid(0,30); _name.trim();
|
_name = _name.mid(0,30); _name.trim();
|
||||||
_name << " " << surname;
|
_name << " " << surname;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(_pr_type)
|
||||||
|
{
|
||||||
|
case elenco:
|
||||||
|
case rubriche:
|
||||||
|
if (_pr_what == both)
|
||||||
|
if (_tipocf == 'F' && !_gia_iniziati_fornitori)
|
||||||
|
{
|
||||||
|
_gia_iniziati_fornitori = TRUE;
|
||||||
|
printer().formfeed();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -198,22 +293,24 @@ default:
|
|||||||
|
|
||||||
print_action CG1200_App::postprocess_print(int file, int counter)
|
print_action CG1200_App::postprocess_print(int file, int counter)
|
||||||
{
|
{
|
||||||
static bool more = FALSE;
|
/*
|
||||||
if (_pr_what == both)
|
static bool more = FALSE;
|
||||||
{
|
if (_pr_what == both)
|
||||||
if (more)
|
{
|
||||||
{
|
if (more)
|
||||||
more = FALSE;
|
{
|
||||||
select_cursor(ccur());
|
more = FALSE;
|
||||||
return NEXT_PAGE;
|
select_cursor(ccur());
|
||||||
}
|
return NEXT_PAGE;
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
more = TRUE;
|
{
|
||||||
select_cursor(ccur());
|
more = TRUE;
|
||||||
return REPEAT_PAGE;
|
select_cursor(ccur());
|
||||||
}
|
return REPEAT_PAGE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
return NEXT_PAGE;
|
return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -270,38 +367,223 @@ void CG1200_App::set_page(int file, int counter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG1200_App::set_elenco()
|
void CG1200_App::ultimo_codice(char tipocf)
|
||||||
|
{
|
||||||
|
TLocalisamfile clifo(LF_CLIFO,FALSE);
|
||||||
|
|
||||||
|
char tipopr = tipocf;
|
||||||
|
|
||||||
|
clifo.setkey(1);
|
||||||
|
clifo.zero();
|
||||||
|
clifo.put(CLI_TIPOCF,tipocf);
|
||||||
|
|
||||||
|
for (clifo.read();!clifo.eof();clifo.next())
|
||||||
|
{
|
||||||
|
char tipo = clifo.get_char(CLI_TIPOCF);
|
||||||
|
|
||||||
|
if (tipo != tipopr) break;
|
||||||
|
|
||||||
|
_codice = clifo.get_long(CLI_CODCF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* CG1200_App::compatta_ragsoc(TString& ragsoc,char tipoa)
|
||||||
|
{
|
||||||
|
if (tipoa == 'F')
|
||||||
|
{
|
||||||
|
TString80 cognome, nome;
|
||||||
|
cognome = ragsoc.mid(0,30);
|
||||||
|
nome = ragsoc.mid(30,20);
|
||||||
|
cognome.trim(); nome.trim();
|
||||||
|
|
||||||
|
ragsoc = cognome;
|
||||||
|
ragsoc << " " << nome;
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp = ragsoc;
|
||||||
|
|
||||||
|
return (__tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CG1200_App::preprocess_header()
|
||||||
|
{
|
||||||
|
switch(_pr_type)
|
||||||
|
{
|
||||||
|
case elenco:
|
||||||
|
header_elenco();
|
||||||
|
break;
|
||||||
|
case rubriche:
|
||||||
|
header_rubriche();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CG1200_App::header_elenco()
|
||||||
{
|
{
|
||||||
reset_header();
|
reset_header();
|
||||||
// intestazione
|
// intestazione
|
||||||
const long firm = get_firm();
|
const long firm = get_firm();
|
||||||
|
TString var;
|
||||||
|
int j = 1;
|
||||||
|
char tipocf;
|
||||||
TLocalisamfile ditte(LF_NDITTE);
|
TLocalisamfile ditte(LF_NDITTE);
|
||||||
ditte.zero();
|
ditte.zero();
|
||||||
ditte.put(NDT_CODDITTA, firm);
|
ditte.put(NDT_CODDITTA, firm);
|
||||||
ditte.read();
|
ditte.read();
|
||||||
if (ditte.bad()) ditte.zero();
|
if (ditte.bad()) ditte.zero();
|
||||||
TString s(ditte.get(NDT_RAGSOC));
|
TString s(ditte.get(NDT_RAGSOC));
|
||||||
set_header(1, "Ditta %ld %s @102gData @<@125gPag @#", firm, (const char*) s);
|
|
||||||
set_header(2, "Elenco %s",(_pr_what == both ? "Clienti+Fornitori" :
|
set_header(j, "Ditta %ld %s@125gPag @#", firm, (const char*) s);
|
||||||
(_pr_what == clienti ? "Clienti" : "Fornitori")));
|
set_header(j++, "@102gData %s", (const char*) _data_stampa);
|
||||||
set_header(3, (const char *)(TString(132).fill('-')));
|
/*
|
||||||
set_header(4, " Codice Ragione sociale");
|
if (_pr_what == both)
|
||||||
set_header(5, "@9gIndirizzo@59gC.A.P.@66gLocalita'");
|
{
|
||||||
set_header(6, "@9gTelefoni@91gFAX @115gTelex");
|
current_cursor()->save_status();
|
||||||
set_header(7, "@9gLuogo di nascita@46gData"
|
++(*current_cursor());
|
||||||
"@56gPartita IVA Codice fiscale@93gConto di costo/ricavo@115gC.allegato@126gPerc.770");
|
tipocf = current_cursor()->curr(LF_CLIFO).get_char(CLI_TIPOCF);
|
||||||
set_header(8, (const char *)(TString(132).fill('-')));
|
--(*current_cursor());
|
||||||
|
current_cursor()->restore_status();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
*/
|
||||||
|
tipocf = current_cursor()->curr(LF_CLIFO).get_char(CLI_TIPOCF);
|
||||||
|
|
||||||
|
if (tipocf == 'C')
|
||||||
|
var = "Clienti";
|
||||||
|
else
|
||||||
|
if (tipocf == 'F')
|
||||||
|
var = "Fornitori";
|
||||||
|
|
||||||
|
set_header(j, "Elenco %s",(const char*) var);
|
||||||
|
|
||||||
|
if (_sort == 1)
|
||||||
|
var = "Ordine di codice";
|
||||||
|
else
|
||||||
|
var = "Ordine alfabetico";
|
||||||
|
|
||||||
|
set_header(j, "@30g%s", (const char*) var);
|
||||||
|
|
||||||
|
if (_mov_only)
|
||||||
|
set_header(j, "@55gSolo i movimentati");
|
||||||
|
|
||||||
|
ultimo_codice(_tipocf);
|
||||||
|
|
||||||
|
set_header(j++, "@102gUltimo cod.utilizzato %ld" , _codice);
|
||||||
|
|
||||||
|
if (_pr_what != both)
|
||||||
|
{
|
||||||
|
if (_cod_from.not_empty() || _cod_to.not_empty())
|
||||||
|
{
|
||||||
|
set_header(j, "Estremi selezione");
|
||||||
|
if (_cod_from.not_empty())
|
||||||
|
set_header(j, " da %s", (const char*) _cod_from);
|
||||||
|
if (_cod_to.not_empty())
|
||||||
|
if (_sort == 1)
|
||||||
|
set_header(j, " a %s", (const char*) _cod_to);
|
||||||
|
else
|
||||||
|
set_header(j, " a %s", (const char*) _cod_to);
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set_header(j++, (const char *)(TString(132).fill('-')));
|
||||||
|
set_header(j++, " Codice Ragione sociale");
|
||||||
|
set_header(j++, "@9gIndirizzo@56gC.A.P.@63gLocalita'");
|
||||||
|
set_header(j++, "@9gTelefoni@90gFAX @115gTelex");
|
||||||
|
set_header(j++, "@9gLuogo di nascita@45gData@56gPartita IVA Codice fiscale");
|
||||||
|
set_header(j++, "@9gConto di costo/ricavo@56gCodice allegato@90gPercipiente 770");
|
||||||
|
set_header(j, (const char *)(TString(132).fill('-')));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CG1200_App::header_rubriche()
|
||||||
|
{
|
||||||
|
reset_header();
|
||||||
|
// intestazione
|
||||||
|
const long firm = get_firm();
|
||||||
|
TString var;
|
||||||
|
int j = 1;
|
||||||
|
char tipocf;
|
||||||
|
TLocalisamfile ditte(LF_NDITTE);
|
||||||
|
ditte.zero();
|
||||||
|
ditte.put(NDT_CODDITTA, firm);
|
||||||
|
ditte.read();
|
||||||
|
if (ditte.bad()) ditte.zero();
|
||||||
|
TString s(ditte.get(NDT_RAGSOC));
|
||||||
|
set_header(j, "Ditta %ld %s@125gPag @#", firm, (const char*) s);
|
||||||
|
set_header(j++, "@102gData %s", (const char*) _data_stampa);
|
||||||
|
/*
|
||||||
|
if (_pr_what == both)
|
||||||
|
{
|
||||||
|
current_cursor()->save_status();
|
||||||
|
++(*current_cursor());
|
||||||
|
tipocf = current_cursor()->curr(LF_CLIFO).get_char(CLI_TIPOCF);
|
||||||
|
--(*current_cursor());
|
||||||
|
current_cursor()->restore_status();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
*/
|
||||||
|
tipocf = current_cursor()->curr(LF_CLIFO).get_char(CLI_TIPOCF);
|
||||||
|
|
||||||
|
if (tipocf == 'C')
|
||||||
|
var = "Clienti";
|
||||||
|
else
|
||||||
|
if (tipocf == 'F')
|
||||||
|
var = "Fornitori";
|
||||||
|
|
||||||
|
set_header(j, "Rubrica %s",(const char*) var);
|
||||||
|
|
||||||
|
if (_sort == 1)
|
||||||
|
var = "Ordine di codice";
|
||||||
|
else
|
||||||
|
var = "Ordine alfabetico";
|
||||||
|
|
||||||
|
set_header(j, "@30g%s", (const char*) var);
|
||||||
|
|
||||||
|
if (_mov_only)
|
||||||
|
set_header(j, "@55gSolo i movimentati");
|
||||||
|
|
||||||
|
ultimo_codice(_tipocf);
|
||||||
|
|
||||||
|
set_header(j++, "@102gUltimo cod.utilizzato %ld" , _codice);
|
||||||
|
|
||||||
|
if (_pr_what != both)
|
||||||
|
{
|
||||||
|
if (_cod_from.not_empty() || _cod_to.not_empty())
|
||||||
|
{
|
||||||
|
set_header(j, "Estremi selezione");
|
||||||
|
if (_cod_from.not_empty())
|
||||||
|
set_header(j, " da %s", (const char*) _cod_from);
|
||||||
|
if (_cod_to.not_empty())
|
||||||
|
if (_sort == 1)
|
||||||
|
set_header(j, " a %s", (const char*) _cod_to);
|
||||||
|
else
|
||||||
|
set_header(j, " a %s", (const char*) _cod_to);
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set_header(j++, (const char *)(TString(132).fill('-')));
|
||||||
|
set_header(j++, " Codice Ragione sociale@60gIndirizzo@100gC.A.P.@106gLocalita'@127gProv.");
|
||||||
|
set_header(j++, "@9gPartita iva@25gTelefoni");
|
||||||
|
set_header(j++, (const char *)(TString(132).fill('-')));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CG1200_App::set_elenco()
|
||||||
|
{
|
||||||
// body
|
// body
|
||||||
set_row(1,"$[r]@1s$[n] $[r]@pn$[n] #t", FLD(LF_CLIFO, CLI_TIPOCF),
|
set_row(1,"$[r]@1s$[n] $[r]@pn$[n] #t", FLD(LF_CLIFO, CLI_TIPOCF),
|
||||||
FLD(LF_CLIFO, CLI_CODCF,"@@@@@@"), &_name);
|
FLD(LF_CLIFO, CLI_CODCF,"@@@@@@"), &_name);
|
||||||
set_row(2,"@9g#t@59g@s@66g#t@s @s", &_indir, FLD(LF_CLIFO, CLI_CAPCF),
|
set_row(2,"@9g#t@56g@s@63g#t @s @s", &_indir, FLD(LF_CLIFO, CLI_CAPCF),
|
||||||
&_localita, FLD(-COMRF_ALIAS,COM_DENCOM), FLD(-COMRF_ALIAS,COM_PROVCOM));
|
&_localita, FLD(-COMRF_ALIAS,COM_DENCOM), FLD(-COMRF_ALIAS,COM_PROVCOM));
|
||||||
set_row(3,"@9g#t@90g#t@115g#t", &_telefono, &_fax, &_telex);
|
set_row(3,"@9g#t@90g#t@115g#t", &_telefono, &_fax, &_telex);
|
||||||
set_row(4,"@9g@s @s@46g@ld@56g#t@92g@3n @3n @6n@115g@n@126g#t",
|
set_row(4,"@9g@s @s@45g#t@56g#t@69g#t",FLD(-COMNASC_ALIAS, COM_DENCOM),
|
||||||
FLD(-COMNASC_ALIAS, COM_DENCOM), FLD(-COMNASC_ALIAS, COM_PROVCOM),
|
FLD(-COMNASC_ALIAS, COM_PROVCOM), &_datanas, &_piva,&_cofi);
|
||||||
FLD(LF_CLIFO, CLI_DATANASC), &_piva, FLD(LF_CLIFO,CLI_GRUPPORIC),
|
|
||||||
FLD(LF_CLIFO,CLI_CONTORIC), FLD(LF_CLIFO, CLI_SOTTOCRIC),
|
set_row(5,"@9g@3n @3n @6n #t@56g@n #t@90g#t",FLD(LF_CLIFO,CLI_GRUPPORIC),
|
||||||
FLD(LF_CLIFO, CLI_CODALLEG), &_cpercip);
|
FLD(LF_CLIFO,CLI_CONTORIC), FLD(LF_CLIFO, CLI_SOTTOCRIC),&_d_c_ric,
|
||||||
|
FLD(LF_CLIFO, CLI_CODALLEG), &_d_alleg, &_cpercip);
|
||||||
|
|
||||||
for(int i = 0; i < _interline; i++)
|
for(int i = 0; i < _interline; i++)
|
||||||
set_row(i+5,"");
|
set_row(i+5,"");
|
||||||
@ -309,29 +591,12 @@ void CG1200_App::set_elenco()
|
|||||||
|
|
||||||
void CG1200_App::set_rubriche()
|
void CG1200_App::set_rubriche()
|
||||||
{
|
{
|
||||||
reset_header();
|
|
||||||
// intestazione
|
|
||||||
const long firm = get_firm();
|
|
||||||
TLocalisamfile ditte(LF_NDITTE);
|
|
||||||
ditte.zero();
|
|
||||||
ditte.put(NDT_CODDITTA, firm);
|
|
||||||
ditte.read();
|
|
||||||
if (ditte.bad()) ditte.zero();
|
|
||||||
TString s(ditte.get(NDT_RAGSOC));
|
|
||||||
set_header(1, "Ditta %ld %s @102gData @<@125gPag @#", firm, (const char*) s);
|
|
||||||
set_header(2, "Rubrica %s",(_pr_what == both ? "Clienti+Fornitori" :
|
|
||||||
(_pr_what == clienti ? "Clienti" : "Fornitori")));
|
|
||||||
set_header(3, (const char *)(TString(132).fill('-')));
|
|
||||||
set_header(4, " Codice Ragione sociale");
|
|
||||||
set_header(5, "@9gIndirizzo@59gC.A.P.@66gLocalita'");
|
|
||||||
set_header(6, "@9gTelefoni@91gFAX @115gTelex");
|
|
||||||
set_header(7, (const char *)(TString(132).fill('-')));
|
|
||||||
// body
|
// body
|
||||||
set_row(1,"$[r]@1s$[n] $[r]@pn$[n] #t", FLD(LF_CLIFO,CLI_TIPOCF),
|
set_row(1,"$[r]@1s$[n] $[r]@pn$[n] #t", FLD(LF_CLIFO,CLI_TIPOCF),
|
||||||
FLD(LF_CLIFO,CLI_CODCF,"@@@@@@"), &_name);
|
FLD(LF_CLIFO,CLI_CODCF,"@@@@@@"), &_name);
|
||||||
set_row(2,"@9g#t@59g@s@66g#t@s @s", &_indir, FLD(LF_CLIFO, CLI_CAPCF),
|
set_row(1,"@60g#t@100g@s@106g#t @127g@s", &_indir, FLD(LF_CLIFO, CLI_CAPCF),
|
||||||
&_localita, FLD(-COMRF_ALIAS,COM_DENCOM), FLD(-COMRF_ALIAS,COM_PROVCOM));
|
&_localita, FLD(-COMRF_ALIAS,COM_PROVCOM));
|
||||||
set_row(3,"@9g#t@90g#t@115g#t", &_telefono, &_fax, &_telex);
|
set_row(2,"@9g#t@25g#t", &_piva,&_telefono);
|
||||||
|
|
||||||
for(int i = 0; i < _interline; i++)
|
for(int i = 0; i < _interline; i++)
|
||||||
set_row(i+4,"");
|
set_row(i+4,"");
|
||||||
@ -569,10 +834,16 @@ bool CG1200_App::set_print(int)
|
|||||||
enable_link("Collegamento clienti e fornitori : ", 'r');
|
enable_link("Collegamento clienti e fornitori : ", 'r');
|
||||||
}
|
}
|
||||||
|
|
||||||
_sort = mask.get_int(RDB_CG12_SORT);
|
_sort = mask.get_int(RDB_CG12_SORT);
|
||||||
_pr_what = (pw) mask.get_int(RDB_CG12_TYPE);
|
_pr_what = (pw) mask.get_int(RDB_CG12_TYPE);
|
||||||
_interline = mask.get_int(LST_CG12_INTERLINE);
|
_interline = mask.get_int(LST_CG12_INTERLINE);
|
||||||
_mov_only = mask.get_bool(CHK_CG12_MOVIM);
|
_mov_only = mask.get_bool(CHK_CG12_MOVIM);
|
||||||
|
char tipoafr = mask.get(F_TIPOAPERFR)[0];
|
||||||
|
char tipoato = mask.get(F_TIPOAPERTO)[0];
|
||||||
|
TDate data_stampa (mask.get(F_DATA_STAMPA));
|
||||||
|
_data_stampa = data_stampa.string();
|
||||||
|
_codice = 0;
|
||||||
|
_gia_iniziati_fornitori = FALSE;
|
||||||
|
|
||||||
select_cursor(ccur());
|
select_cursor(ccur());
|
||||||
|
|
||||||
@ -600,11 +871,22 @@ bool CG1200_App::set_print(int)
|
|||||||
toid = (_pr_what == clienti) ? FLD_CLI_RAGSOCTO : FLD_FOR_RAGSOCTO;
|
toid = (_pr_what == clienti) ? FLD_CLI_RAGSOCTO : FLD_FOR_RAGSOCTO;
|
||||||
nome_campo = CLI_RAGSOC;
|
nome_campo = CLI_RAGSOC;
|
||||||
}
|
}
|
||||||
const TString16 cod_from(mask.get(fromid));
|
TString cod_from(mask.get(fromid));
|
||||||
const TString16 cod_to(mask.get(toid));
|
TString cod_to(mask.get(toid));
|
||||||
|
|
||||||
if (cod_from.not_empty()) tr1.put(nome_campo, cod_from);
|
if (cod_from.not_empty()) tr1.put(nome_campo, cod_from);
|
||||||
if (cod_to.not_empty()) tr2.put(nome_campo, cod_to);
|
if (cod_to.not_empty()) tr2.put(nome_campo, cod_to);
|
||||||
|
|
||||||
|
if (_sort == 1)
|
||||||
|
{
|
||||||
|
_cod_from = cod_from;
|
||||||
|
_cod_to = cod_to;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_cod_from = compatta_ragsoc(cod_from,tipoafr);
|
||||||
|
_cod_to = compatta_ragsoc(cod_to,tipoato);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
current_cursor()->setregion(tr1, tr2);
|
current_cursor()->setregion(tr1, tr2);
|
||||||
|
|
||||||
|
@ -14,5 +14,10 @@
|
|||||||
#define BUT_CG12_ELENCO 115
|
#define BUT_CG12_ELENCO 115
|
||||||
#define BUT_CG12_RUBRICHE 116
|
#define BUT_CG12_RUBRICHE 116
|
||||||
#define BUT_CG12_ETICHETTE 117
|
#define BUT_CG12_ETICHETTE 117
|
||||||
#define BUT_CG12_VENDITE 118
|
#define BUT_CG12_VENDITE 118
|
||||||
|
#define F_CODDITTA 119
|
||||||
|
#define F_RAGSOC 120
|
||||||
|
#define F_DATA_STAMPA 121
|
||||||
|
#define F_TIPOAPERFR 122
|
||||||
|
#define F_TIPOAPERTO 123
|
||||||
|
|
||||||
|
100
cg/cg1200a.uml
100
cg/cg1200a.uml
@ -1,10 +1,36 @@
|
|||||||
#include "cg1200a.h"
|
#include "cg1200a.h"
|
||||||
#include <lffiles.h>
|
#include <lffiles.h>
|
||||||
PAGE "Selezione" -1 -1 70 17
|
PAGE "Selezione" -1 -1 70 20
|
||||||
|
|
||||||
|
NUMBER F_CODDITTA 5
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 1 "Ditta "
|
||||||
|
FLAGS "FRD"
|
||||||
|
USE LF_NDITTE KEY 1
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
INPUT CODDITTA F_CODDITTA
|
||||||
|
DISPLAY "Codice" CODDITTA
|
||||||
|
DISPLAY "Ragione sociale @50" RAGSOC
|
||||||
|
OUTPUT F_CODDITTA CODDITTA
|
||||||
|
OUTPUT F_RAGSOC RAGSOC
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_RAGSOC 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 2 "Ragione sociale "
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
DATE F_DATA_STAMPA
|
||||||
|
BEGIN
|
||||||
|
PROMPT 42 1 "Data di stampa "
|
||||||
|
FLAGS "A"
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
RADIOBUTTON RDB_CG12_TYPE 22
|
RADIOBUTTON RDB_CG12_TYPE 22
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 1 "Oggetto"
|
PROMPT 4 4 "Oggetto"
|
||||||
HELP "Selezionare l'archivio che si desidera stampare"
|
HELP "Selezionare l'archivio che si desidera stampare"
|
||||||
ITEM "1|Clienti" MESSAGE RESET,2@|SHOW,1@|HIDE,2@
|
ITEM "1|Clienti" MESSAGE RESET,2@|SHOW,1@|HIDE,2@
|
||||||
ITEM "2|Fornitori" MESSAGE RESET,1@|SHOW,2@|HIDE,1@
|
ITEM "2|Fornitori" MESSAGE RESET,1@|SHOW,2@|HIDE,1@
|
||||||
@ -13,7 +39,7 @@ END
|
|||||||
|
|
||||||
RADIOBUTTON RDB_CG12_SORT 22
|
RADIOBUTTON RDB_CG12_SORT 22
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 6 "Ordinamento"
|
PROMPT 4 9 "Ordinamento"
|
||||||
HELP "Selezionare il tipo di ordinamento dei record stampati"
|
HELP "Selezionare il tipo di ordinamento dei record stampati"
|
||||||
ITEM "1|per Codice" MESSAGE CLEAR,4@|ENABLE,3@
|
ITEM "1|per Codice" MESSAGE CLEAR,4@|ENABLE,3@
|
||||||
ITEM "2|per Ragione Sociale" MESSAGE CLEAR,3@|ENABLE,4@
|
ITEM "2|per Ragione Sociale" MESSAGE CLEAR,3@|ENABLE,4@
|
||||||
@ -21,32 +47,32 @@ END
|
|||||||
|
|
||||||
GROUPBOX DLG_NULL 35 10
|
GROUPBOX DLG_NULL 35 10
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 32 1 "Selezione "
|
PROMPT 32 4 "Selezione "
|
||||||
END
|
END
|
||||||
|
|
||||||
TEXT DLG_NULL
|
TEXT DLG_NULL
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 34 5 "da Ragione Sociale/Nominativo"
|
PROMPT 34 8 "da Ragione Sociale/Nominativo"
|
||||||
END
|
END
|
||||||
|
|
||||||
TEXT DLG_NULL
|
TEXT DLG_NULL
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 34 7 "a Ragione Sociale/Nominativo"
|
PROMPT 34 10 "a Ragione Sociale/Nominativo"
|
||||||
END
|
END
|
||||||
|
|
||||||
TEXT DLG_NULL
|
TEXT DLG_NULL
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 34 2 "da Codice"
|
PROMPT 34 5 "da Codice"
|
||||||
END
|
END
|
||||||
|
|
||||||
TEXT DLG_NULL
|
TEXT DLG_NULL
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 48 2 "a Codice"
|
PROMPT 48 5 "a Codice"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING FLD_CLI_CODFR 5
|
STRING FLD_CLI_CODFR 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 34 3 ""
|
PROMPT 34 6 ""
|
||||||
USE LF_CLIFO KEY 1
|
USE LF_CLIFO KEY 1
|
||||||
INPUT TIPOCF "C"
|
INPUT TIPOCF "C"
|
||||||
INPUT CODCF FLD_CLI_CODFR
|
INPUT CODCF FLD_CLI_CODFR
|
||||||
@ -60,7 +86,7 @@ END
|
|||||||
|
|
||||||
STRING FLD_CLI_CODTO 5
|
STRING FLD_CLI_CODTO 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 48 3 ""
|
PROMPT 48 6 ""
|
||||||
COPY USE FLD_CLI_CODFR
|
COPY USE FLD_CLI_CODFR
|
||||||
INPUT TIPOCF "C"
|
INPUT TIPOCF "C"
|
||||||
INPUT CODCF FLD_CLI_CODTO
|
INPUT CODCF FLD_CLI_CODTO
|
||||||
@ -74,7 +100,7 @@ END
|
|||||||
|
|
||||||
STRING FLD_CLI_RAGSOCFR 50 29
|
STRING FLD_CLI_RAGSOCFR 50 29
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 34 6 ""
|
PROMPT 34 9 ""
|
||||||
USE LF_CLIFO KEY 2
|
USE LF_CLIFO KEY 2
|
||||||
INPUT TIPOCF "C"
|
INPUT TIPOCF "C"
|
||||||
INPUT RAGSOC FLD_CLI_RAGSOCFR
|
INPUT RAGSOC FLD_CLI_RAGSOCFR
|
||||||
@ -82,17 +108,20 @@ BEGIN
|
|||||||
DISPLAY "Codice" CODCF
|
DISPLAY "Codice" CODCF
|
||||||
DISPLAY "Codice Fiscale@16" COFI
|
DISPLAY "Codice Fiscale@16" COFI
|
||||||
OUTPUT FLD_CLI_RAGSOCFR RAGSOC
|
OUTPUT FLD_CLI_RAGSOCFR RAGSOC
|
||||||
|
OUTPUT F_TIPOAPERFR TIPOAPER
|
||||||
GROUP 1 4
|
GROUP 1 4
|
||||||
HELP "Introdurre rag. soc. di inizio stampa: vuoto = inizio archivio"
|
HELP "Introdurre rag. soc. di inizio stampa: vuoto = inizio archivio"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING FLD_CLI_RAGSOCTO 50 29
|
STRING FLD_CLI_RAGSOCTO 50 29
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 34 8 ""
|
PROMPT 34 11 ""
|
||||||
COPY USE FLD_CLI_RAGSOCFR
|
COPY USE FLD_CLI_RAGSOCFR
|
||||||
|
INPUT TIPOCF "C"
|
||||||
INPUT RAGSOC FLD_CLI_RAGSOCTO
|
INPUT RAGSOC FLD_CLI_RAGSOCTO
|
||||||
COPY DISPLAY FLD_CLI_RAGSOCFR
|
COPY DISPLAY FLD_CLI_RAGSOCFR
|
||||||
OUTPUT FLD_CLI_RAGSOCTO RAGSOC
|
OUTPUT FLD_CLI_RAGSOCTO RAGSOC
|
||||||
|
OUTPUT F_TIPOAPERTO TIPOAPER
|
||||||
GROUP 1 4
|
GROUP 1 4
|
||||||
HELP "Introdurre ragione soc. di fine stampa: vuoto = fine archivio"
|
HELP "Introdurre ragione soc. di fine stampa: vuoto = fine archivio"
|
||||||
STR_EXPR {(#THIS_FIELD == "") || (#THIS_FIELD >= #FLD_CLI_RAGSOCFR)}
|
STR_EXPR {(#THIS_FIELD == "") || (#THIS_FIELD >= #FLD_CLI_RAGSOCFR)}
|
||||||
@ -101,7 +130,7 @@ END
|
|||||||
|
|
||||||
STRING FLD_FOR_CODFR 5
|
STRING FLD_FOR_CODFR 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 34 3 ""
|
PROMPT 34 6 ""
|
||||||
COPY USE FLD_CLI_CODFR
|
COPY USE FLD_CLI_CODFR
|
||||||
INPUT TIPOCF "F"
|
INPUT TIPOCF "F"
|
||||||
INPUT CODCF FLD_FOR_CODFR
|
INPUT CODCF FLD_FOR_CODFR
|
||||||
@ -113,7 +142,7 @@ END
|
|||||||
|
|
||||||
STRING FLD_FOR_CODTO 5
|
STRING FLD_FOR_CODTO 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 48 3 ""
|
PROMPT 48 6 ""
|
||||||
COPY USE FLD_FOR_CODFR
|
COPY USE FLD_FOR_CODFR
|
||||||
INPUT TIPOCF "F"
|
INPUT TIPOCF "F"
|
||||||
INPUT CODCF FLD_FOR_CODTO
|
INPUT CODCF FLD_FOR_CODTO
|
||||||
@ -127,38 +156,53 @@ END
|
|||||||
|
|
||||||
STRING FLD_FOR_RAGSOCFR 50 29
|
STRING FLD_FOR_RAGSOCFR 50 29
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 34 6 ""
|
PROMPT 34 9 ""
|
||||||
USE LF_CLIFO KEY 2
|
USE LF_CLIFO KEY 2
|
||||||
INPUT TIPOCF "F"
|
INPUT TIPOCF "F"
|
||||||
INPUT RAGSOC FLD_FOR_RAGSOCFR
|
INPUT RAGSOC FLD_FOR_RAGSOCFR
|
||||||
COPY DISPLAY FLD_CLI_RAGSOCFR
|
COPY DISPLAY FLD_CLI_RAGSOCFR
|
||||||
OUTPUT FLD_FOR_RAGSOCFR RAGSOC
|
OUTPUT FLD_FOR_RAGSOCFR RAGSOC
|
||||||
|
OUTPUT F_TIPOAPERFR TIPOAPER
|
||||||
GROUP 2 4
|
GROUP 2 4
|
||||||
HELP "Introdurre rag. soc. di inizio stampa: vuoto = inizio archivio"
|
HELP "Introdurre rag. soc. di inizio stampa: vuoto = inizio archivio"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING FLD_FOR_RAGSOCTO 50 29
|
STRING FLD_FOR_RAGSOCTO 50 29
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 34 8 ""
|
PROMPT 34 11 ""
|
||||||
COPY USE FLD_FOR_RAGSOCFR
|
COPY USE FLD_FOR_RAGSOCFR
|
||||||
|
INPUT TIPOCF "F"
|
||||||
INPUT RAGSOC FLD_FOR_RAGSOCTO
|
INPUT RAGSOC FLD_FOR_RAGSOCTO
|
||||||
COPY DISPLAY FLD_CLI_RAGSOCFR
|
COPY DISPLAY FLD_CLI_RAGSOCFR
|
||||||
OUTPUT FLD_FOR_RAGSOCTO RAGSOC
|
OUTPUT FLD_FOR_RAGSOCTO RAGSOC
|
||||||
|
OUTPUT F_TIPOAPERTO TIPOAPER
|
||||||
GROUP 2 4
|
GROUP 2 4
|
||||||
HELP "Introdurre ragione soc. di fine stampa: vuoto = fine archivio"
|
HELP "Introdurre ragione soc. di fine stampa: vuoto = fine archivio"
|
||||||
STR_EXPR {(#THIS_FIELD == "") || (#THIS_FIELD >= #FLD_FOR_RAGSOCFR)}
|
STR_EXPR {(#THIS_FIELD == "") || (#THIS_FIELD >= #FLD_FOR_RAGSOCFR)}
|
||||||
WARNING "Limite superiore errato"
|
WARNING "Limite superiore errato"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
STRING F_TIPOAPERFR 1
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 ""
|
||||||
|
FLAGS "HD"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_TIPOAPERTO 1
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 2 ""
|
||||||
|
FLAGS "HD"
|
||||||
|
END
|
||||||
|
|
||||||
BOOLEAN CHK_CG12_MOVIM
|
BOOLEAN CHK_CG12_MOVIM
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 10 "Solo movimentati"
|
PROMPT 4 13 "Solo movimentati"
|
||||||
HELP "Selezionare per stampare solo inclusi archivio movimenti"
|
HELP "Selezionare per stampare solo inclusi archivio movimenti"
|
||||||
END
|
END
|
||||||
|
|
||||||
LIST LST_CG12_INTERLINE 1
|
LIST LST_CG12_INTERLINE 1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 11 "Righe interlinea "
|
PROMPT 4 14 "Righe interlinea "
|
||||||
ITEM "0|0"
|
ITEM "0|0"
|
||||||
ITEM "1|1"
|
ITEM "1|1"
|
||||||
ITEM "2|2"
|
ITEM "2|2"
|
||||||
@ -167,36 +211,36 @@ END
|
|||||||
|
|
||||||
GROUPBOX DLG_NULL 51 4
|
GROUPBOX DLG_NULL 51 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 13 "Stampa"
|
PROMPT 2 16 "Stampa"
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON BUT_CG12_ELENCO 9 2
|
BUTTON BUT_CG12_ELENCO 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 14 "~Elenco"
|
PROMPT 4 17 "~Elenco"
|
||||||
MESSAGE EXIT,BUT_CG12_ELENCO
|
MESSAGE EXIT,BUT_CG12_ELENCO
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON BUT_CG12_RUBRICHE 9 2
|
BUTTON BUT_CG12_RUBRICHE 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 16 14 "~Rubriche"
|
PROMPT 16 17 "~Rubriche"
|
||||||
MESSAGE EXIT,BUT_CG12_RUBRICHE
|
MESSAGE EXIT,BUT_CG12_RUBRICHE
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON BUT_CG12_ETICHETTE 9 2
|
BUTTON BUT_CG12_ETICHETTE 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 28 14 "E~tichette"
|
PROMPT 28 17 "E~tichette"
|
||||||
MESSAGE EXIT,BUT_CG12_ETICHETTE
|
MESSAGE EXIT,BUT_CG12_ETICHETTE
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON BUT_CG12_VENDITE 9 2
|
BUTTON BUT_CG12_VENDITE 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 40 14 "~Vendite"
|
PROMPT 40 17 "~Vendite"
|
||||||
MESSAGE EXIT,BUT_CG12_VENDITE
|
MESSAGE EXIT,BUT_CG12_VENDITE
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_QUIT 9 2
|
BUTTON DLG_QUIT 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 55 14 ""
|
PROMPT 55 17 ""
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
1923
cg/cg3100.cpp
1923
cg/cg3100.cpp
File diff suppressed because it is too large
Load Diff
@ -55,7 +55,7 @@ END
|
|||||||
LIST F_CONTROLLO 21
|
LIST F_CONTROLLO 21
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 7 "Controllo movimenti errati "
|
PROMPT 2 7 "Controllo movimenti errati "
|
||||||
HELP "La scelta 1 stampa solo le registrazioni non errate; la scelta 2 permette di listare tutte le registrazioni inserite, segnalando quelle errate; la scelta 3 stampa solo le registrazioni errate"
|
HELP "La scelta 1 stampa tutte le registrazioni senza la segnalazione di quelle errate; la scelta 2 permette di listare tutte le registrazioni inserite, segnalando quelle errate; la scelta 3 stampa solo le registrazioni errate"
|
||||||
ITEM "3|No" MESSAGE HIDE,1@|RESET,1@
|
ITEM "3|No" MESSAGE HIDE,1@|RESET,1@
|
||||||
ITEM "2|Si" MESSAGE SHOW,1@
|
ITEM "2|Si" MESSAGE SHOW,1@
|
||||||
ITEM "1|Stampa movimenti errati" MESSAGE SHOW,1@
|
ITEM "1|Stampa movimenti errati" MESSAGE SHOW,1@
|
||||||
@ -126,6 +126,8 @@ BEGIN
|
|||||||
OUTPUT F_NUMEROFIN NUMREG
|
OUTPUT F_NUMEROFIN NUMREG
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
|
NUM_EXPR {(#F_NUMEROFIN==0)||(#F_NUMEROFIN>=#F_NUMEROINI)}
|
||||||
|
WARNING "Limite superiore errato"
|
||||||
GROUP 2
|
GROUP 2
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@ -6,14 +6,14 @@ PAGE "" -1 -1 76 19
|
|||||||
|
|
||||||
NUMBER F_CODDITTA 5
|
NUMBER F_CODDITTA 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Ditta "
|
PROMPT 2 2 "Ditta "
|
||||||
FLAGS "FRD"
|
FLAGS "FRD"
|
||||||
USE LF_NDITTE KEY 1
|
USE LF_NDITTE KEY 1
|
||||||
CHECKTYPE REQUIRED
|
CHECKTYPE REQUIRED
|
||||||
INPUT CODDITTA F_CODDITTA
|
INPUT CODDITTA F_CODDITTA
|
||||||
DISPLAY "Codice" CODDITTA
|
DISPLAY "Codice" CODDITTA
|
||||||
DISPLAY "Ragione sociale @50" RAGSOC
|
DISPLAY "Ragione sociale @50" RAGSOC
|
||||||
OUTPUT F_CODDITTA CODDITTA
|
OUTPUT F_CODDITTA CODDITTA
|
||||||
OUTPUT F_RAGSOC RAGSOC
|
OUTPUT F_RAGSOC RAGSOC
|
||||||
END
|
END
|
||||||
|
|
||||||
@ -26,12 +26,14 @@ END
|
|||||||
NUMBER F_ANNO 4
|
NUMBER F_ANNO 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 5 "Anno esercizio "
|
PROMPT 2 5 "Anno esercizio "
|
||||||
HELP "Se non indicato nessun anno esercizio significa che si richiede la stampa come specificato nei campi: dalla data, alla data"
|
USE ESC
|
||||||
USE ESC KEY 1
|
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
INPUT CODTAB F_ANNO
|
INPUT CODTAB F_ANNO
|
||||||
DISPLAY "Anno esercizio@50" CODTAB
|
DISPLAY "Anno" CODTAB
|
||||||
|
DISPLAY "Data inizio esercizio" D0
|
||||||
|
DISPLAY "Data fine esercizio" D1
|
||||||
OUTPUT F_ANNO CODTAB
|
OUTPUT F_ANNO CODTAB
|
||||||
|
FLAGS "RZ"
|
||||||
END
|
END
|
||||||
|
|
||||||
DATE F_DATASTAMPA
|
DATE F_DATASTAMPA
|
||||||
|
574
cg/cg3200.cpp
574
cg/cg3200.cpp
@ -25,12 +25,16 @@
|
|||||||
|
|
||||||
static TString256 tmp;
|
static TString256 tmp;
|
||||||
|
|
||||||
int date2esc(const TDate& d, int* prevesc = NULL);
|
int date2esc(const TDate& d, int* prevesc = NULL);
|
||||||
|
bool sottoc_handler_ini (TMask_field& f, KEY k);
|
||||||
|
bool sottoc_handler_fine (TMask_field& f, KEY k);
|
||||||
|
|
||||||
class CG3200_application : public TPrintapp
|
class CG3200_application : public TPrintapp
|
||||||
{
|
{
|
||||||
static bool data_inizio (TMask_field& f, KEY k);
|
static bool data_inizio (TMask_field& f, KEY k);
|
||||||
static bool data_fine (TMask_field& f, KEY k);
|
static bool data_fine (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);
|
||||||
|
|
||||||
TDociva_array _b;
|
TDociva_array _b;
|
||||||
TRelation* _rel;
|
TRelation* _rel;
|
||||||
@ -45,8 +49,8 @@ class CG3200_application : public TPrintapp
|
|||||||
Saldo _sld;
|
Saldo _sld;
|
||||||
|
|
||||||
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;
|
TDate _datareg,_datadoc,_data_inizioese,_datareg_stampa,_inizioes;
|
||||||
int _cur1,_gruppo,_conto,_numcarat,_stampanum,_numivd;
|
int _cur1,_gruppo,_conto,_numcarat,_stampanum,_numivd,_annoiva;
|
||||||
int _numrig,_natdoc,_tipo,_tipostampa,_g_prec,_c_prec,_numrivd_int;
|
int _numrig,_natdoc,_tipo,_tipostampa,_g_prec,_c_prec,_numrivd_int;
|
||||||
real _progredare,_progreavere,_totprogre_dare_al,_totprogre_avere_al;
|
real _progredare,_progreavere,_totprogre_dare_al,_totprogre_avere_al;
|
||||||
real _totprogre_dare,_totprogre_avere,_importo;
|
real _totprogre_dare,_totprogre_avere,_importo;
|
||||||
@ -56,10 +60,12 @@ class CG3200_application : public TPrintapp
|
|||||||
real _saldo_movimenti,_saldo_progressivi,_totale_saldo;
|
real _saldo_movimenti,_saldo_progressivi,_totale_saldo;
|
||||||
TString _ragsoc,_indulc,_civulc,_capulc,_com,_prov,_comulc;
|
TString _ragsoc,_indulc,_civulc,_capulc,_com,_prov,_comulc;
|
||||||
long _codice_ditta,_s_prec;
|
long _codice_ditta,_s_prec;
|
||||||
TString _tipodoc,_codcaus,_descrcaus,_descrdociva,_regiva;
|
TString _tipodoc,_codcaus,_descrcaus,_descrdociva,_regiva,_g_contr,_c_contr,_s_contr;
|
||||||
char _sezivd,_lettivd;
|
char _sezivd,_lettivd;
|
||||||
TString _descrizione,_sezione,_numdoc,_descrizionemov,_numrivd,_descr;
|
TString _descrizione,_sezione,_numdoc,_descrizionemov,_numrivd,_descr;
|
||||||
TString _dataregs, _datadocs,_gruppocontr,_contocontr,_sottocontocontr;
|
TString _dataregs, _datadocs;
|
||||||
|
int _gruppocontr,_contocontr;
|
||||||
|
long _sottocontocontr;
|
||||||
|
|
||||||
bool _stampaprogre,_stampatotiva,_stampatot,_prima_volta,_stampa_mov_prov;
|
bool _stampaprogre,_stampatotiva,_stampatot,_prima_volta,_stampa_mov_prov;
|
||||||
|
|
||||||
@ -67,7 +73,7 @@ class CG3200_application : public TPrintapp
|
|||||||
int _anno_corrente,_anno_precedente,_indbil;
|
int _anno_corrente,_anno_precedente,_indbil;
|
||||||
long _sottoc,_numreg,_numgio,_protiva;
|
long _sottoc,_numreg,_numgio,_protiva;
|
||||||
bool _stampa_progressivi_si,_competenza,_inizio_stampa,_puoi_stampare;
|
bool _stampa_progressivi_si,_competenza,_inizio_stampa,_puoi_stampare;
|
||||||
char _tipocf,_tmcf;
|
char _tmcf,_tipo_contr;
|
||||||
|
|
||||||
TDate _dataregrmov;
|
TDate _dataregrmov;
|
||||||
int _gruppof,_contof;
|
int _gruppof,_contof;
|
||||||
@ -108,12 +114,10 @@ public:
|
|||||||
void data_fine_esercizio(int);
|
void data_fine_esercizio(int);
|
||||||
const char* descrizione_gruppo();
|
const char* descrizione_gruppo();
|
||||||
const char* descrizione_conto();
|
const char* descrizione_conto();
|
||||||
const char* descrizione_gruppo_clifo();
|
|
||||||
const char* descrizione_conto_clifo();
|
|
||||||
const char* descrizione_classe(char,char,int,int);
|
const char* descrizione_classe(char,char,int,int);
|
||||||
bool almeno_un_record();
|
bool almeno_un_record();
|
||||||
void ricerca_dati_ditta();
|
void ricerca_dati_ditta();
|
||||||
void conto();
|
void conto(int,int,bool);
|
||||||
|
|
||||||
CG3200_application() {}
|
CG3200_application() {}
|
||||||
};
|
};
|
||||||
@ -132,7 +136,204 @@ void CG3200_application::process_link(int id, const char* txt)
|
|||||||
|
|
||||||
TExternal_app pn(app);
|
TExternal_app pn(app);
|
||||||
pn.run();
|
pn.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool sottoc_handler_ini(TMask_field& f, KEY key)
|
||||||
|
{
|
||||||
|
const short id = f.dlg();
|
||||||
|
const int gruppo = f.mask().get_int(F_GRUPPOINI);
|
||||||
|
const int conto = f.mask().get_int(F_CONTOINI_CONTO);
|
||||||
|
const long sottoconto = f.mask().get_long(id);
|
||||||
|
TString ds;
|
||||||
|
TString80 rs;
|
||||||
|
TLocalisamfile pconti (LF_PCON);
|
||||||
|
|
||||||
|
if ( key == K_ENTER )
|
||||||
|
{
|
||||||
|
if (sottoconto != 0 && conto == 0)
|
||||||
|
return f.warning_box("Manca il CONTO");
|
||||||
|
|
||||||
|
if (conto != 0 && gruppo == 0)
|
||||||
|
return f.warning_box("Manca il GRUPPO");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( key == K_TAB )
|
||||||
|
{
|
||||||
|
if (id == F_SOTTOCINI_CONTO)
|
||||||
|
{
|
||||||
|
pconti.zero();
|
||||||
|
pconti.put(PCN_GRUPPO, gruppo) ;
|
||||||
|
pconti.put(PCN_CONTO, conto);
|
||||||
|
pconti.put(PCN_SOTTOCONTO, sottoconto);
|
||||||
|
pconti.setkey(1);
|
||||||
|
pconti.read(_isequal, _nolock);
|
||||||
|
if (pconti.good())
|
||||||
|
ds = pconti.get(PCN_DESCR);
|
||||||
|
else
|
||||||
|
ds = "";
|
||||||
|
|
||||||
|
f.mask().set(F_DESCRINI_CONTO, ds);
|
||||||
|
f.mask().set(F_DESCRINI_CLIENTE, ds);
|
||||||
|
f.mask().set(F_DESCRINI_FORN, ds);
|
||||||
|
}
|
||||||
|
if (id == F_SOTTOCINI_CLIENTE || id == F_SOTTOCINI_FORN)
|
||||||
|
{
|
||||||
|
char tipo = id == F_SOTTOCINI_CLIENTE ? 'C' : 'F';
|
||||||
|
TLocalisamfile clifo (LF_CLIFO);
|
||||||
|
if (sottoconto != 0)
|
||||||
|
{
|
||||||
|
clifo.zero();
|
||||||
|
clifo.put(CLI_TIPOCF,tipo);
|
||||||
|
clifo.put(CLI_CODCF, sottoconto) ;
|
||||||
|
clifo.setkey(1);
|
||||||
|
if (clifo.read(_isequal, _nolock) == NOERR)
|
||||||
|
{
|
||||||
|
rs = clifo.get(CLI_RAGSOC);
|
||||||
|
char tipoa = clifo.get_char("TIPOAPER");
|
||||||
|
|
||||||
|
if (tipoa == 'F')
|
||||||
|
{
|
||||||
|
TString80 cognome, nome;
|
||||||
|
cognome = rs.mid(0,30);
|
||||||
|
nome = rs.mid(30,20);
|
||||||
|
cognome.trim(); nome.trim();
|
||||||
|
|
||||||
|
rs = cognome;
|
||||||
|
rs << " " << nome;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
rs = "";
|
||||||
|
|
||||||
|
f.mask().set(F_DESCRINI_CLIENTE, rs);
|
||||||
|
f.mask().set(F_DESCRINI_FORN, rs);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (gruppo != 0 && conto != 0)
|
||||||
|
{
|
||||||
|
pconti.zero();
|
||||||
|
pconti.put(PCN_GRUPPO, gruppo) ;
|
||||||
|
pconti.put(PCN_CONTO, conto);
|
||||||
|
pconti.setkey(1);
|
||||||
|
pconti.read(_isequal, _nolock);
|
||||||
|
if (pconti.good())
|
||||||
|
ds = pconti.get(PCN_DESCR);
|
||||||
|
else
|
||||||
|
ds = "";
|
||||||
|
|
||||||
|
f.mask().set(F_DESCRINI_CLIENTE, ds);
|
||||||
|
f.mask().set(F_DESCRINI_FORN, ds);
|
||||||
|
f.mask().set(F_DESCRINI_CONTO, ds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool sottoc_handler_fine(TMask_field& f, KEY key)
|
||||||
|
{
|
||||||
|
const short id = f.dlg();
|
||||||
|
const int gruppo = f.mask().get_int(F_GRUPPOFINE);
|
||||||
|
const int conto = f.mask().get_int(F_CONTOFINE_CONTO);
|
||||||
|
const long sottoconto = f.mask().get_long(id);
|
||||||
|
TString ds;
|
||||||
|
TString80 rs;
|
||||||
|
TLocalisamfile pconti (LF_PCON);
|
||||||
|
|
||||||
|
if ( key == K_ENTER )
|
||||||
|
{
|
||||||
|
if (sottoconto != 0 && conto == 0)
|
||||||
|
return f.warning_box("Manca il CONTO");
|
||||||
|
|
||||||
|
if (conto != 0 && gruppo == 0)
|
||||||
|
return f.warning_box("Manca il GRUPPO");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( key == K_TAB )
|
||||||
|
{
|
||||||
|
// if (!f.focusdirty() && gruppo == 0 && conto == 0) return TRUE;
|
||||||
|
/*
|
||||||
|
if (sottoconto != 0 && conto == 0)
|
||||||
|
{
|
||||||
|
f.warning_box("Manca il CONTO");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
if (conto != 0 && gruppo == 0)
|
||||||
|
{
|
||||||
|
f.warning_box("Manca il GRUPPO");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
if (id == F_SOTTOCFINE_CONTO)
|
||||||
|
{
|
||||||
|
pconti.zero();
|
||||||
|
pconti.put(PCN_GRUPPO, gruppo) ;
|
||||||
|
pconti.put(PCN_CONTO, conto);
|
||||||
|
pconti.put(PCN_SOTTOCONTO, sottoconto);
|
||||||
|
pconti.setkey(1);
|
||||||
|
pconti.read(_isequal, _nolock);
|
||||||
|
if (pconti.good())
|
||||||
|
ds = pconti.get(PCN_DESCR);
|
||||||
|
else
|
||||||
|
ds = "";
|
||||||
|
|
||||||
|
f.mask().set(F_DESCRFINE_CONTO, ds);
|
||||||
|
f.mask().set(F_DESCRFINE_CLIENTE, ds);
|
||||||
|
f.mask().set(F_DESCRFINE_FORN, ds);
|
||||||
|
}
|
||||||
|
if (id == F_SOTTOCFINE_CLIENTE || id == F_SOTTOCFINE_FORN)
|
||||||
|
{
|
||||||
|
char tipo = id == F_SOTTOCFINE_CLIENTE ? 'C' : 'F';
|
||||||
|
TLocalisamfile clifo (LF_CLIFO);
|
||||||
|
if (sottoconto != 0)
|
||||||
|
{
|
||||||
|
clifo.zero();
|
||||||
|
clifo.put(CLI_TIPOCF,tipo);
|
||||||
|
clifo.put(CLI_CODCF, sottoconto) ;
|
||||||
|
clifo.setkey(1);
|
||||||
|
if (clifo.read(_isequal, _nolock) == NOERR)
|
||||||
|
{
|
||||||
|
rs = clifo.get(CLI_RAGSOC);
|
||||||
|
char tipoa = clifo.get_char("TIPOAPER");
|
||||||
|
|
||||||
|
if (tipoa == 'F')
|
||||||
|
{
|
||||||
|
TString80 cognome, nome;
|
||||||
|
cognome = rs.mid(0,30);
|
||||||
|
nome = rs.mid(30,20);
|
||||||
|
cognome.trim(); nome.trim();
|
||||||
|
|
||||||
|
rs = cognome;
|
||||||
|
rs << " " << nome;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
rs = "";
|
||||||
|
|
||||||
|
f.mask().set(F_DESCRFINE_CLIENTE, rs);
|
||||||
|
f.mask().set(F_DESCRFINE_FORN, rs);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (gruppo != 0 && conto != 0)
|
||||||
|
{
|
||||||
|
pconti.zero();
|
||||||
|
pconti.put(PCN_GRUPPO, gruppo) ;
|
||||||
|
pconti.put(PCN_CONTO, conto);
|
||||||
|
pconti.setkey(1);
|
||||||
|
pconti.read(_isequal, _nolock);
|
||||||
|
if (pconti.good())
|
||||||
|
ds = pconti.get(PCN_DESCR);
|
||||||
|
else
|
||||||
|
ds = "";
|
||||||
|
|
||||||
|
f.mask().set(F_DESCRFINE_CLIENTE, ds);
|
||||||
|
f.mask().set(F_DESCRFINE_FORN, ds);
|
||||||
|
f.mask().set(F_DESCRFINE_CONTO, ds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
int date2esc(const TDate& d, int* prevesc)
|
int date2esc(const TDate& d, int* prevesc)
|
||||||
{
|
{
|
||||||
@ -285,7 +486,9 @@ bool CG3200_application::data_fine(TMask_field& f, KEY k)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
app()._anno_ghost = date2esc(data_ini);
|
app()._anno_ghost = date2esc(data_ini);
|
||||||
|
|
||||||
|
app()._inizioes = app()._inizioEs;
|
||||||
|
|
||||||
if (data < app()._inizioEs || data > app()._fineEs)
|
if (data < app()._inizioEs || data > app()._fineEs)
|
||||||
{
|
{
|
||||||
@ -357,20 +560,13 @@ void CG3200_application::fai_stampa132()
|
|||||||
set_row (1,"@30g#7t", &_numdoc);
|
set_row (1,"@30g#7t", &_numdoc);
|
||||||
set_row (1,"@38g#3t", &_codcaus);
|
set_row (1,"@38g#3t", &_codcaus);
|
||||||
|
|
||||||
set_row (1,"@117g#3t", &_gruppocontr);
|
set_row (1,"@117g#3t", &_g_contr);
|
||||||
set_row (1,"@120g#3t", &_contocontr);
|
set_row (1,"@120g#3t", &_c_contr);
|
||||||
set_row (1,"@123g#6t", &_sottocontocontr);
|
set_row (1,"@123g#6t", &_s_contr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::fai_stampa198()
|
void CG3200_application::fai_stampa198()
|
||||||
{
|
{
|
||||||
TLocalisamfile & rmov = current_cursor()->file(LF_RMOV);
|
|
||||||
long rec;
|
|
||||||
TDate datasucc;
|
|
||||||
TString datasuccstring,dataregrmovstring;
|
|
||||||
int gruppof,contof;
|
|
||||||
long sottocf;
|
|
||||||
|
|
||||||
set_row (1,"@0g#t", &_dataregs);
|
set_row (1,"@0g#t", &_dataregs);
|
||||||
if (_stampanum == 1)
|
if (_stampanum == 1)
|
||||||
set_row (1,"@11g$[r]#7d$[n]", &_numreg);
|
set_row (1,"@11g$[r]#7d$[n]", &_numreg);
|
||||||
@ -384,30 +580,9 @@ void CG3200_application::fai_stampa198()
|
|||||||
|
|
||||||
set_row (1,"@153g#t", &_saldo_movimenti_str);
|
set_row (1,"@153g#t", &_saldo_movimenti_str);
|
||||||
|
|
||||||
set_row (1,"@169g#3t", &_gruppocontr);
|
set_row (1,"@169g#3t", &_g_contr);
|
||||||
set_row (1,"@172g#3t", &_contocontr);
|
set_row (1,"@172g#3t", &_c_contr);
|
||||||
set_row (1,"@175g#6t", &_sottocontocontr);
|
set_row (1,"@175g#6t", &_s_contr);
|
||||||
|
|
||||||
if (_tipo < 3)
|
|
||||||
set_row (1,"@185g#t" , &_regiva);
|
|
||||||
set_row (1,"@194g#5d", &_protiva);
|
|
||||||
_dataregrmov = current_cursor()->curr(LF_RMOV).get_date(RMV_DATAREG);
|
|
||||||
dataregrmovstring=_dataregrmov.string();
|
|
||||||
|
|
||||||
//Gestire la stampa di saldo_progressivi nella postprocess_page di RMOV
|
|
||||||
|
|
||||||
rec = rmov.recno();
|
|
||||||
rmov.next();
|
|
||||||
gruppof = rmov.get_int(RMV_GRUPPO);
|
|
||||||
contof = rmov.get_int(RMV_CONTO);
|
|
||||||
sottocf = rmov.get_int(RMV_SOTTOCONTO);
|
|
||||||
datasucc = rmov.get_date(RMV_DATAREG);
|
|
||||||
datasuccstring=datasucc.string();
|
|
||||||
if (((gruppof!=_gruppo)||(contof!=_conto)||(sottocf!=_sottoc))||(rmov.eof()))
|
|
||||||
datasucc = ("");
|
|
||||||
if (datasucc != _dataregrmov)
|
|
||||||
set_row (1,"@136g#t", &_saldo_progressivi_str);
|
|
||||||
rmov.readat(rec);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::stampa_totali132()
|
void CG3200_application::stampa_totali132()
|
||||||
@ -450,19 +625,25 @@ void CG3200_application::stampa_totali198()
|
|||||||
set_row (3,"@119g%15.0r", &_totale_periodo_avere);
|
set_row (3,"@119g%15.0r", &_totale_periodo_avere);
|
||||||
set_row (3,"@153g%15.0r", &_saldo_movimenti);
|
set_row (3,"@153g%15.0r", &_saldo_movimenti);
|
||||||
set_row (4,"@32gTOTALI PROGRESSIVI@102g%15.0r", &_totprogre_dare);
|
set_row (4,"@32gTOTALI PROGRESSIVI@102g%15.0r", &_totprogre_dare);
|
||||||
set_row (4,"@119g%15.0r", &_totprogre_avere);
|
set_row (4,"@119g%15.0r", &_totprogre_avere);
|
||||||
set_row (4,"@136g%15.0r", &_saldo_progressivi);
|
set_row (4,"@136g%15.0r", &_saldo_progressivi);
|
||||||
if (_stampaprogre) //Progressivi attuali
|
if (_stampaprogre) //Progressivi attuali
|
||||||
{
|
{
|
||||||
set_row(5,"@32gTOTALI PROGRESSIVI AL@55g%s",(const char*)_ultima_data_reg.string());
|
set_row(5,"@32gTOTALI PROGRESSIVI AL@55g%s",(const char*)_ultima_data_reg.string());
|
||||||
set_row (5,"@102g%15.0r", &_totprogre_dare_al);
|
set_row (5,"@102g%15.0r", &_totprogre_dare_al);
|
||||||
set_row (5,"@119g%15.0r", &_totprogre_avere_al);
|
set_row (5,"@119g%15.0r", &_totprogre_avere_al);
|
||||||
set_row (5,"@136g%15.0r", &_saldo_progressivi);
|
set_row (5,"@136g%15.0r", &_saldo_progressivi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG3200_application::preprocess_page(int file, int counter)
|
bool CG3200_application::preprocess_page(int file, int counter)
|
||||||
{
|
{
|
||||||
|
TLocalisamfile & rmov = current_cursor()->file(LF_RMOV);
|
||||||
|
long rec;
|
||||||
|
TDate datasucc;
|
||||||
|
TString datasuccstring,dataregrmovstring;
|
||||||
|
int gruppof,contof;
|
||||||
|
long sottocf;
|
||||||
long record;
|
long record;
|
||||||
TString provvis = "";
|
TString provvis = "";
|
||||||
int annoes;
|
int annoes;
|
||||||
@ -480,13 +661,13 @@ bool CG3200_application::preprocess_page(int file, int counter)
|
|||||||
_conto = atoi(current_cursor()->curr(LF_SALDI).get(SLD_CONTO));
|
_conto = atoi(current_cursor()->curr(LF_SALDI).get(SLD_CONTO));
|
||||||
_sottoc = atol(current_cursor()->curr(LF_SALDI).get(SLD_SOTTOCONTO));
|
_sottoc = atol(current_cursor()->curr(LF_SALDI).get(SLD_SOTTOCONTO));
|
||||||
annoes = atoi(current_cursor()->curr(LF_SALDI).get(SLD_ANNOES));
|
annoes = atoi(current_cursor()->curr(LF_SALDI).get(SLD_ANNOES));
|
||||||
conto();
|
conto(_gruppo,_conto,TRUE);
|
||||||
|
|
||||||
if (annoes != _anno_corrente && annoes != _anno_precedente)
|
if (annoes != _anno_corrente && annoes != _anno_precedente)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (_g_prec == _gruppo && _c_prec == _conto && _s_prec == _sottoc)
|
if (_g_prec == _gruppo && _c_prec == _conto && _s_prec == _sottoc)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
_g_prec = _gruppo;
|
_g_prec = _gruppo;
|
||||||
_c_prec = _conto;
|
_c_prec = _conto;
|
||||||
@ -519,12 +700,13 @@ bool CG3200_application::preprocess_page(int file, int counter)
|
|||||||
{
|
{
|
||||||
_puoi_stampare = TRUE;
|
_puoi_stampare = TRUE;
|
||||||
calcola_progressivi();
|
calcola_progressivi();
|
||||||
|
_saldo_progressivi += _saldo_progre_prec;
|
||||||
stampa_progre_riporto();
|
stampa_progre_riporto();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_puoi_stampare = FALSE;
|
_puoi_stampare = FALSE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -538,14 +720,15 @@ bool CG3200_application::preprocess_page(int file, int counter)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_puoi_stampare = TRUE;
|
_puoi_stampare = TRUE;
|
||||||
|
_saldo_progressivi += _saldo_progre_prec;
|
||||||
stampa_progre_riporto();
|
stampa_progre_riporto();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LF_RMOV:
|
case LF_RMOV:
|
||||||
{
|
{
|
||||||
// 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);
|
||||||
|
|
||||||
@ -560,9 +743,12 @@ bool CG3200_application::preprocess_page(int file, int counter)
|
|||||||
rmov.read();
|
rmov.read();
|
||||||
if (rmov.bad())
|
if (rmov.bad())
|
||||||
rmov.curr().zero();
|
rmov.curr().zero();
|
||||||
_gruppocontr = rmov.curr().get(RMV_GRUPPO);
|
_gruppocontr = rmov.curr().get_int (RMV_GRUPPO);
|
||||||
_contocontr = rmov.curr().get(RMV_CONTO);
|
_contocontr = rmov.curr().get_int (RMV_CONTO);
|
||||||
_sottocontocontr = rmov.curr().get(RMV_SOTTOCONTO);
|
_sottocontocontr = rmov.curr().get_long(RMV_SOTTOCONTO);
|
||||||
|
_g_contr = rmov.get(RMV_GRUPPO);
|
||||||
|
_c_contr = rmov.get(RMV_CONTO);
|
||||||
|
_s_contr = rmov.get(RMV_SOTTOCONTO);
|
||||||
rmov.setkey(2);
|
rmov.setkey(2);
|
||||||
rmov.readat(record);
|
rmov.readat(record);
|
||||||
|
|
||||||
@ -577,8 +763,9 @@ bool CG3200_application::preprocess_page(int file, int counter)
|
|||||||
_mov->read();
|
_mov->read();
|
||||||
if (_mov->bad())
|
if (_mov->bad())
|
||||||
_mov->zero();
|
_mov->zero();
|
||||||
_annoes = _mov->get_int(MOV_ANNOES);
|
_annoes = _mov->get_int(MOV_ANNOES);
|
||||||
_regiva = _mov->curr().get(MOV_REG);
|
_regiva = _mov->curr().get(MOV_REG);
|
||||||
|
_annoiva = _mov->curr().get_int(MOV_ANNOIVA);
|
||||||
|
|
||||||
// Controlla se saldo e' diverso da 0
|
// Controlla se saldo e' diverso da 0
|
||||||
|
|
||||||
@ -586,43 +773,56 @@ bool CG3200_application::preprocess_page(int file, int counter)
|
|||||||
{
|
{
|
||||||
_sezione = current_cursor()->curr(LF_RMOV).get(RMV_SEZIONE);
|
_sezione = current_cursor()->curr(LF_RMOV).get(RMV_SEZIONE);
|
||||||
|
|
||||||
if (_annomsk == 0)
|
if (_annomsk == 0)
|
||||||
{
|
{
|
||||||
_datareg = (_mov->curr().get(MOV_DATAREG));
|
_datareg = (_mov->curr().get(MOV_DATAREG));
|
||||||
_datareg_stampa = _datareg;
|
_datareg_stampa = _datareg;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (_annomsk != 0)
|
if (_annomsk != 0)
|
||||||
{
|
{
|
||||||
_datareg = _mov->curr().get(MOV_DATACOMP);
|
_datareg = _mov->curr().get(MOV_DATACOMP);
|
||||||
_datareg_stampa = _mov->curr().get(MOV_DATAREG);
|
_datareg_stampa = _mov->curr().get(MOV_DATAREG);
|
||||||
}
|
}
|
||||||
|
|
||||||
provvis = _mov->curr().get(MOV_PROVVIS);
|
provvis = _mov->curr().get(MOV_PROVVIS);
|
||||||
|
|
||||||
_dataregs = _datareg_stampa.string();
|
_dataregs = _datareg_stampa.string();
|
||||||
|
|
||||||
if ((_stampa_mov_prov)||((!_stampa_mov_prov)&&(provvis.trim().empty())))
|
if ((_stampa_mov_prov)||((!_stampa_mov_prov)&&(provvis.trim().empty())))
|
||||||
{
|
|
||||||
if ((_datareg >= _data_ini) && (_datareg <= _data_fine))
|
|
||||||
{
|
{
|
||||||
|
if ((_datareg >= _data_ini) && (_datareg <= _data_fine))
|
||||||
|
{
|
||||||
|
// Determino l' anno di competenza dell' operazione in esame
|
||||||
|
|
||||||
|
int anno = date2esc(_datareg_stampa);
|
||||||
|
if (anno != _annoes)
|
||||||
|
if (_numcarat == 1)
|
||||||
|
set_row (1, "@131g*");
|
||||||
|
else
|
||||||
|
if (_numcarat == 2)
|
||||||
|
set_row (1, "@197g*");
|
||||||
|
|
||||||
_codcaus = _mov->curr().get(MOV_CODCAUS);
|
_codcaus = _mov->curr().get(MOV_CODCAUS);
|
||||||
_tipodoc = _mov->curr().get(MOV_TIPODOC);
|
_tipodoc = _mov->curr().get(MOV_TIPODOC);
|
||||||
if (_stampatotiva && (_tmcf == 'C' || _tmcf == 'F'))
|
if (_stampatotiva && (_tmcf == 'C' || _tmcf == 'F'))
|
||||||
{
|
{
|
||||||
documenti_iva();
|
if (_tipodoc != "")
|
||||||
_b.add_riga(_descrdociva,_importo, _natdoc);
|
{
|
||||||
}
|
documenti_iva();
|
||||||
|
_b.add_riga(_descrdociva,_importo, _natdoc);
|
||||||
|
}
|
||||||
|
}
|
||||||
_datadoc = (_mov->curr().get(MOV_DATADOC));
|
_datadoc = (_mov->curr().get(MOV_DATADOC));
|
||||||
_datadocs = _datadoc.string();
|
_datadocs = _datadoc.string();
|
||||||
_numdoc = _mov->curr().get(MOV_NUMDOC);
|
_numdoc = _mov->curr().get(MOV_NUMDOC);
|
||||||
descrizione_causale();
|
descrizione_causale();
|
||||||
_descrizionemov = _mov->curr().get(MOV_DESCR);
|
_descrizionemov = _mov->curr().get(MOV_DESCR);
|
||||||
_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 != "")
|
||||||
{
|
{
|
||||||
@ -638,15 +838,25 @@ bool CG3200_application::preprocess_page(int file, int counter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (_descrizione == "")
|
else if (_descrizione == "")
|
||||||
{
|
if (_descrizionemov != "")
|
||||||
set_row (1,"@42g%.18s", (const char*) _descrcaus);
|
{
|
||||||
set_row (1,"@61g%.23s", (const char*) _descrizionemov);
|
set_row (1,"@42g%.18s", (const char*) _descrcaus);
|
||||||
}
|
set_row (1,"@61g%.23s", (const char*) _descrizionemov);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (_descrizionemov == "")
|
||||||
|
{
|
||||||
|
conto(_gruppocontr,_contocontr,FALSE);
|
||||||
|
TConto tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||||
|
TString descr_contr = tc.descrizione();
|
||||||
|
set_row (1,"@42g%.18s", (const char*) _descrcaus);
|
||||||
|
set_row (1,"@61g%.23s", (const char*) descr_contr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (_numcarat == 2) // Stampa 198 caratteri
|
if (_numcarat == 2) // Stampa 198 caratteri
|
||||||
{
|
{
|
||||||
if (_descrizione != "")
|
if (_descrizione != "")
|
||||||
{
|
{
|
||||||
if (_descrizionemov != "")
|
if (_descrizionemov != "")
|
||||||
{
|
{
|
||||||
@ -659,11 +869,21 @@ bool CG3200_application::preprocess_page(int file, int counter)
|
|||||||
set_row (1,"@68g%.32s", (const char*) _descrizione);
|
set_row (1,"@68g%.32s", (const char*) _descrizione);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (_descrizione == "")
|
else if (_descrizione == "")
|
||||||
{
|
if (_descrizionemov != "")
|
||||||
set_row (1,"@42g%.25s", (const char*) _descrcaus);
|
{
|
||||||
set_row (1,"@68g%.32s", (const char*) _descrizionemov);
|
set_row (1,"@42g%.25s", (const char*) _descrcaus);
|
||||||
}
|
set_row (1,"@68g%.32s", (const char*) _descrizionemov);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (_descrizionemov == "")
|
||||||
|
{
|
||||||
|
conto(_gruppocontr,_contocontr,FALSE);
|
||||||
|
TConto tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||||
|
TString descr_contr = tc.descrizione();
|
||||||
|
set_row (1,"@42g%.25s", (const char*) _descrcaus);
|
||||||
|
set_row (1,"@68g%.32s", (const char*) descr_contr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_sezione == "D")
|
if (_sezione == "D")
|
||||||
@ -671,31 +891,31 @@ bool CG3200_application::preprocess_page(int file, int counter)
|
|||||||
_totale_periodo_dare += _importo;
|
_totale_periodo_dare += _importo;
|
||||||
_riporto_parziale_dare += _importo;
|
_riporto_parziale_dare += _importo;
|
||||||
|
|
||||||
if (_numcarat == 1) // Stampa 132 caratteri
|
if (_numcarat == 1) // Stampa 132 caratteri
|
||||||
set_row (1,"@85g%s", (const char*) _importo_str);
|
set_row (1,"@85g%s", (const char*) _importo_str);
|
||||||
else
|
else
|
||||||
if (_numcarat == 2) // Stampa 198 caratteri
|
if (_numcarat == 2) // Stampa 198 caratteri
|
||||||
{
|
{
|
||||||
_saldo_progressivi += _importo;
|
_saldo_progressivi += _importo;
|
||||||
_saldo_movimenti += _importo;
|
_saldo_movimenti += _importo;
|
||||||
set_row (1,"@102g%s", (const char*) _importo_str);
|
set_row (1,"@102g%s", (const char*) _importo_str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (_sezione == "A")
|
else if (_sezione == "A")
|
||||||
{
|
{
|
||||||
_totale_periodo_avere += _importo;
|
_totale_periodo_avere += _importo;
|
||||||
_riporto_parziale_avere += _importo;
|
_riporto_parziale_avere += _importo;
|
||||||
|
|
||||||
if (_numcarat == 1) // Stampa 132 caratteri
|
if (_numcarat == 1) // Stampa 132 caratteri
|
||||||
set_row (1,"@101g%s", (const char*) _importo_str);
|
set_row (1,"@101g%s", (const char*) _importo_str);
|
||||||
else
|
else
|
||||||
if (_numcarat == 2) // Stampa 198 caratteri
|
if (_numcarat == 2) // Stampa 198 caratteri
|
||||||
{
|
{
|
||||||
_saldo_progressivi -= _importo;
|
_saldo_progressivi -= _importo;
|
||||||
_saldo_movimenti -= _importo;
|
_saldo_movimenti -= _importo;
|
||||||
set_row (1,"@119g%s", (const char*) _importo_str);
|
set_row (1,"@119g%s", (const char*) _importo_str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_saldo_progressivi_str=_saldo_progressivi.string("###############");
|
_saldo_progressivi_str=_saldo_progressivi.string("###############");
|
||||||
_saldo_movimenti_str=_saldo_movimenti.string("###############");
|
_saldo_movimenti_str=_saldo_movimenti.string("###############");
|
||||||
@ -703,17 +923,40 @@ bool CG3200_application::preprocess_page(int file, int counter)
|
|||||||
{
|
{
|
||||||
ricerca_regiva();
|
ricerca_regiva();
|
||||||
_protiva = atol(_mov->curr().get(MOV_PROTIVA));
|
_protiva = atol(_mov->curr().get(MOV_PROTIVA));
|
||||||
|
if (_protiva != 0)
|
||||||
|
set_row (1,"@191g%5d", _protiva);
|
||||||
|
|
||||||
|
if (_tipo < 3)
|
||||||
|
set_row (1,"@182g#t" , &_regiva);
|
||||||
|
_dataregrmov = current_cursor()->curr(LF_RMOV).get_date(RMV_DATAREG);
|
||||||
|
dataregrmovstring=_dataregrmov.string();
|
||||||
|
|
||||||
|
//Gestire la stampa di saldo_progressivi nella postprocess_page di RMOV
|
||||||
|
|
||||||
|
rec = rmov.recno();
|
||||||
|
rmov.next();
|
||||||
|
gruppof = rmov.get_int(RMV_GRUPPO);
|
||||||
|
contof = rmov.get_int(RMV_CONTO);
|
||||||
|
sottocf = rmov.get_int(RMV_SOTTOCONTO);
|
||||||
|
datasucc = rmov.get_date(RMV_DATAREG);
|
||||||
|
datasuccstring=datasucc.string();
|
||||||
|
if (((gruppof!=_gruppo)||(contof!=_conto)||(sottocf!=_sottoc))||(rmov.eof()))
|
||||||
|
datasucc = ("");
|
||||||
|
if (datasucc != _dataregrmov)
|
||||||
|
set_row (1,"@136g#t", &_saldo_progressivi_str);
|
||||||
|
rmov.readat(rec);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -833,7 +1076,6 @@ void CG3200_application::descrizione_causale()
|
|||||||
void CG3200_application::documenti_iva()
|
void CG3200_application::documenti_iva()
|
||||||
{
|
{
|
||||||
TString dep;
|
TString dep;
|
||||||
// _tipodoc = _mov->curr().get(MOV_TIPODOC);
|
|
||||||
|
|
||||||
_tabtpd->curr().zero();
|
_tabtpd->curr().zero();
|
||||||
dep << format ("%2s",(const char*) _tipodoc);
|
dep << format ("%2s",(const char*) _tipodoc);
|
||||||
@ -848,7 +1090,7 @@ void CG3200_application::ricerca_regiva()
|
|||||||
TString16 dep;
|
TString16 dep;
|
||||||
|
|
||||||
_tabreg->curr().zero();
|
_tabreg->curr().zero();
|
||||||
dep << format("%04d", _annoes);
|
dep << format("%04d", _annoiva);
|
||||||
dep << format("%3s" , (const char*) _regiva);
|
dep << format("%3s" , (const char*) _regiva);
|
||||||
_tabreg->curr().put("CODTAB", (const char*) dep);
|
_tabreg->curr().put("CODTAB", (const char*) dep);
|
||||||
_tabreg->read();
|
_tabreg->read();
|
||||||
@ -891,16 +1133,15 @@ bool CG3200_application::set_print(int)
|
|||||||
_stampanum = atoi(_msk->get(F_STAMPANUM));
|
_stampanum = atoi(_msk->get(F_STAMPANUM));
|
||||||
_stampa_mov_prov = (bool)(_msk->get(F_STAMPAMOVPROV) == "X");
|
_stampa_mov_prov = (bool)(_msk->get(F_STAMPAMOVPROV) == "X");
|
||||||
int gruppoini = atoi(_msk->get(F_GRUPPOINI));
|
int gruppoini = atoi(_msk->get(F_GRUPPOINI));
|
||||||
int contoini = atoi(_msk->get(F_CONTOINI));
|
int contoini = atoi(_msk->get(F_CONTOINI_CONTO));
|
||||||
long sottocontoini = atol(_msk->get(F_SOTTOCINI_CONTO));
|
long sottocontoini = atol(_msk->get(F_SOTTOCINI_CONTO));
|
||||||
int gruppofine = atoi(_msk->get(F_GRUPPOFINE));
|
int gruppofine = atoi(_msk->get(F_GRUPPOFINE));
|
||||||
int contofine = atoi(_msk->get(F_CONTOFINE));
|
int contofine = atoi(_msk->get(F_CONTOFINE_CONTO));
|
||||||
long sottocontofine = atol(_msk->get(F_SOTTOCFINE_CONTO));
|
long sottocontofine = atol(_msk->get(F_SOTTOCFINE_CONTO));
|
||||||
_tipostampa = atoi(_msk->get(F_TIPOSTAMPA));
|
_tipostampa = atoi(_msk->get(F_TIPOSTAMPA));
|
||||||
_numcarat = atoi(_msk->get(F_NUMCARAT));
|
_numcarat = atoi(_msk->get(F_NUMCARAT));
|
||||||
int formato = atoi(_msk->get(F_FORMATO));
|
int formato = atoi(_msk->get(F_FORMATO));
|
||||||
int nummast = atoi(_msk->get(F_NUMMAST));
|
int nummast = atoi(_msk->get(F_NUMMAST));
|
||||||
_tipocf = _msk->get(F_TIPOCF)[0];
|
|
||||||
_codice_ditta = get_firm();
|
_codice_ditta = get_firm();
|
||||||
|
|
||||||
ricerca_dati_ditta();
|
ricerca_dati_ditta();
|
||||||
@ -929,6 +1170,7 @@ bool CG3200_application::set_print(int)
|
|||||||
_saldo_movimenti = ZERO;
|
_saldo_movimenti = ZERO;
|
||||||
_saldo_progressivi = ZERO;
|
_saldo_progressivi = ZERO;
|
||||||
_saldo_progre_prec = ZERO;
|
_saldo_progre_prec = ZERO;
|
||||||
|
_protiva = 0;
|
||||||
|
|
||||||
// Scelta del formato e del numero di mastrini per pagina 1 o 2
|
// Scelta del formato e del numero di mastrini per pagina 1 o 2
|
||||||
|
|
||||||
@ -1015,22 +1257,27 @@ void CG3200_application::preprocess_header()
|
|||||||
else if (_tipostampa == 1)
|
else if (_tipostampa == 1)
|
||||||
if (_puoi_stampare)
|
if (_puoi_stampare)
|
||||||
crea_intestazione();
|
crea_intestazione();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::conto()
|
void CG3200_application::conto(int gruppo, int conto, bool no_contropartita)
|
||||||
{
|
{
|
||||||
TLocalisamfile pconti(LF_PCON);
|
TLocalisamfile pconti(LF_PCON);
|
||||||
|
|
||||||
pconti.setkey(1);
|
pconti.setkey(1);
|
||||||
pconti.zero();
|
pconti.zero();
|
||||||
pconti.put(PCN_GRUPPO, _gruppo);
|
pconti.put(PCN_GRUPPO, gruppo);
|
||||||
pconti.put(PCN_CONTO , _conto);
|
pconti.put(PCN_CONTO , conto);
|
||||||
pconti.read();
|
pconti.read();
|
||||||
if (pconti.bad())
|
if (pconti.bad())
|
||||||
pconti.zero();
|
pconti.zero();
|
||||||
|
|
||||||
_indbil = pconti.get_int(PCN_INDBIL);
|
if (no_contropartita)
|
||||||
_tmcf = pconti.get_char(PCN_TMCF);
|
{
|
||||||
|
_indbil = pconti.get_int(PCN_INDBIL);
|
||||||
|
_tmcf = pconti.get_char(PCN_TMCF);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_tipo_contr = pconti.get_char(PCN_TMCF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::ricerca_dati_ditta()
|
void CG3200_application::ricerca_dati_ditta()
|
||||||
@ -1099,8 +1346,6 @@ void CG3200_application::crea_intestazione()
|
|||||||
set_header (3, "@16g%d", _conto);
|
set_header (3, "@16g%d", _conto);
|
||||||
set_header (3, "@20g%ld", _sottoc);
|
set_header (3, "@20g%ld", _sottoc);
|
||||||
|
|
||||||
// conto();
|
|
||||||
|
|
||||||
if (_tmcf == 'C')
|
if (_tmcf == 'C')
|
||||||
_tipo_mask = 1;
|
_tipo_mask = 1;
|
||||||
else if (_tmcf == 'F')
|
else if (_tmcf == 'F')
|
||||||
@ -1122,11 +1367,11 @@ void CG3200_application::crea_intestazione()
|
|||||||
{
|
{
|
||||||
sep.fill('-'); //Stampa 132 - (sep(132))
|
sep.fill('-'); //Stampa 132 - (sep(132))
|
||||||
set_header (6, (const char *) sep);
|
set_header (6, (const char *) sep);
|
||||||
set_header (7,"Operazione@19gDocumento@117gContro");
|
set_header (7,"Operazione@19gDocumento@117gContro@131gA");
|
||||||
set_header (8,"Data");
|
set_header (8,"Data");
|
||||||
if (_stampanum < 3)
|
if (_stampanum < 3)
|
||||||
set_header (8,"@11gnumero");
|
set_header (8,"@11gnumero");
|
||||||
set_header (8,"@19gData@30gNumero@38gCod.Causale@61gDescrizione@90gDare@106gAvere@117gPartita");
|
set_header (8,"@19gData@30gNumero@38gCod.Causale@61gDescrizione@96gDare@111gAvere@117gPartita@131gC");
|
||||||
sep.fill('-');
|
sep.fill('-');
|
||||||
set_header (9, (const char *) sep);
|
set_header (9, (const char *) sep);
|
||||||
}
|
}
|
||||||
@ -1134,54 +1379,14 @@ void CG3200_application::crea_intestazione()
|
|||||||
{
|
{
|
||||||
sep1.fill('-'); //Stampa 198 - (sep1(198))
|
sep1.fill('-'); //Stampa 198 - (sep1(198))
|
||||||
set_header (6,"@1g%s", (const char *) sep1);
|
set_header (6,"@1g%s", (const char *) sep1);
|
||||||
set_header (7,"Operazione@19gData@30gNumero@172gContro@185gReg@193gNumero");
|
set_header (7,"Operazione@19gData@30gNumero@172gContro@182gReg@190gNumero@197gA");
|
||||||
set_header (8,"Data");
|
set_header (8,"Data");
|
||||||
if (_stampanum < 3)
|
if (_stampanum < 3)
|
||||||
set_header (8,"@11gnumero");
|
set_header (8,"@11gnumero");
|
||||||
set_header (8,"@19gDocumento@38gCod.Causale@68gDescrizione@108gDare@124gAvere@136gSaldo progress.@154gSaldo movim.@172gPartita@185gIva@189gProtocollo");
|
set_header (8,"@19gDocumento@38gCod.Causale@68gDescrizione@113gDare@129gAvere@136gSaldo progress.@156gSaldo movim.@172gPartita@182gIva@186gProtocollo@197gC");
|
||||||
sep1.fill('-');
|
sep1.fill('-');
|
||||||
set_header (9,"@1g%s", (const char *) sep1);
|
set_header (9,"@1g%s", (const char *) sep1);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
if (_stampa_progressivi_si)
|
|
||||||
{
|
|
||||||
stampa_progressivi();
|
|
||||||
_riporto_dare = _progredare;
|
|
||||||
_riporto_avere = _progreavere;
|
|
||||||
_stampa_progressivi_si = FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_riporto_dare += _riporto_parziale_dare;
|
|
||||||
_riporto_avere += _riporto_parziale_avere;
|
|
||||||
if (_numcarat == 1)
|
|
||||||
{
|
|
||||||
TString string = _riporto_dare.string("###############");
|
|
||||||
set_header (10,"@32gA RIPORTO@85g%15s",(const char*) string);
|
|
||||||
string = _riporto_avere.string("###############");
|
|
||||||
set_header (10,"@101g%15s",(const char*) string);
|
|
||||||
}
|
|
||||||
if (_numcarat == 2)
|
|
||||||
{
|
|
||||||
TString string = _riporto_dare.string("###############");
|
|
||||||
set_header (10,"@32gA RIPORTO@102g%15s",(const char*) string);
|
|
||||||
string = _riporto_avere.string("###############");
|
|
||||||
set_header (10,"@119g%15s",(const char*) string);
|
|
||||||
}
|
|
||||||
_riporto_parziale_dare = 0;
|
|
||||||
_riporto_parziale_avere = 0;
|
|
||||||
}
|
|
||||||
if (_numcarat == 1)
|
|
||||||
{
|
|
||||||
sep ="";
|
|
||||||
set_header(11,"@1g%s",(const char*) sep);
|
|
||||||
}
|
|
||||||
else if (_numcarat == 2)
|
|
||||||
{
|
|
||||||
sep1 ="";
|
|
||||||
set_header(11,"@1g%s",(const char*) sep1);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::stampa_progre_riporto()
|
void CG3200_application::stampa_progre_riporto()
|
||||||
@ -1262,15 +1467,15 @@ void CG3200_application::calcola_progressivi_al()
|
|||||||
|
|
||||||
if (_annomsk == 0)
|
if (_annomsk == 0)
|
||||||
{
|
{
|
||||||
datareg = rmov.get_date(RMV_DATAREG);
|
datareg = rmov.get_date(RMV_DATAREG);
|
||||||
data = _inizioEs;
|
data = _inizioes;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (_annomsk != 0)
|
if (_annomsk != 0)
|
||||||
{
|
{
|
||||||
datareg = datacomp;
|
datareg = datacomp;
|
||||||
data = _data_inizioese;
|
data = _data_inizioese;
|
||||||
}
|
}
|
||||||
|
|
||||||
gruppo = rmov.get_int(RMV_GRUPPO);
|
gruppo = rmov.get_int(RMV_GRUPPO);
|
||||||
conto = rmov.get_int(RMV_CONTO);
|
conto = rmov.get_int(RMV_CONTO);
|
||||||
@ -1281,20 +1486,18 @@ void CG3200_application::calcola_progressivi_al()
|
|||||||
if (sezione == 'D')
|
if (sezione == 'D')
|
||||||
_totale_prima_dare += importo;
|
_totale_prima_dare += importo;
|
||||||
else if (sezione == 'A')
|
else if (sezione == 'A')
|
||||||
_totale_prima_avere += importo;
|
_totale_prima_avere += importo;
|
||||||
}
|
}
|
||||||
rmov.readat(record);
|
rmov.readat(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::calcola_progressivi()
|
void CG3200_application::calcola_progressivi()
|
||||||
{
|
{
|
||||||
// TLocalisamfile* saldi;
|
|
||||||
TLocalisamfile saldi(LF_SALDI, FALSE);
|
TLocalisamfile saldi(LF_SALDI, FALSE);
|
||||||
real pdaresca,paveresca,pdarescap,paverescap;
|
real pdaresca,paveresca,pdarescap,paverescap;
|
||||||
real progdare_attuale,progavere_attuale,progdare_prec,progavere_prec;
|
real progdare_attuale,progavere_attuale,progdare_prec,progavere_prec;
|
||||||
real saldo,progredare_eseprec,progreavere_eseprec,pdarep,paverep;
|
real saldo,progredare_eseprec,progreavere_eseprec,pdarep,paverep;
|
||||||
char salini;
|
char salini;
|
||||||
// TRectype record(saldi.curr());
|
|
||||||
|
|
||||||
saldo = ZERO;
|
saldo = ZERO;
|
||||||
pdarep = ZERO;
|
pdarep = ZERO;
|
||||||
@ -1307,9 +1510,6 @@ void CG3200_application::calcola_progressivi()
|
|||||||
// Ricerca sull'archivio saldi dei record con gruppo,conto,sottoconto
|
// Ricerca sull'archivio saldi dei record con gruppo,conto,sottoconto
|
||||||
// uguali a quelli di rmov per il calcolo dei progressivi precedenti
|
// uguali a quelli di rmov per il calcolo dei progressivi precedenti
|
||||||
|
|
||||||
// saldi = current_cursor()->file(LF_SALDI);
|
|
||||||
// rec = saldi->recno();
|
|
||||||
|
|
||||||
TRectype record(saldi.curr());
|
TRectype record(saldi.curr());
|
||||||
|
|
||||||
record.zero();
|
record.zero();
|
||||||
@ -1369,11 +1569,9 @@ void CG3200_application::calcola_progressivi()
|
|||||||
{
|
{
|
||||||
progredare_eseprec = saldo;// + pdarescap + pdarep;
|
progredare_eseprec = saldo;// + pdarescap + pdarep;
|
||||||
progdare_prec = saldo;
|
progdare_prec = saldo;
|
||||||
// progreavere_eseprec = paverescap;// + paverep;
|
|
||||||
}
|
}
|
||||||
else if (salini == 'A')
|
else if (salini == 'A')
|
||||||
{
|
{
|
||||||
// progredare_eseprec = pdarescap;// + pdarep;
|
|
||||||
progreavere_eseprec = saldo;// + paverescap + paverep;
|
progreavere_eseprec = saldo;// + paverescap + paverep;
|
||||||
progavere_prec = saldo;
|
progavere_prec = saldo;
|
||||||
}
|
}
|
||||||
@ -1396,11 +1594,9 @@ void CG3200_application::calcola_progressivi()
|
|||||||
{
|
{
|
||||||
progredare_eseprec = saldo;// + pdarescap + pdarep;
|
progredare_eseprec = saldo;// + pdarescap + pdarep;
|
||||||
progdare_prec = saldo;
|
progdare_prec = saldo;
|
||||||
// progreavere_eseprec = paverescap + paverep;
|
|
||||||
}
|
}
|
||||||
else if (saldo < ZERO)
|
else if (saldo < ZERO)
|
||||||
{
|
{
|
||||||
// progredare_eseprec = pdarescap + pdarep;
|
|
||||||
saldo = -saldo;
|
saldo = -saldo;
|
||||||
progreavere_eseprec = saldo;// + paverescap + paverep;
|
progreavere_eseprec = saldo;// + paverescap + paverep;
|
||||||
progavere_prec = saldo;
|
progavere_prec = saldo;
|
||||||
@ -1408,8 +1604,6 @@ void CG3200_application::calcola_progressivi()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// saldi->readat(rec);
|
|
||||||
|
|
||||||
calcola_progressivi_al();
|
calcola_progressivi_al();
|
||||||
|
|
||||||
//Calcolo dei progressivi precedenti: somma di tutti quei movimenti di rmov
|
//Calcolo dei progressivi precedenti: somma di tutti quei movimenti di rmov
|
||||||
@ -1457,8 +1651,11 @@ void CG3200_application::stampa_progressivi()
|
|||||||
set_row (1,"@32gPROGRESSIVI PRECEDENTI@102g%15s",(const char*)string);
|
set_row (1,"@32gPROGRESSIVI PRECEDENTI@102g%15s",(const char*)string);
|
||||||
string = _progreavere.string("###############");
|
string = _progreavere.string("###############");
|
||||||
set_row (1,"@119g%15s",(const char*) string);
|
set_row (1,"@119g%15s",(const char*) string);
|
||||||
|
string = _saldo_progre_prec.string("###############");
|
||||||
|
set_row (1,"@136g%15s",(const char*) string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Se la ricerca selezionata nella maschera e' per clienti, oppure fornitori, // allora ricerco su CLIFO i relativi dati, e su PCON il relativo gruppo,conto,// sottoconto e IV direttiva CEE
|
// Se la ricerca selezionata nella maschera e' per clienti, oppure fornitori, // allora ricerco su CLIFO i relativi dati, e su PCON il relativo gruppo,conto,// sottoconto e IV direttiva CEE
|
||||||
|
|
||||||
void CG3200_application::ricerca_clifo()
|
void CG3200_application::ricerca_clifo()
|
||||||
@ -1501,9 +1698,7 @@ void CG3200_application::ricerca_clifo()
|
|||||||
pconti.zero();
|
pconti.zero();
|
||||||
pconti.put(PCN_GRUPPO, _gruppo);
|
pconti.put(PCN_GRUPPO, _gruppo);
|
||||||
pconti.put(PCN_CONTO, _conto);
|
pconti.put(PCN_CONTO, _conto);
|
||||||
//pconti.put(PCN_SOTTOCONTO, _sottoc);
|
|
||||||
pconti.read();
|
pconti.read();
|
||||||
//_sezivd = pconti.get_char(PCN_SEZIVD);
|
|
||||||
_sezivd = pconti.get_char(PCN_SEZIVD);
|
_sezivd = pconti.get_char(PCN_SEZIVD);
|
||||||
_lettivd = pconti.get_char(PCN_LETTIVD);
|
_lettivd = pconti.get_char(PCN_LETTIVD);
|
||||||
numrivd = pconti.get_int(PCN_NUMRIVD);
|
numrivd = pconti.get_int(PCN_NUMRIVD);
|
||||||
@ -1582,7 +1777,6 @@ void CG3200_application::ricerca_classe_IV(bool scelta)
|
|||||||
if (scelta)
|
if (scelta)
|
||||||
pconti.put(PCN_SOTTOCONTO, _sottoc);
|
pconti.put(PCN_SOTTOCONTO, _sottoc);
|
||||||
pconti.read();
|
pconti.read();
|
||||||
//_sezivd = pconti.get_char(PCN_SEZIVD);
|
|
||||||
_sezivd = pconti.get_char(PCN_SEZIVD);
|
_sezivd = pconti.get_char(PCN_SEZIVD);
|
||||||
_lettivd = pconti.get_char(PCN_LETTIVD);
|
_lettivd = pconti.get_char(PCN_LETTIVD);
|
||||||
_numrivd_int = pconti.get_int (PCN_NUMRIVD);
|
_numrivd_int = pconti.get_int (PCN_NUMRIVD);
|
||||||
@ -1732,6 +1926,12 @@ void CG3200_application::user_create()
|
|||||||
_tabesc = new TTable (TAB_ESC);
|
_tabesc = new TTable (TAB_ESC);
|
||||||
|
|
||||||
_msk = new TMask("cg3200a");
|
_msk = new TMask("cg3200a");
|
||||||
|
_msk->set_handler(F_SOTTOCINI_CONTO, sottoc_handler_ini);
|
||||||
|
_msk->set_handler(F_SOTTOCINI_CLIENTE, sottoc_handler_ini);
|
||||||
|
_msk->set_handler(F_SOTTOCINI_FORN, sottoc_handler_ini);
|
||||||
|
_msk->set_handler(F_SOTTOCFINE_CONTO, sottoc_handler_fine);
|
||||||
|
_msk->set_handler(F_SOTTOCFINE_CLIENTE, sottoc_handler_fine);
|
||||||
|
_msk->set_handler(F_SOTTOCFINE_FORN, sottoc_handler_fine);
|
||||||
|
|
||||||
_inizio_stampa = TRUE;
|
_inizio_stampa = TRUE;
|
||||||
}
|
}
|
||||||
|
13
cg/cg3200.h
13
cg/cg3200.h
@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
#define F_CODDITTA 101
|
#define F_CODDITTA 101
|
||||||
#define F_RAGSOC 102
|
#define F_RAGSOC 102
|
||||||
#define F_TIPOCF 103
|
#define F_TIPOCF_INI 103
|
||||||
#define F_GRUPPOINI 104
|
#define F_GRUPPOINI 104
|
||||||
#define F_GRUPPOFINE 105
|
#define F_GRUPPOFINE 105
|
||||||
#define F_CONTOINI 106
|
#define F_CONTOINI_CONTO 106
|
||||||
#define F_CONTOFINE 107
|
#define F_CONTOFINE_CONTO 107
|
||||||
#define F_SOTTOCINI_CONTO 108
|
#define F_SOTTOCINI_CONTO 108
|
||||||
#define F_SOTTOCFINE_CONTO 109
|
#define F_SOTTOCFINE_CONTO 109
|
||||||
#define F_SOTTOCINI_CLIENTE 110
|
#define F_SOTTOCINI_CLIENTE 110
|
||||||
@ -36,7 +36,12 @@
|
|||||||
#define F_NUMCARAT 128
|
#define F_NUMCARAT 128
|
||||||
#define F_NUMMAST 129
|
#define F_NUMMAST 129
|
||||||
#define F_ANNO 130
|
#define F_ANNO 130
|
||||||
#define F_FORMATO 131
|
#define F_FORMATO 131
|
||||||
|
#define F_CONTOINI_CLIENTE 132
|
||||||
|
#define F_CONTOINI_FORN 133
|
||||||
|
#define F_CONTOFINE_CLIENTE 134
|
||||||
|
#define F_CONTOFINE_FORN 135
|
||||||
|
#define F_TIPOCF_FINE 136
|
||||||
|
|
||||||
#endif // __CG3200_H
|
#endif // __CG3200_H
|
||||||
|
|
||||||
|
291
cg/cg3200a.uml
291
cg/cg3200a.uml
@ -24,22 +24,22 @@ END
|
|||||||
|
|
||||||
TEXT 96
|
TEXT 96
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 10 "Dalla data competenza"
|
PROMPT 4 11 "Dalla data competenza"
|
||||||
END
|
END
|
||||||
|
|
||||||
TEXT 97
|
TEXT 97
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 40 10 "Alla data competenza "
|
PROMPT 40 11 "Alla data competenza "
|
||||||
END
|
END
|
||||||
|
|
||||||
TEXT 98
|
TEXT 98
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 10 "Dalla data operazione "
|
PROMPT 4 11 "Dalla data operazione "
|
||||||
END
|
END
|
||||||
|
|
||||||
TEXT 99
|
TEXT 99
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 40 10 "Alla data operazione "
|
PROMPT 40 11 "Alla data operazione "
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_ANNO 4
|
NUMBER F_ANNO 4
|
||||||
@ -58,7 +58,7 @@ BEGIN
|
|||||||
FLAGS "RZ"
|
FLAGS "RZ"
|
||||||
END
|
END
|
||||||
|
|
||||||
LIST F_TIPOCF 25
|
LIST F_TIPOCF_INI 25
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 4 "Ricerca "
|
PROMPT 4 4 "Ricerca "
|
||||||
ITEM " |Gruppo/conto/sottoconto"
|
ITEM " |Gruppo/conto/sottoconto"
|
||||||
@ -74,40 +74,88 @@ BEGIN
|
|||||||
PROMPT 4 5 "Da Gruppo - Conto - Sottoconto "
|
PROMPT 4 5 "Da Gruppo - Conto - Sottoconto "
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_CONTOINI 3
|
NUMBER F_CONTOINI_CONTO 3
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 41 5 ""
|
PROMPT 41 5 ""
|
||||||
USE LF_PCON SELECT SOTTOCONTO=""
|
USE LF_PCON SELECT (CONTO!="") && (SOTTOCONTO="") && (TMCF="")
|
||||||
INPUT GRUPPO F_GRUPPOINI
|
INPUT GRUPPO F_GRUPPOINI
|
||||||
INPUT CONTO F_CONTOINI
|
INPUT CONTO F_CONTOINI_CONTO
|
||||||
DISPLAY "Gruppo" GRUPPO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
DISPLAY "Descrizione@50" DESCR
|
DISPLAY "Descrizione@50" DESCR
|
||||||
OUTPUT F_TIPOCF TMCF
|
//OUTPUT F_TIPOCF TMCF
|
||||||
OUTPUT F_GRUPPOINI GRUPPO
|
OUTPUT F_GRUPPOINI GRUPPO
|
||||||
OUTPUT F_CONTOINI CONTO
|
OUTPUT F_CONTOINI_CONTO CONTO
|
||||||
OUTPUT F_DESCRINI_CONTO DESCR
|
//OUTPUT F_SOTTOCINI_CONTO SOTTOCONTO
|
||||||
FLAGS "R"
|
//OUTPUT F_DESCRINI_CONTO DESCR
|
||||||
WARNING "Conto inesistente o mancante"
|
FLAGS "R"
|
||||||
MESSAGE DIRTY,F_SOTTOCINI_CONTO|DIRTY,F_SOTTOCINI_CLIENTE|DIRTY,F_SOTTOCINI_FORN
|
//CHECKTYPE NORMAL
|
||||||
|
//WARNING "Conto inesistente o mancante"
|
||||||
|
//MESSAGE DIRTY,F_SOTTOCINI_CONTO|DIRTY,F_SOTTOCINI_CLIENTE|DIRTY,F_SOTTOCINI_FORN
|
||||||
|
GROUP 1
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_CONTOINI_CLIENTE 3
|
||||||
|
BEGIN
|
||||||
|
PROMPT 41 5 ""
|
||||||
|
USE LF_PCON SELECT (CONTO!="") && (SOTTOCONTO="") && (TMCF="C")
|
||||||
|
INPUT GRUPPO F_GRUPPOINI
|
||||||
|
INPUT CONTO F_CONTOINI_CLIENTE
|
||||||
|
DISPLAY "Gruppo" GRUPPO
|
||||||
|
DISPLAY "Conto" CONTO
|
||||||
|
DISPLAY "Descrizione@50" DESCR
|
||||||
|
//OUTPUT F_TIPOCF TMCF
|
||||||
|
OUTPUT F_GRUPPOINI GRUPPO
|
||||||
|
OUTPUT F_CONTOINI_CLIENTE CONTO
|
||||||
|
//OUTPUT F_SOTTOCINI_CLIENTE SOTTOCONTO
|
||||||
|
//OUTPUT F_DESCRINI_CLIENTE DESCR
|
||||||
|
FLAGS "R"
|
||||||
|
//CHECKTYPE NORMAL
|
||||||
|
//WARNING "Conto inesistente o mancante"
|
||||||
|
//MESSAGE DIRTY,F_SOTTOCINI_CONTO|DIRTY,F_SOTTOCINI_CLIENTE|DIRTY,F_SOTTOCINI_FORN
|
||||||
|
GROUP 2
|
||||||
|
MESSAGE COPY,F_CONTOINI_CONTO
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_CONTOINI_FORN 3
|
||||||
|
BEGIN
|
||||||
|
PROMPT 41 5 ""
|
||||||
|
USE LF_PCON SELECT (CONTO!="") && (SOTTOCONTO="") && (TMCF="F")
|
||||||
|
INPUT GRUPPO F_GRUPPOINI
|
||||||
|
INPUT CONTO F_CONTOINI_FORN
|
||||||
|
DISPLAY "Gruppo" GRUPPO
|
||||||
|
DISPLAY "Conto" CONTO
|
||||||
|
DISPLAY "Descrizione@50" DESCR
|
||||||
|
//OUTPUT F_TIPOCF TMCF
|
||||||
|
OUTPUT F_GRUPPOINI GRUPPO
|
||||||
|
OUTPUT F_CONTOINI_FORN CONTO
|
||||||
|
//OUTPUT F_SOTTOCINI_FORN SOTTOCONTO
|
||||||
|
//OUTPUT F_DESCRINI_FORN DESCR
|
||||||
|
FLAGS "R"
|
||||||
|
//CHECKTYPE NORMAL
|
||||||
|
//WARNING "Conto inesistente o mancante"
|
||||||
|
//MESSAGE DIRTY,F_SOTTOCINI_CONTO|DIRTY,F_SOTTOCINI_CLIENTE|DIRTY,F_SOTTOCINI_FORN
|
||||||
|
GROUP 3
|
||||||
|
MESSAGE COPY,F_CONTOINI_CONTO
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_SOTTOCINI_CONTO 6
|
NUMBER F_SOTTOCINI_CONTO 6
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 48 5 ""
|
PROMPT 48 5 ""
|
||||||
USE LF_PCON SELECT SOTTOCONTO!=""
|
USE LF_PCON //SELECT SOTTOCONTO!=""
|
||||||
INPUT GRUPPO F_GRUPPOINI
|
INPUT GRUPPO F_GRUPPOINI
|
||||||
INPUT CONTO F_CONTOINI
|
INPUT CONTO F_CONTOINI_CONTO
|
||||||
INPUT SOTTOCONTO F_SOTTOCINI_CONTO
|
INPUT SOTTOCONTO F_SOTTOCINI_CONTO
|
||||||
DISPLAY "Gruppo" GRUPPO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
DISPLAY "Sottoconto" SOTTOCONTO
|
DISPLAY "Sottoconto" SOTTOCONTO
|
||||||
DISPLAY "Descrizione@50" DESCR
|
DISPLAY "Descrizione@50" DESCR
|
||||||
OUTPUT F_GRUPPOINI GRUPPO
|
OUTPUT F_GRUPPOINI GRUPPO
|
||||||
OUTPUT F_CONTOINI CONTO
|
OUTPUT F_CONTOINI_CONTO CONTO
|
||||||
OUTPUT F_SOTTOCINI_CONTO SOTTOCONTO
|
OUTPUT F_SOTTOCINI_CONTO SOTTOCONTO
|
||||||
OUTPUT F_DESCRINI_CONTO DESCR
|
//OUTPUT F_DESCRINI_CONTO DESCR
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
|
//CHECKTYPE NORMAL
|
||||||
GROUP 1
|
GROUP 1
|
||||||
END
|
END
|
||||||
|
|
||||||
@ -122,7 +170,6 @@ BEGIN
|
|||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
DISPLAY "Sottoconto" SOTTOCONTO
|
DISPLAY "Sottoconto" SOTTOCONTO
|
||||||
COPY OUTPUT F_SOTTOCINI_CONTO
|
COPY OUTPUT F_SOTTOCINI_CONTO
|
||||||
CHECKTYPE NORMAL
|
|
||||||
GROUP 1
|
GROUP 1
|
||||||
END
|
END
|
||||||
|
|
||||||
@ -130,7 +177,7 @@ NUMBER F_SOTTOCINI_CLIENTE 6
|
|||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 48 5 ""
|
PROMPT 48 5 ""
|
||||||
USE LF_CLIFO
|
USE LF_CLIFO
|
||||||
CHECKTYPE NORMAL
|
//CHECKTYPE NORMAL
|
||||||
INPUT TIPOCF "C"
|
INPUT TIPOCF "C"
|
||||||
INPUT CODCF F_SOTTOCINI_CLIENTE
|
INPUT CODCF F_SOTTOCINI_CLIENTE
|
||||||
DISPLAY "Codice" CODCF
|
DISPLAY "Codice" CODCF
|
||||||
@ -138,7 +185,7 @@ BEGIN
|
|||||||
DISPLAY "Gruppo" GRUPPO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
OUTPUT F_SOTTOCINI_CLIENTE CODCF
|
OUTPUT F_SOTTOCINI_CLIENTE CODCF
|
||||||
OUTPUT F_DESCRINI_CLIENTE RAGSOC
|
//OUTPUT F_DESCRINI_CLIENTE RAGSOC
|
||||||
MESSAGE COPY,F_SOTTOCINI_CONTO
|
MESSAGE COPY,F_SOTTOCINI_CONTO
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
GROUP 2
|
GROUP 2
|
||||||
@ -165,7 +212,7 @@ NUMBER F_SOTTOCINI_FORN 6
|
|||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 48 5 ""
|
PROMPT 48 5 ""
|
||||||
USE LF_CLIFO
|
USE LF_CLIFO
|
||||||
CHECKTYPE NORMAL
|
//CHECKTYPE NORMAL
|
||||||
INPUT TIPOCF "F"
|
INPUT TIPOCF "F"
|
||||||
INPUT CODCF F_SOTTOCINI_FORN
|
INPUT CODCF F_SOTTOCINI_FORN
|
||||||
DISPLAY "Codice" CODCF
|
DISPLAY "Codice" CODCF
|
||||||
@ -173,7 +220,7 @@ BEGIN
|
|||||||
DISPLAY "Gruppo" GRUPPO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
OUTPUT F_SOTTOCINI_FORN CODCF
|
OUTPUT F_SOTTOCINI_FORN CODCF
|
||||||
OUTPUT F_DESCRINI_FORN RAGSOC
|
//OUTPUT F_DESCRINI_FORN RAGSOC
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
GROUP 3
|
GROUP 3
|
||||||
MESSAGE COPY,F_SOTTOCINI_CONTO
|
MESSAGE COPY,F_SOTTOCINI_CONTO
|
||||||
@ -194,52 +241,108 @@ BEGIN
|
|||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
GROUP 3
|
GROUP 3
|
||||||
END
|
END
|
||||||
|
|
||||||
|
LIST F_TIPOCF_FINE 25
|
||||||
|
BEGIN
|
||||||
|
PROMPT 4 7 "Ricerca "
|
||||||
|
ITEM " |Gruppo/conto/sottoconto"
|
||||||
|
MESSAGE HIDE,5@|HIDE,6@|RESET,5@|RESET,6@|SHOW,4@
|
||||||
|
ITEM "C|Clienti"
|
||||||
|
MESSAGE HIDE,4@|HIDE,6@|RESET,4@|RESET,6@|SHOW,5@
|
||||||
|
ITEM "F|Fornitori"
|
||||||
|
MESSAGE HIDE,4@|HIDE,5@|RESET,4@|RESET,5@|SHOW,6@
|
||||||
|
END
|
||||||
|
|
||||||
NUMBER F_GRUPPOFINE 3
|
NUMBER F_GRUPPOFINE 3
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 7 "A Gruppo - Conto - Sottoconto "
|
PROMPT 4 8 "A Gruppo - Conto - Sottoconto "
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_CONTOFINE 3
|
NUMBER F_CONTOFINE_CONTO 3
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 41 7 ""
|
PROMPT 41 8 ""
|
||||||
USE LF_PCON SELECT (CONTO!="") && (SOTTOCONTO="")
|
USE LF_PCON SELECT (CONTO!="") && (SOTTOCONTO="") && (TMCF="")
|
||||||
INPUT GRUPPO F_GRUPPOFINE
|
INPUT GRUPPO F_GRUPPOFINE
|
||||||
INPUT CONTO F_CONTOFINE
|
INPUT CONTO F_CONTOFINE_CONTO
|
||||||
DISPLAY "Gruppo" GRUPPO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
DISPLAY "Descrizione@50" DESCR
|
DISPLAY "Descrizione@50" DESCR
|
||||||
OUTPUT F_TIPOCF TMCF
|
//OUTPUT F_TIPOCF TMCF
|
||||||
OUTPUT F_GRUPPOFINE GRUPPO
|
OUTPUT F_GRUPPOFINE GRUPPO
|
||||||
OUTPUT F_CONTOFINE CONTO
|
OUTPUT F_CONTOFINE_CONTO CONTO
|
||||||
OUTPUT F_DESCRFINE_CONTO DESCR
|
//OUTPUT F_DESCRFINE_CONTO DESCR
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
WARNING "Conto inesistente o mancante"
|
//CHECKTYPE NORMAL
|
||||||
MESSAGE DIRTY,F_SOTTOCFINE_CONTO|DIRTY,F_SOTTOCFINE_CLIENTE|DIRTY,F_SOTTOCFINE_FORN
|
//WARNING "Conto inesistente o mancante"
|
||||||
|
//MESSAGE DIRTY,F_SOTTOCFINE_CONTO|DIRTY,F_SOTTOCFINE_CLIENTE|DIRTY,F_SOTTOCFINE_FORN
|
||||||
|
GROUP 4
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_CONTOFINE_CLIENTE 3
|
||||||
|
BEGIN
|
||||||
|
PROMPT 41 8 ""
|
||||||
|
USE LF_PCON SELECT (CONTO!="") && (SOTTOCONTO="") && (TMCF="C")
|
||||||
|
INPUT GRUPPO F_GRUPPOFINE
|
||||||
|
INPUT CONTO F_CONTOFINE_CLIENTE
|
||||||
|
DISPLAY "Gruppo" GRUPPO
|
||||||
|
DISPLAY "Conto" CONTO
|
||||||
|
DISPLAY "Descrizione@50" DESCR
|
||||||
|
//OUTPUT F_TIPOCF TMCF
|
||||||
|
OUTPUT F_GRUPPOFINE GRUPPO
|
||||||
|
OUTPUT F_CONTOFINE_CLIENTE CONTO
|
||||||
|
//OUTPUT F_DESCRFINE_CLIENTE DESCR
|
||||||
|
FLAGS "R"
|
||||||
|
//CHECKTYPE NORMAL
|
||||||
|
//WARNING "Conto inesistente o mancante"
|
||||||
|
//MESSAGE DIRTY,F_SOTTOCFINE_CONTO|DIRTY,F_SOTTOCFINE_CLIENTE|DIRTY,F_SOTTOCFINE_FORN
|
||||||
|
MESSAGE COPY,F_CONTOFINE_CONTO
|
||||||
|
GROUP 5
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_CONTOFINE_FORN 3
|
||||||
|
BEGIN
|
||||||
|
PROMPT 41 8 ""
|
||||||
|
USE LF_PCON SELECT (CONTO!="") && (SOTTOCONTO="") && (TMCF="F")
|
||||||
|
INPUT GRUPPO F_GRUPPOFINE
|
||||||
|
INPUT CONTO F_CONTOFINE_FORN
|
||||||
|
DISPLAY "Gruppo" GRUPPO
|
||||||
|
DISPLAY "Conto" CONTO
|
||||||
|
DISPLAY "Descrizione@50" DESCR
|
||||||
|
//OUTPUT F_TIPOCF TMCF
|
||||||
|
OUTPUT F_GRUPPOFINE GRUPPO
|
||||||
|
OUTPUT F_CONTOFINE_FORN CONTO
|
||||||
|
//OUTPUT F_DESCRFINE_FORN DESCR
|
||||||
|
FLAGS "R"
|
||||||
|
//CHECKTYPE NORMAL
|
||||||
|
//WARNING "Conto inesistente o mancante"
|
||||||
|
//MESSAGE DIRTY,F_SOTTOCFINE_CONTO|DIRTY,F_SOTTOCFINE_CLIENTE|DIRTY,F_SOTTOCFINE_FORN
|
||||||
|
MESSAGE COPY,F_CONTOFINE_CONTO
|
||||||
|
GROUP 6
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_SOTTOCFINE_CONTO 6
|
NUMBER F_SOTTOCFINE_CONTO 6
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 48 7 ""
|
PROMPT 48 8 ""
|
||||||
USE LF_PCON SELECT SOTTOCONTO!=""
|
USE LF_PCON SELECT SOTTOCONTO!=""
|
||||||
INPUT GRUPPO F_GRUPPOFINE
|
INPUT GRUPPO F_GRUPPOFINE
|
||||||
INPUT CONTO F_CONTOFINE
|
INPUT CONTO F_CONTOFINE_CONTO
|
||||||
INPUT SOTTOCONTO F_SOTTOCFINE_CONTO
|
INPUT SOTTOCONTO F_SOTTOCFINE_CONTO
|
||||||
DISPLAY "Gruppo" GRUPPO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
DISPLAY "Sottoconto" SOTTOCONTO
|
DISPLAY "Sottoconto" SOTTOCONTO
|
||||||
DISPLAY "Descrizione@50" DESCR
|
DISPLAY "Descrizione@50" DESCR
|
||||||
OUTPUT F_GRUPPOFINE GRUPPO
|
OUTPUT F_GRUPPOFINE GRUPPO
|
||||||
OUTPUT F_CONTOFINE CONTO
|
OUTPUT F_CONTOFINE_CONTO CONTO
|
||||||
OUTPUT F_SOTTOCFINE_CONTO SOTTOCONTO
|
OUTPUT F_SOTTOCFINE_CONTO SOTTOCONTO
|
||||||
OUTPUT F_DESCRFINE_CONTO DESCR
|
//OUTPUT F_DESCRFINE_CONTO DESCR
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
GROUP 1
|
//CHECKTYPE NORMAL
|
||||||
|
GROUP 4
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_DESCRFINE_CONTO 50
|
STRING F_DESCRFINE_CONTO 50
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 8 "Descrizione "
|
PROMPT 4 9 "Descrizione "
|
||||||
USE LF_PCON KEY 2
|
USE LF_PCON KEY 2
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
INPUT DESCR F_DESCRINI_CONTO
|
INPUT DESCR F_DESCRINI_CONTO
|
||||||
@ -248,49 +351,14 @@ BEGIN
|
|||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
DISPLAY "Sottoconto" SOTTOCONTO
|
DISPLAY "Sottoconto" SOTTOCONTO
|
||||||
COPY OUTPUT F_SOTTOCFINE_CONTO
|
COPY OUTPUT F_SOTTOCFINE_CONTO
|
||||||
CHECKTYPE NORMAL
|
GROUP 4
|
||||||
GROUP 1
|
|
||||||
END
|
|
||||||
|
|
||||||
NUMBER F_SOTTOCINI_CLIENTE 6
|
|
||||||
BEGIN
|
|
||||||
PROMPT 48 5 ""
|
|
||||||
USE LF_CLIFO
|
|
||||||
INPUT TIPOCF "C"
|
|
||||||
INPUT CODCF F_SOTTOCINI_CLIENTE
|
|
||||||
DISPLAY "Codice" CODCF
|
|
||||||
DISPLAY "Ragione Sociale@50" RAGSOC
|
|
||||||
DISPLAY "Gruppo" GRUPPO
|
|
||||||
DISPLAY "Conto" CONTO
|
|
||||||
OUTPUT F_SOTTOCINI_CLIENTE CODCF
|
|
||||||
OUTPUT F_DESCRINI_CLIENTE RAGSOC
|
|
||||||
MESSAGE COPY,F_SOTTOCINI_CONTO
|
|
||||||
FLAGS "R"
|
|
||||||
GROUP 2
|
|
||||||
END
|
|
||||||
|
|
||||||
STRING F_DESCRINI_CLIENTE 50
|
|
||||||
BEGIN
|
|
||||||
PROMPT 4 6 "Ragione sociale "
|
|
||||||
FIELD LF_CLIFO->RAGSOC
|
|
||||||
USE LF_CLIFO KEY 2
|
|
||||||
CHECKTYPE NORMAL
|
|
||||||
INPUT TIPOCF "C"
|
|
||||||
INPUT RAGSOC F_DESCRINI_CLIENTE
|
|
||||||
DISPLAY "Ragione Sociale Cliente@50" RAGSOC
|
|
||||||
DISPLAY "Gruppo" GRUPPO
|
|
||||||
DISPLAY "Conto" CONTO
|
|
||||||
DISPLAY "Codice" CODCF
|
|
||||||
COPY OUTPUT F_SOTTOCINI_CLIENTE
|
|
||||||
MESSAGE COPY,F_DESCRINI_CONTO
|
|
||||||
GROUP 2
|
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_SOTTOCFINE_CLIENTE 6
|
NUMBER F_SOTTOCFINE_CLIENTE 6
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 48 7 ""
|
PROMPT 48 8 ""
|
||||||
USE LF_CLIFO
|
USE LF_CLIFO
|
||||||
CHECKTYPE NORMAL
|
//CHECKTYPE NORMAL
|
||||||
INPUT TIPOCF "C"
|
INPUT TIPOCF "C"
|
||||||
INPUT CODCF F_SOTTOCFINE_CLIENTE
|
INPUT CODCF F_SOTTOCFINE_CLIENTE
|
||||||
DISPLAY "Codice" CODCF
|
DISPLAY "Codice" CODCF
|
||||||
@ -298,15 +366,15 @@ BEGIN
|
|||||||
DISPLAY "Gruppo" GRUPPO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
OUTPUT F_SOTTOCFINE_CLIENTE CODCF
|
OUTPUT F_SOTTOCFINE_CLIENTE CODCF
|
||||||
OUTPUT F_DESCRFINE_CLIENTE RAGSOC
|
//OUTPUT F_DESCRFINE_CLIENTE RAGSOC
|
||||||
MESSAGE COPY,F_SOTTOCFINE_CONTO
|
MESSAGE COPY,F_SOTTOCFINE_CONTO
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
GROUP 2
|
GROUP 5
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_DESCRFINE_CLIENTE 50
|
STRING F_DESCRFINE_CLIENTE 50
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 8 "Ragione sociale "
|
PROMPT 4 9 "Ragione sociale "
|
||||||
FIELD LF_CLIFO->RAGSOC
|
FIELD LF_CLIFO->RAGSOC
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
USE LF_CLIFO KEY 2
|
USE LF_CLIFO KEY 2
|
||||||
@ -318,50 +386,14 @@ BEGIN
|
|||||||
DISPLAY "Codice" CODCF
|
DISPLAY "Codice" CODCF
|
||||||
COPY OUTPUT F_SOTTOCFINE_CLIENTE
|
COPY OUTPUT F_SOTTOCFINE_CLIENTE
|
||||||
MESSAGE COPY,F_DESCRFINE_CONTO
|
MESSAGE COPY,F_DESCRFINE_CONTO
|
||||||
CHECKTYPE NORMAL
|
GROUP 5
|
||||||
GROUP 2
|
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_SOTTOCINI_FORN 6
|
|
||||||
BEGIN
|
|
||||||
PROMPT 48 5 ""
|
|
||||||
USE LF_CLIFO
|
|
||||||
CHECKTYPE NORMAL
|
|
||||||
INPUT TIPOCF "F"
|
|
||||||
INPUT CODCF F_SOTTOCINI_FORN
|
|
||||||
DISPLAY "Codice" CODCF
|
|
||||||
DISPLAY "Ragione Sociale@50" RAGSOC
|
|
||||||
DISPLAY "Gruppo" GRUPPO
|
|
||||||
DISPLAY "Conto" CONTO
|
|
||||||
OUTPUT F_SOTTOCINI_FORN CODCF
|
|
||||||
OUTPUT F_DESCRINI_FORN RAGSOC
|
|
||||||
FLAGS "R"
|
|
||||||
GROUP 3
|
|
||||||
MESSAGE COPY,F_SOTTOCINI_CONTO
|
|
||||||
END
|
|
||||||
|
|
||||||
STRING F_DESCRINI_FORN 50
|
|
||||||
BEGIN
|
|
||||||
PROMPT 4 6 "Ragione Sociale "
|
|
||||||
USE LF_CLIFO KEY 2
|
|
||||||
CHECKTYPE NORMAL
|
|
||||||
INPUT TIPOCF "F"
|
|
||||||
INPUT RAGSOC F_DESCRINI_FORN
|
|
||||||
DISPLAY "Ragione Sociale Fornitore@50" RAGSOC
|
|
||||||
DISPLAY "Gruppo" GRUPPO
|
|
||||||
DISPLAY "Conto" CONTO
|
|
||||||
DISPLAY "Codice" CODCF
|
|
||||||
COPY OUTPUT F_DESCRINI_CONTO
|
|
||||||
MESSAGE COPY,F_DESCRINI_CONTO
|
|
||||||
CHECKTYPE NORMAL
|
|
||||||
GROUP 3
|
|
||||||
END
|
|
||||||
|
|
||||||
NUMBER F_SOTTOCFINE_FORN 6
|
NUMBER F_SOTTOCFINE_FORN 6
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 48 7 ""
|
PROMPT 48 8 ""
|
||||||
USE LF_CLIFO
|
USE LF_CLIFO
|
||||||
CHECKTYPE NORMAL
|
//CHECKTYPE NORMAL
|
||||||
INPUT TIPOCF "F"
|
INPUT TIPOCF "F"
|
||||||
INPUT CODCF F_SOTTOCFINE_FORN
|
INPUT CODCF F_SOTTOCFINE_FORN
|
||||||
DISPLAY "Codice" CODCF
|
DISPLAY "Codice" CODCF
|
||||||
@ -369,15 +401,15 @@ BEGIN
|
|||||||
DISPLAY "Gruppo" GRUPPO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
OUTPUT F_SOTTOCFINE_FORN CODCF
|
OUTPUT F_SOTTOCFINE_FORN CODCF
|
||||||
OUTPUT F_DESCRFINE_FORN RAGSOC
|
//OUTPUT F_DESCRFINE_FORN RAGSOC
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
GROUP 3
|
GROUP 6
|
||||||
MESSAGE COPY,F_SOTTOCFINE_CONTO
|
MESSAGE COPY,F_SOTTOCFINE_CONTO
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_DESCRFINE_FORN 50
|
STRING F_DESCRFINE_FORN 50
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 8 "Ragione Sociale "
|
PROMPT 4 9 "Ragione Sociale "
|
||||||
USE LF_CLIFO KEY 2
|
USE LF_CLIFO KEY 2
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
INPUT TIPOCF "F"
|
INPUT TIPOCF "F"
|
||||||
@ -388,18 +420,17 @@ BEGIN
|
|||||||
DISPLAY "Codice" CODCF
|
DISPLAY "Codice" CODCF
|
||||||
COPY OUTPUT F_DESCRFINE_CONTO
|
COPY OUTPUT F_DESCRFINE_CONTO
|
||||||
MESSAGE COPY,F_DESCRFINE_CONTO
|
MESSAGE COPY,F_DESCRFINE_CONTO
|
||||||
CHECKTYPE NORMAL
|
GROUP 6
|
||||||
GROUP 3
|
|
||||||
END
|
END
|
||||||
|
|
||||||
DATE F_DATAINI
|
DATE F_DATAINI
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 26 10 ""
|
PROMPT 26 11 ""
|
||||||
END
|
END
|
||||||
|
|
||||||
DATE F_DATAFINE
|
DATE F_DATAFINE
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 62 10 ""
|
PROMPT 62 11 ""
|
||||||
END
|
END
|
||||||
|
|
||||||
BOOLEAN F_STAMPATOTIVA
|
BOOLEAN F_STAMPATOTIVA
|
||||||
|
@ -610,9 +610,9 @@ int CG3400_application::stampa_intestazione_ditta()
|
|||||||
(const char *)_viafis, (const char *)_cap,
|
(const char *)_viafis, (const char *)_cap,
|
||||||
(const char *)_comunefis, (const char *)_provfis);
|
(const char *)_comunefis, (const char *)_provfis);
|
||||||
|
|
||||||
_intes = "Data @>";
|
_intes = format ("Partita iva %s @24gCodice fiscale %s %s @117gData @>",
|
||||||
_intes.right_just(_stampa_width-15); // perche' il codice viene espanso nella data con l'anno in 4 caratteri
|
(const char*)_paiva, (const char*)_cofi,
|
||||||
_intes.overwrite (format ("Partita iva %s @24gCodice fiscale %s %s", (const char*)_paiva, (const char*)_cofi, _stampa_definitiva ? "" : "STAMPA DI PROVA"));
|
_stampa_definitiva ? "" : "STAMPA DI PROVA");
|
||||||
|
|
||||||
set_header (++r, "%s", (const char*) _intes);
|
set_header (++r, "%s", (const char*) _intes);
|
||||||
|
|
||||||
@ -631,7 +631,8 @@ int CG3400_application::set_header_198()
|
|||||||
TString16 data_da = _data_da.string();
|
TString16 data_da = _data_da.string();
|
||||||
TString16 data_a = _data_a.string();
|
TString16 data_a = _data_a.string();
|
||||||
|
|
||||||
if (_stampa_intesta) r = stampa_intestazione_ditta();
|
if (_stampa_intesta || !_stampa_definitiva)
|
||||||
|
r = stampa_intestazione_ditta();
|
||||||
|
|
||||||
// set_header(r, "@bCodice libro:@r %s %s @bdalla data:@r %s @balla data:@r %s @bEsercizio:@r %04d",
|
// set_header(r, "@bCodice libro:@r %s %s @bdalla data:@r %s @balla data:@r %s @bEsercizio:@r %04d",
|
||||||
set_header(r, "Codice libro: %s %s dalla data: %s alla data: %s Esercizio: %04d",
|
set_header(r, "Codice libro: %s %s dalla data: %s alla data: %s Esercizio: %04d",
|
||||||
@ -682,14 +683,15 @@ int CG3400_application::set_header_132()
|
|||||||
TString16 data_da = _data_da.string();
|
TString16 data_da = _data_da.string();
|
||||||
TString16 data_a = _data_a.string();
|
TString16 data_a = _data_a.string();
|
||||||
|
|
||||||
if (_stampa_intesta) r = stampa_intestazione_ditta();
|
if (_stampa_intesta || !_stampa_definitiva)
|
||||||
|
r = stampa_intestazione_ditta();
|
||||||
|
|
||||||
#if XVT_OS != XVT_OS_SCOUNIX
|
#if XVT_OS != XVT_OS_SCOUNIX
|
||||||
if (_stampa_intesta)
|
if (_stampa_intesta || !_stampa_definitiva)
|
||||||
set_background("W4l{1 1 132 1}W4l{1 4 132 4}W1l{1 8 132 8}");
|
set_background("W4l{1 1 133 1}W4l{1 4 133 4}W1l{1 8 133 8}");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
set_background("W4l{1 1 132 1}W1l{1 5 132 5}");
|
set_background("W4l{1 1 133 1}W1l{1 5 133 5}");
|
||||||
r++;
|
r++;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -698,7 +700,7 @@ int CG3400_application::set_header_132()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// set_header(r++, "@bCodice libro:@r %s %s @bdalla data:@r %s @balla data:@r %s @bEsercizio:@r %04d",
|
// set_header(r++, "@bCodice libro:@r %s %s @bdalla data:@r %s @balla data:@r %s @bEsercizio:@r %04d",
|
||||||
set_header(r++, "Codice libro: %s %s @69gdalla data: %s alla data: %s Esercizio: %04d",
|
set_header(r++, "Codice libro: %s %s @69gdalla data: %s alla data: %s @117gEsercizio: %04d",
|
||||||
(const char *) _reg_cod, (const char *) _reg_descr,
|
(const char *) _reg_cod, (const char *) _reg_descr,
|
||||||
(const char *) data_da, (const char *) data_a, _ae);
|
(const char *) data_da, (const char *) data_a, _ae);
|
||||||
|
|
||||||
@ -1245,8 +1247,8 @@ int CG3400_application::ultimo_esercizio()
|
|||||||
TTable ese("ESC");
|
TTable ese("ESC");
|
||||||
|
|
||||||
ese.zero();
|
ese.zero();
|
||||||
ese.last();
|
// ese.last(); // Sembra che non vadi ?!?
|
||||||
// ese.first();
|
ese.first();
|
||||||
sanno = ese.get("CODTAB"); sanno.cut(4);
|
sanno = ese.get("CODTAB"); sanno.cut(4);
|
||||||
|
|
||||||
const int anno = atoi(sanno);
|
const int anno = atoi(sanno);
|
||||||
@ -1268,21 +1270,21 @@ bool CG3400_application::leggi_tabreg(const char * reg_cod,
|
|||||||
|
|
||||||
_tabreg->zero();
|
_tabreg->zero();
|
||||||
_tabreg->put("CODTAB", codtab);
|
_tabreg->put("CODTAB", codtab);
|
||||||
_tabreg->read();
|
const bool ok = (_tabreg->read() == NOERR);
|
||||||
|
|
||||||
|
if (!ok) _tabreg->zero();
|
||||||
|
|
||||||
|
_pagine_stampate = _tabreg->get_int("I1");
|
||||||
|
_pagine_numerate = _tabreg->get_int("I2");
|
||||||
|
_stampa_ok = _tabreg->get_int("I7");
|
||||||
|
_nprog_da = _tabreg->get_long ("I6");
|
||||||
|
_tot_dare = _tabreg->get_real ("R1");
|
||||||
|
_tot_avere = _tabreg->get_real ("R2");
|
||||||
|
_last_data = _tabreg->get_date ("D3");
|
||||||
|
_stampa_intesta = _tabreg->get_bool ("B9");
|
||||||
|
_reg_descr = _tabreg->get ("S0");
|
||||||
|
|
||||||
if (_tabreg->good())
|
return ok;
|
||||||
{
|
|
||||||
_pagine_stampate = _tabreg->get_int("I1");
|
|
||||||
_pagine_numerate = _tabreg->get_int("I2");
|
|
||||||
_stampa_ok = _tabreg->get_int("I7");
|
|
||||||
_nprog_da = _tabreg->get_long ("I6");
|
|
||||||
_tot_dare = _tabreg->get_real ("R1");
|
|
||||||
_tot_avere = _tabreg->get_real ("R2");
|
|
||||||
_last_data = _tabreg->get_date ("D3");
|
|
||||||
_stampa_intesta = _tabreg->get_bool ("B9");
|
|
||||||
_reg_descr = _tabreg->get ("S0");
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calcola l'anno di esercizio di una data
|
// Calcola l'anno di esercizio di una data
|
||||||
@ -1411,13 +1413,17 @@ bool CG3400_application::mask_a_cod_reg (TMask_field& f, KEY k)
|
|||||||
TString16 reg_cod(f.get());
|
TString16 reg_cod(f.get());
|
||||||
|
|
||||||
if (reg_cod.empty()) return TRUE;
|
if (reg_cod.empty()) return TRUE;
|
||||||
|
|
||||||
a.leggi_tabreg(reg_cod, a._ae);
|
bool reg_ok = a.leggi_tabreg(reg_cod, a._ae);
|
||||||
|
|
||||||
// Output da qui della descrizione del registro e dell'anno
|
// Output da qui della descrizione del registro e dell'anno
|
||||||
m.set(REG_DESC, a._reg_descr);
|
m.set(REG_DESC, a._reg_descr);
|
||||||
m.set(ANNO_ESER, a._ae);
|
m.set(ANNO_ESER, a._ae);
|
||||||
|
|
||||||
|
// CHECKTYPE NORMAL abolito! (nella maschera non ho l'anno...
|
||||||
|
if (!reg_ok)
|
||||||
|
return f.warning_box("Registro inesistente");
|
||||||
|
|
||||||
if (definitiva)
|
if (definitiva)
|
||||||
{
|
{
|
||||||
if (a._stampa_ok == -1) // stampa precedente andata bene
|
if (a._stampa_ok == -1) // stampa precedente andata bene
|
||||||
|
@ -19,5 +19,6 @@
|
|||||||
#define CAU_COLLCESP "COLLCESP"
|
#define CAU_COLLCESP "COLLCESP"
|
||||||
#define CAU_M770 "M770"
|
#define CAU_M770 "M770"
|
||||||
#define CAU_CODCAUSIM "CODCAUSIM"
|
#define CAU_CODCAUSIM "CODCAUSIM"
|
||||||
|
#define CAU_SOSPESO "SOSPESO"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user