From 78be666f1c8c537d3dbc60cf5de9041ae91769c2 Mon Sep 17 00:00:00 2001 From: paola Date: Tue, 25 Mar 1997 16:05:38 +0000 Subject: [PATCH] Correzioni generiche. git-svn-id: svn://10.65.10.50/trunk@4238 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ef/batbbnp.h | 2 +- ef/batbbnp.rpt | 30 ++++++++++++++---------------- ef/batbbnp.uml | 8 +++++--- ef/ef0100.cpp | 8 +++++--- ef/ef0300.cpp | 19 ++++++++++++++++--- ef/ef0300a.uml | 2 +- 6 files changed, 42 insertions(+), 27 deletions(-) diff --git a/ef/batbbnp.h b/ef/batbbnp.h index 98fe7cfd1..8d6e33824 100755 --- a/ef/batbbnp.h +++ b/ef/batbbnp.h @@ -9,7 +9,7 @@ #define F_DENOM 105 #define F_CAB 106 #define F_CC_INC 107 -#define F_FIDO_INC 108 +//#define F_FIDO_INC 108 #define F_CC_CONT_INC 109 #define F_CC_SBF 110 #define F_FIDO_SBF 111 diff --git a/ef/batbbnp.rpt b/ef/batbbnp.rpt index 83d8547e3..e6dd73622 100755 --- a/ef/batbbnp.rpt +++ b/ef/batbbnp.rpt @@ -3,29 +3,27 @@ Tabella Banche di Presentazione 1|@0g%s|Codice 1|@8g%s|Codice -1|@18g%s|Portafoglio Effetti Salvo Buon Fine -1|@62g%s|Portafoglio Effetti All'Incasso -1|@96g%s|Portafoglio Effetti Allo Sconto +1|@18g%s|Portafoglio Effetti All'Incasso +1|@52g%s|Portafoglio Effetti Salvo Buon Fine +1|@91g%s|Portafoglio Effetti Allo Sconto 2|@1g%s|ABI 2|@9g%s|CAB 2|@18g%s|C/C -2|@28g%s|C/Cont. -2|@40g%s|Castelletto -2|@54g%s|C/C +2|@30g%s|C/Cont. +2|@52g%s|C/C 2|@64g%s|C/Cont. -2|@74g%s|Castelletto +2|@76g%s|Castelletto 2|@91g%s|C/C -2|@101g%s|C/Cont. -2|@110g%s|Castelletto +2|@103g%s|C/Cont. +2|@119g%s|Castelletto [Rows] 1|CODTAB[1,5]|@1g@5s 1|CODTAB[6,10]|@9g@5s -1|S0|@16g@10s -1|S3|@26g@10s -1|R0|@36g@15,rpn|##########@,@@ -1|S1|@54g@10s +1|S0|@18g@10s +1|S3|@30g@10s +1|S1|@52g@10s 1|S4|@64g@10s -1|R1|@74g@15,rpn|##########@,@@ +1|R1|@72g@15,rpn|##########@,@@ 1|S2|@91g@10s -1|S5|@101g@10s -1|R2|@110g@15,rpn|##########@,@@ \ No newline at end of file +1|S5|@103g@10s +1|R2|@115g@15,rpn|##########@,@@ \ No newline at end of file diff --git a/ef/batbbnp.uml b/ef/batbbnp.uml index 8598ed63b..93bd95fa8 100755 --- a/ef/batbbnp.uml +++ b/ef/batbbnp.uml @@ -96,7 +96,7 @@ END GROUPBOX DLG_NULL 78 4 BEGIN - PROMPT 1 4 "Portafoglio effetti all' incasso" + PROMPT 1 4 "Portafoglio Effetti all' incasso" END STRING F_CC_INC 20 @@ -105,12 +105,14 @@ BEGIN FIELD BNP->S0 END +/* NUMBER F_FIDO_INC 20 2 BEGIN PROMPT 45 5 "Fido " FIELD BNP->R0 PICTURE "###.###.###.###,@@" END +*/ STRING F_CC_CONT_INC 20 BEGIN @@ -120,7 +122,7 @@ END GROUPBOX DLG_NULL 78 4 BEGIN - PROMPT 1 8 "Portafoglio effetti salvo buon fine" + PROMPT 1 8 "Portafoglio Effetti salvo buon fine" END STRING F_CC_SBF 20 @@ -144,7 +146,7 @@ END GROUPBOX DLG_NULL 78 4 BEGIN - PROMPT 1 12 "Portafoglio effetti allo sconto" + PROMPT 1 12 "Portafoglio Effetti allo sconto" END STRING F_CC_SCN 20 diff --git a/ef/ef0100.cpp b/ef/ef0100.cpp index f93e83174..a444608dd 100755 --- a/ef/ef0100.cpp +++ b/ef/ef0100.cpp @@ -261,7 +261,7 @@ bool TVariazione_effetti::user_create() _effetto = new TEffetto; _msk->set_handler(F_CODVAL, codval_handler); _msk->set_handler(F_SHEET_RIGHE, handle_sheet); - righe_sheet().set_append(FALSE); + righe_sheet().set_append(TRUE); righe_sheet().set_notify(impeff_notify); return TRUE; } @@ -367,14 +367,16 @@ bool TVariazione_effetti::impeff_notify(TSheet_field& s, int r, KEY key) { if (s.to_check(key, TRUE)) { - + calcola_totali(); + } + if (key == K_ENTER) + { TToken_string& row = s.row(s.selected()); char tipo_num = row.get(8)[0]; if (tipo_num == 'D') row.add("Definitiva",8); else row.add("Provvisoria",8); - calcola_totali(); } //se rimane una sola riga nello sheet non la si può cancellare if (key == K_DEL && s.items() == 1) diff --git a/ef/ef0300.cpp b/ef/ef0300.cpp index 47d30d48e..019209682 100755 --- a/ef/ef0300.cpp +++ b/ef/ef0300.cpp @@ -30,6 +30,7 @@ protected: virtual TMask* get_mask(int mode) {return _msk;} virtual bool changing_mask(int mode) {return FALSE;} static bool codval_handler(TMask_field& f, KEY k); + static bool tipodist_handler(TMask_field& f, KEY k); static bool importo_handler(TMask_field& f, KEY k); static bool imp_aut_handler(TMask_field& f, KEY k); static bool impdist_notify(TSheet_field& s, int r, KEY key); @@ -104,7 +105,6 @@ const char* TVariazione_distinte::get_next_key() effetti.put(EFF_NDIST,ndist); effetti.setkey(4); int err = effetti.read(_isgteq); - if ( (err == _iskeynotfound) || (err == _iseof) ) { //se non esiste alcuna distinta: il numero sarà 1 err == NOERR; @@ -193,9 +193,7 @@ TToken_string* TVariazione_distinte::common_f(const TMask& m) TDate datadist = (TDate)m.get(F_DATA);// distinta long codabi = m.get_long(F_CODABIP); // dalla maschera long codcab = m.get_long(F_CODCABP); - m.autosave(*_rel); - TToken_string* datidist= new TToken_string; // creo la token string datidist->cut(0); datidist->add(tipodist); // inserisco i dati nella @@ -411,6 +409,7 @@ bool TVariazione_distinte::user_create() _distinta = new TDistinta; set_search_field(F_NUMBER);//setto il campo di ricerca della distinta _msk->set_handler(F_CODVAL, codval_handler); + _msk->set_handler(F_TIPODIST, tipodist_handler); _msk->set_handler(F_IMP, importo_handler); _m2->set_handler(F_TOTIMPDIST, imp_aut_handler); _m2->set_handler(DLG_OK, conferma_handler); @@ -526,6 +525,20 @@ bool TVariazione_distinte::codval_handler(TMask_field& f, KEY k) return TRUE; } +// Handler per gestire il fatto che una distinta allo sconto può +// contenere solo effetti cambiari +bool TVariazione_distinte::tipodist_handler(TMask_field& f, KEY k) +{ + TMask &m = f.mask(); + char tipo(f.get()[0]); + if(k == K_SPACE) + { + if(tipo == 'S') + m.set(F_TIPOPAG,2); + } + return TRUE; +} + // Handler per gestire il caricamento degli effetti nella distinta // in automatico relativamente ad un importo fissato (per la maschera // princiapale) diff --git a/ef/ef0300a.uml b/ef/ef0300a.uml index 81e162c0c..4b27175a8 100755 --- a/ef/ef0300a.uml +++ b/ef/ef0300a.uml @@ -19,7 +19,7 @@ BEGIN FIELD LF_EFFETTI->TIPODIST ITEM "I|All'incasso" ITEM "B|Salvo buon fine" - ITEM "S|Allo sconto" + ITEM "S|Allo sconto" END LIST F_NUMBERRIGA 12