From fe678ec77466654726418e67f4fae1027939a425 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 21 Apr 2009 15:31:08 +0000 Subject: [PATCH] Patch level : 10.0 286 Files correlati : ve0.exe Ricompilazione Demo : [ ] Commento : Preventivi/incarichi (Dinamica) git-svn-id: svn://10.65.10.50/trunk@18756 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- pe/pe0500.cpp | 24 ++++++++++++------------ pe/pe0500.h | 4 ++-- pe/pe0500a.uml | 20 +++++++++++++++----- pe/pe0600.cpp | 14 ++++++++------ pe/pe0600a.uml | 8 ++++++++ ve/velib04.cpp | 9 ++++++--- 6 files changed, 51 insertions(+), 28 deletions(-) diff --git a/pe/pe0500.cpp b/pe/pe0500.cpp index 1d4fc54b0..dc092bfbb 100755 --- a/pe/pe0500.cpp +++ b/pe/pe0500.cpp @@ -44,19 +44,19 @@ void TGenerazione_esecutivo::genera_matricola(TRiga_documento & row) const TString & name = str->get(i); if (name.starts_with("PROG")) { - TTable lv(format("LV%1d", livello + 1)); + TTable mat(format("VE%1d", livello + 1)); const int chars = atoi(name.after("PROG")); - lv.put("CODTAB", code); - if (lv.read(_isequal) != NOERR) + mat.put("CODTAB", code); + if (mat.read(_isequal) != NOERR) { - lv.zero(); - lv.put("CODTAB", code); - lv.write(); + mat.zero(); + mat.put("CODTAB", code); + mat.write(); } - const int prog = lv.get_int("I0") + 1; - lv.put("I0", prog); - lv.rewrite(); + const int prog = mat.get_int("I0") + 1; + mat.put("I0", prog); + mat.rewrite(); TString s; s << prog; s.lpad(chars, '0'); code << s; } @@ -241,8 +241,8 @@ void TGenEsecutivo_app::main_loop() TGenerazione_esecutivo e(m.get(F_CODICE_ESEC)); TGenerazione_ordine o(m.get(F_CODICE_ORC)); - e.preserve_original_row(); - o.preserve_original_row(); + e.preserve_original_rif(); + o.preserve_original_rif(); cur.freeze(); TProgind pi(tot, "Generazione in corso...", FALSE, TRUE); for (cur = 0; cur.pos() < tot; ++cur) @@ -258,7 +258,7 @@ void TGenEsecutivo_app::main_loop() doc_in.add(srcdoc); e.elabora(doc_in, doc_out, data); - doc_in.rewrite(); +// doc_in.rewrite(); doc_out.write(); doc_in.destroy(-1); { diff --git a/pe/pe0500.h b/pe/pe0500.h index 7aeb2327d..8c2228f71 100755 --- a/pe/pe0500.h +++ b/pe/pe0500.h @@ -6,7 +6,7 @@ #define F_FROM_FRNDOC 206 #define F_FROM_TONDOC 207 #define F_CODICE_ESEC 208 -#define F_DESCR_ESEC 209 +#define F_DESC_ESEC 209 #define F_CODICE_ORC 210 -#define F_DESCR_ORC 211 +#define F_DESC_ORC 211 #define F_DATA 212 diff --git a/pe/pe0500a.uml b/pe/pe0500a.uml index 917c5d2e3..32c743b1b 100755 --- a/pe/pe0500a.uml +++ b/pe/pe0500a.uml @@ -89,7 +89,7 @@ END STRING F_CODICE_ESEC 8 BEGIN - PROMPT 1 6 "Esecutivi " + PROMPT 2 6 "Esecutivi " FLAG "U" USE %ELD SELECT I0==4 INPUT CODTAB F_CODICE_ESEC @@ -103,7 +103,7 @@ END STRING F_DESC_ESEC 50 BEGIN - PROMPT 20 6 "" + PROMPT 24 6 "" USE %ELD KEY 2 SELECT I0==4 INPUT S0 F_DESC_ESEC DISPLAY "Descrizione@55" S0 @@ -113,7 +113,7 @@ END STRING F_CODICE_ORC 8 BEGIN - PROMPT 1 7 "Ordini " + PROMPT 2 7 "Ordini " FLAG "U" USE %ELD SELECT I0==4 INPUT CODTAB F_CODICE_ORC @@ -127,7 +127,7 @@ END STRING F_DESC_ORC 50 BEGIN - PROMPT 20 7 "" + PROMPT 24 7 "" USE %ELD KEY 2 SELECT I0==4 INPUT S0 F_DESC_ORC DISPLAY "Descrizione@55" S0 @@ -137,7 +137,17 @@ END DATE F_DATA BEGIN - PROMPT 1 9 "Data " + PROMPT 2 9 "Data " +END + +ENDPAGE + +TOOLBAR "" 0 -2 0 2 + +STRING DLG_PROFILE 50 +BEGIN + PROMPT 9 -11 "Profilo " + PSELECT END ENDPAGE diff --git a/pe/pe0600.cpp b/pe/pe0600.cpp index 96ba009e7..83fa64dbf 100755 --- a/pe/pe0600.cpp +++ b/pe/pe0600.cpp @@ -166,10 +166,12 @@ void TGenOrdini_app::main_loop() const long tot = cur.items(); if (tot > 0L) { - TGenerazione_ordine_produzione e(m.get(F_CODICE_ORP)); - TGenerazione_ordine_acquisto o(m.get(F_CODICE_ORA)); + TGenerazione_ordine_produzione p(m.get(F_CODICE_ORP)); + TGenerazione_ordine_acquisto a(m.get(F_CODICE_ORA)); - cur.freeze(); + p.preserve_original_rif(); + a.preserve_original_rif(); + cur.freeze(); TProgind pi(tot, "Generazione in corso...", FALSE, TRUE); for (cur = 0; cur.pos() < tot; ++cur) { @@ -177,19 +179,19 @@ void TGenOrdini_app::main_loop() TDocumento srcdoc(cur.curr()), newdoc; - if (e.is_document_ok(srcdoc)) + if (p.is_document_ok(srcdoc)) { TLista_documenti doc_in; TLista_documenti doc_out; doc_in.add(srcdoc); - e.elabora(doc_in, doc_out, data); + p.elabora(doc_in, doc_out, data); doc_in.rewrite(); doc_out.write(); doc_in.destroy(-1); doc_out.destroy(-1); doc_in.add(srcdoc); - o.elabora(doc_in, doc_out, data); + a.elabora(doc_in, doc_out, data); doc_in.rewrite(); doc_out.write(); } diff --git a/pe/pe0600a.uml b/pe/pe0600a.uml index 65c8e998d..1cff9a9ab 100755 --- a/pe/pe0600a.uml +++ b/pe/pe0600a.uml @@ -142,4 +142,12 @@ END ENDPAGE +TOOLBAR "" 0 -2 0 2 + +STRING DLG_PROFILE 50 +BEGIN + PROMPT 9 -11 "Profilo " + PSELECT +END + ENDMASK diff --git a/ve/velib04.cpp b/ve/velib04.cpp index b84e972ed..89e6e520c 100755 --- a/ve/velib04.cpp +++ b/ve/velib04.cpp @@ -592,13 +592,16 @@ bool TCopia_documento::elabora(TLista_documenti& doc_in, TLista_documenti& doc_o const TDocumento& doc_src = doc_in[d]; if (doc_out.items() <= d) { - doc_out.add(new TDocumento('D', doc_src.get_int(DOC_ANNO), codice_numerazione_finale(), 0L)); - doc_out[d].put(DOC_TIPODOC, tipo_finale()); - doc_out[d].put(DOC_STATO, stato_finale()); + const TString4 codnum = codice_numerazione_finale(); + doc_out.add(new TDocumento('D', doc_src.get_int(DOC_ANNO), codnum, 0L)); } TDocumento& doc_dest = doc_out[d]; doc_dest.copy_contents(doc_src); + const TString4 tipodoc = tipo_finale(); + doc_dest.put(DOC_TIPODOC, tipodoc); + const TString4 stato = stato_finale(); + doc_dest.put(DOC_STATO, stato); // Scancello tutti gli inutili riferimenti al documento origine if (!_preserve_original_rif)