Patch level : 10.0 192
Files correlati : tc9.exe Ricompilazione Demo : [ ] Commento : Invio sispac 0.01 git-svn-id: svn://10.65.10.50/trunk@17957 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6deb2be3da
commit
1ec69662d8
@ -8,7 +8,8 @@ int main(int argc, char** argv)
|
|||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
case 0: tc9100(argc,argv); break; // esiste sulla 4.0 Invio a Proforma
|
case 0: tc9100(argc,argv); break; // esiste sulla 4.0 Invio a Proforma
|
||||||
case 1: tc9200(argc,argv); break; // esiste dalla 4.0 Invio a Sispac/Cosmo
|
case 1: tc9200(argc,argv); break; // esiste dalla 4.0 Invio a ???
|
||||||
|
case 2: tc9300(argc,argv); break; // esiste dalla 4.0 Invio a Sispac/Cosmo
|
||||||
default: tc9100(argc,argv); break;
|
default: tc9100(argc,argv); break;
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
|
1
tc/tc9.h
1
tc/tc9.h
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
int tc9100(int argc, char** argv);
|
int tc9100(int argc, char** argv);
|
||||||
int tc9200(int argc, char** argv);
|
int tc9200(int argc, char** argv);
|
||||||
|
int tc9300(int argc, char** argv);
|
||||||
|
|
||||||
#endif // __TC9_H
|
#endif // __TC9_H
|
||||||
|
|
||||||
|
@ -12,37 +12,37 @@
|
|||||||
|
|
||||||
#define ALIAS_REG 100
|
#define ALIAS_REG 100
|
||||||
|
|
||||||
class TInvioS_file: public TFile_text
|
class TInvioW_file: public TFile_text
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
virtual void validate(TCursor& cur,TRecord_text &rec, TToken_string &val, TString& str);
|
virtual void validate(TCursor& cur,TRecord_text &rec, TToken_string &val, TString& str);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TInvioS_file(const TString& file_name);
|
TInvioW_file(const TString& file_name);
|
||||||
virtual ~TInvioS_file() { }
|
virtual ~TInvioW_file() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
TInvioS_file::TInvioS_file(const TString& file_name)
|
TInvioW_file::TInvioW_file(const TString& file_name)
|
||||||
: TFile_text(file_name, "tc9200a.ini")
|
: TFile_text(file_name, "tc9200a.ini")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
class TInvioS_mask : public TAutomask
|
class TInvioW_mask : public TAutomask
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TInvioS_mask();
|
TInvioW_mask();
|
||||||
|
|
||||||
virtual ~TInvioS_mask(){};
|
virtual ~TInvioW_mask(){};
|
||||||
};
|
};
|
||||||
|
|
||||||
TInvioS_mask::TInvioS_mask() :TAutomask ("tc9200a")
|
TInvioW_mask::TInvioW_mask() :TAutomask ("tc9200a")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TInvioS_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
bool TInvioW_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||||
{
|
{
|
||||||
switch (o.dlg())
|
switch (o.dlg())
|
||||||
{
|
{
|
||||||
@ -60,11 +60,11 @@ bool TInvioS_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
class TInvioS : public TSkeleton_application
|
class TInvioW : public TSkeleton_application
|
||||||
{
|
{
|
||||||
TCursor* _cur;
|
TCursor* _cur;
|
||||||
TInvioS_mask* _msk;
|
TInvioW_mask* _msk;
|
||||||
TInvioS_file* _trasfile;
|
TInvioW_file* _trasfile;
|
||||||
TConfig* _configfile;
|
TConfig* _configfile;
|
||||||
TDate _dataini, _datafin;
|
TDate _dataini, _datafin;
|
||||||
|
|
||||||
@ -72,24 +72,24 @@ protected:
|
|||||||
virtual bool create(void);
|
virtual bool create(void);
|
||||||
virtual bool destroy(void);
|
virtual bool destroy(void);
|
||||||
virtual void main_loop() ;
|
virtual void main_loop() ;
|
||||||
void invio_sispac();
|
void invio_whatis();
|
||||||
long i_sispac_clifor(const char* tipocf, const bool invio = TRUE);
|
long i_whatis_clifor(const char* tipocf, const bool invio = TRUE);
|
||||||
long i_sispac_movcont(const bool invio = TRUE);
|
long i_whatis_movcont(const bool invio = TRUE);
|
||||||
long i_sispac_moviva(const bool invio = TRUE);
|
long i_whatis_moviva(const bool invio = TRUE);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TInvioS_file* apri_file(const char* nome);
|
TInvioW_file* apri_file(const char* nome);
|
||||||
void chiudi_file(TInvioS_file* trasfile);
|
void chiudi_file(TInvioW_file* trasfile);
|
||||||
TConfig& config() {return *_configfile;};
|
TConfig& config() {return *_configfile;};
|
||||||
TInvioS() {} ;
|
TInvioW() {} ;
|
||||||
virtual ~TInvioS() {} ;
|
virtual ~TInvioW() {} ;
|
||||||
};
|
};
|
||||||
|
|
||||||
// restituisce un riferimento all' applicazione
|
// restituisce un riferimento all' applicazione
|
||||||
inline TInvioS& app() { return (TInvioS&) main_app();}
|
inline TInvioW& app() { return (TInvioW&) main_app();}
|
||||||
|
|
||||||
// gestione dei messaggi estesi nei campi
|
// gestione dei messaggi estesi nei campi
|
||||||
void TInvioS_file::validate(TCursor& cur,TRecord_text &rec, TToken_string &s, TString& str)
|
void TInvioW_file::validate(TCursor& cur,TRecord_text &rec, TToken_string &s, TString& str)
|
||||||
{
|
{
|
||||||
const TString code(s.get(0));
|
const TString code(s.get(0));
|
||||||
TString valore;
|
TString valore;
|
||||||
@ -185,26 +185,26 @@ void TInvioS_file::validate(TCursor& cur,TRecord_text &rec, TToken_string &s, TS
|
|||||||
str = valore;
|
str = valore;
|
||||||
}
|
}
|
||||||
|
|
||||||
TInvioS_file* TInvioS::apri_file(const char* nome)
|
TInvioW_file* TInvioW::apri_file(const char* nome)
|
||||||
{
|
{
|
||||||
TFilename filename = _msk->get(F_DESTINAZIONE);
|
TFilename filename = _msk->get(F_DESTINAZIONE);
|
||||||
filename.add(nome);
|
filename.add(nome);
|
||||||
filename.ext("txt");
|
filename.ext("txt");
|
||||||
if (filename.exist())
|
if (filename.exist())
|
||||||
remove(filename);
|
remove(filename);
|
||||||
TInvioS_file* trasfile = new TInvioS_file(filename);
|
TInvioW_file* trasfile = new TInvioW_file(filename);
|
||||||
trasfile->open(filename,'w');
|
trasfile->open(filename,'w');
|
||||||
trasfile->force_record_separator();
|
trasfile->force_record_separator();
|
||||||
return trasfile;
|
return trasfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TInvioS::chiudi_file(TInvioS_file* trasfile)
|
void TInvioW::chiudi_file(TInvioW_file* trasfile)
|
||||||
{
|
{
|
||||||
trasfile->close();
|
trasfile->close();
|
||||||
delete trasfile;
|
delete trasfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
long TInvioS::i_sispac_movcont(const bool invio)
|
long TInvioW::i_whatis_movcont(const bool invio)
|
||||||
{
|
{
|
||||||
TRectype da(LF_MOV);
|
TRectype da(LF_MOV);
|
||||||
TRectype a(LF_MOV);
|
TRectype a(LF_MOV);
|
||||||
@ -249,7 +249,7 @@ long TInvioS::i_sispac_movcont(const bool invio)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
long TInvioS::i_sispac_moviva(const bool invio)
|
long TInvioW::i_whatis_moviva(const bool invio)
|
||||||
{
|
{
|
||||||
TRectype da(LF_MOV);
|
TRectype da(LF_MOV);
|
||||||
TRectype a(LF_MOV);
|
TRectype a(LF_MOV);
|
||||||
@ -291,11 +291,11 @@ long TInvioS::i_sispac_moviva(const bool invio)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
long TInvioS::i_sispac_clifor(const char* tipocf, const bool invio)
|
long TInvioW::i_whatis_clifor(const char* tipocf, const bool invio)
|
||||||
{
|
{
|
||||||
TString80 nomefile = "FILE";
|
TString80 nomefile = "FILE";
|
||||||
nomefile << tipocf;
|
nomefile << tipocf;
|
||||||
TInvioS_file* trasfilecf = apri_file(_configfile->get(nomefile, "OPZIONI"));
|
TInvioW_file* trasfilecf = apri_file(_configfile->get(nomefile, "OPZIONI"));
|
||||||
TRelation rel(LF_CLIFO);
|
TRelation rel(LF_CLIFO);
|
||||||
rel.add(LF_COMUNI, "STATO==STATOCF|COM==COMCF", 1);
|
rel.add(LF_COMUNI, "STATO==STATOCF|COM==COMCF", 1);
|
||||||
rel.add(LF_ANAGFIS,"CODANAGR==CODANAGPER", 1);
|
rel.add(LF_ANAGFIS,"CODANAGR==CODANAGPER", 1);
|
||||||
@ -324,40 +324,40 @@ long TInvioS::i_sispac_clifor(const char* tipocf, const bool invio)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//metodone globale che chiama, come un menu, i vari sottometodi in base alle scelte sulla maschera
|
//metodone globale che chiama, come un menu, i vari sottometodi in base alle scelte sulla maschera
|
||||||
void TInvioS::invio_sispac()
|
void TInvioW::invio_whatis()
|
||||||
{
|
{
|
||||||
if (_msk->get_bool(F_CLIFOR))
|
if (_msk->get_bool(F_CLIFOR))
|
||||||
{
|
{
|
||||||
i_sispac_clifor("C");
|
i_whatis_clifor("C");
|
||||||
i_sispac_clifor("F");
|
i_whatis_clifor("F");
|
||||||
}
|
}
|
||||||
if (_msk->get_bool(F_MOVCONT))
|
if (_msk->get_bool(F_MOVCONT))
|
||||||
{
|
{
|
||||||
TString80 filename = _configfile->get("FILEM", "OPZIONI");
|
TString80 filename = _configfile->get("FILEM", "OPZIONI");
|
||||||
_trasfile = apri_file(filename);
|
_trasfile = apri_file(filename);
|
||||||
i_sispac_movcont();
|
i_whatis_movcont();
|
||||||
i_sispac_moviva();
|
i_whatis_moviva();
|
||||||
chiudi_file(_trasfile);
|
chiudi_file(_trasfile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TInvioS::create()
|
bool TInvioW::create()
|
||||||
{
|
{
|
||||||
_msk = new TInvioS_mask();
|
_msk = new TInvioW_mask();
|
||||||
TFilename configname = "tc9200conf.ini";
|
TFilename configname = "tc9200conf.ini";
|
||||||
configname.custom_path();
|
configname.custom_path();
|
||||||
_configfile = new TConfig(configname);
|
_configfile = new TConfig(configname);
|
||||||
return TSkeleton_application::create();
|
return TSkeleton_application::create();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TInvioS::destroy()
|
bool TInvioW::destroy()
|
||||||
{
|
{
|
||||||
delete _configfile;
|
delete _configfile;
|
||||||
delete _msk;
|
delete _msk;
|
||||||
return TSkeleton_application::destroy();
|
return TSkeleton_application::destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TInvioS::main_loop()
|
void TInvioW::main_loop()
|
||||||
{
|
{
|
||||||
_msk->set(F_NUMEROINVIO, _configfile->get_int("NUMEROINVIO","OPZIONI")+1);
|
_msk->set(F_NUMEROINVIO, _configfile->get_int("NUMEROINVIO","OPZIONI")+1);
|
||||||
_msk->set(F_DATAINI, _configfile->get("DATA","OPZIONI"));
|
_msk->set(F_DATAINI, _configfile->get("DATA","OPZIONI"));
|
||||||
@ -372,14 +372,14 @@ void TInvioS::main_loop()
|
|||||||
_datafin = _msk->get_date(F_DATAFIN);
|
_datafin = _msk->get_date(F_DATAFIN);
|
||||||
const char tipoinvio = _msk->get(F_TIPOINVIO)[0];
|
const char tipoinvio = _msk->get(F_TIPOINVIO)[0];
|
||||||
if (tipoinvio == 'S')
|
if (tipoinvio == 'S')
|
||||||
invio_sispac();
|
invio_whatis();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int tc9200(int argc, char **argv)
|
int tc9200(int argc, char **argv)
|
||||||
{
|
{
|
||||||
TInvioS a;
|
TInvioW a;
|
||||||
a.run(argc, argv, "Invio dati contabilità Sispac/Cosmo");
|
a.run(argc, argv, "Invio dati contabilità whatis");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1185
tc/tc9300.cpp
1185
tc/tc9300.cpp
File diff suppressed because it is too large
Load Diff
12
tc/tc9300a.h
Executable file
12
tc/tc9300a.h
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
// invio dati ad altra procedura
|
||||||
|
|
||||||
|
#define F_CODDITTA 101
|
||||||
|
#define F_RAGSOC 102
|
||||||
|
#define F_CLIFOR 112
|
||||||
|
#define F_MOVCONT 113
|
||||||
|
#define F_TIPOINVIO 120
|
||||||
|
#define F_DESTINAZIONE 121
|
||||||
|
#define F_NUMEROINVIO 122
|
||||||
|
#define F_DATAINI 123
|
||||||
|
#define F_DATAFIN 124
|
||||||
|
#define F_RIPRISTIN0 125
|
79
tc/tc9300a.uml
Executable file
79
tc/tc9300a.uml
Executable file
@ -0,0 +1,79 @@
|
|||||||
|
#include "tc9300a.h"
|
||||||
|
|
||||||
|
PAGE "Invio dati contabilita'" -1 -1 78 20
|
||||||
|
|
||||||
|
GROUPBOX DLG_NULL 76 3
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 1 "@bDitta corrente"
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_CODDITTA 5
|
||||||
|
BEGIN
|
||||||
|
PROMPT 3 2 "Codice "
|
||||||
|
FLAGS "FD"
|
||||||
|
USE LF_NDITTE
|
||||||
|
INPUT CODDITTA F_CODDITTA
|
||||||
|
OUTPUT F_RAGSOC RAGSOC
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_RAGSOC 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 23 2 ""
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
GROUPBOX DLG_NULL 76 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 4 "Dati da inviare"
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_CLIFOR
|
||||||
|
BEGIN
|
||||||
|
PROMPT 3 5 "Clienti/Fornitori"
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_MOVCONT
|
||||||
|
BEGIN
|
||||||
|
PROMPT 3 6 "Movimenti"
|
||||||
|
MESSAGE TRUE,ENABLE F_DATAFIN
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_DESTINAZIONE 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 9 "Destinazione "
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_NUMEROINVIO 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 10 "Numero invio "
|
||||||
|
END
|
||||||
|
|
||||||
|
DATE F_DATAINI
|
||||||
|
BEGIN
|
||||||
|
PROMPT 20 10 "Data iniz. "
|
||||||
|
END
|
||||||
|
|
||||||
|
DATE F_DATAFIN
|
||||||
|
BEGIN
|
||||||
|
PROMPT 44 10 "Data fin. "
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_RIPRISTIN0
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 11 "Ripristina movimenti da inviare"
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_OK 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -12 -1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_QUIT 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -22 -1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
ENDMASK
|
13
tc/tc9300conf.ini
Executable file
13
tc/tc9300conf.ini
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
[OPZIONI]
|
||||||
|
DATA =
|
||||||
|
PATH =
|
||||||
|
NUMEROINVIO =
|
||||||
|
[CAUSALI]
|
||||||
|
001=100
|
||||||
|
004=7
|
||||||
|
008=110
|
||||||
|
003=255
|
||||||
|
[CODIVA]
|
||||||
|
20=03
|
||||||
|
NS01=55
|
||||||
|
NS15=012
|
Loading…
x
Reference in New Issue
Block a user