From 01f69a6474ecaed63e26dfa92fbc1f29a056f5c3 Mon Sep 17 00:00:00 2001 From: luca Date: Mon, 21 Mar 2011 16:57:29 +0000 Subject: [PATCH] Patch level : Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/branches/R_10_00@21811 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg7.cpp | 26 +++++++++++ cg/cg7.h | 2 + cg/cg7100.cpp | 30 +++++++++++++ cg/cg7200.cpp | 111 ++++++++++++++++++++++++++++++++++++++++++++++ cg/cg7200a.h | 10 +++++ cg/cg7200a.rep | 103 +++++++++++++++++++++++++++++++++++++++++++ cg/cg7200a.uml | 116 +++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 398 insertions(+) create mode 100755 cg/cg7.cpp create mode 100755 cg/cg7.h create mode 100755 cg/cg7100.cpp create mode 100755 cg/cg7200.cpp create mode 100755 cg/cg7200a.h create mode 100755 cg/cg7200a.rep create mode 100755 cg/cg7200a.uml diff --git a/cg/cg7.cpp b/cg/cg7.cpp new file mode 100755 index 000000000..11939c5cb --- /dev/null +++ b/cg/cg7.cpp @@ -0,0 +1,26 @@ +#include +#include + +#include "cg7.h" + +#define usage "Error - usage : %s -{0|1}" + +int main(int argc,char** argv) + +{ + int rt = -1 ; + const int r = (argc > 1) ? atoi(&argv[1][1]) : -1; + + switch (r) + { + case 0: + rt = cg7100(argc, argv) ; break; //gestore stampe generico modulo FE (stampe particolari CG) + break; + case 1: + rt = cg7200(argc, argv) ; break; //lista fatture per imponibile + break; + default: + error_box(usage, argv[0]) ; break; + } + return rt; +} diff --git a/cg/cg7.h b/cg/cg7.h new file mode 100755 index 000000000..82a4de366 --- /dev/null +++ b/cg/cg7.h @@ -0,0 +1,2 @@ +int cg7100(int argc, char* argv[]); +int cg7200(int argc, char* argv[]); \ No newline at end of file diff --git a/cg/cg7100.cpp b/cg/cg7100.cpp new file mode 100755 index 000000000..889e69d86 --- /dev/null +++ b/cg/cg7100.cpp @@ -0,0 +1,30 @@ +#include +#include +#include + +#include "../ba/ba8500.h" + +/////////////////////////////////////////////////////////// +// TBruceWayne_app +/////////////////////////////////////////////////////////// + +class TBruceWayne_app : public TKlarkKent_app +{ +protected: + virtual TReport* create_report(const char* name) const; +}; + +TReport* TBruceWayne_app::create_report(const char* name) const +{ + TReport* rep = new TReport; + rep->load(name); + const TFilename rep_name = name; + return rep; +} + +int cg7100(int argc, char* argv[]) +{ + TBruceWayne_app app; + app.run(argc, argv, TR("Stampa Report Contabilita'")); + return 0; +} diff --git a/cg/cg7200.cpp b/cg/cg7200.cpp new file mode 100755 index 000000000..2a351a062 --- /dev/null +++ b/cg/cg7200.cpp @@ -0,0 +1,111 @@ +#include +#include +#include +#include + +#include "../ba/ba8500.h" + +#include "../cg/cg7200a.h" + +/////////////////////////////////////////////////////////// +// Report +/////////////////////////////////////////////////////////// + +class TPrint_x_imponibile_report : public TReport +{ +protected: + virtual bool use_mask() { return false; } + +public: + TPrint_x_imponibile_report(); +}; + +TPrint_x_imponibile_report::TPrint_x_imponibile_report() +{ + load("cg7200a"); +} + +/////////////////////////////////////////////////////////// +// Maschera +/////////////////////////////////////////////////////////// + +class TPrint_x_imponibile_mask : public TAutomask +{ +protected: + virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly); + +public: + void elabora(); + TPrint_x_imponibile_mask(); + virtual ~TPrint_x_imponibile_mask() {} +}; + + +void TPrint_x_imponibile_mask::elabora() +{ + const char tipodate = get(F_TIPODATE)[0]; + const char tipoelenco = get(F_TIPOELENCO)[0]; + const long codcf = get_long(F_CODCF); + const int anno = get_int(F_ANNO); + + TString query; + + if (tipodate == 'R') //per data di 'R'egistrazione + { + query << "USE MOV KEY 3"; + query << "\nSELECT (ANNOIVA=" << anno << ")"; + query << "\nFROM TIPO=" << tipoelenco; + if (codcf > 0L) + query << " CODCF=" << codcf; + query << "\nTO TIPO=" << tipoelenco; + if (codcf > 0L) + query << " CODCF=" << codcf; + } + else //per data 'D'ocumento + { + } + + TPrint_x_imponibile_report rep; + rep.set_recordset(query); + +} + +bool TPrint_x_imponibile_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) +{ + return true; +} + +TPrint_x_imponibile_mask::TPrint_x_imponibile_mask() : TAutomask("cg7200a") +{ +} + + +/////////////////////////////////////////////////////////// +// Applicazione +/////////////////////////////////////////////////////////// + +class TPrint_x_imponibile : public TKlarkKent_app +{ +protected: + +public: + virtual void main_loop(); +}; + + +void TPrint_x_imponibile::main_loop() +{ + TPrint_x_imponibile_mask mask; + + while (mask.run() == K_ENTER) + { + mask.elabora(); + } +} + +int cg7200(int argc, char* argv[]) +{ + TPrint_x_imponibile app; + app.run(argc, argv, TR("Lista fatture per imponibile")); + return 0; +} diff --git a/cg/cg7200a.h b/cg/cg7200a.h new file mode 100755 index 000000000..1a739b6b9 --- /dev/null +++ b/cg/cg7200a.h @@ -0,0 +1,10 @@ +#define F_CODDITTA 201 +#define F_RAGSOC 202 +#define F_DATASTAMPA 203 +#define F_ANNO 204 +#define F_TIPODATE 205 +#define F_DATAINI 206 +#define F_DATAFIN 207 +#define F_TIPOELENCO 208 +#define F_CODCF 209 +#define F_DESCF 210 \ No newline at end of file diff --git a/cg/cg7200a.rep b/cg/cg7200a.rep new file mode 100755 index 000000000..c01d41b28 --- /dev/null +++ b/cg/cg7200a.rep @@ -0,0 +1,103 @@ + + + Lista fatture per imponibile + +
+
+ + #TIPOELENCO + +
+
+ CODCF + + MESSAGE RESET,F2 + + MESSAGE ISAMREAD,20,TIPOCF=#H1.101!CODCF=#102,RAGSOC + + + CODCF + +
+
+
+
+ MESSAGE RESET,F11 +
+
+ USE RMOVIVA +FROM NUMREG=#PARENT.NUMREG +TO NUMREG=#PARENT.NUMREG + + NUMRIG + + + IMPONIBILE + + + IMPOSTA + + + CODIVA + + + MESSAGE TABLEREAD,%IVA,CODIVA,S1 + +
  • "IMPONIBILE" @ "F11.201" +! "IMPOSTA" @ "F11.202" +!
  • +
  • "IMPONIBILE" @ "F11.211" +! "IMPOSTA" @ "F11.212" +!
  • +
  • "IMPONIBILE" @ "F11.221" +! "IMPOSTA" @ "F11.222" +!
  • +
  • "IMPONIBILE" @ "F11.231" +! "IMPOSTA" @ "F11.232" +!
  • +
    +
    +
    + +
    +
    +
    + USE MOV KEY 3 +SELECT (ANNOIVA=2010) +FROM TIPO=C +TO TIPO=C + \ No newline at end of file diff --git a/cg/cg7200a.uml b/cg/cg7200a.uml new file mode 100755 index 000000000..648f0766c --- /dev/null +++ b/cg/cg7200a.uml @@ -0,0 +1,116 @@ +#include "cg7200a.h" + +TOOLBAR "topbar" 0 0 0 2 + +#include + +ENDPAGE + +PAGE "Lista fatture per imponibile" 0 2 0 0 + +NUMBER F_CODDITTA 5 +BEGIN + PROMPT 1 1 "Ditta " + FLAGS "FRD" + USE LF_NDITTE KEY 1 + CHECKTYPE REQUIRED + INPUT CODDITTA F_CODDITTA + DISPLAY "Codice" CODDITTA + DISPLAY "Ragione sociale @50" RAGSOC + OUTPUT F_CODDITTA CODDITTA + OUTPUT F_RAGSOC RAGSOC +END + +STRING F_RAGSOC 50 +BEGIN + PROMPT 15 1 "" + FLAGS "D" +END + +DATE F_DATASTAMPA +BEGIN + PROMPT 1 2 "Data stampa " + HELP "Data in cui viene effettuata la stampa" + FLAGS "A" +END + +NUMBER F_ANNO 4 +BEGIN + PROMPT 1 3 "Anno " + CHECKTYPE REQUIRED + FIELD #ANNO +END + +GROUPBOX DLG_NULL 76 4 +BEGIN + PROMPT 1 4 "@bParametri movimenti" +END + +LIST F_TIPODATE 13 +BEGIN + PROMPT 2 5 "Seleziona per data di: " + HELP "Movimenti per data registrazione o data documento" + ITEM "R|Registrazione" + ITEM "D|Documento" +END + +DATE F_DATAINI +BEGIN + PROMPT 2 6 "Stampa movimenti dalla data " + HELP "Data da cui iniziare la stampa" +END + +DATE F_DATAFIN +BEGIN + PROMPT 50 6 "alla data " + HELP "Data fino a cui eseguire la stampa" +END + +GROUPBOX DLG_NULL 76 4 +BEGIN + PROMPT 1 8 "@bParametri clienti/fornitori" +END + +LIST F_TIPOELENCO 9 +BEGIN + PROMPT 2 9 "Tipo elenco " + HELP "Indicare cosa includere nella stampa" + ITEM "C|Clienti" + ITEM "F|Fornitori" + FIELD #TIPOELENCO +END + +NUMBER F_CODCF 6 +BEGIN + PROMPT 2 10 "Cliente/Fornitore " + HELP "Indicare il codice da cui iniziare la stampa" + GROUP 1 + USE LF_CLIFO + INPUT TIPOCF F_TIPOELENCO SELECT + INPUT CODCF F_CODCF + DISPLAY "Tipo" TIPOCF + DISPLAY "Codice" CODCF + DISPLAY "Ragione sociale@50" RAGSOC + OUTPUT F_CODCF CODCF + OUTPUT F_DESCF RAGSOC + FLAGS "R" + CHECKTYPE NORMAL +END + +STRING F_DESCF 50 45 +BEGIN + PROMPT 29 10 "" + GROUP 1 + USE LF_CLIFO KEY 2 + INPUT TIPOCF F_TIPOELENCO SELECT + INPUT RAGSOC F_DESCF + DISPLAY "Tipo" TIPOCF + DISPLAY "Ragione sociale@50" RAGSOC + DISPLAY "Codice" CODCF + COPY OUTPUT F_CODCF + CHECKTYPE NORMAL +END + +ENDPAGE + +ENDMASK