Patch level : 4.0 673
Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione 3.1 patch 873 git-svn-id: svn://10.65.10.50/trunk@15151 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
956da6554d
commit
797e8900fb
@ -37,6 +37,7 @@ Item_01 = "Chiusura", "at0 -5", ""
|
||||
Item_02 = "Sblocco sospesi", "at0 -6", ""
|
||||
Item_03 = "Sblocco esclusi", "at0 -7", ""
|
||||
Item_04 = "Verifica integrita' dati", "at8 -4", ""
|
||||
Item_05 = "Estrazione per Osservatorio Nazionale", "at9 -5", ""
|
||||
|
||||
[AVIS_0012]
|
||||
Caption = "Tabelle"
|
||||
|
@ -1,9 +1,6 @@
|
||||
#include <msksheet.h>
|
||||
#include <prefix.h>
|
||||
#include <recarray.h>
|
||||
#include <relapp.h>
|
||||
#include <sheet.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "at0.h"
|
||||
|
@ -1,16 +1,8 @@
|
||||
#include <applicat.h>
|
||||
#include <execp.h>
|
||||
#include <mask.h>
|
||||
#include <msksheet.h>
|
||||
#include <mailbox.h>
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <validate.h>
|
||||
#include <lffiles.h>
|
||||
|
||||
#include "at0.h"
|
||||
|
||||
|
@ -1,16 +1,8 @@
|
||||
#include <applicat.h>
|
||||
#include <execp.h>
|
||||
#include <mask.h>
|
||||
#include <msksheet.h>
|
||||
#include <mailbox.h>
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <validate.h>
|
||||
#include <lffiles.h>
|
||||
|
||||
#include "at0.h"
|
||||
|
||||
|
@ -1,16 +1,8 @@
|
||||
#include <applicat.h>
|
||||
#include <execp.h>
|
||||
#include <mask.h>
|
||||
#include <msksheet.h>
|
||||
#include <mailbox.h>
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <validate.h>
|
||||
#include <lffiles.h>
|
||||
|
||||
#include "at0.h"
|
||||
|
||||
|
@ -1,8 +1,5 @@
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <recarray.h>
|
||||
#include <utility.h>
|
||||
#include <lffiles.h>
|
||||
|
||||
#include "at0.h"
|
||||
#include "atlib.h"
|
||||
|
@ -1,11 +1,7 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <prefix.h>
|
||||
#include <printapp.h>
|
||||
#include <recarray.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
#include <lffiles.h>
|
||||
|
||||
#include "at0.h"
|
||||
#include "atlib.h"
|
||||
|
@ -1,10 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <recarray.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
#include <lffiles.h>
|
||||
|
||||
#include "at0.h"
|
||||
|
||||
|
@ -1,9 +1,5 @@
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <tabutil.h>
|
||||
#include <recarray.h>
|
||||
#include <utility.h>
|
||||
#include <lffiles.h>
|
||||
|
||||
#include "at0.h"
|
||||
#include "atlib.h"
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <recarray.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <prefix.h>
|
||||
#include <printapp.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "benem.h"
|
||||
|
@ -3,13 +3,11 @@
|
||||
#include <printapp.h>
|
||||
#include <recarray.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
#include "benem.h"
|
||||
#include "donaz.h"
|
||||
#include "sezioni.h"
|
||||
#include <comuni.h>
|
||||
|
||||
#include "at1.h"
|
||||
#include "at1500a.h"
|
||||
|
@ -1,16 +1,9 @@
|
||||
#include <applicat.h>
|
||||
#include <execp.h>
|
||||
#include <mask.h>
|
||||
#include <msksheet.h>
|
||||
#include <mailbox.h>
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <validate.h>
|
||||
#include <lffiles.h>
|
||||
|
||||
#include "at1.h"
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
#include "contsan.h"
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
#include "sezioni.h"
|
||||
|
@ -1,9 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <recarray.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "donaz.h"
|
||||
|
@ -3,10 +3,8 @@
|
||||
#include <msksheet.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <real.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <utility.h>
|
||||
|
||||
|
@ -2,9 +2,7 @@
|
||||
#include <mask.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <real.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <utility.h>
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include <mask.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <real.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include <mask.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <real.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include <mask.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <real.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
|
@ -2,9 +2,7 @@
|
||||
#include <mask.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <real.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <utility.h>
|
||||
|
||||
|
@ -2,10 +2,8 @@
|
||||
#include <mask.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <real.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <utility.h>
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include <mask.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <real.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
|
@ -2,9 +2,7 @@
|
||||
#include <mask.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <real.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <utility.h>
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
#include "donaz.h"
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
#include "sezioni.h"
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include <form.h>
|
||||
#include <msksheet.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <relapp.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "at4.h"
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <utility.h>
|
||||
#include <lffiles.h>
|
||||
|
||||
#include "at4.h"
|
||||
#include "at4600a.h"
|
||||
|
@ -1,9 +1,6 @@
|
||||
#include <applicat.h>
|
||||
#include <mask.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
|
||||
#include "at4.h"
|
||||
#include "at4700a.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <utility.h>
|
||||
|
@ -1,9 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <recarray.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
#include "contsan.h"
|
||||
|
@ -1,9 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <recarray.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "at5.h"
|
||||
|
||||
|
@ -2,8 +2,6 @@
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <recarray.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "at5.h"
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
#include "sezioni.h"
|
||||
|
@ -1,14 +1,11 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <msksheet.h>
|
||||
#include <printapp.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
#include "sezioni.h"
|
||||
#include "atopera.h"
|
||||
#include "atropera.h"
|
||||
#include <comuni.h>
|
||||
|
||||
#include "at7.h"
|
||||
#include "at7100a.h"
|
||||
|
@ -2,11 +2,9 @@
|
||||
#include <mask.h>
|
||||
#include <msksheet.h>
|
||||
#include <printapp.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
#include "sezioni.h"
|
||||
#include <comuni.h>
|
||||
|
||||
#include "at7.h"
|
||||
#include "at7200a.h"
|
||||
|
@ -1,14 +1,11 @@
|
||||
#include <form.h>
|
||||
#include <msksheet.h>
|
||||
#include <printapp.h>
|
||||
#include <recarray.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
#include "donaz.h"
|
||||
#include "benem.h"
|
||||
#include "sezioni.h"
|
||||
#include <comuni.h>
|
||||
|
||||
#include "at7.h"
|
||||
#include "at4100b.h"
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
#include "sezioni.h"
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
#include "sezioni.h"
|
||||
|
@ -1,12 +1,8 @@
|
||||
#include <applicat.h>
|
||||
#include <filetext.h>
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "at8.h"
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include <applicat.h>
|
||||
#include <mask.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
|
||||
#include "at8.h"
|
||||
|
@ -1,16 +1,9 @@
|
||||
#include <applicat.h>
|
||||
#include <execp.h>
|
||||
#include <mask.h>
|
||||
#include <msksheet.h>
|
||||
#include <mailbox.h>
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <validate.h>
|
||||
#include <lffiles.h>
|
||||
|
||||
#include "at8.h"
|
||||
|
||||
|
@ -1,16 +1,9 @@
|
||||
#include <applicat.h>
|
||||
#include <execp.h>
|
||||
#include <mask.h>
|
||||
#include <msksheet.h>
|
||||
#include <mailbox.h>
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <validate.h>
|
||||
#include <lffiles.h>
|
||||
|
||||
#include "at8.h"
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <recarray.h>
|
||||
#include <tabutil.h>
|
||||
|
||||
#include "at8.h"
|
||||
|
@ -1,8 +1,5 @@
|
||||
#include <applicat.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "atlib.h"
|
||||
|
||||
#include "at5.h"
|
||||
|
@ -1,13 +1,8 @@
|
||||
#include <applicat.h>
|
||||
#include <filetext.h>
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "at8.h"
|
||||
#include "at8700a.h"
|
||||
|
@ -1,12 +1,8 @@
|
||||
#include <applicat.h>
|
||||
#include <filetext.h>
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "at8.h"
|
||||
|
@ -1,12 +1,7 @@
|
||||
#include <applicat.h>
|
||||
#include <filetext.h>
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <printer.h>
|
||||
#include <recarray.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "at8.h"
|
||||
#include "at8900a.h"
|
||||
|
@ -1,12 +1,7 @@
|
||||
#include <applicat.h>
|
||||
#include <filetext.h>
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <printer.h>
|
||||
//#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "at8.h"
|
||||
|
@ -22,6 +22,8 @@ int main(int argc,char** argv)
|
||||
rt = at9400(argc,argv) ; break; // Aggiornamento soggetti
|
||||
case 4:
|
||||
rt = at9500(argc,argv) ; break; // stampa moduli intestati
|
||||
case 5:
|
||||
rt = at9600(argc,argv) ; break; // estrazione dati per Osservatorio Nazionale
|
||||
default:
|
||||
error_box(usage, argv[0]) ; break;
|
||||
}
|
||||
|
1
at/at9.h
1
at/at9.h
@ -6,6 +6,7 @@ int at9200(int argc, char* argv[]); // Parma: estrazione archivi per aggiornamen
|
||||
int at9300(int argc, char* argv[]); // Parma: aggiornamento archivi da estrazione
|
||||
int at9400(int argc, char* argv[]); // aggiornamento sit. sogg.
|
||||
int at9500(int argc, char* argv[]); // stampa moduli intestati
|
||||
int at9600(int argc, char* argv[]); // estrazione dati osservatorio nazionale
|
||||
|
||||
#endif // __AT9_H
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include <msksheet.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <real.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
|
@ -1,14 +1,7 @@
|
||||
#include <applicat.h>
|
||||
#include <automask.h>
|
||||
#include <filetext.h>
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <progind.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <printer.h>
|
||||
#include <recarray.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "at9.h"
|
||||
#include "at9200a.h"
|
||||
|
@ -1,13 +1,7 @@
|
||||
#include <applicat.h>
|
||||
#include <filetext.h>
|
||||
#include <form.h>
|
||||
#include <mask.h>
|
||||
#include <progind.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <printer.h>
|
||||
#include <recarray.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "at9.h"
|
||||
#include "at9300a.h"
|
||||
|
@ -1,16 +1,9 @@
|
||||
#include <applicat.h>
|
||||
#include <execp.h>
|
||||
#include <mask.h>
|
||||
#include <msksheet.h>
|
||||
#include <mailbox.h>
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <validate.h>
|
||||
#include <lffiles.h>
|
||||
|
||||
#include "at9.h"
|
||||
|
||||
|
224
at/at9600.cpp
Executable file
224
at/at9600.cpp
Executable file
@ -0,0 +1,224 @@
|
||||
#include "at9.h"
|
||||
#include "at9600a.h"
|
||||
|
||||
#include <applicat.h>
|
||||
#include <automask.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <textset.h>
|
||||
|
||||
#include "soggetti.h"
|
||||
#include "sezioni.h"
|
||||
#include <comuni.h>
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TEsporta_ON: osservatorio nazionale
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TEsporta_ON_mask : public TAutomask
|
||||
{
|
||||
|
||||
public:
|
||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
TEsporta_ON_mask();
|
||||
~TEsporta_ON_mask();
|
||||
};
|
||||
|
||||
bool TEsporta_ON_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
TEsporta_ON_mask::TEsporta_ON_mask() : TAutomask("at9600a")
|
||||
{
|
||||
//carica i parametri del file di configurazione
|
||||
TConfig configfile("at96conf.ini", "MAIN");
|
||||
for (int i = 0; i < fields() ; i++)
|
||||
{
|
||||
TMask_field& f = fld(i);
|
||||
const TFieldref* fr = f.field();
|
||||
if (fr != NULL)
|
||||
f.set(configfile.get(fr->name()));
|
||||
}
|
||||
}
|
||||
|
||||
TEsporta_ON_mask::~TEsporta_ON_mask()
|
||||
{
|
||||
//carica i parametri del file di configurazione
|
||||
TConfig configfile("at96conf.ini", "MAIN");
|
||||
for (int i = 0; i < fields() ; i++)
|
||||
{
|
||||
TMask_field& f = fld(i);
|
||||
const TFieldref* fr = f.field();
|
||||
if (fr != NULL)
|
||||
configfile.set(fr->name(), f.get());
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
// Record set soggetti
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
class TEsporta_ON_recordset : public TCSV_recordset
|
||||
{
|
||||
public:
|
||||
virtual bool set(unsigned int fld, const TVariant& var);
|
||||
TEsporta_ON_recordset();
|
||||
};
|
||||
|
||||
bool TEsporta_ON_recordset::set(unsigned int column, const TVariant& var)
|
||||
{
|
||||
TString str;
|
||||
if (var.is_date())
|
||||
{
|
||||
if (!var.is_empty())
|
||||
{
|
||||
const TDate data = var.as_date();
|
||||
str.format("%04d-%02d-%02d", data.year(), data.month(), data.day());
|
||||
}
|
||||
}
|
||||
else
|
||||
str << var;
|
||||
str.insert("\""); str << '"';
|
||||
str.replace('|', '/');
|
||||
return TCSV_recordset::set(column, TVariant(str));
|
||||
}
|
||||
|
||||
TEsporta_ON_recordset::TEsporta_ON_recordset()
|
||||
: TCSV_recordset("CSV(\"|\")")
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TEsporta_ON applicazione
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TEsporta_ON_app : public TSkeleton_application
|
||||
{
|
||||
|
||||
protected:
|
||||
virtual bool check_autorization() const {return false;}
|
||||
virtual const char * extra_modules() const {return "at";}
|
||||
virtual void main_loop();
|
||||
|
||||
const TString& find_comune(const TRecordset& soggetti) const;
|
||||
const TString& find_dencom_nasc(const TString& codcom) const;
|
||||
|
||||
public:
|
||||
void esporta_soggetti(const TMask& msk) const;
|
||||
|
||||
};
|
||||
|
||||
void TEsporta_ON_app::esporta_soggetti(const TMask& m) const
|
||||
{
|
||||
TConfig config("at9600a.ini");
|
||||
// query su soggetti
|
||||
TString query;
|
||||
query << "USE SOGGETTI KEY 3";
|
||||
TString4 sezini = m.get(F_SEZINI);
|
||||
TString4 sotini = m.get(F_SOTINI);
|
||||
TString4 sezfin = m.get(F_SEZFIN);
|
||||
TString4 sotfin = m.get(F_SOTFIN);
|
||||
if (sezini.not_empty())
|
||||
query << "\nFROM CODSEZ=\"" << sezini << "\"";
|
||||
if (sezini.not_empty())
|
||||
query << "\nTO CODSEZ=\"" << sezfin << "\"";
|
||||
TISAM_recordset soggetti(query);
|
||||
|
||||
// query su sezioni per stabilire cosa scrivere nel primo record
|
||||
// elenco delle sezioni trasferite separate da ','
|
||||
TString querysez;
|
||||
querysez << "USE SEZIONI";
|
||||
if (sezini.not_empty())
|
||||
querysez << "\nFROM CODSEZ=\"" << sezini << "\"";
|
||||
if (sezini.not_empty())
|
||||
querysez << "\nTO CODSEZ=\"" << sezfin << "\"";
|
||||
TISAM_recordset sezioni(querysez);
|
||||
|
||||
TEsporta_ON_recordset csv;
|
||||
|
||||
// crea testata
|
||||
TToken_string ts("", ',');
|
||||
for (bool oks = sezioni.move_first(); oks; oks = sezioni.move_next())
|
||||
ts.add(sezioni.get(SEZ_CODSEZ).as_string());
|
||||
csv.new_rec(ts);
|
||||
|
||||
const int items = soggetti.items();
|
||||
TProgind pi(items, "Estrazione soggetti...", true, true);
|
||||
TString ws;
|
||||
for (bool ok = soggetti.move_first(); ok; ok = soggetti.move_next())
|
||||
{
|
||||
if (!pi.addstatus(1))
|
||||
break;
|
||||
//creazione di un nuovo record di tipo soggetti
|
||||
csv.new_rec("");
|
||||
//..e successivo riempimento
|
||||
csv.set(0, soggetti.get(SOG_CODSEZ));
|
||||
csv.set(1, soggetti.get(SOG_TESSAVIS));
|
||||
csv.set(2, soggetti.get(SOG_CF));
|
||||
csv.set(3, soggetti.get(SOG_COGNOME));
|
||||
csv.set(4, soggetti.get(SOG_NOME));
|
||||
csv.set(5, soggetti.get(SOG_SESSO));
|
||||
csv.set(6, soggetti.get(SOG_DATANASC));
|
||||
csv.set(7, NULL_VARIANT);
|
||||
csv.set(8, NULL_VARIANT); //nazionalita
|
||||
csv.set(9, soggetti.get(SOG_DOM_INDIR));
|
||||
csv.set(10, soggetti.get(SOG_DOM_CAP));
|
||||
csv.set(11, TVariant(find_comune(soggetti)));
|
||||
csv.set(12, soggetti.get(SOG_TITSTUD));
|
||||
csv.set(13, NULL_VARIANT); // professione
|
||||
csv.set(14, soggetti.get(SOG_TELABI));
|
||||
csv.set(15, soggetti.get(SOG_TELALT));
|
||||
TString4 catdon = soggetti.get(SOG_CATDON).as_string();
|
||||
|
||||
csv.set(16, TVariant(config.get(catdon, "CATDON"))); // categoria
|
||||
csv.set(17, soggetti.get(SOG_EMAIL));
|
||||
TString8 gruppoab0 = soggetti.get(SOG_GRUPPOAB0).as_string();
|
||||
csv.set(18, TVariant(config.get(gruppoab0, "GRUPPOAB0"))); // gruppo ab0
|
||||
TString8 kell = soggetti.get(SOG_KELL).as_string();
|
||||
csv.set(19, TVariant(config.get(kell, "KELL"))); // kell
|
||||
csv.set(20, ""); // fattore rh
|
||||
csv.set(21, soggetti.get(SOG_DATAISC));
|
||||
csv.set(22, soggetti.get(SOG_DATADIM));
|
||||
csv.set(23, NULL_VARIANT); // condizione non professionale
|
||||
} //for(move_first()..
|
||||
|
||||
const TString path = "rimini.txt";
|
||||
csv.save_as(path, fmt_text);
|
||||
#ifdef DBG
|
||||
xvt_sys_goto_url(path, "open");
|
||||
#endif
|
||||
}
|
||||
|
||||
const TString& TEsporta_ON_app::find_comune(const TRecordset& soggetti) const
|
||||
{
|
||||
TToken_string ws;
|
||||
ws = "";
|
||||
ws.add(soggetti.get(SOG_DOM_CODCOM).as_string() ,1);
|
||||
return cache().get(LF_COMUNI, ws, COM_DENCOM);
|
||||
}
|
||||
|
||||
const TString& TEsporta_ON_app::find_dencom_nasc(const TString& codcom) const
|
||||
{
|
||||
TToken_string key;
|
||||
key.add(" ");
|
||||
key.add(codcom);
|
||||
return cache().get(LF_COMUNI, key, COM_DENCOM);
|
||||
}
|
||||
|
||||
void TEsporta_ON_app::main_loop()
|
||||
{
|
||||
open_files(LF_SOGGETTI, LF_COMUNI, 0);
|
||||
TEsporta_ON_mask m;
|
||||
while (m.run() == K_ENTER)
|
||||
esporta_soggetti(m);
|
||||
}
|
||||
|
||||
int at9600(int argc, char* argv[])
|
||||
{
|
||||
TEsporta_ON_app app;
|
||||
app.run(argc, argv, TR("Estrazione dati per Osservatorio Nazionale"));
|
||||
return 0;
|
||||
}
|
41
at/at9600a.h
Executable file
41
at/at9600a.h
Executable file
@ -0,0 +1,41 @@
|
||||
// estrazione dati per osservatorio associativo
|
||||
// definizione campi per maschera di selezione
|
||||
|
||||
#define F_SEZINI 101
|
||||
#define F_D_SEZINI 102
|
||||
#define F_SOTINI 103
|
||||
#define F_D_SOTINI 104
|
||||
#define F_SEZFIN 105
|
||||
#define F_D_SEZFIN 106
|
||||
#define F_SOTFIN 107
|
||||
#define F_D_SOTFIN 108
|
||||
|
||||
#define F_CAT1 201
|
||||
#define F_D_CAT1 202
|
||||
#define F_CAT2 203
|
||||
#define F_D_CAT2 204
|
||||
#define F_CAT3 205
|
||||
#define F_D_CAT3 206
|
||||
#define F_CAT4 207
|
||||
#define F_D_CAT4 208
|
||||
#define F_CAT5 209
|
||||
#define F_D_CAT5 210
|
||||
#define F_CAT6 211
|
||||
#define F_D_CAT6 212
|
||||
#define F_CAT7 213
|
||||
#define F_D_CAT7 214
|
||||
#define F_CAT8 215
|
||||
#define F_D_CAT8 216
|
||||
|
||||
#define F_CATN1 301
|
||||
#define F_D_CATN1 302
|
||||
#define F_CATN2 303
|
||||
#define F_D_CATN2 304
|
||||
#define F_CATN3 305
|
||||
#define F_D_CATN3 306
|
||||
#define F_CATN4 307
|
||||
#define F_D_CATN4 308
|
||||
#define F_CATN5 309
|
||||
#define F_D_CATN5 310
|
||||
#define F_CATN6 311
|
||||
#define F_D_CATN6 312
|
31
at/at9600a.ini
Executable file
31
at/at9600a.ini
Executable file
@ -0,0 +1,31 @@
|
||||
[CATDON]
|
||||
DA=5
|
||||
AV=4
|
||||
STD=0
|
||||
01=4
|
||||
04=3
|
||||
02=5
|
||||
05=5
|
||||
AF=5
|
||||
DE=5
|
||||
EX=5
|
||||
|
||||
[KELL]
|
||||
STD=**
|
||||
NEG=1
|
||||
POS=1
|
||||
DPO=1
|
||||
KK=4
|
||||
Kk=3
|
||||
kk=2
|
||||
|
||||
[GRUPPOAB0]
|
||||
STD=**
|
||||
0=2
|
||||
A=3
|
||||
A1=4
|
||||
A1B=8
|
||||
A2=5
|
||||
A2B=9
|
||||
AB=7
|
||||
B=6
|
429
at/at9600a.uml
Executable file
429
at/at9600a.uml
Executable file
@ -0,0 +1,429 @@
|
||||
#include "at9600a.h"
|
||||
|
||||
TOOLBAR "" 0 -2 0 2
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -11 ""
|
||||
END
|
||||
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -11 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Estrazione dati per Osservatorio Associativo" -1 -1 78 20
|
||||
|
||||
GROUPBOX DLG_NULL 77 4
|
||||
BEGIN
|
||||
PROMPT 1 0 "Scelta sezioni"
|
||||
END
|
||||
|
||||
STRING F_SEZINI 2
|
||||
BEGIN
|
||||
PROMPT 2 1 "Da "
|
||||
FLAGS "U"
|
||||
USE LF_SEZIONI
|
||||
INPUT CODSEZ F_SEZINI
|
||||
INPUT CODSOT F_SOTINI
|
||||
DISPLAY "Cod.sez" CODSEZ
|
||||
DISPLAY "Cod.sot." CODSOT
|
||||
DISPLAY "Sezione@25" DENSEZ
|
||||
DISPLAY "Sottogruppo@25" DENSOT
|
||||
OUTPUT F_SEZINI CODSEZ
|
||||
OUTPUT F_D_SEZINI DENSEZ
|
||||
OUTPUT F_SOTINI CODSOT
|
||||
OUTPUT F_D_SOTINI DENSOT
|
||||
CHECKTYPE SEARCH
|
||||
HELP "Codice sezione da cui partire"
|
||||
END
|
||||
|
||||
STRING F_D_SEZINI 25
|
||||
BEGIN
|
||||
PROMPT 11 1 ""
|
||||
FLAGS "U"
|
||||
USE LF_SEZIONI KEY 2
|
||||
INPUT DENSEZ F_D_SEZINI
|
||||
DISPLAY "Sezione@25" DENSEZ
|
||||
DISPLAY "Sottogruppo@25" DENSOT
|
||||
DISPLAY "Cod.sez" CODSEZ
|
||||
DISPLAY "Cod.sot." CODSOT
|
||||
COPY OUTPUT F_SEZINI
|
||||
CHECKTYPE NORMAL
|
||||
HELP "Sezione da cui partire"
|
||||
END
|
||||
|
||||
STRING F_SOTINI 2
|
||||
BEGIN
|
||||
PROMPT 2 2 " "
|
||||
COPY ALL F_SEZINI
|
||||
CHECKTYPE SEARCH
|
||||
HELP "Codice sottogruppo da cui partire"
|
||||
END
|
||||
|
||||
STRING F_D_SOTINI 25
|
||||
BEGIN
|
||||
PROMPT 11 2 ""
|
||||
FLAGS "U"
|
||||
COPY USE F_D_SEZINI
|
||||
INPUT DENSEZ F_D_SEZINI
|
||||
INPUT DENSOT F_D_SOTINI
|
||||
COPY DISPLAY F_D_SEZINI
|
||||
COPY OUTPUT F_D_SEZINI
|
||||
CHECKTYPE NORMAL
|
||||
HELP "Sottogruppo da cui partire"
|
||||
END
|
||||
|
||||
STRING F_SEZFIN 2
|
||||
BEGIN
|
||||
PROMPT 41 1 "A "
|
||||
FLAGS "U"
|
||||
USE LF_SEZIONI
|
||||
INPUT CODSEZ F_SEZFIN
|
||||
INPUT CODSOT F_SOTFIN
|
||||
DISPLAY "Cod.sez" CODSEZ
|
||||
DISPLAY "Cod.sot." CODSOT
|
||||
DISPLAY "Sezione@25" DENSEZ
|
||||
DISPLAY "Sottogruppo@25" DENSOT
|
||||
OUTPUT F_SEZFIN CODSEZ
|
||||
OUTPUT F_D_SEZFIN DENSEZ
|
||||
OUTPUT F_SOTFIN CODSOT
|
||||
OUTPUT F_D_SOTFIN DENSOT
|
||||
CHECKTYPE SEARCH
|
||||
HELP "Codice sezione finale"
|
||||
END
|
||||
|
||||
STRING F_D_SEZFIN 25
|
||||
BEGIN
|
||||
PROMPT 49 1 ""
|
||||
FLAGS "U"
|
||||
USE LF_SEZIONI KEY 2
|
||||
INPUT DENSEZ F_D_SEZFIN
|
||||
DISPLAY "Sezione@25" DENSEZ
|
||||
DISPLAY "Sottogruppo@25" DENSOT
|
||||
DISPLAY "Cod.sez" CODSEZ
|
||||
DISPLAY "Cod.sot." CODSOT
|
||||
COPY OUTPUT F_SEZFIN
|
||||
CHECKTYPE NORMAL
|
||||
HELP "Sezione finale"
|
||||
END
|
||||
|
||||
STRING F_SOTFIN 2
|
||||
BEGIN
|
||||
PROMPT 41 2 " "
|
||||
COPY ALL F_SEZFIN
|
||||
CHECKTYPE SEARCH
|
||||
HELP "Codice sottogruppo finale"
|
||||
END
|
||||
|
||||
STRING F_D_SOTFIN 25
|
||||
BEGIN
|
||||
PROMPT 49 2 ""
|
||||
FLAGS "U"
|
||||
COPY USE F_D_SEZFIN
|
||||
INPUT DENSEZ F_D_SEZFIN
|
||||
INPUT DENSOT F_D_SOTFIN
|
||||
COPY DISPLAY F_D_SEZFIN
|
||||
COPY OUTPUT F_D_SEZFIN
|
||||
CHECKTYPE NORMAL
|
||||
HELP "Sottogruppo finale"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 77 6
|
||||
BEGIN
|
||||
PROMPT 1 4 "Categorie donatori"
|
||||
END
|
||||
|
||||
STRING F_CAT1 2
|
||||
BEGIN
|
||||
PROMPT 2 5 ""
|
||||
FLAGS "U"
|
||||
USE CTD
|
||||
INPUT CODTAB F_CAT1
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@30" S0
|
||||
OUTPUT F_CAT1 CODTAB
|
||||
OUTPUT F_D_CAT1 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CAT1 30
|
||||
BEGIN
|
||||
PROMPT 8 5 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CAT2 2
|
||||
BEGIN
|
||||
PROMPT 2 6 ""
|
||||
FLAGS "U"
|
||||
USE CTD
|
||||
INPUT CODTAB F_CAT2
|
||||
COPY DISPLAY F_CAT1
|
||||
OUTPUT F_CAT2 CODTAB
|
||||
OUTPUT F_D_CAT2 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CAT2 30
|
||||
BEGIN
|
||||
PROMPT 8 6 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CAT3 2
|
||||
BEGIN
|
||||
PROMPT 2 7 ""
|
||||
FLAGS "U"
|
||||
USE CTD
|
||||
INPUT CODTAB F_CAT3
|
||||
COPY DISPLAY F_CAT1
|
||||
OUTPUT F_CAT3 CODTAB
|
||||
OUTPUT F_D_CAT3 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CAT3 30
|
||||
BEGIN
|
||||
PROMPT 8 7 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CAT4 2
|
||||
BEGIN
|
||||
PROMPT 2 8 ""
|
||||
FLAGS "U"
|
||||
USE CTD
|
||||
INPUT CODTAB F_CAT4
|
||||
COPY DISPLAY F_CAT1
|
||||
OUTPUT F_CAT4 CODTAB
|
||||
OUTPUT F_D_CAT4 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CAT4 30
|
||||
BEGIN
|
||||
PROMPT 8 8 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CAT5 2
|
||||
BEGIN
|
||||
PROMPT 40 5 ""
|
||||
FLAGS "U"
|
||||
USE CTD
|
||||
INPUT CODTAB F_CAT5
|
||||
COPY DISPLAY F_CAT1
|
||||
OUTPUT F_CAT5 CODTAB
|
||||
OUTPUT F_D_CAT5 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CAT5 30
|
||||
BEGIN
|
||||
PROMPT 46 5 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CAT6 2
|
||||
BEGIN
|
||||
PROMPT 40 6 ""
|
||||
FLAGS "U"
|
||||
USE CTD
|
||||
INPUT CODTAB F_CAT6
|
||||
COPY DISPLAY F_CAT1
|
||||
OUTPUT F_CAT6 CODTAB
|
||||
OUTPUT F_D_CAT6 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CAT6 30
|
||||
BEGIN
|
||||
PROMPT 46 6 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CAT7 2
|
||||
BEGIN
|
||||
PROMPT 40 7 ""
|
||||
FLAGS "U"
|
||||
USE CTD
|
||||
INPUT CODTAB F_CAT7
|
||||
COPY DISPLAY F_CAT1
|
||||
OUTPUT F_CAT7 CODTAB
|
||||
OUTPUT F_D_CAT7 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CAT7 30
|
||||
BEGIN
|
||||
PROMPT 46 7 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CAT8 2
|
||||
BEGIN
|
||||
PROMPT 40 8 ""
|
||||
FLAGS "U"
|
||||
USE CTD
|
||||
INPUT CODTAB F_CAT8
|
||||
COPY DISPLAY F_CAT1
|
||||
OUTPUT F_CAT8 CODTAB
|
||||
OUTPUT F_D_CAT8 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CAT8 30
|
||||
BEGIN
|
||||
PROMPT 46 8 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 77 5
|
||||
BEGIN
|
||||
PROMPT 1 10 "Categorie non donatori"
|
||||
END
|
||||
|
||||
STRING F_CATN1 2
|
||||
BEGIN
|
||||
PROMPT 2 11 ""
|
||||
FLAGS "U"
|
||||
USE CTN
|
||||
INPUT CODTAB F_CATN1
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@30" S0
|
||||
OUTPUT F_CATN1 CODTAB
|
||||
OUTPUT F_D_CATN1 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CATN1 30
|
||||
BEGIN
|
||||
PROMPT 8 11 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CATN2 2
|
||||
BEGIN
|
||||
PROMPT 2 12 ""
|
||||
FLAGS "U"
|
||||
USE CTN
|
||||
INPUT CODTAB F_CATN2
|
||||
COPY DISPLAY F_CATN1
|
||||
OUTPUT F_CATN2 CODTAB
|
||||
OUTPUT F_D_CATN2 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CATN2 30
|
||||
BEGIN
|
||||
PROMPT 8 12 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CATN3 2
|
||||
BEGIN
|
||||
PROMPT 2 13 ""
|
||||
FLAGS "U"
|
||||
USE CTN
|
||||
INPUT CODTAB F_CATN3
|
||||
COPY DISPLAY F_CATN1
|
||||
OUTPUT F_CATN3 CODTAB
|
||||
OUTPUT F_D_CATN3 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CATN3 30
|
||||
BEGIN
|
||||
PROMPT 8 13 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CATN4 2
|
||||
BEGIN
|
||||
PROMPT 40 11 ""
|
||||
FLAGS "U"
|
||||
USE CTN
|
||||
INPUT CODTAB F_CATN4
|
||||
COPY DISPLAY F_CATN1
|
||||
OUTPUT F_CATN4 CODTAB
|
||||
OUTPUT F_D_CATN4 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CATN4 30
|
||||
BEGIN
|
||||
PROMPT 46 11 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CATN5 2
|
||||
BEGIN
|
||||
PROMPT 40 12 ""
|
||||
FLAGS "U"
|
||||
USE CTN
|
||||
INPUT CODTAB F_CATN5
|
||||
COPY DISPLAY F_CATN1
|
||||
OUTPUT F_CATN5 CODTAB
|
||||
OUTPUT F_D_CATN5 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CATN5 30
|
||||
BEGIN
|
||||
PROMPT 46 12 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CATN6 2
|
||||
BEGIN
|
||||
PROMPT 40 13 ""
|
||||
FLAGS "U"
|
||||
USE CTN
|
||||
INPUT CODTAB F_CATN6
|
||||
COPY DISPLAY F_CATN1
|
||||
OUTPUT F_CATN6 CODTAB
|
||||
OUTPUT F_D_CATN6 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CATN6 30
|
||||
BEGIN
|
||||
PROMPT 46 13 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
|
||||
ENDPAGE
|
||||
ENDMASK
|
@ -1,6 +1,4 @@
|
||||
#include <recarray.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "atlib.h"
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
#define SOG_TELABI "TELABI"
|
||||
#define SOG_TELLAV "TELLAV"
|
||||
#define SOG_TELALT "TELALT"
|
||||
#define SOG_EMAIL "EMAIL"
|
||||
#define SOG_TITINDIR "TITINDIR"
|
||||
#define SOG_ESCLUSO "ESCLUSO"
|
||||
#define SOG_TERMESCL "TERMESCL"
|
||||
|
@ -240,7 +240,9 @@ int DongleTest()
|
||||
}
|
||||
if (ok)
|
||||
{
|
||||
wsprintf(line, "Il contratto di manutenzione %d verrà attivato automaticamente", ass_year);
|
||||
const int n = ass_year%10;
|
||||
const int y = (ass_year / 1000) * 1000 + (ass_year%1000) /10;
|
||||
wsprintf(line, "Il contratto di manutenzione %d/%d verrà attivato automaticamente", y, n);
|
||||
WarningBox(line);
|
||||
}
|
||||
else
|
||||
|
12
ba/ba1.cpp
12
ba/ba1.cpp
@ -13,19 +13,19 @@ int main(int argc,char** argv)
|
||||
case 1:
|
||||
ba1200(argc,argv); break; // Test file
|
||||
case 2:
|
||||
ba1300(argc,argv); break; // Pack files
|
||||
ba1300(argc,argv); break; // Compattazione files
|
||||
case 3:
|
||||
ba1400(argc,argv); break; // Set users
|
||||
ba1400(argc,argv); break; // Configurazione utenti
|
||||
case 4:
|
||||
ba1500(argc,argv); break; // Activate modules
|
||||
ba1500(argc,argv); break; // Attivazione moduli
|
||||
case 5:
|
||||
ba1600(argc,argv); break; // Disks generation
|
||||
ba1600(argc,argv); break; // Creazione dischi e fascicolatore
|
||||
case 6:
|
||||
ba1700(argc,argv); break; // Install modules
|
||||
ba1700(argc,argv); break; // Installazione moduli
|
||||
case 7:
|
||||
ba1800(argc,argv); break; // Utility(?)
|
||||
case 8:
|
||||
ba1900(argc,argv); break; // Dictionary
|
||||
ba1900(argc,argv); break; // Dizionario
|
||||
default:
|
||||
ba1100(argc,argv); break; // Manutenzione
|
||||
}
|
||||
|
@ -797,7 +797,7 @@ bool TManutenzione_app::recover(TSystemisamfile& f, int err)
|
||||
void TManutenzione_app::repair_file(int i)
|
||||
{
|
||||
TDir d;
|
||||
TString80 s;
|
||||
TString s(_MAX_PATH);
|
||||
|
||||
d.get(i, _nolock, _nordir, _sysdirop);
|
||||
|
||||
@ -923,7 +923,7 @@ void TManutenzione_app::update_dir()
|
||||
n.ext("cdx"); remove(n);
|
||||
n.ext("fpt"); remove(n);
|
||||
|
||||
TString s;
|
||||
TString s(_MAX_PATH);
|
||||
s.format(FR("File n. %d - %s : eliminato file non utilizzato"), i, (const char *)d.filename());
|
||||
write_log(s);
|
||||
}
|
||||
@ -941,7 +941,7 @@ void TManutenzione_app::update_dir()
|
||||
{
|
||||
TSystemisamfile b(i);
|
||||
int err = b.is_valid(true);
|
||||
if (err == _istrcerr && d.eod() == 0 &&
|
||||
if ((err == _istrcerr) && (d.eod() == 0) && (fsize(d.filename()) < 4096) &&
|
||||
yesno_box(FR("Il tracciato record del file %d e' incoerente:\nSi desidera eliminare il file vuoto %s?"), i, d.filename()))
|
||||
{
|
||||
TFilename n(d.filename()); remove(n);
|
||||
@ -960,7 +960,7 @@ void TManutenzione_app::update_dir()
|
||||
{
|
||||
if (!recover(b, err))
|
||||
{
|
||||
TString s;
|
||||
TString s(_MAX_PATH);
|
||||
s.format(TR("File n. %d - %s : errore n.ro %d"), i, (const char *)d.filename(), err);
|
||||
write_log(s);
|
||||
}
|
||||
@ -1138,19 +1138,19 @@ void TManutenzione_app::convert_dir()
|
||||
|
||||
const int update_items = (orig_items < items) ? orig_items : items;
|
||||
|
||||
TString s(256);
|
||||
TString s;
|
||||
if (is_com)
|
||||
s = TR("Aggiornamento archivi comuni.");
|
||||
s = TR("Aggiornamento archivi comuni.\n");
|
||||
else
|
||||
{
|
||||
s = TR("Aggiornamento archivi della ditta ");
|
||||
s << atol (pref) << ".";
|
||||
s << atol (pref) << ".\n";
|
||||
}
|
||||
|
||||
TProgind p(update_items ? update_items : 1, s, false, true);
|
||||
p.setstatus(1);
|
||||
|
||||
for (int i = 2; i <= update_items; i++)
|
||||
for (int i = LF_USER; i <= update_items; i++)
|
||||
{
|
||||
p.addstatus(1);
|
||||
|
||||
@ -1162,15 +1162,19 @@ void TManutenzione_app::convert_dir()
|
||||
{
|
||||
if (flags >= 0L && flags < 10000L)
|
||||
{
|
||||
TSystemisamfile b(i);
|
||||
TSystemisamfile f(i);
|
||||
TString msg = s; msg << prefix().get_filename(i);
|
||||
p.set_text(msg);
|
||||
|
||||
const int module = abs((int)ds.flags());
|
||||
int err = b.is_valid(true);
|
||||
int err = f.is_valid(true);
|
||||
if (err == -60 || err == -64)
|
||||
err=NOERR; // verif.
|
||||
err = NOERR; // verif.
|
||||
|
||||
d.get(i, _nolock, _nordir, _sysdirop);
|
||||
if (i > 2 && err != NOERR && ((is_com && d.is_com()) || (!is_com && d.is_firm())))
|
||||
if (i > LF_USER && err != NOERR && ((is_com && d.is_com()) || (!is_com && d.is_firm())))
|
||||
{
|
||||
if (err == _istrcerr)
|
||||
if (err == _istrcerr || err == _isbadtrc)
|
||||
{
|
||||
repair_file(i);
|
||||
err = NOERR;
|
||||
@ -1200,7 +1204,6 @@ void TManutenzione_app::convert_dir()
|
||||
//crea il nuovo file in base al tracciato record nuovo!
|
||||
if (!s.exist() && ds.len() > 0)
|
||||
{
|
||||
TSystemisamfile f(i);
|
||||
set_autoload_new_files(false);
|
||||
f.build(0L,rs);
|
||||
set_autoload_new_files(true);
|
||||
@ -1209,8 +1212,6 @@ void TManutenzione_app::convert_dir()
|
||||
}
|
||||
}
|
||||
|
||||
TSystemisamfile f(i);
|
||||
|
||||
f.update(rs, false);
|
||||
if (f.status() == 8) // cio' significa che e' accaduto quasi l'irreparabile...
|
||||
{
|
||||
@ -1439,7 +1440,7 @@ void TManutenzione_app::update()
|
||||
prefix().set_codditta(0L);
|
||||
|
||||
open_log();
|
||||
TString80 s;
|
||||
TString s;
|
||||
s.format(FR("Conversione del %s"), (const char*)TDate(TODAY).string());
|
||||
write_log(s);
|
||||
write_log("");
|
||||
|
@ -173,7 +173,7 @@ void TRequest_form::update_os()
|
||||
case XVT_WS_LINUX : stros = "Linux"; break;
|
||||
case XVT_WS_WIN_95: stros = "Windows 95"; break;
|
||||
case XVT_WS_WIN_98: stros = "Windows 98"; break;
|
||||
default : stros = "Windows NT/XP"; break;
|
||||
default : stros = "Windows NT/2000/XP"; break;
|
||||
}
|
||||
|
||||
TForm_item& os = find_field('H', odd_page, FF_OS);
|
||||
|
@ -33,5 +33,6 @@ public:
|
||||
|
||||
bool update_dninst(bool force);
|
||||
bool update_assistance_year();
|
||||
const char* split_ass(const int ass_year);
|
||||
|
||||
#endif
|
||||
|
@ -66,12 +66,31 @@ HIDDEN bool build_dninst()
|
||||
|
||||
#endif
|
||||
|
||||
HIDDEN bool show_error(const char* str, int anno)
|
||||
const char* split_ass(const int ass_year)
|
||||
{
|
||||
int year = ass_year, number = 0;
|
||||
if (ass_year > 2007)
|
||||
{
|
||||
year = (ass_year/1000)*1000 + (ass_year%1000)/10;
|
||||
number = ass_year%10;
|
||||
}
|
||||
|
||||
TString& tmp = get_tmp_string();
|
||||
tmp << year;
|
||||
if (number > 0)
|
||||
tmp << '/' << number;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
HIDDEN bool show_error(const char* str)
|
||||
{
|
||||
int app_year, dum1, dum2, dum3;
|
||||
TApplication::get_version_info(app_year, dum1, dum2, dum3);
|
||||
|
||||
TString msg;
|
||||
msg << TR("Impossibile aggiornare automaticamente l'anno d'assistenza") ;
|
||||
if (anno > 0) msg << ' ' << anno;
|
||||
msg << ":\n" << str << '.';
|
||||
msg << TR("Impossibile aggiornare automaticamente l'assistenza ")
|
||||
<< split_ass(app_year) << ":\n" << str << '.';
|
||||
return error_box(msg);
|
||||
}
|
||||
|
||||
@ -114,7 +133,7 @@ bool update_assistance_year()
|
||||
{
|
||||
if (dongle().hardware() == _dongle_network)
|
||||
{
|
||||
show_error(TR("Il server di autorizzazioni deve essere disattivato"), 0);
|
||||
show_error(TR("Il server di autorizzazioni deve essere disattivato"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -146,22 +165,22 @@ bool update_assistance_year()
|
||||
dongle().set_year_assist(ass_year);
|
||||
if (dongle().burn())
|
||||
{
|
||||
message_box(FR("Il contratto %d è stato attivato automaticamente"), ass_year);
|
||||
message_box(FR("Il contratto %d è stato attivato automaticamente"));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
show_error(FR("Errore di scrittura sulla chiave di protezione"), ass_year);
|
||||
show_error(FR("Errore di scrittura sulla chiave di protezione"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
show_error(TR("Il numero di serie di questa postazione non è presente sul database"), ass_year);
|
||||
show_error(TR("Il numero di serie di questa postazione non è presente sul database"));
|
||||
}
|
||||
else
|
||||
show_error(TR("L'anno di assistenza sul database e' inferiore a quello registrato sulla chiave di protezione"), ass_year);
|
||||
show_error(TR("L'anno di assistenza sul database e' inferiore a quello registrato sulla chiave di protezione"));
|
||||
}
|
||||
else
|
||||
show_error(TR("Il database dei numeri di serie non è accessibile"), 0);
|
||||
show_error(TR("Il database dei numeri di serie non è accessibile"));
|
||||
return false;
|
||||
}
|
||||
|
@ -576,8 +576,8 @@ bool TInstaller_mask::can_install(const char* module, TInstall_ini& ini)
|
||||
#ifndef _DEMO_
|
||||
if (year > dongle().year_assist())
|
||||
{
|
||||
warning_box(FR("Per installare la versione %s del modulo '%s'\noccorre il contratto di assistenza per l'anno %d."),
|
||||
(const char*)version, module, year);
|
||||
warning_box(FR("Per installare la versione %s del modulo '%s'\noccorre il contratto di assistenza per l'anno %s."),
|
||||
(const char*)version, module, split_ass(year));
|
||||
if (!update_assistance_year())
|
||||
return false;
|
||||
}
|
||||
@ -681,7 +681,7 @@ bool TInstaller_mask::move_file(const TFilename& src, const TFilename& dst) cons
|
||||
const long filesize = fsize(src) * (is_zip ? 4 : 1);
|
||||
|
||||
if (xvt_fsys_test_disk_free_space(dest, filesize) == 0)
|
||||
return error_box(TR("Lo spazio sull'unita' di destinazione e' insufficiente"));
|
||||
return error_box(TR("Lo spazio sull'unita' di destinazione e' insufficiente!"));
|
||||
|
||||
const bool write_ok = ::fcopy(src, dest);
|
||||
if (write_ok && is_zip)
|
||||
@ -1189,7 +1189,7 @@ void TInstaller_mask::install_selection()
|
||||
const int oldpatch = row->get_int(C_CURRPATCH);
|
||||
|
||||
pi.set_text(format(FR("Installazione modulo '%s'"), (const char*)modulo));
|
||||
if (version2year(newver) < 2003)
|
||||
if (version2year(newver) < 2006)
|
||||
{
|
||||
error_box(FR("Il modulo '%s' non ha una versione valida."), (const char*)modulo);
|
||||
continue;
|
||||
|
@ -46,7 +46,8 @@ bool TGoogle_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
|
||||
const TMask& m = o.mask();
|
||||
TFilename name = _base_dir;
|
||||
name.add(m.get(102));
|
||||
name.add(m.get(101));
|
||||
TString8 str; str.format("%05ldA", m.get_int(101));
|
||||
name.add(str);
|
||||
name.add(m.get(103));
|
||||
xvt_sys_goto_url(name, "open");
|
||||
}
|
||||
|
@ -95,6 +95,7 @@ Flags = ""
|
||||
Item_01 = "Generatore query", "ba8 -1", ""
|
||||
Item_02 = "Generatore report", "ba8 -2", "", 10217
|
||||
Item_03 = "Convertitore da form a report", "ba8 -3", ""
|
||||
Item_04 = "Ricerca file archiviati", "ba8 -5", ""
|
||||
|
||||
[MENU_015]
|
||||
Caption = "Manutenzione"
|
||||
|
@ -838,7 +838,6 @@ bool TClifo_application::user_create() // initvar e arrmask
|
||||
_msk->set_handler(F_TIPOPERS, tipo_handler);
|
||||
_msk->set_handler(F_ALLEG, alleg_handler);
|
||||
_msk->set_handler(F_CODALLEG, codalleg_handler);
|
||||
// _msk->set_handler(DLG_FAX, fax_handler);
|
||||
_msk->set_handler(DLG_EMAIL, email_handler);
|
||||
_msk->set_handler(F_RAGSOC, rsoc_handler);
|
||||
|
||||
|
114
cg/cg0200.h
114
cg/cg0200.h
@ -4,63 +4,63 @@
|
||||
#define TCLI "C"
|
||||
#define TFOR "F"
|
||||
|
||||
#define F_TIPOCF 101
|
||||
#define F_CODCF 102
|
||||
#define F_RAGSOC 103
|
||||
#define F_INDCF 104
|
||||
#define F_CIVCF 105
|
||||
#define F_STATOCF 106
|
||||
#define F_COMCF 107
|
||||
#define F_CAPCF 108
|
||||
#define F_COFI 109
|
||||
#define F_STATOPAIV 110
|
||||
#define F_PAIV 111
|
||||
#define F_TIPOPERS 112
|
||||
#define F_ALLEG 113
|
||||
#define F_GRUPPO 114
|
||||
#define F_CONTO 115
|
||||
#define F_DESCONTO 137
|
||||
#define F_GRUPPORIC 116
|
||||
#define F_CONTORIC 117
|
||||
#define F_SOTTOCRIC 118
|
||||
#define F_DESCRIC 138
|
||||
#define F_TIPOCF 101
|
||||
#define F_CODCF 102
|
||||
#define F_RAGSOC 103
|
||||
#define F_INDCF 104
|
||||
#define F_CIVCF 105
|
||||
#define F_STATOCF 106
|
||||
#define F_COMCF 107
|
||||
#define F_CAPCF 108
|
||||
#define F_COFI 109
|
||||
#define F_STATOPAIV 110
|
||||
#define F_PAIV 111
|
||||
#define F_TIPOPERS 112
|
||||
#define F_ALLEG 113
|
||||
#define F_GRUPPO 114
|
||||
#define F_CONTO 115
|
||||
#define F_DESCONTO 137
|
||||
#define F_GRUPPORIC 116
|
||||
#define F_CONTORIC 117
|
||||
#define F_SOTTOCRIC 118
|
||||
#define F_DESCRIC 138
|
||||
|
||||
#define F_TIPOAPER 119
|
||||
#define F_CODANAGPER 120
|
||||
#define F_PTEL 121
|
||||
#define F_TEL 122
|
||||
#define F_PFAX 123
|
||||
#define F_FAX 124
|
||||
#define F_PTELEX 125
|
||||
#define F_TELEX 126
|
||||
#define F_DATANASC 127
|
||||
#define F_STATONASC 128
|
||||
#define F_COMNASC 129
|
||||
#define F_DENCOMNASC 135
|
||||
#define F_CODSTAT 130
|
||||
#define F_CODPAG 131
|
||||
#define F_DESPAG 331
|
||||
#define F_RAGSOC1 132
|
||||
#define F_CODABI 133
|
||||
#define F_CODCAB 134
|
||||
#define F_TIPOAPER 119
|
||||
#define F_CODANAGPER 120
|
||||
#define F_PTEL 121
|
||||
#define F_TEL 122
|
||||
#define F_PFAX 123
|
||||
#define F_FAX 124
|
||||
#define F_PTELEX 125
|
||||
#define F_TELEX 126
|
||||
#define F_DATANASC 127
|
||||
#define F_STATONASC 128
|
||||
#define F_COMNASC 129
|
||||
#define F_DENCOMNASC 135
|
||||
#define F_CODSTAT 130
|
||||
#define F_CODPAG 131
|
||||
#define F_DESPAG 331
|
||||
#define F_RAGSOC1 132
|
||||
#define F_CODABI 133
|
||||
#define F_CODCAB 134
|
||||
|
||||
#define F_IBAN 350
|
||||
#define F_IBAN_STATO 351
|
||||
#define F_IBAN_CHECK 352
|
||||
#define F_BBAN 353
|
||||
#define F_BBAN_CIN 354
|
||||
#define F_BBAN_ABI 355
|
||||
#define F_BBAN_CAB 356
|
||||
#define F_BBAN_CONTO 357
|
||||
#define F_IBAN 350
|
||||
#define F_IBAN_STATO 351
|
||||
#define F_IBAN_CHECK 352
|
||||
#define F_BBAN 353
|
||||
#define F_BBAN_CIN 354
|
||||
#define F_BBAN_ABI 355
|
||||
#define F_BBAN_CAB 356
|
||||
#define F_BBAN_CONTO 357
|
||||
|
||||
#define F_DESBAN 140
|
||||
#define F_CODVAL 136
|
||||
#define F_DESVAL 336
|
||||
#define F_FIDO 139
|
||||
#define F_LOCALITACF 144
|
||||
#define F_CODAG 145
|
||||
#define F_SOSPESO 146
|
||||
#define F_CODALLEG 148
|
||||
#define F_DESBAN 140
|
||||
#define F_CODVAL 136
|
||||
#define F_DESVAL 336
|
||||
#define F_FIDO 139
|
||||
#define F_LOCALITACF 144
|
||||
#define F_CODAG 145
|
||||
#define F_SOSPESO 146
|
||||
#define F_CODALLEG 148
|
||||
#define F_OCCASIONALE 149
|
||||
#define F_DENCOMCF 150
|
||||
#define F_PROVCF 152
|
||||
@ -85,7 +85,7 @@
|
||||
#define F_CODPORTO 169
|
||||
#define F_RAGGDOC 170
|
||||
#define F_NCOPIE 171
|
||||
#define F_CODCFASS 172
|
||||
#define F_CODFASS 172
|
||||
#define F_ASSFIS 173
|
||||
#define F_FATTSOSP 174
|
||||
#define F_VSNRPROT 175
|
||||
@ -135,9 +135,6 @@
|
||||
#define F_CODSPED1 225
|
||||
#define F_CODSPED2 226
|
||||
#define F_RAGSOCALLEG 220
|
||||
#define F_CODCASS 221
|
||||
#define F_CODFASS 222
|
||||
#define F_TEMP 223
|
||||
#define F_DESTACF 224
|
||||
#define F_CODDEP 230
|
||||
#define F_RAGGEFF 232
|
||||
@ -159,6 +156,7 @@
|
||||
#define F_DESVALINTRA 248
|
||||
#define F_CODCAUSNC 249
|
||||
#define F_DATAECONAI 250
|
||||
#define F_DESCRASS 251
|
||||
|
||||
#define DLG_RIC 300
|
||||
#define DLG_CST 301
|
||||
|
@ -294,19 +294,19 @@ END
|
||||
|
||||
NUMBER F_ALLEG 1
|
||||
BEGIN
|
||||
PROMPT 2 14 "Inserimento in allegato "
|
||||
FIELD ALLEG
|
||||
SHEET "Codice|Descrizione@50"
|
||||
HELP "Codice per l'inserimento negli allegati IVA"
|
||||
INPUT F_ALLEG
|
||||
ITEM " |Valido per allegato IVA"
|
||||
ITEM "1|Non valido per allegato IVA"
|
||||
ITEM "2|Cliente/Fornitore occasionale"
|
||||
ITEM "3|Documenti riepilogativi"
|
||||
ITEM "4|Clienti/Fornitori con codici fiscali gia' inseriti"
|
||||
ITEM "5|Cliente/Fornitore estero"
|
||||
ITEM "6|Cliente/Fornitore privato"
|
||||
OUTPUT F_ALLEG
|
||||
PROMPT 2 14 "Inserimento in allegato "
|
||||
FIELD ALLEG
|
||||
SHEET "Codice|Descrizione@50"
|
||||
HELP "Codice per l'inserimento negli allegati IVA"
|
||||
INPUT F_ALLEG
|
||||
ITEM " |Valido per allegato IVA"
|
||||
ITEM "1|Non valido per allegato IVA"
|
||||
ITEM "2|Cliente/Fornitore occasionale"
|
||||
ITEM "3|Documenti riepilogativi"
|
||||
ITEM "4|Clienti/Fornitori con codici fiscali gia' inseriti"
|
||||
ITEM "5|Cliente/Fornitore estero"
|
||||
ITEM "6|Cliente/Fornitore privato"
|
||||
OUTPUT F_ALLEG
|
||||
END
|
||||
|
||||
NUMBER F_CODALLEG 6
|
||||
@ -319,28 +319,48 @@ BEGIN
|
||||
INPUT CODCF F_CODALLEG
|
||||
COPY DISPLAY F_CODCF
|
||||
OUTPUT F_CODALLEG CODCF
|
||||
OUTPUT F_RAGSOCALLEG RAGSOC
|
||||
HELP "Codice dell'allegato IVA in cui inserire i progressivi"
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Cliente/Fornitore assente"
|
||||
END
|
||||
|
||||
STRING F_RAGSOCALLEG 50
|
||||
NUMBER F_CODFASS 6
|
||||
BEGIN
|
||||
PROMPT 2 15 "Rag. soc. allegato "
|
||||
FLAGS "D"
|
||||
PROMPT 2 15 "Codice cliente associato "
|
||||
FIELD CODCFASS
|
||||
USE LF_CLIFO KEY 1
|
||||
INPUT TIPOCF "C" SELECT
|
||||
INPUT CODCF F_CODFASS
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Ragione Sociale@55" RAGSOC
|
||||
OUTPUT F_CODFASS CODCF
|
||||
OUTPUT F_DESCRASS RAGSOC
|
||||
HELP "Codice del fornitore/cliente associato"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESCRASS 50 36
|
||||
BEGIN
|
||||
PROMPT 37 15 ""
|
||||
USE LF_CLIFO KEY 2
|
||||
INPUT TIPOCF "C" SELECT
|
||||
INPUT RAGSOC F_DESCRASS
|
||||
DISPLAY "Ragione Sociale@55" RAGSOC
|
||||
DISPLAY "Codice" CODCF
|
||||
COPY OUTPUT F_CODFASS
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
BOOLEAN F_OCCASIONALE
|
||||
BEGIN
|
||||
PROMPT 2 17 "Occasionale "
|
||||
PROMPT 2 16 "Occasionale "
|
||||
FIELD OCCAS
|
||||
HELP "Indicare se si tratta di un C/F occasionale"
|
||||
END
|
||||
|
||||
BOOLEAN F_SOSPESO
|
||||
BEGIN
|
||||
PROMPT 32 17 "Sospeso "
|
||||
PROMPT 32 16 "Sospeso "
|
||||
FIELD SOSPESO
|
||||
HELP "Indicare se il C/F e' movimentato ma non piu' utilizzabile"
|
||||
END
|
||||
@ -1409,9 +1429,9 @@ BEGIN
|
||||
FLAGS "DG"
|
||||
GROUP 1
|
||||
ITEM "C|Clienti"
|
||||
MESSAGE HIDE,F_CODCASS|SHOW,F_CODFASS|"F",F_TEMP
|
||||
MESSAGE HIDE,F_CODFASS|HIDE,F_DESCRASS
|
||||
ITEM "F|Fornitori"
|
||||
MESSAGE HIDE,F_CODFASS|SHOW,F_CODCASS|"C",F_TEMP
|
||||
MESSAGE SHOW,F_CODFASS|SHOW,F_DESCRASS
|
||||
END
|
||||
|
||||
NUMBER DLG_NULL 6
|
||||
@ -1540,36 +1560,6 @@ BEGIN
|
||||
HELP "Indicare se vanno raggruppati i documenti (bolle/fatture)"
|
||||
END
|
||||
|
||||
TEXT F_CODFASS
|
||||
BEGIN
|
||||
PROMPT 23 9 "Codice fornitore associato "
|
||||
END
|
||||
|
||||
TEXT F_CODCASS
|
||||
BEGIN
|
||||
PROMPT 23 9 "Codice cliente associato "
|
||||
END
|
||||
|
||||
STRING F_TEMP 1
|
||||
BEGIN
|
||||
PROMPT 56 8 ""
|
||||
FLAGS "HD"
|
||||
END
|
||||
|
||||
NUMBER F_CODCFASS 6
|
||||
BEGIN
|
||||
PROMPT 58 9 ""
|
||||
FIELD LF_CFVEN->CODCFASS
|
||||
USE LF_CLIFO KEY 1
|
||||
INPUT TIPOCF F_TEMP SELECT
|
||||
INPUT CODCF F_CODCFASS
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Ragione Sociale@50" RAGSOC
|
||||
OUTPUT F_CODCFASS CODCF
|
||||
HELP "Codice del fornitore/cliente associato"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_ASSFIS 4
|
||||
BEGIN
|
||||
PROMPT 2 10 "Codice Assoggettamento fiscale "
|
||||
|
@ -34,6 +34,7 @@
|
||||
#define F_SOLAIVA 131
|
||||
#define F_PROVV 132
|
||||
#define F_CODCAUREG 133
|
||||
#define F_REGSPIVA 134
|
||||
|
||||
#define SS_SEZIONE 102
|
||||
#define SS_TIPOCF 103
|
||||
|
@ -354,12 +354,32 @@ BEGIN
|
||||
FIELD MOVIND
|
||||
END
|
||||
|
||||
NUMBER F_REGSPIVA 2
|
||||
BEGIN
|
||||
PROMPT 2 18 "Regimi speciali IVA "
|
||||
INPUT F_REGSPIVA
|
||||
SHEET "Codice|Descrizione@75"
|
||||
ITEM "|Nessuno"
|
||||
ITEM "1|Acquisti beni dallo Stato del Vaticano e dalla Repubblica di San Marino"
|
||||
ITEM "2|Estrazione beni da depositi Iva"
|
||||
ITEM "3|Acquisti beni e servizi da soggetti non residenti"
|
||||
ITEM "4|Operazioni di cui all'art.74,c.1,lett.e)"
|
||||
ITEM "5|Provvigioni corrisposte dalle agenzie di viaggio ai loro intermediari"
|
||||
ITEM "12|Acquisti di tartufi (art.1,c.109,legge 311/2004)"
|
||||
ITEM "13|Subappalti in edilizia (Reverse charge)"
|
||||
ITEM "50|Importazione di oro o argento (Reverse charge)"
|
||||
ITEM "51|Rottami (Reverse charge)"
|
||||
ITEM "52|Operazioni effettuate nei confronti di condominii"
|
||||
OUTPUT F_REGSPIVA
|
||||
FIELD REGSPIVA
|
||||
END
|
||||
|
||||
STRING F_CODCAUREG 3
|
||||
BEGIN
|
||||
PROMPT 2 18 "Codice causale regolarizzazione IVA "
|
||||
PROMPT 34 18 "Codice causale regolarizzazione IVA "
|
||||
FLAGS "UZ"
|
||||
FIELD CODCAUREG
|
||||
USE LF_CAUSALI SELECT SOLOIVA="X"
|
||||
USE LF_CAUSALI SELECT (SOLOIVA="X")&&(CODCAUS!=#F_COD_CAUS)&&((REGSPIVA=="")||(REGSPIVA==#F_REGSPIVA))
|
||||
INPUT CODCAUS F_CODCAUREG
|
||||
DISPLAY "Codice" CODCAUS
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
@ -370,7 +390,6 @@ BEGIN
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
#include "cg0500b.uml"
|
||||
|
@ -711,7 +711,7 @@ void TPrintclifo_app::set_vendite(int f, int c)
|
||||
FLD(LF_CFVEN,CFV_PERCSPINC));
|
||||
|
||||
set_row(4,"@9g@pn @25g@s @46g@f @63g@f @76g@d @93g@d @112g@2s",
|
||||
FLD(LF_CFVEN,CFV_CODCFASS,"@@@@@@"),
|
||||
FLD(LF_CLIFO,CLI_CODCFASS,"@@@@@@"),
|
||||
FLD(LF_CFVEN,CFV_CODPRCF),FLD(LF_CFVEN,CFV_GESTCONTR),
|
||||
FLD(LF_CFVEN,CFV_IVARID),FLD(LF_CFVEN,CFV_DATAESC),
|
||||
FLD(LF_CFVEN,CFV_DATASOLL),FLD(LF_CFVEN,CFV_TITOLO));
|
||||
|
@ -1372,7 +1372,7 @@ void TPrimanota_application::genera_automatico(int tipo, const char* causimm)
|
||||
{
|
||||
// Reperisce l'eventuale cliente associato al fornitore e lo propone
|
||||
TString16 forn; forn.format("F|%ld", _automatico->_clifo.codclifo());
|
||||
const TString& clnt = cache().get(LF_CFVEN, forn, CFV_CODCFASS);
|
||||
const TString& clnt = cache().get(LF_CLIFO, forn, CLI_CODCFASS);
|
||||
m.set(F_CLIENTE, clnt);
|
||||
m.set(F_TOTALE, _automatico->_totale); // Imposta il totale documento e ...
|
||||
m.set(F_CODIVA, _automatico->_codiva, true); // ... scatena creazione prima riga IVA
|
||||
|
426
cg/cg3900.cpp
426
cg/cg3900.cpp
@ -8,12 +8,18 @@
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <reprint.h>
|
||||
#include <reputils.h>
|
||||
#include <textset.h>
|
||||
#include <validate.h>
|
||||
|
||||
#include <anafis.h>
|
||||
#include <anagr.h>
|
||||
#include <anagiu.h>
|
||||
#include <causali.h>
|
||||
#include <clifo.h>
|
||||
#include <comuni.h>
|
||||
#include <mov.h>
|
||||
#include <nditte.h>
|
||||
#include <rmoviva.h>
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -22,7 +28,11 @@
|
||||
|
||||
struct TAllegato_importi : public TObject
|
||||
{
|
||||
real _imp, _iva, _impNI, _impES, _impNA;
|
||||
real _imp, _iva, _impNI, _impES, _ivaNE, _impNA;
|
||||
|
||||
bool is_not_null() const
|
||||
{ return !(_imp.is_zero() && _iva.is_zero() && _impNI.is_zero() &&
|
||||
_impES.is_zero() && _ivaNE.is_zero()); }
|
||||
};
|
||||
|
||||
class TAllegato_info : public TObject
|
||||
@ -39,6 +49,8 @@ public:
|
||||
TAllegato_importi& importi(bool prec) { return prec ? _prec : _curr; }
|
||||
const TAllegato_importi& importi(bool prec) const { return prec ? _prec : _curr; }
|
||||
|
||||
bool is_not_null() const { return _curr.is_not_null() || _prec.is_not_null(); }
|
||||
|
||||
TAllegato_info(char tipo, long codcf) : _tipo(tipo), _codice(codcf) { }
|
||||
TAllegato_info(const TRectype& rec);
|
||||
};
|
||||
@ -106,6 +118,8 @@ void TAllegati_set::add(const TAllegato_info& info)
|
||||
set(field, allimp._impNI); else
|
||||
if (impfield == "ES")
|
||||
set(field, allimp._impES); else
|
||||
if (impfield == "NE")
|
||||
set(field, allimp._ivaNE); else
|
||||
if (impfield == "NA")
|
||||
set(field, allimp._impNA);
|
||||
}
|
||||
@ -133,6 +147,7 @@ TAllegati_set::TAllegati_set() : TAS400_recordset("AS400(512)")
|
||||
create_field(j ? "P_IVA" : "C_IVA", -1, 15, _realfld);
|
||||
create_field(j ? "P_NI" : "C_NI", -1, 15, _realfld);
|
||||
create_field(j ? "P_ES" : "C_ES", -1, 15, _realfld);
|
||||
create_field(j ? "P_NE" : "C_NE", -1, 15, _realfld);
|
||||
create_field(j ? "P_NA" : "C_NA", -1, 15, _realfld);
|
||||
}
|
||||
}
|
||||
@ -147,6 +162,176 @@ TAllegato_info::TAllegato_info(const TRectype& rec)
|
||||
: _tipo(rec.get_char(CLI_TIPOCF)), _codice(rec.get_long(CLI_CODCF))
|
||||
{ }
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TPadoaSchioppa_set
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TPadoaSchioppa_set : public TAS400_recordset
|
||||
{
|
||||
protected:
|
||||
enum TPs_type { AN, NU };
|
||||
|
||||
void add_field(const int trc, int da, int a, int lung, const char* name,
|
||||
TPs_type nu, bool required = false, const char* def = NULL);
|
||||
|
||||
void add_multi(const int trc, int da, int a, int lung, const char* name, int index,
|
||||
TPs_type nu, bool required = false, const char* def = NULL);
|
||||
void add_trc(int trc);
|
||||
|
||||
public:
|
||||
bool set(const char* name, const TVariant& value, int idx = 0);
|
||||
bool set(const char* name, const TString& value, int idx = 0);
|
||||
bool set(const char* name, const TDate& value, int idx = 0);
|
||||
|
||||
TPadoaSchioppa_set();
|
||||
};
|
||||
|
||||
void TPadoaSchioppa_set::add_field(int trc, int da, int a, int lung, const char* name,
|
||||
TPs_type nu, bool required, const char* def)
|
||||
{
|
||||
CHECKS(da > 0 && a >= da, "Posizioni incoerenti sul campo ", name);
|
||||
CHECKS(lung == a-da+1, "Lunghezza incoerente sul campo ", name);
|
||||
|
||||
TString80 field; field.format("%d.%s", trc, (const char*)name);
|
||||
const TFieldtypes ft = nu == NU ? _longzerofld : _alfafld;
|
||||
bool ok = false;
|
||||
if (def && *def)
|
||||
ok = create_field(field, da-1, lung, ft, required, TVariant(def));
|
||||
else
|
||||
ok = create_field(field, da-1, lung, ft, required);
|
||||
CHECKS(ok, "Impossibile creare il campo ", (const char*)field);
|
||||
}
|
||||
|
||||
void TPadoaSchioppa_set::add_multi(int trc, int da, int a, int lung, const char* name,
|
||||
int idx, TPs_type nu, bool required, const char* def)
|
||||
{
|
||||
CHECKD(trc == 1 || trc == 2, "Invalid record type ", trc);
|
||||
CHECKD(idx >= 1 && idx <= 8, "Invalid field index ", idx);
|
||||
TString80 field; field.format("%s(%d)", (const char*)name, idx);
|
||||
const int delta = trc == 1 ? 200*(idx-1) : 200*(idx-1);
|
||||
da += delta;
|
||||
a += delta;
|
||||
add_field(trc, da, a, lung, field, nu, required, def);
|
||||
}
|
||||
|
||||
void TPadoaSchioppa_set::add_trc(int trc)
|
||||
{
|
||||
TString4 str; str << trc;
|
||||
add_field(trc, 1, 1, 1, "TipoRecord", NU, true, str);
|
||||
|
||||
if (trc == 0 || trc == 9) // 0=Testata 9=Coda
|
||||
{
|
||||
add_field(trc, 2, 6, 5, "IndentificativoFornitura", AN, true, "CLIFO");
|
||||
add_field(trc, 7, 8, 2, "CodiceFornitura" , NU, true, "38");
|
||||
add_field(trc, 9, 24, 16, "CodiceFiscale" , AN, true);
|
||||
add_field(trc, 25, 35, 11, "PartitaIVA" , AN, true);
|
||||
add_field(trc, 36, 61, 26, "Cognome" , AN);
|
||||
add_field(trc, 62, 86, 25, "Nome" , AN);
|
||||
add_field(trc, 87, 87, 1, "Sesso" , AN);
|
||||
add_field(trc, 88, 95, 8, "DataNascita" , NU);
|
||||
add_field(trc, 96, 135, 40, "ComuneNascita" , AN);
|
||||
add_field(trc, 136, 137, 2, "ProvinciaNascita" , AN);
|
||||
add_field(trc, 138, 207, 70, "Denominazione" , AN);
|
||||
add_field(trc, 208, 247, 40, "ComuneSedeLegale" , AN);
|
||||
add_field(trc, 248, 249, 2, "ProvinciaSedeLegale" , AN);
|
||||
add_field(trc, 250, 253, 4, "AnnoRiferimento" , NU, true);
|
||||
add_field(trc, 254, 269, 16, "CodiceFiscaleFornitore" , AN);
|
||||
add_field(trc, 270, 286, 17, "ProtocolloTelematico" , AN);
|
||||
} else
|
||||
if (trc == 1 || trc == 2) // 1=Clienti 2=Fornitori
|
||||
{
|
||||
for (int i = 1; i <= 8; i++)
|
||||
{
|
||||
add_multi(trc, 2, 17, 16, "CodiceFiscale" , i, AN, false); // true dal 2007
|
||||
add_multi(trc, 18, 28, 11, "PartitaIVA" , i, AN, true);
|
||||
add_multi(trc, 29, 29, 1, "SegnoImponibili" , i, AN, true, "+");
|
||||
add_multi(trc, 30, 41, 12, "Imponibili" , i, NU, false);
|
||||
add_multi(trc, 42, 42, 1, "SegnoImpostaAfferente" , i, AN, true, "+");
|
||||
add_multi(trc, 43, 54, 12, "ImpostaAfferente" , i, NU, false);
|
||||
add_multi(trc, 55, 55, 1, "SegnoNonImponibili" , i, AN, true, "+");
|
||||
add_multi(trc, 56, 67, 12, "NonImponibili" , i, NU, false);
|
||||
add_multi(trc, 68, 68, 1, "SegnoEsenti" , i, AN, true, "+");
|
||||
add_multi(trc, 69, 80, 12, "Esenti" , i, NU, false);
|
||||
add_multi(trc, 81, 81, 1, "SegnoIVANonEsposta" , i, AN, true, "+");
|
||||
add_multi(trc, 82, 93, 12, "IVANonEsposta" , i, NU, false);
|
||||
add_multi(trc, 94, 94, 1, "SegnoImponibiliP" , i, AN, true, "+");
|
||||
add_multi(trc, 95,106, 12, "ImponibiliP" , i, NU, false);
|
||||
add_multi(trc,107,107, 1, "SegnoImpostaAfferenteP", i, AN, true, "+");
|
||||
add_multi(trc,108,119, 12, "ImpostaAfferenteP" , i, NU, false);
|
||||
add_multi(trc,120,120, 1, "SegnoNonImponibiliP" , i, AN, true, "+");
|
||||
add_multi(trc,121,132, 12, "NonImponibiliP" , i, NU, false);
|
||||
add_multi(trc,133,133, 1, "SegnoEsentiP" , i, AN, true, "+");
|
||||
add_multi(trc,134,145, 12, "EsentiP" , i, NU, false);
|
||||
add_multi(trc,146,146, 1, "SegnoIVANonEspostaP" , i, AN, true, "+");
|
||||
add_multi(trc,147,158, 12, "IVANonEspostaP" , i, NU, false);
|
||||
add_multi(trc,201,201, 1, "TerminazioneElemento" , i, AN, true, "*");
|
||||
}
|
||||
}
|
||||
|
||||
add_field(trc,1798,1798, 1, "CarattereControllo" , AN, true, "A");
|
||||
add_field(trc,1799,1800, 2, "FineRiga" , AN, true, "\n\r");
|
||||
}
|
||||
|
||||
TPadoaSchioppa_set::TPadoaSchioppa_set() : TAS400_recordset("AS400(1800,1)")
|
||||
{
|
||||
add_trc(0);
|
||||
add_trc(1);
|
||||
add_trc(2);
|
||||
add_trc(9);
|
||||
}
|
||||
|
||||
bool TPadoaSchioppa_set::set(const char* name, const TVariant& value, int idx)
|
||||
{
|
||||
bool ok = false;
|
||||
if (idx > 0)
|
||||
{
|
||||
TString80 field = name;
|
||||
field << '(' << idx << ')';
|
||||
|
||||
// Gestisco solo qui gli importi in quanto non esistono importi con indice == 0
|
||||
if (value.is_real())
|
||||
{
|
||||
// Gestiamo solo fino a 2 miliardi di Euro!
|
||||
const long val = value.as_real().integer();
|
||||
ok = TAS400_recordset::set(field, TVariant(labs(val)));
|
||||
if (ok && val < 0)
|
||||
{
|
||||
field.insert("Segno", field.find('('));
|
||||
ok = TAS400_recordset::set(field, TVariant("-"));
|
||||
}
|
||||
}
|
||||
else
|
||||
ok = TAS400_recordset::set(field, value);
|
||||
CHECKS(ok, "Campo non valido ", (const char*)field);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Gestisco solo qui le date in quanto non esistono date con indice != 0
|
||||
if (value.is_date() && !value.is_empty())
|
||||
{
|
||||
const TDate date = value.as_date();
|
||||
TString8 str;
|
||||
str.format("%02d%02d%04d", date.day(), date.month(), date.year());
|
||||
ok = TAS400_recordset::set(name, TVariant(str));
|
||||
}
|
||||
else
|
||||
ok = TAS400_recordset::set(name, value);
|
||||
CHECKS(ok, "Campo non valido ", name);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TPadoaSchioppa_set::set(const char* name, const TString& value, int idx)
|
||||
{
|
||||
return set(name, value.full() ? TVariant(value) : NULL_VARIANT, idx);
|
||||
}
|
||||
|
||||
bool TPadoaSchioppa_set::set(const char* name, const TDate& value, int idx)
|
||||
{
|
||||
return set(name, value.ok() ? TVariant(value) : NULL_VARIANT, idx);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TRegistri_cache
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -243,12 +428,15 @@ class TAlleg_mask : public TAutomask
|
||||
{
|
||||
TRegistri_cache _registri;
|
||||
TCodiva_cache _codiva;
|
||||
TAssoc_array _clifi;
|
||||
|
||||
protected:
|
||||
bool documento_corrispettivi(const TString& tipodoc) const;
|
||||
void scan_iva_rows(const TRecordset& mov);
|
||||
TRecordset* new_recordset();
|
||||
void scan_iva_rows(const TRecordset& mov, TAssoc_array& clifi, bool strict);
|
||||
TRecordset* new_recordset(char tipocf = ' ', bool strict = false);
|
||||
|
||||
void add_0_9(int trc, TPadoaSchioppa_set& pss, TLog_report& log) const;
|
||||
void add_1_2(int trc, TRecordset& clifo, TPadoaSchioppa_set& pss, TLog_report& log) const;
|
||||
void generazione();
|
||||
|
||||
public:
|
||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
@ -267,22 +455,43 @@ bool TAlleg_mask::documento_corrispettivi(const TString& tipodoc) const
|
||||
return corrisp;
|
||||
}
|
||||
|
||||
void TAlleg_mask::scan_iva_rows(const TRecordset& mov)
|
||||
void TAlleg_mask::scan_iva_rows(const TRecordset& mov, TAssoc_array& clifi, bool strict)
|
||||
{
|
||||
TToken_string clifo_key;
|
||||
clifo_key << mov.get(MOV_TIPO) << '|' << mov.get(MOV_CODCF);
|
||||
const TRectype& clifo = cache().get(LF_CLIFO, clifo_key);
|
||||
const long codalleg = clifo.get_long(CLI_CODALLEG);
|
||||
if (codalleg > 0) // Aggiorno codice clifo con allegato
|
||||
clifo_key.add(codalleg,1);
|
||||
|
||||
TAllegato_info* ai = (TAllegato_info*)_clifi.objptr(clifo_key);
|
||||
if (strict)
|
||||
{
|
||||
const TString& stato = clifo.get(CLI_STATOPAIV);
|
||||
if (stato.full() && stato != "IT") // Scarto gli esteri
|
||||
return;
|
||||
}
|
||||
|
||||
const char tipocf = clifo_key[0];
|
||||
const int tipalleg = clifo.get_int(CLI_ALLEG);
|
||||
const long codalleg = clifo.get_long(CLI_CODALLEG);
|
||||
|
||||
// Se sto generando un file ministeriale ignoro da subito chi non va in allegato
|
||||
if (strict && !(tipalleg == 0 || (tipalleg == 4 && codalleg > 0)))
|
||||
return;
|
||||
|
||||
if (tipalleg == 4 && codalleg > 0) // Se il cliente ha un diverso codice per allegato ...
|
||||
clifo_key.add(codalleg, 1); // ... aggiorno codice clifo in allegato
|
||||
|
||||
TAllegato_info* ai = (TAllegato_info*)clifi.objptr(clifo_key);
|
||||
if (ai == NULL)
|
||||
{
|
||||
ai = new TAllegato_info(clifo);
|
||||
_clifi.add(clifo_key, ai);
|
||||
clifi.add(clifo_key, ai);
|
||||
}
|
||||
|
||||
const TString& codcaus = mov.get(MOV_CODCAUS).as_string();
|
||||
const TRectype& caus = cache().get(LF_CAUSALI, codcaus);
|
||||
const bool movintra = caus.get_bool(CAU_INTRACOM);
|
||||
const int reg_spec = caus.get_int(CAU_REGSPIVA);
|
||||
const bool reverse_charge = (reg_spec == 13) || (reg_spec == 50) || (reg_spec == 51);
|
||||
|
||||
const TDate datareg = mov.get(MOV_DATAREG).as_date();
|
||||
const TDate datadoc = mov.get(MOV_DATADOC).as_date();
|
||||
TAllegato_importi& allimp = ai->importi(datadoc.year() < datareg.year());
|
||||
@ -292,13 +501,19 @@ void TAlleg_mask::scan_iva_rows(const TRecordset& mov)
|
||||
|
||||
for (bool ok = righe_iva.move_first(); ok; ok = righe_iva.move_next())
|
||||
{
|
||||
const TCodiceIVA& codiva = _codiva.codiva(righe_iva.get(RMI_CODIVA).as_string());
|
||||
const int allegato = codiva.allegato(clifo_key[0]);
|
||||
const TString& codice = righe_iva.get(RMI_CODIVA).as_string();
|
||||
const TCodiceIVA& codiva = _codiva.codiva(codice);
|
||||
const int allegato = codiva.allegato(tipocf);
|
||||
const real imponibile = righe_iva.get(RMI_IMPONIBILE).as_real();
|
||||
const real imposta = righe_iva.get(RMI_IMPOSTA).as_real();
|
||||
const real imposta = righe_iva.get(RMI_IMPOSTA).as_real();
|
||||
switch (allegato)
|
||||
{
|
||||
case 1: allimp._imp += imponibile; allimp._iva += imposta; break;
|
||||
case 1: allimp._imp += imponibile;
|
||||
if (movintra || reverse_charge) // IVA non esposta in fattura
|
||||
allimp._ivaNE += imposta;
|
||||
else
|
||||
allimp._iva += imposta;
|
||||
break;
|
||||
case 2: allimp._impNI += imponibile; break;
|
||||
case 3: allimp._impES += imponibile; break;
|
||||
default: allimp._impNA += imponibile; break;
|
||||
@ -306,7 +521,7 @@ void TAlleg_mask::scan_iva_rows(const TRecordset& mov)
|
||||
}
|
||||
}
|
||||
|
||||
TRecordset* TAlleg_mask::new_recordset()
|
||||
TRecordset* TAlleg_mask::new_recordset(char tipocf, bool strict)
|
||||
{
|
||||
// Compito: tradurre in ISAM la seguente query:
|
||||
// SELECT * FROM MOV
|
||||
@ -318,20 +533,24 @@ TRecordset* TAlleg_mask::new_recordset()
|
||||
query << "\nTO TIPO=#TYPE"; // Inutile dire CODCF=999999
|
||||
TISAM_recordset mov(query);
|
||||
|
||||
_clifi.destroy();
|
||||
TAssoc_array clifi;
|
||||
|
||||
const TString& tipo = get(F_TIPO);
|
||||
if (tipocf <= ' ') tipocf = get(F_TIPO)[0];
|
||||
const char tipo[2] = { tipocf, '\0' };
|
||||
const int anno = get_int(F_ANNO);
|
||||
mov.set_var("#YEAR", TVariant(long(anno)));
|
||||
mov.set_var("#TYPE", TVariant(tipo));
|
||||
|
||||
TProgind pi(mov.items(), "Scansione movimenti", true, true);
|
||||
TString msg;
|
||||
msg << TR("Scansione movimenti") << ' ' << (tipocf == 'C' ? TR("Clienti") : TR("Fornitori"));
|
||||
msg << " (" << mov.items() << ")";
|
||||
TProgind pi(mov.items(), msg, true, true);
|
||||
for (bool ok = mov.move_first(); ok; ok = mov.move_next())
|
||||
{
|
||||
if (!pi.addstatus(1))
|
||||
break;
|
||||
|
||||
// Controllo se registro e' compatibile (anche se lo e' sempre!)
|
||||
// Controllo se registro e' compatibile
|
||||
const TString& codreg = mov.get(MOV_REG).as_string();
|
||||
const TRegistro& reg = _registri.registro(codreg, anno);
|
||||
if (reg.corrispettivi())
|
||||
@ -347,10 +566,14 @@ TRecordset* TAlleg_mask::new_recordset()
|
||||
if (documento_corrispettivi(tipodoc))
|
||||
continue;
|
||||
|
||||
// Scarta trasferimento movimenti intra
|
||||
if (strict && caus.get_bool(CAU_INTRACOM))
|
||||
continue;
|
||||
|
||||
const TipoIVA tipoiva = reg.iva();
|
||||
bool keep = tipoiva == iva_vendite || tipoiva == iva_acquisti; // Voglio solo registri IVA
|
||||
if (keep)
|
||||
keep = (tipo == "C") ^ (tipoiva == iva_acquisti); // compatibile
|
||||
keep = (tipocf == 'C') ^ (tipoiva == iva_acquisti); // compatibile
|
||||
if (!keep)
|
||||
continue;
|
||||
|
||||
@ -358,17 +581,162 @@ TRecordset* TAlleg_mask::new_recordset()
|
||||
if (!occas.is_empty()) // Ignoro i clienti occasionali
|
||||
continue;
|
||||
|
||||
scan_iva_rows(mov);
|
||||
scan_iva_rows(mov, clifi, strict);
|
||||
}
|
||||
|
||||
TAllegati_set* hullygully = new TAllegati_set;
|
||||
FOR_EACH_ASSOC_OBJECT(_clifi, h, k, o)
|
||||
hullygully->add(*(TAllegato_info*)o);
|
||||
FOR_EACH_ASSOC_OBJECT(clifi, h, k, o)
|
||||
{
|
||||
const TAllegato_info& ai = *(TAllegato_info*)o;
|
||||
if (ai.is_not_null())
|
||||
hullygully->add(ai);
|
||||
}
|
||||
hullygully->sort();
|
||||
|
||||
return hullygully;
|
||||
}
|
||||
|
||||
void TAlleg_mask::add_0_9(int trc, TPadoaSchioppa_set& pss, TLog_report& log) const
|
||||
{
|
||||
pss.new_rec(trc == 0 ? "0" : "9");
|
||||
|
||||
const char tipoa = prefix().firm().get(NDT_TIPOA)[0];
|
||||
const long codanagr = prefix().firm().get_long(NDT_CODANAGR);
|
||||
TToken_string key;
|
||||
key.add(tipoa, 0); key.add(codanagr, 1);
|
||||
const TRectype& anag = cache().get(LF_ANAG, key);
|
||||
|
||||
TString16 pariva = anag.get(ANA_PAIV); pariva.right_just(11, '0');
|
||||
if (!pi_check("", pariva))
|
||||
{
|
||||
TString msg;
|
||||
msg << anag.get(CLI_RAGSOC) << ": " << TR("Partita IVA errata") << ' ' << pariva;
|
||||
log.log(2, msg);
|
||||
}
|
||||
|
||||
const TString& codfis = anag.get(ANA_COFI);
|
||||
pss.set("CodiceFiscale", codfis.full() ? codfis : pariva);
|
||||
pss.set("PartitaIVA", pariva.full() ? pariva : codfis);
|
||||
if (tipoa == 'F')
|
||||
{
|
||||
pss.set("Cognome", anag.get(ANA_RAGSOC).left(30));
|
||||
pss.set("Nome", anag.get(ANA_RAGSOC).mid(30));
|
||||
|
||||
const TRectype& anafis = cache().get(LF_ANAGFIS, codanagr);
|
||||
pss.set("Sesso", anafis.get(ANF_SESSO));
|
||||
pss.set("DataNascita", anafis.get_date(ANF_DATANASC));
|
||||
|
||||
key.add(anafis.get(ANF_STATONASC), 0);
|
||||
key.add(anafis.get(ANF_COMNASC), 1);
|
||||
const TRectype& comnas = cache().get(LF_COMUNI, key);
|
||||
pss.set("ComuneNascita", comnas.get(COM_DENCOM));
|
||||
pss.set("ProvinciaNascita", comnas.get(COM_PROVCOM));
|
||||
}
|
||||
else
|
||||
{
|
||||
key.add(anag.get(ANA_STATORES), 0);
|
||||
key.add(anag.get(ANA_COMRES), 1);
|
||||
const TRectype& comres = cache().get(LF_COMUNI, key);
|
||||
|
||||
pss.set("Denominazione", anag.get(ANA_RAGSOC));
|
||||
pss.set("ComuneSedeLegale", comres.get(COM_DENCOM));
|
||||
pss.set("ProvinciaSedeLegale", comres.get(COM_PROVCOM));
|
||||
}
|
||||
pss.set("AnnoRiferimento", get(F_ANNO));
|
||||
pss.set("CodiceFiscaleFornitore", codfis);
|
||||
}
|
||||
|
||||
void TAlleg_mask::add_1_2(int trc, TRecordset& clifo, TPadoaSchioppa_set& pss, TLog_report& log) const
|
||||
{
|
||||
int idx = 0; // Indice del cliente all'interno del record [1,8]
|
||||
for (bool ok = clifo.move_first(); ok; ok = clifo.move_next())
|
||||
{
|
||||
if (++idx > 8) // Incremento indice del cliente o fornitore, se debordo dal limite ...
|
||||
idx = 1; // ... allora ricomincio da 1
|
||||
if (idx == 1) // Se sto per scrivere il primo elemento ...
|
||||
pss.new_rec(trc == 1 ? "1" : "2"); // ... creo un nuovo record per accogliere i prossimi 8
|
||||
|
||||
TString16 paiv = clifo.get(CLI_PAIV).as_string(); paiv.trim();
|
||||
if (paiv.full())
|
||||
paiv.right_just(11, '0');
|
||||
|
||||
TString16 cofi = clifo.get(CLI_COFI).as_string(); cofi.trim();
|
||||
if (cofi.blank() && !real::is_null(paiv)) // Se il codice fiscale e' vuoto prendo la partita IVA
|
||||
{
|
||||
cofi = paiv;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Se la partita IVA e' vuota ed il codice fiscale e' numerico ...
|
||||
if (paiv.blank() && pi_check("", cofi))
|
||||
paiv = cofi; // ... allora copia nella partita IVA il codice fiscale
|
||||
|
||||
if (!real::is_natural(cofi) && !cf_check("", cofi))
|
||||
{
|
||||
TString msg = clifo.get(CLI_RAGSOC).as_string();
|
||||
msg.trim();
|
||||
msg << ": " << TR("Codice fiscale errato") << ' ' << cofi;
|
||||
log.log(1, msg);
|
||||
}
|
||||
}
|
||||
|
||||
if (real::is_null(paiv) || !pi_check("", paiv))
|
||||
{
|
||||
TString msg = clifo.get(CLI_RAGSOC).as_string();
|
||||
msg.trim();
|
||||
msg << ": " << TR("Partita IVA errata") << ' ' << paiv;
|
||||
log.log(2, msg);
|
||||
if (real::is_null(paiv))
|
||||
paiv = "99999999999"; // Evita errore fatale
|
||||
}
|
||||
|
||||
pss.set("CodiceFiscale", cofi, idx);
|
||||
pss.set("PartitaIVA", paiv, idx);
|
||||
pss.set("Imponibili", clifo.get("C_IMP"), idx);
|
||||
pss.set("ImpostaAfferente", clifo.get("C_IVA"), idx);
|
||||
pss.set("NonImponibili", clifo.get("C_NI"), idx);
|
||||
pss.set("Esenti", clifo.get("C_ES"), idx);
|
||||
pss.set("IVANonEsposta", clifo.get("C_NE"), idx);
|
||||
}
|
||||
}
|
||||
|
||||
void TAlleg_mask::generazione()
|
||||
{
|
||||
TReport_book book;
|
||||
|
||||
TLog_report log("Errori riscontrati");
|
||||
TPadoaSchioppa_set pss;
|
||||
|
||||
add_0_9(0, pss, log);
|
||||
|
||||
TRecordset* cli = new_recordset('C', true);
|
||||
|
||||
if (cli != NULL)
|
||||
{
|
||||
add_1_2(1, *cli, pss, log);
|
||||
|
||||
TAlleg_report rep(cli, get_int(F_ANNO));
|
||||
book.add(rep);
|
||||
}
|
||||
|
||||
TRecordset* ven = new_recordset('F', true);
|
||||
if (ven != NULL)
|
||||
{
|
||||
add_1_2(2, *ven, pss, log);
|
||||
|
||||
TAlleg_report rep(ven, get_int(F_ANNO));
|
||||
book.add(rep);
|
||||
}
|
||||
|
||||
add_0_9(9, pss, log);
|
||||
|
||||
pss.save_as(get(F_NAME));
|
||||
|
||||
book.add(log);
|
||||
|
||||
book.preview();
|
||||
}
|
||||
|
||||
bool TAlleg_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
switch (o.dlg())
|
||||
@ -419,6 +787,13 @@ bool TAlleg_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case DLG_ELABORA:
|
||||
if (e == fe_button)
|
||||
{
|
||||
generazione();
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -431,7 +806,7 @@ TAlleg_mask::TAlleg_mask() : TAutomask("cg3900a")
|
||||
set(F_ANNO, oggi.year()-1);
|
||||
|
||||
TFilename fname; fname.tempdir();
|
||||
fname.add("clifo.xls");
|
||||
fname.add("clifo");
|
||||
set(F_NAME, fname);
|
||||
}
|
||||
|
||||
@ -447,7 +822,8 @@ public:
|
||||
|
||||
void TClifo_alleg_app::main_loop()
|
||||
{
|
||||
open_files(LF_CAUSALI, LF_CLIFO, LF_COMUNI, LF_MOV, LF_RMOVIVA, 0);
|
||||
open_files(LF_ANAG, LF_ANAGFIS, LF_COMUNI, LF_TAB, 0); // Roba anagrafica
|
||||
open_files(LF_CAUSALI, LF_CLIFO, LF_MOV, LF_RMOVIVA, 0); // Roba contabile
|
||||
TAlleg_mask m;
|
||||
m.run();
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include <xvt.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "cg6.h"
|
||||
|
||||
|
@ -172,14 +172,16 @@ bool TRic_archivi::leggi_marker()
|
||||
return error_box(FR("File marker non presente in %s: impossibile proseguire"), (const char*)_pathname);
|
||||
}
|
||||
|
||||
FILE* i;
|
||||
|
||||
const word size = 64;
|
||||
TString buffer(size);
|
||||
const int size = 64;
|
||||
TString80 buffer;
|
||||
|
||||
if ( (i = fopen(_marker,"r+t")) != NULL)
|
||||
FILE* i = fopen(_marker,"r+t"); // Perche' non semplicemente "rb"?
|
||||
if (i != NULL)
|
||||
{
|
||||
const word letti = fread((char*)(const char*)buffer,sizeof(char),size,i);
|
||||
const size_t letti = fread(buffer.get_buffer(),1,size,i);
|
||||
fclose(i);
|
||||
if (letti < size)
|
||||
return error_box(TR("Errore di lettura del MARKER: impossibile proseguire"));
|
||||
|
||||
_progdisk = atoi(buffer.sub(31,33));
|
||||
_numtotdisk = atoi(buffer.sub(29,31));
|
||||
@ -187,7 +189,6 @@ bool TRic_archivi::leggi_marker()
|
||||
if (_numtotdisk == 0)
|
||||
{
|
||||
message_box(TR("Il numero totale dischi su marker non e' significativo: impossibile proseguire"));
|
||||
fclose(i);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -195,26 +196,20 @@ bool TRic_archivi::leggi_marker()
|
||||
{
|
||||
message_box(FR("Il dischetto inserito (%d) non rispecchia la giusta sequenza (%d)"), _numdisk, _progdisk);
|
||||
_sequenza = FALSE;
|
||||
fclose(i);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
_sequenza = TRUE;
|
||||
|
||||
if (letti == 0)
|
||||
{
|
||||
fclose(i);
|
||||
return error_box(TR("Rilevati ERRORI nel file MARKER: impossibile proseguire"));
|
||||
}
|
||||
|
||||
_nomeid = buffer.sub(0,10);
|
||||
_dittainv = atol(buffer.sub(10,14));
|
||||
_totrectras = atol(buffer.sub(23,29));
|
||||
_numinv = atoi(buffer.sub(14,17));
|
||||
|
||||
TString16 tmp = buffer.sub(17,23);
|
||||
|
||||
TString8 tmp = buffer.sub(17,23);
|
||||
_datatras = converti(tmp,FALSE);
|
||||
|
||||
_totrectras = atol(buffer.sub(23,29));
|
||||
|
||||
if (_numdisk > 1) //Va fatto solo dal disco 2 in poi
|
||||
if (_nomeid != _nomeidp || _dittainv != _dittainvp || _totrectras != _totrectrasp
|
||||
|| _numinv != _numinvp || _datatras != _datatrasp)
|
||||
@ -226,8 +221,6 @@ bool TRic_archivi::leggi_marker()
|
||||
_numinvp = _numinv;
|
||||
_datatrasp = _datatras;
|
||||
|
||||
fclose(i);
|
||||
|
||||
if (_numdisk == 1) // Va fatto solo per il primo disco
|
||||
{
|
||||
_dittaric = leggi_tabella_tras();
|
||||
@ -655,15 +648,15 @@ bool TRic_archivi::baipassa(TMask& m,KEY k)
|
||||
|
||||
void TRic_archivi::ripristina_trasfer()
|
||||
{
|
||||
TProgind prg (1,TR("Trasferimento archivi in corso\nPrego attendere"),FALSE, FALSE);
|
||||
TProgind prg (1,TR("Trasferimento archivi"),false, false);
|
||||
|
||||
if (_numdisk == 1)
|
||||
{
|
||||
// set_firm(_dittaric);
|
||||
fcopy(_trasfer,_trasf,FALSE);
|
||||
fcopy(_trasfer,_trasf,false);
|
||||
}
|
||||
else
|
||||
fcopy(_trasfer,_trasf,TRUE);
|
||||
fcopy(_trasfer,_trasf,true);
|
||||
}
|
||||
|
||||
void TRic_archivi::trasfer2tempfile()
|
||||
@ -685,11 +678,10 @@ void TRic_archivi::ditta_ricevente()
|
||||
|
||||
long TRic_archivi::leggi_tabella_tras()
|
||||
{
|
||||
long ditta = 0;
|
||||
|
||||
TString16 dep;
|
||||
long ditta = 0;
|
||||
|
||||
TTable tab_tra ("%TRA");
|
||||
dep.format("%10s%05ld", (const char*)_nomeid, _dittainv);
|
||||
TString16 dep; dep.format("%10s%05ld", (const char*)_nomeid, _dittainv);
|
||||
tab_tra.put("CODTAB", dep);
|
||||
if (tab_tra.read() == NOERR)
|
||||
{
|
||||
@ -700,17 +692,12 @@ long TRic_archivi::leggi_tabella_tras()
|
||||
_agg_clifo = tab_tra.get_char("S1");
|
||||
_agg_pcon = tab_tra.get_char("S2");
|
||||
_agg_cls = tab_tra.get_char("S3");
|
||||
bool agg_fatatt = tab_tra.get_bool("B0");
|
||||
if (agg_fatatt)
|
||||
_agg_fatatt = 'X';
|
||||
else
|
||||
_agg_fatatt = ' ';
|
||||
|
||||
const bool agg_fatatt = tab_tra.get_bool("B0");
|
||||
_agg_fatatt = agg_fatatt ? 'X' : ' ';
|
||||
|
||||
bool agg_fatpas = tab_tra.get_bool("B1");
|
||||
if (agg_fatpas)
|
||||
_agg_fatpas = 'X';
|
||||
else
|
||||
_agg_fatpas = ' ';
|
||||
const bool agg_fatpas = tab_tra.get_bool("B1");
|
||||
_agg_fatpas = agg_fatpas ? 'X' : ' ';
|
||||
}
|
||||
|
||||
return ditta;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "cg6400.h"
|
||||
|
||||
PAGE "" -1 -1 70 15
|
||||
PAGE "Ricezione archivi" -1 -1 70 15
|
||||
|
||||
STRING F_NOMEID 10
|
||||
BEGIN
|
||||
|
119
cg/cg6600.cpp
119
cg/cg6600.cpp
@ -50,7 +50,10 @@ class TRic_tab : public TSkeleton_application
|
||||
real _importo,_totdoc;
|
||||
TFilename _tmpcaus,_tmprcaus,_tmpclifo,_tmpcon,_tmpmov,_tmprmov,_tmpriva;
|
||||
TFilename _tmpoccas,_tmppart,_tmpscad,_tmppagsca;
|
||||
|
||||
|
||||
protected:
|
||||
void genera_codice_occasionale(TString& ocfpi);
|
||||
|
||||
public:
|
||||
TString _titolo;
|
||||
|
||||
@ -1094,7 +1097,7 @@ void TRic_tab::ricevi_movPN(TString& key, char uselab)
|
||||
}
|
||||
|
||||
leggi_record_controllo();
|
||||
TString16 chiave;
|
||||
TString8 chiave;
|
||||
chiave.format("%07ld", nreg);
|
||||
TString16 sigla; sigla << uselab;
|
||||
str = _record.overwrite(sigla,240);
|
||||
@ -1103,8 +1106,47 @@ void TRic_tab::ricevi_movPN(TString& key, char uselab)
|
||||
}
|
||||
}
|
||||
|
||||
void TRic_tab::genera_codice_occasionale(TString& ocfpi)
|
||||
{
|
||||
long progr = 0;
|
||||
_occas->setkey(1);
|
||||
_occas->put(OCC_CFPI, "RIC~"); // Chiave sicuramente maggiore di "RIC"
|
||||
|
||||
bool found = false;
|
||||
|
||||
if (_occas->read(_isgteq) == NOERR)
|
||||
{
|
||||
while (_occas->read(_isprev) == NOERR)
|
||||
{
|
||||
const TString& cfpi = _occas->get(OCC_CFPI);
|
||||
// Non lasciarti ingannare dai codici fiscali che cominciano per RIC
|
||||
const int cmp = cfpi.compare("RIC ", 4);
|
||||
if (cmp == 0)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
if (cmp <= 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
found = _occas->last() == NOERR;
|
||||
|
||||
if (found)
|
||||
{
|
||||
const TString& cfpi = _occas->get(OCC_CFPI);
|
||||
if (cfpi.starts_with("RIC "))
|
||||
progr = atol(cfpi.mid(4));
|
||||
}
|
||||
|
||||
ocfpi.format("RIC%13ld", progr+1);
|
||||
}
|
||||
|
||||
|
||||
bool TRic_tab::occasionali(TString& ocfpi)
|
||||
{
|
||||
/* Invoco la crecifissione in sala mensa!!!!!!!!!!!!!!!!!
|
||||
TString chiave;
|
||||
long prog = 0;
|
||||
bool esiste = FALSE;
|
||||
@ -1182,8 +1224,61 @@ bool TRic_tab::occasionali(TString& ocfpi)
|
||||
_occas->put(OCC_CFPI, ocfpi);
|
||||
_occas->write();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
*/
|
||||
|
||||
return TRUE;
|
||||
// Mi posiziono sui dati dell'occasionale temporaneo da trasferire
|
||||
_toccas->setkey(1);
|
||||
_toccas->zero();
|
||||
_toccas->put(OCC_CFPI, ocfpi);
|
||||
if (_toccas->read() != NOERR)
|
||||
_toccas->zero();
|
||||
|
||||
bool rinumera = true;
|
||||
if (ocfpi.len() == 11)
|
||||
{
|
||||
rinumera = !real::is_natural(ocfpi); // Rinumera se non e' una Partita IVA
|
||||
} else
|
||||
if (ocfpi.len() == 16)
|
||||
{
|
||||
const char* const test = "AAAAAANNANNANNNA";
|
||||
int i;
|
||||
for (i = 15; i >= 0; i--)
|
||||
{
|
||||
if (test[i] == 'A')
|
||||
{
|
||||
if (!isalpha(ocfpi[i]))
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isdigit(ocfpi[i]))
|
||||
break;
|
||||
}
|
||||
}
|
||||
rinumera = i >= 0; // Rinumera se non e' un codice fiscale
|
||||
}
|
||||
|
||||
bool update = false; // Di default faccio la write invece della rewrite
|
||||
if (rinumera)
|
||||
{
|
||||
genera_codice_occasionale(ocfpi);
|
||||
}
|
||||
else
|
||||
{
|
||||
_occas->put(OCC_CFPI, ocfpi);
|
||||
update = _occas->read() == NOERR;
|
||||
}
|
||||
|
||||
// Copio i dati dall'occasionale temporaneo se esistono
|
||||
if (_toccas->curr().empty())
|
||||
_occas->zero();
|
||||
else
|
||||
_occas->curr() = _toccas->curr();
|
||||
_occas->put(OCC_CFPI, ocfpi);
|
||||
int err = update ? _occas->rewrite() : _occas->write();
|
||||
return err == NOERR;
|
||||
}
|
||||
|
||||
void TRic_tab::scrivi_righeIVA(long numreg)
|
||||
@ -1191,12 +1286,12 @@ void TRic_tab::scrivi_righeIVA(long numreg)
|
||||
_triva->setkey(1);
|
||||
_triva->zero();
|
||||
_triva->put(RMI_NUMREG, numreg);
|
||||
TRectype riva (LF_RMOVIVA);
|
||||
TRectype riva(LF_RMOVIVA);
|
||||
riva = _triva->curr();
|
||||
for (_triva->read(); !_triva->eof(); _triva->next())
|
||||
{
|
||||
if (_triva->curr() > riva) break;
|
||||
|
||||
if (_triva->curr() > riva)
|
||||
break;
|
||||
_triva->put(RMI_NUMREG, _nuovareg);
|
||||
_rmoviva->curr() = _triva->curr();
|
||||
_rmoviva->write();
|
||||
@ -1226,16 +1321,16 @@ void TRic_tab::ricevi_movIVA(TString& key, char uselab)
|
||||
{
|
||||
_prog->addstatus(1);
|
||||
|
||||
long nreg = _tmov->get_long(MOV_NUMREG);
|
||||
const long nreg = _tmov->get_long(MOV_NUMREG);
|
||||
const TString4 codreg = _tmov->get(MOV_REG);
|
||||
const TString4 codcau = _tmov->get(MOV_CODCAUS);
|
||||
|
||||
TString codreg = _tmov->get(MOV_REG);
|
||||
TString codcau = _tmov->get(MOV_CODCAUS);
|
||||
|
||||
if (codreg.empty() || codcau.empty()) continue;
|
||||
if (codreg.empty() || codcau.empty())
|
||||
continue;
|
||||
|
||||
_nuovareg = _tmov->get_long("TNUMREG");
|
||||
|
||||
TString ocfpi = _tmov->get(MOV_OCFPI);
|
||||
|
||||
if (ocfpi.not_empty())
|
||||
occasionali(ocfpi);
|
||||
|
||||
|
@ -2,9 +2,12 @@
|
||||
// Ricezione dati: lista controllo movimenti
|
||||
//
|
||||
|
||||
//#include <config.h>
|
||||
#include "cglib01.h"
|
||||
#include "cglib03.h"
|
||||
#include "cglib04.h"
|
||||
#include "cg6700.h"
|
||||
|
||||
#include <mask.h>
|
||||
#include <prefix.h>
|
||||
#include <printapp.h>
|
||||
#include <progind.h>
|
||||
#include <tabutil.h>
|
||||
@ -13,22 +16,6 @@
|
||||
|
||||
#include <nditte.h>
|
||||
#include <mov.h>
|
||||
#include <rmov.h>
|
||||
#include <rmoviva.h>
|
||||
#include <causali.h>
|
||||
#include <clifo.h>
|
||||
#include <nditte.h>
|
||||
#include <pconti.h>
|
||||
#include <partite.h>
|
||||
#include <scadenze.h>
|
||||
#include <pagsca.h>
|
||||
|
||||
#include "cglib01.h"
|
||||
#include "cglib02.h"
|
||||
#include "cglib03.h"
|
||||
#include "cglib04.h"
|
||||
#include "cg6700.h"
|
||||
|
||||
|
||||
class TRic_ListaMov : public TPrintapp
|
||||
{
|
||||
@ -46,8 +33,8 @@ class TRic_ListaMov : public TPrintapp
|
||||
|
||||
TFilename _pathfile;
|
||||
TString _descr_causale, _descr_conto;
|
||||
TString16 _causale, _registro, _numdoc, _tipodoc, _codval;
|
||||
TString16 _codpag, _codiva, _tipo_conto;
|
||||
TString16 _numdoc;
|
||||
TString4 _codpag, _codiva, _tipo_conto, _causale, _registro, _tipodoc, _codval;
|
||||
TString _record, _numpart, _descr_anag, _descr_pag, _tipom_cau, _codval_part, _codpag_scad,_reg;
|
||||
bool _mov_sez, _errore_grave, _esiste_conto, _seconda_volta, _errore_grave_SC;
|
||||
bool _is_iva, _is_salda, _risposta, _continua, _intestaSC, _errore_grave_totale;
|
||||
@ -457,12 +444,12 @@ void TRic_ListaMov::stampa_errori_mov(int riga)
|
||||
}
|
||||
}
|
||||
|
||||
int TRic_ListaMov::cerca_anno_solare_esercizio(int codice)
|
||||
{
|
||||
/*
|
||||
int TRic_ListaMov::cerca_anno_solare_esercizio(int codice)
|
||||
{
|
||||
int anno = 0;
|
||||
/*
|
||||
TTable ese ("ESC");
|
||||
TDate datafine;
|
||||
int anno = 0;
|
||||
TString4 dep; dep.format("%04d", codice);
|
||||
|
||||
ese.zero();
|
||||
@ -473,8 +460,12 @@ int TRic_ListaMov::cerca_anno_solare_esercizio(int codice)
|
||||
if (datafine != botime)
|
||||
anno = datafine.year();
|
||||
|
||||
return anno;
|
||||
*/
|
||||
TEsercizi_contabili esc;
|
||||
if (esc.exist(codice))
|
||||
anno = esc[codice].fine().year();
|
||||
|
||||
return anno;
|
||||
TDate datainizio, datafine;
|
||||
_ec.code2range(codice, datainizio, datafine);
|
||||
return datafine.year();
|
||||
@ -496,9 +487,8 @@ bool TRic_ListaMov::controlla_mov()
|
||||
_err.set(0L);
|
||||
}
|
||||
|
||||
TString app (_datacomp.string());
|
||||
if (app.empty())
|
||||
tr.datafine_esprec(_anno,_datacomp);
|
||||
if (!_datacomp.ok())
|
||||
_datacomp = tr.data_fine_esercizio(_anno);
|
||||
|
||||
if ( TDate::isdate(_datareg.string()) )
|
||||
{
|
||||
@ -605,7 +595,7 @@ bool TRic_ListaMov::controlla_mov()
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!causreg.blank() && _ae)
|
||||
else if (causreg.full() && _ae)
|
||||
{
|
||||
int anno = cerca_anno_solare_esercizio(_ae);
|
||||
TRegistro rg (causreg, anno);
|
||||
|
@ -5,25 +5,9 @@
|
||||
// Scelta ditta per ricezione --> cg6 -7 S
|
||||
// Annullo movimenti ricezione --> cg6 -7 A
|
||||
|
||||
#include <mask.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
#include <config.h>
|
||||
#include <mailbox.h>
|
||||
#include <prefix.h>
|
||||
|
||||
#include <nditte.h>
|
||||
#include <mov.h>
|
||||
#include <rmov.h>
|
||||
#include <rmoviva.h>
|
||||
#include <pconti.h>
|
||||
#include <occas.h>
|
||||
#include <comuni.h>
|
||||
|
||||
#include "cglib04.h"
|
||||
#include "cglib03.h"
|
||||
#include "cglib01.h"
|
||||
#include "cglib03.h"
|
||||
|
||||
#include "cg6800.h"
|
||||
#include "cg6801.h"
|
||||
@ -49,7 +33,7 @@ class TVar_mov : public TApplication
|
||||
bool _registrato;
|
||||
|
||||
public:
|
||||
TString _titolo;
|
||||
const char* _titolo;
|
||||
|
||||
virtual bool create();
|
||||
virtual bool destroy();
|
||||
@ -139,16 +123,9 @@ TVar_mov::TVar_mov(char mov) : _scelta(toupper(mov))
|
||||
_trmov = NULL;
|
||||
switch (_scelta)
|
||||
{
|
||||
case 'P':
|
||||
_titolo = TR("Variazione movimenti prima nota");
|
||||
break;
|
||||
|
||||
case 'I':
|
||||
_titolo = TR("Variazione movimenti iva");
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
case 'P': _titolo = TR("Variazione movimenti prima nota"); break;
|
||||
case 'I': _titolo = TR("Variazione movimenti iva"); break;
|
||||
default : _titolo = ""; break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -205,27 +182,27 @@ bool TVar_mov::destroy()
|
||||
|
||||
void TVar_mov::apri_temp_file()
|
||||
{
|
||||
TString80 tmpmov = "%";
|
||||
TFilename tmpmov = "%";
|
||||
tmpmov << get_firm_dir();
|
||||
tmpmov << "\\" << TEMP_MOV;
|
||||
TString80 tmprmov = "%";
|
||||
TFilename tmprmov = "%";
|
||||
tmprmov << get_firm_dir();
|
||||
tmprmov << "\\" << TEMP_RMOV;
|
||||
|
||||
_tmov = new TIsamtempfile(LF_MOV, tmpmov, 0);
|
||||
_trmov = new TIsamtempfile(LF_RMOV, tmprmov, 0);
|
||||
|
||||
TString80 tmprmoviva = "%";
|
||||
TFilename tmprmoviva = "%";
|
||||
tmprmoviva << get_firm_dir();
|
||||
tmprmoviva << "\\" << TEMP_RMOVIVA;
|
||||
TString80 tmpoccas = "%";
|
||||
TFilename tmpoccas = "%";
|
||||
tmpoccas << get_firm_dir();
|
||||
tmpoccas << "\\" << TEMP_OCC;
|
||||
|
||||
_is_exist = FALSE;
|
||||
TString tmp = tmprmoviva.mid(1);
|
||||
tmp << ".dbf";
|
||||
if (fexist(tmp))
|
||||
TFilename tmp = tmprmoviva.mid(1);
|
||||
tmp.ext("dbf");
|
||||
if (tmp.exist())
|
||||
{
|
||||
_tiva = new TIsamtempfile(LF_RMOVIVA, tmprmoviva, 0);
|
||||
_toccas = new TIsamtempfile(LF_OCCAS, tmpoccas, 0);
|
||||
@ -941,7 +918,7 @@ bool TVar_mov::data_competenza_hnd(TMask_field& f, KEY k)
|
||||
TString16 datacomp = f.get();
|
||||
if (datacomp.empty())
|
||||
{
|
||||
int anno = atoi(f.mask().get(F_ANNO));
|
||||
int anno = f.mask().get_int(F_ANNO);
|
||||
app().datacompetenza(anno,datacomp);
|
||||
f.set(datacomp);
|
||||
}
|
||||
@ -1257,6 +1234,7 @@ bool TVar_mov::data(TMask_field& f, KEY k)
|
||||
|
||||
void TVar_mov::datacompetenza(int anno, TString& datacomp)
|
||||
{
|
||||
/*
|
||||
TTable esc ("ESC");
|
||||
|
||||
TString dep (format("%04d", anno));
|
||||
@ -1267,6 +1245,8 @@ void TVar_mov::datacompetenza(int anno, TString& datacomp)
|
||||
datacomp = esc.get("D1");
|
||||
else
|
||||
datacomp = "";
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
void TVar_mov::ricerca_localita(TString& codcom, TString& den, TString& cap, TString& prov)
|
||||
@ -1442,7 +1422,7 @@ void TVar_mov::registra_IVA(TMask& m)
|
||||
|
||||
if (ragsococc.not_empty())
|
||||
{
|
||||
ocfpi = m.get (F_CFPI);
|
||||
ocfpi = m.get(F_CFPI);
|
||||
|
||||
// Se il cliente occasionale non esisteva su questo movimento e da maschera l'ho
|
||||
// aggiunto devo determinare con quale codice memorizzarlo sul file dove non esiste
|
||||
@ -1450,19 +1430,14 @@ void TVar_mov::registra_IVA(TMask& m)
|
||||
|
||||
if (ocfpi.empty())
|
||||
{
|
||||
TString app;
|
||||
long progr;
|
||||
|
||||
_toccas->last();
|
||||
ocfpi = _toccas->get(OCC_CFPI);
|
||||
app = ocfpi.mid(0,3);
|
||||
if (app == "RIC")
|
||||
progr = atol(ocfpi.mid(3,6));
|
||||
else
|
||||
progr = 0;
|
||||
|
||||
progr++;
|
||||
ocfpi = format("%3s%6ld", (const char*) "RIC", progr);
|
||||
long progr = 1;
|
||||
if (_toccas->last() == NOERR)
|
||||
{
|
||||
ocfpi = _toccas->get(OCC_CFPI);
|
||||
if (ocfpi.starts_with("RIC"))
|
||||
progr += atol(ocfpi.mid(3));
|
||||
}
|
||||
ocfpi.format("RIC%13ld", progr);
|
||||
}
|
||||
|
||||
// Se invece gia' esisteva sul movimento il campo della maschera nascosto contiene gia'
|
||||
|
@ -1,18 +1,19 @@
|
||||
// Esercizi contabili e registri IVA
|
||||
|
||||
#include "cglib01.h"
|
||||
#include "cg2103.h"
|
||||
|
||||
#include <diction.h>
|
||||
#include <mask.h>
|
||||
#include <tabutil.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
|
||||
#include <comuni.h>
|
||||
#include <pconti.h>
|
||||
#include <rmov.h>
|
||||
#include <rmoviva.h>
|
||||
#include <rmov.h>
|
||||
|
||||
#include "comuni.h"
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Gestione Tabella esercizi
|
||||
|
359
cg/cglib04.cpp
359
cg/cglib04.cpp
@ -1,19 +1,16 @@
|
||||
// cglib04.cpp
|
||||
#include "cglib04.h"
|
||||
#include "cgsaldac.h"
|
||||
|
||||
#include <codeb.h> // RED ALERT!
|
||||
|
||||
#include <codeb.h>
|
||||
#include <diction.h>
|
||||
#include <extcdecl.h>
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
#include <relation.h>
|
||||
#include <scanner.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
#include <varrec.h>
|
||||
|
||||
#include "cglib01.h"
|
||||
#include "cglib04.h"
|
||||
#include "cgsaldac.h"
|
||||
|
||||
const int sizeT = 256; //Lunghezza del record del TRASFER
|
||||
const int sizeH = 1024; //Lunghezza del record dell'HEADER
|
||||
@ -27,7 +24,7 @@ bool format_if_zero(TString& field, int len)
|
||||
{
|
||||
if (real::is_natural(field))
|
||||
field.right_just(len, '0');
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -312,11 +309,12 @@ TTransfer_file::TTransfer_file(char scelta)
|
||||
_numreg_piva = 0L;
|
||||
_scelta = scelta;
|
||||
_control_rec = new TString(LEN_REC_HEAD);
|
||||
if (scelta == 'S')
|
||||
_trc.leggi_modulo(tracciato_AS);
|
||||
else
|
||||
if (scelta == 'P')
|
||||
_trc.leggi_modulo(tracciato_PC);
|
||||
switch (scelta)
|
||||
{
|
||||
case 'S': _trc.leggi_modulo(tracciato_AS); break;
|
||||
case 'P': _trc.leggi_modulo(tracciato_PC); break;
|
||||
default : break;
|
||||
}
|
||||
|
||||
_tpcon = NULL;
|
||||
|
||||
@ -399,17 +397,15 @@ void TTransfer_file::remove_all(bool file_ditta)
|
||||
|
||||
if (sigla == 'W')
|
||||
{
|
||||
TString80 path;
|
||||
path << dir << "\\tcaus.dbf";
|
||||
TFilename path(dir);
|
||||
path.add("tcaus.dbf");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\tcaus.cdx";
|
||||
path.ext("cdx");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\trcaus.dbf";
|
||||
path = dir;
|
||||
path.add("trcaus.dbf");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\trcaus.cdx";
|
||||
path.ext("cdx");
|
||||
::remove(path);
|
||||
}
|
||||
if (sigla == 'A')
|
||||
@ -424,62 +420,54 @@ void TTransfer_file::remove_all(bool file_ditta)
|
||||
}
|
||||
if (sigla == 'P')
|
||||
{
|
||||
TString80 path;
|
||||
path << dir << "\\tpcon.dbf";
|
||||
TFilename path(dir);
|
||||
path.add("tpcon.dbf");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\tpcon.cdx";
|
||||
path.ext("cdx");
|
||||
::remove(path);
|
||||
}
|
||||
if (sigla == 'Z')
|
||||
{
|
||||
TString80 path;
|
||||
path << dir << "\\tmov.dbf";
|
||||
TFilename path(dir);
|
||||
path.add("tmov.dbf");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\tmov.cdx";
|
||||
path.ext("cdx");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\trmov.dbf";
|
||||
path = dir;
|
||||
path.add("trmov.dbf");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\trmov.cdx";
|
||||
path.ext("cdx");
|
||||
::remove(path);
|
||||
}
|
||||
if (sigla == 'U')
|
||||
{
|
||||
TString80 path;
|
||||
path << dir << "\\trmoviva.dbf";
|
||||
TFilename path(dir);
|
||||
path.add("trmoviva.dbf");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\trmoviva.cdx";
|
||||
path.ext("cdx");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\toccas.dbf";
|
||||
path = dir;
|
||||
path.add("toccas.dbf");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\toccas.cdx";
|
||||
path.ext("cdx");
|
||||
::remove(path);
|
||||
}
|
||||
if (sigla == 'B')
|
||||
{
|
||||
TString80 path;
|
||||
path << dir << "\\tpart.dbf";
|
||||
TFilename path(dir);
|
||||
path.add("tpart.dbf");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\tpart.cdx";
|
||||
path.ext("cdx");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\tscad.dbf";
|
||||
path = dir;
|
||||
path.add("tscad.dbf");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\tscad.cdx";
|
||||
path.ext("cdx");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\tpagsca.dbf";
|
||||
path = dir;
|
||||
path.add("tpagsca.dbf");
|
||||
::remove(path);
|
||||
path = "";
|
||||
path << dir << "\\tpagsca.cdx";
|
||||
path.ext("cdx");
|
||||
::remove(path);
|
||||
}
|
||||
}
|
||||
@ -900,20 +888,22 @@ void TTransfer_file::annulla_classi(int g, int c,bool conto)
|
||||
|
||||
if (okann )
|
||||
{
|
||||
pcon.zero("SEZIVD");
|
||||
pcon.zero("LETTIVD");
|
||||
pcon.zero("NUMRIVD");
|
||||
pcon.zero("NUMIVD");
|
||||
pcon.zero("SEZIVDOPP");
|
||||
pcon.zero("LETTIVDOPP");
|
||||
pcon.zero("NUMRIVDOPP");
|
||||
pcon.zero("NUMIVDOPP");
|
||||
pcon.zero("SEZIVD");
|
||||
pcon.zero("LETTIVD");
|
||||
pcon.zero("NUMRIVD");
|
||||
pcon.zero("NUMIVD");
|
||||
pcon.zero("SEZIVDOPP");
|
||||
pcon.zero("LETTIVDOPP");
|
||||
pcon.zero("NUMRIVDOPP");
|
||||
pcon.zero("NUMIVDOPP");
|
||||
|
||||
pcon.rewrite();
|
||||
pcon.rewrite();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// La gogna e' troppo poco: inguardabile!
|
||||
// Pointer e reference ben conditi con scansioni inutili della tabella ESC!
|
||||
int TTransfer_file::dataes(const TDate& d, int* prevesc, TDate& finesp)
|
||||
{
|
||||
*prevesc = 0;
|
||||
@ -1013,6 +1003,7 @@ const char* TTransfer_file::numero_civico(TString& indirizzo)
|
||||
|
||||
const char* TTransfer_file::cerca_comune_cap(const TString& field, const TString& localita)
|
||||
{
|
||||
/*
|
||||
const TString80 dencom(localita);
|
||||
TString16 cap(field);
|
||||
|
||||
@ -1049,6 +1040,8 @@ const char* TTransfer_file::cerca_comune_cap(const TString& field, const TString
|
||||
}
|
||||
}
|
||||
return TEMP;
|
||||
*/
|
||||
return cap2comune(field, localita); // Guy: Oggi e' meglio fare cosi', o no?
|
||||
}
|
||||
|
||||
const char* TTransfer_file::cerca_cap_comune(const TString& localita)
|
||||
@ -1065,11 +1058,11 @@ const char* TTransfer_file::cerca_comune_den(const TString& field)
|
||||
|
||||
void TTransfer_file::write_tmp_tabelle(TString& record, bool create)
|
||||
{
|
||||
TString16 sigla,key,cap;
|
||||
TString16 key,cap;
|
||||
|
||||
int numfield = 2; //Per le tabelle il primo campo della mappa non e' significativo
|
||||
//ai fini del trasferimento (flag di record gia trasferito).
|
||||
TMappa_trc& trc = mappa();
|
||||
const TMappa_trc& trc = mappa();
|
||||
TIsamtempfile* file = NULL;
|
||||
TRectype* dep = NULL;
|
||||
int logicnum;
|
||||
@ -1077,7 +1070,7 @@ void TTransfer_file::write_tmp_tabelle(TString& record, bool create)
|
||||
int num_riga = 1;
|
||||
int gruppo,conto;
|
||||
|
||||
sigla = record.mid(0,2);
|
||||
const TString4 sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
|
||||
if (trc.is_key((const char *) key))
|
||||
@ -1414,7 +1407,7 @@ int TTransfer_file::annoes_datacomp(const TString& record, TDate& datacomp)
|
||||
{
|
||||
if (segn == 1)
|
||||
{
|
||||
datafine_esprec(aep,datacomp);
|
||||
datacomp = data_fine_esercizio(aep);
|
||||
ae = aep;
|
||||
}
|
||||
}
|
||||
@ -1535,10 +1528,10 @@ static bool ditta_in_euro()
|
||||
|
||||
void TTransfer_file::write_tmp_movPN(TString& record)
|
||||
{
|
||||
TString sigla,key,str,codreg;
|
||||
TString key,str,codreg;
|
||||
int numfield = 3; //Per i movimenti i primi due campi della mappa non sono significativi
|
||||
//ai fini del trasferimento (flag record gia trasferito e nuovo ultimo numero di registrazione).
|
||||
TMappa_trc& trc = mappa();
|
||||
const TMappa_trc& trc = mappa();
|
||||
TIsamtempfile* file = NULL;
|
||||
TRectype* dep = NULL;
|
||||
int logicnum;
|
||||
@ -1552,7 +1545,7 @@ void TTransfer_file::write_tmp_movPN(TString& record)
|
||||
int solo_sezionale = atoi(record.mid(218,1));
|
||||
if (solo_sezionale != 1)
|
||||
{
|
||||
sigla = record.mid(0,2);
|
||||
const TString4 sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
|
||||
if (trc.is_key((const char *) key))
|
||||
@ -1766,13 +1759,13 @@ int TTransfer_file::trasfer_data_mov(TIsamtempfile& file, TRectype& dep)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int TTransfer_file::cerca_annoes(long numreg,TString& tipodoc)
|
||||
int TTransfer_file::cerca_annoes(long numreg, TString& tipodoc) const
|
||||
{
|
||||
TString80 tmpmov = "%";
|
||||
|
||||
const long ditta = prefix().get_codditta();
|
||||
|
||||
TFilename tmpmov = "%";
|
||||
tmpmov << firm2dir(ditta);
|
||||
tmpmov << "\\" << TEMP_MOV;
|
||||
tmpmov.add(TEMP_MOV);
|
||||
TIsamtempfile tmov (LF_MOV, tmpmov, 0);
|
||||
|
||||
int anno = 0;
|
||||
@ -1790,43 +1783,41 @@ int TTransfer_file::cerca_annoes(long numreg,TString& tipodoc)
|
||||
}
|
||||
|
||||
void TTransfer_file::scrivi_occasionali(const TString& record, TString& cfpi)
|
||||
{
|
||||
|
||||
{
|
||||
const TString80 ragsoc = record.sub(61,86);
|
||||
cfpi.cut(0);
|
||||
if (ragsoc.blank())
|
||||
return;
|
||||
|
||||
_npoccas++;
|
||||
|
||||
TString80 ind = record.sub(86,108);
|
||||
const TString80 com = record.sub(108,126);
|
||||
const TString8 cap = record.sub(126,131);
|
||||
TString80 ind = record.sub(86,108);
|
||||
const TString80 com = record.sub(108,126);
|
||||
const TString8 cap = record.sub(126,131);
|
||||
TString16 civ;
|
||||
|
||||
ind = ind.rtrim();
|
||||
if (ind.not_empty())
|
||||
ind.rtrim();
|
||||
if (ind.full())
|
||||
civ = numero_civico(ind);
|
||||
|
||||
cfpi.format("RIC%13ld", _npoccas);
|
||||
cfpi = record.sub(176, 192); // Patch per crp: cerca il codice fiscale in un campo non documentato
|
||||
if (cfpi.blank())
|
||||
cfpi.format("RIC%13ld", ++_npoccas);
|
||||
|
||||
//ricerca_comune(com);
|
||||
_cod_com = "";
|
||||
|
||||
if (cap.not_empty())
|
||||
_cod_com.cut(0);
|
||||
if (cap.full())
|
||||
_cod_com = cerca_comune_cap(cap,com);
|
||||
if (_cod_com.empty())
|
||||
_cod_com = cerca_comune_den(com);
|
||||
|
||||
_toccas->setkey(1);
|
||||
_toccas->zero();
|
||||
_toccas->put("CFPI", cfpi);
|
||||
_toccas->put("RAGSOC", ragsoc);
|
||||
_toccas->put("INDIR", ind);
|
||||
_toccas->put("CIV", civ);
|
||||
_toccas->put("CAP", cap);
|
||||
if (_cod_com != "")
|
||||
_toccas->put("COM", _cod_com);
|
||||
_toccas->put(OCC_CFPI, cfpi);
|
||||
_toccas->put(OCC_RAGSOC, ragsoc);
|
||||
_toccas->put(OCC_INDIR, ind);
|
||||
_toccas->put(OCC_CIV, civ);
|
||||
_toccas->put(OCC_CAP, cap);
|
||||
if (_cod_com.full())
|
||||
_toccas->put(OCC_COM, _cod_com);
|
||||
|
||||
int err = _toccas->write();
|
||||
if (err == _isreinsert)
|
||||
@ -1835,10 +1826,10 @@ void TTransfer_file::scrivi_occasionali(const TString& record, TString& cfpi)
|
||||
|
||||
void TTransfer_file::write_tmp_movIVA(TString& record)
|
||||
{
|
||||
TString sigla,key,str;
|
||||
TString key,str;
|
||||
int numfield = 3; //Per i movimenti i primi due campi della mappa non sono significativi
|
||||
//ai fini del trasferimento (flag record gia trasferito e nuovo ultimo numero di registrazione).
|
||||
TMappa_trc& trc = mappa();
|
||||
const TMappa_trc& trc = mappa();
|
||||
TIsamtempfile* file = NULL;
|
||||
TRectype* dep = NULL;
|
||||
int logicnum;
|
||||
@ -1847,8 +1838,8 @@ void TTransfer_file::write_tmp_movIVA(TString& record)
|
||||
TString tmp_path;
|
||||
static bool create = TRUE;
|
||||
|
||||
sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
const TString4 sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla, numfield);
|
||||
|
||||
if (trc.is_key((const char *) key))
|
||||
{
|
||||
@ -2225,7 +2216,7 @@ void TTransfer_file::calcola_impdocval(long nreg,int nrig,TString& record)
|
||||
// Scrive partita da record di sistema a record di file temporaneo
|
||||
void TTransfer_file::partita(TString& record)
|
||||
{
|
||||
TMappa_trc& trc = mappa();
|
||||
const TMappa_trc& trc = mappa();
|
||||
TString sigla,key;
|
||||
int numfield; // Campo di partenza del saldaconto su cgtrc.ini
|
||||
TString tipoc;
|
||||
@ -2425,7 +2416,7 @@ void TTransfer_file::calcola_importo(TString& record)
|
||||
|
||||
void TTransfer_file::scadenza(TString& record)
|
||||
{
|
||||
TMappa_trc& trc = mappa();
|
||||
const TMappa_trc& trc = mappa();
|
||||
TString sigla,key,app_imp,app_val;
|
||||
int numfield = 150;
|
||||
TString tipoc;
|
||||
@ -2803,7 +2794,7 @@ char TTransfer_file::leggi_sez_partita(TString& record,TString& tipo)
|
||||
|
||||
void TTransfer_file::pagsca(TString& record)
|
||||
{
|
||||
TMappa_trc& trc = mappa();
|
||||
const TMappa_trc& trc = mappa();
|
||||
TString sigla,key;
|
||||
int numfield = 200;
|
||||
TString tipoc;
|
||||
@ -3156,7 +3147,7 @@ bool TTransfer_file::ordina_trasfer(const char* orig)
|
||||
bool TTransfer_file::fcopytemp(const char* orig, const char* dest)
|
||||
{
|
||||
// conto i dischetti per l'apertura
|
||||
TString sigle,nrec;
|
||||
|
||||
long nrec_cau,nrec_clifo,nrec_pcon,nrec_mov,nrec_moviva,nrec_salda;
|
||||
bool is_delete = FALSE, tpcon_valid = FALSE;
|
||||
|
||||
@ -3170,10 +3161,10 @@ bool TTransfer_file::fcopytemp(const char* orig, const char* dest)
|
||||
// Legge numero di rec. del transfer (per la progind)
|
||||
_ttab->first();
|
||||
TRic_recfield recf (_ttab->curr(), "S0", 0, 256);
|
||||
TString rec = (const char*) recf;
|
||||
const TFixed_string rec((const char*)recf);
|
||||
|
||||
sigle = rec.sub(38,47);
|
||||
nrec = rec.sub(47,101);
|
||||
const TString16 sigle = rec.sub(38,47);
|
||||
const TString80 nrec = rec.sub(47,101);
|
||||
|
||||
int pos = 0;
|
||||
|
||||
@ -3299,13 +3290,13 @@ bool TTransfer_file::fcopytemp(const char* orig, const char* dest)
|
||||
|
||||
void TTransfer_file::ordina_file_da_elaborare(TString& buffer)
|
||||
{
|
||||
TString sigle_app = "";
|
||||
TString numrec_app = "";
|
||||
TString16 sigle_app;
|
||||
TString80 numrec_app;
|
||||
int p;
|
||||
|
||||
TString sigle = buffer.sub(86,95);
|
||||
TString16 sigle = buffer.sub(86,95);
|
||||
sigle.trim();
|
||||
TString numrec = buffer.sub(95,149);
|
||||
TString80 numrec = buffer.sub(95,149);
|
||||
|
||||
if ( (p = sigle.find('W')) >= 0)
|
||||
{
|
||||
@ -3790,11 +3781,11 @@ bool TTransfer_file::fcopytemp_PC(const char* orig, const char* dest)
|
||||
|
||||
void TTransfer_file::write_testata_causali(TString& record)
|
||||
{
|
||||
TString sigla,key,str;
|
||||
TString key,str;
|
||||
int numfield = 1;
|
||||
TMappa_trc& trc = mappa();
|
||||
const TMappa_trc& trc = mappa();
|
||||
|
||||
sigla = record.mid(0,2);
|
||||
const TString4 sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
|
||||
_depcaus->zero();
|
||||
@ -3944,7 +3935,7 @@ void TTransfer_file::write_clienti_fornitori(TString& record)
|
||||
}
|
||||
if (fname == CLI_ALLEG)
|
||||
if (field == "2")
|
||||
_depclifo->put(CLI_OCCAS, (const char*) "X");
|
||||
_depclifo->put(CLI_OCCAS, "X");
|
||||
else
|
||||
if (field == "5") is_foreign = TRUE;
|
||||
|
||||
@ -4036,7 +4027,7 @@ void TTransfer_file::write_piano_conti(TString& record)
|
||||
{
|
||||
TString8 key;
|
||||
int numfield = 1;
|
||||
TMappa_trc& trc = mappa();
|
||||
const TMappa_trc& trc = mappa();
|
||||
|
||||
const TString4 sigla = record.left(2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
@ -4102,14 +4093,10 @@ void TTransfer_file::write_piano_conti(TString& record)
|
||||
_prog->addstatus(1);
|
||||
}
|
||||
|
||||
int TTransfer_file::annoes_PC(TString& data)
|
||||
int TTransfer_file::annoes_PC(const TString& data) const
|
||||
{
|
||||
//TTable esc ("ESC");
|
||||
//int anno = 0;
|
||||
|
||||
TDate datacomp (data);
|
||||
TEsercizi_contabili esc;
|
||||
int anno = esc.date2esc(datacomp);
|
||||
//int ae = datacomp.year();
|
||||
//TString dep = format("%04d", ae);
|
||||
//esc.zero();
|
||||
@ -4117,6 +4104,10 @@ int TTransfer_file::annoes_PC(TString& data)
|
||||
//if (esc.read() == NOERR)
|
||||
// anno = ae;
|
||||
|
||||
const TDate datacomp (data);
|
||||
TEsercizi_contabili esc;
|
||||
const int anno = esc.date2esc(datacomp);
|
||||
|
||||
return anno;
|
||||
}
|
||||
|
||||
@ -4157,14 +4148,14 @@ int TTransfer_file::registro(TString& reg,int anno)
|
||||
|
||||
void TTransfer_file::write_testata_movimenti(TString& record)
|
||||
{
|
||||
TString sigla,key,descr;
|
||||
TString key,descr;
|
||||
int numfield = 1;
|
||||
TMappa_trc& trc = mappa();
|
||||
const TMappa_trc& trc = mappa();
|
||||
int annoiva;
|
||||
bool registra_occas = FALSE;
|
||||
bool occas = TRUE;
|
||||
|
||||
sigla = record.mid(0,2);
|
||||
const TString4 sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
|
||||
_depmov->zero();
|
||||
@ -4241,7 +4232,7 @@ void TTransfer_file::write_testata_movimenti(TString& record)
|
||||
|
||||
if (fname == MOV_NUMREG)
|
||||
{
|
||||
long numreg = atol(field);
|
||||
const long numreg = atol(field);
|
||||
field.format("%7ld", numreg);
|
||||
}
|
||||
|
||||
@ -4262,31 +4253,30 @@ void TTransfer_file::write_testata_movimenti(TString& record)
|
||||
|
||||
if (fname == MOV_REG)
|
||||
{
|
||||
int tipo = registro (field,annoiva);
|
||||
if (tipo == 1)
|
||||
_depmov->put(MOV_TIPO, "C");
|
||||
else
|
||||
if (tipo == 2)
|
||||
_depmov->put(MOV_TIPO, "F");
|
||||
const int tipo = registro (field,annoiva);
|
||||
if (tipo == 1 || tipo == 2)
|
||||
_depmov->put(MOV_TIPO, tipo == 1 ? 'C' : 'F');
|
||||
}
|
||||
|
||||
if (fname == MOV_OCFPI)
|
||||
if (field.trim().empty())
|
||||
{
|
||||
field.trim();
|
||||
if (field.empty())
|
||||
{
|
||||
TString rags = record.sub(290,340);
|
||||
if (rags.trim().not_empty())
|
||||
const TString& rags = record.sub(290,340);
|
||||
if (rags.full())
|
||||
{
|
||||
TString app = "RIC";
|
||||
_npoccas++;
|
||||
field.format("%3s%13ld", (const char*)app,_npoccas);
|
||||
TString16 app;
|
||||
field.format("RIC%13ld", ++_npoccas);
|
||||
}
|
||||
else
|
||||
occas = FALSE;
|
||||
occas = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (flag == 2)
|
||||
{
|
||||
TString f = converti(field,TRUE);
|
||||
const TString16 f = converti(field,TRUE);
|
||||
_depmov->put(fname,f);
|
||||
|
||||
if (fname == MOV_DATACOMP)
|
||||
@ -4297,7 +4287,7 @@ void TTransfer_file::write_testata_movimenti(TString& record)
|
||||
|
||||
if (fname == MOV_DATAREG)
|
||||
{
|
||||
TDate datareg (f);
|
||||
const TDate datareg (f);
|
||||
annoiva = datareg.year();
|
||||
_depmov->put(MOV_ANNOIVA, annoiva);
|
||||
}
|
||||
@ -4305,7 +4295,7 @@ void TTransfer_file::write_testata_movimenti(TString& record)
|
||||
else
|
||||
if (fname == MOV_CODCAUS)
|
||||
{
|
||||
TString tipodoc;
|
||||
TString4 tipodoc;
|
||||
|
||||
causale(field,tipodoc,descr);
|
||||
_depmov->put(MOV_CODCAUS, field);
|
||||
@ -4318,43 +4308,36 @@ void TTransfer_file::write_testata_movimenti(TString& record)
|
||||
{
|
||||
if (!registra_occas)
|
||||
_depoccas->zero();
|
||||
if (fname == "DNASC")
|
||||
if (fname == OCC_DNASC)
|
||||
{
|
||||
TString f = converti(field,TRUE);
|
||||
field = f;
|
||||
field = converti(field,TRUE);
|
||||
}
|
||||
if (fname == "OCFPI")
|
||||
if (fname == OCC_CFPI)
|
||||
{
|
||||
_depmov->put(fname,field);
|
||||
_depoccas->put("CFPI", field);
|
||||
_depoccas->put(OCC_CFPI, field);
|
||||
}
|
||||
else
|
||||
if (fname == "COM")
|
||||
if (fname == OCC_COM)
|
||||
{
|
||||
field.trim();
|
||||
if (field.empty())
|
||||
if (field.blank())
|
||||
{
|
||||
TString denominazione = record.sub(403,453);
|
||||
denominazione.trim();
|
||||
TString comune (cerca_comune_den(denominazione));
|
||||
_depoccas->put("COM", comune);
|
||||
field = cerca_comune_den(denominazione);
|
||||
}
|
||||
else
|
||||
_depoccas->put("COM", field);
|
||||
_depoccas->put(OCC_COM, field);
|
||||
}
|
||||
else
|
||||
if (fname == "COMNASC")
|
||||
if (fname == OCC_COMNASC)
|
||||
{
|
||||
field.trim();
|
||||
if (field.empty())
|
||||
if (field.blank())
|
||||
{
|
||||
TString denominazione = record.sub(473,523);
|
||||
denominazione.trim();
|
||||
TString comune (cerca_comune_den(denominazione));
|
||||
_depoccas->put("COMNASC", comune);
|
||||
field = cerca_comune_den(denominazione);
|
||||
}
|
||||
else
|
||||
_depoccas->put("COMNASC", field);
|
||||
_depoccas->put(OCC_COMNASC, field);
|
||||
}
|
||||
else
|
||||
_depoccas->put(fname, field);
|
||||
@ -4410,13 +4393,13 @@ void TTransfer_file::write_testata_movimenti(TString& record)
|
||||
|
||||
void TTransfer_file::write_righe_contabili(TString& record)
|
||||
{
|
||||
TString16 sigla,key;
|
||||
TString16 key;
|
||||
int numfield = 1;
|
||||
TMappa_trc& trc = mappa();
|
||||
const TMappa_trc& trc = mappa();
|
||||
real importo = ZERO;
|
||||
int gruppo;
|
||||
|
||||
sigla = record.mid(0,2);
|
||||
const TString4 sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
|
||||
_deprmov->zero();
|
||||
@ -4546,9 +4529,9 @@ void TTransfer_file::write_righe_contabili(TString& record)
|
||||
// Scrive righe iva per ricezione PC
|
||||
void TTransfer_file::write_righe_IVA(TString& record)
|
||||
{
|
||||
TString8 sigla,key;
|
||||
TString8 key;
|
||||
int numfield = 1;
|
||||
TMappa_trc& trc = mappa();
|
||||
const TMappa_trc& trc = mappa();
|
||||
int gruppo;
|
||||
|
||||
long nreg = 0;
|
||||
@ -4556,7 +4539,7 @@ void TTransfer_file::write_righe_IVA(TString& record)
|
||||
|
||||
_depriva->zero();
|
||||
|
||||
sigla = record.mid(0,2);
|
||||
const TString4 sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
|
||||
while (trc.is_key(key))
|
||||
@ -4697,7 +4680,7 @@ void TTransfer_file::write_partite(TString& record)
|
||||
{
|
||||
TString sigla,key;
|
||||
int numfield = 1;
|
||||
TMappa_trc& trc = mappa();
|
||||
const TMappa_trc& trc = mappa();
|
||||
|
||||
sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
@ -4891,7 +4874,7 @@ void TTransfer_file::write_scadenze(TString& record)
|
||||
{
|
||||
TString sigla,key;
|
||||
int numfield = 1;
|
||||
TMappa_trc& trc = mappa();
|
||||
const TMappa_trc& trc = mappa();
|
||||
|
||||
sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
@ -5022,7 +5005,7 @@ void TTransfer_file::write_pagsca(TString& record)
|
||||
{
|
||||
TString sigla,key;
|
||||
int numfield = 1;
|
||||
TMappa_trc& trc = mappa();
|
||||
const TMappa_trc& trc = mappa();
|
||||
|
||||
sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
@ -5181,8 +5164,9 @@ void TTransfer_file::write_pagsca(TString& record)
|
||||
|
||||
bool TMappa_trc::leggi_modulo(const char* tracciato)
|
||||
{
|
||||
TString16 key,sigla;
|
||||
TScanner s(tracciato);
|
||||
TString16 key;
|
||||
TString4 sigla;
|
||||
TScanner s(tracciato);
|
||||
while (s.ok())
|
||||
{
|
||||
const TString& line = s.line();
|
||||
@ -5198,39 +5182,39 @@ bool TMappa_trc::leggi_modulo(const char* tracciato)
|
||||
return items() > 0;
|
||||
}
|
||||
|
||||
int TMappa_trc::from(const char* key)
|
||||
int TMappa_trc::from(const char* key) const
|
||||
{
|
||||
TToken_string * data = (TToken_string *) objptr(key);
|
||||
TToken_string* data = (TToken_string*)objptr(key);
|
||||
return data->get_int(2);
|
||||
}
|
||||
|
||||
int TMappa_trc::to(const char* key)
|
||||
int TMappa_trc::to(const char* key) const
|
||||
{
|
||||
TToken_string * data = (TToken_string *) objptr(key);
|
||||
TToken_string* data = (TToken_string*)objptr(key);
|
||||
return data->get_int(3);
|
||||
}
|
||||
|
||||
int TMappa_trc::logicnum(const char* key)
|
||||
int TMappa_trc::logicnum(const char* key) const
|
||||
{
|
||||
TToken_string * data = (TToken_string *) objptr(key);
|
||||
TToken_string* data = (TToken_string*)objptr(key);
|
||||
return data->get_int(4);
|
||||
}
|
||||
|
||||
const char* TMappa_trc::field_name(const char* key)
|
||||
const char* TMappa_trc::field_name(const char* key) const
|
||||
{
|
||||
TToken_string * data = (TToken_string *) objptr(key);
|
||||
TToken_string* data = (TToken_string*)objptr(key);
|
||||
return data->get(5);
|
||||
}
|
||||
|
||||
int TMappa_trc::flag(const char* key)
|
||||
int TMappa_trc::flag(const char* key) const
|
||||
{
|
||||
TToken_string * data = (TToken_string *) objptr(key);
|
||||
TToken_string* data = (TToken_string*)objptr(key);
|
||||
return data->get_int(6);
|
||||
}
|
||||
|
||||
int TMappa_trc::flag_bis(const char* key)
|
||||
int TMappa_trc::flag_bis(const char* key) const
|
||||
{
|
||||
TToken_string * data = (TToken_string *) objptr(key);
|
||||
TToken_string* data = (TToken_string*)objptr(key);
|
||||
return data->get_int(7);
|
||||
}
|
||||
|
||||
@ -5238,13 +5222,11 @@ extern int get_error(int err);
|
||||
|
||||
int packfile(bool vis, int num, TString& name)
|
||||
{
|
||||
int err=NOERR;
|
||||
TDir d;
|
||||
|
||||
d.get(num,_nolock, _nordir,_sysdirop);
|
||||
d.get(num,_nolock, (d.is_com()) ? _comdir : _nordir);
|
||||
|
||||
err=DB_packfile(vis, name, d.eod());
|
||||
int err=DB_packfile(vis, name, d.eod());
|
||||
if (err != NOERR) err = get_error(err);
|
||||
#ifdef DBG
|
||||
if (err != NOERR) error_box("Errore in compattamento dati.\nFile %d : %d", d.num(),err);
|
||||
@ -5283,12 +5265,11 @@ int pack(bool vis, int num, TString& name)
|
||||
|
||||
const char* converti (TString& data_AS400,bool anno_di_quattro)
|
||||
{
|
||||
TString& TEMP = get_tmp_string();
|
||||
|
||||
// if (data_AS400 == "000000" || data_AS400 == "00000000")
|
||||
if (real::is_null(data_AS400))
|
||||
return TEMP;
|
||||
return EMPTY_STRING;
|
||||
|
||||
TString& TEMP = get_tmp_string();
|
||||
if (anno_di_quattro)
|
||||
{
|
||||
TEMP = data_AS400.mid(6,2);
|
||||
@ -5323,17 +5304,19 @@ const char* riconverti (TString& data_PC,bool anno_di_quattro)
|
||||
return TEMP;
|
||||
}
|
||||
|
||||
void TTransfer_file::datafine_esprec(const int aep, TDate& datacomp)
|
||||
TDate TTransfer_file::data_fine_esercizio(int aep) const
|
||||
{
|
||||
TDate datacomp;
|
||||
TEsercizi_contabili esc;
|
||||
if (esc.exist(aep))
|
||||
datacomp = esc[aep].fine();
|
||||
return datacomp;
|
||||
}
|
||||
|
||||
int date2esc(const TDate& d, int* prevesc)
|
||||
{
|
||||
TEsercizi_contabili esc;
|
||||
int anno = esc.date2esc(d);
|
||||
const int anno = esc.date2esc(d);
|
||||
if (prevesc)
|
||||
*prevesc = esc.pred(anno);
|
||||
return anno;
|
||||
|
18
cg/cglib04.h
18
cg/cglib04.h
@ -108,12 +108,12 @@ class TMappa_trc : public TAssoc_array
|
||||
public :
|
||||
bool leggi_modulo(const char* tracciato);
|
||||
|
||||
int from (const char* key);
|
||||
int to (const char* key);
|
||||
int logicnum (const char* key);
|
||||
const char* field_name (const char* key);
|
||||
int flag (const char* key);
|
||||
int flag_bis (const char* key);
|
||||
int from (const char* key) const;
|
||||
int to (const char* key) const;
|
||||
int logicnum (const char* key) const;
|
||||
const char* field_name (const char* key) const;
|
||||
int flag (const char* key) const;
|
||||
int flag_bis (const char* key) const;
|
||||
|
||||
TMappa_trc() {};
|
||||
virtual ~TMappa_trc() {}
|
||||
@ -239,7 +239,7 @@ private:
|
||||
int strip_zero(TString& importo);
|
||||
bool my_isdigit(unsigned char ch);
|
||||
int look(unsigned char carattere);
|
||||
int cerca_annoes(long numreg, TString& tipodoc);
|
||||
int cerca_annoes(long numreg, TString& tipodoc) const;
|
||||
void scrivi_occasionali(const TString& record, TString& cfpi);
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -256,7 +256,7 @@ private:
|
||||
void write_scadenze(TString& record);
|
||||
void write_pagsca(TString& record);
|
||||
|
||||
int annoes_PC(TString& data);
|
||||
int annoes_PC(const TString& data) const;
|
||||
void causale(TString& cau,TString& tipo,TString& descr);
|
||||
int registro(TString& reg,int anno);
|
||||
|
||||
@ -269,7 +269,7 @@ public:
|
||||
const char* cerca_comune_cap(const TString& field,const TString& localita);
|
||||
const char* cerca_cap_comune(const TString& localita);
|
||||
const char* cerca_comune_den(const TString& field);
|
||||
void datafine_esprec(const int aep, TDate& datacomp);
|
||||
TDate data_fine_esercizio(int codes) const;
|
||||
|
||||
bool fcopytemp(const char* orig, const char* dest);
|
||||
bool ordina_trasfer(const char* orig);
|
||||
|
@ -141,8 +141,9 @@ Flags = "F"
|
||||
Item_01 = "Tabelle ditta", [CGMENU_007]
|
||||
Item_02 = "Stampa tabelle ditta", [CGMENU_008]
|
||||
Item_03 = "Prima nota", [CGMENU_009]
|
||||
Item_04 = "Operazioni di inizio fine es.", [CGMENU_021]
|
||||
Item_05 = "Servizio", [CGMENU_016]
|
||||
Item_04 = "Gestione versamenti F24", <gvmenu.men>
|
||||
Item_05 = "Operazioni di inizio fine es.", [CGMENU_021]
|
||||
Item_06 = "Servizio", [CGMENU_016]
|
||||
|
||||
[CGMENU_014]
|
||||
Caption = "Gestione libro unico"
|
||||
|
@ -230,6 +230,7 @@ U1|53|127|131|||||
|
||||
U1|54|132|133|||||
|
||||
U1|56|87|108|||||
|
||||
U1|57|175|176|23|MESELIQ|||
|
||||
U1|58|177|192|23|OCFPI|||
|
||||
#
|
||||
# Tracciato Partite in caso di Fattura
|
||||
#
|
||||
|
@ -1,3 +1,3 @@
|
||||
20
|
||||
0
|
||||
$clifo|0|0|673|0|Clienti/Fornitori|NCF||
|
||||
$clifo|0|0|679|0|Clienti/Fornitori|||
|
||||
|
@ -1,5 +1,5 @@
|
||||
20
|
||||
53
|
||||
54
|
||||
TIPOCF|1|1|0|Tipo ( <C>liente <F>ornitore
|
||||
CODCF|3|6|0|Codice
|
||||
RAGSOC|1|50|0|Ragione sociale
|
||||
@ -53,6 +53,7 @@ SOSPESO|8|1|0|Anagrafica sospesa
|
||||
DIRTY|1|1|0|Anagrafica modificata
|
||||
REFERENTE|1|50|0|Persona referente presso il cliente/fornitore
|
||||
VALINTRA|1|3|0|Codice Valuta Intracomunitaria
|
||||
CODCFASS|3|6|0|Codice cliente (fornitori) o fornitore (clienti) associato
|
||||
6
|
||||
TIPOCF+CODCF|
|
||||
TIPOCF+UPPER(RAGSOC)|X
|
||||
|
@ -1,4 +1,4 @@
|
||||
26
|
||||
0
|
||||
$caus|0|0|82|0|Causali contabili|60||
|
||||
$caus|0|0|84|0|Causali contabili|||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
26
|
||||
23
|
||||
24
|
||||
CODCAUS|1|3|0|Codice causale
|
||||
DESCR|1|50|0|Descrizione causale
|
||||
TIPODOC|1|2|0|Tipo documento
|
||||
@ -22,6 +22,7 @@ VALINTRA|8|1|0|Gestione valuta intra-comunitaria
|
||||
MOVIND|1|1|0|Causale per contabilita' industriale
|
||||
SOLOIVA|8|1|0|Movimento di sola IVA
|
||||
PROVV|1|1|0|Tipo movimento (" " Normale, "P" Provvisorio cancellabile, "C" Provvisorio da cepiti)
|
||||
REGSPIVA|2|2|0|Regimi speciali IVA
|
||||
CODCAUREG|1|3|0|Causale regolarizzazione IVA
|
||||
2
|
||||
CODCAUS|
|
||||
|
@ -6,8 +6,8 @@ int main(int argc, char** argv)
|
||||
const int n = argc > 1 ? argv[1][1]-'0' : 0;
|
||||
switch (n)
|
||||
{
|
||||
case 4: gv0500(argc, argv); break;
|
||||
case 5: gv0600(argc, argv); break;
|
||||
case 4: gv0500(argc, argv); break; //emissione F24
|
||||
case 5: gv0600(argc, argv); break; //invio F24
|
||||
default: break;
|
||||
}
|
||||
return 0;
|
||||
|
BIN
gv/gv01.gif
Executable file
BIN
gv/gv01.gif
Executable file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
@ -735,7 +735,7 @@ bool TF24_app::remove()
|
||||
int gv0500(int argc, char* argv[])
|
||||
{
|
||||
TF24_app app;
|
||||
app.run(argc, argv, "F24");
|
||||
app.run(argc, argv, "Emissione F24");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user