Riepilogo gruppi e conti : corretto errore di compilazione
Chiusura e apertura conti : corretto errore di compilazione Stampa bilancio IV direttiva CEE : Aggiunto sbilancio conti d' ordine attivi e passivi se diverso da zero Lista movimenti : aggiunti campi sulle ricerche Visualizzazione saldi : finito git-svn-id: svn://10.65.10.50/trunk@393 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
70e24858d2
commit
2ef3a41051
@ -311,6 +311,7 @@ class CG1600_application : public TPrintapp
|
|||||||
real _tot_parz_prg_a,_tot_parz_mov_d,_tot_parz_mov_a;
|
real _tot_parz_prg_a,_tot_parz_mov_d,_tot_parz_mov_a;
|
||||||
int _i;
|
int _i;
|
||||||
bool _reset_righe_stampa,_totale_attivita_gia_stampato,_totale_passivita_gia_stampato,_statopatr_no_stamp;
|
bool _reset_righe_stampa,_totale_attivita_gia_stampato,_totale_passivita_gia_stampato,_statopatr_no_stamp;
|
||||||
|
bool _sbilancio_ordine;
|
||||||
TString _causale_ap, _causale_chi;
|
TString _causale_ap, _causale_chi;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -466,7 +467,7 @@ bool data_limite (TMask_field& f, KEY key)
|
|||||||
tipobil = atoi(m.get(F_TIPOBIL));
|
tipobil = atoi(m.get(F_TIPOBIL));
|
||||||
tipostampa = atoi(m.get(F_TIPOSTAMPA));
|
tipostampa = atoi(m.get(F_TIPOSTAMPA));
|
||||||
|
|
||||||
int annoese = m.get_int(F_ANNOESE);
|
long annoese = m.get_long(F_ANNOESE);
|
||||||
|
|
||||||
if ((tipobil == 1) && (tipostampa == 1))
|
if ((tipobil == 1) && (tipostampa == 1))
|
||||||
{
|
{
|
||||||
@ -2012,6 +2013,7 @@ if (tasto == K_ENTER)
|
|||||||
_statopatr_no_stamp = TRUE;
|
_statopatr_no_stamp = TRUE;
|
||||||
_diffprod_fatto = TRUE;
|
_diffprod_fatto = TRUE;
|
||||||
_risimp_fatto = TRUE;
|
_risimp_fatto = TRUE;
|
||||||
|
_sbilancio_ordine = FALSE;
|
||||||
|
|
||||||
_sez_stamp = ' ';
|
_sez_stamp = ' ';
|
||||||
_let_stamp = ' ';
|
_let_stamp = ' ';
|
||||||
@ -2407,10 +2409,12 @@ void CG1600_application::stampa_totali()
|
|||||||
_i++;
|
_i++;
|
||||||
real totale = _totale_ordine_attivo - _totale_ordine_passivo;
|
real totale = _totale_ordine_attivo - _totale_ordine_passivo;
|
||||||
if (totale != ZERO)
|
if (totale != ZERO)
|
||||||
{
|
{
|
||||||
|
set_row (_i++,"@0g%c", app);
|
||||||
set_row (_i++,"@0gSALDO CONTI D' ORDINE");
|
set_row (_i++,"@0gSALDO CONTI D' ORDINE");
|
||||||
set_row (_i,"@0gSBILANCIO");
|
set_row (_i,"@0gSBILANCIO");
|
||||||
set_row (_i++,"@86g%r", &totale);
|
set_row (_i++,"@86g%r", &totale);
|
||||||
|
_sbilancio_ordine = TRUE;
|
||||||
}
|
}
|
||||||
_totale_ordine_passivo = ZERO;
|
_totale_ordine_passivo = ZERO;
|
||||||
_totale_ordine_attivo = ZERO;
|
_totale_ordine_attivo = ZERO;
|
||||||
@ -2420,12 +2424,24 @@ void CG1600_application::stampa_totali()
|
|||||||
if (_sez_stamp == '2')
|
if (_sez_stamp == '2')
|
||||||
{
|
{
|
||||||
char app = ' ';
|
char app = ' ';
|
||||||
set_row (_i++,"@0g%c", app);
|
_totale_patrimoniale = _totale_attivita - _totale_passivita;
|
||||||
set_row (_i++,"@0gSALDO STATO PATRIMONIALE");
|
real totale = _totale_ordine_attivo - _totale_ordine_passivo;
|
||||||
set_row (_i,"@0gSBILANCIO (ATTIVO - PASSIVO)");
|
if (totale != ZERO && !_sbilancio_ordine)
|
||||||
_totale_patrimoniale = _totale_attivita - _totale_passivita;
|
{
|
||||||
set_row (_i++,"@86g%r", &_totale_patrimoniale);
|
set_row (_i++,"@0g%c", app);
|
||||||
_totale_patrimoniale = ZERO;
|
set_row (_i++,"@0gSALDO CONTI D' ORDINE");
|
||||||
|
set_row (_i,"@0gSBILANCIO");
|
||||||
|
set_row (_i++,"@86g%r", &totale);
|
||||||
|
}
|
||||||
|
if (_totale_patrimoniale != ZERO)
|
||||||
|
{
|
||||||
|
set_row (_i++,"@0g%c", app);
|
||||||
|
set_row (_i++,"@0gSALDO STATO PATRIMONIALE");
|
||||||
|
set_row (_i,"@0gSBILANCIO (ATTIVO - PASSIVO)");
|
||||||
|
//_totale_patrimoniale = _totale_attivita - _totale_passivita;
|
||||||
|
set_row (_i++,"@86g%r", &_totale_patrimoniale);
|
||||||
|
_totale_patrimoniale = ZERO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (_sez_stamp == '5')
|
if (_sez_stamp == '5')
|
||||||
{
|
{
|
||||||
@ -2452,10 +2468,13 @@ void CG1600_application::stampa_totali()
|
|||||||
}
|
}
|
||||||
|
|
||||||
char app = ' ';
|
char app = ' ';
|
||||||
set_row (_i++,"@0g%c", app);
|
set_row (_i++,"@0g%c", app);
|
||||||
set_row (_i,"@0gRISULTATO CONTO ECONOMICO");
|
if (_totale_economico != ZERO)
|
||||||
set_row (_i++,"@86g%r", &_totale_economico);
|
{
|
||||||
_totale_economico = ZERO;
|
set_row (_i,"@0gRISULTATO CONTO ECONOMICO");
|
||||||
|
set_row (_i++,"@86g%r", &_totale_economico);
|
||||||
|
_totale_economico = ZERO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_cont_gcs = 0;
|
_cont_gcs = 0;
|
||||||
_cont_num = 0;
|
_cont_num = 0;
|
||||||
@ -2850,11 +2869,13 @@ void CG1600_application::stampa_totali_con_raffronto()
|
|||||||
real totale = _totale_ordine_attivo - _totale_ordine_passivo;
|
real totale = _totale_ordine_attivo - _totale_ordine_passivo;
|
||||||
real tot_raf = _totale_ordine_attivo_raf - _totale_ordine_passivo_raf;
|
real tot_raf = _totale_ordine_attivo_raf - _totale_ordine_passivo_raf;
|
||||||
if (totale != ZERO || tot_raf != ZERO)
|
if (totale != ZERO || tot_raf != ZERO)
|
||||||
{
|
{
|
||||||
|
set_row (_i++,"@0g%c", app);
|
||||||
set_row (_i++,"@0gSALDO CONTI D' ORDINE");
|
set_row (_i++,"@0gSALDO CONTI D' ORDINE");
|
||||||
set_row (_i,"@0gSBILANCIO");
|
set_row (_i,"@0gSBILANCIO");
|
||||||
set_row (_i,"@86g%r", &totale);
|
set_row (_i,"@86g%r", &totale);
|
||||||
set_row (_i++,"@112g%r", &tot_raf);
|
set_row (_i++,"@112g%r", &tot_raf);
|
||||||
|
_sbilancio_ordine = TRUE;
|
||||||
}
|
}
|
||||||
_totale_ordine_attivo = ZERO;
|
_totale_ordine_attivo = ZERO;
|
||||||
_totale_ordine_attivo_raf = ZERO;
|
_totale_ordine_attivo_raf = ZERO;
|
||||||
@ -2865,16 +2886,31 @@ void CG1600_application::stampa_totali_con_raffronto()
|
|||||||
|
|
||||||
if (_sez_stamp == '2')
|
if (_sez_stamp == '2')
|
||||||
{
|
{
|
||||||
char app = ' ';
|
char app = ' ';
|
||||||
set_row (_i++,"@0g%c", app);
|
|
||||||
set_row (_i++,"@0gSALDO STATO PATRIMONIALE");
|
|
||||||
set_row (_i,"@0gSBILANCIO (ATTIVO - PASSIVO)");
|
|
||||||
_totale_patrimoniale = _totale_attivita - _totale_passivita;
|
_totale_patrimoniale = _totale_attivita - _totale_passivita;
|
||||||
_totale_patrim_raf = _totale_attiv_raf - _totale_passiv_raf;
|
_totale_patrim_raf = _totale_attiv_raf - _totale_passiv_raf;
|
||||||
set_row (_i,"@86g%r", &_totale_patrimoniale);
|
real totale = _totale_ordine_attivo - _totale_ordine_passivo;
|
||||||
set_row (_i++,"@112g%r", &_totale_patrim_raf);
|
real tot_raf = _totale_ordine_attivo_raf - _totale_ordine_passivo_raf;
|
||||||
_totale_patrimoniale = 0;
|
if ((totale != ZERO || tot_raf != ZERO) && !_sbilancio_ordine)
|
||||||
_totale_patrim_raf = 0;
|
{
|
||||||
|
set_row (_i++,"@0g%c", app);
|
||||||
|
set_row (_i++,"@0gSALDO CONTI D' ORDINE");
|
||||||
|
set_row (_i,"@0gSBILANCIO");
|
||||||
|
set_row (_i,"@86g%r", &totale);
|
||||||
|
set_row (_i++,"@112g%r", &tot_raf);
|
||||||
|
}
|
||||||
|
if (_totale_patrimoniale != ZERO || _totale_patrim_raf != ZERO)
|
||||||
|
{
|
||||||
|
set_row (_i++,"@0g%c", app);
|
||||||
|
set_row (_i++,"@0gSALDO STATO PATRIMONIALE");
|
||||||
|
set_row (_i,"@0gSBILANCIO (ATTIVO - PASSIVO)");
|
||||||
|
//_totale_patrimoniale = _totale_attivita - _totale_passivita;
|
||||||
|
//_totale_patrim_raf = _totale_attiv_raf - _totale_passiv_raf;
|
||||||
|
set_row (_i,"@86g%r", &_totale_patrimoniale);
|
||||||
|
set_row (_i++,"@112g%r", &_totale_patrim_raf);
|
||||||
|
_totale_patrimoniale = 0;
|
||||||
|
_totale_patrim_raf = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (_sez_stamp == '5')
|
if (_sez_stamp == '5')
|
||||||
{
|
{
|
||||||
@ -2903,12 +2939,15 @@ void CG1600_application::stampa_totali_con_raffronto()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
char app = ' ';
|
char app = ' ';
|
||||||
set_row (_i++,"@0g%c", app);
|
set_row (_i++,"@0g%c", app);
|
||||||
set_row (_i,"@0gRISULTATO CONTO ECONOMICO");
|
if (_totale_economico != ZERO || _totale_economico_raf != ZERO)
|
||||||
set_row (_i,"@86g%r", &_totale_economico);
|
{
|
||||||
set_row (_i++,"@112g%r", &_totale_economico_raf);
|
set_row (_i,"@0gRISULTATO CONTO ECONOMICO");
|
||||||
_totale_economico = 0;
|
set_row (_i,"@86g%r", &_totale_economico);
|
||||||
_totale_economico_raf = 0;
|
set_row (_i++,"@112g%r", &_totale_economico_raf);
|
||||||
|
_totale_economico = 0;
|
||||||
|
_totale_economico_raf = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_cont_gcs = 0;
|
_cont_gcs = 0;
|
||||||
_cont_num = 0;
|
_cont_num = 0;
|
||||||
|
539
cg/cg3100.cpp
539
cg/cg3100.cpp
@ -8,6 +8,8 @@
|
|||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
|
|
||||||
|
#include <lffiles.h>
|
||||||
|
|
||||||
#include <mov.h>
|
#include <mov.h>
|
||||||
#include <rmov.h>
|
#include <rmov.h>
|
||||||
#include <rmoviva.h>
|
#include <rmoviva.h>
|
||||||
@ -23,16 +25,12 @@
|
|||||||
#include "cg3100.h"
|
#include "cg3100.h"
|
||||||
#include "cglib03.h"
|
#include "cglib03.h"
|
||||||
|
|
||||||
//const MAXSTR = 128;
|
|
||||||
//static char __tmp [MAXSTR];
|
|
||||||
//static TFixed_string tmp (__tmp, MAXSTR);
|
|
||||||
|
|
||||||
static TString256 TMP;
|
static TString256 TMP;
|
||||||
|
|
||||||
enum liste {
|
enum liste {
|
||||||
movimenti=1,
|
movimenti=1,
|
||||||
fatture=2,
|
fatture=2,
|
||||||
movimenti_sezionale=3
|
movimenti_sezionale=3
|
||||||
};
|
};
|
||||||
|
|
||||||
bool filter_func (const TRelation *);
|
bool filter_func (const TRelation *);
|
||||||
@ -59,10 +57,10 @@ class CG3100_application : public TPrintapp
|
|||||||
TString _totalegen_dare, _totalegen_avere, _tipo_ini, _masc, _causale;
|
TString _totalegen_dare, _totalegen_avere, _tipo_ini, _masc, _causale;
|
||||||
TString _causale_ini, _causale_fin, _registro,_registro_ini, _registro_fin;
|
TString _causale_ini, _causale_fin, _registro,_registro_ini, _registro_fin;
|
||||||
TString _tipoatt, _tipo_elenco,_tipo_clifo_prec,_cod,_tipoelsucc;
|
TString _tipoatt, _tipo_elenco,_tipo_clifo_prec,_cod,_tipoelsucc;
|
||||||
TString _tipo_clifo_precedente;
|
TString _appoggio, _tipodoc, _tipodocumento, _err1, _msg, _err, _err2, _err3;
|
||||||
TString _appoggio, _tipodoc, _tipodocumento, _err1, _msg, _err, _err2;
|
|
||||||
TString _ragsoc, _indcf, _civcf, _paiv, _codcaus, _dencom, _provcom, _cofi;
|
TString _ragsoc, _indcf, _civcf, _paiv, _codcaus, _dencom, _provcom, _cofi;
|
||||||
TString _capcf, _codval, _simbolo, _statocf, _comcf, _tipo_fin;
|
TString _capcf, _codval, _simbolo, _statocf, _comcf, _tipo_fin;
|
||||||
|
TString _reg_causale;
|
||||||
long _documenti, _codice_ini, _codice_fin, _numero_reg,_codcf;
|
long _documenti, _codice_ini, _codice_fin, _numero_reg,_codcf;
|
||||||
long _numreg, _numreg_fin, _numreg_ini, _codalleg, _numeroregp,_codclifosucc;
|
long _numreg, _numreg_fin, _numreg_ini, _codalleg, _numeroregp,_codclifosucc;
|
||||||
long _codcf_prec, _numr;
|
long _codcf_prec, _numr;
|
||||||
@ -100,7 +98,7 @@ public:
|
|||||||
void incrementa_totali();
|
void incrementa_totali();
|
||||||
void compila_clifo();
|
void compila_clifo();
|
||||||
void compila_comuni();
|
void compila_comuni();
|
||||||
int my_next (TLocalisamfile&);
|
int my_next (TLocalisamfile*);
|
||||||
|
|
||||||
CG3100_application() {}
|
CG3100_application() {}
|
||||||
};
|
};
|
||||||
@ -140,7 +138,6 @@ TDate FineEsercizio(int anno)
|
|||||||
|
|
||||||
bool annoes(TMask_field& f, KEY k)
|
bool annoes(TMask_field& f, KEY k)
|
||||||
{
|
{
|
||||||
// if ( (k == K_SPACE) || (k == K_TAB) )
|
|
||||||
if (k == K_TAB)
|
if (k == K_TAB)
|
||||||
{
|
{
|
||||||
int anno = f.mask().get_int (F_ANNO);
|
int anno = f.mask().get_int (F_ANNO);
|
||||||
@ -150,7 +147,7 @@ bool annoes(TMask_field& f, KEY k)
|
|||||||
TDate fine = FineEsercizio(anno + 1);
|
TDate fine = FineEsercizio(anno + 1);
|
||||||
if (fine == botime)
|
if (fine == botime)
|
||||||
fine = FineEsercizio(anno);
|
fine = FineEsercizio(anno);
|
||||||
f.mask().field(F_DATAFIN).set(fine);
|
f.mask().field(F_DATAFIN).set(fine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -158,7 +155,7 @@ bool annoes(TMask_field& f, KEY k)
|
|||||||
|
|
||||||
bool data_inizio(TMask_field& f, KEY k)
|
bool data_inizio(TMask_field& f, KEY k)
|
||||||
{
|
{
|
||||||
CG3100_application &app = (CG3100_application&)main_app();
|
CG3100_application & app = (CG3100_application&)main_app();
|
||||||
|
|
||||||
if (k == K_ENTER)
|
if (k == K_ENTER)
|
||||||
{
|
{
|
||||||
@ -171,7 +168,7 @@ bool data_inizio(TMask_field& f, KEY k)
|
|||||||
((app._masc == "cg3100a" ) && (decidi == 2)) ) )
|
((app._masc == "cg3100a" ) && (decidi == 2)) ) )
|
||||||
{
|
{
|
||||||
if (!data.ok()) //se la data e' vuota
|
if (!data.ok()) //se la data e' vuota
|
||||||
f.mask().field(F_DATAINI).set(InizioEsercizio(anno));
|
f.mask().field(F_DATAINI).set(InizioEsercizio(anno));
|
||||||
else
|
else
|
||||||
if (data < InizioEsercizio(anno))
|
if (data < InizioEsercizio(anno))
|
||||||
{
|
{
|
||||||
@ -210,7 +207,7 @@ bool data_fine(TMask_field& f, KEY k)
|
|||||||
if (fine == botime)
|
if (fine == botime)
|
||||||
fine = FineEsercizio(anno);
|
fine = FineEsercizio(anno);
|
||||||
if (!datafin.ok()) //se la data e' vuota
|
if (!datafin.ok()) //se la data e' vuota
|
||||||
f.mask().field(F_DATAFIN).set(fine);
|
f.mask().field(F_DATAFIN).set(fine);
|
||||||
else
|
else
|
||||||
if (datafin > fine)
|
if (datafin > fine)
|
||||||
{
|
{
|
||||||
@ -231,16 +228,16 @@ void CG3100_application::compila_clifo()
|
|||||||
_clifo->read();
|
_clifo->read();
|
||||||
if (_clifo->bad())
|
if (_clifo->bad())
|
||||||
_clifo->zero();
|
_clifo->zero();
|
||||||
_alleg = _clifo->get_int(CLI_ALLEG);
|
_alleg = _clifo->curr().get_int(CLI_ALLEG);
|
||||||
_statocf = _clifo->get(CLI_STATOCF);
|
_statocf = _clifo->curr().get(CLI_STATOCF);
|
||||||
_comcf = _clifo->get(CLI_COMCF);
|
_comcf = _clifo->curr().get(CLI_COMCF);
|
||||||
_ragsoc = _clifo->get(CLI_RAGSOC);
|
_ragsoc = _clifo->curr().get(CLI_RAGSOC);
|
||||||
_indcf = _clifo->get(CLI_INDCF);
|
_indcf = _clifo->curr().get(CLI_INDCF);
|
||||||
_civcf = _clifo->get(CLI_CIVCF);
|
_civcf = _clifo->curr().get(CLI_CIVCF);
|
||||||
_paiv = _clifo->get(CLI_PAIV);
|
_paiv = _clifo->curr().get(CLI_PAIV);
|
||||||
_capcf = _clifo->get(CLI_CAPCF);
|
_capcf = _clifo->curr().get(CLI_CAPCF);
|
||||||
_cofi = _clifo->get(CLI_COFI);
|
_cofi = _clifo->curr().get(CLI_COFI);
|
||||||
_codalleg = _clifo->get_long(CLI_CODALLEG);
|
_codalleg = _clifo->curr().get_long(CLI_CODALLEG);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3100_application::compila_comuni()
|
void CG3100_application::compila_comuni()
|
||||||
@ -397,7 +394,7 @@ const int CodiceRegistro (const char* cod, int anno)
|
|||||||
codtab.format("%4d%-3s", anno, cod);
|
codtab.format("%4d%-3s", anno, cod);
|
||||||
//sprintf (__tmp, "%04d%-3s", anno, cod);
|
//sprintf (__tmp, "%04d%-3s", anno, cod);
|
||||||
//TString codtab (__tmp);
|
//TString codtab (__tmp);
|
||||||
int tipo_reg;
|
int tipo_reg;
|
||||||
|
|
||||||
tab_reg.zero();
|
tab_reg.zero();
|
||||||
|
|
||||||
@ -418,7 +415,7 @@ bool filter_func_fatture (const TRelation * rel)
|
|||||||
int tipo_reg;
|
int tipo_reg;
|
||||||
int ann_reg;
|
int ann_reg;
|
||||||
TString cod_reg;
|
TString cod_reg;
|
||||||
TLocalisamfile & mov = rel->lfile(LF_MOV);
|
TLocalisamfile& mov = rel->lfile(LF_MOV);
|
||||||
TRectype from (mov.curr());
|
TRectype from (mov.curr());
|
||||||
TRectype to (mov.curr());
|
TRectype to (mov.curr());
|
||||||
ann_reg = mov.get_int (MOV_ANNOIVA);
|
ann_reg = mov.get_int (MOV_ANNOIVA);
|
||||||
@ -454,7 +451,7 @@ bool filter_func (const TRelation * rel)
|
|||||||
CG3100_application & app = (CG3100_application&)main_app();
|
CG3100_application & app = (CG3100_application&)main_app();
|
||||||
int tipo_reg, ann_reg;
|
int tipo_reg, ann_reg;
|
||||||
TString cod_reg, causale;
|
TString cod_reg, causale;
|
||||||
TLocalisamfile & mov = rel->lfile(LF_MOV);
|
TLocalisamfile& mov = rel->lfile(LF_MOV);
|
||||||
TRectype from (mov.curr());
|
TRectype from (mov.curr());
|
||||||
TRectype to (mov.curr());
|
TRectype to (mov.curr());
|
||||||
switch (app._scelta_stampa)
|
switch (app._scelta_stampa)
|
||||||
@ -505,78 +502,98 @@ bool filter_func (const TRelation * rel)
|
|||||||
|
|
||||||
void CG3100_application::stampa_errori_rmov()
|
void CG3100_application::stampa_errori_rmov()
|
||||||
{
|
{
|
||||||
if (_scelta_stampa == 0) //lista movimenti
|
|
||||||
{
|
|
||||||
if (_controllo_mov_errati != 3)
|
if (_controllo_mov_errati != 3)
|
||||||
{
|
{
|
||||||
_nr = 2;
|
_nr = 2;
|
||||||
if (_descr == "")
|
if ( _tiporegistro != 1 && _tiporegistro != 2 )
|
||||||
{
|
{
|
||||||
|
if (_err == ERR_64)
|
||||||
|
{
|
||||||
|
reset_row(_nr);
|
||||||
|
set_row(_nr++, "@11g%s", ERR_64);
|
||||||
|
}
|
||||||
|
if (_err1 == ERR_66)
|
||||||
|
{
|
||||||
reset_row(_nr);
|
reset_row(_nr);
|
||||||
set_row(_nr++, "@11g%s", ERR_66);
|
set_row(_nr++, "@11g%s", ERR_66);
|
||||||
|
}
|
||||||
|
if (_err2 == ERR_75)
|
||||||
|
{
|
||||||
|
reset_row(_nr);
|
||||||
|
set_row(_nr++, "@11g%s", ERR_75);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (_stampa_mess_alleg_iva)
|
if ((_tiporegistro == 1)||(_tiporegistro == 2))
|
||||||
{
|
{
|
||||||
if (!_alleg_causale)
|
|
||||||
{
|
|
||||||
reset_row(_nr);
|
|
||||||
set_row(_nr++, "@11g%61s", MSG_20);
|
|
||||||
}
|
|
||||||
if ((_alleg == 1)||(_alleg == 2))
|
if ((_alleg == 1)||(_alleg == 2))
|
||||||
{
|
{
|
||||||
reset_row(_nr);
|
reset_row(_nr);
|
||||||
set_row(_nr++, "@11g%s", MSG_31);
|
set_row(_nr++, "@11g%s", MSG_31);
|
||||||
}
|
}
|
||||||
}
|
if (_err2 == ERR_1)
|
||||||
if (_err2 == ERR_1)
|
{
|
||||||
{
|
reset_row(_nr);
|
||||||
reset_row(_nr);
|
set_row(_nr++, "@11g%s",ERR_1);
|
||||||
set_row(_nr++, "@11g%s",ERR_1);
|
}
|
||||||
}
|
if (_err == ERR_2)
|
||||||
if (_err == ERR_2)
|
{
|
||||||
{
|
reset_row(_nr);
|
||||||
reset_row(_nr);
|
set_row(_nr++, "@11g%s",ERR_2);
|
||||||
set_row(_nr++, "@11g%s",ERR_2);
|
}
|
||||||
}
|
if (_err3 == ERR_4)
|
||||||
if (_msg == MSG_54)
|
{
|
||||||
{
|
reset_row(_nr);
|
||||||
reset_row(_nr);
|
set_row(_nr++, "@11g%s",ERR_4);
|
||||||
set_row(_nr++, "@11g%s",MSG_54);
|
}
|
||||||
}
|
if (_msg == MSG_54)
|
||||||
if (_err1 == ERR_09)
|
{
|
||||||
{
|
reset_row(_nr);
|
||||||
reset_row(_nr);
|
set_row(_nr++, "@11g%s",MSG_54);
|
||||||
set_row(_nr, "@11g%s",ERR_09);
|
}
|
||||||
}
|
if (_err1 == ERR_09)
|
||||||
|
{
|
||||||
|
reset_row(_nr);
|
||||||
|
set_row(_nr, "@11g%s",ERR_09);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3100_application::stampa_errori_mov()
|
void CG3100_application::stampa_errori_mov()
|
||||||
{
|
{
|
||||||
if (_scelta_stampa == 0)
|
|
||||||
{
|
|
||||||
if (_controllo_mov_errati != 3)
|
if (_controllo_mov_errati != 3)
|
||||||
{
|
{
|
||||||
//aggiungere il controllo anno di competenza
|
//aggiungere il controllo anno di competenza
|
||||||
|
|
||||||
if ( (_tiporegistro == 1)||(_tiporegistro == 2) ) //controlli su mov. iva
|
if ( _tiporegistro == 1 || _tiporegistro == 2 ) //controlli su mov. iva
|
||||||
{
|
{
|
||||||
if (_caus->bad())
|
if (_caus->empty())
|
||||||
set_row(++_n, "@11g%s", ERR_16);
|
set_row(++_n, "@11g%s", ERR_16);
|
||||||
|
|
||||||
if (_tipodocumento != _tipodoc)
|
if (_tipodocumento != _tipodoc)
|
||||||
set_row(++_n, "@11g%s", MSG_19);
|
set_row(++_n, "@11g%s", MSG_19);
|
||||||
|
|
||||||
if ((_stampa_mess_alleg_iva)&&(!_alleg_causale))
|
if ((_stampa_mess_alleg_iva)&&(!_alleg_causale))
|
||||||
set_row(++_n, "@11g%s", MSG_20);
|
set_row(++_n, "@11g%s", MSG_20);
|
||||||
|
|
||||||
if (_registro == "")
|
if (_registro == "")
|
||||||
set_row(++_n, "@11g%s", ERR_21);
|
set_row(++_n, "@11g%s", ERR_21);
|
||||||
}
|
}
|
||||||
|
if ( _tiporegistro != 1 && _tiporegistro != 2 ) //controlli su mov. di prima nota
|
||||||
|
{
|
||||||
|
if (_registro.not_empty())
|
||||||
|
if (CodiceRegistro(_registro,_anno) == 0)
|
||||||
|
set_row(++_n, "@11g%s", ERR_62);
|
||||||
|
if (_causale.not_empty())
|
||||||
|
{
|
||||||
|
if (_caus->empty())
|
||||||
|
set_row(++_n, "@11g%s", ERR_16);
|
||||||
|
else
|
||||||
|
if ( _reg_causale != _registro && _registro.not_empty() )
|
||||||
|
set_row(++_n, "@11g%s", ERR_59);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3100_application::set_page(int file, int count)
|
void CG3100_application::set_page(int file, int count)
|
||||||
@ -590,13 +607,13 @@ void CG3100_application::set_page(int file, int count)
|
|||||||
{
|
{
|
||||||
_nr = 1;
|
_nr = 1;
|
||||||
set_row(_nr,"@3n",FLD(LF_RMOV,RMV_NUMRIG));
|
set_row(_nr,"@3n",FLD(LF_RMOV,RMV_NUMRIG));
|
||||||
// set_row(_nr,"@5g@3s",FLD(LF_MOV,MOV_CODCAUS));
|
// set_row(_nr,"@5g@3s",FLD(LF_MOV,MOV_CODCAUS));
|
||||||
// set_row(_nr,"@9g#.20t", &_descr_causale);
|
// set_row(_nr,"@9g#.20t", &_descr_causale);
|
||||||
set_row(_nr,"@30g@24s",FLD(LF_RMOV,RMV_DESCR));
|
set_row(_nr,"@30g@24s@r",FLD(LF_RMOV,RMV_DESCR));
|
||||||
set_row(_nr,"@56g@4n",FLD(LF_RMOV,RMV_GRUPPO));
|
set_row(_nr,"@56g@4n",FLD(LF_RMOV,RMV_GRUPPO));
|
||||||
set_row(_nr,"@61g@3n",FLD(LF_RMOV,RMV_CONTO));
|
set_row(_nr,"@61g@3n",FLD(LF_RMOV,RMV_CONTO));
|
||||||
set_row(_nr,"@65g@6n",FLD(LF_RMOV,RMV_SOTTOCONTO));
|
set_row(_nr,"@65g@6n",FLD(LF_RMOV,RMV_SOTTOCONTO));
|
||||||
set_row(_nr,"@72g#.20t",&_descr);
|
set_row(_nr,"@72g#.20t@r",&_descr);
|
||||||
_appoggio = current_cursor()->curr(LF_RMOV).get(RMV_SEZIONE);
|
_appoggio = current_cursor()->curr(LF_RMOV).get(RMV_SEZIONE);
|
||||||
if ((_appoggio=="D")||(_appoggio=="d"))
|
if ((_appoggio=="D")||(_appoggio=="d"))
|
||||||
set_row(_nr,"@93g@pN",FLD(LF_RMOV,RMV_IMPORTO,"###.###.###.###"));
|
set_row(_nr,"@93g@pN",FLD(LF_RMOV,RMV_IMPORTO,"###.###.###.###"));
|
||||||
@ -606,11 +623,14 @@ void CG3100_application::set_page(int file, int count)
|
|||||||
}
|
}
|
||||||
else if (file == LF_MOV)
|
else if (file == LF_MOV)
|
||||||
{
|
{
|
||||||
|
TString dep(132);
|
||||||
|
dep = "";
|
||||||
_n = 1;
|
_n = 1;
|
||||||
|
set_row (_n++,(const char*)dep);
|
||||||
set_row (_n, "Operazione n. @18g@7n", FLD(LF_MOV,MOV_NUMREG));
|
set_row (_n, "Operazione n. @18g@7n", FLD(LF_MOV,MOV_NUMREG));
|
||||||
//set_row (_n, "@23g@3s",FLD(LF_MOV,MOV_CODCAUS));
|
//set_row (_n, "@23g@3s",FLD(LF_MOV,MOV_CODCAUS));
|
||||||
set_row (_n, "@26gdel@30g@d",FLD(LF_MOV,MOV_DATAREG));
|
set_row (_n, "@26gdel@30g@d",FLD(LF_MOV,MOV_DATAREG));
|
||||||
set_row (_n, "@41g@40s",FLD(LF_MOV,MOV_DESCR));
|
set_row (_n, "@41g@40s@r",FLD(LF_MOV,MOV_DESCR));
|
||||||
set_row (_n, "@82gdoc. @87g@7s",FLD(LF_MOV,MOV_NUMDOC));
|
set_row (_n, "@82gdoc. @87g@7s",FLD(LF_MOV,MOV_NUMDOC));
|
||||||
set_row (_n, "@95gdel@99g@d", FLD(LF_MOV,MOV_DATADOC));
|
set_row (_n, "@95gdel@99g@d", FLD(LF_MOV,MOV_DATADOC));
|
||||||
TString16 reg = current_cursor()->curr(LF_MOV).get(MOV_REG);
|
TString16 reg = current_cursor()->curr(LF_MOV).get(MOV_REG);
|
||||||
@ -637,7 +657,6 @@ void CG3100_application::set_page(int file, int count)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3100_application::stampa_intestazione()
|
void CG3100_application::stampa_intestazione()
|
||||||
@ -646,23 +665,23 @@ void CG3100_application::stampa_intestazione()
|
|||||||
sep = "";
|
sep = "";
|
||||||
set_row (1,(const char*)sep);
|
set_row (1,(const char*)sep);
|
||||||
if (_tipo_elenco == "C")
|
if (_tipo_elenco == "C")
|
||||||
set_row (2, "Cliente@9g@6n", FLD(LF_MOV,MOV_CODCF));
|
set_row (2, "@bCliente@9g@6n", FLD(LF_MOV,MOV_CODCF));
|
||||||
else
|
else
|
||||||
set_row (2, "Fornitore@12g@6n", FLD(LF_MOV,MOV_CODCF));
|
set_row (2, "@bFornitore@12g@6n", FLD(LF_MOV,MOV_CODCF));
|
||||||
set_row (2, "@18g#35t", &_ragsoc);
|
set_row (2, "@b@18g#35t", &_ragsoc);
|
||||||
set_row (2, "@54gInd #29t", &_indcf);
|
set_row (2, "@b@54gInd #29t", &_indcf);
|
||||||
set_row (2, "@87g#10t", &_civcf);
|
set_row (2, "@b@87g#10t", &_civcf);
|
||||||
set_row (2, "@98gP.I. #11t", &_paiv);
|
set_row (2, "@b@98gP.I. #11t", &_paiv);
|
||||||
if (_alleg == 0)
|
if (_alleg == 0)
|
||||||
set_row (2, "@121gAllegato NO");
|
set_row (2, "@b@121gAllegato NO");
|
||||||
else
|
else
|
||||||
set_row (2, "@121gAllegato SI");
|
set_row (2, "@b@121gAllegato SI");
|
||||||
set_row (3, "@54gCap #5t", &_capcf);
|
set_row (3, "@b@54gCap #5t", &_capcf);
|
||||||
set_row (3,"@64gLoc #20t", &_dencom);
|
set_row (3,"@b@64gLoc #20t", &_dencom);
|
||||||
set_row (3,"@89gPr #5t", &_provcom);
|
set_row (3,"@b@89gPr #5t", &_provcom);
|
||||||
set_row (3, "@98gC.F. #16t", &_cofi);
|
set_row (3, "@b@98gC.F. #16t", &_cofi);
|
||||||
if (_alleg == 0)
|
if (_alleg == 0)
|
||||||
set_row (3, "@120gRifer@126g#6d", &_codalleg);
|
set_row (3, "@b@120gRifer@126g#6d", &_codalleg);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG3100_application::preprocess_page(int file,int counter)
|
bool CG3100_application::preprocess_page(int file,int counter)
|
||||||
@ -693,7 +712,7 @@ bool CG3100_application::preprocess_page(int file,int counter)
|
|||||||
//TDate data_corrente (current_cursor()->file(LF_MOV)->get_date(MOV_DATAREG));
|
//TDate data_corrente (current_cursor()->file(LF_MOV)->get_date(MOV_DATAREG));
|
||||||
_tiporegistro = CodiceRegistro(_registro, _anno);
|
_tiporegistro = CodiceRegistro(_registro, _anno);
|
||||||
|
|
||||||
TLocalisamfile& fl = current_cursor()->file(LF_MOV);
|
TLocalisamfile & fl = current_cursor()->file(LF_MOV);
|
||||||
TRectype da (fl.curr());
|
TRectype da (fl.curr());
|
||||||
TRectype a (fl.curr());
|
TRectype a (fl.curr());
|
||||||
da.zero();
|
da.zero();
|
||||||
@ -716,17 +735,20 @@ bool CG3100_application::preprocess_page(int file,int counter)
|
|||||||
_caus->read();
|
_caus->read();
|
||||||
if (_caus->bad())
|
if (_caus->bad())
|
||||||
_caus->curr().zero();
|
_caus->curr().zero();
|
||||||
|
_reg_causale = _caus->curr().get(CAU_REG);
|
||||||
_descr_causale = _caus->curr().get(CAU_DESCR);
|
_descr_causale = _caus->curr().get(CAU_DESCR);
|
||||||
_alleg_causale = _caus->curr().get_bool(CAU_ALLEG);
|
_alleg_causale = _caus->curr().get_bool(CAU_ALLEG);
|
||||||
_tipodocumento = _caus->curr().get(CAU_TIPODOC);
|
_tipodocumento = _caus->curr().get(CAU_TIPODOC);
|
||||||
|
|
||||||
if ( ((_controllo_mov_errati == 1)&&(segnala_errori_primariga()))
|
bool controlla = segnala_errori_primariga();
|
||||||
|| (_controllo_mov_errati == 2))
|
|
||||||
|
if ( (_controllo_mov_errati == 1 && controlla)
|
||||||
|
|| _controllo_mov_errati == 2 )
|
||||||
{
|
{
|
||||||
stampa_errori_mov();
|
stampa_errori_mov();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else if ((_controllo_mov_errati == 1)&&(!segnala_errori_primariga()))
|
else if ((_controllo_mov_errati == 1)&&(!controlla))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
else if (_controllo_mov_errati == 3)
|
else if (_controllo_mov_errati == 3)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -737,11 +759,13 @@ bool CG3100_application::preprocess_page(int file,int counter)
|
|||||||
if (!_causale_gia_stampata)
|
if (!_causale_gia_stampata)
|
||||||
{
|
{
|
||||||
set_row(_nr,"@4g%3s", (const char*) _causale);
|
set_row(_nr,"@4g%3s", (const char*) _causale);
|
||||||
set_row(_nr,"@8g%.20s", (const char*) _descr_causale);
|
set_row(_nr,"@8g%.20s@r", (const char*) _descr_causale);
|
||||||
_causale_gia_stampata = TRUE;
|
_causale_gia_stampata = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((_controllo_mov_errati == 1)&&(segnala_errori_ogniriga()))||(_controllo_mov_errati == 2)||(_controllo_mov_errati == 3))
|
bool verifica = segnala_errori_ogniriga();
|
||||||
|
|
||||||
|
if (((_controllo_mov_errati == 1)&&(verifica))||(_controllo_mov_errati == 2)||(_controllo_mov_errati == 3))
|
||||||
{
|
{
|
||||||
int gruppo = current_cursor()->curr(LF_RMOV).get_int(RMV_GRUPPO);
|
int gruppo = current_cursor()->curr(LF_RMOV).get_int(RMV_GRUPPO);
|
||||||
int conto = current_cursor()->curr(LF_RMOV).get_int(RMV_CONTO);
|
int conto = current_cursor()->curr(LF_RMOV).get_int(RMV_CONTO);
|
||||||
@ -770,7 +794,7 @@ bool CG3100_application::preprocess_page(int file,int counter)
|
|||||||
}
|
}
|
||||||
else if ((_stampa_parte_iva)&&(file == LF_RMOVIVA))
|
else if ((_stampa_parte_iva)&&(file == LF_RMOVIVA))
|
||||||
{
|
{
|
||||||
const TRectype iva(current_cursor()->file(LF_RMOVIVA).curr());
|
TRectype iva(current_cursor()->file(LF_RMOVIVA).curr());
|
||||||
_impo = iva.get_real(RMI_IMPONIBILE);
|
_impo = iva.get_real(RMI_IMPONIBILE);
|
||||||
_impos = iva.get_real(RMI_IMPOSTA);
|
_impos = iva.get_real(RMI_IMPOSTA);
|
||||||
_tipocr = iva.get_int(RMI_TIPOCR);
|
_tipocr = iva.get_int(RMI_TIPOCR);
|
||||||
@ -794,7 +818,7 @@ bool CG3100_application::preprocess_page(int file,int counter)
|
|||||||
_anno = current_cursor()->curr(LF_MOV).get_int(MOV_ANNOES);
|
_anno = current_cursor()->curr(LF_MOV).get_int(MOV_ANNOES);
|
||||||
_tipodoc = current_cursor()->curr(LF_MOV).get(MOV_TIPODOC);
|
_tipodoc = current_cursor()->curr(LF_MOV).get(MOV_TIPODOC);
|
||||||
|
|
||||||
TLocalisamfile& fl = current_cursor()->file(LF_MOV);
|
TLocalisamfile & fl = current_cursor()->file(LF_MOV);
|
||||||
TRectype da (fl.curr());
|
TRectype da (fl.curr());
|
||||||
TRectype a (fl.curr());
|
TRectype a (fl.curr());
|
||||||
da.zero();
|
da.zero();
|
||||||
@ -811,7 +835,7 @@ bool CG3100_application::preprocess_page(int file,int counter)
|
|||||||
/*
|
/*
|
||||||
if ((_annoes == _anno) || (_annoes == 0))
|
if ((_annoes == _anno) || (_annoes == 0))
|
||||||
if ((_causale >= _causale_ini) && (_causale <= _causale_fin))
|
if ((_causale >= _causale_ini) && (_causale <= _causale_fin))
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
_caus->setkey(1);
|
_caus->setkey(1);
|
||||||
_caus->curr().put(CAU_CODCAUS,_causale);
|
_caus->curr().put(CAU_CODCAUS,_causale);
|
||||||
@ -874,18 +898,14 @@ bool CG3100_application::preprocess_page(int file,int counter)
|
|||||||
_tipodoc = cur->curr(LF_MOV).get(MOV_TIPODOC);
|
_tipodoc = cur->curr(LF_MOV).get(MOV_TIPODOC);
|
||||||
_codval = cur->curr(LF_MOV).get(MOV_CODVAL);
|
_codval = cur->curr(LF_MOV).get(MOV_CODVAL);
|
||||||
_totdoc = cur->curr(LF_MOV).get_real(MOV_TOTDOC);
|
_totdoc = cur->curr(LF_MOV).get_real(MOV_TOTDOC);
|
||||||
/*
|
|
||||||
if ((_tipo_elenco != _tipo_clifo_precedente) &&
|
|
||||||
(_tipo_clifo_precedente != "") && _salto_pagina)
|
|
||||||
printer().formfeed();
|
|
||||||
*/
|
|
||||||
if ((_tipo_elenco != _tipo_clifo_prec) &&
|
if ((_tipo_elenco != _tipo_clifo_prec) &&
|
||||||
(_tipo_clifo_prec != "") && _salto_pagina)
|
(_tipo_clifo_prec != "") && _salto_pagina)
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
|
|
||||||
TLocalisamfile& file = cur->file(LF_MOV);
|
TLocalisamfile & file = cur->file(LF_MOV);
|
||||||
TRectype da (file.curr());
|
TRectype da (file->curr());
|
||||||
TRectype a (file.curr());
|
TRectype a (file->curr());
|
||||||
da.zero();
|
da.zero();
|
||||||
a.zero();
|
a.zero();
|
||||||
|
|
||||||
@ -905,7 +925,7 @@ bool CG3100_application::preprocess_page(int file,int counter)
|
|||||||
if (_codice_fin != 0)
|
if (_codice_fin != 0)
|
||||||
a.put(MOV_CODCF, _codice_fin);
|
a.put(MOV_CODCF, _codice_fin);
|
||||||
|
|
||||||
if ((file.curr() >= da) && (file.curr() <= a))
|
if ((file->curr() >= da) && (file->curr() <= a))
|
||||||
{
|
{
|
||||||
compila_clifo();
|
compila_clifo();
|
||||||
compila_comuni();
|
compila_comuni();
|
||||||
@ -981,7 +1001,7 @@ bool CG3100_application::preprocess_page(int file,int counter)
|
|||||||
set_row(1,"@42g@6,rs",FLD(LF_MOV,MOV_NUMDOC));
|
set_row(1,"@42g@6,rs",FLD(LF_MOV,MOV_NUMDOC));
|
||||||
set_row(1,"@49g@3s",FLD(LF_MOV,MOV_CODCAUS));
|
set_row(1,"@49g@3s",FLD(LF_MOV,MOV_CODCAUS));
|
||||||
set_row(1,"@53g@2s",FLD(LF_MOV,MOV_TIPODOC));
|
set_row(1,"@53g@2s",FLD(LF_MOV,MOV_TIPODOC));
|
||||||
set_row(1,"@56g%.11s", (const char *)_descr_doc);
|
set_row(1,"@56g%.12s@r", (const char *)_descr_doc);
|
||||||
set_row(1,"@68g@pN",FLD(LF_MOV,MOV_TOTDOC,"###.###.###.###"));
|
set_row(1,"@68g@pN",FLD(LF_MOV,MOV_TOTDOC,"###.###.###.###"));
|
||||||
set_row(1,"@84g@pN",FLD(LF_RMOVIVA,RMI_IMPONIBILE,"###.###.###.###"));
|
set_row(1,"@84g@pN",FLD(LF_RMOVIVA,RMI_IMPONIBILE,"###.###.###.###"));
|
||||||
set_row(1,"@101g@4s",FLD(LF_RMOVIVA,RMI_CODIVA));
|
set_row(1,"@101g@4s",FLD(LF_RMOVIVA,RMI_CODIVA));
|
||||||
@ -1037,11 +1057,11 @@ print_action CG3100_application::postprocess_page(int file,int count)
|
|||||||
force_setpage();
|
force_setpage();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (_scelta_stampa == 0)
|
if (file == LF_MOV)
|
||||||
{
|
{
|
||||||
if (file == LF_MOV)
|
reset_print();
|
||||||
{
|
int n = 1;
|
||||||
if (_stampa_parte_iva)
|
if ( _scelta_stampa == 0 && _stampa_parte_iva )
|
||||||
{
|
{
|
||||||
int r = 0;
|
int r = 0;
|
||||||
for (int j = 0; j < _c.items(); j++)
|
for (int j = 0; j < _c.items(); j++)
|
||||||
@ -1053,23 +1073,92 @@ print_action CG3100_application::postprocess_page(int file,int count)
|
|||||||
set_row(r, "@58gCodice Iva@68g%3s", (const char*)riga._codiva);
|
set_row(r, "@58gCodice Iva@68g%3s", (const char*)riga._codiva);
|
||||||
switch (riga._tipodet)
|
switch (riga._tipodet)
|
||||||
{
|
{
|
||||||
case 0 : set_row(r, "@73gDetraibile");
|
case 0 : set_row(r, "@73gDetraibile");
|
||||||
break;
|
break;
|
||||||
case 1 : set_row(r, "@73gIndetraibile su op.es.");
|
case 1 : set_row(r, "@73gIndetraibile su op.es.");
|
||||||
break;
|
break;
|
||||||
case 3 : set_row(r, "@73gPassaggi interni");
|
case 3 : set_row(r, "@73gPassaggi interni");
|
||||||
break;
|
break;
|
||||||
case 9 : set_row(r, "@73gIndetraibile art.19");
|
case 9 : set_row(r, "@73gIndetraibile art.19");
|
||||||
break;
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_c.destroy();
|
_c.destroy();
|
||||||
if (r > 0)
|
if (r > 0)
|
||||||
return REPEAT_PAGE;
|
{
|
||||||
else
|
n = ++r;
|
||||||
return NEXT_PAGE;
|
//return REPEAT_PAGE;
|
||||||
|
}
|
||||||
|
//else
|
||||||
|
// return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
|
TRecnotype pos, items;
|
||||||
|
bool FINITO = FALSE;
|
||||||
|
//reset_print();
|
||||||
|
//int n = 1;
|
||||||
|
if ((_scelta_stampa == 0)&&(_controllo_mov_errati != 3)&&(_tot_dare != _tot_avere))
|
||||||
|
set_row(n++, "@11g%s", ERR_77);
|
||||||
|
|
||||||
|
TLocalisamfile & mov = current_cursor()->file(LF_MOV);
|
||||||
|
pos = current_cursor()->pos();
|
||||||
|
items = current_cursor()->items();
|
||||||
|
|
||||||
|
FINITO = (pos == items-1);
|
||||||
|
|
||||||
|
_datareg = current_cursor()->file(LF_MOV).get_date(MOV_DATAREG);
|
||||||
|
_numreg = current_cursor()->file(LF_MOV).get_long(MOV_NUMREG);
|
||||||
|
|
||||||
|
TDate datarec (_datareg);
|
||||||
|
if (!FINITO)
|
||||||
|
{
|
||||||
|
TCursor * cur = current_cursor();
|
||||||
|
cur->save_status();
|
||||||
|
++(*cur);
|
||||||
|
datarec = cur->file(LF_MOV).get_date(MOV_DATAREG);
|
||||||
|
--(*cur);
|
||||||
|
cur->restore_status();
|
||||||
|
}
|
||||||
|
|
||||||
|
_tot_avere_giornaliero += _tot_avere;
|
||||||
|
_tot_dare_giornaliero += _tot_dare;
|
||||||
|
|
||||||
|
//stampa i totali giornalieri
|
||||||
|
if ( FINITO ||
|
||||||
|
(_datareg != datarec)||(_numreg == _numreg_fin))
|
||||||
|
{
|
||||||
|
if (( (_scelta_stampa == 0) && (_controllo_mov_errati != 1) && (_decidi == 2)) || ((_scelta_stampa == 1)&&(_decidi == 2)))
|
||||||
|
{
|
||||||
|
TString data = _datareg.string();
|
||||||
|
set_row(n, "@b@50gTotali del");
|
||||||
|
set_row(n, "@b@61ggiorno %s", (const char *)data);
|
||||||
|
set_row(n, "@b@93g%r", &_tot_dare_giornaliero);
|
||||||
|
set_row(n++, "@b@111g%r", &_tot_avere_giornaliero);
|
||||||
|
_tot_avere_giornaliero = 0;
|
||||||
|
_tot_dare_giornaliero = 0;
|
||||||
|
}
|
||||||
|
else if (((_scelta_stampa == 0)&&(_controllo_mov_errati != 1)&&(_decidi == 1)&&(FINITO)) || ((_scelta_stampa == 1)&&(_decidi == 1)&&(FINITO)))
|
||||||
|
{
|
||||||
|
TString sep;
|
||||||
|
sep = "";
|
||||||
|
set_row (n,(const char*)sep);
|
||||||
|
set_row(++n, "@b@60gTotale generale");
|
||||||
|
set_row(n, "@b@93g%r", &_tot_dare_generale);
|
||||||
|
set_row(n++, "@b@111g%r", &_tot_avere_generale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (n == 1)
|
||||||
|
{
|
||||||
|
force_setpage();
|
||||||
|
return NEXT_PAGE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_no_preprocess_page = TRUE;
|
||||||
|
force_setpage(FALSE);
|
||||||
|
return REPEAT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1077,11 +1166,12 @@ print_action CG3100_application::postprocess_page(int file,int count)
|
|||||||
case fatture:
|
case fatture:
|
||||||
if (file == LF_MOV)
|
if (file == LF_MOV)
|
||||||
{
|
{
|
||||||
|
long numreg;
|
||||||
_totdocumenti += _totdoc;
|
_totdocumenti += _totdoc;
|
||||||
TRecnotype pos, items;
|
TRecnotype pos, items;
|
||||||
bool FINITO = FALSE;
|
bool FINITO = FALSE;
|
||||||
TLocalisamfile& mov = current_cursor()->file(LF_MOV);
|
TCursor* cur = current_cursor();
|
||||||
TCursor * cur = current_cursor();
|
TLocalisamfile & mov = cur->file(LF_MOV);
|
||||||
|
|
||||||
pos = current_cursor()->pos();
|
pos = current_cursor()->pos();
|
||||||
items = current_cursor()->items();
|
items = current_cursor()->items();
|
||||||
@ -1105,47 +1195,24 @@ print_action CG3100_application::postprocess_page(int file,int count)
|
|||||||
TString blank = "";
|
TString blank = "";
|
||||||
set_row(1,(const char*)blank);
|
set_row(1,(const char*)blank);
|
||||||
if ((_tipo_elenco == "C")||(_tipo_elenco == "c"))
|
if ((_tipo_elenco == "C")||(_tipo_elenco == "c"))
|
||||||
set_row(2, "Totali Cliente@18gDocumenti Totale documenti@45gAllegati:@56gImponibile@75gImposta@94gop. esenti@112gop. non imp.");
|
set_row(2, "@bTotali Cliente@18gDocumenti Totale documenti@45gAllegati:@56gImponibile@75gImposta@94gop. esenti@112gop. non imp.");
|
||||||
else
|
else
|
||||||
set_row(2, "Totali Fornitore@18gDocumenti Totale documenti@47gAllegati:@56gImponibile@75gImposta@94gop. esenti@112gop. non imp.");
|
set_row(2, "@bTotali Fornitore@18gDocumenti Totale documenti@47gAllegati:@56gImponibile@75gImposta@94gop. esenti@112gop. non imp.");
|
||||||
set_row(3, "@18g%9d", _documenti);
|
set_row(3, "@b@18g%9d", _documenti);
|
||||||
set_row(3, "@28g%r", &_totdocumenti);
|
set_row(3, "@b@28g%r", &_totdocumenti);
|
||||||
set_row(3, "@56g%r", &_totimponibile);
|
set_row(3, "@b@56g%r", &_totimponibile);
|
||||||
set_row(3, "@75g%r", &_totimposta);
|
set_row(3, "@b@75g%r", &_totimposta);
|
||||||
set_row(3, "@94g%r", &_op_esenti);
|
set_row(3, "@b@94g%r", &_op_esenti);
|
||||||
set_row(3, "@112g%r", &_op_non_imp);
|
set_row(3, "@b@112g%r", &_op_non_imp);
|
||||||
//_tipo_clifo_precedente = _tipo_elenco;
|
|
||||||
_totimposta = 0;
|
_totimposta = 0;
|
||||||
_totimponibile = 0;
|
_totimponibile = 0;
|
||||||
_op_esenti = 0;
|
_op_esenti = 0;
|
||||||
_op_non_imp = 0;
|
_op_non_imp = 0;
|
||||||
_documenti = 0;
|
_documenti = 0;
|
||||||
_totdocumenti = 0;
|
_totdocumenti = 0;
|
||||||
//_tipo_clifo_prec = "";
|
|
||||||
//_codcf_prec = 0l;
|
|
||||||
return REPEAT_PAGE;
|
return REPEAT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
else if (file == LF_RMOVIVA)
|
|
||||||
{
|
|
||||||
long numrec;
|
|
||||||
TLocalisamfile* rmoviva = current_cursor()->file(LF_RMOVIVA);
|
|
||||||
|
|
||||||
_numreg = current_cursor()->file(LF_RMOVIVA)->get_long(MOV_NUMREG);
|
|
||||||
|
|
||||||
TRecnotype recno = rmoviva.recno();
|
|
||||||
rmoviva.next();
|
|
||||||
numrec = rmoviva.get_long(RMI_NUMREG);
|
|
||||||
rmoviva.readat(recno);
|
|
||||||
|
|
||||||
if ( (_numreg != numrec) && (
|
|
||||||
_settata_prima_riga = FALSE;
|
|
||||||
else
|
|
||||||
_settata_prima_riga = TRUE;
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case movimenti_sezionale:
|
case movimenti_sezionale:
|
||||||
@ -1153,13 +1220,13 @@ print_action CG3100_application::postprocess_page(int file,int count)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
return NEXT_PAGE;
|
|
||||||
|
return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int CG3100_application::my_next(TLocalisamfile & mov)
|
int CG3100_application::my_next(TLocalisamfile * mov)
|
||||||
{
|
{
|
||||||
int esito;
|
int esito;
|
||||||
TString cod_reg, causale;
|
TString cod_reg, causale;
|
||||||
@ -1179,8 +1246,6 @@ int CG3100_application::my_next(TLocalisamfile & mov)
|
|||||||
ann_reg = mov.get_int (MOV_ANNOIVA);
|
ann_reg = mov.get_int (MOV_ANNOIVA);
|
||||||
causale = mov.get (MOV_CODCAUS);
|
causale = mov.get (MOV_CODCAUS);
|
||||||
|
|
||||||
//if ( ( ( _annoes != 0l) && (ann_reg != _annoes) )
|
|
||||||
// || ( (causale < (const char*)_causale_ini) || (causale > (const char*)_causale_fin)) )
|
|
||||||
if ( ( _annoes != 0l)
|
if ( ( _annoes != 0l)
|
||||||
|| ( (causale < (const char*)_causale_ini) || (causale > (const char*)_causale_fin)) )
|
|| ( (causale < (const char*)_causale_ini) || (causale > (const char*)_causale_fin)) )
|
||||||
{
|
{
|
||||||
@ -1212,6 +1277,7 @@ print_action CG3100_application::postprocess_print(int file,int count)
|
|||||||
switch (_tipo_lista)
|
switch (_tipo_lista)
|
||||||
{
|
{
|
||||||
case movimenti:
|
case movimenti:
|
||||||
|
/*
|
||||||
if (file == LF_RMOV)
|
if (file == LF_RMOV)
|
||||||
{
|
{
|
||||||
TRecnotype pos, items;
|
TRecnotype pos, items;
|
||||||
@ -1222,7 +1288,7 @@ print_action CG3100_application::postprocess_print(int file,int count)
|
|||||||
if ((_scelta_stampa == 0)&&(_controllo_mov_errati != 3)&&(_tot_dare != _tot_avere))
|
if ((_scelta_stampa == 0)&&(_controllo_mov_errati != 3)&&(_tot_dare != _tot_avere))
|
||||||
set_row(n++, "@11g%s", ERR_77);
|
set_row(n++, "@11g%s", ERR_77);
|
||||||
|
|
||||||
TLocalisamfile& mov =current_cursor()->file(LF_MOV);
|
TLocalisamfile & mov = current_cursor()->file(LF_MOV);
|
||||||
// nrec = mov.recno();
|
// nrec = mov.recno();
|
||||||
|
|
||||||
pos = current_cursor()->pos();
|
pos = current_cursor()->pos();
|
||||||
@ -1230,8 +1296,8 @@ print_action CG3100_application::postprocess_print(int file,int count)
|
|||||||
|
|
||||||
FINITO = (pos == items-1);
|
FINITO = (pos == items-1);
|
||||||
|
|
||||||
_datareg = current_cursor()->file(LF_MOV).get_date(MOV_DATAREG);
|
_datareg = current_cursor()->file(LF_MOV)->get_date(MOV_DATAREG);
|
||||||
_numreg = current_cursor()->file(LF_MOV).get_long(MOV_NUMREG);
|
_numreg = current_cursor()->file(LF_MOV)->get_long(MOV_NUMREG);
|
||||||
|
|
||||||
TDate datarec (_datareg);
|
TDate datarec (_datareg);
|
||||||
if (!FINITO)
|
if (!FINITO)
|
||||||
@ -1239,20 +1305,18 @@ print_action CG3100_application::postprocess_print(int file,int count)
|
|||||||
TCursor * cur = current_cursor();
|
TCursor * cur = current_cursor();
|
||||||
cur->save_status();
|
cur->save_status();
|
||||||
++(*cur);
|
++(*cur);
|
||||||
datarec = cur->file(LF_MOV).get_date(MOV_DATAREG);
|
datarec = cur->file(LF_MOV)->get_date(MOV_DATAREG);
|
||||||
--(*cur);
|
--(*cur);
|
||||||
cur->restore_status();
|
cur->restore_status();
|
||||||
}
|
}
|
||||||
/*
|
// esito = my_next(mov);
|
||||||
esito = my_next(mov);
|
// if (esito == NOERR)
|
||||||
if (esito == NOERR)
|
// {
|
||||||
{
|
// long numrec = mov.get_long(MOV_NUMREG);
|
||||||
long numrec = mov.get_long(MOV_NUMREG);
|
// datarec = mov.get_date(MOV_DATAREG);
|
||||||
datarec = mov.get_date(MOV_DATAREG);
|
// }
|
||||||
}
|
|
||||||
*/
|
|
||||||
// mov.readat(nrec);
|
// mov.readat(nrec);
|
||||||
|
|
||||||
_tot_avere_giornaliero += _tot_avere;
|
_tot_avere_giornaliero += _tot_avere;
|
||||||
_tot_dare_giornaliero += _tot_dare;
|
_tot_dare_giornaliero += _tot_dare;
|
||||||
|
|
||||||
@ -1263,10 +1327,10 @@ print_action CG3100_application::postprocess_print(int file,int count)
|
|||||||
if (( (_scelta_stampa == 0) && (_controllo_mov_errati != 1) && (_decidi == 2)) || ((_scelta_stampa == 1)&&(_decidi == 2)))
|
if (( (_scelta_stampa == 0) && (_controllo_mov_errati != 1) && (_decidi == 2)) || ((_scelta_stampa == 1)&&(_decidi == 2)))
|
||||||
{
|
{
|
||||||
TString data = _datareg.string();
|
TString data = _datareg.string();
|
||||||
set_row(n, "@50gTotali del");
|
set_row(n, "@b@50gTotali del");
|
||||||
set_row(n, "@61ggiorno %s", (const char *)data);
|
set_row(n, "@b@61ggiorno %s", (const char *)data);
|
||||||
set_row(n, "@93g%r", &_tot_dare_giornaliero);
|
set_row(n, "@b@93g%r", &_tot_dare_giornaliero);
|
||||||
set_row(n++, "@111g%r", &_tot_avere_giornaliero);
|
set_row(n++, "@b@111g%r", &_tot_avere_giornaliero);
|
||||||
_tot_avere_giornaliero = 0;
|
_tot_avere_giornaliero = 0;
|
||||||
_tot_dare_giornaliero = 0;
|
_tot_dare_giornaliero = 0;
|
||||||
|
|
||||||
@ -1276,9 +1340,9 @@ print_action CG3100_application::postprocess_print(int file,int count)
|
|||||||
TString sep;
|
TString sep;
|
||||||
sep = "";
|
sep = "";
|
||||||
set_row (n,(const char*)sep);
|
set_row (n,(const char*)sep);
|
||||||
set_row(++n, "@60gTotale generale");
|
set_row(++n, "@b@60gTotale generale");
|
||||||
set_row(n, "@93g%r", &_tot_dare_generale);
|
set_row(n, "@b@93g%r", &_tot_dare_generale);
|
||||||
set_row(n++, "@111g%r", &_tot_avere_generale);
|
set_row(n++, "@b@111g%r", &_tot_avere_generale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1293,9 +1357,8 @@ print_action CG3100_application::postprocess_print(int file,int count)
|
|||||||
force_setpage(FALSE);
|
force_setpage(FALSE);
|
||||||
return REPEAT_PAGE;
|
return REPEAT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case fatture:
|
case fatture:
|
||||||
@ -1313,17 +1376,25 @@ print_action CG3100_application::postprocess_print(int file,int count)
|
|||||||
bool CG3100_application::segnala_errori_primariga()
|
bool CG3100_application::segnala_errori_primariga()
|
||||||
{
|
{
|
||||||
int tiporeg;
|
int tiporeg;
|
||||||
|
tiporeg = CodiceRegistro (_registro, _anno);
|
||||||
|
|
||||||
if ((_tiporegistro == 1)||(_tiporegistro == 2)) //movimento iva
|
if ((_tiporegistro == 1)||(_tiporegistro == 2)) //movimento iva
|
||||||
{
|
{
|
||||||
tiporeg = CodiceRegistro (_registro, _anno);
|
if ( tiporeg == 0 ||
|
||||||
|
_caus->empty() ||
|
||||||
if ( (tiporeg == 0) ||
|
_tipodocumento != _tipodoc ||
|
||||||
(_caus->bad()) ||
|
(_stampa_mess_alleg_iva && !_alleg_causale) )
|
||||||
(_tipodocumento != _tipodoc) ||
|
|
||||||
((_stampa_mess_alleg_iva) && (!_alleg_causale)))
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
if ((_tiporegistro != 1)&&(_tiporegistro != 2)) //mov. di prima nota
|
||||||
|
{
|
||||||
|
if (_registro.not_empty())
|
||||||
|
if (tiporeg == 0) return TRUE;
|
||||||
|
if (_causale.not_empty())
|
||||||
|
if ( _caus->empty() ||
|
||||||
|
(_reg_causale != _registro && _registro.not_empty()) )
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1332,25 +1403,53 @@ bool CG3100_application::segnala_errori_ogniriga()
|
|||||||
{
|
{
|
||||||
bool trovato = FALSE;
|
bool trovato = FALSE;
|
||||||
TString dep1;
|
TString dep1;
|
||||||
|
_err = _err1 = _err2 = _err3 = "";
|
||||||
|
|
||||||
|
if ((_tiporegistro != 1)&&(_tiporegistro != 2))
|
||||||
|
{
|
||||||
|
int gruppo = current_cursor()->curr(LF_RMOV).get_int(RMV_GRUPPO);
|
||||||
|
int conto = current_cursor()->curr(LF_RMOV).get_int(RMV_CONTO);
|
||||||
|
long sottoconto = current_cursor()->curr(LF_RMOV).get_long(RMV_SOTTOCONTO);
|
||||||
|
if (gruppo == 0 || conto == 0 || sottoconto == 0L)
|
||||||
|
{
|
||||||
|
_err = ERR_64;
|
||||||
|
trovato = TRUE;
|
||||||
|
}
|
||||||
|
TString tipoc = current_cursor()->curr(LF_RMOV).get(RMV_TIPOC);
|
||||||
|
_descr = DescrConto(gruppo, conto, sottoconto, tipoc);
|
||||||
|
if (_descr.empty())
|
||||||
|
{
|
||||||
|
_err1 = ERR_66;
|
||||||
|
trovato = TRUE;
|
||||||
|
}
|
||||||
|
_alleg = AllegClifo(gruppo, conto, sottoconto);
|
||||||
|
_importo = current_cursor()->file(LF_RMOV).get_real(RMV_IMPORTO);
|
||||||
|
_appoggio = current_cursor()->curr(LF_RMOV).get(RMV_SEZIONE);
|
||||||
|
if (_appoggio != "D" && _appoggio != "A")
|
||||||
|
{
|
||||||
|
_err2 = ERR_75;
|
||||||
|
trovato = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((_tiporegistro == 1)||(_tiporegistro == 2)) //movimento iva
|
if ((_tiporegistro == 1)||(_tiporegistro == 2)) //movimento iva
|
||||||
{
|
{
|
||||||
long record, numreg;
|
long record, numreg;
|
||||||
TLocalisamfile& rmoviva = current_cursor()->file(LF_RMOVIVA);
|
TLocalisamfile & rmoviva = current_cursor()->file(LF_RMOVIVA);
|
||||||
_numreg = current_cursor()->file(LF_MOV).get_long(MOV_NUMREG);
|
_numreg = current_cursor()->file(LF_MOV).get_long(MOV_NUMREG);
|
||||||
if (current_cursor()->is_first_match(LF_RMOVIVA))
|
if (current_cursor()->is_first_match(LF_RMOVIVA))
|
||||||
{
|
{
|
||||||
record = rmoviva.recno();
|
record = rmoviva->recno();
|
||||||
rmoviva.zero();
|
rmoviva->zero();
|
||||||
rmoviva.put(RMI_NUMREG, _numreg);
|
rmoviva->put(RMI_NUMREG, _numreg);
|
||||||
for (rmoviva.read(); !rmoviva.eof() ;rmoviva.next())
|
for (rmoviva->read(); !rmoviva->eof() ;rmoviva->next())
|
||||||
{
|
{
|
||||||
_cod = rmoviva.get(RMI_CODIVA);
|
_cod = rmoviva->get(RMI_CODIVA);
|
||||||
_tipod = rmoviva.get_int(RMI_TIPODET);
|
_tipod = rmoviva->get_int(RMI_TIPODET);
|
||||||
_impo = rmoviva.get_real(RMI_IMPONIBILE);
|
_impo = rmoviva->get_real(RMI_IMPONIBILE);
|
||||||
_impos = rmoviva.get_real(RMI_IMPOSTA);
|
_impos = rmoviva->get_real(RMI_IMPOSTA);
|
||||||
_tipocr = rmoviva.get_int(RMI_TIPOCR);
|
_tipocr = rmoviva->get_int(RMI_TIPOCR);
|
||||||
numreg = rmoviva.get_long(RMI_NUMREG);
|
numreg = rmoviva->get_long(RMI_NUMREG);
|
||||||
if (numreg != _numreg)
|
if (numreg != _numreg)
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
@ -1365,6 +1464,7 @@ bool CG3100_application::segnala_errori_ogniriga()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (_tiporegistro == 2)
|
if (_tiporegistro == 2)
|
||||||
|
{
|
||||||
switch (_tipocr)
|
switch (_tipocr)
|
||||||
{
|
{
|
||||||
case 4: case 9: _err1 = ERR_09;
|
case 4: case 9: _err1 = ERR_09;
|
||||||
@ -1372,6 +1472,12 @@ bool CG3100_application::segnala_errori_ogniriga()
|
|||||||
break;
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
if ( _tipod!=0 && _tipod!=1 && _tipod!=3 && _tipod!=9 )
|
||||||
|
{
|
||||||
|
_err3 = ERR_4;
|
||||||
|
trovato = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (_tipodoc != "AN")
|
if (_tipodoc != "AN")
|
||||||
{
|
{
|
||||||
_tabiva->setkey(1);
|
_tabiva->setkey(1);
|
||||||
@ -1390,7 +1496,7 @@ bool CG3100_application::segnala_errori_ogniriga()
|
|||||||
trovato = TRUE;
|
trovato = TRUE;
|
||||||
}
|
}
|
||||||
else if ((_stampa_mess_alleg_iva)&&((colonnac==" ")
|
else if ((_stampa_mess_alleg_iva)&&((colonnac==" ")
|
||||||
||(colonnaf==" ")))
|
||(colonnaf==" ")))
|
||||||
{
|
{
|
||||||
_msg = MSG_54;
|
_msg = MSG_54;
|
||||||
trovato = TRUE;
|
trovato = TRUE;
|
||||||
@ -1405,7 +1511,7 @@ bool CG3100_application::segnala_errori_ogniriga()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} //for
|
} //for
|
||||||
rmoviva.readat (record);
|
rmoviva->readat (record);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return trovato;
|
return trovato;
|
||||||
@ -1511,7 +1617,7 @@ bool CG3100_application::set_print(int m)
|
|||||||
if (!provvis)
|
if (!provvis)
|
||||||
_curr1->setfilter("(PROVVIS=\"\")");
|
_curr1->setfilter("(PROVVIS=\"\")");
|
||||||
else _curr1->setfilter("");
|
else _curr1->setfilter("");
|
||||||
TLocalisamfile& fl = current_cursor()->file(LF_MOV);
|
TLocalisamfile & fl = current_cursor()->file(LF_MOV);
|
||||||
TRectype da (fl.curr());
|
TRectype da (fl.curr());
|
||||||
TRectype a (fl.curr());
|
TRectype a (fl.curr());
|
||||||
da.zero();
|
da.zero();
|
||||||
@ -1530,7 +1636,7 @@ bool CG3100_application::set_print(int m)
|
|||||||
_curr2->setfilter("(PROVVIS=\"\")");
|
_curr2->setfilter("(PROVVIS=\"\")");
|
||||||
else
|
else
|
||||||
_curr2->setfilter("");
|
_curr2->setfilter("");
|
||||||
TLocalisamfile& fl = current_cursor()->file(LF_MOV);
|
TLocalisamfile & fl = current_cursor()->file(LF_MOV);
|
||||||
TRectype da (fl.curr());
|
TRectype da (fl.curr());
|
||||||
TRectype a (fl.curr());
|
TRectype a (fl.curr());
|
||||||
da.zero();
|
da.zero();
|
||||||
@ -1549,7 +1655,7 @@ bool CG3100_application::set_print(int m)
|
|||||||
|
|
||||||
case fatture:
|
case fatture:
|
||||||
{
|
{
|
||||||
TLocalisamfile& fl = current_cursor()->file(LF_MOV);
|
TLocalisamfile & fl = current_cursor()->file(LF_MOV);
|
||||||
TString tipo = msk.get(F_TIPOELENCO);
|
TString tipo = msk.get(F_TIPOELENCO);
|
||||||
bool movprov = msk.get_bool(F_STAMPAMOVP);
|
bool movprov = msk.get_bool(F_STAMPAMOVP);
|
||||||
if (tipo=="C" || tipo=="F")
|
if (tipo=="C" || tipo=="F")
|
||||||
@ -1563,7 +1669,7 @@ bool CG3100_application::set_print(int m)
|
|||||||
_codice_fin = atol(msk.get(F_CODICEFIN1));
|
_codice_fin = atol(msk.get(F_CODICEFIN1));
|
||||||
}
|
}
|
||||||
|
|
||||||
// _relmov.add(LF_MOV, "NUMREG=NUMREG",1, LF_RMOVIVA,100); //creo un alias per il file LF_MOV
|
// _relmov->add(LF_MOV, "NUMREG=NUMREG",1, LF_RMOVIVA,100); //creo un alias per il file LF_MOV
|
||||||
if (tipo == "E")
|
if (tipo == "E")
|
||||||
{
|
{
|
||||||
_tipo_ini = "C";
|
_tipo_ini = "C";
|
||||||
@ -1754,7 +1860,6 @@ void CG3100_application::init_print(const TMask& msk)
|
|||||||
reset_print();
|
reset_print();
|
||||||
_settata_prima_riga = FALSE;
|
_settata_prima_riga = FALSE;
|
||||||
_tipo_clifo_prec = "";
|
_tipo_clifo_prec = "";
|
||||||
_tipo_clifo_precedente = "";
|
|
||||||
_codcf_prec = 0l;
|
_codcf_prec = 0l;
|
||||||
_numeroregp = 0;
|
_numeroregp = 0;
|
||||||
_documenti = 0;
|
_documenti = 0;
|
||||||
@ -1987,17 +2092,17 @@ void CG3100_application::preprocess_header()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
set_header (++soh,(const char*)sep);
|
set_header (++soh,(const char*)sep);
|
||||||
if (_tipo_lista != fatture)
|
//if (_tipo_lista != fatture)
|
||||||
{
|
//{
|
||||||
sep = "";
|
// sep = "";
|
||||||
set_header (++soh,(const char*)sep);
|
// set_header (++soh,(const char*)sep);
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
int cg3100(int argc, char* argv[])
|
int cg3100(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
CG3100_application a;
|
CG3100_application a;
|
||||||
a.run(argc, argv, "Stampa movimenti");
|
a.run(argc, argv, "Lista movimenti");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
213
cg/cg3100a.uml
213
cg/cg3100a.uml
@ -1,183 +1,193 @@
|
|||||||
#include "cg3100.h"
|
#include "cg3100.h"
|
||||||
|
|
||||||
PAGE "Lista Movimenti" -1 -1 76 20
|
PAGE "" -1 -1 76 20
|
||||||
|
|
||||||
NUMBER F_CODDITTA 5
|
NUMBER F_CODDITTA 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 1 "Ditta "
|
PROMPT 2 1 "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
|
||||||
|
|
||||||
STRING F_RAGSOC 50
|
STRING F_RAGSOC 50
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Ragione sociale "
|
PROMPT 2 2 "Ragione sociale "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
DATE F_DATASTAMPA
|
DATE F_DATASTAMPA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 48 1 "Data stampa "
|
PROMPT 48 1 "Data stampa "
|
||||||
FLAGS "A"
|
FLAGS "A"
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_ANNO 4
|
NUMBER F_ANNO 4
|
||||||
BEGIN
|
BEGIN
|
||||||
GROUP 3
|
GROUP 3
|
||||||
PROMPT 2 3 "Anno esercizio "
|
PROMPT 2 3 "Anno esercizio "
|
||||||
USE ESC
|
USE ESC
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
INPUT CODTAB F_ANNO
|
INPUT CODTAB F_ANNO
|
||||||
DISPLAY "Anno" CODTAB
|
DISPLAY "Anno" CODTAB
|
||||||
DISPLAY "Data inizio esercizio" D0
|
DISPLAY "Data inizio esercizio" D0
|
||||||
DISPLAY "Data fine esercizio" D1
|
DISPLAY "Data fine esercizio" D1
|
||||||
OUTPUT F_ANNO CODTAB
|
OUTPUT F_ANNO CODTAB
|
||||||
FLAGS "RZ"
|
FLAGS "RZ"
|
||||||
END
|
END
|
||||||
|
|
||||||
RADIOBUTTON F_MOVIMENTI 38
|
RADIOBUTTON F_MOVIMENTI 38
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 30 3 "Scelta stampa "
|
PROMPT 30 3 "Scelta stampa "
|
||||||
HELP "Indicare il tipo di stampa"
|
HELP "Indicare il tipo di stampa"
|
||||||
ITEM "0|Lista movimenti"
|
ITEM "0|Lista movimenti"
|
||||||
MESSAGE SHOW,F_CONTROLLO|SHOW,1@|SHOW,F_REGISTROFIN|SHOW,F_REGISTROINI
|
MESSAGE SHOW,F_CONTROLLO|SHOW,F_REGISTROFIN|SHOW,F_REGISTROINI|HIDE,1@|RESET,1@|HIDE,F_STAMPA|RESET,F_STAMPA
|
||||||
ITEM "1|Lista movimenti di sola prima nota"
|
ITEM "1|Lista movimenti di sola prima nota"
|
||||||
MESSAGE HIDE,F_CONTROLLO|HIDE,1@|HIDE,F_REGISTROFIN|HIDE,F_REGISTROINI|HIDE,F_STAMPA
|
MESSAGE HIDE,F_CONTROLLO|RESET,F_CONTROLLO|HIDE,1@|RESET,1@|HIDE,F_REGISTROFIN|RESET,F_REGISTROFIN|HIDE,F_REGISTROINI|RESET,F_REGISTROINI|HIDE,F_STAMPA|RESET,F_STAMPA
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
LIST F_CONTROLLO 23
|
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 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"
|
||||||
ITEM "3|No" MESSAGE HIDE,1@
|
ITEM "3|No" MESSAGE HIDE,1@|RESET,1@|HIDE,F_STAMPA|RESET,F_STAMPA
|
||||||
ITEM "2|Si" MESSAGE SHOW,1@
|
ITEM "2|Si" MESSAGE SHOW,1@|SHOW,F_STAMPA
|
||||||
ITEM "1|Stampa movimenti errati" MESSAGE SHOW,1@
|
ITEM "1|Stampa movimenti errati" MESSAGE SHOW,1@|SHOW,F_STAMPA
|
||||||
END
|
END
|
||||||
|
|
||||||
TEXT DLG_NULL
|
TEXT DLG_NULL
|
||||||
BEGIN
|
BEGIN
|
||||||
GROUP 1
|
GROUP 1
|
||||||
PROMPT 2 8 "Stampa messaggi : "
|
PROMPT 2 8 "Stampa messaggi : "
|
||||||
END
|
END
|
||||||
|
|
||||||
BOOLEAN F_ANNOC
|
BOOLEAN F_ANNOC
|
||||||
BEGIN
|
BEGIN
|
||||||
GROUP 1
|
GROUP 1
|
||||||
PROMPT 20 8 "anno di competenza "
|
PROMPT 20 8 "anno di competenza "
|
||||||
END
|
END
|
||||||
|
|
||||||
BOOLEAN F_ALLEGATO
|
BOOLEAN F_ALLEGATO
|
||||||
BEGIN
|
BEGIN
|
||||||
GROUP 1
|
GROUP 1
|
||||||
PROMPT 20 9 "allegato iva "
|
PROMPT 20 9 "allegato iva "
|
||||||
MESSAGE TRUE DISABLE,F_STAMPA|COPY,F_STAMPA
|
MESSAGE TRUE DISABLE,F_STAMPA|COPY,F_STAMPA
|
||||||
MESSAGE FALSE ENABLE,F_STAMPA
|
MESSAGE FALSE ENABLE,F_STAMPA
|
||||||
END
|
END
|
||||||
|
|
||||||
RADIOBUTTON F_DECIDI 10
|
RADIOBUTTON F_DECIDI 10
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 10 "Stampa "
|
PROMPT 2 10 "Stampa "
|
||||||
ITEM "2|Data" MESSAGE DISABLE,2@|RESET,2@|ENABLE,3@
|
ITEM "2|data" MESSAGE DISABLE,2@|RESET,2@|ENABLE,3@
|
||||||
ITEM "1|Numero" MESSAGE DISABLE,3@|RESET,3@|ENABLE,2@
|
ITEM "1|numero" MESSAGE DISABLE,3@|RESET,3@|ENABLE,2@
|
||||||
END
|
END
|
||||||
|
|
||||||
DATE F_DATAINI
|
DATE F_DATAINI
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 18 11 "Stampa mov. dalla data "
|
PROMPT 19 11 "Stampa mov. dalla data "
|
||||||
GROUP 3
|
//HELP "Se non indicato nessun valore viene effettuata una stampa completa in ordine di data"
|
||||||
|
GROUP 3
|
||||||
END
|
END
|
||||||
|
|
||||||
DATE F_DATAFIN
|
DATE F_DATAFIN
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 54 11 "alla data "
|
PROMPT 55 11 "alla data "
|
||||||
GROUP 3
|
GROUP 3
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_NUMEROINI 7
|
NUMBER F_NUMEROINI 7
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 18 12 "Stampa mov. dal numero "
|
PROMPT 19 12 "Stampa mov. dal numero "
|
||||||
USE LF_MOV KEY 1
|
USE LF_MOV KEY 1
|
||||||
INPUT NUMREG F_NUMEROINI
|
INPUT NUMREG F_NUMEROINI
|
||||||
DISPLAY "Numero registrazione" NUMREG
|
DISPLAY "Numero@6" NUMREG
|
||||||
DISPLAY "Descrizione@50" DESCR
|
DISPLAY "Data@10" DATAREG
|
||||||
OUTPUT F_NUMEROINI NUMREG
|
DISPLAY "Causale" CODCAUS
|
||||||
CHECKTYPE NORMAL
|
DISPLAY "Documento" NUMDOC
|
||||||
FLAGS "R"
|
DISPLAY "Descrizione@50" DESCR
|
||||||
GROUP 2
|
OUTPUT F_NUMEROINI NUMREG
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
FLAGS "R"
|
||||||
|
GROUP 2
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_NUMEROFIN 7
|
NUMBER F_NUMEROFIN 7
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 54 12 "al numero "
|
PROMPT 55 12 "al numero "
|
||||||
COPY USE F_NUMEROINI
|
COPY USE F_NUMEROINI
|
||||||
INPUT NUMREG F_NUMEROFIN
|
INPUT NUMREG F_NUMEROFIN
|
||||||
COPY DISPLAY F_NUMEROINI
|
COPY DISPLAY F_NUMEROINI
|
||||||
OUTPUT F_NUMEROFIN NUMREG
|
OUTPUT F_NUMEROFIN NUMREG
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
GROUP 2
|
GROUP 2
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_CAUSALEINI 3
|
STRING F_CAUSALEINI 3
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 14 "Stampa dalla causale "
|
PROMPT 2 14 "Stampa dalla causale "
|
||||||
USE LF_CAUSALI KEY 1
|
USE LF_CAUSALI KEY 1
|
||||||
INPUT CODCAUS F_CAUSALEINI
|
INPUT CODCAUS F_CAUSALEINI
|
||||||
DISPLAY "Codice causale" CODCAUS
|
DISPLAY "Codice causale" CODCAUS
|
||||||
DISPLAY "Descrizione@50" DESCR
|
DISPLAY "Descrizione@50" DESCR
|
||||||
OUTPUT F_CAUSALEINI CODCAUS
|
OUTPUT F_CAUSALEINI CODCAUS
|
||||||
FLAGS "UR"
|
FLAGS "UR"
|
||||||
HELP "Introdurre codice causale di inizio stampa: vuoto = inizio archivio"
|
HELP "Introdurre codice causale di inizio stampa: vuoto = inizio archivio"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_CAUSALEFIN 3
|
STRING F_CAUSALEFIN 3
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 40 14 "alla causale "
|
PROMPT 40 14 "alla causale "
|
||||||
COPY USE F_CAUSALEINI
|
COPY USE F_CAUSALEINI
|
||||||
INPUT CODCAUS F_CAUSALEFIN
|
INPUT CODCAUS F_CAUSALEFIN
|
||||||
DISPLAY "Codice causale" CODCAUS
|
DISPLAY "Codice causale" CODCAUS
|
||||||
DISPLAY "Descrizione@50" DESCR
|
DISPLAY "Descrizione@50" DESCR
|
||||||
OUTPUT F_CAUSALEFIN CODCAUS
|
OUTPUT F_CAUSALEFIN CODCAUS
|
||||||
FLAGS "UR"
|
FLAGS "UR"
|
||||||
HELP "Introdurre codice causale di fine stampa: vuoto = fine archivio"
|
HELP "Introdurre codice causale di fine stampa: vuoto = fine archivio"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_REGISTROINI 3
|
STRING F_REGISTROINI 3
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 15 "Stampa dal registro iva "
|
PROMPT 2 15 "Stampa dal registro iva "
|
||||||
USE REG SELECT I0<"3"
|
USE REG SELECT I0<"3"
|
||||||
|
//INPUT CODTAB[1,5] F_ANNO SELECT
|
||||||
|
//INPUT CODTAB[1,5] ""
|
||||||
INPUT CODTAB[5,7] F_REGISTROINI
|
INPUT CODTAB[5,7] F_REGISTROINI
|
||||||
DISPLAY "Anno" CODTAB[1,4]
|
DISPLAY "Anno" CODTAB[1,4]
|
||||||
DISPLAY "Cod. registro iva" CODTAB[5,7]
|
DISPLAY "Cod. registro iva" CODTAB[5,7]
|
||||||
DISPLAY "Descrizione@40" S0
|
DISPLAY "Descrizione@40" S0
|
||||||
OUTPUT F_REGISTROINI CODTAB[5,7]
|
OUTPUT F_REGISTROINI CODTAB[5,7]
|
||||||
FLAGS "UR"
|
FLAGS "UR"
|
||||||
|
//CHECKTYPE NORMAL
|
||||||
HELP "Introdurre cod. registro iva di inizio stampa: vuoto = inizio archivio"
|
HELP "Introdurre cod. registro iva di inizio stampa: vuoto = inizio archivio"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_REGISTROFIN 3
|
STRING F_REGISTROFIN 3
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 40 15 "al reg. iva "
|
PROMPT 40 15 "al reg. iva "
|
||||||
COPY USE F_REGISTROINI
|
COPY USE F_REGISTROINI
|
||||||
INPUT CODTAB[5,7] F_REGISTROFIN
|
//INPUT CODTAB[1,5] F_ANNO SELECT
|
||||||
|
//INPUT CODTAB[1,5] ""
|
||||||
|
INPUT CODTAB[5,7] F_REGISTROFIN
|
||||||
DISPLAY "Anno" CODTAB[1,4]
|
DISPLAY "Anno" CODTAB[1,4]
|
||||||
DISPLAY "Cod. registro iva" CODTAB[5,7]
|
DISPLAY "Cod. registro iva" CODTAB[5,7]
|
||||||
DISPLAY "Descrizione@40" S0
|
DISPLAY "Descrizione@40" S0
|
||||||
OUTPUT F_REGISTROFIN CODTAB[5,7]
|
OUTPUT F_REGISTROFIN CODTAB[5,7]
|
||||||
FLAGS "UR"
|
FLAGS "UR"
|
||||||
HELP "Introdurre cod. registro iva di fine stampa: vuoto = fine archivio"
|
//CHECKTYPE NORMAL
|
||||||
|
HELP "Introdurre cod. registro iva di fine stampa: vuoto = fine archivio"
|
||||||
END
|
END
|
||||||
|
|
||||||
BOOLEAN F_STAMPA
|
BOOLEAN F_STAMPA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 16 "Stampa imponibili, imposte e codici iva "
|
PROMPT 2 16 "Stampa imponibili, imposte e codici iva "
|
||||||
END
|
END
|
||||||
|
|
||||||
BOOLEAN F_STAMPAMOVP
|
BOOLEAN F_STAMPAMOVP
|
||||||
@ -185,15 +195,21 @@ BEGIN
|
|||||||
PROMPT 2 17 "Stampa movimenti provvisori "
|
PROMPT 2 17 "Stampa movimenti provvisori "
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_PRINT 9 2
|
/*
|
||||||
|
TEXT DLG_NULL
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -12 -1 "~Stampa"
|
PROMPT 2 17 "N.B. se non indicato nessun valore stampa completa in ordine di data"
|
||||||
MESSAGE EXIT,K_ENTER
|
END
|
||||||
|
*/
|
||||||
|
|
||||||
|
BUTTON DLG_OK 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -12 -1 ""
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_CANCEL 9 2
|
BUTTON DLG_QUIT 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -22 -1 ""
|
PROMPT -22 -1 ""
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
@ -205,3 +221,4 @@ ENDMASK
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,14 +6,14 @@ PAGE "" -1 -1 73 16
|
|||||||
NUMBER F_CODDITTA 5
|
NUMBER F_CODDITTA 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 1 "Ditta "
|
PROMPT 2 1 "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
|
||||||
|
|
||||||
STRING F_RAGSOC 50
|
STRING F_RAGSOC 50
|
||||||
@ -62,7 +62,7 @@ BEGIN
|
|||||||
ITEM "F|Fornitori"
|
ITEM "F|Fornitori"
|
||||||
MESSAGE HIDE,2@|SHOW,1@|RESET,1@
|
MESSAGE HIDE,2@|SHOW,1@|RESET,1@
|
||||||
ITEM "E|Entrambi"
|
ITEM "E|Entrambi"
|
||||||
MESSAGE HIDE,1@|SHOW,2@|CLEAR,2@
|
MESSAGE HIDE,1@|SHOW,2@|RESET,2@
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_CODICEINI 6
|
NUMBER F_CODICEINI 6
|
||||||
@ -136,12 +136,12 @@ BEGIN
|
|||||||
END
|
END
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
BUTTON DLG_OK 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -12 -1 ""
|
PROMPT -12 -1 ""
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_CANCEL 10 2
|
BUTTON DLG_QUIT 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -22 -1 ""
|
PROMPT -22 -1 ""
|
||||||
END
|
END
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
#include "cg3100.h"
|
#include "cg3100.h"
|
||||||
|
|
||||||
PAGE "" -1 -1 76 19
|
PAGE "" -1 -1 76 19
|
||||||
@ -42,34 +43,34 @@ END
|
|||||||
RADIOBUTTON F_DECIDI 10
|
RADIOBUTTON F_DECIDI 10
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 8 "Stampa "
|
PROMPT 2 8 "Stampa "
|
||||||
ITEM "2|Data"
|
ITEM "2|data"
|
||||||
MESSAGE DISABLE,2@|RESET,2@|ENABLE,1@
|
MESSAGE DISABLE,2@|RESET,2@|ENABLE,1@
|
||||||
ITEM "1|Numero"
|
ITEM "1|numero"
|
||||||
MESSAGE DISABLE,1@|RESET,1@|ENABLE,2@
|
MESSAGE DISABLE,1@|RESET,1@|ENABLE,2@
|
||||||
END
|
END
|
||||||
|
|
||||||
DATE F_DATAINI
|
DATE F_DATAINI
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 18 9 "Stampa mov. dalla data "
|
PROMPT 19 9 "Stampa mov. dalla data "
|
||||||
GROUP 1
|
GROUP 1
|
||||||
END
|
END
|
||||||
|
|
||||||
DATE F_DATAFIN
|
DATE F_DATAFIN
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 54 9 "alla data "
|
PROMPT 55 9 "alla data "
|
||||||
GROUP 1
|
GROUP 1
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_NUMEROINI 7
|
NUMBER F_NUMEROINI 7
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 18 10 "Stampa mov. dal numero "
|
PROMPT 19 10 "Stampa mov. dal numero "
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
GROUP 2
|
GROUP 2
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_NUMEROFIN 7
|
NUMBER F_NUMEROFIN 7
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 54 10 "al numero "
|
PROMPT 55 10 "al numero "
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
GROUP 2
|
GROUP 2
|
||||||
END
|
END
|
||||||
@ -89,7 +90,7 @@ BEGIN
|
|||||||
PROMPT -12 -1 ""
|
PROMPT -12 -1 ""
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_CANCEL 9 2
|
BUTTON DLG_QUIT 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -22 -1 ""
|
PROMPT -22 -1 ""
|
||||||
END
|
END
|
||||||
|
243
cg/cg3500.cpp
243
cg/cg3500.cpp
@ -48,7 +48,7 @@ public:
|
|||||||
virtual void preprocess_header();
|
virtual void preprocess_header();
|
||||||
virtual bool preprocess_page(int,int);
|
virtual bool preprocess_page(int,int);
|
||||||
virtual print_action postprocess_page(int,int);
|
virtual print_action postprocess_page(int,int);
|
||||||
virtual print_action postprocess_print(int,int);
|
virtual void postclose_print();
|
||||||
|
|
||||||
bool riepilogo();
|
bool riepilogo();
|
||||||
bool ricerca_cf(TConto&,int,real&,real&);
|
bool ricerca_cf(TConto&,int,real&,real&);
|
||||||
@ -62,7 +62,7 @@ public:
|
|||||||
void setta_riga_totale();
|
void setta_riga_totale();
|
||||||
void get_dati_ditta();
|
void get_dati_ditta();
|
||||||
int stampa_intestazione_ditta();
|
int stampa_intestazione_ditta();
|
||||||
TDate UltimaData(int,int,long,int);
|
TDate UltimaData(int,int,long);
|
||||||
|
|
||||||
CG3500_application() {}
|
CG3500_application() {}
|
||||||
};
|
};
|
||||||
@ -118,6 +118,7 @@ bool CG3500_application::riepilogo()
|
|||||||
}
|
}
|
||||||
_tmp_saldi->write();
|
_tmp_saldi->write();
|
||||||
esiste_conto = TRUE;
|
esiste_conto = TRUE;
|
||||||
|
esiste_sc = FALSE;
|
||||||
cp = conto.conto();
|
cp = conto.conto();
|
||||||
prg_conto_dare = 0.00;
|
prg_conto_dare = 0.00;
|
||||||
prg_conto_avere = 0.00;
|
prg_conto_avere = 0.00;
|
||||||
@ -186,6 +187,7 @@ bool CG3500_application::riepilogo()
|
|||||||
}
|
}
|
||||||
_tmp_saldi->write();
|
_tmp_saldi->write();
|
||||||
esiste_conto = TRUE;
|
esiste_conto = TRUE;
|
||||||
|
esiste_sc = FALSE;
|
||||||
}
|
}
|
||||||
if (esiste_conto)
|
if (esiste_conto)
|
||||||
{
|
{
|
||||||
@ -224,45 +226,49 @@ bool CG3500_application::riepilogo()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// ho trovato un sottoconto
|
// ho trovato un sottoconto
|
||||||
esiste_sc = TRUE;
|
//esiste_sc = TRUE;
|
||||||
prg_dare = 0.00;
|
prg_dare = 0.00;
|
||||||
prg_avere = 0.00;
|
prg_avere = 0.00;
|
||||||
if (_richiesta == 1)
|
if (_richiesta == 1)
|
||||||
sld.prg_attuali(_annoese,conto,indbil,prg_dare,prg_avere);
|
sld.prg_attuali(_annoese,conto,prg_dare,prg_avere);
|
||||||
else sld.prg_mov_eliminati(_annoese,conto,indbil,prg_dare,prg_avere);
|
else sld.prg_mov_eliminati(_annoese,conto,prg_dare,prg_avere);
|
||||||
|
|
||||||
saldo = prg_dare - prg_avere;
|
saldo = prg_dare - prg_avere;
|
||||||
|
|
||||||
prg_conto_dare += prg_dare;
|
prg_conto_dare += prg_dare;
|
||||||
prg_conto_avere += prg_avere;
|
prg_conto_avere += prg_avere;
|
||||||
|
|
||||||
if (_scelta == 1) //riepilogo conti
|
if (prg_dare != ZERO || prg_avere != ZERO)
|
||||||
{
|
{
|
||||||
_tmp_saldi->zero();
|
esiste_sc = TRUE;
|
||||||
_tmp_saldi->put(SLD_GRUPPO,conto.gruppo());
|
if (_scelta == 1) //riepilogo conti
|
||||||
_tmp_saldi->put(SLD_CONTO,conto.conto());
|
|
||||||
_tmp_saldi->put(SLD_SOTTOCONTO,conto.sottoconto());
|
|
||||||
_tmp_saldi->put(SLD_ANNOES,_annoese);
|
|
||||||
_tmp_saldi->put(SLD_FLAGSALINI,tipo_conto);
|
|
||||||
_tmp_saldi->put(SLD_PDARE,prg_dare);
|
|
||||||
_tmp_saldi->put(SLD_PAVERE,prg_avere);
|
|
||||||
if (saldo > 0.00) //va stampato in Dare
|
|
||||||
_tmp_saldi->put(SLD_PDARESCA,saldo);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
saldo = saldo * (-1.00);
|
_tmp_saldi->zero();
|
||||||
_tmp_saldi->put(SLD_PAVERESCA,saldo);
|
_tmp_saldi->put(SLD_GRUPPO,conto.gruppo());
|
||||||
|
_tmp_saldi->put(SLD_CONTO,conto.conto());
|
||||||
|
_tmp_saldi->put(SLD_SOTTOCONTO,conto.sottoconto());
|
||||||
|
_tmp_saldi->put(SLD_ANNOES,_annoese);
|
||||||
|
_tmp_saldi->put(SLD_FLAGSALINI,tipo_conto);
|
||||||
|
_tmp_saldi->put(SLD_PDARE,prg_dare);
|
||||||
|
_tmp_saldi->put(SLD_PAVERE,prg_avere);
|
||||||
|
if (saldo > 0.00) //va stampato in Dare
|
||||||
|
_tmp_saldi->put(SLD_PDARESCA,saldo);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
saldo = saldo * (-1.00);
|
||||||
|
_tmp_saldi->put(SLD_PAVERESCA,saldo);
|
||||||
|
}
|
||||||
|
_tmp_saldi->write();
|
||||||
|
}
|
||||||
|
if (_scelta == 2)
|
||||||
|
{
|
||||||
|
_ultima_data = UltimaData(conto.gruppo(),conto.conto(),conto.sottoconto());
|
||||||
|
_udata_max = fnc_max(_udata_max,_ultima_data);
|
||||||
}
|
}
|
||||||
_tmp_saldi->write();
|
|
||||||
}
|
|
||||||
if (_scelta == 2)
|
|
||||||
{
|
|
||||||
_ultima_data = UltimaData(conto.gruppo(),conto.conto(),conto.sottoconto(),_annoese);
|
|
||||||
_udata_max = fnc_max(_udata_max,_ultima_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
gp = conto.gruppo();
|
gp = conto.gruppo();
|
||||||
cp = conto.conto();
|
cp = conto.conto();
|
||||||
|
}
|
||||||
|
|
||||||
TRecnotype recnum = _pcn->recno();
|
TRecnotype recnum = _pcn->recno();
|
||||||
_pcn->next();
|
_pcn->next();
|
||||||
@ -271,40 +277,47 @@ bool CG3500_application::riepilogo()
|
|||||||
saldo_conto = prg_conto_dare - prg_conto_avere;
|
saldo_conto = prg_conto_dare - prg_conto_avere;
|
||||||
prg_gruppo_dare += prg_conto_dare;
|
prg_gruppo_dare += prg_conto_dare;
|
||||||
prg_gruppo_avere += prg_conto_avere;
|
prg_gruppo_avere += prg_conto_avere;
|
||||||
//scrivo il record del conto;
|
if (esiste_sc)
|
||||||
_tmp_saldi->zero();
|
|
||||||
_tmp_saldi->put(SLD_GRUPPO,gp);
|
|
||||||
_tmp_saldi->put(SLD_CONTO,cp);
|
|
||||||
_tmp_saldi->put(SLD_SOTTOCONTO,0L);
|
|
||||||
_tmp_saldi->put(SLD_ANNOES,_annoese);
|
|
||||||
_tmp_saldi->put(SLD_DATAULMOV,_udata_max);
|
|
||||||
_tmp_saldi->put(SLD_PDARE,prg_conto_dare);
|
|
||||||
_tmp_saldi->put(SLD_PAVERE,prg_conto_avere);
|
|
||||||
if (saldo_conto > 0.00) //va stampato in Dare
|
|
||||||
_tmp_saldi->put(SLD_PDARESCA,saldo_conto);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
saldo_conto = saldo_conto * (-1.00);
|
esiste_conto = TRUE;
|
||||||
_tmp_saldi->put(SLD_PAVERESCA,saldo_conto);
|
//scrivo il record del conto;
|
||||||
|
_tmp_saldi->zero();
|
||||||
|
_tmp_saldi->put(SLD_GRUPPO,gp);
|
||||||
|
_tmp_saldi->put(SLD_CONTO,cp);
|
||||||
|
_tmp_saldi->put(SLD_SOTTOCONTO,0L);
|
||||||
|
_tmp_saldi->put(SLD_ANNOES,_annoese);
|
||||||
|
_tmp_saldi->put(SLD_DATAULMOV,_udata_max);
|
||||||
|
_tmp_saldi->put(SLD_PDARE,prg_conto_dare);
|
||||||
|
_tmp_saldi->put(SLD_PAVERE,prg_conto_avere);
|
||||||
|
if (saldo_conto > 0.00) //va stampato in Dare
|
||||||
|
_tmp_saldi->put(SLD_PDARESCA,saldo_conto);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
saldo_conto = saldo_conto * (-1.00);
|
||||||
|
_tmp_saldi->put(SLD_PAVERESCA,saldo_conto);
|
||||||
|
}
|
||||||
|
_tmp_saldi->write();
|
||||||
}
|
}
|
||||||
_tmp_saldi->write();
|
|
||||||
saldo_gruppo = prg_gruppo_dare - prg_gruppo_avere;
|
saldo_gruppo = prg_gruppo_dare - prg_gruppo_avere;
|
||||||
//scrivo il record del gruppo
|
if (esiste_conto)
|
||||||
_tmp_saldi->zero();
|
|
||||||
_tmp_saldi->put(SLD_GRUPPO,gp);
|
|
||||||
_tmp_saldi->put(SLD_CONTO,0);
|
|
||||||
_tmp_saldi->put(SLD_SOTTOCONTO,0L);
|
|
||||||
_tmp_saldi->put(SLD_ANNOES,_annoese);
|
|
||||||
_tmp_saldi->put(SLD_PDARE,prg_gruppo_dare);
|
|
||||||
_tmp_saldi->put(SLD_PAVERE,prg_gruppo_avere);
|
|
||||||
if (saldo_gruppo > 0.00) //va stampato in Dare
|
|
||||||
_tmp_saldi->put(SLD_PDARESCA,saldo_gruppo);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
saldo_gruppo = saldo_gruppo * (-1.00);
|
//scrivo il record del gruppo
|
||||||
_tmp_saldi->put(SLD_PAVERESCA,saldo_gruppo);
|
_tmp_saldi->zero();
|
||||||
}
|
_tmp_saldi->put(SLD_GRUPPO,gp);
|
||||||
_tmp_saldi->write();
|
_tmp_saldi->put(SLD_CONTO,0);
|
||||||
|
_tmp_saldi->put(SLD_SOTTOCONTO,0L);
|
||||||
|
_tmp_saldi->put(SLD_ANNOES,_annoese);
|
||||||
|
_tmp_saldi->put(SLD_PDARE,prg_gruppo_dare);
|
||||||
|
_tmp_saldi->put(SLD_PAVERE,prg_gruppo_avere);
|
||||||
|
if (saldo_gruppo > 0.00) //va stampato in Dare
|
||||||
|
_tmp_saldi->put(SLD_PDARESCA,saldo_gruppo);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
saldo_gruppo = saldo_gruppo * (-1.00);
|
||||||
|
_tmp_saldi->put(SLD_PAVERESCA,saldo_gruppo);
|
||||||
|
}
|
||||||
|
_tmp_saldi->write();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_pcn->readat(recnum);
|
_pcn->readat(recnum);
|
||||||
}
|
}
|
||||||
@ -328,42 +341,47 @@ bool CG3500_application::ricerca_cf(TConto& conto,int indbil,real& prg_conto_dar
|
|||||||
for (int i = 0; i < items; i++)
|
for (int i = 0; i < items; i++)
|
||||||
{
|
{
|
||||||
_prog->addstatus(1);
|
_prog->addstatus(1);
|
||||||
const TRectype& r = _lista->saldi(i);
|
const TRectype* r = _lista->saldi();
|
||||||
s = r.get_long(SLD_SOTTOCONTO);
|
s = r->get_long(SLD_SOTTOCONTO);
|
||||||
esiste_sc = TRUE;
|
|
||||||
prg_dare = 0.00;
|
prg_dare = 0.00;
|
||||||
prg_avere = 0.00;
|
prg_avere = 0.00;
|
||||||
conto.set(g, c, s, tipo); //aggiunge a conto s
|
conto.set(g, c, s, tipo); //aggiunge a conto s
|
||||||
if (_richiesta == 1)
|
if (_richiesta == 1)
|
||||||
sld.prg_attuali(_annoese,conto,indbil,prg_dare,prg_avere);
|
sld.prg_attuali(_annoese,conto,prg_dare,prg_avere);
|
||||||
else sld.prg_mov_eliminati(_annoese,conto,indbil,prg_dare,prg_avere);
|
else sld.prg_mov_eliminati(_annoese,conto,prg_dare,prg_avere);
|
||||||
|
|
||||||
saldo = prg_dare - prg_avere;
|
saldo = prg_dare - prg_avere;
|
||||||
prg_conto_dare += prg_dare;
|
prg_conto_dare += prg_dare;
|
||||||
prg_conto_avere += prg_avere;
|
prg_conto_avere += prg_avere;
|
||||||
if (_scelta == 1)
|
|
||||||
|
if (prg_dare != ZERO || prg_avere != ZERO)
|
||||||
{
|
{
|
||||||
_tmp_saldi->zero();
|
esiste_sc = TRUE;
|
||||||
_tmp_saldi->put(SLD_GRUPPO,g);
|
if (_scelta == 1)
|
||||||
_tmp_saldi->put(SLD_CONTO,c);
|
|
||||||
_tmp_saldi->put(SLD_SOTTOCONTO,s);
|
|
||||||
_tmp_saldi->put(SLD_ANNOES,_annoese);
|
|
||||||
_tmp_saldi->put(SLD_FLAGSALINI,tipo);
|
|
||||||
_tmp_saldi->put(SLD_PDARE,prg_dare);
|
|
||||||
_tmp_saldi->put(SLD_PAVERE,prg_avere);
|
|
||||||
if (saldo > 0.00) //va stampato in Dare
|
|
||||||
_tmp_saldi->put(SLD_PDARESCA,saldo);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
saldo = saldo * (-1.00);
|
_tmp_saldi->zero();
|
||||||
_tmp_saldi->put(SLD_PAVERESCA,saldo);
|
_tmp_saldi->put(SLD_GRUPPO,g);
|
||||||
|
_tmp_saldi->put(SLD_CONTO,c);
|
||||||
|
_tmp_saldi->put(SLD_SOTTOCONTO,s);
|
||||||
|
_tmp_saldi->put(SLD_ANNOES,_annoese);
|
||||||
|
_tmp_saldi->put(SLD_FLAGSALINI,tipo);
|
||||||
|
_tmp_saldi->put(SLD_PDARE,prg_dare);
|
||||||
|
_tmp_saldi->put(SLD_PAVERE,prg_avere);
|
||||||
|
if (saldo > 0.00) //va stampato in Dare
|
||||||
|
_tmp_saldi->put(SLD_PDARESCA,saldo);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
saldo = saldo * (-1.00);
|
||||||
|
_tmp_saldi->put(SLD_PAVERESCA,saldo);
|
||||||
|
}
|
||||||
|
_tmp_saldi->write();
|
||||||
}
|
}
|
||||||
_tmp_saldi->write();
|
if (_scelta == 2)
|
||||||
}
|
{
|
||||||
if (_scelta == 2)
|
_ultima_data = UltimaData(conto.gruppo(),conto.conto(),conto.sottoconto());
|
||||||
{
|
_udata_max = fnc_max(_udata_max,_ultima_data);
|
||||||
_ultima_data = UltimaData(conto.gruppo(),conto.conto(),conto.sottoconto(),_annoese);
|
}
|
||||||
_udata_max = fnc_max(_udata_max,_ultima_data);
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
delete _lista;
|
delete _lista;
|
||||||
return esiste_sc;
|
return esiste_sc;
|
||||||
@ -386,7 +404,12 @@ tipo CG3500_application::leggi_conti(int counter)
|
|||||||
{
|
{
|
||||||
TRecnotype pos;
|
TRecnotype pos;
|
||||||
|
|
||||||
if (counter == 0) _eof = _tmp_saldi->first();
|
if (counter == 0)
|
||||||
|
{
|
||||||
|
_eof = _tmp_saldi->first();
|
||||||
|
if (_eof)
|
||||||
|
return fine;
|
||||||
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -419,7 +442,7 @@ tipo CG3500_application::leggi_conti(int counter)
|
|||||||
|
|
||||||
if (_eof)
|
if (_eof)
|
||||||
{
|
{
|
||||||
_ultima_data = UltimaData(_gcorr,_ccorr,_scorr,_annoese);
|
_ultima_data = UltimaData(_gcorr,_ccorr,_scorr);
|
||||||
_tmp_saldi->readat(pos);
|
_tmp_saldi->readat(pos);
|
||||||
_tipo = _tmp_saldi->get_char(SLD_FLAGSALINI);
|
_tipo = _tmp_saldi->get_char(SLD_FLAGSALINI);
|
||||||
if (_tipo != 'C' && _tipo != 'F')
|
if (_tipo != 'C' && _tipo != 'F')
|
||||||
@ -443,7 +466,7 @@ tipo CG3500_application::leggi_conti(int counter)
|
|||||||
_cprec = _ccorr;
|
_cprec = _ccorr;
|
||||||
}
|
}
|
||||||
|
|
||||||
_ultima_data = UltimaData(_gcorr,_ccorr,_scorr,_annoese);
|
_ultima_data = UltimaData(_gcorr,_ccorr,_scorr);
|
||||||
_tmp_saldi->readat(pos);
|
_tmp_saldi->readat(pos);
|
||||||
_tipo = _tmp_saldi->get_char(SLD_FLAGSALINI);
|
_tipo = _tmp_saldi->get_char(SLD_FLAGSALINI);
|
||||||
if (_tipo != 'C' && _tipo != 'F')
|
if (_tipo != 'C' && _tipo != 'F')
|
||||||
@ -463,7 +486,12 @@ tipo CG3500_application::leggi_gruppi(int counter)
|
|||||||
{
|
{
|
||||||
TRecnotype pos;
|
TRecnotype pos;
|
||||||
|
|
||||||
if (counter == 0) _eof = _tmp_saldi->first();
|
if (counter == 0)
|
||||||
|
{
|
||||||
|
_eof = _tmp_saldi->first();
|
||||||
|
if (_eof)
|
||||||
|
return fine;
|
||||||
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -584,7 +612,11 @@ bool CG3500_application::preprocess_page(int file, int counter)
|
|||||||
_tp = leggi_conti(counter);
|
_tp = leggi_conti(counter);
|
||||||
if (_scelta == 2)
|
if (_scelta == 2)
|
||||||
_tp = leggi_gruppi(counter);
|
_tp = leggi_gruppi(counter);
|
||||||
if (_tp == fine)
|
|
||||||
|
if (_tp == fine && counter == 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (_tp == fine)
|
||||||
{
|
{
|
||||||
if (_scelta == 1)
|
if (_scelta == 1)
|
||||||
setta_riga_sottoconto();
|
setta_riga_sottoconto();
|
||||||
@ -605,11 +637,11 @@ bool CG3500_application::preprocess_page(int file, int counter)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_action CG3500_application::postprocess_print(int file, int counter)
|
void CG3500_application::postclose_print()
|
||||||
{
|
{
|
||||||
_tmp_saldi->close();
|
_tmp_saldi->close();
|
||||||
|
|
||||||
return NEXT_PAGE;
|
//return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_action CG3500_application::postprocess_page(int file, int counter)
|
print_action CG3500_application::postprocess_page(int file, int counter)
|
||||||
@ -625,7 +657,8 @@ void CG3500_application::setta_riga_sottoconto()
|
|||||||
TString udata = _ultima_data.string();
|
TString udata = _ultima_data.string();
|
||||||
|
|
||||||
set_row(1,"%06ld", _scorr);
|
set_row(1,"%06ld", _scorr);
|
||||||
set_row(1,"@i %.32s@r",(const char*) _descr);
|
//set_row(1,"@i %.32s@r",(const char*) _descr);
|
||||||
|
set_row(1," %.32s@r",(const char*) _descr);
|
||||||
set_row(1,"@42g%s",(const char*) udata);
|
set_row(1,"@42g%s",(const char*) udata);
|
||||||
set_row(1,"@57g%r@77g%r@97g%r@117g%r",&_prg_dare,&_prg_avere,&_saldo_dare,&_saldo_avere);
|
set_row(1,"@57g%r@77g%r@97g%r@117g%r",&_prg_dare,&_prg_avere,&_saldo_dare,&_saldo_avere);
|
||||||
}
|
}
|
||||||
@ -642,13 +675,16 @@ void CG3500_application::setta_riga_conto()
|
|||||||
if (_scelta == 1)
|
if (_scelta == 1)
|
||||||
{
|
{
|
||||||
set_row(r++,"%s",(const char*)riga);
|
set_row(r++,"%s",(const char*)riga);
|
||||||
set_row(r,"@b**** Totali conto %03d.%03d",_gconto,_cconto);
|
set_row(r,"**** Totali conto %03d.%03d",_gconto,_cconto);
|
||||||
set_row(r,"@i %.27s@r",(const char*)_descrconto);
|
// set_row(r,"@i %.27s@r",(const char*)_descrconto);
|
||||||
|
set_row(r," %.27s@r",(const char*)_descrconto);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (_scelta == 2)
|
if (_scelta == 2)
|
||||||
{
|
{
|
||||||
set_row(r,"%03d", _ccorr);
|
set_row(r,"%03d", _ccorr);
|
||||||
set_row(r,"@i %.32s@r",(const char*)_descrconto);
|
//set_row(r,"@i %.32s@r",(const char*)_descrconto);
|
||||||
|
set_row(r," %.32s@r",(const char*)_descrconto);
|
||||||
set_row(r,"@42g%s",(const char*)udata);
|
set_row(r,"@42g%s",(const char*)udata);
|
||||||
}
|
}
|
||||||
set_row(r++,"@57g%r@77g%r@97g%r@117g%r",&_prg_dare_conto,&_prg_avere_conto,&_saldo_dare_conto,&_saldo_avere_conto);
|
set_row(r++,"@57g%r@77g%r@97g%r@117g%r",&_prg_dare_conto,&_prg_avere_conto,&_saldo_dare_conto,&_saldo_avere_conto);
|
||||||
@ -668,8 +704,9 @@ void CG3500_application::setta_riga_gruppo()
|
|||||||
if (_scelta == 2)
|
if (_scelta == 2)
|
||||||
if (_tp == fine) r = 3;
|
if (_tp == fine) r = 3;
|
||||||
else r = 2;
|
else r = 2;
|
||||||
set_row(r,"@b**** TOTALI GRUPPO %03d-",_ggruppo);
|
set_row(r,"**** TOTALI GRUPPO %03d-",_ggruppo);
|
||||||
set_row(r,"@i %.30s@r",(const char*)_descrgruppo);
|
//set_row(r,"@i %.30s@r",(const char*)_descrgruppo);
|
||||||
|
set_row(r," %.30s@r",(const char*)_descrgruppo);
|
||||||
set_row(r++,"@57g%r@77g%r@97g%r@117g%r",&_prg_dare_gruppo,&_prg_avere_gruppo,&_saldo_dare_gruppo,&_saldo_avere_gruppo);
|
set_row(r++,"@57g%r@77g%r@97g%r@117g%r",&_prg_dare_gruppo,&_prg_avere_gruppo,&_saldo_dare_gruppo,&_saldo_avere_gruppo);
|
||||||
set_row(r++,"%s",(const char*)riga);
|
set_row(r++,"%s",(const char*)riga);
|
||||||
riga = "";
|
riga = "";
|
||||||
@ -683,7 +720,7 @@ void CG3500_application::setta_riga_totale()
|
|||||||
_saldo_tot = _prg_dare_tot - _prg_avere_tot;
|
_saldo_tot = _prg_dare_tot - _prg_avere_tot;
|
||||||
if (_scelta == 1) r = 8;
|
if (_scelta == 1) r = 8;
|
||||||
else r = 6;
|
else r = 6;
|
||||||
set_row(r,"@b**** TOTALE GENERALE @57g%r@77g%r",&_prg_dare_tot,&_prg_avere_tot);
|
set_row(r,"**** TOTALE GENERALE @57g%r@77g%r",&_prg_dare_tot,&_prg_avere_tot);
|
||||||
if (_saldo_tot > 0.00)
|
if (_saldo_tot > 0.00)
|
||||||
set_row(r,"@97g%r",&_saldo_tot);
|
set_row(r,"@97g%r",&_saldo_tot);
|
||||||
else
|
else
|
||||||
@ -693,14 +730,14 @@ void CG3500_application::setta_riga_totale()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TDate CG3500_application::UltimaData(int g, int c, long s, int anno)
|
TDate CG3500_application::UltimaData(int g, int c, long s)
|
||||||
{
|
{
|
||||||
TLocalisamfile saldi(LF_SALDI, FALSE); //il parametro a false permette di usare un record corrente del file saldi differente a quello del file temporaneo
|
TLocalisamfile saldi(LF_SALDI, FALSE); //il parametro a false permette di usare un record corrente del file saldi differente a quello del file temporaneo
|
||||||
TDate uldata;
|
TDate uldata;
|
||||||
|
|
||||||
saldi.zero();
|
saldi.zero();
|
||||||
if (_annoese != 0)
|
if (_annoese != 0)
|
||||||
saldi.put(SLD_ANNOES, anno);
|
saldi.put(SLD_ANNOES, _annoese);
|
||||||
saldi.put(SLD_GRUPPO,g);
|
saldi.put(SLD_GRUPPO,g);
|
||||||
if (c != 0)
|
if (c != 0)
|
||||||
saldi.put(SLD_CONTO, c);
|
saldi.put(SLD_CONTO, c);
|
||||||
@ -828,7 +865,7 @@ int CG3500_application::stampa_intestazione_ditta()
|
|||||||
get_dati_ditta();
|
get_dati_ditta();
|
||||||
codice_ditta << get_firm();
|
codice_ditta << get_firm();
|
||||||
|
|
||||||
set_header (r, "Ditta %s %s Via %s %s %s %s", (const char*)codice_ditta,
|
set_header (r, "Ditta %s %s %s %s %s %s", (const char*)codice_ditta,
|
||||||
(const char*)_ragsoc, (const char*)_viafis,
|
(const char*)_ragsoc, (const char*)_viafis,
|
||||||
(const char*)_cap, (const char*)_comunefis,
|
(const char*)_cap, (const char*)_comunefis,
|
||||||
(const char*)_provfis);
|
(const char*)_provfis);
|
||||||
|
@ -544,7 +544,8 @@ void CG4600_application::costi()
|
|||||||
|
|
||||||
numrig++;
|
numrig++;
|
||||||
s = _saldi->get_long(SLD_SOTTOCONTO);
|
s = _saldi->get_long(SLD_SOTTOCONTO);
|
||||||
sale.calcola_ultima_immissione(_annoesch,0,g,c,s,indbil);
|
//sale.calcola_ultima_immissione(_annoesch,0,g,c,s,indbil);
|
||||||
|
sale.ultima_immissione_bilancio(_annoesch,g,c,s,indbil);
|
||||||
_saldo = sale.saldo();
|
_saldo = sale.saldo();
|
||||||
|
|
||||||
if (_saldo.is_zero()) continue;
|
if (_saldo.is_zero()) continue;
|
||||||
@ -674,7 +675,8 @@ void CG4600_application::ricavi()
|
|||||||
|
|
||||||
numrig++;
|
numrig++;
|
||||||
s = _saldi->get_long(SLD_SOTTOCONTO);
|
s = _saldi->get_long(SLD_SOTTOCONTO);
|
||||||
sale.calcola_ultima_immissione(_annoesch,0,g,c,s,indbil);
|
//sale.calcola_ultima_immissione(_annoesch,0,g,c,s,indbil);
|
||||||
|
sale.ultima_immissione_bilancio(_annoesch,g,c,s,indbil);
|
||||||
_saldo = sale.saldo();
|
_saldo = sale.saldo();
|
||||||
|
|
||||||
if (_saldo.is_zero()) continue;
|
if (_saldo.is_zero()) continue;
|
||||||
@ -995,7 +997,8 @@ void CG4600_application::attivita()
|
|||||||
|
|
||||||
numrig++;
|
numrig++;
|
||||||
s = _saldi->get_long(SLD_SOTTOCONTO);
|
s = _saldi->get_long(SLD_SOTTOCONTO);
|
||||||
sale.calcola_ultima_immissione(_annoesch,0,g,c,s,indbil);
|
//sale.calcola_ultima_immissione(_annoesch,0,g,c,s,indbil);
|
||||||
|
sale.ultima_immissione_bilancio(_annoesch,g,c,s,indbil);
|
||||||
_saldo = sale.saldo();
|
_saldo = sale.saldo();
|
||||||
|
|
||||||
if (_saldo == ZERO) continue;
|
if (_saldo == ZERO) continue;
|
||||||
@ -1180,7 +1183,8 @@ void CG4600_application::passivita()
|
|||||||
|
|
||||||
numrig++;
|
numrig++;
|
||||||
s = _saldi->get_long(SLD_SOTTOCONTO);
|
s = _saldi->get_long(SLD_SOTTOCONTO);
|
||||||
sale.calcola_ultima_immissione(_annoesch,0,g,c,s,indbil);
|
//sale.calcola_ultima_immissione(_annoesch,0,g,c,s,indbil);
|
||||||
|
sale.ultima_immissione_bilancio(_annoesch,g,c,s,indbil);
|
||||||
_saldo = sale.saldo();
|
_saldo = sale.saldo();
|
||||||
|
|
||||||
if (_saldo.is_zero()) continue;
|
if (_saldo.is_zero()) continue;
|
||||||
|
@ -57,13 +57,13 @@ END
|
|||||||
NUMBER F_ANNOCH 4
|
NUMBER F_ANNOCH 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 69 4 ""
|
PROMPT 69 4 ""
|
||||||
FLAGS "D"
|
FLAGS "RZD"
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_ANNO 4
|
NUMBER F_ANNO 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 69 5 ""
|
PROMPT 69 5 ""
|
||||||
FLAGS "D"
|
FLAGS "RZD"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
|
1032
cg/cg5200.cpp
1032
cg/cg5200.cpp
File diff suppressed because it is too large
Load Diff
22
cg/cg5200.h
22
cg/cg5200.h
@ -1,11 +1,11 @@
|
|||||||
#define F_ANNO 101
|
#define F_ANNO 101
|
||||||
#define F_TIPOCF 102
|
#define F_TIPOCF 102
|
||||||
#define F_GRUPPO 103
|
#define F_GRUPPO 103
|
||||||
#define F_CONTO 104
|
#define F_CONTO 104
|
||||||
#define F_SOTTOCONTO 105
|
#define F_SOTTOCONTO 105
|
||||||
#define F_DESCR_CONTO 106
|
#define F_DESCR_CONTO 106
|
||||||
#define F_SOTTOC_CLIENTE 107
|
#define F_SOTTOC_CLIENTE 107
|
||||||
#define F_DESCR_CLIENTE 108
|
#define F_DESCR_CLIENTE 108
|
||||||
#define F_SOTTOC_FORN 109
|
#define F_SOTTOC_FORN 109
|
||||||
#define F_DESCR_FORN 110
|
#define F_DESCR_FORN 110
|
||||||
#define F_SHEET_SALDI 111
|
#define F_SHEET_SALDI 111
|
||||||
|
717
cg/cg5200a.uml
717
cg/cg5200a.uml
@ -1,340 +1,377 @@
|
|||||||
#include "cg5200.h"
|
#include "cg5200.h"
|
||||||
|
|
||||||
TOOLBAR "" 0 20 0 2
|
TOOLBAR "" 0 20 0 2
|
||||||
|
|
||||||
#include <browbar.h>
|
#include <browbar.h>
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Visualizzazione saldi" -1 -1 78 18
|
PAGE "Visualizzazione saldi" -1 -1 78 18
|
||||||
|
|
||||||
NUMBER F_ANNO 4
|
NUMBER F_ANNO 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 1 "Anno esercizio "
|
PROMPT 4 1 "Anno esercizio "
|
||||||
KEY 1
|
KEY 1
|
||||||
USE ESC
|
USE ESC
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
INPUT CODTAB[1,4] F_ANNO
|
INPUT CODTAB[1,4] F_ANNO
|
||||||
DISPLAY "Anno" CODTAB[1,4]
|
DISPLAY "Anno" CODTAB[1,4]
|
||||||
DISPLAY "Data inizio esercizio" D0
|
DISPLAY "Data inizio esercizio" D0
|
||||||
DISPLAY "Data fine esercizio" D1
|
DISPLAY "Data fine esercizio" D1
|
||||||
OUTPUT F_ANNO CODTAB[1,4]
|
OUTPUT F_ANNO CODTAB[1,4]
|
||||||
FLAGS "RZ"
|
FLAGS "RZ"
|
||||||
END
|
END
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 73 4
|
GROUPBOX DLG_NULL 73 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 3 2 ""
|
PROMPT 3 2 ""
|
||||||
//FLAGS "R"
|
//FLAGS "R"
|
||||||
END
|
END
|
||||||
|
|
||||||
LIST F_TIPOCF 9
|
LIST F_TIPOCF 9
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 3 "Tipo "
|
PROMPT 4 3 "Tipo "
|
||||||
FLAGS "U"
|
FLAGS "U"
|
||||||
ITEM " |Conto" MESSAGE HIDE,2@|HIDE,3@|SHOW,1@
|
ITEM " |Conto" MESSAGE HIDE,2@|HIDE,3@|SHOW,1@
|
||||||
ITEM "C|Cliente" MESSAGE HIDE,1@|HIDE,3@|SHOW,2@
|
ITEM "C|Cliente" MESSAGE HIDE,1@|HIDE,3@|SHOW,2@
|
||||||
ITEM "F|Fornitore" MESSAGE HIDE,1@|HIDE,2@|SHOW,3@
|
ITEM "F|Fornitore" MESSAGE HIDE,1@|HIDE,2@|SHOW,3@
|
||||||
KEY 1
|
KEY 1
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_GRUPPO 3
|
NUMBER F_GRUPPO 3
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 26 3 "Gruppo "
|
PROMPT 26 3 "Gruppo "
|
||||||
USE LF_PCON KEY 1 SELECT CONTO=""
|
USE LF_PCON KEY 1 SELECT CONTO=""
|
||||||
FIELD LF_PCON->GRUPPO
|
FIELD LF_PCON->GRUPPO
|
||||||
KEY 1
|
KEY 1
|
||||||
INPUT GRUPPO F_GRUPPO
|
INPUT GRUPPO F_GRUPPO
|
||||||
DISPLAY "Gruppo" GRUPPO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Descrizione@50" DESCR
|
DISPLAY "Descrizione@50" DESCR
|
||||||
OUTPUT F_GRUPPO GRUPPO
|
OUTPUT F_GRUPPO GRUPPO
|
||||||
CHECKTYPE NORMAL
|
OUTPUT F_DESCR_CONTO DESCR
|
||||||
FLAGS "R"
|
CHECKTYPE NORMAL
|
||||||
END
|
FLAGS "R"
|
||||||
|
END
|
||||||
NUMBER F_CONTO 3
|
|
||||||
BEGIN
|
NUMBER F_CONTO 3
|
||||||
PROMPT 40 3 "Conto "
|
BEGIN
|
||||||
USE LF_PCON SELECT (CONTO!="") && (SOTTOCONTO="")
|
PROMPT 40 3 "Conto "
|
||||||
FIELD LF_PCON->CONTO
|
USE LF_PCON SELECT (CONTO!="") && (SOTTOCONTO="")
|
||||||
KEY 1
|
FIELD LF_PCON->CONTO
|
||||||
INPUT GRUPPO F_GRUPPO
|
KEY 1
|
||||||
INPUT CONTO F_CONTO
|
INPUT GRUPPO F_GRUPPO
|
||||||
DISPLAY "Gruppo" GRUPPO
|
INPUT CONTO F_CONTO
|
||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Descrizione@50" DESCR
|
DISPLAY "Conto" CONTO
|
||||||
OUTPUT F_TIPOCF TMCF
|
DISPLAY "Descrizione@50" DESCR
|
||||||
OUTPUT F_GRUPPO GRUPPO
|
OUTPUT F_TIPOCF TMCF
|
||||||
OUTPUT F_CONTO CONTO
|
OUTPUT F_GRUPPO GRUPPO
|
||||||
OUTPUT F_DESCR_CONTO DESCR
|
OUTPUT F_CONTO CONTO
|
||||||
FLAGS "R"
|
//OUTPUT F_DESCR_CLIENTE DESCR
|
||||||
CHECKTYPE NORMAL
|
//OUTPUT F_DESCR_FORN DESCR
|
||||||
WARNING "Conto inesistente o mancante"
|
OUTPUT F_DESCR_CONTO DESCR
|
||||||
//MESSAGE DIRTY,F_SOTTOCONTO|DIRTY,F_SOTTOC_CLIENTE|DIRTY,F_SOTTOC_FORN
|
FLAGS "R"
|
||||||
END
|
CHECKTYPE NORMAL
|
||||||
|
WARNING "Conto inesistente o mancante"
|
||||||
NUMBER F_SOTTOCONTO 6
|
//MESSAGE DIRTY,F_SOTTOCONTO|DIRTY,F_SOTTOC_CLIENTE|DIRTY,F_SOTTOC_FORN
|
||||||
BEGIN
|
MESSAGE DIRTY,F_DESCR_CONTO|DIRTY,F_DESCR_CLIENTE|DIRTY,F_DESCR_FORN
|
||||||
PROMPT 54 3 "Sottoconto "
|
END
|
||||||
USE LF_PCON SELECT SOTTOCONTO!=""
|
|
||||||
FIELD LF_PCON->SOTTOCONTO
|
NUMBER F_SOTTOCONTO 6
|
||||||
KEY 1
|
BEGIN
|
||||||
INPUT GRUPPO F_GRUPPO
|
PROMPT 54 3 "Sottoconto "
|
||||||
INPUT CONTO F_CONTO
|
USE LF_PCON
|
||||||
INPUT SOTTOCONTO F_SOTTOCONTO
|
FIELD LF_PCON->SOTTOCONTO
|
||||||
DISPLAY "Gruppo" GRUPPO
|
KEY 1
|
||||||
DISPLAY "Conto" CONTO
|
INPUT GRUPPO F_GRUPPO
|
||||||
DISPLAY "Sottoconto" SOTTOCONTO
|
INPUT CONTO F_CONTO
|
||||||
DISPLAY "Descrizione@50" DESCR
|
INPUT SOTTOCONTO F_SOTTOCONTO
|
||||||
OUTPUT F_GRUPPO GRUPPO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
OUTPUT F_CONTO CONTO
|
DISPLAY "Conto" CONTO
|
||||||
OUTPUT F_SOTTOCONTO SOTTOCONTO
|
DISPLAY "Sottoconto" SOTTOCONTO
|
||||||
OUTPUT F_DESCR_CONTO DESCR
|
DISPLAY "Descrizione@50" DESCR
|
||||||
//MESSAGE COPY,F_SOTTOC_FORN //li gestisco da programma senno' fanno casino
|
OUTPUT F_GRUPPO GRUPPO
|
||||||
//MESSAGE COPY,F_SOTTOC_CLIENTE
|
OUTPUT F_CONTO CONTO
|
||||||
FLAGS "R"
|
OUTPUT F_SOTTOCONTO SOTTOCONTO
|
||||||
CHECKTYPE NORMAL
|
OUTPUT F_DESCR_CONTO DESCR
|
||||||
GROUP 1
|
//OUTPUT F_DESCR_CLIENTE DESCR
|
||||||
VALIDATE AUTOEXIT_FUNC 3 F_GRUPPO F_CONTO F_SOTTOCONTO
|
//OUTPUT F_DESCR_FORN DESCR
|
||||||
WARNING "Conto inesistente"
|
//MESSAGE COPY,F_SOTTOC_FORN //li gestisco da programma senno' fanno casino
|
||||||
END
|
//MESSAGE COPY,F_SOTTOC_CLIENTE
|
||||||
|
FLAGS "R"
|
||||||
NUMBER F_SOTTOC_CLIENTE 6
|
CHECKTYPE NORMAL
|
||||||
BEGIN
|
GROUP 1
|
||||||
PROMPT 54 3 "Cliente "
|
WARNING "Conto inesistente"
|
||||||
USE LF_CLIFO
|
END
|
||||||
//FIELD LF_CLIFO->CODCF
|
|
||||||
INPUT TIPOCF "C"
|
NUMBER F_SOTTOC_CLIENTE 6
|
||||||
INPUT CODCF F_SOTTOC_CLIENTE
|
BEGIN
|
||||||
DISPLAY "Codice" CODCF
|
PROMPT 54 3 "Cliente "
|
||||||
DISPLAY "Ragione Sociale@50" RAGSOC
|
USE LF_CLIFO
|
||||||
DISPLAY "Gruppo" GRUPPO
|
//FIELD LF_CLIFO->CODCF
|
||||||
DISPLAY "Conto" CONTO
|
INPUT TIPOCF "C"
|
||||||
OUTPUT F_SOTTOC_CLIENTE CODCF
|
INPUT CODCF F_SOTTOC_CLIENTE
|
||||||
OUTPUT F_DESCR_CLIENTE RAGSOC
|
DISPLAY "Codice" CODCF
|
||||||
//MESSAGE COPY,F_SOTTOCONTO
|
DISPLAY "Ragione Sociale@50" RAGSOC
|
||||||
//MESSAGE COPY,F_SOTTOC_FORN
|
DISPLAY "Gruppo" GRUPPO
|
||||||
FLAGS "R"
|
DISPLAY "Conto" CONTO
|
||||||
KEY 1
|
OUTPUT F_SOTTOC_CLIENTE CODCF
|
||||||
CHECKTYPE NORMAL
|
OUTPUT F_DESCR_CONTO RAGSOC
|
||||||
GROUP 2
|
//OUTPUT F_DESCR_CLIENTE RAGSOC
|
||||||
VALIDATE AUTOEXIT_FUNC 3 F_GRUPPO F_CONTO F_SOTTOC_CLIENTE
|
//OUTPUT F_DESCR_FORN RAGSOC
|
||||||
WARNING "Conto inesistente"
|
FLAGS "R"
|
||||||
END
|
KEY 1
|
||||||
|
CHECKTYPE NORMAL
|
||||||
NUMBER F_SOTTOC_FORN 6
|
WARNING "Cliente inesistente"
|
||||||
BEGIN
|
GROUP 2
|
||||||
PROMPT 54 3 "Fornitore "
|
END
|
||||||
USE LF_CLIFO
|
|
||||||
//FIELD LF_CLIFO->CODCF
|
NUMBER F_SOTTOC_FORN 6
|
||||||
INPUT TIPOCF "F"
|
BEGIN
|
||||||
INPUT CODCF F_SOTTOC_FORN
|
PROMPT 54 3 "Fornitore "
|
||||||
DISPLAY "Codice" CODCF
|
USE LF_CLIFO
|
||||||
DISPLAY "Ragione Sociale@50" RAGSOC
|
//FIELD LF_CLIFO->CODCF
|
||||||
DISPLAY "Gruppo" GRUPPO
|
INPUT TIPOCF "F"
|
||||||
DISPLAY "Conto" CONTO
|
INPUT CODCF F_SOTTOC_FORN
|
||||||
OUTPUT F_SOTTOC_FORN CODCF
|
DISPLAY "Codice" CODCF
|
||||||
OUTPUT F_DESCR_FORN RAGSOC
|
DISPLAY "Ragione Sociale@50" RAGSOC
|
||||||
FLAGS "R"
|
DISPLAY "Gruppo" GRUPPO
|
||||||
KEY 1 //serve per l'autopremimento
|
DISPLAY "Conto" CONTO
|
||||||
CHECKTYPE NORMAL
|
OUTPUT F_SOTTOC_FORN CODCF
|
||||||
//MESSAGE COPY,F_SOTTOCONTO
|
//OUTPUT F_DESCR_FORN RAGSOC
|
||||||
//MESSAGE COPY,F_SOTTOC_CLIENTE
|
OUTPUT F_DESCR_CONTO RAGSOC
|
||||||
GROUP 3
|
//OUTPUT F_DESCR_CLIENTE RAGSOC
|
||||||
VALIDATE AUTOEXIT_FUNC 3 F_GRUPPO F_CONTO F_SOTTOC_FORN
|
FLAGS "R"
|
||||||
WARNING "Conto inesistente"
|
KEY 1 //serve per l'autopremimento
|
||||||
END
|
CHECKTYPE NORMAL
|
||||||
|
WARNING "Fornitore inesistente"
|
||||||
STRING F_DESCR_CONTO 50
|
GROUP 3
|
||||||
BEGIN
|
END
|
||||||
PROMPT 4 4 "Descrizione "
|
|
||||||
USE LF_PCON KEY 2
|
STRING F_DESCR_CONTO 50
|
||||||
INPUT DESCR F_DESCR_CONTO
|
BEGIN
|
||||||
DISPLAY "Descrizione@50" DESCR
|
PROMPT 4 4 "Descrizione "
|
||||||
DISPLAY "Gruppo" GRUPPO
|
USE LF_PCON KEY 2
|
||||||
DISPLAY "Conto" CONTO
|
INPUT DESCR F_DESCR_CONTO
|
||||||
DISPLAY "Sottoconto" SOTTOCONTO
|
DISPLAY "Descrizione@50" DESCR
|
||||||
COPY OUTPUT F_SOTTOCONTO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
MESSAGE COPY,F_DESCR_CLIENTE
|
DISPLAY "Conto" CONTO
|
||||||
MESSAGE COPY,F_DESCR_FORN
|
DISPLAY "Sottoconto" SOTTOCONTO
|
||||||
KEY 1
|
COPY OUTPUT F_SOTTOCONTO
|
||||||
CHECKTYPE NORMAL
|
KEY 1
|
||||||
GROUP 1
|
CHECKTYPE NORMAL
|
||||||
END
|
GROUP 1
|
||||||
|
END
|
||||||
STRING F_DESCR_CLIENTE 50
|
|
||||||
BEGIN
|
STRING F_DESCR_CLIENTE 50
|
||||||
PROMPT 4 4 "Cliente "
|
BEGIN
|
||||||
USE LF_CLIFO KEY 2
|
PROMPT 4 4 "Cliente "
|
||||||
INPUT TIPOCF "C"
|
USE LF_CLIFO KEY 2
|
||||||
INPUT RAGSOC F_DESCR_CLIENTE
|
INPUT TIPOCF "C"
|
||||||
DISPLAY "Ragione Sociale Cliente@50" RAGSOC
|
INPUT RAGSOC F_DESCR_CLIENTE
|
||||||
DISPLAY "Gruppo" GRUPPO
|
DISPLAY "Ragione Sociale Cliente@50" RAGSOC
|
||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Codice" CODCF
|
DISPLAY "Conto" CONTO
|
||||||
COPY OUTPUT F_SOTTOC_CLIENTE
|
DISPLAY "Codice" CODCF
|
||||||
MESSAGE COPY,F_DESCR_CONTO
|
COPY OUTPUT F_SOTTOC_CLIENTE
|
||||||
MESSAGE COPY,F_DESCR_FORN
|
KEY 1
|
||||||
KEY 1
|
CHECKTYPE NORMAL
|
||||||
CHECKTYPE NORMAL
|
GROUP 2
|
||||||
GROUP 2
|
END
|
||||||
END
|
|
||||||
|
STRING F_DESCR_FORN 50
|
||||||
STRING F_DESCR_FORN 50
|
BEGIN
|
||||||
BEGIN
|
PROMPT 4 4 "Fornitore "
|
||||||
PROMPT 4 4 "Fornitore "
|
USE LF_CLIFO KEY 2
|
||||||
USE LF_CLIFO KEY 2
|
INPUT TIPOCF "F"
|
||||||
INPUT TIPOCF "F"
|
INPUT RAGSOC F_DESCR_FORN
|
||||||
INPUT RAGSOC F_DESCR_FORN
|
DISPLAY "Ragione Sociale Fornitore@50" RAGSOC
|
||||||
DISPLAY "Ragione Sociale Fornitore@50" RAGSOC
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Gruppo" GRUPPO
|
DISPLAY "Conto" CONTO
|
||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Codice" CODCF
|
||||||
DISPLAY "Codice" CODCF
|
COPY OUTPUT F_SOTTOC_FORN
|
||||||
COPY OUTPUT F_SOTTOC_FORN
|
KEY 1
|
||||||
MESSAGE COPY,F_DESCR_CONTO
|
CHECKTYPE NORMAL
|
||||||
MESSAGE COPY,F_DESCR_CLIENTE
|
GROUP 3
|
||||||
KEY 1
|
END
|
||||||
CHECKTYPE NORMAL
|
|
||||||
GROUP 3
|
SPREADSHEET F_SHEET_SALDI
|
||||||
END
|
BEGIN
|
||||||
|
PROMPT 2 6 ""
|
||||||
SPREADSHEET F_SHEET_SALDI
|
ITEM "Es."
|
||||||
BEGIN
|
ITEM " Saldo iniziale"
|
||||||
PROMPT 2 6 ""
|
ITEM ""
|
||||||
ITEM "Es."
|
ITEM "Progr.Att.: Dare"
|
||||||
ITEM "Progr.Mov.Elim.: Dare"
|
ITEM " Avere"
|
||||||
ITEM " Avere"
|
ITEM " Saldo"
|
||||||
ITEM " Saldo"
|
ITEM ""
|
||||||
ITEM " Saldo iniziale"
|
ITEM "Progr.Mov.Elim.: Dare"
|
||||||
ITEM "Progr.Att.: Dare"
|
ITEM " Avere"
|
||||||
ITEM " Avere"
|
ITEM "Saldo complessivo"
|
||||||
ITEM " Saldo"
|
ITEM ""
|
||||||
ITEM "Ult.Op.: Data"
|
ITEM "Ult.Op.: Data"
|
||||||
ITEM " Numero"
|
ITEM " Numero"
|
||||||
ITEM "Progr.Mov.Prov.: Dare"
|
ITEM "Progr.Mov.Prov.: Dare"
|
||||||
ITEM " Avere"
|
ITEM " Avere"
|
||||||
ITEM " Saldo"
|
ITEM " Saldo"
|
||||||
END
|
ITEM ""
|
||||||
|
END
|
||||||
ENDPAGE
|
|
||||||
|
ENDPAGE
|
||||||
ENDMASK
|
|
||||||
|
ENDMASK
|
||||||
PAGE "" -1 -1 71 20
|
|
||||||
|
PAGE "" -1 -1 70 16
|
||||||
NUMBER 101 4
|
|
||||||
BEGIN
|
NUMBER 101 4
|
||||||
PROMPT 1 1 "Anno esercizio "
|
BEGIN
|
||||||
FLAGS "R"
|
PROMPT 1 1 "Anno esercizio "
|
||||||
END
|
FLAGS "R"
|
||||||
|
END
|
||||||
NUMBER 102 15
|
|
||||||
BEGIN
|
NUMBER 102 15
|
||||||
PROMPT 1 4 "Progr.Mov.Eliminati: Dare "
|
BEGIN
|
||||||
FLAGS "R"
|
PROMPT 1 3 "Saldo Iniziale "
|
||||||
PICTURE "."
|
FLAGS "R"
|
||||||
END
|
PICTURE "."
|
||||||
|
END
|
||||||
NUMBER 103 15
|
|
||||||
BEGIN
|
STRING 103 1
|
||||||
PROMPT 42 4 "Avere "
|
BEGIN
|
||||||
FLAGS "R"
|
PROMPT 44 3 ""
|
||||||
PICTURE "."
|
END
|
||||||
END
|
|
||||||
|
NUMBER 104 15
|
||||||
STRING 104 17
|
BEGIN
|
||||||
BEGIN
|
PROMPT 1 4 "Progr.Attuali: Dare "
|
||||||
PROMPT 60 4 "Saldo "
|
FLAGS "R"
|
||||||
FLAGS "R"
|
PICTURE "."
|
||||||
END
|
END
|
||||||
|
|
||||||
/*
|
NUMBER 105 15
|
||||||
NUMBER 105 15
|
BEGIN
|
||||||
BEGIN
|
PROMPT 45 4 "Avere "
|
||||||
PROMPT 1 5 "Progr.Attuali: Saldo Iniziale "
|
FLAGS "R"
|
||||||
FLAGS "R"
|
PICTURE "."
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING 105 1
|
NUMBER 106 15
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 5 "Segno "
|
PROMPT 22 5 "Saldo "
|
||||||
END
|
FLAGS "R"
|
||||||
*/
|
PICTURE "."
|
||||||
|
END
|
||||||
STRING 105 15
|
|
||||||
BEGIN
|
STRING 107 1
|
||||||
PROMPT 1 5 "Saldo Iniziale "
|
BEGIN
|
||||||
FLAGS "R"
|
PROMPT 44 5 ""
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER 106 15
|
NUMBER 108 15
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 42 5 "Progr.Attuali: Dare "
|
PROMPT 1 6 "Progr.Mov.Eliminati: Dare "
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
PICTURE "."
|
PICTURE "."
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER 107 15
|
NUMBER 109 15
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 60 5 "Avere "
|
PROMPT 45 6 "Avere "
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
PICTURE "."
|
PICTURE "."
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING 108 17
|
NUMBER 110 15
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 6 "Saldo "
|
PROMPT 1 7 "Saldo complessivo "
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
END
|
PICTURE "."
|
||||||
|
END
|
||||||
DATE 109
|
|
||||||
BEGIN
|
STRING 111 1
|
||||||
PROMPT 1 8 "Ultima data operazione "
|
BEGIN
|
||||||
FLAGS "R"
|
PROMPT 44 7 ""
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER 110 7
|
/*
|
||||||
BEGIN
|
NUMBER 105 15
|
||||||
PROMPT 1 9 "Ultimo numero operazione "
|
BEGIN
|
||||||
FLAGS "R"
|
PROMPT 1 5 "Progr.Attuali: Saldo Iniziale "
|
||||||
END
|
FLAGS "R"
|
||||||
|
END
|
||||||
NUMBER 111 15
|
|
||||||
BEGIN
|
STRING 105 1
|
||||||
PROMPT 1 6 "Progr.Mov.Provvisori: Dare "
|
BEGIN
|
||||||
FLAGS "R"
|
PROMPT 1 5 "Segno "
|
||||||
PICTURE "."
|
END
|
||||||
END
|
*/
|
||||||
|
|
||||||
NUMBER 112 15
|
DATE 112
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 42 6 "Avere "
|
PROMPT 1 8 "Ultima data operazione "
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
PICTURE "."
|
END
|
||||||
END
|
|
||||||
|
NUMBER 113 7
|
||||||
STRING 113 17
|
BEGIN
|
||||||
BEGIN
|
PROMPT 1 9 "Ultimo numero operazione "
|
||||||
PROMPT 60 6 "Saldo "
|
FLAGS "R"
|
||||||
FLAGS "R"
|
END
|
||||||
END
|
|
||||||
|
NUMBER 114 15
|
||||||
BUTTON DLG_OK 9 2
|
BEGIN
|
||||||
BEGIN
|
PROMPT 1 10 "Progr.Mov.Provvisori: Dare "
|
||||||
PROMPT -13 -1 ""
|
FLAGS "R"
|
||||||
END
|
PICTURE "."
|
||||||
|
END
|
||||||
BUTTON DLG_CANCEL 9 2
|
|
||||||
BEGIN
|
NUMBER 115 15
|
||||||
PROMPT -23 -1 ""
|
BEGIN
|
||||||
END
|
PROMPT 45 10 "Avere "
|
||||||
|
FLAGS "R"
|
||||||
BUTTON DLG_NULL 9 2
|
PICTURE "."
|
||||||
BEGIN
|
END
|
||||||
PROMPT -33 -1 "Azzera"
|
|
||||||
MESSAGE RESET,1@
|
NUMBER 116 15
|
||||||
END
|
BEGIN
|
||||||
|
PROMPT 1 11 "Saldo "
|
||||||
ENDPAGE
|
FLAGS "R"
|
||||||
|
PICTURE "."
|
||||||
ENDMASK
|
END
|
||||||
|
|
||||||
|
STRING 117 1
|
||||||
|
BEGIN
|
||||||
|
PROMPT 44 11 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_OK 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -12 -1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_CANCEL 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -22 -1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
/*
|
||||||
|
BUTTON DLG_OK 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -13 -1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_CANCEL 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -23 -1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_NULL 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -33 -1 "Azzera"
|
||||||
|
MESSAGE RESET,1@
|
||||||
|
END
|
||||||
|
*/
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
ENDMASK
|
||||||
|
Loading…
x
Reference in New Issue
Block a user