Patch level : 2.0 634
Files correlati : cg3.exe Ricompilazione Demo : [ ] Commento : CM20053 Se dall'anteprima di stampa mi collego alla prima nota e faccio una variazione dando registra, rientrando nel mastrino la procedura non mi chiede se voglio riaggionare la stampa. Devo rilanciarla git-svn-id: svn://10.65.10.50/trunk@11556 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
69f4663a88
commit
ec2ec2192d
@ -114,19 +114,19 @@ public:
|
||||
void set_bil_val(bil_ivd* b, const char* descr,char sez_opp,char let_opp,
|
||||
const char* numr_opp,int num_opp);
|
||||
|
||||
void process_link(int id, const char* txt);
|
||||
virtual bool process_link(int id, const char* txt);
|
||||
|
||||
CG1100_application() : _clivd(8), _clivdo(8), _d1("", 30), _d2("", 40) {}
|
||||
};
|
||||
|
||||
void CG1100_application::process_link(int id, const char* txt)
|
||||
bool CG1100_application::process_link(int id, const char* txt)
|
||||
{
|
||||
TString ss = "1|"; ss << txt;
|
||||
TMessage fs(cmd2name("cg0","-0"), MSG_LN, ss);
|
||||
TMailbox m;
|
||||
m.send(fs);
|
||||
TExternal_app cg0("cg0 -0");
|
||||
if (cg0.run()) beep();
|
||||
TToken_string str(txt);
|
||||
TRectype pcon(LF_PCON);
|
||||
pcon.put(PCN_GRUPPO, str.get(0));
|
||||
pcon.put(PCN_CONTO, str.get(1));
|
||||
pcon.put(PCN_SOTTOCONTO, str.get(2));
|
||||
return pcon.edit(LF_PCON, NULL, "cg0 -0");
|
||||
}
|
||||
|
||||
void CG1100_application::init_sort()
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
void set_rubriche();
|
||||
void set_etichette();
|
||||
void set_vendite(int f, int c) ;
|
||||
void process_link(int id, const char* txt);
|
||||
virtual bool process_link(int id, const char* txt);
|
||||
void ultimo_codice(char tipo);
|
||||
const char* compatta_ragsoc(TString& ragsoc,char tipoaper);
|
||||
void header_elenco();
|
||||
@ -108,8 +108,9 @@ public:
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
|
||||
void TPrintclifo_app::process_link(int id, const char* txt)
|
||||
bool TPrintclifo_app::process_link(int id, const char* txt)
|
||||
{
|
||||
/*
|
||||
TString ss = "1|";
|
||||
ss << txt;
|
||||
TMessage fs("cg0 -1", MSG_LN, ss);
|
||||
@ -117,6 +118,12 @@ void TPrintclifo_app::process_link(int id, const char* txt)
|
||||
m.send(fs);
|
||||
TExternal_app cg0("cg0 -1");
|
||||
if (cg0.run()) beep();
|
||||
*/
|
||||
TToken_string str(txt);
|
||||
TRectype clifo(LF_CLIFO);
|
||||
clifo.put(CLI_TIPOCF, str.get(0));
|
||||
clifo.put(CLI_CODCF, str.get());
|
||||
return clifo.edit(LF_CLIFO, NULL, "cg0 -1");
|
||||
}
|
||||
|
||||
const char* TPrintclifo_app::look_tab(const char* tabname, TString& cod,
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include <progind.h>
|
||||
#include <printapp.h>
|
||||
#include <sort.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include <mov.h>
|
||||
@ -2525,6 +2524,7 @@ void TStampa_bilanci::crea_sort_clifo()
|
||||
|
||||
int TStampa_bilanci::cerca_indbil(int g, int c)
|
||||
{
|
||||
/*
|
||||
TLocalisamfile pconti(LF_PCON);
|
||||
pconti.zero();
|
||||
pconti.put(PCN_GRUPPO,g);
|
||||
@ -2533,8 +2533,13 @@ int TStampa_bilanci::cerca_indbil(int g, int c)
|
||||
pconti.put(PCN_SOTTOCONTO,0l);
|
||||
|
||||
pconti.read();
|
||||
|
||||
return pconti.get_int(PCN_INDBIL);
|
||||
*/
|
||||
TString8 key; key.format("%d|%d", g, c);
|
||||
const int indbil = atoi(cache().get(LF_PCON, key, PCN_INDBIL));
|
||||
CHECKD(indbil > 0, "Indicatore di bilancio strano: ", indbil);
|
||||
return indbil;
|
||||
|
||||
}
|
||||
|
||||
void TStampa_bilanci::leggi_files_dare(TIsamtempfile* file)
|
||||
|
@ -146,7 +146,7 @@ protected:
|
||||
virtual void preprocess_header();
|
||||
virtual void preprocess_footer();
|
||||
virtual void set_page(int,int);
|
||||
virtual void process_link(int id, const char* txt);
|
||||
virtual bool process_link(int id, const char* txt);
|
||||
|
||||
void set_handlers(TMask* msk) const;
|
||||
bool mask2sheet();
|
||||
@ -237,24 +237,11 @@ int TMastrini_application::righe_rimaste_da_stampare()
|
||||
return righe_rimaste;
|
||||
}
|
||||
|
||||
void TMastrini_application::process_link(int id, const char* txt)
|
||||
bool TMastrini_application::process_link(int id, const char* txt)
|
||||
{
|
||||
TRectype mov(LF_MOV);
|
||||
mov.put(MOV_NUMREG, txt);
|
||||
mov.edit();
|
||||
|
||||
/* Vecchio modo barbaro ed obsoleto
|
||||
const char* const app = "cg2 -0";
|
||||
TToken_string ss(10);
|
||||
ss.add("1");
|
||||
ss.add(txt);
|
||||
|
||||
TMessage fs(cmd2name(app), MSG_LN, ss);
|
||||
fs.send();
|
||||
|
||||
TExternal_app pn(app);
|
||||
pn.run();
|
||||
*/
|
||||
return mov.edit();
|
||||
}
|
||||
|
||||
// Visualizzo le commesse se necessario
|
||||
|
@ -2327,25 +2327,7 @@ void TMastrini_grid::on_record_button(long rec)
|
||||
TWait_cursor hourglass;
|
||||
const TRectype& testata = _mastrino.testata(rec);
|
||||
|
||||
bool refresh = testata.edit(); // Nuovo metodo bello ed elegante
|
||||
|
||||
if (!refresh) // Vecchio modo brutto ed obsoleto da rimuovere
|
||||
{
|
||||
TString text;
|
||||
text << "1|" << testata.get(MOV_NUMREG);
|
||||
|
||||
const char* const appname = "cg2 -0";
|
||||
TMessage pn(appname, MSG_LN, text);
|
||||
pn.send();
|
||||
|
||||
TExternal_app a(appname);
|
||||
a.run();
|
||||
mask().set_focus();
|
||||
|
||||
TMailbox mail;
|
||||
refresh = mail.next_s(MSG_LN) != NULL;
|
||||
}
|
||||
|
||||
bool refresh = testata.edit();
|
||||
if (refresh && yesno_box(TR("Si desidera aggiornare il mastrino?")))
|
||||
reread();
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ int main(int argc,char** argv)
|
||||
case 9:
|
||||
cg4a00(argc,argv); break; // Gestione Autotrasportatori
|
||||
default:
|
||||
cg4100(argc,argv); break; // Rinumerazione
|
||||
cg4100(argc,argv); break; // Ricalcolo saldi
|
||||
}
|
||||
exit(0);
|
||||
return 0;
|
||||
|
@ -39,8 +39,6 @@ class CG4100_App : public TSkeleton_application
|
||||
TMask* _msk;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
bool set_parms();
|
||||
virtual void main_loop();
|
||||
|
||||
|
@ -87,7 +87,7 @@ TSaldo::TSaldo() : _saldi(LF_SALDI), _saldoiniziale(ZERO), _saldo_iniziale(ZERO)
|
||||
_prg_dare(ZERO), _prg_avere(ZERO), _saldo(ZERO), _annoes(0),
|
||||
_indbil(0), _prec(FALSE), _movimentato(FALSE), _significativo(FALSE),
|
||||
_rec_presente_ec(FALSE), _rec_presente_ep(FALSE),
|
||||
_causali_apertura(LF_CAUSALI, CAU_MOVAP), _movimenti(LF_MOV)
|
||||
_causali_apertura(LF_CAUSALI, CAU_MOVAP)
|
||||
|
||||
{}
|
||||
|
||||
@ -185,9 +185,7 @@ const TString& TSaldo::causale_apertura_es() const
|
||||
|
||||
bool TSaldo::leggi_mov(long nr)
|
||||
{
|
||||
TString16 n;
|
||||
n<<nr;
|
||||
const TRectype& mov = _movimenti.get(n);
|
||||
const TRectype& mov = cache().get(LF_MOV, nr);
|
||||
const bool ok = !mov.empty();
|
||||
if (ok)
|
||||
{
|
||||
@ -195,8 +193,6 @@ bool TSaldo::leggi_mov(long nr)
|
||||
_datareg = mov.get(MOV_DATAREG);
|
||||
_provv = mov.get(MOV_PROVVIS); // _provv.trim();
|
||||
_datacomp = mov.get(MOV_DATACOMP);
|
||||
if (_movimenti.items() >= 2048)
|
||||
_movimenti.destroy();
|
||||
}
|
||||
else
|
||||
NFCHECK("Testata assente: %ld", nr);
|
||||
@ -217,10 +213,10 @@ bool TSaldo::data_limite_bilancio(int bilancio, int g, int c, long s, const TDat
|
||||
TRelation rel(LF_RMOV);
|
||||
TRectype& rmov = rel.curr();
|
||||
|
||||
rmov.zero();
|
||||
rmov.put(RMV_GRUPPO,g);
|
||||
rmov.put(RMV_CONTO,c);
|
||||
rmov.put(RMV_SOTTOCONTO,s);
|
||||
|
||||
TCursor cur(&rel, filter, 2, &rmov, &rmov);
|
||||
const TRecnotype items = cur.items();
|
||||
cur.freeze();
|
||||
@ -271,7 +267,7 @@ bool TSaldo::data_limite_bilancio(int bilancio, int g, int c, long s, const TDat
|
||||
const real importo = rmov.get_real(RMV_IMPORTO);
|
||||
|
||||
// I mov. di puro riferimento (= con importo = 0) vanno scartati
|
||||
if (importo == ZERO)
|
||||
if (importo.is_zero())
|
||||
continue;
|
||||
|
||||
_movimentato = TRUE;
|
||||
@ -285,6 +281,9 @@ bool TSaldo::data_limite_bilancio(int bilancio, int g, int c, long s, const TDat
|
||||
#ifdef DBG
|
||||
xvt_statbar_refresh();
|
||||
#endif
|
||||
#ifdef __LONGDOUBLE__
|
||||
_saldo.round(TCurrency::get_firm_dec());
|
||||
#endif
|
||||
|
||||
return _movimentato;
|
||||
}
|
||||
|
@ -84,7 +84,6 @@ class TSaldo : public TObject
|
||||
bool _prec;
|
||||
|
||||
TDecoder _causali_apertura;
|
||||
TRecord_cache _movimenti;
|
||||
|
||||
protected:
|
||||
void InFinEs(int);
|
||||
|
Loading…
x
Reference in New Issue
Block a user