Patch level : 2.0 686
Files correlati : cg3.exe Ricompilazione Demo : [ ] Commento : GF20130 La stampa mastrini estesa a 198 caratteri dà un errore di calcolo del primo progressivo di fine giornata. git-svn-id: svn://10.65.10.50/trunk@11763 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
caaddad3d2
commit
aaab003fff
@ -27,15 +27,15 @@ class TRiga_sez_opp : public TObject
|
||||
TToken_string* _str;
|
||||
|
||||
public:
|
||||
int gruppo() { return atoi(_str->get(0)); }
|
||||
int conto() { return atoi(_str->get(1)); }
|
||||
long sottoc() { return atol(_str->get(2)); }
|
||||
int gruppo() const { return _str->get_int(0); }
|
||||
int conto() const { return _str->get_int(1); }
|
||||
long sottoc() const { return _str->get_long(2); }
|
||||
const char * sezione () { return _str->get(3); }
|
||||
const char * lettera () { return _str->get(4); }
|
||||
const char * num_rom () { return _str->get(5); }
|
||||
int numero () { return atoi(_str->get(6)); }
|
||||
real saldo_conto ();
|
||||
real saldo_conto_raf();
|
||||
int numero () const { return _str->get_int(6); }
|
||||
real saldo_conto () const;
|
||||
real saldo_conto_raf() const;
|
||||
void incrementa_saldo(real& nuovo_saldo,real& nuovo_saldo_raf);
|
||||
TRiga_sez_opp(int g, int c, long s,
|
||||
const char * sezione, const char * lettera,
|
||||
@ -43,13 +43,13 @@ public:
|
||||
virtual ~TRiga_sez_opp();
|
||||
};
|
||||
|
||||
real TRiga_sez_opp::saldo_conto ()
|
||||
real TRiga_sez_opp::saldo_conto () const
|
||||
{
|
||||
real r(_str->get(7));
|
||||
return r;
|
||||
}
|
||||
|
||||
real TRiga_sez_opp::saldo_conto_raf ()
|
||||
real TRiga_sez_opp::saldo_conto_raf () const
|
||||
{
|
||||
real r(_str->get(8));
|
||||
return r;
|
||||
@ -70,13 +70,13 @@ TRiga_sez_opp::TRiga_sez_opp(int g, int c, long s,
|
||||
const char * num_rom, int num, real& saldo, real& saldo_raf)
|
||||
{
|
||||
_str = new TToken_string(30);
|
||||
_str->add(format("%d",g));
|
||||
_str->add(format("%d",c));
|
||||
_str->add(format("%ld",s));
|
||||
_str->add(g);
|
||||
_str->add(c);
|
||||
_str->add(s);
|
||||
_str->add(sezione);
|
||||
_str->add(lettera);
|
||||
_str->add(num_rom);
|
||||
_str->add(format("%d",num));
|
||||
_str->add(num);
|
||||
_str->add(saldo.string());
|
||||
_str->add(saldo_raf.string());
|
||||
}
|
||||
@ -2162,15 +2162,14 @@ void TStampa_IVdirettiva::stampa_risultato_prima_delle_imposte()
|
||||
if (_let_da_stamp == 'E' && atoi(_num_da_stamp) > 21 && // questa prima parte e' sempre TRUE!
|
||||
!_totale_parziale.is_zero() && !_totale_parziale_raf.is_zero())
|
||||
{
|
||||
set_row (_i,FR("@4gTotale delle partite straordinarie"));
|
||||
set_row (_i,"@81g%r", &_totale_parziale);
|
||||
set_row (_i,"@4g%s@81g%r", TR("Totale delle partite straordinarie"), &_totale_parziale);
|
||||
if (raff)
|
||||
set_row (_i,"@111g%r", &_totale_parziale_raf);
|
||||
_i++;
|
||||
}
|
||||
|
||||
set_row (_i,FR("@4gRisultato prima delle imposte"));
|
||||
set_row (_i,"@81g%r", &_totale_economico);
|
||||
set_row (_i,"@4g%s@81g%r", TR("Risultato prima delle imposte"), &_totale_economico);
|
||||
|
||||
if (raff)
|
||||
set_row (_i,"@111g%r", &_totale_economico_raf);
|
||||
_i++;
|
||||
@ -3089,8 +3088,8 @@ void TStampa_IVdirettiva::stampa_totali_con_raffronto()
|
||||
set_row (_i,TR("RISULTATO CONTO ECONOMICO"));
|
||||
set_row (_i,"@81g%r", &_totale_economico);
|
||||
set_row (_i++,"@111g%r", &_totale_economico_raf);
|
||||
_totale_economico = 0;
|
||||
_totale_economico_raf = 0;
|
||||
_totale_economico = ZERO;
|
||||
_totale_economico_raf = ZERO;
|
||||
}
|
||||
}
|
||||
_cont_gcs = 0;
|
||||
|
105
cg/cg3200.cpp
105
cg/cg3200.cpp
@ -1378,19 +1378,10 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
if (counter)
|
||||
return TRUE;
|
||||
|
||||
TLocalisamfile & rmov = current_cursor()->file(LF_RMOV);
|
||||
long rec;
|
||||
TDate datasucc;
|
||||
TString datasuccstring,dataregrmovstring;
|
||||
int gruppof,contof;
|
||||
long sottocf;
|
||||
TString provvis = "";
|
||||
int annoes;
|
||||
|
||||
switch (file)
|
||||
{
|
||||
case LF_SALDI:
|
||||
|
||||
case LF_SALDI:
|
||||
{
|
||||
// Usati in crea_intestazione()
|
||||
|
||||
_devi_stampare_footer = TRUE;
|
||||
@ -1400,14 +1391,15 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
_rw = 0;
|
||||
_rw++;
|
||||
}
|
||||
|
||||
_gruppo = atoi(current_cursor()->curr(LF_SALDI).get(SLD_GRUPPO));
|
||||
_conto = atoi(current_cursor()->curr(LF_SALDI).get(SLD_CONTO));
|
||||
_sottoc = atol(current_cursor()->curr(LF_SALDI).get(SLD_SOTTOCONTO));
|
||||
|
||||
const TRectype& saldi = current_cursor()->curr(LF_SALDI);
|
||||
_gruppo = saldi.get_int(SLD_GRUPPO);
|
||||
_conto = saldi.get_int(SLD_CONTO);
|
||||
_sottoc = saldi.get_long(SLD_SOTTOCONTO);
|
||||
|
||||
_cambia_mastrino = TRUE;
|
||||
|
||||
annoes = atoi(current_cursor()->curr(LF_SALDI).get(SLD_ANNOES));
|
||||
const int annoes = saldi.get_int(SLD_ANNOES);
|
||||
conto(_gruppo,_conto,TRUE);
|
||||
|
||||
if (annoes != _anno_corrente && annoes != _anno_precedente)
|
||||
@ -1494,7 +1486,8 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case LF_RMOV:
|
||||
{
|
||||
@ -1560,12 +1553,12 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
}
|
||||
|
||||
|
||||
provvis = mov.get(MOV_PROVVIS);
|
||||
const TString4 provvis = mov.get(MOV_PROVVIS);
|
||||
|
||||
|
||||
_dataregs = _datareg_stampa.string();
|
||||
|
||||
if ((_stampa_mov_prov)||((!_stampa_mov_prov)&&(provvis.trim().empty())))
|
||||
if ((_stampa_mov_prov)||((!_stampa_mov_prov)&&(provvis.blank())))
|
||||
{
|
||||
if ((_datareg >= _data_ini) && (_datareg <= _data_fine))
|
||||
{
|
||||
@ -1577,7 +1570,7 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
else
|
||||
set_row (_rw, "@197g*");
|
||||
|
||||
if (_stampa_mov_prov && provvis.trim().not_empty())
|
||||
if (_stampa_mov_prov && !provvis.blank())
|
||||
if (_numcarat == 1)
|
||||
set_row(_rw, "@130gP");
|
||||
else
|
||||
@ -1987,22 +1980,22 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
set_row (_rw,"@100g%s", (const char*) _importo_str);
|
||||
}
|
||||
}
|
||||
else if (_sezione == "A")
|
||||
{
|
||||
_totale_periodo_avere += _importo;
|
||||
_riporto_parziale_avere += _importo;
|
||||
_totale_commessa_avere += _importo;
|
||||
|
||||
else
|
||||
{
|
||||
_totale_periodo_avere += _importo;
|
||||
_riporto_parziale_avere += _importo;
|
||||
_totale_commessa_avere += _importo;
|
||||
|
||||
|
||||
if (_numcarat == 1) // Stampa 132 caratteri
|
||||
set_row (_rw,"@100g%s", (const char*) _importo_str);
|
||||
else // Stampa 198 caratteri
|
||||
{
|
||||
_saldo_progressivi -= _importo;
|
||||
_saldo_movimenti -= _importo;
|
||||
set_row (_rw,"@117g%s", (const char*) _importo_str);
|
||||
}
|
||||
}
|
||||
if (_numcarat == 1) // Stampa 132 caratteri
|
||||
set_row (_rw,"@100g%s", (const char*) _importo_str);
|
||||
else // Stampa 198 caratteri
|
||||
{
|
||||
_saldo_progressivi -= _importo;
|
||||
_saldo_movimenti -= _importo;
|
||||
set_row (_rw,"@117g%s", (const char*) _importo_str);
|
||||
}
|
||||
}
|
||||
|
||||
const int righe_rimaste = printer().rows_left();
|
||||
_stampato = righe_rimaste >= 1;
|
||||
@ -2019,23 +2012,31 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
if (_tipo < 3)
|
||||
set_row (_rw,"@183g#t" , &_regiva);
|
||||
_dataregrmov = current_cursor()->curr(LF_RMOV).get_date(RMV_DATAREG);
|
||||
dataregrmovstring=_dataregrmov.string();
|
||||
|
||||
//Gestire la stampa di saldo_progressivi nella postprocess_page di RMOV
|
||||
|
||||
if (_stampa_saldo_des < 3) // Stampa saldo (non descrizioni)
|
||||
{
|
||||
rec = rmov.recno();
|
||||
rmov.next();
|
||||
gruppof = rmov.get_int(RMV_GRUPPO);
|
||||
contof = rmov.get_int(RMV_CONTO);
|
||||
sottocf = rmov.get_int(RMV_SOTTOCONTO);
|
||||
datasucc = rmov.get_date(RMV_DATAREG);
|
||||
datasuccstring=datasucc.string();
|
||||
if (((gruppof!=_gruppo)||(contof!=_conto)||(sottocf!=_sottoc))||(rmov.eof()))
|
||||
datasucc = ("");
|
||||
if (datasucc != _dataregrmov || _stampa_saldo_des == 2)
|
||||
bool print_sald = true;
|
||||
if (_stampa_saldo_des != 2) // come dire == 1
|
||||
{
|
||||
const TRecnotype rec = rmov.recno();
|
||||
if (rmov.next() == NOERR)
|
||||
{
|
||||
const int gruppof = rmov.get_int(RMV_GRUPPO);
|
||||
const int contof = rmov.get_int(RMV_CONTO);
|
||||
const long sottocf = rmov.get_long(RMV_SOTTOCONTO);
|
||||
if (gruppof==_gruppo && contof==_conto && sottocf==_sottoc)
|
||||
{
|
||||
const TDate datasucc = rmov.get(RMV_DATAREG);
|
||||
print_sald = datasucc != _dataregrmov;
|
||||
}
|
||||
rmov.readat(rec);
|
||||
}
|
||||
}
|
||||
if (print_sald)
|
||||
{
|
||||
/* new 32 bit mode
|
||||
if (_flag_del_cazzo)
|
||||
{
|
||||
calcola_progressivi();
|
||||
@ -2046,8 +2047,16 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
}
|
||||
else
|
||||
set_row (_rw,"@135g%r", &_saldo_progressivi);
|
||||
*/
|
||||
/* old 16 bit mode */
|
||||
real saldo_prog = _saldo_progressivi;
|
||||
if (_stampa_progressivi_si)
|
||||
{
|
||||
calcola_progressivi();
|
||||
saldo_prog += _saldo_progre_prec;
|
||||
}
|
||||
set_row(_rw,"@135g%r", &saldo_prog);
|
||||
}
|
||||
rmov.readat(rec);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -3198,7 +3207,7 @@ void TMastrini_application::calcola_progressivi(bool finali)
|
||||
real saldo,progredare_eseprec,progreavere_eseprec,saldoini_attuale,saldofine_attuale;
|
||||
char salini,salini_attuale,salfine_attuale;
|
||||
|
||||
saldo = ZERO; // Saldo iniziale (Guy: Ovvio no?)
|
||||
saldo = ZERO; // saldo = Saldo iniziale (Guy: Ovvio no?)
|
||||
|
||||
if (_cdc.empty())
|
||||
{
|
||||
|
@ -1793,7 +1793,7 @@ const char* TTransfer_file::scrivi_occasionali(const TString& record)
|
||||
cfpi = "";
|
||||
civ = "";
|
||||
|
||||
if (ragsoc.trim().empty()) return cfpi;
|
||||
if (ragsoc.blank()) return cfpi;
|
||||
|
||||
_npoccas++;
|
||||
|
||||
@ -1805,8 +1805,7 @@ const char* TTransfer_file::scrivi_occasionali(const TString& record)
|
||||
if (ind != "")
|
||||
civ = numero_civico(ind);
|
||||
|
||||
app = "RIC";
|
||||
cfpi.format("%3s%13ld", (const char*)app,_npoccas);
|
||||
cfpi.format("RIC%13ld", _npoccas);
|
||||
|
||||
//ricerca_comune(com);
|
||||
_cod_com = "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user