cg2100.cpp Corretto caricamento dei movimenti di sola iVA
cg2104.cpp Stringato messaggio di mancanza di qualcosa cg3400.cpp Corretta la stampa dei riporti git-svn-id: svn://10.65.10.50/trunk@3758 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1cfa311a20
commit
1ec5595d26
@ -679,8 +679,9 @@ int TPrimanota_application::read(TMask& m)
|
||||
if (_iva == nessuna_iva)
|
||||
return _rel->status();
|
||||
|
||||
const bool solaiva = i == 0;
|
||||
m.set(F_SOLAIVA, solaiva ? "X" : " ", TRUE);
|
||||
TMask_field& solaiva = m.field(F_SOLAIVA);
|
||||
solaiva.set(i == 0 ? "X" : " ");
|
||||
solaiva.on_key(K_TAB);
|
||||
|
||||
const bool to_swap = test_swap(FALSE);
|
||||
if (to_swap)
|
||||
|
@ -317,10 +317,11 @@ bool TPrimanota_application::codpag_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (set_scad && f.get().empty())
|
||||
{
|
||||
f.error_box("Il codice di pagamento e' obbligatorio!\n"
|
||||
f.error_box("Il codice di pagamento e' obbligatorio!");
|
||||
/*
|
||||
"Se possibile esso verra' proposto, ma potra'\n"
|
||||
"essere modificato prima di registrare il movimento.");
|
||||
|
||||
*/
|
||||
const char typ = a.clifo();
|
||||
const long cod = m.get_long(typ == 'C' ? F_CLIENTE : F_FORNITORE);
|
||||
|
||||
@ -356,9 +357,11 @@ bool TPrimanota_application::annorif_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
const TString& anno = m.get(F_DATADOC).right(4);
|
||||
f.set(anno);
|
||||
ok = error_box("L'anno di riferimento partita e' obbligatorio!\n"
|
||||
ok = error_box("L'anno di riferimento partita e' obbligatorio!");
|
||||
/*
|
||||
"Se possibile esso verra' proposto, ma potra'\n"
|
||||
"essere modificato prima di registrare il movimento.");
|
||||
*/
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -393,9 +396,11 @@ bool TPrimanota_application::numrif_handler(TMask_field& f, KEY key)
|
||||
f.set(m.get(a._npart_is_prot ? F_PROTIVA : F_NUMDOC));
|
||||
key = K_TAB; // Forza la successiva activate_numrif
|
||||
|
||||
ok = f.error_box("Il numero di riferimento partita e' obbligatorio!\n"
|
||||
ok = f.error_box("Il numero di riferimento partita e' obbligatorio!");
|
||||
/*
|
||||
"Se possibile esso verra' proposto, ma potra'\n"
|
||||
"essere modificato prima di registrare il movimento.");
|
||||
*/
|
||||
}
|
||||
|
||||
if (key == K_TAB && a.is_fattura())
|
||||
|
@ -131,8 +131,11 @@ private:
|
||||
int _anno_iva;
|
||||
bool _stampa_definitiva;
|
||||
bool _MovGiaStampato;
|
||||
|
||||
bool _gia_settato_ariportare;
|
||||
bool _forza_ariportare;
|
||||
bool _devo_riportare; // Guy: Toliere sto casino se non funziona
|
||||
|
||||
bool _nuovo_mese; // Finito il mese ?
|
||||
long _num_rig;
|
||||
real _importo;
|
||||
@ -416,9 +419,8 @@ void CG3400_application::aggiorna_mov()
|
||||
_cur->setregion(da, a);
|
||||
(*_cur) = 0L;
|
||||
|
||||
#ifndef DBG
|
||||
TProgind prnd (_cur->items(), "Aggiornamento movimenti ...", FALSE, TRUE);
|
||||
#endif
|
||||
|
||||
// for (mov.read(_isgteq, _lock); mov.curr() < *_RecArrivoA && !mov.eof(); mov.next(_lock))
|
||||
|
||||
for ( ; _cur->pos() < _cur->items(); ++(*_cur))
|
||||
@ -426,7 +428,6 @@ void CG3400_application::aggiorna_mov()
|
||||
#ifdef DBG
|
||||
long numreg = _cur->file(LF_MOV).get_long("NUMREG");
|
||||
TString datareg(_cur->file(LF_MOV).get("DATAREG"));
|
||||
// message_box("Numreg: %ld Datareg: %s", numreg, (const char*)datareg);
|
||||
#endif
|
||||
const bool gia_stampato = _cur->file(LF_MOV).get_bool(MOV_STAMPATO);
|
||||
if (!gia_stampato)
|
||||
@ -437,9 +438,7 @@ void CG3400_application::aggiorna_mov()
|
||||
nprog++;
|
||||
}
|
||||
// else mov.reread(_unlock);
|
||||
#ifndef DBG
|
||||
prnd.addstatus(1);
|
||||
#endif
|
||||
}
|
||||
// mov.reread(_unlock);
|
||||
}
|
||||
@ -540,8 +539,12 @@ void CG3400_application::preprocess_footer()
|
||||
// OPPURE
|
||||
// 2. Sono sull'ultima riga
|
||||
//
|
||||
|
||||
const bool riporta = _forza_ariportare || (!_gia_settato_ariportare && _cur->pos() < _cur->items()-1);
|
||||
|
||||
/*
|
||||
const bool riporta = _forza_ariportare ||
|
||||
(!_gia_settato_ariportare && _cur->pos() < _cur->items()-1 );
|
||||
*/
|
||||
const bool riporta = _devo_riportare;
|
||||
|
||||
if (riporta)
|
||||
{
|
||||
@ -563,6 +566,8 @@ void CG3400_application::preprocess_footer()
|
||||
set_footer (r++, (const char*) riga);
|
||||
|
||||
_forza_ariportare = FALSE;
|
||||
|
||||
_devo_riportare = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -784,7 +789,8 @@ void CG3400_application::preprocess_header()
|
||||
real riporto_dare, riporto_avere;
|
||||
|
||||
// _gia_settato_ariportare = FALSE;
|
||||
|
||||
_devo_riportare = FALSE;
|
||||
|
||||
if (pag > 0) // Stampa riporti
|
||||
{
|
||||
riporto_dare = _tot_dare_progr + _tot_dare_progr_ap;
|
||||
@ -877,12 +883,14 @@ int CG3400_application::righe_rimaste() const
|
||||
|
||||
void CG3400_application::fill_page(int start_riga, int righe_iva_settate)
|
||||
{
|
||||
const TPrinter& p = printer();
|
||||
|
||||
TString256 rigas;
|
||||
int rrr = start_riga;
|
||||
int rows_left = printer().rows_left();
|
||||
int rows_left = p.rows_left();
|
||||
if (rows_left <= 0)
|
||||
{
|
||||
rows_left = printer().formlen() - (printer().headersize()+1) - printer().footersize();
|
||||
rows_left = p.formlen() - (p.headersize()+1) - p.footersize();
|
||||
_forza_ariportare = TRUE;
|
||||
}
|
||||
int r_l = rows_left - start_riga - righe_iva_settate;
|
||||
@ -891,13 +899,13 @@ void CG3400_application::fill_page(int start_riga, int righe_iva_settate)
|
||||
if (r_l > 0)
|
||||
{
|
||||
rigas.fill('=', _stampa_width);
|
||||
rigas.cut(_stampa_width+1);
|
||||
// rigas.cut(_stampa_width+1);
|
||||
set_row(rrr++, "%s", (const char*) rigas);
|
||||
int j=0;
|
||||
// Calcola una specie di coefficiente angolare
|
||||
int alfa = (_stampa_width - 6) / r_l;
|
||||
|
||||
for ( ; r_l >= 1; r_l--) // Non stampare sulla riga orizzontale!
|
||||
for ( ; r_l > 0; r_l--) // Non stampare sulla riga orizzontale!
|
||||
{
|
||||
rigas.format("@%dg======", j);
|
||||
set_row(rrr++, rigas);
|
||||
@ -953,11 +961,8 @@ print_action CG3400_application::postprocess_page(int file, int counter)
|
||||
if (_nuovo_mese)
|
||||
{
|
||||
righe = set_totali_pagina(righe);
|
||||
#ifdef DBG
|
||||
if (!_stampa_definitiva)
|
||||
fill_page(righe, righe_iva_settate);
|
||||
#endif
|
||||
// Nella stampa su bollato metto un segno su tutte le righe
|
||||
|
||||
// Nella stampa su bollato metto un segno su tutte le righe
|
||||
if (_stampa_definitiva)
|
||||
fill_page(righe, righe_iva_settate);
|
||||
}
|
||||
@ -1103,6 +1108,8 @@ void CG3400_application::set_rows (int file, int counter)
|
||||
set_row(r+1, " (R.IVA @b%3s@r Prot. @b%ld@r) ", (const char*)_reg,protiva);
|
||||
}
|
||||
|
||||
_devo_riportare = TRUE;
|
||||
|
||||
break;
|
||||
|
||||
case LF_RMOV:
|
||||
|
Loading…
x
Reference in New Issue
Block a user