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
This commit is contained in:
luca 2009-02-24 16:08:30 +00:00
parent 1a13f6767a
commit 27816e7693
14 changed files with 58 additions and 70 deletions

View File

@ -1,6 +1,9 @@
PF0001 PF0001
Stampa etichette Fiorito Stampa etichette Fiorito
PD0001
Trasferimento ad AS400 Dolber (antico vesirio.exe)
PD0300 PD0300
Valorizzazione articoli DASSI Valorizzazione articoli DASSI

19
ps/pd0001.cpp Executable file
View File

@ -0,0 +1,19 @@
#include <xvt.h>
#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;
}

6
ps/pd0001.h Executable file
View File

@ -0,0 +1,6 @@
int pd0001100(int argc, char* argv[]);

View File

@ -1,21 +1,16 @@
#include <applicat.h>
#include <automask.h> #include <automask.h>
#include <config.h>
#include <isam.h>
#include <progind.h> #include <progind.h>
#include <recarray.h>
#include <relation.h>
#include "vesirio.h" #include "pd0001.h"
#include "vesirioa.h" #include "pd0001100a.h"
#include "doc.h" #include <doc.h>
#include "rdoc.h" #include <rdoc.h>
#include "mov.h" #include <mov.h>
#include "rmov.h" #include <rmov.h>
#include "partite.h" #include <partite.h>
#include "rmoviva.h" #include "rmoviva.h"
#include "velib.h" #include "../ve/velib.h"
//=====MASCHERA============================================================// //=====MASCHERA============================================================//
class TToas400_mask : public TAutomask class TToas400_mask : public TAutomask
@ -28,7 +23,7 @@ public:
virtual ~TToas400_mask() {}; 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) 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; TString _trrpath;
protected: protected:
virtual const char * extra_modules() const {return "ve";}
void copia_rigadoc(TRectype& recdest, const TRectype& recsource, const TRectype& rectestata) const; void copia_rigadoc(TRectype& recdest, const TRectype& recsource, const TRectype& rectestata) const;
bool genera_righedoc(const TString& path, char tipo); bool genera_righedoc(const TString& path, char tipo);
@ -114,7 +111,7 @@ bool TToas400::destroy()
void TToas400::ini2mask() void TToas400::ini2mask()
{ {
//carica i parametri di trasferimento dal ditta.ini //carica i parametri di trasferimento dal ditta.ini
TConfig fileini(CONFIG_DITTA, "Sirio"); TConfig fileini(CONFIG_DITTA, "pd0001");
_trrpath = fileini.get("PATH"); _trrpath = fileini.get("PATH");
_dataultb = fileini.get("DATAULTB"); _dataultb = fileini.get("DATAULTB");
_dataultf = fileini.get("DATAULTF"); _dataultf = fileini.get("DATAULTF");
@ -125,11 +122,11 @@ void TToas400::ini2mask()
TToken_string ultimo; TToken_string ultimo;
_mask->set(F_DATA_ULT_TRASF_B, _dataultb); _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_NUM_B, ultimo.get(1));
_mask->set(F_DATA_ULT_TRASF_F, _dataultf); _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_NUM_F, ultimo.get(1));
_mask->set(F_DATA_ULT_TRASF_M, _dataultm); _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) bool TToas400::genera_righedoc(const TString& path, char t)
{ {
//Crea il file vuoto delle righe documenti //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 trrrig = path; trrrig.add(tipor); trrrig.ext("trr");
TFilename siriorig = path; siriorig.add(tipor); siriorig.ext("dbf"); 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 //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 //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) //di fatture con codice diverso (o 2 tipi di bolle con codice diverso)
TConfig fileini(CONFIG_DITTA, "Sirio"); TConfig fileini(CONFIG_DITTA, "pd0001");
TToken_string ultimo = fileini.get(tipor+1, NULL, -1, t == 'B' ? "2004|B01" : "2004|FAA"); 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... //scandisce il file doc.dbf alla ricerca dei documenti non ancora esportati...
TRelation rel(LF_RIGHEDOC); TRelation rel(LF_RIGHEDOC);
@ -379,7 +376,7 @@ void TToas400::copia_documento(TRectype& recdest, const TRectype& recsource, con
// tipo -> B=bolle, F=fatture // tipo -> B=bolle, F=fatture
bool TToas400::genera_documenti(const TString& path, char t) 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 //crea il file delle testate delle bolle utilizzando bolle.trr come tracciato record
TFilename siriodoc = path; siriodoc.add(tipo); siriodoc.ext("dbf"); TFilename siriodoc = path; siriodoc.add(tipo); siriodoc.ext("dbf");
@ -389,8 +386,8 @@ bool TToas400::genera_documenti(const TString& path, char t)
documenti.zap(); documenti.zap();
//lettura da prassid.ini dell'ultima bolla/fattura trasferita (se non la trova, di default mette B01|2002|D|0) //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"); TConfig fileini(CONFIG_DITTA, "pd0001");
TToken_string ultimo = fileini.get(tipo, NULL, -1, t == 'B' ? "2004|B01" : "2004|FAA"); 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... //scandisce il file doc.dbf alla ricerca dei documenti non ancora esportati...
TRelation rel(LF_DOC); TRelation rel(LF_DOC);
@ -454,8 +451,8 @@ bool TToas400::genera_documenti(const TString& path, char t)
bool TToas400::genera_righemov(const TString& path) bool TToas400::genera_righemov(const TString& path)
{ {
//crea il file vuoto delle righe movimenti utilizzando rmovc.trr come tracciato record //crea il file vuoto delle righe movimenti utilizzando rmovc.trr come tracciato record
TFilename siriomov = path; siriomov.add("rmovc"); siriomov.ext("dbf"); TFilename siriomov = path; siriomov.add("pd0001rm"); siriomov.ext("dbf");
TFilename trrmov = path; trrmov.add("rmovc"); trrmov.ext("trr"); TFilename trrmov = path; trrmov.add("pd0001rm"); trrmov.ext("trr");
TExternisamfile righe(siriomov, trrmov); TExternisamfile righe(siriomov, trrmov);
righe.zap(); righe.zap();
@ -574,13 +571,13 @@ bool TToas400::genera_righeiva(const TString& path)
bool TToas400::genera_movimenti(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 //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 siriomov = path; siriomov.add("pd0001m"); siriomov.ext("dbf");
TFilename trrmov = path; trrmov.add("movc"); trrmov.ext("trr"); TFilename trrmov = path; trrmov.add("pd0001m"); trrmov.ext("trr");
TExternisamfile movimenti(siriomov, trrmov); TExternisamfile movimenti(siriomov, trrmov);
movimenti.zap(); movimenti.zap();
//lettura da prassid.ini dell'ultimo movimento trasferito (se non lo trova, di default mette 1|MOV //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"); TToken_string ultimo = fileini.get("Movimenti", NULL, -1, "0");
//scandisce il file mov.dbf alla ricerca dei movimenti non ancora esportati... //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; TToas400 a;
a.run(argc,argv,TR("Esportazione documenti ad AS400")); a.run(argc,argv,TR("Esportazione documenti ad AS400"));

View File

@ -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 #include <stdbar.h>
BEGIN
PROMPT -12 -11 ""
END
BUTTON DLG_QUIT 10 2
BEGIN
PROMPT -22 -11 ""
END
ENDPAGE ENDPAGE
PAGE "Esportazione documenti ad AS400" -1 -1 78 18 PAGE "Esportazione documenti ad AS400" 0 2 0 0
GROUPBOX DLG_NULL 78 9 GROUPBOX DLG_NULL 78 9
BEGIN BEGIN

View File

@ -1,19 +0,0 @@
#include <xvt.h>
#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;
}

View File

@ -1,10 +0,0 @@
#ifndef __VESIRIO_H
#define __VESIRIO_H
int vesirio1(int argc, char* argv[]);
#endif // __VESIRIO_H