Patch level :2.2 101
Files correlati : Ricompilazione Demo : [ ] Commento :riportate le dichiarazioni d'intento alla patch 300 della 2.1 git-svn-id: svn://10.65.10.50/trunk@13092 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									8b5b16f9f7
								
							
						
					
					
						commit
						65412a9d5d
					
				@ -1,3 +1,3 @@
 | 
				
			|||||||
154
 | 
					154
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$letint|0|0|76|0|Lettere d'intento|||
 | 
					$letint|2|2|90|0|Lettere d'intento|||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,16 +1,19 @@
 | 
				
			|||||||
154
 | 
					154
 | 
				
			||||||
11
 | 
					14
 | 
				
			||||||
ANNO|2|4|0|Anno
 | 
					ANNO|2|4|0|Anno
 | 
				
			||||||
NUMPROT|3|6|0|Numero protocollo
 | 
					NUMPROT|3|6|0|Numero protocollo
 | 
				
			||||||
DATAREG|5|8|0|Data di registrazione
 | 
					DATAREG|5|8|0|Data di registrazione
 | 
				
			||||||
VSPROT|1|7|0|Vostro numero di protocollo
 | 
					VSPROT|1|7|0|Vostro numero di protocollo
 | 
				
			||||||
VSDATA|5|8|0|Vostra data di registrazione
 | 
					VSDATA|5|8|0|Vostra data di registrazione
 | 
				
			||||||
CODCLI|3|6|0|Codice cliente
 | 
					CODCLI|3|6|0|Codice cliente
 | 
				
			||||||
 | 
					UFFIVA|9|3|0|Codice ufficio IVA
 | 
				
			||||||
 | 
					NOTE|11|10|0|Note
 | 
				
			||||||
TIPOOP|2|1|0|Tipo operazione (1=singola,2=fino a,3=nel periodo dal/al)
 | 
					TIPOOP|2|1|0|Tipo operazione (1=singola,2=fino a,3=nel periodo dal/al)
 | 
				
			||||||
IMPORTO|4|18|3|Importo
 | 
					IMPORTO|4|18|3|Importo
 | 
				
			||||||
DAL|5|8|0|Data inizio periodo
 | 
					DAL|5|8|0|Data inizio periodo
 | 
				
			||||||
AL|5|8|0|Data fine periodo
 | 
					AL|5|8|0|Data fine periodo
 | 
				
			||||||
STAMPATO|8|1|0|Stampato
 | 
					STAMPATO|8|1|0|Stampato
 | 
				
			||||||
 | 
					INVIATO|8|1|0|Inviato
 | 
				
			||||||
2
 | 
					2
 | 
				
			||||||
ANNO+NUMPROT| 
 | 
					ANNO+NUMPROT| 
 | 
				
			||||||
CODCLI+ANNO+NUMPROT|X
 | 
					CODCLI+ANNO+NUMPROT|X
 | 
				
			||||||
 | 
				
			|||||||
@ -7,10 +7,13 @@
 | 
				
			|||||||
#define LETINT_VSPROT     "VSPROT"
 | 
					#define LETINT_VSPROT     "VSPROT"
 | 
				
			||||||
#define LETINT_VSDATA     "VSDATA"
 | 
					#define LETINT_VSDATA     "VSDATA"
 | 
				
			||||||
#define LETINT_CODCLI     "CODCLI"
 | 
					#define LETINT_CODCLI     "CODCLI"
 | 
				
			||||||
 | 
					#define LETINT_UFFIVA     "UFFIVA"
 | 
				
			||||||
 | 
					#define LETINT_NOTE       "NOTE"
 | 
				
			||||||
#define LETINT_TIPOOP     "TIPOOP"
 | 
					#define LETINT_TIPOOP     "TIPOOP"
 | 
				
			||||||
#define LETINT_IMPORTO    "IMPORTO"
 | 
					#define LETINT_IMPORTO    "IMPORTO"
 | 
				
			||||||
#define LETINT_DAL        "DAL"
 | 
					#define LETINT_DAL        "DAL"
 | 
				
			||||||
#define LETINT_AL         "AL"
 | 
					#define LETINT_AL         "AL"
 | 
				
			||||||
#define LETINT_STAMPATO   "STAMPATO"
 | 
					#define LETINT_STAMPATO   "STAMPATO"
 | 
				
			||||||
 | 
					#define LETINT_INVIATO   "INVIATO"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "li0.h"
 | 
					#include "li0.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define usage   "Error - usage : %s -{3}"
 | 
					#define usage   "Error - usage : %s -{3|4|5}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int main(int argc,char** argv)
 | 
					int main(int argc,char** argv)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -14,7 +14,11 @@ int main(int argc,char** argv)
 | 
				
			|||||||
  switch (r)
 | 
					  switch (r)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
  case 3:
 | 
					  case 3:
 | 
				
			||||||
    rt = li0400(argc,argv) ; break;     //immissione dati file letinc
 | 
					    rt = li0400(argc,argv) ; break;     //gestione archivio
 | 
				
			||||||
 | 
					  case 4:
 | 
				
			||||||
 | 
					    rt = li0500(argc,argv) ; break;     //stampa archivio
 | 
				
			||||||
 | 
					  case 5:
 | 
				
			||||||
 | 
					    rt = li0600(argc,argv) ; break;     //invio dati
 | 
				
			||||||
  default:
 | 
					  default:
 | 
				
			||||||
    error_box(usage, argv[0]) ; break;
 | 
					    error_box(usage, argv[0]) ; break;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								li/li0.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								li/li0.h
									
									
									
									
									
								
							@ -2,6 +2,8 @@
 | 
				
			|||||||
#define __LI0_H
 | 
					#define __LI0_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int li0400(int argc, char* argv[]);
 | 
					int li0400(int argc, char* argv[]);
 | 
				
			||||||
 | 
					int li0500(int argc, char* argv[]);
 | 
				
			||||||
 | 
					int li0600(int argc, char* argv[]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif // __LI0_H
 | 
					#endif // __LI0_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,7 @@
 | 
				
			|||||||
#include <automask.h>
 | 
					#include <automask.h>
 | 
				
			||||||
#include <defmask.h>
 | 
					#include <defmask.h>
 | 
				
			||||||
#include <relapp.h>
 | 
					#include <relapp.h>
 | 
				
			||||||
 | 
					#include <tabutil.h>
 | 
				
			||||||
#include <utility.h>
 | 
					#include <utility.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "li0.h"
 | 
					#include "li0.h"
 | 
				
			||||||
@ -13,12 +14,12 @@
 | 
				
			|||||||
//-------------------------------------------------------------------
 | 
					//-------------------------------------------------------------------
 | 
				
			||||||
class TLetint_mask : public TAutomask
 | 
					class TLetint_mask : public TAutomask
 | 
				
			||||||
{      
 | 
					{      
 | 
				
			||||||
 
 | 
					 | 
				
			||||||
protected:
 | 
					protected:
 | 
				
			||||||
  virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
 | 
					  virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
 | 
						TDate ultima_stampa(int anno);
 | 
				
			||||||
 | 
						bool is_registro(int anno) { return ultima_stampa(anno) > botime;}
 | 
				
			||||||
  TLetint_mask();
 | 
					  TLetint_mask();
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -27,6 +28,12 @@ bool TLetint_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  switch (o.dlg())
 | 
					  switch (o.dlg())
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
 | 
					  case F_ANNO:
 | 
				
			||||||
 | 
					    if (e == fe_modify || e == fe_init || e == fe_close)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								if (!is_registro(atoi(o.get())))
 | 
				
			||||||
 | 
									return error_box(FR("Manca il registro dichiarazioni d'intento per l'anno %d"), atoi(o.get()));
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
  case F_NUMPROT:
 | 
					  case F_NUMPROT:
 | 
				
			||||||
    if (e == fe_close && query_mode())
 | 
					    if (e == fe_close && query_mode())
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@ -42,7 +49,16 @@ bool TLetint_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    break;
 | 
					    break;
 | 
				
			||||||
  case F_DATAREG:
 | 
					  case F_VSDATA:
 | 
				
			||||||
 | 
					    if (e == fe_modify)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								const TDate datareg(o.mask().get(F_DATAREG));
 | 
				
			||||||
 | 
								const TDate dataem(o.get());
 | 
				
			||||||
 | 
								if (dataem > datareg)
 | 
				
			||||||
 | 
									return error_box(FR("Data di emissione %s superiore alla data di registrazione %s"), (const char *) dataem.string(),  (const char *) datareg.string());
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							break;
 | 
				
			||||||
 | 
						case F_DATAREG:
 | 
				
			||||||
    if (e == fe_close && insert_mode())
 | 
					    if (e == fe_close && insert_mode())
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      const long numprot = get_long(F_NUMPROT);
 | 
					      const long numprot = get_long(F_NUMPROT);
 | 
				
			||||||
@ -51,13 +67,16 @@ bool TLetint_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
 | 
				
			|||||||
        const int anno = get_int(F_ANNO);      
 | 
					        const int anno = get_int(F_ANNO);      
 | 
				
			||||||
        TLocalisamfile letint(LF_LETINT);
 | 
					        TLocalisamfile letint(LF_LETINT);
 | 
				
			||||||
        letint.put(LETINT_ANNO, anno);
 | 
					        letint.put(LETINT_ANNO, anno);
 | 
				
			||||||
        letint.put(LETINT_NUMPROT, numprot);
 | 
					        letint.put(LETINT_NUMPROT, numprot - 1);
 | 
				
			||||||
        if (letint.read() == NOERR)
 | 
					        if (letint.read() == NOERR)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          const TDate& old_data = letint.get_date(LETINT_DATAREG);
 | 
					          const TDate& old_data = letint.get_date(LETINT_DATAREG);
 | 
				
			||||||
          if (get_date(F_DATAREG) < old_data)
 | 
					          if (get_date(F_DATAREG) < old_data)
 | 
				
			||||||
            return error_box(TR("La data di registrazione non puo' essere antecedente a %s"), (const char*) old_data.string());
 | 
					            return error_box(TR("La data di registrazione non puo' essere antecedente a %s"), (const char*) old_data.string());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
									TDate ultima = ultima_stampa(anno);
 | 
				
			||||||
 | 
					        if (get_date(F_DATAREG) <= ultima)
 | 
				
			||||||
 | 
						        return error_box(TR("La data di registrazione non puo' essere antecedente a %s"), (const char*) ultima.string());
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    break;
 | 
					    break;
 | 
				
			||||||
@ -68,6 +87,29 @@ bool TLetint_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
 | 
				
			|||||||
  return true;
 | 
					  return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TDate TLetint_mask::ultima_stampa(int anno)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						TTable reg("REG");
 | 
				
			||||||
 | 
						TDate ultima_stampa = botime;
 | 
				
			||||||
 | 
						TString s; s.format("%0d", anno);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						reg.put("CODTAB", s);
 | 
				
			||||||
 | 
						for (int err = reg.read(_isgteq); s == reg.get("CODTAB").left(4) && err == NOERR; err = reg.next())
 | 
				
			||||||
 | 
						if (reg.get_int("I0") == 10)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							ultima_stampa = reg.get_date("D3");
 | 
				
			||||||
 | 
							if (!ultima_stampa.ok())
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								ultima_stampa.set_day(1);
 | 
				
			||||||
 | 
								ultima_stampa.set_month(1);
 | 
				
			||||||
 | 
								ultima_stampa.set_year(anno);
 | 
				
			||||||
 | 
								--ultima_stampa;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return ultima_stampa;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TLetint_mask::TLetint_mask() : TAutomask("li0400a") 
 | 
					TLetint_mask::TLetint_mask() : TAutomask("li0400a") 
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  first_focus(F_ANNO);
 | 
					  first_focus(F_ANNO);
 | 
				
			||||||
 | 
				
			|||||||
@ -23,3 +23,6 @@
 | 
				
			|||||||
#define F_CAPCF         120
 | 
					#define F_CAPCF         120
 | 
				
			||||||
#define F_PROVCF        121
 | 
					#define F_PROVCF        121
 | 
				
			||||||
#define F_PAIV          122
 | 
					#define F_PAIV          122
 | 
				
			||||||
 | 
					#define F_UFFIVA				123
 | 
				
			||||||
 | 
					#define F_DENUFFIVA			124
 | 
				
			||||||
 | 
					#define F_NOTE					125
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ TOOLBAR "" 0 -2 0 2
 | 
				
			|||||||
#include <toolbar.h>
 | 
					#include <toolbar.h>
 | 
				
			||||||
ENDPAGE
 | 
					ENDPAGE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PAGE "Dichiarazione d'intento" -1 -1 78 20
 | 
					PAGE "Dichiarazioni d'intento" -1 -1 78 20
 | 
				
			||||||
 | 
					
 | 
				
			||||||
GROUPBOX DLG_NULL 75 3
 | 
					GROUPBOX DLG_NULL 75 3
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
@ -72,6 +72,7 @@ BEGIN
 | 
				
			|||||||
  OUTPUT F_CAPCF CAPCF
 | 
					  OUTPUT F_CAPCF CAPCF
 | 
				
			||||||
  OUTPUT F_LOCALITACF LOCALITACF
 | 
					  OUTPUT F_LOCALITACF LOCALITACF
 | 
				
			||||||
  OUTPUT F_PAIV PAIV
 | 
					  OUTPUT F_PAIV PAIV
 | 
				
			||||||
 | 
					  OUTPUT F_UFFIVA PAIV[8,10]
 | 
				
			||||||
  CHECKTYPE REQUIRED
 | 
					  CHECKTYPE REQUIRED
 | 
				
			||||||
  FIELD CODCLI
 | 
					  FIELD CODCLI
 | 
				
			||||||
  ADD RUN cg0 -1
 | 
					  ADD RUN cg0 -1
 | 
				
			||||||
@ -104,7 +105,7 @@ END
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
NUMBER F_STATOCF 3
 | 
					NUMBER F_STATOCF 3
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 1 7 "Stato "
 | 
					  PROMPT 9 7 "Stato "
 | 
				
			||||||
  USE %STA
 | 
					  USE %STA
 | 
				
			||||||
  INPUT CODTAB F_STATOCF
 | 
					  INPUT CODTAB F_STATOCF
 | 
				
			||||||
  OUTPUT F_DESTACF S0
 | 
					  OUTPUT F_DESTACF S0
 | 
				
			||||||
@ -120,7 +121,7 @@ END
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
STRING F_COMCF 4
 | 
					STRING F_COMCF 4
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 7 8 "Comune "
 | 
					  PROMPT 8 8 "Comune "
 | 
				
			||||||
  USE LF_COMUNI
 | 
					  USE LF_COMUNI
 | 
				
			||||||
  INPUT STATO F_STATOCF
 | 
					  INPUT STATO F_STATOCF
 | 
				
			||||||
  INPUT COM F_COMCF
 | 
					  INPUT COM F_COMCF
 | 
				
			||||||
@ -160,6 +161,27 @@ BEGIN
 | 
				
			|||||||
  FLAGS "D"
 | 
					  FLAGS "D"
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					NUMBER F_UFFIVA 3
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 11 "Ufficio IVA   "
 | 
				
			||||||
 | 
						USE %UIV
 | 
				
			||||||
 | 
						INPUT CODTAB F_UFFIVA
 | 
				
			||||||
 | 
						DISPLAY "Ufficio" CODTAB
 | 
				
			||||||
 | 
						DISPLAY "Denominazione@50" S0
 | 
				
			||||||
 | 
						OUTPUT F_UFFIVA CODTAB
 | 
				
			||||||
 | 
						OUTPUT F_DENUFFIVA S0
 | 
				
			||||||
 | 
						CHECKTYPE NORMAL
 | 
				
			||||||
 | 
						WARNING "Ufficio IVA assente"
 | 
				
			||||||
 | 
						FLAGS "Z"
 | 
				
			||||||
 | 
						FIELD UFFIVA
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					STRING F_DENUFFIVA 50 
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
						PROMPT 22 11 ""
 | 
				
			||||||
 | 
						FLAGS "D"
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
STRING F_VSPROT 7
 | 
					STRING F_VSPROT 7
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 1 12 "Numero di protocollo "
 | 
					  PROMPT 1 12 "Numero di protocollo "
 | 
				
			||||||
@ -168,7 +190,7 @@ END
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
DATE F_VSDATA
 | 
					DATE F_VSDATA
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 1 13 "Data registrazione   "
 | 
					  PROMPT 1 13 "Data di emissione    "
 | 
				
			||||||
  FIELD VSDATA
 | 
					  FIELD VSDATA
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -221,5 +243,14 @@ BEGIN
 | 
				
			|||||||
  FLAGS "HD"
 | 
					  FLAGS "HD"
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENDPAGE
 | 
				
			||||||
 | 
					PAGE "Note" -1 -1 78 20
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					MEMO F_NOTE 78 19
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 1 ""
 | 
				
			||||||
 | 
					  FIELD NOTE
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ENDPAGE
 | 
					ENDPAGE
 | 
				
			||||||
ENDMASK
 | 
					ENDMASK
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										300
									
								
								li/li0500.cpp
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										300
									
								
								li/li0500.cpp
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,300 @@
 | 
				
			|||||||
 | 
					#include <applicat.h>
 | 
				
			||||||
 | 
					#include <automask.h>
 | 
				
			||||||
 | 
					#include <dongle.h>
 | 
				
			||||||
 | 
					#include <execp.h>
 | 
				
			||||||
 | 
					#include <progind.h>
 | 
				
			||||||
 | 
					#include <relapp.h>
 | 
				
			||||||
 | 
					#include <reprint.h>
 | 
				
			||||||
 | 
					#include <tabutil.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "../ba/ba0100a.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "li0.h"
 | 
				
			||||||
 | 
					#include "li0500a.h"
 | 
				
			||||||
 | 
					#include "li0500b.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "letint.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//--------------------------------------------------------------
 | 
				
			||||||
 | 
					//    MASCHERA
 | 
				
			||||||
 | 
					//--------------------------------------------------------------
 | 
				
			||||||
 | 
					class TPrint_letint_mask : public TAutomask
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						TDate _last_data;
 | 
				
			||||||
 | 
					protected:
 | 
				
			||||||
 | 
					  bool on_field_event(TOperable_field& o, TField_event e, long jolly);
 | 
				
			||||||
 | 
					  bool ask_service_pwd();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public:
 | 
				
			||||||
 | 
					  TPrint_letint_mask();
 | 
				
			||||||
 | 
					  virtual ~TPrint_letint_mask() {}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TPrint_letint_mask::TPrint_letint_mask()
 | 
				
			||||||
 | 
													:TAutomask("li0500a")
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						_last_data = botime;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static TDate _da_data, _a_data;
 | 
				
			||||||
 | 
					static bool filtra_per_date(const TRelation* rel)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  const TDate data = rel->curr().get(LETINT_DATAREG);
 | 
				
			||||||
 | 
					  return data >= _da_data && data <= _a_data;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool TPrint_letint_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) 
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  switch (o.dlg())
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					  case F_ANNO:
 | 
				
			||||||
 | 
							if (e == fe_modify || e == fe_init)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								TTable reg("REG");
 | 
				
			||||||
 | 
								TString s(o.get()); s.lpad(4, '0');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								_last_data = botime;
 | 
				
			||||||
 | 
								o.mask().set(F_PAGINI, "");
 | 
				
			||||||
 | 
								reg.put("CODTAB",  s);
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
								for (int err = reg.read(_isgteq); s == reg.get("CODTAB").left(4) && err == NOERR; err = reg.next())
 | 
				
			||||||
 | 
									if (reg.get_int("I0") == 10)
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										o.mask().set(F_PAGINI, reg.get("I1"));
 | 
				
			||||||
 | 
										_last_data = reg.get_date("D3");
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							break;
 | 
				
			||||||
 | 
					  case F_MESE:
 | 
				
			||||||
 | 
							if (e == fe_close)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								const int mese = atoi(o.get());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (mese <= _last_data.month())
 | 
				
			||||||
 | 
									return error_box("Attenzione Stampa definitiva già effettuata. Ripristinare il mese se si desidera procedere");
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							break;
 | 
				
			||||||
 | 
					  case F_RIPRISTINA:
 | 
				
			||||||
 | 
							if (e == fe_button)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								if (ask_service_pwd())  //chiede la pwd di servizio x ripristinare
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									TMask mask("li0500b");  //maschera per selezionare il mese ed anno da ripristinare
 | 
				
			||||||
 | 
									if (mask.run() == K_ENTER)
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										//ripristinare solo dichiarazioni del mese/anno selezionato
 | 
				
			||||||
 | 
										const int anno_rip = mask.get_int(F_ANNO);
 | 
				
			||||||
 | 
										const int mese_rip = mask.get_int(F_MESE);
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
										TRectype darec(LF_LETINT), arec(LF_LETINT);    
 | 
				
			||||||
 | 
										darec.put(LETINT_ANNO, anno_rip);
 | 
				
			||||||
 | 
										arec.put(LETINT_ANNO, anno_rip);
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
										TRelation rel_letint(LF_LETINT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										_da_data = TDate(1, mese_rip, anno_rip);
 | 
				
			||||||
 | 
										if (mese_rip == 1)
 | 
				
			||||||
 | 
											_last_data = botime;
 | 
				
			||||||
 | 
										else
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											_last_data = _da_data;
 | 
				
			||||||
 | 
											--_last_data;
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
										_a_data = TDate(31, 12, anno_rip);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										TCursor cur_letint(&rel_letint, "", 1, &darec, &arec);
 | 
				
			||||||
 | 
										cur_letint.set_filterfunction(filtra_per_date);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										const long items = cur_letint.items();
 | 
				
			||||||
 | 
										//ripristina solo se c'è qualcosa da ripristinare!
 | 
				
			||||||
 | 
										if (items > 0)
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											if (yesno_box(TR("Si desidera ripristinare %ld dichiarazioni?"), items))
 | 
				
			||||||
 | 
												if (yesno_box(TR("Si desidera veramente ripristinare %ld dichiarazioni?"), items))
 | 
				
			||||||
 | 
												{
 | 
				
			||||||
 | 
													cur_letint.freeze();
 | 
				
			||||||
 | 
													TProgind pi(items, "Ripristino dichiarazioni", false);
 | 
				
			||||||
 | 
													TRectype& rec_letint = rel_letint.curr();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
													for (cur_letint = 0; cur_letint.pos() < items; ++cur_letint)
 | 
				
			||||||
 | 
													{
 | 
				
			||||||
 | 
														pi.addstatus(1);
 | 
				
			||||||
 | 
														rec_letint.zero(LETINT_STAMPATO); //svuota il campo
 | 
				
			||||||
 | 
														rel_letint.rewrite(); //aggiorna fisicamente il file
 | 
				
			||||||
 | 
													}
 | 
				
			||||||
 | 
													
 | 
				
			||||||
 | 
													TTable reg("REG");
 | 
				
			||||||
 | 
													TString s; s.format("%04d", anno_rip);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
													reg.put("CODTAB",  s);
 | 
				
			||||||
 | 
												
 | 
				
			||||||
 | 
													for (int err = reg.read(_isgteq); s == reg.get("CODTAB").left(4) && err == NOERR; err = reg.next())
 | 
				
			||||||
 | 
														if (reg.get_int("I0") == 10)
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															reg.put("D3", _last_data);
 | 
				
			||||||
 | 
															reg.rewrite();
 | 
				
			||||||
 | 
														}
 | 
				
			||||||
 | 
														else
 | 
				
			||||||
 | 
															reg.reread(_unlock);
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
												else
 | 
				
			||||||
 | 
													return true;
 | 
				
			||||||
 | 
											else
 | 
				
			||||||
 | 
												return true;
 | 
				
			||||||
 | 
										} //end if(items>0)
 | 
				
			||||||
 | 
										else
 | 
				
			||||||
 | 
											message_box(TR("Non ci sono dichiarazioni da ripristinare nel periodo selezionato"));
 | 
				
			||||||
 | 
									} //end mask.run()
 | 
				
			||||||
 | 
								} //end ask_service_pwd()
 | 
				
			||||||
 | 
							} //end if(e==fe_button)
 | 
				
			||||||
 | 
					    break;
 | 
				
			||||||
 | 
					  default:
 | 
				
			||||||
 | 
					    break;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  return true;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool TPrint_letint_mask::ask_service_pwd()
 | 
				
			||||||
 | 
					{    
 | 
				
			||||||
 | 
					  bool ok = false;
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  TMask mask("ba0100a");
 | 
				
			||||||
 | 
					  mask.disable(F_USER);
 | 
				
			||||||
 | 
					  mask.set(F_USER, "SERVIZIO");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (mask.run() == K_ENTER)
 | 
				
			||||||
 | 
					  {                    
 | 
				
			||||||
 | 
					    const TDate oggi(TODAY);
 | 
				
			||||||
 | 
					    TString16 pwd; pwd << dongle().administrator() << (oggi.month() + oggi.day());
 | 
				
			||||||
 | 
					    ok = pwd == mask.get(F_PASSWORD);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  if (!ok) 
 | 
				
			||||||
 | 
					    error_box(TR("Password di servizio errata!\nAccesso negato."));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return ok;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//---------------------------------------------------------------
 | 
				
			||||||
 | 
					//    REPORT
 | 
				
			||||||
 | 
					//---------------------------------------------------------------
 | 
				
			||||||
 | 
					class TLetint_report : public TReport   
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						word _last_printed_page;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					protected:
 | 
				
			||||||
 | 
					  virtual bool use_mask() { return false;}
 | 
				
			||||||
 | 
						virtual word last_printed_page() const { return _last_printed_page; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public:
 | 
				
			||||||
 | 
						TLetint_report(int last_printed_page) : _last_printed_page(last_printed_page) {}
 | 
				
			||||||
 | 
						~TLetint_report() {}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//---------------------------------------------------------------
 | 
				
			||||||
 | 
					//    APPLICAZIONE
 | 
				
			||||||
 | 
					//---------------------------------------------------------------
 | 
				
			||||||
 | 
					class TPrint_letint : public TSkeleton_application
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						bool create();
 | 
				
			||||||
 | 
					  void setta_stampato(TMask& mask, long last_page);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public:
 | 
				
			||||||
 | 
					  virtual void main_loop();
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void TPrint_letint::setta_stampato(TMask& mask, long last_page)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  //settare solo dichiarazioni del mese/anno selezionato
 | 
				
			||||||
 | 
					  const int anno = mask.get_int(F_ANNO);
 | 
				
			||||||
 | 
					  const int mese = mask.get_int(F_MESE);
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  TRectype darec(LF_LETINT), arec(LF_LETINT);    
 | 
				
			||||||
 | 
					  darec.put(LETINT_ANNO, anno);
 | 
				
			||||||
 | 
					  arec.put(LETINT_ANNO, anno);
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  TRelation rel_letint(LF_LETINT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  _da_data = TDate(1, mese, anno);
 | 
				
			||||||
 | 
					  _a_data = _da_data;
 | 
				
			||||||
 | 
					  _a_data.set_end_month();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  TCursor cur_letint(&rel_letint, "", 1, &darec, &arec);
 | 
				
			||||||
 | 
					  cur_letint.set_filterfunction(filtra_per_date);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  const long items = cur_letint.items();
 | 
				
			||||||
 | 
					  //trasferimento dati possibile solo se il file di destinazione e' vuoto
 | 
				
			||||||
 | 
					  if (items > 0)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    cur_letint.freeze();
 | 
				
			||||||
 | 
					    TProgind pi(items, "Aggiornamento dichiarazioni", false);
 | 
				
			||||||
 | 
					    TRectype& rec_letint = rel_letint.curr();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    for (cur_letint = 0; cur_letint.pos() < items; ++cur_letint)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      pi.addstatus(1);
 | 
				
			||||||
 | 
					      rec_letint.put(LETINT_STAMPATO, "X"); //riempie il campo
 | 
				
			||||||
 | 
					      rel_letint.rewrite(); //aggiorna fisicamente il file
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  } //end if(items>0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						TTable reg("REG");
 | 
				
			||||||
 | 
						TString s; s << anno; s.lpad(4, '0');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						reg.put("CODTAB",  s);
 | 
				
			||||||
 | 
						for (int err = reg.read(_isgteq, _lock); s == reg.get("CODTAB").left(4) && err == NOERR; err = reg.next())
 | 
				
			||||||
 | 
							if (reg.get_int("I0") == 10)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								reg.put("I1", last_page);
 | 
				
			||||||
 | 
								reg.put("I2", last_page);
 | 
				
			||||||
 | 
								reg.put("D3", _a_data);
 | 
				
			||||||
 | 
								reg.rewrite();
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
								reg.reread(_unlock);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool TPrint_letint::create()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  return TSkeleton_application::create();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void TPrint_letint::main_loop()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  TFilename path;
 | 
				
			||||||
 | 
					  TPrint_letint_mask m;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  while (m.run() == K_ENTER)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    TReport_book book;
 | 
				
			||||||
 | 
							word last_page = 0;
 | 
				
			||||||
 | 
							const bool definitiva = m.get_bool(F_DEFINITIVA);
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							if (definitiva)
 | 
				
			||||||
 | 
								last_page = m.get_int(F_PAGINI);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    TLetint_report rep(last_page);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							path = m.get(F_REPORT);
 | 
				
			||||||
 | 
							if (path.empty())
 | 
				
			||||||
 | 
								path = "li0500a";
 | 
				
			||||||
 | 
					    rep.load(path);
 | 
				
			||||||
 | 
							rep.mask2report(m);
 | 
				
			||||||
 | 
							book.add(rep);
 | 
				
			||||||
 | 
					    book.print_or_preview();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //in caso di stampa definitiva...
 | 
				
			||||||
 | 
					    if (definitiva && yesno_box(TR("La stampa e' corretta?"))) 
 | 
				
			||||||
 | 
					      setta_stampato(m, (long)rep.page());
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int li0500(int argc, char* argv[])
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  TPrint_letint a;
 | 
				
			||||||
 | 
					  a.run(argc, argv, TR("Stampa dichiarazioni d'intento"));
 | 
				
			||||||
 | 
					  return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										11
									
								
								li/li0500a.h
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										11
									
								
								li/li0500a.h
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					// stampa lettere d'intento
 | 
				
			||||||
 | 
					// definizione campi per maschera li0500a
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define F_ANNO          101
 | 
				
			||||||
 | 
					#define F_MESE          102
 | 
				
			||||||
 | 
					#define F_DEFINITIVA    103
 | 
				
			||||||
 | 
					#define F_DAL           105
 | 
				
			||||||
 | 
					#define F_AL            106
 | 
				
			||||||
 | 
					#define F_RIPRISTINA    107
 | 
				
			||||||
 | 
					#define F_REPORT        108
 | 
				
			||||||
 | 
					#define F_PAGINI        109
 | 
				
			||||||
							
								
								
									
										103
									
								
								li/li0500a.rep
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										103
									
								
								li/li0500a.rep
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,103 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					<report libraries="li0500" name="li0500a" lpi="6">
 | 
				
			||||||
 | 
					 <description>registro dichiarazioni d'intento</description>
 | 
				
			||||||
 | 
					 <font face="Courier New" size="10" />
 | 
				
			||||||
 | 
					 <section type="Head">
 | 
				
			||||||
 | 
					  <field type="Stringa" width="50" pattern="1">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="10" />
 | 
				
			||||||
 | 
					   <prescript description="H0.0 PRESCRIPT">"!RAGSOC" 
 | 
				
			||||||
 | 
					GET_FIRM_DATA</prescript>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="121" type="Testo" width="4" pattern="1" text="Pag." />
 | 
				
			||||||
 | 
					  <field x="125" type="Numero" align="right" width="5" pattern="1">
 | 
				
			||||||
 | 
					   <source>#PAGE</source>
 | 
				
			||||||
 | 
					   <prescript description="H0.0 PRESCRIPT">#REPORT.PAGE</prescript>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="20" y="1" type="Testo" valign="center" align="center" width="56" height="2" pattern="1" text="Registro Dichiarazioni d'intento">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="14" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="74" y="1" type="Numero" valign="center" align="right" width="8" height="2" pattern="1">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="14" />
 | 
				
			||||||
 | 
					   <source>#ANNO</source>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field border="1" y="4" type="Linea" width="132" height="0" pattern="1" />
 | 
				
			||||||
 | 
					  <field border="2" y="4" type="Linea" height="3" pattern="1" />
 | 
				
			||||||
 | 
					  <field x="1" y="4" type="Testo" valign="center" align="center" width="18" height="2" pattern="1" text="Emissione dichiarazione">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="10" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field border="1" x="20" y="4" type="Linea" height="3" pattern="1" />
 | 
				
			||||||
 | 
					  <field x="21" y="4" type="Testo" valign="center" align="center" width="18" height="2" pattern="1" text="Ricevimento dichiarazione">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="10" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field border="1" x="40" y="4" type="Linea" height="3" pattern="1" />
 | 
				
			||||||
 | 
					  <field border="1" x="97" y="4" type="Linea" height="3" pattern="1" />
 | 
				
			||||||
 | 
					  <field border="1" x="111" y="4" type="Linea" height="3" pattern="1" />
 | 
				
			||||||
 | 
					  <field border="1" x="117.5" y="4" type="Linea" height="3" pattern="1" />
 | 
				
			||||||
 | 
					  <field border="1" x="132" y="4" type="Linea" height="3" pattern="1" />
 | 
				
			||||||
 | 
					  <field x="112" y="4.5" type="Testo" valign="center" align="center" width="4" height="2" pattern="1" text="Uff. IVA">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="10" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="112" y="4.5" type="Testo" valign="center" align="center" width="4" height="2" pattern="1" text="Uff. IVA">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="10" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="40" y="5" type="Testo" valign="center" align="center" width="57" pattern="1" text="Dichiarante o fornitore F; prestatore">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="10" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="98" y="5" type="Testo" valign="center" align="center" width="12" pattern="1" text="Partita IVA">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="10" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="123" y="5" type="Testo" valign="center" align="center" width="6" pattern="1" text="Note">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="10" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field y="6" type="Testo" valign="center" align="center" width="10" pattern="1" text="Data">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="10" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="10" y="6" type="Testo" valign="center" align="center" width="10" pattern="1" text="Protocollo">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="10" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="20" y="6" type="Testo" valign="center" align="center" width="10" pattern="1" text="Data">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="10" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="30" y="6" type="Testo" valign="center" align="center" width="10" pattern="1" text="Protocollo">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="10" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field border="1" y="7" type="Linea" width="132" height="0" pattern="1" />
 | 
				
			||||||
 | 
					 </section>
 | 
				
			||||||
 | 
					 <section type="Head" level="1" />
 | 
				
			||||||
 | 
					 <section type="Body" />
 | 
				
			||||||
 | 
					 <section type="Body" level="1">
 | 
				
			||||||
 | 
					  <field x="1" type="Data" width="10" pattern="1">
 | 
				
			||||||
 | 
					   <source>VSDATA</source>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="12" type="Stringa" width="7" pattern="1">
 | 
				
			||||||
 | 
					   <source>VSPROT</source>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="21" type="Data" width="10" pattern="1">
 | 
				
			||||||
 | 
					   <source>DATAREG</source>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="32" type="Numero" align="right" width="6" pattern="1">
 | 
				
			||||||
 | 
					   <source>NUMPROT</source>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="40" type="Numero" align="right" width="6" pattern="1">
 | 
				
			||||||
 | 
					   <source>CODCLI</source>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="47" type="Stringa" width="50" pattern="1">
 | 
				
			||||||
 | 
					   <source>CLIFO.RAGSOC</source>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="98" type="Stringa" width="12" pattern="1">
 | 
				
			||||||
 | 
					   <source>CLIFO.PAIV</source>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="112.5" type="Numero" align="right" width="3" pattern="1">
 | 
				
			||||||
 | 
					   <source>154.UFFIVA</source>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="117" type="Stringa" dynamic_height="1" width="15" height="18.5" pattern="1">
 | 
				
			||||||
 | 
					   <source>154.NOTE</source>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					 </section>
 | 
				
			||||||
 | 
					 <section type="Foot" />
 | 
				
			||||||
 | 
					 <section type="Foot" level="1" />
 | 
				
			||||||
 | 
					 <sql>USE 154
 | 
				
			||||||
 | 
					JOIN CLIFO INTO TIPOCF=='C' CODCF==CODCLI
 | 
				
			||||||
 | 
					FROM ANNO=#ANNO
 | 
				
			||||||
 | 
					TO ANNO=#ANNO</sql>
 | 
				
			||||||
 | 
					</report>
 | 
				
			||||||
							
								
								
									
										71
									
								
								li/li0500a.uml
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										71
									
								
								li/li0500a.uml
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,71 @@
 | 
				
			|||||||
 | 
					#include "li0500a.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					PAGE "Stampa dichiarazioni d'intento" -1 -1 76 8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BOOLEAN F_DEFINITIVA
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 1 "Definitiva"
 | 
				
			||||||
 | 
					  MESSAGE FALSE HIDE,2@|SHOW,1@
 | 
				
			||||||
 | 
					  MESSAGE TRUE SHOW,2@|HIDE,1@
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					NUMBER F_PAGINI 6
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 20 1 "Ultima pagina "
 | 
				
			||||||
 | 
						GROUP 2
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					NUMBER F_ANNO 4
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 3 "Anno "
 | 
				
			||||||
 | 
					  FLAGS "AU"
 | 
				
			||||||
 | 
					  CHECKTYPE REQUIRED
 | 
				
			||||||
 | 
					  FIELD ANNO
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					LIST F_MESE 2 16
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 15 3 "Mese        "
 | 
				
			||||||
 | 
					  FLAGS "AM"
 | 
				
			||||||
 | 
						GROUP 2
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DATE F_DAL
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 15 3 "Dal         "
 | 
				
			||||||
 | 
					  GROUP 1
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DATE F_AL
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 47 3 "Al   "
 | 
				
			||||||
 | 
					  GROUP 1
 | 
				
			||||||
 | 
					  VALIDATE DATE_CMP_FUNC >= F_DAL
 | 
				
			||||||
 | 
					  WARNING "Specificare una 'Data fine periodo' non inferiore alla 'Data inizio perodo'"
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					STRING F_REPORT 70 60
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 5 "Report "
 | 
				
			||||||
 | 
					  RSELECT "li0500"
 | 
				
			||||||
 | 
					  CHECKTYPE NORMAL
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BUTTON DLG_PRINT 10 2
 | 
				
			||||||
 | 
					BEGIN 
 | 
				
			||||||
 | 
					  PROMPT -13 -1 "~Stampa"
 | 
				
			||||||
 | 
					  MESSAGE EXIT,K_ENTER
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BUTTON F_RIPRISTINA 10 2
 | 
				
			||||||
 | 
					BEGIN 
 | 
				
			||||||
 | 
					  PROMPT -23 -1 "~Ripristina"
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BUTTON DLG_QUIT 10 2
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT -33 -1 ""
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENDPAGE
 | 
				
			||||||
 | 
					ENDMASK
 | 
				
			||||||
							
								
								
									
										5
									
								
								li/li0500b.h
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								li/li0500b.h
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					// ripristino lettere d'intento
 | 
				
			||||||
 | 
					// definizione campi per maschera li0500b
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define F_ANNO          101
 | 
				
			||||||
 | 
					#define F_MESE          102
 | 
				
			||||||
							
								
								
									
										30
									
								
								li/li0500b.uml
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										30
									
								
								li/li0500b.uml
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					#include "li0500b.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					PAGE "Ripristino dichiarazioni d'intento" -1 -1 28 6
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					NUMBER F_ANNO 4
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 1 "Anno "
 | 
				
			||||||
 | 
					  FLAGS "AU"
 | 
				
			||||||
 | 
					  CHECKTYPE REQUIRED
 | 
				
			||||||
 | 
					  FIELD ANNO
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					LIST F_MESE 2 16
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 2 "Mese "
 | 
				
			||||||
 | 
					  FLAGS "AM"
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BUTTON DLG_OK 10 2
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT -12 -1 ""
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BUTTON DLG_CANCEL 10 2
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT -22 -1 ""
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENDPAGE
 | 
				
			||||||
 | 
					ENDMASK
 | 
				
			||||||
							
								
								
									
										1117
									
								
								li/li0600.cpp
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										1117
									
								
								li/li0600.cpp
									
									
									
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										7
									
								
								li/li0600a.h
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										7
									
								
								li/li0600a.h
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					// invio dichiarazioni d'intento
 | 
				
			||||||
 | 
					// definizione campi per maschera li0600a
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define F_ANNO          101
 | 
				
			||||||
 | 
					#define F_MESE          102
 | 
				
			||||||
 | 
					#define F_RIPRISTINA    103
 | 
				
			||||||
 | 
					#define F_PATH          104
 | 
				
			||||||
							
								
								
									
										74
									
								
								li/li0600a.ini
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										74
									
								
								li/li0600a.ini
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,74 @@
 | 
				
			|||||||
 | 
					[A]
 | 
				
			||||||
 | 
					3=16,5,AN,IVD05
 | 
				
			||||||
 | 
					4=21,2,NU,01
 | 
				
			||||||
 | 
					5=23,16,AN
 | 
				
			||||||
 | 
					7=522,4,NU,1
 | 
				
			||||||
 | 
					8=526,4,NU,1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[B]
 | 
				
			||||||
 | 
					2=2,16,AN
 | 
				
			||||||
 | 
					3=18,8,NU,1
 | 
				
			||||||
 | 
					7=74,16,AN,04162720967
 | 
				
			||||||
 | 
					8=90,1,CB,1
 | 
				
			||||||
 | 
					25=108,24,AN
 | 
				
			||||||
 | 
					26=132,20,AN
 | 
				
			||||||
 | 
					27=152,60,AN
 | 
				
			||||||
 | 
					28=212,11,PI
 | 
				
			||||||
 | 
					36=355,4,DA
 | 
				
			||||||
 | 
					37=359,2,N2
 | 
				
			||||||
 | 
					38=361,40,AN
 | 
				
			||||||
 | 
					39=401,2,PR
 | 
				
			||||||
 | 
					40=403,8,DT
 | 
				
			||||||
 | 
					41=411,1,AN
 | 
				
			||||||
 | 
					45=417,40,AN
 | 
				
			||||||
 | 
					46=457,2,PR
 | 
				
			||||||
 | 
					47=459,35,AN
 | 
				
			||||||
 | 
					48=494,5,NU
 | 
				
			||||||
 | 
					58=575,20,AN
 | 
				
			||||||
 | 
					59=595,24,AN
 | 
				
			||||||
 | 
					60=619,3,NU
 | 
				
			||||||
 | 
					69=723,40,AN
 | 
				
			||||||
 | 
					70=763,2,PR
 | 
				
			||||||
 | 
					71=765,35,AN
 | 
				
			||||||
 | 
					72=800,5,NU
 | 
				
			||||||
 | 
					74=811,40,AN
 | 
				
			||||||
 | 
					75=851,2,PR
 | 
				
			||||||
 | 
					76=853,35,AN
 | 
				
			||||||
 | 
					77=888,5,NU
 | 
				
			||||||
 | 
					83=926,2,NU
 | 
				
			||||||
 | 
					86=930,24,AN
 | 
				
			||||||
 | 
					87=954,3,NU
 | 
				
			||||||
 | 
					88=957,20,AN
 | 
				
			||||||
 | 
					98=1066,16,CF
 | 
				
			||||||
 | 
					99=1082,11,CN
 | 
				
			||||||
 | 
					101=1094,2,NU
 | 
				
			||||||
 | 
					104=1105,24,AN
 | 
				
			||||||
 | 
					105=1129,20,AN
 | 
				
			||||||
 | 
					106=1149,1,AN
 | 
				
			||||||
 | 
					107=1150,8,DT
 | 
				
			||||||
 | 
					108=1158,40,AN
 | 
				
			||||||
 | 
					109=1198,2,PR
 | 
				
			||||||
 | 
					110=1200,40,AN
 | 
				
			||||||
 | 
					111=1240,2,PR
 | 
				
			||||||
 | 
					112=1242,5,NU
 | 
				
			||||||
 | 
					113=1247,35,AN
 | 
				
			||||||
 | 
					114=1282,12,AN
 | 
				
			||||||
 | 
					120=1321,1,CB,1
 | 
				
			||||||
 | 
					197=1427,3,NU
 | 
				
			||||||
 | 
					198=1430,16,CF
 | 
				
			||||||
 | 
					199=1446,5,NU
 | 
				
			||||||
 | 
					200=1451,1,CB
 | 
				
			||||||
 | 
					201=1452,1,CB
 | 
				
			||||||
 | 
					202=1453,8,DT
 | 
				
			||||||
 | 
					203=1461,1,CB
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[C]
 | 
				
			||||||
 | 
					1=1,1,AN
 | 
				
			||||||
 | 
					2=2,16,AN
 | 
				
			||||||
 | 
					3=18,8,NU
 | 
				
			||||||
 | 
					7=74,16,AN,04162720967
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Z]
 | 
				
			||||||
 | 
					1=1,1,AN
 | 
				
			||||||
 | 
					3=16,9,NU,1
 | 
				
			||||||
 | 
					4=25,9,NU
 | 
				
			||||||
							
								
								
									
										52
									
								
								li/li0600a.uml
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										52
									
								
								li/li0600a.uml
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,52 @@
 | 
				
			|||||||
 | 
					#include "li0600a.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					PAGE "Invio dichiarazioni d'intento" -1 -1 52 8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					NUMBER F_ANNO 4
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 1 "Anno "
 | 
				
			||||||
 | 
					  FLAGS "AU"
 | 
				
			||||||
 | 
					  CHECKTYPE REQUIRED
 | 
				
			||||||
 | 
					  FIELD ANNO
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					LIST F_MESE 2 16
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 2 "Mese "
 | 
				
			||||||
 | 
					  FLAGS "MD"
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TEXT DLG_NULL
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 4 "Percorso file di output:"
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					STRING F_PATH 255 50
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 5 ""
 | 
				
			||||||
 | 
					  CHECKTYPE REQUIRED
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BUTTON DLG_OK 10 2
 | 
				
			||||||
 | 
					BEGIN 
 | 
				
			||||||
 | 
					  PROMPT -14 -1 "~Invia"
 | 
				
			||||||
 | 
					  MESSAGE EXIT,K_ENTER
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BUTTON DLG_PRINT 10 2
 | 
				
			||||||
 | 
					BEGIN 
 | 
				
			||||||
 | 
					  PROMPT -24 -1 "~Stampa"
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BUTTON F_RIPRISTINA 10 2
 | 
				
			||||||
 | 
					BEGIN 
 | 
				
			||||||
 | 
					  PROMPT -34 -1 "~Ripristina"
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BUTTON DLG_QUIT 10 2
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT -44 -1 ""
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENDPAGE
 | 
				
			||||||
 | 
					ENDMASK
 | 
				
			||||||
							
								
								
									
										5
									
								
								li/li0600b.h
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								li/li0600b.h
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					// ripristino lettere d'intento inviate
 | 
				
			||||||
 | 
					// definizione campi per maschera li0600b
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define F_ANNO          101
 | 
				
			||||||
 | 
					#define F_MESE          102
 | 
				
			||||||
							
								
								
									
										30
									
								
								li/li0600b.uml
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										30
									
								
								li/li0600b.uml
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					#include "li0600b.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					PAGE "Ripristino dichiarazioni d'intento inviate" -1 -1 28 6
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					NUMBER F_ANNO 4
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 1 "Anno "
 | 
				
			||||||
 | 
					  FLAGS "AU"
 | 
				
			||||||
 | 
					  CHECKTYPE REQUIRED
 | 
				
			||||||
 | 
					  FIELD ANNO
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					LIST F_MESE 2 16
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 2 "Mese "
 | 
				
			||||||
 | 
					  FLAGS "AM"
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BUTTON DLG_OK 10 2
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT -12 -1 ""
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BUTTON DLG_CANCEL 10 2
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT -22 -1 ""
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENDPAGE
 | 
				
			||||||
 | 
					ENDMASK
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user