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 = ' ';
|
||||||
@ -2408,9 +2410,11 @@ void CG1600_application::stampa_totali()
|
|||||||
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);
|
|
||||||
set_row (_i++,"@0gSALDO STATO PATRIMONIALE");
|
|
||||||
set_row (_i,"@0gSBILANCIO (ATTIVO - PASSIVO)");
|
|
||||||
_totale_patrimoniale = _totale_attivita - _totale_passivita;
|
_totale_patrimoniale = _totale_attivita - _totale_passivita;
|
||||||
set_row (_i++,"@86g%r", &_totale_patrimoniale);
|
real totale = _totale_ordine_attivo - _totale_ordine_passivo;
|
||||||
_totale_patrimoniale = ZERO;
|
if (totale != ZERO && !_sbilancio_ordine)
|
||||||
|
{
|
||||||
|
set_row (_i++,"@0g%c", app);
|
||||||
|
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')
|
||||||
{
|
{
|
||||||
@ -2453,9 +2469,12 @@ 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;
|
||||||
@ -2851,10 +2870,12 @@ void CG1600_application::stampa_totali_con_raffronto()
|
|||||||
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;
|
||||||
@ -2866,15 +2887,30 @@ 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')
|
||||||
{
|
{
|
||||||
@ -2904,11 +2940,14 @@ 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;
|
||||||
|
515
cg/cg3100.cpp
515
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,10 +25,6 @@
|
|||||||
#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 {
|
||||||
@ -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,66 +502,73 @@ 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);
|
||||||
@ -575,8 +579,21 @@ void CG3100_application::stampa_errori_mov()
|
|||||||
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,18 +1305,16 @@ 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;
|
||||||
@ -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
|
||||||
|
233
cg/cg3500.cpp
233
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->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();
|
||||||
}
|
}
|
||||||
_tmp_saldi->write();
|
|
||||||
}
|
}
|
||||||
_pcn->readat(recnum);
|
_pcn->readat(recnum);
|
||||||
}
|
}
|
||||||
@ -328,41 +341,46 @@ 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();
|
||||||
|
}
|
||||||
|
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete _lista;
|
delete _lista;
|
||||||
@ -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,6 +612,10 @@ 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 && counter == 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (_tp == fine)
|
if (_tp == fine)
|
||||||
{
|
{
|
||||||
if (_scelta == 1)
|
if (_scelta == 1)
|
||||||
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
418
cg/cg5200.cpp
418
cg/cg5200.cpp
@ -14,82 +14,87 @@
|
|||||||
#include <pconti.h>
|
#include <pconti.h>
|
||||||
#include "cg5200.h"
|
#include "cg5200.h"
|
||||||
|
|
||||||
HIDDEN const char* REAL_PICTURE = "###.###.###.###";
|
//HIDDEN const char* REAL_PICTURE = "###.###.###.###";
|
||||||
|
|
||||||
class TRiga_array : public TArray
|
class TRiga_array : public TArray
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool add_riga(const TRectype& rec_saldi);
|
bool add_riga(const TRectype& rec_saldi);
|
||||||
};
|
};
|
||||||
|
|
||||||
bool TRiga_array::add_riga(const TRectype& rec_saldi)
|
bool TRiga_array::add_riga(const TRectype& rec_saldi)
|
||||||
{
|
{
|
||||||
bool found = FALSE;
|
bool found = FALSE;
|
||||||
int annoes, annoesr;
|
int annoes, annoesr;
|
||||||
char flag, flagr;
|
char flag = ' ', flagr = ' ';
|
||||||
TDate udata, udatar;
|
TDate udata, udatar;
|
||||||
long unum, unumr;
|
long unum, unumr;
|
||||||
real pdaresca,paveresca,pdare,pavere,saldoini,pdarepro,paverepro;
|
real pdaresca,paveresca,pdare,pavere,saldoini,pdarepro,paverepro;
|
||||||
real pdarescar,paverescar,pdarer,paverer,saldoinir,pdarepror,paverepror;
|
real pdarescar,paverescar,pdarer,paverer,saldoinir,pdarepror,paverepror;
|
||||||
|
|
||||||
for (int i = 0; i < items(); i++)
|
for (int i = 0; i < items(); i++)
|
||||||
{
|
|
||||||
TRectype& r = (TRectype&)(*this)[i];
|
|
||||||
annoes = r.get_int(SLD_ANNOES);
|
|
||||||
annoesr = rec_saldi.get_int(SLD_ANNOES);
|
|
||||||
if ( annoes == annoesr )
|
|
||||||
{
|
{
|
||||||
pdaresca = r.get_real(SLD_PDARESCA);
|
TRectype& r = (TRectype&)(*this)[i];
|
||||||
paveresca = r.get_real(SLD_PAVERESCA);
|
annoes = r.get_int(SLD_ANNOES);
|
||||||
flag = r.get_char(SLD_FLAGSALINI);
|
annoesr = rec_saldi.get_int(SLD_ANNOES);
|
||||||
pdare = r.get_real(SLD_PDARE);
|
if ( annoes == annoesr )
|
||||||
pavere = r.get_real(SLD_PAVERE);
|
{
|
||||||
saldoini = r.get_real(SLD_SALDO);
|
pdaresca = r.get_real(SLD_PDARESCA);
|
||||||
pdarepro = r.get_real(SLD_PDAREPRO);
|
paveresca = r.get_real(SLD_PAVERESCA);
|
||||||
paverepro = r.get_real(SLD_PAVEREPRO);
|
flag = r.get_char(SLD_FLAGSALINI);
|
||||||
udata = r.get(SLD_DATAULMOV);
|
pdare = r.get_real(SLD_PDARE);
|
||||||
unum = r.get_long(SLD_NUMULTMOV);
|
pavere = r.get_real(SLD_PAVERE);
|
||||||
pdarescar = rec_saldi.get_real(SLD_PDARESCA);
|
saldoini = r.get_real(SLD_SALDO);
|
||||||
pdarescar += pdaresca;
|
pdarepro = r.get_real(SLD_PDAREPRO);
|
||||||
paverescar = rec_saldi.get_real(SLD_PAVERESCA);
|
paverepro = r.get_real(SLD_PAVEREPRO);
|
||||||
paverescar+= paveresca;
|
udata = r.get(SLD_DATAULMOV);
|
||||||
flagr = rec_saldi.get_char(SLD_FLAGSALINI);
|
unum = r.get_long(SLD_NUMULTMOV);
|
||||||
pdarer = rec_saldi.get_real(SLD_PDARE);
|
pdarescar = rec_saldi.get_real(SLD_PDARESCA);
|
||||||
pdarer += pdare;
|
pdarescar += pdaresca;
|
||||||
paverer = rec_saldi.get_real(SLD_PAVERE);
|
paverescar = rec_saldi.get_real(SLD_PAVERESCA);
|
||||||
paverer += pavere;
|
paverescar+= paveresca;
|
||||||
saldoinir = rec_saldi.get_real(SLD_SALDO);
|
flagr = rec_saldi.get_char(SLD_FLAGSALINI);
|
||||||
udatar = rec_saldi.get(SLD_DATAULMOV);
|
pdarer = rec_saldi.get_real(SLD_PDARE);
|
||||||
unumr = rec_saldi.get_long(SLD_NUMULTMOV);
|
pdarer += pdare;
|
||||||
udatar = fnc_max(udatar,udata);
|
paverer = rec_saldi.get_real(SLD_PAVERE);
|
||||||
unumr = (unum > unumr) ? unum : unumr;
|
paverer += pavere;
|
||||||
if (flagr == 'D')
|
saldoinir = rec_saldi.get_real(SLD_SALDO);
|
||||||
saldoinir += saldoini;
|
udatar = rec_saldi.get(SLD_DATAULMOV);
|
||||||
else if (flagr == 'A')
|
unumr = rec_saldi.get_long(SLD_NUMULTMOV);
|
||||||
saldoinir -= saldoini;
|
udatar = fnc_max(udatar,udata);
|
||||||
pdarepror = rec_saldi.get_real(SLD_PDAREPRO);
|
unumr = (unum > unumr) ? unum : unumr;
|
||||||
pdarepror += pdarepro;
|
if (flagr == flag)
|
||||||
paverepror = rec_saldi.get_real(SLD_PAVEREPRO);
|
saldoinir += saldoini;
|
||||||
paverepror += paverepro;
|
else saldoinir -= saldoini;
|
||||||
found = TRUE;
|
if (saldoinir < ZERO) // saldoinir e' piu' piccolo di saldoini => vince il flag di saldoini
|
||||||
r.put(SLD_ANNOES, annoes);
|
{
|
||||||
r.put(SLD_PDARESCA, pdarescar);
|
flagr = flag;
|
||||||
r.put(SLD_PAVERESCA,paverescar);
|
saldoinir = -saldoinir;
|
||||||
r.put(SLD_PDARE, pdarer);
|
}
|
||||||
r.put(SLD_PAVERE,paverer);
|
pdarepror = rec_saldi.get_real(SLD_PDAREPRO);
|
||||||
r.put(SLD_SALDO, saldoinir);
|
pdarepror += pdarepro;
|
||||||
r.put(SLD_PDAREPRO, pdarepror);
|
paverepror = rec_saldi.get_real(SLD_PAVEREPRO);
|
||||||
r.put(SLD_PAVEREPRO,paverepro);
|
paverepror += paverepro;
|
||||||
r.put(SLD_DATAULMOV, udatar);
|
found = TRUE;
|
||||||
r.put(SLD_NUMULTMOV, unumr);
|
r.put(SLD_ANNOES, annoes);
|
||||||
|
r.put(SLD_PDARESCA, pdarescar);
|
||||||
|
r.put(SLD_PAVERESCA,paverescar);
|
||||||
|
r.put(SLD_PDARE, pdarer);
|
||||||
|
r.put(SLD_PAVERE,paverer);
|
||||||
|
r.put(SLD_FLAGSALINI,flagr);
|
||||||
|
r.put(SLD_SALDO, saldoinir);
|
||||||
|
r.put(SLD_PDAREPRO, pdarepror);
|
||||||
|
r.put(SLD_PAVEREPRO,paverepro);
|
||||||
|
r.put(SLD_DATAULMOV, udatar);
|
||||||
|
r.put(SLD_NUMULTMOV, unumr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
if (!found)
|
||||||
if (!found)
|
{
|
||||||
{
|
TRectype* r = new TRectype(rec_saldi);//ci copia anche i valori di rec_saldi
|
||||||
TRectype* r = new TRectype(rec_saldi);//ci copia anche i valori di rec_saldi
|
add(r);
|
||||||
add(r);
|
}
|
||||||
}
|
return found;
|
||||||
return found;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool gruppo_handler (TMask_field& f, KEY k);
|
bool gruppo_handler (TMask_field& f, KEY k);
|
||||||
@ -116,6 +121,8 @@ protected:
|
|||||||
virtual TMask* get_mask(int mode) { return _msk; }
|
virtual TMask* get_mask(int mode) { return _msk; }
|
||||||
virtual bool changing_mask(int mode) {return FALSE; }
|
virtual bool changing_mask(int mode) {return FALSE; }
|
||||||
virtual int read(TMask& m);
|
virtual int read(TMask& m);
|
||||||
|
virtual void init_query_mode(TMask&);
|
||||||
|
virtual void init_modify_mode(TMask&);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void add_r(int,int,real&,real&,real&,char,real&,real&,
|
void add_r(int,int,real&,real&,real&,char,real&,real&,
|
||||||
@ -130,28 +137,38 @@ public:
|
|||||||
|
|
||||||
HIDDEN CG5200_application * app() { return (CG5200_application*) MainApp(); }
|
HIDDEN CG5200_application * app() { return (CG5200_application*) MainApp(); }
|
||||||
|
|
||||||
|
void CG5200_application::init_query_mode(TMask& m)
|
||||||
|
{
|
||||||
|
m.disable(DLG_FINDREC);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CG5200_application::init_modify_mode(TMask& m)
|
||||||
|
{
|
||||||
|
m.disable(DLG_FINDREC);
|
||||||
|
}
|
||||||
|
|
||||||
bool CG5200_application::fai_filtro()
|
bool CG5200_application::fai_filtro()
|
||||||
{
|
{
|
||||||
TSaldo sld;
|
TSaldo sld;
|
||||||
int annop = 0;
|
int annop = 0;
|
||||||
char tipo;
|
TString tipo (1);
|
||||||
|
|
||||||
_saldo_gruppo = _saldo_conto = _saldo_sottoc = FALSE;
|
_saldo_gruppo = _saldo_conto = _saldo_sottoc = FALSE;
|
||||||
TMask* m = app()->main_mask();
|
TMask* m = app()->main_mask();
|
||||||
tipo = m->get(F_TIPOCF)[0];
|
tipo = m->get(F_TIPOCF);
|
||||||
_anno = m->get_int(F_ANNO);
|
_anno = m->get_int(F_ANNO);
|
||||||
_g = m->get_int(F_GRUPPO);
|
_g = m->get_int(F_GRUPPO);
|
||||||
_c = m->get_int(F_CONTO);
|
_c = m->get_int(F_CONTO);
|
||||||
if (tipo == ' ')
|
if (tipo == "")
|
||||||
_s = m->get_long(F_SOTTOCONTO);
|
_s = m->get_long(F_SOTTOCONTO);
|
||||||
else if (tipo == 'C')
|
else if (tipo == "C")
|
||||||
_s = m->get_long(F_SOTTOC_CLIENTE);
|
_s = m->get_long(F_SOTTOC_CLIENTE);
|
||||||
else _s = m->get_long(F_SOTTOC_FORN);
|
else _s = m->get_long(F_SOTTOC_FORN);
|
||||||
if (_c == 0)
|
if (_c == 0)
|
||||||
_saldo_gruppo = TRUE;
|
_saldo_gruppo = TRUE;
|
||||||
else if (_s == 0l)
|
else if (_s == 0l)
|
||||||
_saldo_conto = TRUE;
|
_saldo_conto = TRUE;
|
||||||
else _saldo_sottoc = TRUE;
|
else _saldo_sottoc = TRUE;
|
||||||
|
|
||||||
TLocalisamfile& saldi = _rel1->lfile();
|
TLocalisamfile& saldi = _rel1->lfile();
|
||||||
TRectype from (saldi.curr());
|
TRectype from (saldi.curr());
|
||||||
@ -160,21 +177,21 @@ bool CG5200_application::fai_filtro()
|
|||||||
to.zero();
|
to.zero();
|
||||||
|
|
||||||
if (_anno != 0)
|
if (_anno != 0)
|
||||||
annop = sld.EsePre(_anno);
|
annop = sld.EsePre(_anno);
|
||||||
|
|
||||||
if (annop != 0)
|
if (annop != 0)
|
||||||
from.put(SLD_ANNOES,annop);
|
from.put(SLD_ANNOES,annop);
|
||||||
else if (_anno != 0)
|
else if (_anno != 0)
|
||||||
from.put(SLD_ANNOES,_anno);
|
from.put(SLD_ANNOES,_anno);
|
||||||
else from.put(SLD_ANNOES,0);
|
else from.put(SLD_ANNOES,0);
|
||||||
from.put(SLD_GRUPPO,_g);
|
from.put(SLD_GRUPPO,_g);
|
||||||
if (_c != 0)
|
if (_c != 0)
|
||||||
from.put(SLD_CONTO, _c);
|
from.put(SLD_CONTO, _c);
|
||||||
if (_s != 0l)
|
if (_s != 0l)
|
||||||
from.put(SLD_SOTTOCONTO, _s);
|
from.put(SLD_SOTTOCONTO, _s);
|
||||||
|
|
||||||
if (_anno != 0)
|
if (_anno != 0)
|
||||||
to.put(SLD_ANNOES,_anno);
|
to.put(SLD_ANNOES,_anno);
|
||||||
else to.put(SLD_ANNOES, 9999);
|
else to.put(SLD_ANNOES, 9999);
|
||||||
to.put(SLD_GRUPPO,_g);
|
to.put(SLD_GRUPPO,_g);
|
||||||
if (_c != 0)
|
if (_c != 0)
|
||||||
@ -183,10 +200,10 @@ bool CG5200_application::fai_filtro()
|
|||||||
to.put(SLD_SOTTOCONTO,_s);
|
to.put(SLD_SOTTOCONTO,_s);
|
||||||
|
|
||||||
if ( _saldo_gruppo || _saldo_conto )
|
if ( _saldo_gruppo || _saldo_conto )
|
||||||
_cur->setkey(1);
|
_cur->setkey(1);
|
||||||
|
|
||||||
if (_saldo_sottoc)
|
if (_saldo_sottoc)
|
||||||
_cur->setkey(2);
|
_cur->setkey(2);
|
||||||
|
|
||||||
_cur->setregion(from,to);
|
_cur->setregion(from,to);
|
||||||
|
|
||||||
@ -197,7 +214,7 @@ bool gruppo_handler(TMask_field& f, KEY key)
|
|||||||
{
|
{
|
||||||
if ( key == K_TAB && f.mask().is_running() )
|
if ( key == K_TAB && f.mask().is_running() )
|
||||||
{
|
{
|
||||||
const TMask& m = f.mask();
|
TMask& m = f.mask();
|
||||||
const int gruppo = m.get_int(F_GRUPPO);
|
const int gruppo = m.get_int(F_GRUPPO);
|
||||||
const int conto = m.get_int(F_CONTO);
|
const int conto = m.get_int(F_CONTO);
|
||||||
const long sottoc = m.get_long(F_SOTTOCONTO);
|
const long sottoc = m.get_long(F_SOTTOCONTO);
|
||||||
@ -228,12 +245,14 @@ bool gruppo_handler(TMask_field& f, KEY key)
|
|||||||
pconti.read(_isequal, _nolock );
|
pconti.read(_isequal, _nolock );
|
||||||
if (pconti.bad())
|
if (pconti.bad())
|
||||||
return f.warning_box ("Non esiste il conto relativo a questo sottoconto");
|
return f.warning_box ("Non esiste il conto relativo a questo sottoconto");
|
||||||
else
|
/*
|
||||||
{
|
else
|
||||||
TString tmcf = pconti.get(PCN_TMCF);
|
{
|
||||||
if (tmcf.not_empty())
|
TString tmcf = pconti.get(PCN_TMCF);
|
||||||
return f.warning_box ("Non puoi inserire un sottoconto di un conto relativo ad un cliente/fornitore");
|
if (tmcf.not_empty())
|
||||||
}
|
return f.warning_box ("Non puoi inserire un sottoconto di un conto relativo ad un cliente/fornitore");
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -242,28 +261,76 @@ bool gruppo_handler(TMask_field& f, KEY key)
|
|||||||
|
|
||||||
bool sottoc_handler(TMask_field& f, KEY key)
|
bool sottoc_handler(TMask_field& f, KEY key)
|
||||||
{
|
{
|
||||||
|
const short id = f.dlg();
|
||||||
|
int gruppo;
|
||||||
|
long sottoconto = f.mask().get_long(id);
|
||||||
|
|
||||||
if (key == K_TAB)
|
if (key == K_TAB)
|
||||||
{
|
{
|
||||||
const short id = f.dlg();
|
TLocalisamfile pconti(LF_PCON);
|
||||||
TLocalisamfile clifo (LF_CLIFO);
|
gruppo = f.mask().get_int(F_GRUPPO);
|
||||||
int gruppo = f.mask().get_int(F_GRUPPO);
|
|
||||||
if (gruppo == 0) return TRUE;
|
if (gruppo == 0)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
int conto = f.mask().get_int(F_CONTO);
|
int conto = f.mask().get_int(F_CONTO);
|
||||||
long sottoconto = f.mask().get_long(id);
|
|
||||||
if (sottoconto != 0 && conto == 0) return f.error_box("Manca il CONTO");
|
if (sottoconto != 0 && conto == 0)
|
||||||
|
return f.error_box("Manca il CONTO");
|
||||||
|
|
||||||
|
if (id == F_SOTTOCONTO)
|
||||||
|
{
|
||||||
|
pconti.zero();
|
||||||
|
pconti.put(PCN_GRUPPO, gruppo) ;
|
||||||
|
pconti.put(PCN_CONTO, conto);
|
||||||
|
pconti.put(PCN_SOTTOCONTO, sottoconto);
|
||||||
|
pconti.setkey(1);
|
||||||
|
pconti.read(_isequal, _nolock);
|
||||||
|
if (pconti.good())
|
||||||
|
f.mask().stop_run(K_AUTO_ENTER);
|
||||||
|
}
|
||||||
|
|
||||||
if (id == F_SOTTOC_CLIENTE || id == F_SOTTOC_FORN)
|
if (id == F_SOTTOC_CLIENTE || id == F_SOTTOC_FORN)
|
||||||
{
|
{
|
||||||
char tmcf = f.mask().get(F_TIPOCF)[0];
|
char tipo = id == F_SOTTOC_CLIENTE ? 'C' : 'F';
|
||||||
clifo.zero() ;
|
TLocalisamfile clifo (LF_CLIFO);
|
||||||
clifo.put(CLI_TIPOCF,tmcf);
|
if (sottoconto != 0)
|
||||||
clifo.put(CLI_CODCF,sottoconto);
|
{
|
||||||
clifo.setkey(1) ;
|
clifo.zero();
|
||||||
clifo.read(_isequal, _nolock );
|
clifo.put(CLI_TIPOCF,tipo);
|
||||||
if (clifo.bad())
|
clifo.put(CLI_CODCF, sottoconto) ;
|
||||||
return f.warning_box ("Registrazione assente");
|
clifo.setkey(1);
|
||||||
|
if (clifo.read(_isequal, _nolock) == NOERR)
|
||||||
|
{
|
||||||
|
TString rs = clifo.get(CLI_RAGSOC);
|
||||||
|
f.mask().set(F_DESCR_CLIENTE, rs);
|
||||||
|
f.mask().set(F_DESCR_FORN, rs);
|
||||||
|
f.mask().stop_run(K_AUTO_ENTER);
|
||||||
|
}
|
||||||
|
else return f.error_box("Registrazione assente");
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (gruppo != 0 && conto != 0)
|
||||||
|
{
|
||||||
|
pconti.zero();
|
||||||
|
pconti.put(PCN_GRUPPO, gruppo) ;
|
||||||
|
pconti.put(PCN_CONTO, conto);
|
||||||
|
pconti.setkey(1);
|
||||||
|
pconti.read(_isequal, _nolock);
|
||||||
|
if (pconti.good())
|
||||||
|
{
|
||||||
|
TString ds = pconti.get(PCN_DESCR);
|
||||||
|
f.mask().set(F_DESCR_CLIENTE, ds);
|
||||||
|
f.mask().set(F_DESCR_FORN, ds);
|
||||||
|
}
|
||||||
|
f.mask().stop_run(K_AUTO_ENTER);
|
||||||
|
}
|
||||||
|
// else
|
||||||
|
// return f.error_box("Registrazione assente");
|
||||||
}
|
}
|
||||||
f.mask().stop_run(K_AUTO_ENTER);
|
|
||||||
}
|
}
|
||||||
|
// f.mask().stop_run(K_AUTO_ENTER);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,47 +378,83 @@ void CG5200_application::add_r(int numrig,int a,real& pds,real& pas,real& sc,cha
|
|||||||
real& pa,real& s,TDate& d,long n,real& pdp,real& pap,real& sp)
|
real& pa,real& s,TDate& d,long n,real& pdp,real& pap,real& sp)
|
||||||
{
|
{
|
||||||
TSheet_field& cs = ss();
|
TSheet_field& cs = ss();
|
||||||
TString dep (18);
|
char segno = ' ';
|
||||||
if (sc > ZERO)
|
|
||||||
dep << sc.string(REAL_PICTURE) << " D";
|
|
||||||
else if (sc < ZERO)
|
|
||||||
{
|
|
||||||
sc = -sc;
|
|
||||||
dep << sc.string(REAL_PICTURE) << " A";
|
|
||||||
}
|
|
||||||
TToken_string& riga = cs.row(numrig);
|
TToken_string& riga = cs.row(numrig);
|
||||||
|
/*
|
||||||
|
TString dep (18);
|
||||||
|
if (sc > ZERO)
|
||||||
|
dep << sc.string(REAL_PICTURE) << " D";
|
||||||
|
else if (sc < ZERO)
|
||||||
|
{
|
||||||
|
sc = -sc;
|
||||||
|
dep << sc.string(REAL_PICTURE) << " A";
|
||||||
|
}
|
||||||
|
*/
|
||||||
riga.add(a, 0);
|
riga.add(a, 0);
|
||||||
riga.add(pds.string(),1);
|
riga.add(si.string(),1);
|
||||||
riga.add(pas.string(),2);
|
|
||||||
riga.add(dep,3);
|
|
||||||
dep = "";
|
|
||||||
if (si != ZERO)
|
if (si != ZERO)
|
||||||
dep << si.string(REAL_PICTURE) << " " << f;
|
riga.add(f,2);
|
||||||
riga.add(dep,4);
|
riga.add(pd.string(),3);
|
||||||
riga.add(pd.string(),5);
|
riga.add(pa.string(),4);
|
||||||
riga.add(pa.string(),6);
|
|
||||||
dep = "";
|
|
||||||
if (s > ZERO)
|
if (s > ZERO)
|
||||||
dep << s.string(REAL_PICTURE) << " D";
|
segno = 'D';
|
||||||
else if (s < ZERO)
|
else if (s < ZERO)
|
||||||
{
|
{
|
||||||
s = -s;
|
s = -s;
|
||||||
dep << s.string(REAL_PICTURE) << " A";
|
segno = 'A';
|
||||||
}
|
}
|
||||||
riga.add(dep,7);
|
riga.add(s.string(),5);
|
||||||
riga.add(d.string(),8);
|
riga.add(segno,6);
|
||||||
riga.add(n,9);
|
segno = ' ';
|
||||||
riga.add(pdp.string(),10);
|
if (sc > ZERO)
|
||||||
riga.add(pap.string(),11);
|
segno = 'D';
|
||||||
dep = "";
|
else if (sc < ZERO)
|
||||||
if (sp > ZERO)
|
{
|
||||||
|
sc = -sc;
|
||||||
|
segno = 'A';
|
||||||
|
}
|
||||||
|
riga.add(pds.string(),7);
|
||||||
|
riga.add(pas.string(),8);
|
||||||
|
riga.add(sc.string(),9);
|
||||||
|
riga.add(segno,10);
|
||||||
|
/*
|
||||||
|
dep = "";
|
||||||
|
if (si != ZERO)
|
||||||
|
dep << si.string(REAL_PICTURE) << " " << f;
|
||||||
|
dep = "";
|
||||||
|
if (s > ZERO)
|
||||||
|
dep << s.string(REAL_PICTURE) << " D";
|
||||||
|
else if (s < ZERO)
|
||||||
|
{
|
||||||
|
s = -s;
|
||||||
|
dep << s.string(REAL_PICTURE) << " A";
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
riga.add(d.string(),11);
|
||||||
|
riga.add(n,12);
|
||||||
|
riga.add(pdp.string(),13);
|
||||||
|
riga.add(pap.string(),14);
|
||||||
|
/*
|
||||||
|
dep = "";
|
||||||
|
if (sp > ZERO)
|
||||||
dep << sp.string(REAL_PICTURE) << " D";
|
dep << sp.string(REAL_PICTURE) << " D";
|
||||||
|
else if (sp < ZERO)
|
||||||
|
{
|
||||||
|
sp = -sp;
|
||||||
|
dep << sp.string(REAL_PICTURE) << " A";
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
segno = ' ';
|
||||||
|
if (sp > ZERO)
|
||||||
|
segno = 'D';
|
||||||
else if (sp < ZERO)
|
else if (sp < ZERO)
|
||||||
{
|
{
|
||||||
sp = -sp;
|
sp = -sp;
|
||||||
dep << sp.string(REAL_PICTURE) << " A";
|
segno = 'A';
|
||||||
}
|
}
|
||||||
riga.add(dep,12);
|
riga.add(sp.string(),15);
|
||||||
|
riga.add(segno,16);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG5200_application::compilasheet()
|
void CG5200_application::compilasheet()
|
||||||
@ -400,28 +503,28 @@ void CG5200_application::compilasheet()
|
|||||||
if (_saldo_conto && conto != _c) continue;
|
if (_saldo_conto && conto != _c) continue;
|
||||||
|
|
||||||
if (_saldo_conto || _saldo_gruppo)
|
if (_saldo_conto || _saldo_gruppo)
|
||||||
_riga.add_riga(_cur->curr());
|
_riga.add_riga(_cur->curr());
|
||||||
|
|
||||||
if (_saldo_sottoc)
|
if (_saldo_sottoc)
|
||||||
{
|
{
|
||||||
flagsal = _cur->curr().get_char(SLD_FLAGSALINI);
|
flagsal = _cur->curr().get_char(SLD_FLAGSALINI);
|
||||||
saldoini = _cur->curr().get_real(SLD_SALDO);
|
saldoini = _cur->curr().get_real(SLD_SALDO);
|
||||||
pdare = _cur->curr().get_real(SLD_PDARE);
|
pdare = _cur->curr().get_real(SLD_PDARE);
|
||||||
pavere = _cur->curr().get_real(SLD_PAVERE);
|
pavere = _cur->curr().get_real(SLD_PAVERE);
|
||||||
pdaresca = _cur->curr().get_real(SLD_PDARESCA);
|
pdaresca = _cur->curr().get_real(SLD_PDARESCA);
|
||||||
paveresca = _cur->curr().get_real(SLD_PAVERESCA);
|
paveresca = _cur->curr().get_real(SLD_PAVERESCA);
|
||||||
pdarepro = _cur->curr().get_real(SLD_PDAREPRO);
|
pdarepro = _cur->curr().get_real(SLD_PDAREPRO);
|
||||||
paverepro = _cur->curr().get_real(SLD_PAVEREPRO);
|
paverepro = _cur->curr().get_real(SLD_PAVEREPRO);
|
||||||
ultima_data = _cur->curr().get(SLD_DATAULMOV);
|
ultima_data = _cur->curr().get(SLD_DATAULMOV);
|
||||||
ultimo_num = _cur->curr().get_long(SLD_NUMULTMOV);
|
ultimo_num = _cur->curr().get_long(SLD_NUMULTMOV);
|
||||||
if (flagsal == 'D')
|
if (flagsal == 'D')
|
||||||
saldo = pdare + saldoini - pavere;
|
saldo = pdare + saldoini - pavere;
|
||||||
else
|
else
|
||||||
saldo = pdare - saldoini - pavere;
|
saldo = pdare - saldoini - pavere;
|
||||||
saldosca = pdaresca - paveresca;
|
saldosca = saldo + pdaresca - paveresca; //in realta' non e' proprio il saldo degli scaricati ma quello complessivo
|
||||||
saldopro = pdarepro - paverepro;
|
saldopro = pdarepro - paverepro;
|
||||||
|
|
||||||
add_r(i,anno,pdaresca,paveresca,saldosca,flagsal,saldoini,pdare,pavere,saldo,ultima_data,ultimo_num,pdarepro,paverepro,saldopro);
|
add_r(i,anno,pdaresca,paveresca,saldosca,flagsal,saldoini,pdare,pavere,saldo,ultima_data,ultimo_num,pdarepro,paverepro,saldopro);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_saldo_gruppo || _saldo_conto)
|
if (_saldo_gruppo || _saldo_conto)
|
||||||
@ -432,18 +535,13 @@ void CG5200_application::compilasheet()
|
|||||||
anno = riga.get_int(SLD_ANNOES);
|
anno = riga.get_int(SLD_ANNOES);
|
||||||
pdaresca = riga.get_real(SLD_PDARESCA);
|
pdaresca = riga.get_real(SLD_PDARESCA);
|
||||||
paveresca = riga.get_real(SLD_PAVERESCA);
|
paveresca = riga.get_real(SLD_PAVERESCA);
|
||||||
saldosca = pdaresca - paveresca;
|
//saldosca = pdaresca - paveresca;
|
||||||
|
flagsal = riga.get_char(SLD_FLAGSALINI);
|
||||||
saldoini = riga.get_real(SLD_SALDO);
|
saldoini = riga.get_real(SLD_SALDO);
|
||||||
pdare = riga.get_real(SLD_PDARE);
|
pdare = riga.get_real(SLD_PDARE);
|
||||||
pavere = riga.get_real(SLD_PAVERE);
|
pavere = riga.get_real(SLD_PAVERE);
|
||||||
saldo = pdare - pavere + saldoini;
|
saldo = pdare - pavere + saldoini;
|
||||||
if (saldoini > ZERO)
|
saldosca = saldo + pdaresca - paveresca;
|
||||||
flagsal = 'D';
|
|
||||||
else if (saldoini < ZERO)
|
|
||||||
{
|
|
||||||
flagsal = 'A';
|
|
||||||
saldoini = -saldoini;
|
|
||||||
}
|
|
||||||
pdarepro = riga.get_real(SLD_PDAREPRO);
|
pdarepro = riga.get_real(SLD_PDAREPRO);
|
||||||
paverepro = riga.get_real(SLD_PAVEREPRO);
|
paverepro = riga.get_real(SLD_PAVEREPRO);
|
||||||
saldopro = pdarepro - paverepro;
|
saldopro = pdarepro - paverepro;
|
||||||
|
165
cg/cg5200a.uml
165
cg/cg5200a.uml
@ -48,6 +48,7 @@ BEGIN
|
|||||||
DISPLAY "Gruppo" GRUPPO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Descrizione@50" DESCR
|
DISPLAY "Descrizione@50" DESCR
|
||||||
OUTPUT F_GRUPPO GRUPPO
|
OUTPUT F_GRUPPO GRUPPO
|
||||||
|
OUTPUT F_DESCR_CONTO DESCR
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
END
|
END
|
||||||
@ -66,17 +67,20 @@ BEGIN
|
|||||||
OUTPUT F_TIPOCF TMCF
|
OUTPUT F_TIPOCF TMCF
|
||||||
OUTPUT F_GRUPPO GRUPPO
|
OUTPUT F_GRUPPO GRUPPO
|
||||||
OUTPUT F_CONTO CONTO
|
OUTPUT F_CONTO CONTO
|
||||||
|
//OUTPUT F_DESCR_CLIENTE DESCR
|
||||||
|
//OUTPUT F_DESCR_FORN DESCR
|
||||||
OUTPUT F_DESCR_CONTO DESCR
|
OUTPUT F_DESCR_CONTO DESCR
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
WARNING "Conto inesistente o mancante"
|
WARNING "Conto inesistente o mancante"
|
||||||
//MESSAGE DIRTY,F_SOTTOCONTO|DIRTY,F_SOTTOC_CLIENTE|DIRTY,F_SOTTOC_FORN
|
//MESSAGE DIRTY,F_SOTTOCONTO|DIRTY,F_SOTTOC_CLIENTE|DIRTY,F_SOTTOC_FORN
|
||||||
|
MESSAGE DIRTY,F_DESCR_CONTO|DIRTY,F_DESCR_CLIENTE|DIRTY,F_DESCR_FORN
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_SOTTOCONTO 6
|
NUMBER F_SOTTOCONTO 6
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 54 3 "Sottoconto "
|
PROMPT 54 3 "Sottoconto "
|
||||||
USE LF_PCON SELECT SOTTOCONTO!=""
|
USE LF_PCON
|
||||||
FIELD LF_PCON->SOTTOCONTO
|
FIELD LF_PCON->SOTTOCONTO
|
||||||
KEY 1
|
KEY 1
|
||||||
INPUT GRUPPO F_GRUPPO
|
INPUT GRUPPO F_GRUPPO
|
||||||
@ -90,12 +94,13 @@ BEGIN
|
|||||||
OUTPUT F_CONTO CONTO
|
OUTPUT F_CONTO CONTO
|
||||||
OUTPUT F_SOTTOCONTO SOTTOCONTO
|
OUTPUT F_SOTTOCONTO SOTTOCONTO
|
||||||
OUTPUT F_DESCR_CONTO DESCR
|
OUTPUT F_DESCR_CONTO DESCR
|
||||||
|
//OUTPUT F_DESCR_CLIENTE DESCR
|
||||||
|
//OUTPUT F_DESCR_FORN DESCR
|
||||||
//MESSAGE COPY,F_SOTTOC_FORN //li gestisco da programma senno' fanno casino
|
//MESSAGE COPY,F_SOTTOC_FORN //li gestisco da programma senno' fanno casino
|
||||||
//MESSAGE COPY,F_SOTTOC_CLIENTE
|
//MESSAGE COPY,F_SOTTOC_CLIENTE
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
GROUP 1
|
GROUP 1
|
||||||
VALIDATE AUTOEXIT_FUNC 3 F_GRUPPO F_CONTO F_SOTTOCONTO
|
|
||||||
WARNING "Conto inesistente"
|
WARNING "Conto inesistente"
|
||||||
END
|
END
|
||||||
|
|
||||||
@ -111,15 +116,14 @@ BEGIN
|
|||||||
DISPLAY "Gruppo" GRUPPO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
OUTPUT F_SOTTOC_CLIENTE CODCF
|
OUTPUT F_SOTTOC_CLIENTE CODCF
|
||||||
OUTPUT F_DESCR_CLIENTE RAGSOC
|
OUTPUT F_DESCR_CONTO RAGSOC
|
||||||
//MESSAGE COPY,F_SOTTOCONTO
|
//OUTPUT F_DESCR_CLIENTE RAGSOC
|
||||||
//MESSAGE COPY,F_SOTTOC_FORN
|
//OUTPUT F_DESCR_FORN RAGSOC
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
KEY 1
|
KEY 1
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
|
WARNING "Cliente inesistente"
|
||||||
GROUP 2
|
GROUP 2
|
||||||
VALIDATE AUTOEXIT_FUNC 3 F_GRUPPO F_CONTO F_SOTTOC_CLIENTE
|
|
||||||
WARNING "Conto inesistente"
|
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_SOTTOC_FORN 6
|
NUMBER F_SOTTOC_FORN 6
|
||||||
@ -134,15 +138,14 @@ BEGIN
|
|||||||
DISPLAY "Gruppo" GRUPPO
|
DISPLAY "Gruppo" GRUPPO
|
||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
OUTPUT F_SOTTOC_FORN CODCF
|
OUTPUT F_SOTTOC_FORN CODCF
|
||||||
OUTPUT F_DESCR_FORN RAGSOC
|
//OUTPUT F_DESCR_FORN RAGSOC
|
||||||
|
OUTPUT F_DESCR_CONTO RAGSOC
|
||||||
|
//OUTPUT F_DESCR_CLIENTE RAGSOC
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
KEY 1 //serve per l'autopremimento
|
KEY 1 //serve per l'autopremimento
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
//MESSAGE COPY,F_SOTTOCONTO
|
WARNING "Fornitore inesistente"
|
||||||
//MESSAGE COPY,F_SOTTOC_CLIENTE
|
|
||||||
GROUP 3
|
GROUP 3
|
||||||
VALIDATE AUTOEXIT_FUNC 3 F_GRUPPO F_CONTO F_SOTTOC_FORN
|
|
||||||
WARNING "Conto inesistente"
|
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_DESCR_CONTO 50
|
STRING F_DESCR_CONTO 50
|
||||||
@ -155,8 +158,6 @@ BEGIN
|
|||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
DISPLAY "Sottoconto" SOTTOCONTO
|
DISPLAY "Sottoconto" SOTTOCONTO
|
||||||
COPY OUTPUT F_SOTTOCONTO
|
COPY OUTPUT F_SOTTOCONTO
|
||||||
MESSAGE COPY,F_DESCR_CLIENTE
|
|
||||||
MESSAGE COPY,F_DESCR_FORN
|
|
||||||
KEY 1
|
KEY 1
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
GROUP 1
|
GROUP 1
|
||||||
@ -173,8 +174,6 @@ BEGIN
|
|||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
DISPLAY "Codice" CODCF
|
DISPLAY "Codice" CODCF
|
||||||
COPY OUTPUT F_SOTTOC_CLIENTE
|
COPY OUTPUT F_SOTTOC_CLIENTE
|
||||||
MESSAGE COPY,F_DESCR_CONTO
|
|
||||||
MESSAGE COPY,F_DESCR_FORN
|
|
||||||
KEY 1
|
KEY 1
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
GROUP 2
|
GROUP 2
|
||||||
@ -191,8 +190,6 @@ BEGIN
|
|||||||
DISPLAY "Conto" CONTO
|
DISPLAY "Conto" CONTO
|
||||||
DISPLAY "Codice" CODCF
|
DISPLAY "Codice" CODCF
|
||||||
COPY OUTPUT F_SOTTOC_FORN
|
COPY OUTPUT F_SOTTOC_FORN
|
||||||
MESSAGE COPY,F_DESCR_CONTO
|
|
||||||
MESSAGE COPY,F_DESCR_CLIENTE
|
|
||||||
KEY 1
|
KEY 1
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
GROUP 3
|
GROUP 3
|
||||||
@ -202,25 +199,29 @@ SPREADSHEET F_SHEET_SALDI
|
|||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 6 ""
|
PROMPT 2 6 ""
|
||||||
ITEM "Es."
|
ITEM "Es."
|
||||||
ITEM "Progr.Mov.Elim.: Dare"
|
ITEM " Saldo iniziale"
|
||||||
ITEM " Avere"
|
ITEM ""
|
||||||
ITEM " Saldo"
|
|
||||||
ITEM " Saldo iniziale"
|
|
||||||
ITEM "Progr.Att.: Dare"
|
ITEM "Progr.Att.: Dare"
|
||||||
ITEM " Avere"
|
ITEM " Avere"
|
||||||
ITEM " Saldo"
|
ITEM " Saldo"
|
||||||
|
ITEM ""
|
||||||
|
ITEM "Progr.Mov.Elim.: Dare"
|
||||||
|
ITEM " Avere"
|
||||||
|
ITEM "Saldo complessivo"
|
||||||
|
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"
|
||||||
|
ITEM ""
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
|
||||||
PAGE "" -1 -1 71 20
|
PAGE "" -1 -1 70 16
|
||||||
|
|
||||||
NUMBER 101 4
|
NUMBER 101 4
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -230,22 +231,66 @@ END
|
|||||||
|
|
||||||
NUMBER 102 15
|
NUMBER 102 15
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 4 "Progr.Mov.Eliminati: Dare "
|
PROMPT 1 3 "Saldo Iniziale "
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
PICTURE "."
|
PICTURE "."
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER 103 15
|
STRING 103 1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 42 4 "Avere "
|
PROMPT 44 3 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER 104 15
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 4 "Progr.Attuali: Dare "
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
PICTURE "."
|
PICTURE "."
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING 104 17
|
NUMBER 105 15
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 60 4 "Saldo "
|
PROMPT 45 4 "Avere "
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
|
PICTURE "."
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER 106 15
|
||||||
|
BEGIN
|
||||||
|
PROMPT 22 5 "Saldo "
|
||||||
|
FLAGS "R"
|
||||||
|
PICTURE "."
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING 107 1
|
||||||
|
BEGIN
|
||||||
|
PROMPT 44 5 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER 108 15
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 6 "Progr.Mov.Eliminati: Dare "
|
||||||
|
FLAGS "R"
|
||||||
|
PICTURE "."
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER 109 15
|
||||||
|
BEGIN
|
||||||
|
PROMPT 45 6 "Avere "
|
||||||
|
FLAGS "R"
|
||||||
|
PICTURE "."
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER 110 15
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 7 "Saldo complessivo "
|
||||||
|
FLAGS "R"
|
||||||
|
PICTURE "."
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING 111 1
|
||||||
|
BEGIN
|
||||||
|
PROMPT 44 7 ""
|
||||||
END
|
END
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -261,64 +306,55 @@ BEGIN
|
|||||||
END
|
END
|
||||||
*/
|
*/
|
||||||
|
|
||||||
STRING 105 15
|
DATE 112
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 5 "Saldo Iniziale "
|
PROMPT 1 8 "Ultima data operazione "
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER 106 15
|
NUMBER 113 7
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 42 5 "Progr.Attuali: Dare "
|
PROMPT 1 9 "Ultimo numero operazione "
|
||||||
|
FLAGS "R"
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER 114 15
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 10 "Progr.Mov.Provvisori: Dare "
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
PICTURE "."
|
PICTURE "."
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER 107 15
|
NUMBER 115 15
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 60 5 "Avere "
|
PROMPT 45 10 "Avere "
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
PICTURE "."
|
PICTURE "."
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING 108 17
|
NUMBER 116 15
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 6 "Saldo "
|
PROMPT 1 11 "Saldo "
|
||||||
FLAGS "R"
|
|
||||||
END
|
|
||||||
|
|
||||||
DATE 109
|
|
||||||
BEGIN
|
|
||||||
PROMPT 1 8 "Ultima data operazione "
|
|
||||||
FLAGS "R"
|
|
||||||
END
|
|
||||||
|
|
||||||
NUMBER 110 7
|
|
||||||
BEGIN
|
|
||||||
PROMPT 1 9 "Ultimo numero operazione "
|
|
||||||
FLAGS "R"
|
|
||||||
END
|
|
||||||
|
|
||||||
NUMBER 111 15
|
|
||||||
BEGIN
|
|
||||||
PROMPT 1 6 "Progr.Mov.Provvisori: Dare "
|
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
PICTURE "."
|
PICTURE "."
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER 112 15
|
STRING 117 1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 42 6 "Avere "
|
PROMPT 44 11 ""
|
||||||
FLAGS "R"
|
|
||||||
PICTURE "."
|
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING 113 17
|
BUTTON DLG_OK 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 60 6 "Saldo "
|
PROMPT -12 -1 ""
|
||||||
FLAGS "R"
|
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_CANCEL 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -22 -1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
/*
|
||||||
BUTTON DLG_OK 9 2
|
BUTTON DLG_OK 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -13 -1 ""
|
PROMPT -13 -1 ""
|
||||||
@ -334,6 +370,7 @@ BEGIN
|
|||||||
PROMPT -33 -1 "Azzera"
|
PROMPT -33 -1 "Azzera"
|
||||||
MESSAGE RESET,1@
|
MESSAGE RESET,1@
|
||||||
END
|
END
|
||||||
|
*/
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user