Correzione errori MI6122 - MI6135 - MI6136 - MI6129 - MI6106 - MI0890
git-svn-id: svn://10.65.10.50/trunk@3670 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4c1ad8273a
commit
9358bdad25
@ -269,9 +269,10 @@ class CG1600_application : public TPrintapp
|
||||
Anni_es* _anni_es;
|
||||
Righe_sez_opp _sezopps;
|
||||
TSaldi_list* _listasld;
|
||||
TProgind* _prog;
|
||||
TProgind* _prog, *_prog_stampa;
|
||||
TParagraph_string* _descr,*_d;
|
||||
TSaldo* _sld;
|
||||
TSaldo* _sld;
|
||||
TPrtype _stampa;
|
||||
|
||||
TDate _data_fine_ese,_data_fine_ese_prec,_data_fine_raf,_data_fine_raf_prec;
|
||||
TDate _datastampa,_datalimite,_databilrafr,_datai,_datairaf;
|
||||
@ -310,6 +311,7 @@ class CG1600_application : public TPrintapp
|
||||
int _i;
|
||||
bool _reset_righe_stampa,_totale_attivita_gia_stampato,_totale_passivita_gia_stampato,_statopatr_no_stamp;
|
||||
bool _sbilancio_ordine, _quadratura;
|
||||
long _items_sort;
|
||||
//TString _causale_ap, _causale_chi;
|
||||
|
||||
public:
|
||||
@ -324,7 +326,9 @@ public:
|
||||
bool set_print(int);
|
||||
|
||||
virtual bool preprocess_page (int,int);
|
||||
virtual bool preprocess_print (int,int);
|
||||
virtual print_action postprocess_page (int,int);
|
||||
virtual print_action postprocess_print (int,int);
|
||||
virtual void postclose_print ();
|
||||
|
||||
virtual void preprocess_header();
|
||||
@ -971,7 +975,8 @@ void CG1600_application::riempi_record(const TString& sez,
|
||||
{
|
||||
set_bil_key(_bil, sez[0], let[0], numerorom, numero, FALSE, g, c, s, tipocf);
|
||||
set_bil_val(_bil, saldo, saldorafr, sld_dare, sld_avere, mov_dare, mov_avere,conto_dettagliato);
|
||||
_sort->sort ((const char*) _bil);
|
||||
_sort->sort ((const char*) _bil);
|
||||
_items_sort++;
|
||||
}
|
||||
|
||||
void CG1600_application::crea_sort_tabella()
|
||||
@ -2101,11 +2106,14 @@ bool CG1600_application::calcola(int g, int c, long s,
|
||||
{
|
||||
//if (codcaus == causale_apertura())
|
||||
if (cau.apertura())
|
||||
{
|
||||
if (sezione == "D")
|
||||
_saldo_ini_dare += importo;
|
||||
else _saldo_ini_avere += importo;
|
||||
conto_mov = TRUE;
|
||||
{
|
||||
if (data >= _data_ini_ese && data <= _datafine)
|
||||
{
|
||||
if (sezione == "D")
|
||||
_saldo_ini_dare += importo;
|
||||
else _saldo_ini_avere += importo;
|
||||
conto_mov = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (_dataini > _data_ini_ese) //calcolo i progressivi precedenti
|
||||
@ -2166,6 +2174,11 @@ if (tasto == K_ENTER)
|
||||
{
|
||||
_tipo_stampa = atoi(_msk->get(F_TIPOSTAMPA1));
|
||||
_prog = new TProgind(_pconti->items(),"Elaborazione in corso... prego attendere",FALSE);
|
||||
if (_tipo_stampa == 2)
|
||||
{
|
||||
_anno_esercizio = _annoese;
|
||||
_anno_esercizio_raf = _annoeserafr;
|
||||
}
|
||||
}
|
||||
|
||||
_cont_let = 0;
|
||||
@ -2235,6 +2248,8 @@ if (tasto == K_ENTER)
|
||||
// le classi presenti sulla tabella IV dir. CEE, altrimenti passo solamente
|
||||
// le classi associate ai conti/sottoconti del Piano dei conti.
|
||||
|
||||
_items_sort = 0;
|
||||
|
||||
init_sort();
|
||||
if (_intera_struttura)
|
||||
crea_sort_tabella();
|
||||
@ -3666,8 +3681,28 @@ print_action CG1600_application::postprocess_page(int file, int counter)
|
||||
return REPEAT_PAGE;
|
||||
}
|
||||
|
||||
bool CG1600_application::preprocess_page(int file, int counter)
|
||||
print_action CG1600_application::postprocess_print(int file, int counter)
|
||||
{
|
||||
if (_stampa != screenvis)
|
||||
delete _prog_stampa;
|
||||
|
||||
return NEXT_PAGE;
|
||||
}
|
||||
|
||||
bool CG1600_application::preprocess_print(int file,int counter)
|
||||
{
|
||||
_stampa = printer().printtype();
|
||||
if (_stampa != screenvis)
|
||||
_prog_stampa = new TProgind(_items_sort,"Preparazione stampa... prego attendere",FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool CG1600_application::preprocess_page(int file, int counter)
|
||||
{
|
||||
if (_stampa != screenvis)
|
||||
_prog_stampa->addstatus(1);
|
||||
|
||||
if (_tipo_bilancio == 1)
|
||||
{
|
||||
if (preprocess_stampa_scalare(counter))
|
||||
|
@ -120,6 +120,7 @@ DATE F_DATALIM
|
||||
BEGIN
|
||||
PROMPT 4 9 "Data limite "
|
||||
HELP "Data fin alla quale si vuole la stampa"
|
||||
FLAGS "G"
|
||||
// VALIDATE NOT_EMPTY_FUNC
|
||||
END
|
||||
|
||||
@ -127,20 +128,23 @@ DATE F_DATABILRAF
|
||||
BEGIN
|
||||
PROMPT 36 9 "Data bil. da raffrontare "
|
||||
HELP "Data d'esercizio da raffrontare con data limite"
|
||||
FLAGS "G"
|
||||
// VALIDATE NOT_EMPTY_FUNC
|
||||
END
|
||||
|
||||
DATE F_DATAINI
|
||||
BEGIN
|
||||
PROMPT 26 9 ""
|
||||
HELP "Data di inizio calcolo"
|
||||
HELP "Data di inizio calcolo"
|
||||
FLAGS "G"
|
||||
// VALIDATE NOT_EMPTY_FUNC
|
||||
END
|
||||
|
||||
DATE F_DATAFINE
|
||||
BEGIN
|
||||
PROMPT 62 9 ""
|
||||
HELP "Data di fine calcolo"
|
||||
HELP "Data di fine calcolo"
|
||||
FLAGS "G"
|
||||
// VALIDATE NOT_EMPTY_FUNC
|
||||
END
|
||||
|
||||
|
@ -2441,7 +2441,20 @@ void TMastrini_application::ricerca_dati_ditta()
|
||||
_unloc->curr().put(ULC_CODULC,"1");
|
||||
_unloc->read();
|
||||
_indulc=_unloc->curr().get(ULC_INDULC);
|
||||
_civulc=_unloc->curr().get(ULC_CIVULC);
|
||||
_civulc=_unloc->curr().get(ULC_CIVULC);
|
||||
int len = _indulc.len();
|
||||
if (len <= 31)
|
||||
{
|
||||
if (len <= 26)
|
||||
_indulc << " " << _civulc;
|
||||
else
|
||||
_indulc << " " << _civulc.mid(0,5);
|
||||
}
|
||||
else
|
||||
{
|
||||
_indulc = _indulc.mid(0,31);
|
||||
_indulc << " " << _civulc.mid(0,5);
|
||||
}
|
||||
_capulc=_unloc->curr().get(ULC_CAPULC);
|
||||
_comulc=_unloc->curr().get(ULC_COMULC);
|
||||
|
||||
@ -2498,19 +2511,6 @@ void TMastrini_application::crea_intestazione()
|
||||
|
||||
set_header (1, "@0gDITTA@6g%5ld", _codice_ditta);
|
||||
set_header (1, "@12g%-.45s", (const char*) _ragsoc);
|
||||
int len = _indulc.len();
|
||||
if (len <= 31)
|
||||
{
|
||||
if (len <= 26)
|
||||
_indulc << " " << _civulc;
|
||||
else
|
||||
_indulc << " " << _civulc.mid(0,5);
|
||||
}
|
||||
else
|
||||
{
|
||||
_indulc = _indulc.mid(0,31);
|
||||
_indulc << " " << _civulc.mid(0,5);
|
||||
}
|
||||
set_header (1, "@59g%s", (const char*) _indulc);
|
||||
//set_header (1, "@86g%-.9s", (const char*) _civulc);
|
||||
set_header (1, "@97g%-.5s", (const char*) _capulc);
|
||||
@ -2673,19 +2673,6 @@ int TMastrini_application::crea_intestazione(int start_riga)
|
||||
|
||||
set_row (r, "@0gDITTA@6g%5ld", _codice_ditta);
|
||||
set_row (r, "@12g%-45s", (const char*) _ragsoc);
|
||||
int len = _indulc.len();
|
||||
if (len <= 31)
|
||||
{
|
||||
if (len <= 26)
|
||||
_indulc << " " << _civulc;
|
||||
else
|
||||
_indulc << " " << _civulc.mid(0,5);
|
||||
}
|
||||
else
|
||||
{
|
||||
_indulc = _indulc.mid(0,31);
|
||||
_indulc << " " << _civulc.mid(0,5);
|
||||
}
|
||||
set_row (r, "@59g%s", (const char*) _indulc);
|
||||
// set_row (r, "@86g%-9s", (const char*) _civulc);
|
||||
set_row (r, "@97g%-5s", (const char*) _capulc);
|
||||
@ -2937,8 +2924,8 @@ void TMastrini_application::calcola_progressivi()
|
||||
|
||||
TLocalisamfile saldi(LF_SALDI, FALSE);
|
||||
real progdare_attuale,progavere_attuale,progdare_prec,progavere_prec;
|
||||
real saldo,progredare_eseprec,progreavere_eseprec,pdarep,paverep;
|
||||
char salini;
|
||||
real saldo,progredare_eseprec,progreavere_eseprec,pdarep,paverep,saldoini_attuale,saldofine_attuale;
|
||||
char salini,salini_attuale,salfine_attuale;
|
||||
|
||||
saldo = ZERO;
|
||||
pdarep = ZERO;
|
||||
@ -2971,7 +2958,10 @@ void TMastrini_application::calcola_progressivi()
|
||||
saldo = saldi.get_real(SLD_SALDO);
|
||||
salini = saldi.get(SLD_FLAGSALINI)[0];
|
||||
_ultima_data_reg = saldi.get_date(SLD_DATAULMOV);
|
||||
|
||||
saldoini_attuale = saldi.get_real(SLD_SALDO);
|
||||
salini_attuale = saldi.get_char(SLD_FLAGSALINI);
|
||||
saldofine_attuale = saldi.get_real(SLD_SALDOFIN);
|
||||
salfine_attuale = saldi.get_char(SLD_FLAGSALFIN);
|
||||
}
|
||||
|
||||
//Calcola i progressivi dell'esercizio precedente
|
||||
@ -3058,12 +3048,30 @@ void TMastrini_application::calcola_progressivi()
|
||||
if (_annomsk != 0)
|
||||
{
|
||||
_totprogre_dare_al = progdare_attuale + progdare_prec;
|
||||
_totprogre_avere_al = progavere_attuale + progavere_prec;
|
||||
_totprogre_avere_al = progavere_attuale + progavere_prec;
|
||||
|
||||
if (salini_attuale == 'D')
|
||||
_totprogre_dare_al += saldoini_attuale;
|
||||
else if (salini_attuale == 'A')
|
||||
_totprogre_avere_al += saldoini_attuale;
|
||||
if (salfine_attuale == 'D')
|
||||
_totprogre_dare_al += saldofine_attuale;
|
||||
else if (salfine_attuale == 'A')
|
||||
_totprogre_avere_al += saldofine_attuale;
|
||||
}
|
||||
else
|
||||
{
|
||||
_totprogre_dare_al = progdare_attuale;
|
||||
_totprogre_avere_al = progavere_attuale;
|
||||
|
||||
if (salini_attuale == 'D')
|
||||
_totprogre_dare_al += saldoini_attuale;
|
||||
else if (salini_attuale == 'A')
|
||||
_totprogre_avere_al += saldoini_attuale;
|
||||
if (salfine_attuale == 'D')
|
||||
_totprogre_dare_al += saldofine_attuale;
|
||||
else if (salfine_attuale == 'A')
|
||||
_totprogre_avere_al += saldofine_attuale;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -349,8 +349,8 @@ bool TSaldo::ultima_immissione_verifica(int annoes,int g,int c,long s,int indbil
|
||||
if (stp_prov == 1) //bilancio normale (senza provvisori)
|
||||
if (_saldo_iniziale == ZERO && _prg_dare == ZERO && _prg_avere == ZERO)
|
||||
return esito;
|
||||
|
||||
if (stp_prov == 0 && paverepro == ZERO)
|
||||
// if (stp_prov == 0 && paverepro == ZERO)
|
||||
if (stp_prov == 3 && paverepro == ZERO && pdarepro == ZERO) // Modifica del 24-09-96 errore MI0890.
|
||||
return esito;
|
||||
|
||||
if (sezione == 'A') _saldo_iniziale = -_saldo_iniziale;
|
||||
@ -374,9 +374,15 @@ bool TSaldo::ultima_immissione_verifica(int annoes,int g,int c,long s,int indbil
|
||||
break;
|
||||
case 2:
|
||||
_saldo = _saldo_iniziale + _prg_dare - _prg_avere + pdarepro - paverepro + saldofin; // W96SALDI del 19-06-96
|
||||
if (pdarepro != ZERO) // Modifica del 24-09-96 errore MI0890: nel caso in cui i progressivi
|
||||
_prg_dare = pdarepro; // pdarepro o paverepro sono compilati sono in presenza di un movimento
|
||||
if (paverepro != ZERO) // provvisorio, dunque li trasferisco nei progressivi che poi uso nel
|
||||
_prg_avere = paverepro; // CG1500 per la stampa.
|
||||
break;
|
||||
case 3:
|
||||
_saldo = pdarepro - paverepro;
|
||||
_saldo = pdarepro - paverepro;
|
||||
_prg_dare = pdarepro; // Idem come sopra.
|
||||
_prg_avere = paverepro; // N.B. Non e' detto che funzioni sempre!!!!!!
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user