diff --git a/tp/tp0.cpp b/tp/tp0.cpp index 170423e64..334eab9d1 100755 --- a/tp/tp0.cpp +++ b/tp/tp0.cpp @@ -7,10 +7,13 @@ int main(int argc, char** argv) switch (n) { case 1: - tp0200(argc, argv); + tp0200(argc, argv); //tabelle PACK + break; + case 8: + tp0900(argc, argv); //dichiarazione CONAI break; default: - tp0100(argc, argv); + tp0100(argc, argv); //trasferimento PACK break; } return 0; diff --git a/tp/tp0.h b/tp/tp0.h index 24d2d65fa..a29c0ec39 100755 --- a/tp/tp0.h +++ b/tp/tp0.h @@ -1,2 +1,3 @@ int tp0100(int argc, char* argv[]); -int tp0200(int argc, char* argv[]); \ No newline at end of file +int tp0200(int argc, char* argv[]); +int tp0900(int argc, char* argv[]); diff --git a/tp/tp0900.cpp b/tp/tp0900.cpp new file mode 100755 index 000000000..39effe72d --- /dev/null +++ b/tp/tp0900.cpp @@ -0,0 +1,75 @@ +#include "tp0900a.h" + +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////// +// MASCHERA +/////////////////////////////////////////////////////////// +class TDichiarazione_CONAI_mask : public TAutomask +{ +protected: + virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly); + +public: + TDichiarazione_CONAI_mask(); + virtual ~TDichiarazione_CONAI_mask() {} +}; + +TDichiarazione_CONAI_mask::TDichiarazione_CONAI_mask() : TAutomask("tp0900a") +{ +} + +bool TDichiarazione_CONAI_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) +{ + switch (o.dlg()) + { + case F_PERIODO: + break; + default: + break; + } + + return true; +} + +/////////////////////////////////////////////////////////// +// APPLICAZIONE +/////////////////////////////////////////////////////////// + +class TDichiarazione_CONAI : public TSkeleton_application +{ + +public: + virtual bool create(); + virtual void main_loop(); + +}; + +void TDichiarazione_CONAI::main_loop() +{ + TDichiarazione_CONAI_mask mask; + while (mask.run() == K_ENTER) + { + + } +} + +bool TDichiarazione_CONAI::create() +{ + if (!has_module(DCAUT)) + return error_box(TR("Modulo non autorizzato")); + + return TSkeleton_application::create(); +} + +int tp0900(int argc, char* argv[]) +{ + TDichiarazione_CONAI dc; + dc.run(argc, argv, TR("Dichiarazione CONAI")); + return 0; +} \ No newline at end of file diff --git a/tp/tp0900a.h b/tp/tp0900a.h new file mode 100755 index 000000000..6d625f00f --- /dev/null +++ b/tp/tp0900a.h @@ -0,0 +1,14 @@ +#ifndef __TP0900A_H +#define __TP0900A_H + +#define F_FIRM 101 +#define F_RAGSOC 102 + +#define F_PERIODO 111 +#define F_ANNO 112 +#define F_MESE 113 +#define F_TRIMESTRE 114 +#define F_TIPI 115 +#define F_SPECIECONAI 116 + +#endif diff --git a/tp/tp0900a.uml b/tp/tp0900a.uml new file mode 100755 index 000000000..4edfcfa5f --- /dev/null +++ b/tp/tp0900a.uml @@ -0,0 +1,175 @@ +#include "tp0900a.h" + +TOOLBAR "" 0 -3 0 3 + +BUTTON DLG_OK 10 2 +BEGIN + PROMPT -12 -11 "" +END + +BUTTON DLG_QUIT 10 2 +BEGIN + PROMPT -22 -11 "Fine" +END + +ENDPAGE + +PAGE "Dichiarazione CONAI" -1 -1 78 20 + +GROUPBOX DLG_NULL 78 3 +BEGIN + PROMPT 1 1 "@bDitta" +END + +NUMBER F_FIRM 5 +BEGIN + PROMPT 2 2 "" + USE LF_NDITTE + INPUT CODDITTA F_FIRM + OUTPUT F_RAGSOC RAGSOC + CHECKTYPE REQUIRED + FLAGS "DF" +END + +STRING F_RAGSOC 60 +BEGIN + PROMPT 17 2 "" + FLAGS "D" +END + +GROUPBOX DLG_NULL 78 5 +BEGIN + PROMPT 1 4 "@bPeriodo da considerare" +END + +RADIOBUTTON F_PERIODO 16 +BEGIN + PROMPT 2 4 "" + ITEM "1|Annuale" MESSAGE HIDE,F_TRIMESTRE|HIDE,F_MESE + ITEM "2|Trimestrale" MESSAGE SHOW,F_TRIMESTRE|HIDE,F_MESE + ITEM "3|Mensile" MESSAGE HIDE,F_TRIMESTRE|SHOW,F_MESE +END + +NUMBER F_ANNO 4 +BEGIN + PROMPT 28 5 "Anno " + HELP "Anno per cui effettuare la dichiarazione" + CHECKTYPE REQUIRED +END + +LIST F_MESE 15 +BEGIN + PROMPT 28 6 "Periodo " + HELP "Mese per cui effettuare la dichiarazione" + FLAGS "AM" +END + +LIST F_TRIMESTRE 15 +BEGIN + PROMPT 28 6 "Periodo " + HELP "Trimestre di cui effettuare la dichiarazione" + ITEM "3|1 Trimestre " + ITEM "6|2 Trimestre " + ITEM "9|3 Trimestre " + ITEM "12|4 Trimestre" +END + +TEXT DLG_NULL +BEGIN + PROMPT 1 9 "@bNumerazioni e tipi documento da considerare" +END + +SPREADSHEET F_TIPI 0 5 +BEGIN + PROMPT 1 10 "" + ITEM "Numerazione" + ITEM "Descrizione@50" + ITEM "Tipo" + ITEM "Descrizione@50" +END + +LIST F_SPECIECONAI 12 +BEGIN + PROMPT 1 16 "@bSpecie CONAI da considerare" + ITEM "1|Acciaio " + ITEM "2|Alluminio " + ITEM "3|Carta " + ITEM "4|Plastica " + ITEM "5|Legno " + ITEM "6|Vetro " + HELP "Codice spesa per contributo CONAI" +END + +ENDPAGE + +ENDMASK + +//maschera dello sheet sulle numerazioni/tipi documento +PAGE "Tipi" -1 -1 68 9 + +STRING 101 4 +BEGIN + PROMPT 1 1 "Numerazione " + USE %NUM + INPUT CODTAB 101 + DISPLAY "Codice" CODTAB + DISPLAY "Descrizione@50" S0 + OUTPUT 101 CODTAB + OUTPUT 102 S0 + CHECKTYPE NORMAL + FLAGS "U" +END + +STRING 102 50 +BEGIN + PROMPT 13 2 "" + USE %NUM KEY 2 + INPUT S0 102 + DISPLAY "Descrizione@50" S0 + DISPLAY "Codice" CODTAB + COPY OUTPUT 101 + CHECKTYPE NORMAL +END + +STRING 103 4 +BEGIN + PROMPT 1 3 "Tipo documento " + USE %TIP + INPUT CODTAB 103 + DISPLAY "Codice" CODTAB + DISPLAY "Descrizione@50" S0 + OUTPUT 103 CODTAB + OUTPUT 104 S0 + CHECKTYPE NORMAL + FLAGS "U" +END + +STRING 104 50 +BEGIN + PROMPT 13 4 "" + USE %TIP KEY 2 + INPUT S0 104 + DISPLAY "Descrizione@50" S0 + DISPLAY "Codice" CODTAB + COPY OUTPUT 103 + CHECKTYPE NORMAL +END + +BUTTON DLG_OK 10 2 +BEGIN + PROMPT -13 -1 "" +END + +BUTTON DLG_DELREC 10 2 +BEGIN + PROMPT -23 -1 "" +END + +BUTTON DLG_CANCEL 10 2 +BEGIN + PROMPT -33 -1 "" +END + +ENDPAGE + +ENDMASK diff --git a/tp/tpmenu.men b/tp/tpmenu.men index b04e5d829..5e6a60624 100755 --- a/tp/tpmenu.men +++ b/tp/tpmenu.men @@ -5,6 +5,7 @@ Module = Flags = "F" Item_01 = "Trasferimento Pack", "tp0 -0", "" Item_02 = "Tabelle di conversione", [TPMENU_002] +Item_03 = "Dichiarazione CONAI", "tp0 -8", "" [TPMENU_002] Caption = "Tabelle di conversione"