From a92ca9176764c14ae06417bfcf162ff46d79e74c Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 13 Dec 2011 16:24:15 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : ha2.exe ha2100a.msk Ricompilazione Demo : [ ] Commento : Gestione invio definitivo e forzature su file PRIVAT git-svn-id: svn://10.65.10.50/branches/R_10_00@22520 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ha/ha2100.cpp | 20 ++++++++++++++------ ha/ha2100a.h | 1 + ha/ha2100a.uml | 5 +++++ ha/ha2200.cpp | 2 +- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/ha/ha2100.cpp b/ha/ha2100.cpp index 49b346421..be10cc07c 100755 --- a/ha/ha2100.cpp +++ b/ha/ha2100.cpp @@ -179,6 +179,11 @@ void THardy_esselunga::elabora(const TMask& mask) const long items = genera_recordset(mask, recset); if (items == 0) log.log(1, "Non esistono documenti che soddisfano i parametri selezionati."); + + // memorizzo su campo virtuale che il doc. e' stato inviato + const bool definitivo = mask.get_bool(F_DEFINITIVO); + const bool forzatura = mask.get_bool(F_FORZATURA); + // lettura dei documenti da recordset TProgind pi(recset.items(), TR("Elaborazione documenti in corso..."), true, true); TPrivat_recordset privat(dipendenza); @@ -194,6 +199,10 @@ void THardy_esselunga::elabora(const TMask& mask) if ( codcf_esselunga > 0) { TDocumento doc(recset.cursor()->curr()); + + if (!forzatura && doc.get_bool("HA_PRIVAT")) + continue; // Scarta documenti già inviati + // passo tutte le righe del documento all'AS400recordset TString16 numdoc; const TString& num = doc.numerazione(); @@ -219,6 +228,11 @@ void THardy_esselunga::elabora(const TMask& mask) privat.set("QTARESA", "0000000"); } } //FOR_EACH... + if (definitivo) + { + doc.put("HA_PRIVAT", "X"); + doc.rewrite(); + } } // if check_cliente... } //for (bool ok = recset.move_first()... @@ -226,12 +240,6 @@ void THardy_esselunga::elabora(const TMask& mask) tempfile.temp(); privat.save_as(tempfile, fmt_text); fcopy(tempfile, file_privat, true); - // memorizzo su campo virtuale che il doc. e' stato inviato - const bool definitivo = mask.get_bool(F_DEFINITIVO); - if (definitivo) - { - - } log.print_or_preview(); } diff --git a/ha/ha2100a.h b/ha/ha2100a.h index 027e1f63a..bdf2ab306 100755 --- a/ha/ha2100a.h +++ b/ha/ha2100a.h @@ -5,6 +5,7 @@ #define F_DIPENDENZA 205 #define F_DEFINITIVO 206 #define F_SHEETDOC 207 +#define F_FORZATURA 208 // campi dello sheet #define F_S_CODNUM 101 #define F_S_DESNUM 102 diff --git a/ha/ha2100a.uml b/ha/ha2100a.uml index 30c4129bf..df426287f 100755 --- a/ha/ha2100a.uml +++ b/ha/ha2100a.uml @@ -77,6 +77,11 @@ BEGIN PROMPT 2 6 "Trasferimento definitivo" END +BOOLEAN F_FORZATURA +BEGIN + PROMPT 35 6 "Includere documenti già trasferiti" +END + SPREADSHEET F_SHEETDOC 78 10 BEGIN PROMPT 1 8 "Scelta documenti" diff --git a/ha/ha2200.cpp b/ha/ha2200.cpp index eeac41cc0..55d0d8cd0 100755 --- a/ha/ha2200.cpp +++ b/ha/ha2200.cpp @@ -691,7 +691,7 @@ void THardy_esselunga_fat::elabora(const TMask& mask) if (codcf_esselunga.full()) { TDocumento doc(recset.cursor()->curr()); - if (doc.get_bool("HA_FATTURE") && !forzatura) + if (!forzatura && doc.get_bool("HA_FATTURE")) continue; if (esistono_righe_esselunga(doc))