From 27816e76937542a952285caa598b8595de708cb9 Mon Sep 17 00:00:00 2001 From: luca Date: Tue, 24 Feb 2009 16:08:30 +0000 Subject: [PATCH] Patch level :10.0 Files correlati : Ricompilazione Demo : [ ] Commento :personalizzazione dolber (ex vesirio) messa in ps git-svn-id: svn://10.65.10.50/trunk@18340 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ps/indice_programmi.txt | 3 ++ ps/pd0001.cpp | 19 ++++++++++ ps/pd0001.h | 6 +++ ve/vesirio1.cpp => ps/pd0001100.cpp | 55 +++++++++++++--------------- ve/vesirioa.h => ps/pd0001100a.h | 0 ve/vesirioa.uml => ps/pd0001100a.uml | 16 ++------ ve/bolle.trr => ps/pd0001b.trr | 0 ve/fatture.trr => ps/pd0001f.trr | 0 ve/movc.trr => ps/pd0001m.trr | 0 ve/rbolle.trr => ps/pd0001rb.trr | 0 ve/rfatture.trr => ps/pd0001rf.trr | 0 ve/rmovc.trr => ps/pd0001rm.trr | 0 ve/vesirio.cpp | 19 ---------- ve/vesirio.h | 10 ----- 14 files changed, 58 insertions(+), 70 deletions(-) create mode 100755 ps/pd0001.cpp create mode 100755 ps/pd0001.h rename ve/vesirio1.cpp => ps/pd0001100.cpp (96%) rename ve/vesirioa.h => ps/pd0001100a.h (100%) rename ve/vesirioa.uml => ps/pd0001100a.uml (82%) rename ve/bolle.trr => ps/pd0001b.trr (100%) rename ve/fatture.trr => ps/pd0001f.trr (100%) rename ve/movc.trr => ps/pd0001m.trr (100%) rename ve/rbolle.trr => ps/pd0001rb.trr (100%) rename ve/rfatture.trr => ps/pd0001rf.trr (100%) rename ve/rmovc.trr => ps/pd0001rm.trr (100%) delete mode 100755 ve/vesirio.cpp delete mode 100755 ve/vesirio.h diff --git a/ps/indice_programmi.txt b/ps/indice_programmi.txt index b4aa2cfca..b21c85261 100755 --- a/ps/indice_programmi.txt +++ b/ps/indice_programmi.txt @@ -1,6 +1,9 @@ PF0001 Stampa etichette Fiorito +PD0001 +Trasferimento ad AS400 Dolber (antico vesirio.exe) + PD0300 Valorizzazione articoli DASSI diff --git a/ps/pd0001.cpp b/ps/pd0001.cpp new file mode 100755 index 000000000..868efed96 --- /dev/null +++ b/ps/pd0001.cpp @@ -0,0 +1,19 @@ +#include +#include "pd0001.h" + +extern int pd0001100(int argc, char* argv[]); //scrive file .dbf per AS400 (ma pensa te...!) + +int main(int argc, char **argv) +{ + const int r= (argc>1)? argv[1][1]-'0' : -1; + + switch (r) + { + case (0): + pd0001100(argc, argv); break; + default: + pd0001100(argc, argv); break; + } + exit(0); + return 0; +} diff --git a/ps/pd0001.h b/ps/pd0001.h new file mode 100755 index 000000000..6e7579a08 --- /dev/null +++ b/ps/pd0001.h @@ -0,0 +1,6 @@ +int pd0001100(int argc, char* argv[]); + + + + + diff --git a/ve/vesirio1.cpp b/ps/pd0001100.cpp similarity index 96% rename from ve/vesirio1.cpp rename to ps/pd0001100.cpp index f112f7d82..3c94cdbe7 100755 --- a/ve/vesirio1.cpp +++ b/ps/pd0001100.cpp @@ -1,21 +1,16 @@ -#include #include -#include -#include #include -#include -#include -#include "vesirio.h" -#include "vesirioa.h" +#include "pd0001.h" +#include "pd0001100a.h" -#include "doc.h" -#include "rdoc.h" -#include "mov.h" -#include "rmov.h" -#include "partite.h" +#include +#include +#include +#include +#include #include "rmoviva.h" -#include "velib.h" +#include "../ve/velib.h" //=====MASCHERA============================================================// class TToas400_mask : public TAutomask @@ -28,7 +23,7 @@ public: virtual ~TToas400_mask() {}; }; -TToas400_mask::TToas400_mask() :TAutomask ("vesirioa") {} +TToas400_mask::TToas400_mask() :TAutomask ("pd0001100a") {} bool TToas400_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) { @@ -67,6 +62,8 @@ class TToas400 : public TSkeleton_application TString _trrpath; protected: + virtual const char * extra_modules() const {return "ve";} + void copia_rigadoc(TRectype& recdest, const TRectype& recsource, const TRectype& rectestata) const; bool genera_righedoc(const TString& path, char tipo); @@ -114,7 +111,7 @@ bool TToas400::destroy() void TToas400::ini2mask() { //carica i parametri di trasferimento dal ditta.ini - TConfig fileini(CONFIG_DITTA, "Sirio"); + TConfig fileini(CONFIG_DITTA, "pd0001"); _trrpath = fileini.get("PATH"); _dataultb = fileini.get("DATAULTB"); _dataultf = fileini.get("DATAULTF"); @@ -125,11 +122,11 @@ void TToas400::ini2mask() TToken_string ultimo; _mask->set(F_DATA_ULT_TRASF_B, _dataultb); - ultimo = fileini.get("bolle", NULL, -1, "2004|B01"); + ultimo = fileini.get("bolle", NULL, -1, "2008|B01"); _mask->set(F_NUM_B, ultimo.get(1)); _mask->set(F_DATA_ULT_TRASF_F, _dataultf); - ultimo = fileini.get("fatt", NULL, -1, "2004|FAA"); + ultimo = fileini.get("fatt", NULL, -1, "2008|FAA"); _mask->set(F_NUM_F, ultimo.get(1)); _mask->set(F_DATA_ULT_TRASF_M, _dataultm); @@ -248,7 +245,7 @@ int TToas400::separa_sconti(const TString& sconto, TToken_string& sconti4) const bool TToas400::genera_righedoc(const TString& path, char t) { //Crea il file vuoto delle righe documenti - const char* tipor = t == 'B' ? "rbolle" : "rfatture"; + const char* tipor = t == 'B' ? "pd0001rb" : "pd0001rf"; TFilename trrrig = path; trrrig.add(tipor); trrrig.ext("trr"); TFilename siriorig = path; siriorig.add(tipor); siriorig.ext("dbf"); @@ -258,8 +255,8 @@ bool TToas400::genera_righedoc(const TString& path, char t) //lettura da prassid.ini dell'ultima bolla/fattura trasferita //ATTENZIONE!La numerazione documenti é unica per bolle e fatture rispettivamente! Ovvero non é possibile trasferire 2 tipi //di fatture con codice diverso (o 2 tipi di bolle con codice diverso) - TConfig fileini(CONFIG_DITTA, "Sirio"); - TToken_string ultimo = fileini.get(tipor+1, NULL, -1, t == 'B' ? "2004|B01" : "2004|FAA"); + TConfig fileini(CONFIG_DITTA, "pd0001"); + TToken_string ultimo = fileini.get(tipor+1, NULL, -1, t == 'B' ? "2008|B01" : "2008|FAA"); //scandisce il file doc.dbf alla ricerca dei documenti non ancora esportati... TRelation rel(LF_RIGHEDOC); @@ -379,7 +376,7 @@ void TToas400::copia_documento(TRectype& recdest, const TRectype& recsource, con // tipo -> B=bolle, F=fatture bool TToas400::genera_documenti(const TString& path, char t) { - const char* tipo = t == 'B' ? "bolle" : "fatture"; + const char* tipo = t == 'B' ? "pd0001b" : "pd0001f"; //crea il file delle testate delle bolle utilizzando bolle.trr come tracciato record TFilename siriodoc = path; siriodoc.add(tipo); siriodoc.ext("dbf"); @@ -389,8 +386,8 @@ bool TToas400::genera_documenti(const TString& path, char t) documenti.zap(); //lettura da prassid.ini dell'ultima bolla/fattura trasferita (se non la trova, di default mette B01|2002|D|0) - TConfig fileini(CONFIG_DITTA, "Sirio"); - TToken_string ultimo = fileini.get(tipo, NULL, -1, t == 'B' ? "2004|B01" : "2004|FAA"); + TConfig fileini(CONFIG_DITTA, "pd0001"); + TToken_string ultimo = fileini.get(tipo, NULL, -1, t == 'B' ? "2008|B01" : "2008|FAA"); //scandisce il file doc.dbf alla ricerca dei documenti non ancora esportati... TRelation rel(LF_DOC); @@ -454,8 +451,8 @@ bool TToas400::genera_documenti(const TString& path, char t) bool TToas400::genera_righemov(const TString& path) { //crea il file vuoto delle righe movimenti utilizzando rmovc.trr come tracciato record - TFilename siriomov = path; siriomov.add("rmovc"); siriomov.ext("dbf"); - TFilename trrmov = path; trrmov.add("rmovc"); trrmov.ext("trr"); + TFilename siriomov = path; siriomov.add("pd0001rm"); siriomov.ext("dbf"); + TFilename trrmov = path; trrmov.add("pd0001rm"); trrmov.ext("trr"); TExternisamfile righe(siriomov, trrmov); righe.zap(); @@ -574,13 +571,13 @@ bool TToas400::genera_righeiva(const TString& path) bool TToas400::genera_movimenti(const TString& path) { //crea il file delle testate dei movimenti contabili di pagamento utilizzando movc.trr come tracciato record - TFilename siriomov = path; siriomov.add("movc"); siriomov.ext("dbf"); - TFilename trrmov = path; trrmov.add("movc"); trrmov.ext("trr"); + TFilename siriomov = path; siriomov.add("pd0001m"); siriomov.ext("dbf"); + TFilename trrmov = path; trrmov.add("pd0001m"); trrmov.ext("trr"); TExternisamfile movimenti(siriomov, trrmov); movimenti.zap(); //lettura da prassid.ini dell'ultimo movimento trasferito (se non lo trova, di default mette 1|MOV - TConfig fileini(CONFIG_DITTA, "Sirio"); + TConfig fileini(CONFIG_DITTA, "pd0001"); TToken_string ultimo = fileini.get("Movimenti", NULL, -1, "0"); //scandisce il file mov.dbf alla ricerca dei movimenti non ancora esportati... @@ -761,7 +758,7 @@ void TToas400::main_loop() } //===================================================================// -int vesirio1(int argc, char* argv[]) +int pd0001100(int argc, char* argv[]) { TToas400 a; a.run(argc,argv,TR("Esportazione documenti ad AS400")); diff --git a/ve/vesirioa.h b/ps/pd0001100a.h similarity index 100% rename from ve/vesirioa.h rename to ps/pd0001100a.h diff --git a/ve/vesirioa.uml b/ps/pd0001100a.uml similarity index 82% rename from ve/vesirioa.uml rename to ps/pd0001100a.uml index 0fece7933..6b69b7873 100755 --- a/ve/vesirioa.uml +++ b/ps/pd0001100a.uml @@ -1,20 +1,12 @@ -#include "vesirioa.h" +#include "pd0001100a.h" -TOOLBAR "" 0 -3 0 3 +TOOLBAR "" 0 0 0 2 -BUTTON DLG_OK 10 2 -BEGIN - PROMPT -12 -11 "" -END - -BUTTON DLG_QUIT 10 2 -BEGIN - PROMPT -22 -11 "" -END +#include ENDPAGE -PAGE "Esportazione documenti ad AS400" -1 -1 78 18 +PAGE "Esportazione documenti ad AS400" 0 2 0 0 GROUPBOX DLG_NULL 78 9 BEGIN diff --git a/ve/bolle.trr b/ps/pd0001b.trr similarity index 100% rename from ve/bolle.trr rename to ps/pd0001b.trr diff --git a/ve/fatture.trr b/ps/pd0001f.trr similarity index 100% rename from ve/fatture.trr rename to ps/pd0001f.trr diff --git a/ve/movc.trr b/ps/pd0001m.trr similarity index 100% rename from ve/movc.trr rename to ps/pd0001m.trr diff --git a/ve/rbolle.trr b/ps/pd0001rb.trr similarity index 100% rename from ve/rbolle.trr rename to ps/pd0001rb.trr diff --git a/ve/rfatture.trr b/ps/pd0001rf.trr similarity index 100% rename from ve/rfatture.trr rename to ps/pd0001rf.trr diff --git a/ve/rmovc.trr b/ps/pd0001rm.trr similarity index 100% rename from ve/rmovc.trr rename to ps/pd0001rm.trr diff --git a/ve/vesirio.cpp b/ve/vesirio.cpp deleted file mode 100755 index e3c1346f9..000000000 --- a/ve/vesirio.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include "vesirio.h" - -extern int vesirio(int argc, char* argv[]); //scrive file .dbf per AS400 (ma pensa te...!) - -int main(int argc, char **argv) -{ - const int r= (argc>1)? argv[1][1]-'0' : -1; - - switch (r) - { - case (0): - vesirio1(argc, argv); break; - default: - vesirio1(argc, argv); break; - } - exit(0); - return 0; -} diff --git a/ve/vesirio.h b/ve/vesirio.h deleted file mode 100755 index c17cda4aa..000000000 --- a/ve/vesirio.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __VESIRIO_H -#define __VESIRIO_H - -int vesirio1(int argc, char* argv[]); - -#endif // __VESIRIO_H - - - -