CREATE TABLE  FPCDD00F ( 
	PV_AMBIENTE CHAR(10) NOT NULL DEFAULT '' , 
	PV_DESCAMPO1 CHAR(20) NOT NULL DEFAULT '' , 
	PV_DESCAMPO2 CHAR(20) NOT NULL DEFAULT '' , 
	PV_DESCAMPO3 CHAR(20) NOT NULL DEFAULT '' , 
	PV_DESCAMPO4 CHAR(20) NOT NULL DEFAULT '' , 
	PV_DESCAMPO5 CHAR(20) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  FPCDD00F 
	ADD CONSTRAINT  FPCDD00Q 
	UNIQUE( PV_AMBIENTE ) ; 
  
CREATE TABLE  FPCDE00F ( 
	PX_CODDEST CHAR(7) NOT NULL DEFAULT '' , 
	PX_FISCIVAPAESE CHAR(2) NOT NULL DEFAULT '' , 
	PX_FISCIVACOD CHAR(28) NOT NULL DEFAULT '' , 
	PX_CODFISCALE CHAR(16) NOT NULL DEFAULT '' , 
	PX_PEC CHAR(255) NOT NULL DEFAULT '' , 
	PX_DESDEST CHAR(35) NOT NULL DEFAULT '' , 
	PX_AMBIENTE CHAR(10) NOT NULL DEFAULT '' , 
	PX_GESPROT CHAR(1) NOT NULL DEFAULT '' , 
	PX_CLASSE CHAR(2) NOT NULL DEFAULT '' , 
	PX_UTEGEST CHAR(10) NOT NULL DEFAULT '' , 
	PX_SETGEST CHAR(2) NOT NULL DEFAULT '' , 
	PX_PERCORSO CHAR(255) NOT NULL DEFAULT '' , 
	PX_CAMPO1 CHAR(20) NOT NULL DEFAULT '' , 
	PX_CAMPO2 CHAR(20) NOT NULL DEFAULT '' , 
	PX_CAMPO3 CHAR(20) NOT NULL DEFAULT '' , 
	PX_CAMPO4 CHAR(20) NOT NULL DEFAULT '' , 
	PX_CAMPO5 CHAR(20) NOT NULL DEFAULT '' , 
	PX_FILLER1 CHAR(100) NOT NULL DEFAULT '' , 
	PX_FILLER2 CHAR(100) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  FPCDE00F 
	ADD CONSTRAINT  FPCDEE0Q 
	UNIQUE( PX_CODDEST , PX_FISCIVAPAESE , PX_FISCIVACOD , PX_CODFISCALE ) ; 
  
CREATE TABLE  FPERR00K ( 
	PXFANN CHAR(1) NOT NULL DEFAULT '' , 
	PXPRGI CHAR(10) NOT NULL DEFAULT '' , 
	PXHFAT CHAR(20) NOT NULL DEFAULT '' , 
	PXBFAT CHAR(50) NOT NULL DEFAULT '' , 
	PXUHRI DATE, 
	PXTDOC CHAR(4) NOT NULL DEFAULT '' , 
	PXNFAT CHAR(20) NOT NULL DEFAULT '' , 
	PXUFAT DATE, 
	PXCFOR CHAR(10) NOT NULL DEFAULT '' , 
	PXNFIL CHAR(20) NOT NULL DEFAULT '' , 
	PXNLIN NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PXNERR NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PXCERR CHAR(5) NOT NULL DEFAULT '' , 
	PXDERR CHAR(150) NOT NULL DEFAULT '' , 
	PXCAMP CHAR(15) NOT NULL DEFAULT '' , 
	PXDATO CHAR(150) NOT NULL DEFAULT '' , 
	PXFINT CHAR(1) NOT NULL DEFAULT '' , 
	PXCUIN CHAR(10) NOT NULL DEFAULT '' , 
	PXDTIN DATE, 
	PXHOIN TIME NOT NULL DEFAULT GETDATE(), 
	CONSTRAINT  FPERR00Q PRIMARY KEY( PXPRGI , PXHFAT , PXBFAT , PXUHRI , PXNFIL , PXNLIN , PXNERR ) ) ; 
  
CREATE TABLE FPPRO00F ( 
	PZ_STATO CHAR(1) NOT NULL DEFAULT '' , 
	PZ_NRAZIONE NUMERIC(9, 0) NOT NULL DEFAULT 0 , 
	PZ_DTAZIONE NUMERIC(8, 0) NOT NULL DEFAULT 0 , 
	PZ_USAZIONE CHAR(10) NOT NULL DEFAULT '' , 
	PZ_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PZ_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PZ_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PZ_TIPODOC CHAR(4) NOT NULL DEFAULT '' , 
	PZ_DATA DATE, 
	PZ_NUMERO CHAR(20) NOT NULL DEFAULT '' , 
	PZ_STATOELAB CHAR(1) NOT NULL DEFAULT '' , 
	PZ_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PZ_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PZ_DATAPROT DATE, 
	PZ_USERPROT CHAR(10) NOT NULL DEFAULT '' , 
	PZ_CLASPROT CHAR(2) NOT NULL DEFAULT '' , 
	PZ_TIPOPROT CHAR(2) NOT NULL DEFAULT '' , 
	PZ_ANNOPROT NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PZ_NUMPROT NUMERIC(10, 0) NOT NULL DEFAULT 0 , 
	PZ_TIPOCF CHAR(1) NOT NULL DEFAULT '' , 
	PZ_CLIFOR CHAR(10) NOT NULL DEFAULT '' , 
	PZ_SETGEST CHAR(2) NOT NULL DEFAULT '' , 
	PZ_UTEGEST CHAR(10) NOT NULL DEFAULT '' , 
	PZ_DATAACCET DATE, 
	PZ_UTENACCET CHAR(10) NOT NULL DEFAULT '' , 
	PZ_DATACONT DATE, 
	PZ_UTENCONT CHAR(10) NOT NULL DEFAULT '' , 
	PZ_TIPOREGCONT CHAR(6) NOT NULL DEFAULT '' , 
	PZ_NUMREGCONT NUMERIC(20, 0) NOT NULL DEFAULT 0 , 
	PZ_DATAREGCONT DATE, 
	PZ_TIPOCONT CHAR(1) NOT NULL DEFAULT '' , 
	PZ_DATAARCH DATE, 
	PZ_UTENARCH CHAR(10) NOT NULL DEFAULT '' , 
	PZ_TIPOARC CHAR(1) NOT NULL DEFAULT '' , 
	PZ_STATOPROT CHAR(1) NOT NULL DEFAULT '' , 
	PZ_IDDOCR CHAR(20) NOT NULL DEFAULT '' , 
	PZ_DATADOCR DATE, 
	PZ_CODCUP CHAR(15) NOT NULL DEFAULT '' , 
	PZ_CODCIG CHAR(15) NOT NULL DEFAULT '' , 
	PZ_IMPTOTDOC NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PZ_IMPCALDOC NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PZ_IMPTOTPAG NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PZ_IMPCALPAG NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PZ_NOMXML CHAR(255) NOT NULL DEFAULT '' , 
	PZ_DATAORARIC DATE, 
	PZ_DATASTATO DATE, 
	PZ_FMTTRASMISS CHAR(5) NOT NULL DEFAULT '' , 
	PZ_CODDEST CHAR(7) NOT NULL DEFAULT '' , 
	PZ_NOTAFATT CHAR(255) NOT NULL DEFAULT '' , 
	PZ_AMBIENTE CHAR(10) NOT NULL DEFAULT '' , 
	PZ_FILLER1 CHAR(100) NOT NULL DEFAULT '' , 
	PZ_FILLER2 CHAR(100) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE FPPRO00F 
	ADD CONSTRAINT FPPRO00Q 
	UNIQUE( PZ_KEYPRGINVIO , PZ_KEYHEADERFATT , PZ_KEYBODYFATT , PZ_AMBIENTE ) ;

  
CREATE TABLE  PAA0100F ( 
	P1_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P1_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(2) NOT NULL DEFAULT '' , 
	P1_TRASMITTCOD CHAR(28) NOT NULL DEFAULT '' , 
	P1_PRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	P1_FMTTRASMISS CHAR(5) NOT NULL DEFAULT '' , 
	P1_CODDEST CHAR(7) NOT NULL DEFAULT '' , 
	P1_TELEFONO CHAR(12) NOT NULL DEFAULT '' , 
	P1_MAIL CHAR(255) NOT NULL DEFAULT '' , 
	P1_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	P1_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	P1_ERREST CHAR(1) NOT NULL DEFAULT '' , 
	P1_NOMXML CHAR(255) NOT NULL DEFAULT '' , 
	P1_DATAORARIC DATE, 
	P1_DATASTATO DATE, 
	P1_STATOELAB CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA0100F 
	ADD CONSTRAINT  PAA0100Q 
	UNIQUE( P1_KEYPRGINVIO , [REDACTED] , P1_KEYBODYFATT , P1_DATAORARIC ) ; 
  
CREATE TABLE  PAA0200F ( 
	P2_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P2_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P2_FISCIVAPAESE CHAR(2) NOT NULL DEFAULT '' , 
	P2_FISCIVACOD CHAR(28) NOT NULL DEFAULT '' , 
	P2_CODFISCALE CHAR(16) NOT NULL DEFAULT '' , 
	P2_ANADENOMIN CHAR(80) NOT NULL DEFAULT '' , 
	P2_ANANOME CHAR(60) NOT NULL DEFAULT '' , 
	P2_ANACOGNOME CHAR(60) NOT NULL DEFAULT '' , 
	P2_ANATITOLO CHAR(10) NOT NULL DEFAULT '' , 
	P2_ANACODEORI CHAR(17) NOT NULL DEFAULT '' , 
	P2_ALBOPROFESS CHAR(60) NOT NULL DEFAULT '' , 
	P2_PROVALBO CHAR(2) NOT NULL DEFAULT '' , 
	P2_NRISCRIZALBO CHAR(60) NOT NULL DEFAULT '' , 
	[REDACTED] DATE, 
	P2_REGFISCALE CHAR(4) NOT NULL DEFAULT '' , 
	P2_SEDEIND CHAR(60) NOT NULL DEFAULT '' , 
	P2_SEDENRCIVICO CHAR(8) NOT NULL DEFAULT '' , 
	P2_SEDECAP NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	P2_SEDECOMUNE CHAR(60) NOT NULL DEFAULT '' , 
	P2_SEDEPROV CHAR(2) NOT NULL DEFAULT '' , 
	P2_SEDENAZ CHAR(2) NOT NULL DEFAULT '' , 
	P2_STABORGIND CHAR(60) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(8) NOT NULL DEFAULT '' , 
	P2_STABORGCAP NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	[REDACTED] CHAR(60) NOT NULL DEFAULT '' , 
	P2_STABORGPROV CHAR(2) NOT NULL DEFAULT '' , 
	P2_STABORGNAZ CHAR(2) NOT NULL DEFAULT '' , 
	P2_ISCRREAUFF CHAR(2) NOT NULL DEFAULT '' , 
	P2_ISCRREANUM CHAR(20) NOT NULL DEFAULT '' , 
	P2_ISCRREACAP NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	[REDACTED] CHAR(2) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(2) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(12) NOT NULL DEFAULT '' , 
	P2_CONTATTIFAX CHAR(12) NOT NULL DEFAULT '' , 
	P2_CONTATTIMAIL CHAR(255) NOT NULL DEFAULT '' , 
	P2_RIFAMMINISTR CHAR(20) NOT NULL DEFAULT '' , 
	P2_NOMEFILE CHAR(255) NOT NULL DEFAULT '' , 
	P2_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	P2_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	P2_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA0200F 
	ADD CONSTRAINT  PAA0200Q 
	UNIQUE( P2_KEYPRGINVIO , [REDACTED] , P2_KEYBODYFATT ) ; 
  
CREATE TABLE  PAA0300F ( 
	P3_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P3_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P3_FISCIVAPAESE CHAR(2) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(28) NOT NULL DEFAULT '' , 
	P3_CODFISC CHAR(16) NOT NULL DEFAULT '' , 
	P3_ANADENOMI CHAR(80) NOT NULL DEFAULT '' , 
	P3_ANANOME CHAR(60) NOT NULL DEFAULT '' , 
	P3_ANACOGNOME CHAR(60) NOT NULL DEFAULT '' , 
	P3_ANATITOLO CHAR(10) NOT NULL DEFAULT '' , 
	P3_ANACODEORI CHAR(17) NOT NULL DEFAULT '' , 
	P3_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	P3_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	P3_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA0300F 
	ADD CONSTRAINT  PAA0300Q 
	UNIQUE( P3_KEYPRGINVIO , [REDACTED] , P3_KEYBODYFATT ) ; 
  
CREATE TABLE  PAA0400F ( 
	P4_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P4_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P4_FISCIVAPAESE CHAR(2) NOT NULL DEFAULT '' , 
	P4_FISCIVACOD CHAR(28) NOT NULL DEFAULT '' , 
	P4_CODFISC CHAR(16) NOT NULL DEFAULT '' , 
	P4_ANADENOM CHAR(80) NOT NULL DEFAULT '' , 
	P4_ANANOME CHAR(60) NOT NULL DEFAULT '' , 
	P4_ANACOGNOME CHAR(60) NOT NULL DEFAULT '' , 
	P4_ANATITOLO CHAR(10) NOT NULL DEFAULT '' , 
	P4_ANACODEORI CHAR(17) NOT NULL DEFAULT '' , 
	P4_SEDEIND CHAR(60) NOT NULL DEFAULT '' , 
	P4_SEDENRCIVICO CHAR(8) NOT NULL DEFAULT '' , 
	P4_SEDECAP NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	P4_SEDECOMUNE CHAR(60) NOT NULL DEFAULT '' , 
	P4_SEDEPROV CHAR(2) NOT NULL DEFAULT '' , 
	P4_SEDENAZ CHAR(2) NOT NULL DEFAULT '' , 
	P4_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	P4_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	P4_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA0400F 
	ADD CONSTRAINT  PAA0400Q 
	UNIQUE( P4_KEYPRGINVIO , [REDACTED] , P4_KEYBODYFATT ) ; 
  
CREATE TABLE  PAA0500F ( 
	P5_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P5_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P5_FISCIVAPAESE CHAR(2) NOT NULL DEFAULT '' , 
	P5_FISCIVACOD CHAR(28) NOT NULL DEFAULT '' , 
	P5_CODICEFISC CHAR(16) NOT NULL DEFAULT '' , 
	P5_ANADENOMIN CHAR(80) NOT NULL DEFAULT '' , 
	P5_ANANOME CHAR(60) NOT NULL DEFAULT '' , 
	P5_ANACOGNOME CHAR(60) NOT NULL DEFAULT '' , 
	P5_ANATITOLO CHAR(10) NOT NULL DEFAULT '' , 
	P5_ANACODEORI CHAR(17) NOT NULL DEFAULT '' , 
	P5_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA0500F 
	ADD CONSTRAINT  PAA0500Q 
	UNIQUE( P5_KEYPRGINVIO , [REDACTED] , P5_KEYBODYFATT ) ; 
  
CREATE TABLE  PAA0600F ( 
	P6_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P6_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P6_SOGGEMITT CHAR(2) NOT NULL DEFAULT '' , 
	P6_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA0600F 
	ADD CONSTRAINT  PAA0600Q 
	UNIQUE( P6_KEYPRGINVIO , [REDACTED] , P6_KEYBODYFATT ) ; 
  
CREATE TABLE  PAA0700F ( 
	P7_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P7_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P7_TIPODOC CHAR(4) NOT NULL DEFAULT '' , 
	P7_DIVISA CHAR(3) NOT NULL DEFAULT '' , 
	P7_DATA DATE, 
	P7_NUMERO CHAR(20) NOT NULL DEFAULT '' , 
	P7_TIPORITENUTA CHAR(4) NOT NULL DEFAULT '' , 
	P7_IMPORTORIT NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	P7_ALIQUOTARIT NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	P7_CAUSPAGAM CHAR(1) NOT NULL DEFAULT '' , 
	P7_NUMEROBOLLO CHAR(14) NOT NULL DEFAULT '' , 
	P7_IMPORTOBOLLO NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	P7_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	P7_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	P7_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA0700F 
	ADD CONSTRAINT  PAA0700Q 
	UNIQUE( P7_KEYPRGINVIO , [REDACTED] , P7_KEYBODYFATT ) ; 
  
CREATE TABLE  PAA0800F ( 
	P8_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P8_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P8_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	P8_TIPOCASSA CHAR(4) NOT NULL DEFAULT '' , 
	P8_ALIQCASSA NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	P8_IMCONTRCASSA NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	P8_IMPONCASSA NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	P8_ALIQIVA NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	P8_RITENUTA CHAR(2) NOT NULL DEFAULT '' , 
	P8_NATURA CHAR(2) NOT NULL DEFAULT '' , 
	P8_RIFAMMINIS CHAR(20) NOT NULL DEFAULT '' , 
	P8_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	P8_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	P8_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA0800F 
	ADD CONSTRAINT  PAA0800Q 
	UNIQUE( P8_KEYPRGINVIO , [REDACTED] , P8_KEYBODYFATT , P8_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAA0900F ( 
	P9_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P9_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P9_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	P9_TIPOSCONTO CHAR(2) NOT NULL DEFAULT '' , 
	P9_PERCSCONTO NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	P9_IMPSCONTO NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	P9_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA0900F 
	ADD CONSTRAINT  PAA0900Q 
	UNIQUE( P9_KEYPRGINVIO , [REDACTED] , P9_KEYBODYFATT , P9_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAA1000F ( 
	P0_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P0_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P0_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	P0_IDDOC CHAR(20) NOT NULL DEFAULT '' , 
	P0_DATADOC DATE, 
	P0_NUMITEM CHAR(20) NOT NULL DEFAULT '' , 
	P0_COMMESSACONV CHAR(100) NOT NULL DEFAULT '' , 
	P0_CODCUP CHAR(15) NOT NULL DEFAULT '' , 
	P0_CODCIG CHAR(15) NOT NULL DEFAULT '' , 
	P0_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA1000F 
	ADD CONSTRAINT  PAA1000Q 
	UNIQUE( P0_KEYPRGINVIO , [REDACTED] , P0_KEYBODYFATT , P0_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAA1100F ( 
	PA_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PA_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PA_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PA_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PA_IDDOC CHAR(20) NOT NULL DEFAULT '' , 
	PA_DATADOCU DATE, 
	PA_NUMITEM CHAR(20) NOT NULL DEFAULT '' , 
	PA_COMMCONVENZ CHAR(100) NOT NULL DEFAULT '' , 
	PA_CODCUP CHAR(15) NOT NULL DEFAULT '' , 
	PA_CODCIG CHAR(15) NOT NULL DEFAULT '' , 
	PA_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA1100F 
	ADD CONSTRAINT  PAA1100Q 
	UNIQUE( PA_KEYPRGINVIO , PA_KEYHEADERFATT , PA_KEYBODYFATT , PA_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAA1200F ( 
	PB_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PB_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PB_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PB_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PB_IDDOC CHAR(20) NOT NULL DEFAULT '' , 
	PB_DATADOCO DATE, 
	PB_NUMITEM CHAR(20) NOT NULL DEFAULT '' , 
	PB_COMMCONVENZ CHAR(100) NOT NULL DEFAULT '' , 
	PB_CODCUP CHAR(15) NOT NULL DEFAULT '' , 
	PB_CODCIG CHAR(15) NOT NULL DEFAULT '' , 
	PB_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA1200F 
	ADD CONSTRAINT  PAA1200Q 
	UNIQUE( PB_KEYPRGINVIO , PB_KEYHEADERFATT , PB_KEYBODYFATT , PB_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAA1300F ( 
	PC_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PC_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PC_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PC_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PC_IDDOC CHAR(20) NOT NULL DEFAULT '' , 
	PC_DATADOC DATE, 
	PC_NUMITEM CHAR(20) NOT NULL DEFAULT '' , 
	PC_COMMCONVENZ CHAR(100) NOT NULL DEFAULT '' , 
	PC_CODCUP CHAR(15) NOT NULL DEFAULT '' , 
	PC_CODCIG CHAR(15) NOT NULL DEFAULT '' , 
	PC_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA1300F 
	ADD CONSTRAINT  PAA1300Q 
	UNIQUE( PC_KEYPRGINVIO , PC_KEYHEADERFATT , PC_KEYBODYFATT , PC_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAA1400F ( 
	PD_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PD_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PD_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PD_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PD_IDDOC CHAR(20) NOT NULL DEFAULT '' , 
	PD_DATADOC DATE, 
	PD_NUMITEM CHAR(20) NOT NULL DEFAULT '' , 
	PD_COMMCONVENZ CHAR(100) NOT NULL DEFAULT '' , 
	PD_CODCUP CHAR(15) NOT NULL DEFAULT '' , 
	PD_CODCIG CHAR(15) NOT NULL DEFAULT '' , 
	PD_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA1400F 
	ADD CONSTRAINT  PAA1400Q 
	UNIQUE( PD_KEYPRGINVIO , PD_KEYHEADERFATT , PD_KEYBODYFATT , PD_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAA1500F ( 
	PE_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PE_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PE_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PE_RIFFASE NUMERIC(3, 0) NOT NULL DEFAULT 0 , 
	PE_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA1500F 
	ADD CONSTRAINT  PAA1500Q 
	UNIQUE( PE_KEYPRGINVIO , PE_KEYHEADERFATT , PE_KEYBODYFATT , PE_RIFFASE ) ; 
  
CREATE TABLE  PAA1600F ( 
	PF_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PF_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PF_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PF_NUMDDDT CHAR(20) NOT NULL DEFAULT '' , 
	PF_DATADDT DATE, 
	PF_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PF_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PF_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PF_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA1600F 
	ADD CONSTRAINT  PAA1600Q 
	UNIQUE( PF_KEYPRGINVIO , PF_KEYHEADERFATT , PF_KEYBODYFATT , PF_NUMDDDT , PF_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAA1700F ( 
	PG_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PG_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PG_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PG_FISCIVAPAESE CHAR(2) NOT NULL DEFAULT '' , 
	PG_FISCIVACODICE CHAR(28) NOT NULL DEFAULT '' , 
	PG_CODICEFISCALE CHAR(16) NOT NULL DEFAULT '' , 
	PG_ANADENOMINAZ CHAR(80) NOT NULL DEFAULT '' , 
	PG_ANANOME CHAR(60) NOT NULL DEFAULT '' , 
	PG_ANACOGNOME CHAR(60) NOT NULL DEFAULT '' , 
	PG_ANATITOLO CHAR(10) NOT NULL DEFAULT '' , 
	PG_ANACODEORI CHAR(17) NOT NULL DEFAULT '' , 
	PG_NUMLICGUIDA CHAR(20) NOT NULL DEFAULT '' , 
	PG_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA1700F 
	ADD CONSTRAINT  PAA1700Q 
	UNIQUE( PG_KEYPRGINVIO , PG_KEYHEADERFATT , PG_KEYBODYFATT ) ; 
  
CREATE TABLE  PAA1800F ( 
	PI_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PI_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PI_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PI_NUMEROLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PI_TIPOCESSPREST CHAR(2) NOT NULL DEFAULT '' , 
	PI_DESCRIZIONE CHAR(100) NOT NULL DEFAULT '' , 
	PI_QUANTITA NUMERIC(21, 8) NOT NULL DEFAULT 0 , 
	PI_UNITAMISURA CHAR(10) NOT NULL DEFAULT '' , 
	PI_DTINIZIOPER DATE, 
	PI_DTFINEPER DATE, 
	PI_PREZZOUNIT NUMERIC(21, 8) NOT NULL DEFAULT 0 , 
	PI_PRZTOTALE NUMERIC(21, 8) NOT NULL DEFAULT 0 , 
	PI_ALIQUOTAIVA NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	PI_RITENUTA CHAR(2) NOT NULL DEFAULT '' , 
	PI_NATURA CHAR(2) NOT NULL DEFAULT '' , 
	PI_RIFAMMINISTR CHAR(20) NOT NULL DEFAULT '' , 
	PI_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PI_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PI_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA1800F 
	ADD CONSTRAINT  PAA1800Q 
	UNIQUE( PI_KEYPRGINVIO , PI_KEYHEADERFATT , PI_KEYBODYFATT , PI_NUMEROLINEA ) ; 
  
CREATE TABLE  PAA1900F ( 
	PY_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PY_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PY_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PY_KEYNLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PY_KEYNLINAR NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PY_TIPOARTICOLO CHAR(35) NOT NULL DEFAULT '' , 
	PY_VALOREARTICOLO CHAR(35) NOT NULL DEFAULT '' , 
	PY_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA1900F 
	ADD CONSTRAINT  PAA1900Q 
	UNIQUE( PY_KEYPRGINVIO , PY_KEYHEADERFATT , PY_KEYBODYFATT , PY_KEYNLINEA , PY_KEYNLINAR ) ; 
  
CREATE TABLE  PAA2000F ( 
	PJ_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PJ_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PJ_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PJ_KEYNLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PJ_KEYNLINAR NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PJ_TIPOSCONTO CHAR(2) NOT NULL DEFAULT '' , 
	PJ_PERCSCONTO NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	PJ_IMPORTOSCONTO NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PJ_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
CREATE TABLE  PAA2100F ( 
	PK_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PK_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PK_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PK_KEYNLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PK_KEYNLINAR NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PK_TIPODATO CHAR(10) NOT NULL DEFAULT '' , 
	PK_RIFDATO CHAR(60) NOT NULL DEFAULT '' , 
	PK_RIFNUMERO NUMERIC(21, 5) NOT NULL DEFAULT 0 , 
	PK_RIFDATA DATE, 
	PK_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
CREATE TABLE  PAA2200F ( 
	PL_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PL_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PL_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PL_ALIQUOTAIVA NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	PL_NATURA CHAR(2) NOT NULL DEFAULT '' , 
	PL_SPESEACCESS NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PL_ARROTONDAM NUMERIC(21, 5) NOT NULL DEFAULT 0 , 
	PL_IMPONIBILE NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PL_IMPOSTA NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PL_ESIGIVA CHAR(1) NOT NULL DEFAULT '' , 
	PL_RIFNORMATIVO CHAR(100) NOT NULL DEFAULT '' , 
	PL_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PL_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PL_ERREST CHAR(1) NOT NULL DEFAULT '' , 
	PL_DETRAIBILE NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	PL_DEDUCIBILE CHAR(2) NOT NULL DEFAULT '' ) ; 
  
CREATE TABLE  PAA2300F ( 
	PM_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PM_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PM_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PM_DATA DATE, 
	PM_TOTALEPERCORSO CHAR(15) NOT NULL DEFAULT '' , 
	PM_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PM_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PM_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA2300F 
	ADD CONSTRAINT  PAA2300Q 
	UNIQUE( PM_KEYPRGINVIO , PM_KEYHEADERFATT , PM_KEYBODYFATT ) ; 
  
CREATE TABLE  PAA2400F ( 
	PN_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PN_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PN_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PN_RIGA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PN_CONDPAGAMENTO CHAR(4) NOT NULL DEFAULT '' , 
	PN_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PN_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PN_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA2400F 
	ADD CONSTRAINT  PAA2400Q 
	UNIQUE( PN_KEYPRGINVIO , PN_KEYHEADERFATT , PN_KEYBODYFATT , PN_RIGA ) ; 
  
CREATE TABLE  PAA2500F ( 
	PO_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PO_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PO_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PO_RIGA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PO_CONDPAGAMENTO CHAR(4) NOT NULL DEFAULT '' , 
	PO_BENEFICIARIO CHAR(200) NOT NULL DEFAULT '' , 
	PO_MODALITAPAGAM CHAR(4) NOT NULL DEFAULT '' , 
	PO_DATARIFTERM DATE, 
	PO_GGTERMINIPAG NUMERIC(3, 0) NOT NULL DEFAULT 0 , 
	PO_DATASCADENZA DATE, 
	PO_IMPORTO NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PO_CODUFFPOST CHAR(20) NOT NULL DEFAULT '' , 
	PO_COGNOMEQUIET CHAR(60) NOT NULL DEFAULT '' , 
	PO_NOMEQUIET CHAR(60) NOT NULL DEFAULT '' , 
	PO_CFQUIETANZA CHAR(16) NOT NULL DEFAULT '' , 
	PO_TITOLOQUIET CHAR(10) NOT NULL DEFAULT '' , 
	PO_ISTFINANZ CHAR(80) NOT NULL DEFAULT '' , 
	PO_IBAN CHAR(34) NOT NULL DEFAULT '' , 
	PO_ABI NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	PO_CAB NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	PO_BIC CHAR(11) NOT NULL DEFAULT '' , 
	PO_SCPAGANTIC NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PO_DTLIMANTIC DATE, 
	PO_PENALITAPAGAM NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PO_DATADECORRP DATE, 
	PO_CODICEPAGAM CHAR(15) NOT NULL DEFAULT '' , 
	PO_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PO_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PO_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
CREATE TABLE  PAA2600F ( 
	PP_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PP_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PP_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PP_NUMEROLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PP_NOMEATTACHMENT CHAR(60) NOT NULL DEFAULT '' , 
	PP_COMPRESSIONE CHAR(10) NOT NULL DEFAULT '' , 
	PP_FMTATTACHMENT CHAR(10) NOT NULL DEFAULT '' , 
	PP_DESCATTACHMENT CHAR(100) NOT NULL DEFAULT '' , 
	PP_ATTACHMENT CHAR(255) NOT NULL DEFAULT '' , 
	PP_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA2600F 
	ADD CONSTRAINT  PAA2600Q 
	UNIQUE( PP_KEYPRGINVIO , PP_KEYHEADERFATT , PP_KEYBODYFATT , PP_NUMEROLINEA ) ; 
  
CREATE TABLE  PAA2700F ( 
	PQ_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PQ_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PQ_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PQ_IMPTOTDOC NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PQ_ARROTOND NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PQ_CAUSALE CHAR(200) NOT NULL DEFAULT '' , 
	PQ_ART73 CHAR(2) NOT NULL DEFAULT '' , 
	PQ_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA2700F 
	ADD CONSTRAINT  PAA2700Q 
	UNIQUE( PQ_KEYPRGINVIO , PQ_KEYHEADERFATT , PQ_KEYBODYFATT ) ; 
  
CREATE TABLE  PAA2800F ( 
	PR_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PR_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PR_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PR_MEZZOTRASP CHAR(80) NOT NULL DEFAULT '' , 
	PR_CAUSALETRASP CHAR(100) NOT NULL DEFAULT '' , 
	PR_NUMCOLLI NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PR_DESCRIZIONE CHAR(100) NOT NULL DEFAULT '' , 
	PR_UMPESO CHAR(10) NOT NULL DEFAULT '' , 
	PR_PESOLORDO NUMERIC(7, 2) NOT NULL DEFAULT 0 , 
	PR_PESONETTO NUMERIC(7, 2) NOT NULL DEFAULT 0 , 
	PR_DATAORARIT DATE, 
	PR_DATAUNIZIO DATE, 
	PR_TIPORESA CHAR(3) NOT NULL DEFAULT '' , 
	PR_INDIRIZZORESA CHAR(60) NOT NULL DEFAULT '' , 
	PR_NRCIVICORESA CHAR(8) NOT NULL DEFAULT '' , 
	PR_CAPRESA NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	PR_COMUNERESA CHAR(60) NOT NULL DEFAULT '' , 
	PR_PROVINCIARESA CHAR(2) NOT NULL DEFAULT '' , 
	PR_NAZIONERESA CHAR(2) NOT NULL DEFAULT '' , 
	PR_DATAORACON DATE, 
	PR_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA2800F 
	ADD CONSTRAINT  PAA2800Q 
	UNIQUE( PR_KEYPRGINVIO , PR_KEYHEADERFATT , PR_KEYBODYFATT ) ; 
  
CREATE TABLE  PAA2900F ( 
	PS_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PS_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PS_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PS_NORMARIFER CHAR(100) NOT NULL DEFAULT '' , 
	PS_NUMFATTPRINC CHAR(20) NOT NULL DEFAULT '' , 
	PS_DATAFATTPRINC DATE, 
	PS_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA2900F 
	ADD CONSTRAINT  PAA2900Q 
	UNIQUE( PS_KEYPRGINVIO , PS_KEYHEADERFATT , PS_KEYBODYFATT ) ; 
  
CREATE TABLE  PAA3000F ( 
	PT_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PT_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PT_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PT_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PT_COMMENTO VARCHAR(1000) NOT NULL DEFAULT '' , 
	PT_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA3000F 
	ADD CONSTRAINT  PAA3000Q 
	UNIQUE( PT_KEYPRGINVIO , PT_KEYHEADERFATT , PT_KEYBODYFATT , PT_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAA3100F ( 
	PH_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PH_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PH_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PH_STABORGIND CHAR(60) NOT NULL DEFAULT '' , 
	PH_STABORGNRCIVICO CHAR(8) NOT NULL DEFAULT '' , 
	PH_STABORGCAP NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	PH_STABORGCOMUNE CHAR(60) NOT NULL DEFAULT '' , 
	PH_STABORGPROV CHAR(2) NOT NULL DEFAULT '' , 
	PH_STABORGNAZ CHAR(2) NOT NULL DEFAULT '' , 
	PH_FISCIVAPAESE CHAR(2) NOT NULL DEFAULT '' , 
	PH_FISCIVACODICE CHAR(28) NOT NULL DEFAULT '' , 
	PH_ANADENOMI CHAR(80) NOT NULL DEFAULT '' , 
	PH_ANANOME CHAR(60) NOT NULL DEFAULT '' , 
	PH_ANACOGNOME CHAR(60) NOT NULL DEFAULT '' , 
	PH_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PH_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PH_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA3100F 
	ADD CONSTRAINT  PAA3100Q 
	UNIQUE( PH_KEYPRGINVIO , PH_KEYHEADERFATT , PH_KEYBODYFATT ) ; 
  
CREATE TABLE  PAA3200F ( 
	PU_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PU_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PU_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PU_PEC CHAR(255) NOT NULL DEFAULT '' , 
	PU_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PU_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PU_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAA3200F 
	ADD CONSTRAINT  PAA3200Q 
	UNIQUE( PU_KEYPRGINVIO , PU_KEYHEADERFATT , PU_KEYBODYFATT ) ; 
  
CREATE TABLE  PAERR00K ( 
	PXFANN CHAR(1) NOT NULL DEFAULT '' , 
	PXHFAT CHAR(20) NOT NULL DEFAULT '' , 
	PXBFAT CHAR(50) NOT NULL DEFAULT '' , 
	PXPRGI CHAR(10) NOT NULL DEFAULT '' , 
	PXTDOC CHAR(4) NOT NULL DEFAULT '' , 
	PXCNFA CHAR(4) NOT NULL DEFAULT '' , 
	PXNFAT CHAR(20) NOT NULL DEFAULT '' , 
	PXUFAT DATE, 
	PXCCLI CHAR(10) NOT NULL DEFAULT '' , 
	PXNFIL CHAR(20) NOT NULL DEFAULT '' , 
	PXNLIN NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PXNERR NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PXCERR CHAR(5) NOT NULL DEFAULT '' , 
	PXDERR CHAR(150) NOT NULL DEFAULT '' , 
	PXCAMP CHAR(15) NOT NULL DEFAULT '' , 
	PXDATO CHAR(150) NOT NULL DEFAULT '' , 
	PXFINT CHAR(1) NOT NULL DEFAULT '' , 
	PXCUIN CHAR(10) NOT NULL DEFAULT '' , 
	PXDTIN DATE, 
	PXHOIN TIME NOT NULL DEFAULT GETDATE()) ; 
  
CREATE TABLE  PAF0100F ( 
	P1_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P1_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(2) NOT NULL DEFAULT '' , 
	P1_TRASMITTCOD CHAR(28) NOT NULL DEFAULT '' , 
	P1_PRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	P1_FMTTRASMISS CHAR(5) NOT NULL DEFAULT '' , 
	P1_CODDEST CHAR(7) NOT NULL DEFAULT '' , 
	P1_TELEFONO CHAR(12) NOT NULL DEFAULT '' , 
	P1_MAIL CHAR(255) NOT NULL DEFAULT '' , 
	P1_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	P1_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	P1_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF0100F 
	ADD CONSTRAINT  PAF0100Q 
	UNIQUE( P1_KEYPRGINVIO , [REDACTED] , P1_KEYBODYFATT ) ; 
  
CREATE TABLE  PAF0200F ( 
	P2_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P2_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P2_FISCIVAPAESE CHAR(2) NOT NULL DEFAULT '' , 
	P2_FISCIVACOD CHAR(28) NOT NULL DEFAULT '' , 
	P2_CODFISCALE CHAR(16) NOT NULL DEFAULT '' , 
	P2_ANADENOMIN CHAR(80) NOT NULL DEFAULT '' , 
	P2_ANANOME CHAR(60) NOT NULL DEFAULT '' , 
	P2_ANACOGNOME CHAR(60) NOT NULL DEFAULT '' , 
	P2_ANATITOLO CHAR(10) NOT NULL DEFAULT '' , 
	P2_ANACODEORI CHAR(17) NOT NULL DEFAULT '' , 
	P2_ALBOPROFESS CHAR(60) NOT NULL DEFAULT '' , 
	P2_PROVALBO CHAR(2) NOT NULL DEFAULT '' , 
	P2_NRISCRIZALBO CHAR(60) NOT NULL DEFAULT '' , 
	[REDACTED] DATE, 
	P2_REGFISCALE CHAR(4) NOT NULL DEFAULT '' , 
	P2_SEDEIND CHAR(60) NOT NULL DEFAULT '' , 
	P2_SEDENRCIVICO CHAR(8) NOT NULL DEFAULT '' , 
	P2_SEDECAP NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	P2_SEDECOMUNE CHAR(60) NOT NULL DEFAULT '' , 
	P2_SEDEPROV CHAR(2) NOT NULL DEFAULT '' , 
	P2_SEDENAZ CHAR(2) NOT NULL DEFAULT '' , 
	P2_STABORGIND CHAR(60) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(8) NOT NULL DEFAULT '' , 
	P2_STABORGCAP NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	[REDACTED] CHAR(60) NOT NULL DEFAULT '' , 
	P2_STABORGPROV CHAR(2) NOT NULL DEFAULT '' , 
	P2_STABORGNAZ CHAR(2) NOT NULL DEFAULT '' , 
	P2_ISCRREAUFF CHAR(2) NOT NULL DEFAULT '' , 
	P2_ISCRREANUM CHAR(20) NOT NULL DEFAULT '' , 
	P2_ISCRREACAP NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	[REDACTED] CHAR(2) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(2) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(12) NOT NULL DEFAULT '' , 
	P2_CONTATTIFAX CHAR(12) NOT NULL DEFAULT '' , 
	P2_CONTATTIMAIL CHAR(255) NOT NULL DEFAULT '' , 
	P2_RIFAMMINISTR CHAR(20) NOT NULL DEFAULT '' , 
	P2_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	P2_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	P2_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF0200F 
	ADD CONSTRAINT  PAF0200Q 
	UNIQUE( P2_KEYPRGINVIO , [REDACTED] , P2_KEYBODYFATT ) ; 
  
CREATE TABLE  PAF0300F ( 
	P3_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P3_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P3_FISCIVAPAESE CHAR(2) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(28) NOT NULL DEFAULT '' , 
	P3_CODFISC CHAR(16) NOT NULL DEFAULT '' , 
	P3_ANADENOMI CHAR(80) NOT NULL DEFAULT '' , 
	P3_ANANOME CHAR(60) NOT NULL DEFAULT '' , 
	P3_ANACOGNOME CHAR(60) NOT NULL DEFAULT '' , 
	P3_ANATITOLO CHAR(10) NOT NULL DEFAULT '' , 
	P3_ANACODEORI CHAR(17) NOT NULL DEFAULT '' , 
	P3_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	P3_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	P3_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF0300F 
	ADD CONSTRAINT  PAF0300Q 
	UNIQUE( P3_KEYPRGINVIO , [REDACTED] , P3_KEYBODYFATT ) ; 
  
CREATE TABLE  PAF0400F ( 
	P4_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P4_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P4_FISCIVAPAESE CHAR(2) NOT NULL DEFAULT '' , 
	P4_FISCIVACOD CHAR(28) NOT NULL DEFAULT '' , 
	P4_CODFISC CHAR(16) NOT NULL DEFAULT '' , 
	P4_ANADENOM CHAR(80) NOT NULL DEFAULT '' , 
	P4_ANANOME CHAR(60) NOT NULL DEFAULT '' , 
	P4_ANACOGNOME CHAR(60) NOT NULL DEFAULT '' , 
	P4_ANATITOLO CHAR(10) NOT NULL DEFAULT '' , 
	P4_ANACODEORI CHAR(17) NOT NULL DEFAULT '' , 
	P4_SEDEIND CHAR(60) NOT NULL DEFAULT '' , 
	P4_SEDENRCIVICO CHAR(8) NOT NULL DEFAULT '' , 
	P4_SEDECAP NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	P4_SEDECOMUNE CHAR(60) NOT NULL DEFAULT '' , 
	P4_SEDEPROV CHAR(2) NOT NULL DEFAULT '' , 
	P4_SEDENAZ CHAR(2) NOT NULL DEFAULT '' , 
	P4_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	P4_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	P4_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF0400F 
	ADD CONSTRAINT  PAF0400Q 
	UNIQUE( P4_KEYPRGINVIO , [REDACTED] , P4_KEYBODYFATT ) ; 
  
CREATE TABLE  PAF0500F ( 
	P5_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P5_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P5_FISCIVAPAESE CHAR(2) NOT NULL DEFAULT '' , 
	P5_FISCIVACOD CHAR(28) NOT NULL DEFAULT '' , 
	P5_CODICEFISC CHAR(16) NOT NULL DEFAULT '' , 
	P5_ANADENOMIN CHAR(80) NOT NULL DEFAULT '' , 
	P5_ANANOME CHAR(60) NOT NULL DEFAULT '' , 
	P5_ANACOGNOME CHAR(60) NOT NULL DEFAULT '' , 
	P5_ANATITOLO CHAR(10) NOT NULL DEFAULT '' , 
	P5_ANACODEORI CHAR(17) NOT NULL DEFAULT '' , 
	P5_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF0500F 
	ADD CONSTRAINT  PAF0500Q 
	UNIQUE( P5_KEYPRGINVIO , [REDACTED] , P5_KEYBODYFATT ) ; 
  
CREATE TABLE  PAF0600F ( 
	P6_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P6_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P6_SOGGEMITT CHAR(2) NOT NULL DEFAULT '' , 
	P6_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF0600F 
	ADD CONSTRAINT  PAF0600Q 
	UNIQUE( P6_KEYPRGINVIO , [REDACTED] , P6_KEYBODYFATT ) ; 
  
CREATE TABLE  PAF0700F ( 
	P7_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P7_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P7_TIPODOC CHAR(4) NOT NULL DEFAULT '' , 
	P7_DIVISA CHAR(3) NOT NULL DEFAULT '' , 
	P7_DATA DATE, 
	P7_NUMERO CHAR(20) NOT NULL DEFAULT '' , 
	P7_TIPORITENUTA CHAR(4) NOT NULL DEFAULT '' , 
	P7_IMPORTORIT NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	P7_ALIQUOTARIT NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	P7_CAUSPAGAM CHAR(1) NOT NULL DEFAULT '' , 
	P7_NUMEROBOLLO CHAR(14) NOT NULL DEFAULT '' , 
	P7_IMPORTOBOLLO NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	P7_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	P7_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	P7_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF0700F 
	ADD CONSTRAINT  PAF0700Q 
	UNIQUE( P7_KEYPRGINVIO , [REDACTED] , P7_KEYBODYFATT ) ; 
  
CREATE TABLE  PAF0800F ( 
	P8_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P8_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P8_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	P8_TIPOCASSA CHAR(4) NOT NULL DEFAULT '' , 
	P8_ALIQCASSA NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	P8_IMCONTRCASSA NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	P8_IMPONCASSA NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	P8_ALIQIVA NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	P8_RITENUTA CHAR(2) NOT NULL DEFAULT '' , 
	P8_NATURA CHAR(2) NOT NULL DEFAULT '' , 
	P8_RIFAMMINIS CHAR(20) NOT NULL DEFAULT '' , 
	P8_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	P8_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	P8_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF0800F 
	ADD CONSTRAINT  PAF0800Q 
	UNIQUE( P8_KEYPRGINVIO , [REDACTED] , P8_KEYBODYFATT , P8_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAF0900F ( 
	P9_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P9_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P9_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	P9_TIPOSCONTO CHAR(2) NOT NULL DEFAULT '' , 
	P9_PERCSCONTO NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	P9_IMPSCONTO NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	P9_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF0900F 
	ADD CONSTRAINT  PAF0900Q 
	UNIQUE( P9_KEYPRGINVIO , [REDACTED] , P9_KEYBODYFATT , P9_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAF1000F ( 
	P0_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	[REDACTED] CHAR(20) NOT NULL DEFAULT '' , 
	P0_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	P0_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	P0_IDDOC CHAR(20) NOT NULL DEFAULT '' , 
	P0_DATADOC DATE, 
	P0_NUMITEM CHAR(20) NOT NULL DEFAULT '' , 
	P0_COMMESSACONV CHAR(100) NOT NULL DEFAULT '' , 
	P0_CODCUP CHAR(15) NOT NULL DEFAULT '' , 
	P0_CODCIG CHAR(15) NOT NULL DEFAULT '' , 
	P0_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF1000F 
	ADD CONSTRAINT  PAF1000Q 
	UNIQUE( P0_KEYPRGINVIO , [REDACTED] , P0_KEYBODYFATT , P0_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAF1100F ( 
	PA_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PA_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PA_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PA_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PA_IDDOC CHAR(20) NOT NULL DEFAULT '' , 
	PA_DATADOCU DATE, 
	PA_NUMITEM CHAR(20) NOT NULL DEFAULT '' , 
	PA_COMMCONVENZ CHAR(100) NOT NULL DEFAULT '' , 
	PA_CODCUP CHAR(15) NOT NULL DEFAULT '' , 
	PA_CODCIG CHAR(15) NOT NULL DEFAULT '' , 
	PA_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF1100F 
	ADD CONSTRAINT  PAF1100Q 
	UNIQUE( PA_KEYPRGINVIO , PA_KEYHEADERFATT , PA_KEYBODYFATT , PA_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAF1200F ( 
	PB_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PB_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PB_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PB_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PB_IDDOC CHAR(20) NOT NULL DEFAULT '' , 
	PB_DATADOCO DATE, 
	PB_NUMITEM CHAR(20) NOT NULL DEFAULT '' , 
	PB_COMMCONVENZ CHAR(100) NOT NULL DEFAULT '' , 
	PB_CODCUP CHAR(15) NOT NULL DEFAULT '' , 
	PB_CODCIG CHAR(15) NOT NULL DEFAULT '' , 
	PB_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF1200F 
	ADD CONSTRAINT  PAF1200Q 
	UNIQUE( PB_KEYPRGINVIO , PB_KEYHEADERFATT , PB_KEYBODYFATT , PB_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAF1300F ( 
	PC_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PC_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PC_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PC_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PC_IDDOC CHAR(20) NOT NULL DEFAULT '' , 
	PC_DATADOC DATE, 
	PC_NUMITEM CHAR(20) NOT NULL DEFAULT '' , 
	PC_COMMCONVENZ CHAR(100) NOT NULL DEFAULT '' , 
	PC_CODCUP CHAR(15) NOT NULL DEFAULT '' , 
	PC_CODCIG CHAR(15) NOT NULL DEFAULT '' , 
	PC_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF1300F 
	ADD CONSTRAINT  PAF1300Q 
	UNIQUE( PC_KEYPRGINVIO , PC_KEYHEADERFATT , PC_KEYBODYFATT , PC_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAF1400F ( 
	PD_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PD_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PD_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PD_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PD_IDDOC CHAR(20) NOT NULL DEFAULT '' , 
	PD_DATADOC DATE, 
	PD_NUMITEM CHAR(20) NOT NULL DEFAULT '' , 
	PD_COMMCONVENZ CHAR(100) NOT NULL DEFAULT '' , 
	PD_CODCUP CHAR(15) NOT NULL DEFAULT '' , 
	PD_CODCIG CHAR(15) NOT NULL DEFAULT '' , 
	PD_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF1400F 
	ADD CONSTRAINT  PAF1400Q 
	UNIQUE( PD_KEYPRGINVIO , PD_KEYHEADERFATT , PD_KEYBODYFATT , PD_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAF1500F ( 
	PE_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PE_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PE_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PE_RIFFASE NUMERIC(3, 0) NOT NULL DEFAULT 0 , 
	PE_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF1500F 
	ADD CONSTRAINT  PAF1500Q 
	UNIQUE( PE_KEYPRGINVIO , PE_KEYHEADERFATT , PE_KEYBODYFATT , PE_RIFFASE ) ; 
  
CREATE TABLE  PAF1600F ( 
	PF_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PF_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PF_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PF_NUMDDDT CHAR(20) NOT NULL DEFAULT '' , 
	PF_DATADDT DATE, 
	PF_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PF_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PF_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PF_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF1600F 
	ADD CONSTRAINT  PAF1600Q 
	UNIQUE( PF_KEYPRGINVIO , PF_KEYHEADERFATT , PF_KEYBODYFATT , PF_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAF1700F ( 
	PG_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PG_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PG_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PG_FISCIVAPAESE CHAR(2) NOT NULL DEFAULT '' , 
	PG_FISCIVACODICE CHAR(28) NOT NULL DEFAULT '' , 
	PG_CODICEFISCALE CHAR(16) NOT NULL DEFAULT '' , 
	PG_ANADENOMINAZ CHAR(80) NOT NULL DEFAULT '' , 
	PG_ANANOME CHAR(60) NOT NULL DEFAULT '' , 
	PG_ANACOGNOME CHAR(60) NOT NULL DEFAULT '' , 
	PG_ANATITOLO CHAR(10) NOT NULL DEFAULT '' , 
	PG_ANACODEORI CHAR(17) NOT NULL DEFAULT '' , 
	PG_NUMLICGUIDA CHAR(20) NOT NULL DEFAULT '' , 
	PG_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF1700F 
	ADD CONSTRAINT  PAF1700Q 
	UNIQUE( PG_KEYPRGINVIO , PG_KEYHEADERFATT , PG_KEYBODYFATT ) ; 
  
CREATE TABLE  PAF1800F ( 
	PI_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PI_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PI_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PI_NUMEROLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PI_TIPOCESSPREST CHAR(2) NOT NULL DEFAULT '' , 
	PI_DESCRIZIONE CHAR(100) NOT NULL DEFAULT '' , 
	PI_QUANTITA NUMERIC(21, 8) NOT NULL DEFAULT 0 , 
	PI_UNITAMISURA CHAR(10) NOT NULL DEFAULT '' , 
	PI_DTINIZIOPER DATE, 
	PI_DTFINEPER DATE, 
	PI_PREZZOUNIT NUMERIC(21, 8) NOT NULL DEFAULT 0 , 
	PI_PRZTOTALE NUMERIC(21, 8) NOT NULL DEFAULT 0 , 
	PI_ALIQUOTAIVA NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	PI_RITENUTA CHAR(2) NOT NULL DEFAULT '' , 
	PI_NATURA CHAR(2) NOT NULL DEFAULT '' , 
	PI_RIFAMMINISTR CHAR(20) NOT NULL DEFAULT '' , 
	PI_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PI_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PI_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF1800F 
	ADD CONSTRAINT  PAF1800Q 
	UNIQUE( PI_KEYPRGINVIO , PI_KEYHEADERFATT , PI_KEYBODYFATT , PI_NUMEROLINEA ) ; 
  
CREATE TABLE  PAF1900F ( 
	PY_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PY_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PY_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PY_KEYNLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PY_KEYNLINAR NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PY_TIPOARTICOLO CHAR(35) NOT NULL DEFAULT '' , 
	PY_VALOREARTICOLO CHAR(35) NOT NULL DEFAULT '' , 
	PY_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF1900F 
	ADD CONSTRAINT  PAF1900Q 
	UNIQUE( PY_KEYPRGINVIO , PY_KEYHEADERFATT , PY_KEYBODYFATT , PY_KEYNLINEA , PY_KEYNLINAR ) ; 
  
CREATE TABLE  PAF2000F ( 
	PJ_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PJ_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PJ_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PJ_KEYNLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PJ_KEYNLINAR NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PJ_TIPOSCONTO CHAR(2) NOT NULL DEFAULT '' , 
	PJ_PERCSCONTO NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	PJ_IMPORTOSCONTO NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PJ_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
CREATE TABLE  PAF2100F ( 
	PK_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PK_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PK_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PK_KEYNLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PK_KEYNLINAR NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PK_TIPODATO CHAR(10) NOT NULL DEFAULT '' , 
	PK_RIFDATO CHAR(60) NOT NULL DEFAULT '' , 
	PK_RIFNUMERO NUMERIC(21, 5) NOT NULL DEFAULT 0 , 
	PK_RIFDATA DATE, 
	PK_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
CREATE TABLE  PAF2200F ( 
	PL_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PL_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PL_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PL_ALIQUOTAIVA NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	PL_NATURA CHAR(2) NOT NULL DEFAULT '' , 
	PL_SPESEACCESS NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PL_ARROTONDAM NUMERIC(21, 5) NOT NULL DEFAULT 0 , 
	PL_IMPONIBILE NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PL_IMPOSTA NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PL_ESIGIVA CHAR(1) NOT NULL DEFAULT '' , 
	PL_RIFNORMATIVO CHAR(100) NOT NULL DEFAULT '' , 
	PL_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PL_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PL_ERREST CHAR(1) NOT NULL DEFAULT '' , 
	PL_DETRAIBILE NUMERIC(6, 2) NOT NULL DEFAULT 0 , 
	PL_DEDUCIBILE CHAR(2) NOT NULL DEFAULT '' ) ; 
  
CREATE TABLE  PAF2300F ( 
	PM_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PM_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PM_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PM_DATA DATE, 
	PM_TOTALEPERCORSO CHAR(15) NOT NULL DEFAULT '' , 
	PM_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PM_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PM_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF2300F 
	ADD CONSTRAINT  PAF2300Q 
	UNIQUE( PM_KEYPRGINVIO , PM_KEYHEADERFATT , PM_KEYBODYFATT ) ; 
  
CREATE TABLE  PAF2400F ( 
	PN_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PN_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PN_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PN_RIGA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PN_CONDPAGAMENTO CHAR(4) NOT NULL DEFAULT '' , 
	PN_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PN_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PN_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF2400F 
	ADD CONSTRAINT  PAF2400Q 
	UNIQUE( PN_KEYPRGINVIO , PN_KEYHEADERFATT , PN_KEYBODYFATT , PN_RIGA ) ; 
  
CREATE TABLE  PAF2500F ( 
	PO_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PO_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PO_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PO_RIGA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PO_CONDPAGAMENTO CHAR(4) NOT NULL DEFAULT '' , 
	PO_BENEFICIARIO CHAR(200) NOT NULL DEFAULT '' , 
	PO_MODALITAPAGAM CHAR(4) NOT NULL DEFAULT '' , 
	PO_DATARIFTERM DATE, 
	PO_GGTERMINIPAG NUMERIC(3, 0) NOT NULL DEFAULT 0 , 
	PO_DATASCADENZA DATE, 
	PO_IMPORTO NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PO_CODUFFPOST CHAR(20) NOT NULL DEFAULT '' , 
	PO_COGNOMEQUIET CHAR(60) NOT NULL DEFAULT '' , 
	PO_NOMEQUIET CHAR(60) NOT NULL DEFAULT '' , 
	PO_CFQUIETANZA CHAR(16) NOT NULL DEFAULT '' , 
	PO_TITOLOQUIET CHAR(10) NOT NULL DEFAULT '' , 
	PO_ISTFINANZ CHAR(80) NOT NULL DEFAULT '' , 
	PO_IBAN CHAR(34) NOT NULL DEFAULT '' , 
	PO_ABI NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	PO_CAB NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	PO_BIC CHAR(11) NOT NULL DEFAULT '' , 
	PO_SCPAGANTIC NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PO_DTLIMANTIC DATE, 
	PO_PENALITAPAGAM NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PO_DATADECORRP DATE, 
	PO_CODICEPAGAM CHAR(15) NOT NULL DEFAULT '' , 
	PO_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PO_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PO_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
CREATE TABLE  PAF2600F ( 
	PP_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PP_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PP_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PP_NUMEROLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PP_NOMEATTACHMENT CHAR(60) NOT NULL DEFAULT '' , 
	PP_COMPRESSIONE CHAR(10) NOT NULL DEFAULT '' , 
	PP_FMTATTACHMENT CHAR(10) NOT NULL DEFAULT '' , 
	PP_DESCATTACHMENT CHAR(100) NOT NULL DEFAULT '' , 
	PP_ATTACHMENT CHAR(255) NOT NULL DEFAULT '' , 
	PP_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF2600F 
	ADD CONSTRAINT  PAF2600Q 
	UNIQUE( PP_KEYPRGINVIO , PP_KEYHEADERFATT , PP_KEYBODYFATT , PP_NUMEROLINEA ) ; 
  
CREATE TABLE  PAF2700F ( 
	PQ_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PQ_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PQ_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PQ_IMPTOTDOC NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PQ_ARROTOND NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PQ_CAUSALE CHAR(200) NOT NULL DEFAULT '' , 
	PQ_ART73 CHAR(2) NOT NULL DEFAULT '' , 
	PQ_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF2700F 
	ADD CONSTRAINT  PAF2700Q 
	UNIQUE( PQ_KEYPRGINVIO , PQ_KEYHEADERFATT , PQ_KEYBODYFATT ) ; 
  
CREATE TABLE  PAF2800F ( 
	PR_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PR_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PR_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PR_MEZZOTRASP CHAR(80) NOT NULL DEFAULT '' , 
	PR_CAUSALETRASP CHAR(100) NOT NULL DEFAULT '' , 
	PR_NUMCOLLI NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PR_DESCRIZIONE CHAR(100) NOT NULL DEFAULT '' , 
	PR_UMPESO CHAR(10) NOT NULL DEFAULT '' , 
	PR_PESOLORDO NUMERIC(7, 2) NOT NULL DEFAULT 0 , 
	PR_PESONETTO NUMERIC(7, 2) NOT NULL DEFAULT 0 , 
	PR_DATAORARIT DATE, 
	PR_DATAUNIZIO DATE, 
	PR_TIPORESA CHAR(3) NOT NULL DEFAULT '' , 
	PR_INDIRIZZORESA CHAR(60) NOT NULL DEFAULT '' , 
	PR_NRCIVICORESA CHAR(8) NOT NULL DEFAULT '' , 
	PR_CAPRESA NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	PR_COMUNERESA CHAR(60) NOT NULL DEFAULT '' , 
	PR_PROVINCIARESA CHAR(2) NOT NULL DEFAULT '' , 
	PR_NAZIONERESA CHAR(2) NOT NULL DEFAULT '' , 
	PR_DATAORACON DATE, 
	PR_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF2800F 
	ADD CONSTRAINT  PAF2800Q 
	UNIQUE( PR_KEYPRGINVIO , PR_KEYHEADERFATT , PR_KEYBODYFATT ) ; 
  
CREATE TABLE  PAF2900F ( 
	PS_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PS_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PS_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PS_NORMARIFER CHAR(100) NOT NULL DEFAULT '' , 
	PS_NUMFATTPRINC CHAR(20) NOT NULL DEFAULT '' , 
	PS_DATAFATTPRINC DATE, 
	PS_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF2900F 
	ADD CONSTRAINT  PAF2900Q 
	UNIQUE( PS_KEYPRGINVIO , PS_KEYHEADERFATT , PS_KEYBODYFATT ) ; 
  
CREATE TABLE  PAF3000F ( 
	PT_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PT_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PT_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PT_RIFNUMLINEA NUMERIC(4, 0) NOT NULL DEFAULT 0 , 
	PT_COMMENTO VARCHAR(1000) NOT NULL DEFAULT '' , 
	PT_GESTIONE CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF3000F 
	ADD CONSTRAINT  PAF3000Q 
	UNIQUE( PT_KEYPRGINVIO , PT_KEYHEADERFATT , PT_KEYBODYFATT , PT_RIFNUMLINEA ) ; 
  
CREATE TABLE  PAF3100F ( 
	PH_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PH_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PH_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PH_STABORGIND CHAR(60) NOT NULL DEFAULT '' , 
	PH_STABORGNRCIVICO CHAR(8) NOT NULL DEFAULT '' , 
	PH_STABORGCAP NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	PH_STABORGCOMUNE CHAR(60) NOT NULL DEFAULT '' , 
	PH_STABORGPROV CHAR(2) NOT NULL DEFAULT '' , 
	PH_STABORGNAZ CHAR(2) NOT NULL DEFAULT '' , 
	PH_FISCIVAPAESE CHAR(2) NOT NULL DEFAULT '' , 
	PH_FISCIVACODICE CHAR(28) NOT NULL DEFAULT '' , 
	PH_ANADENOMI CHAR(80) NOT NULL DEFAULT '' , 
	PH_ANANOME CHAR(60) NOT NULL DEFAULT '' , 
	PH_ANACOGNOME CHAR(60) NOT NULL DEFAULT '' , 
	PH_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PH_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PH_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF3100F 
	ADD CONSTRAINT  PAF3100Q 
	UNIQUE( PH_KEYPRGINVIO , PH_KEYHEADERFATT , PH_KEYBODYFATT ) ; 
  
CREATE TABLE  PAF3200F ( 
	PU_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PU_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PU_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PU_PEC CHAR(255) NOT NULL DEFAULT '' , 
	PU_GESTIONE CHAR(1) NOT NULL DEFAULT '' , 
	PU_ERRINT CHAR(1) NOT NULL DEFAULT '' , 
	PU_ERREST CHAR(1) NOT NULL DEFAULT '' ) ; 
  
ALTER TABLE  PAF3200F 
	ADD CONSTRAINT  PAF3200Q 
	UNIQUE( PU_KEYPRGINVIO , PU_KEYHEADERFATT , PU_KEYBODYFATT ) ; 
  
CREATE TABLE  PAFLD00K (  
	PZNFIL CHAR(10) NOT NULL DEFAULT '' , 
	PZNFLD CHAR(10) NOT NULL DEFAULT '' , 
	PZDFLD CHAR(35) NOT NULL DEFAULT '' , 
	PZNPOS NUMERIC(3, 0) NOT NULL DEFAULT 0 , 
	PZTDAT CHAR(8) NOT NULL DEFAULT '' , 
	PZNLEN NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	PZNDEC NUMERIC(5, 0) NOT NULL DEFAULT 0 , 
	PZDFIL CHAR(50) NOT NULL DEFAULT '' , 
	PZFGES CHAR(1) NOT NULL DEFAULT '' , 
	PZFILL CHAR(255) NOT NULL DEFAULT '' ) ; 
  
CREATE TABLE  PAFW300F ( 
	PW_KEYPRGINVIO CHAR(10) NOT NULL DEFAULT '' , 
	PW_KEYHEADERFATT CHAR(20) NOT NULL DEFAULT '' , 
	PW_KEYBODYFATT CHAR(50) NOT NULL DEFAULT '' , 
	PW_TIPODOC CHAR(4) NOT NULL DEFAULT '' , 
	PW_TIPONUM CHAR(4) NOT NULL DEFAULT '' , 
	PW_NUMERO CHAR(20) NOT NULL DEFAULT '' , 
	PW_DATA DATE NULL, 
	PW_CODSDI CHAR(10) NOT NULL DEFAULT '' , 
	PW_CLIENTE CHAR(10) NOT NULL DEFAULT '' , 
	PW_RAGSOC CHAR(35) NOT NULL DEFAULT '' , 
	PW_PAESE CHAR(2) NOT NULL DEFAULT '' , 
	PW_CODICE CHAR(28) NOT NULL DEFAULT '' , 
	PW_CFISCA CHAR(16) NOT NULL DEFAULT '' , 
	PW_DENOM CHAR(80) NOT NULL DEFAULT '' , 
	PW_NOME CHAR(60) NOT NULL DEFAULT '' , 
	PW_COGN CHAR(60) NOT NULL DEFAULT '' , 
	PW_CDEST CHAR(7) NOT NULL DEFAULT '' , 
	PW_IMPO NUMERIC(15, 2) NOT NULL DEFAULT 0 , 
	PW_FNOT CHAR(1) NOT NULL DEFAULT '' , 
	PW_CXML CHAR(255) NOT NULL DEFAULT '' , 
	PW_CXMLP CHAR(255) NOT NULL DEFAULT '' , 
	PW_UPAG DATE, 
	CONSTRAINT  PAFW300Q PRIMARY KEY( PW_KEYHEADERFATT , PW_KEYBODYFATT , PW_TIPODOC , PW_TIPONUM , PW_NUMERO ) ) ; 
  
CREATE TABLE  PANUM00F ( 
	PJNKEY CHAR(5) NOT NULL DEFAULT '' , 
	PJNINV CHAR(10) NOT NULL DEFAULT '' , 
	PJCPER CHAR(255) NOT NULL DEFAULT '' , 
	PJFILL CHAR(255) NOT NULL DEFAULT '' ) ;

	
	
/*                     INDICI                        */

CREATE INDEX  FPCDD01I 
	ON  FPCDD00F ( PV_AMBIENTE ASC )   
	; 
  
CREATE INDEX  FPCDE01I 
	ON  FPCDE00F ( PX_CODDEST ASC , PX_FISCIVAPAESE ASC , PX_FISCIVACOD ASC , PX_CODFISCALE ASC )   
	; 
  
CREATE INDEX  FPPRO01I 
	ON  FPPRO00F ( PZ_KEYPRGINVIO ASC , PZ_KEYHEADERFATT ASC , PZ_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  FPPRO02I 
	ON  FPPRO00F ( PZ_KEYPRGINVIO ASC , PZ_KEYHEADERFATT ASC , PZ_TIPODOC ASC , PZ_NUMERO ASC , PZ_DATA ASC )   
	; 
  
CREATE INDEX  PAA0101I 
	ON  PAA0100F ( P1_KEYPRGINVIO ASC , [REDACTED] ASC , P1_KEYBODYFATT ASC , P1_DATAORARIC ASC )   
	; 
  
CREATE INDEX  PAA0201I 
	ON  PAA0200F ( P2_KEYPRGINVIO ASC , [REDACTED] ASC , P2_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA0301I 
	ON  PAA0300F ( P3_KEYPRGINVIO ASC , [REDACTED] ASC , P3_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA0401I 
	ON  PAA0400F ( P4_KEYPRGINVIO ASC , [REDACTED] ASC , P4_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA0501I 
	ON  PAA0500F ( P5_KEYPRGINVIO ASC , [REDACTED] ASC , P5_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA0601I 
	ON  PAA0600F ( P6_KEYPRGINVIO ASC , [REDACTED] ASC , P6_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA0701I 
	ON  PAA0700F ( P7_KEYPRGINVIO ASC , [REDACTED] ASC , P7_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA0801I 
	ON  PAA0800F ( P8_KEYPRGINVIO ASC , [REDACTED] ASC , P8_KEYBODYFATT ASC , P8_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAA0901I 
	ON  PAA0900F ( P9_KEYPRGINVIO ASC , [REDACTED] ASC , P9_KEYBODYFATT ASC , P9_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAA1001I 
	ON  PAA1000F ( P0_KEYPRGINVIO ASC , [REDACTED] ASC , P0_KEYBODYFATT ASC , P0_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAA1101I 
	ON  PAA1100F ( PA_KEYPRGINVIO ASC , PA_KEYHEADERFATT ASC , PA_KEYBODYFATT ASC , PA_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAA1201I 
	ON  PAA1200F ( PB_KEYPRGINVIO ASC , PB_KEYHEADERFATT ASC , PB_KEYBODYFATT ASC , PB_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAA1301I 
	ON  PAA1300F ( PC_KEYPRGINVIO ASC , PC_KEYHEADERFATT ASC , PC_KEYBODYFATT ASC , PC_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAA1401I 
	ON  PAA1400F ( PD_KEYPRGINVIO ASC , PD_KEYHEADERFATT ASC , PD_KEYBODYFATT ASC , PD_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAA1501I 
	ON  PAA1500F ( PE_KEYPRGINVIO ASC , PE_KEYHEADERFATT ASC , PE_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA1601I 
	ON  PAA1600F ( PF_KEYPRGINVIO ASC , PF_KEYHEADERFATT ASC , PF_KEYBODYFATT ASC , PF_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAA1701I 
	ON  PAA1700F ( PG_KEYPRGINVIO ASC , PG_KEYHEADERFATT ASC , PG_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA1801I 
	ON  PAA1800F ( PI_KEYPRGINVIO ASC , PI_KEYHEADERFATT ASC , PI_KEYBODYFATT ASC , PI_NUMEROLINEA ASC )   
	; 
  
CREATE INDEX  PAA1901I 
	ON  PAA1900F ( PY_KEYPRGINVIO ASC , PY_KEYHEADERFATT ASC , PY_KEYBODYFATT ASC , PY_KEYNLINEA ASC )   
	; 
  
CREATE INDEX  PAA2001I 
	ON  PAA2000F ( PJ_KEYPRGINVIO ASC , PJ_KEYHEADERFATT ASC , PJ_KEYBODYFATT ASC , PJ_KEYNLINEA ASC , PJ_KEYNLINAR ASC )   
	; 
  
CREATE INDEX  PAA2101I 
	ON  PAA2100F ( PK_KEYPRGINVIO ASC , PK_KEYHEADERFATT ASC , PK_KEYBODYFATT ASC , PK_KEYNLINEA ASC )   
	; 
  
CREATE INDEX  PAA2201I 
	ON  PAA2200F ( PL_KEYPRGINVIO ASC , PL_KEYHEADERFATT ASC , PL_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA2301I 
	ON  PAA2300F ( PM_KEYPRGINVIO ASC , PM_KEYHEADERFATT ASC , PM_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA2401I 
	ON  PAA2400F ( PN_KEYPRGINVIO ASC , PN_KEYHEADERFATT ASC , PN_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA2501I 
	ON  PAA2500F ( PO_KEYPRGINVIO ASC , PO_KEYHEADERFATT ASC , PO_KEYBODYFATT ASC , PO_RIGA ASC )   
	; 
  
CREATE INDEX  PAA2601I 
	ON  PAA2600F ( PP_KEYPRGINVIO ASC , PP_KEYHEADERFATT ASC , PP_KEYBODYFATT ASC , PP_NUMEROLINEA ASC )   
	; 
  
CREATE INDEX  PAA2701I 
	ON  PAA2700F ( PQ_KEYPRGINVIO ASC , PQ_KEYHEADERFATT ASC , PQ_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA2801I 
	ON  PAA2800F ( PR_KEYPRGINVIO ASC , PR_KEYHEADERFATT ASC , PR_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA2901I 
	ON  PAA2900F ( PS_KEYPRGINVIO ASC , PS_KEYHEADERFATT ASC , PS_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA3001I 
	ON  PAA3000F ( PT_KEYPRGINVIO ASC , PT_KEYHEADERFATT ASC , PT_KEYBODYFATT ASC , PT_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAA3101I 
	ON  PAA3100F ( PH_KEYPRGINVIO ASC , PH_KEYHEADERFATT ASC , PH_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAA3201I 
	ON  PAA3200F ( PU_KEYPRGINVIO ASC , PU_KEYHEADERFATT ASC , PU_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0101I 
	ON  PAF0100F ( [REDACTED] ASC , P1_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0102I 
	ON  PAF0100F ( P1_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0103I 
	ON  PAF0100F ( P1_KEYPRGINVIO ASC , [REDACTED] ASC , P1_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0201I 
	ON  PAF0200F ( [REDACTED] ASC , P2_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0301I 
	ON  PAF0300F ( [REDACTED] ASC , P3_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0401I 
	ON  PAF0400F ( [REDACTED] ASC , P4_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0501I 
	ON  PAF0500F ( [REDACTED] ASC , P5_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0601I 
	ON  PAF0600F ( [REDACTED] ASC , P6_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0701I 
	ON  PAF0700F ( [REDACTED] ASC , P7_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0801I 
	ON  PAF0800F ( [REDACTED] ASC , P8_KEYBODYFATT ASC , P8_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF0901I 
	ON  PAF0900F ( [REDACTED] ASC , P9_KEYBODYFATT ASC , P9_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF1001I 
	ON  PAF1000F ( [REDACTED] ASC , P0_KEYBODYFATT ASC , P0_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF1101I 
	ON  PAF1100F ( PA_KEYHEADERFATT ASC , PA_KEYBODYFATT ASC , PA_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF1201I 
	ON  PAF1200F ( PB_KEYHEADERFATT ASC , PB_KEYBODYFATT ASC , PB_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF1301I 
	ON  PAF1300F ( PC_KEYHEADERFATT ASC , PC_KEYBODYFATT ASC , PC_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF1401I 
	ON  PAF1400F ( PD_KEYHEADERFATT ASC , PD_KEYBODYFATT ASC , PD_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF1501I 
	ON  PAF1500F ( PE_KEYHEADERFATT ASC , PE_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF1601I 
	ON  PAF1600F ( PF_KEYHEADERFATT ASC , PF_KEYBODYFATT ASC , PF_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF1701I 
	ON  PAF1700F ( PG_KEYHEADERFATT ASC , PG_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF1801I 
	ON  PAF1800F ( PI_KEYHEADERFATT ASC , PI_KEYBODYFATT ASC , PI_NUMEROLINEA ASC )   
	; 
  
CREATE INDEX  PAF1901I 
	ON  PAF1900F ( PY_KEYHEADERFATT ASC , PY_KEYBODYFATT ASC , PY_KEYNLINEA ASC )   
	; 
  
CREATE INDEX  PAF2001I 
	ON  PAF2000F ( PJ_KEYHEADERFATT ASC , PJ_KEYBODYFATT ASC , PJ_KEYNLINEA ASC , PJ_KEYNLINAR ASC )   
	; 
  
CREATE INDEX  PAF2101I 
	ON  PAF2100F ( PK_KEYHEADERFATT ASC , PK_KEYBODYFATT ASC , PK_KEYNLINEA ASC )   
	; 
  
CREATE INDEX  PAF2201I 
	ON  PAF2200F ( PL_KEYHEADERFATT ASC , PL_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF2301I 
	ON  PAF2300F ( PM_KEYHEADERFATT ASC , PM_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF2401I 
	ON  PAF2400F ( PN_KEYHEADERFATT ASC , PN_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF2501I 
	ON  PAF2500F ( PO_KEYHEADERFATT ASC , PO_KEYBODYFATT ASC , PO_RIGA ASC )   
	; 
  
CREATE INDEX  PAF2601I 
	ON  PAF2600F ( PP_KEYHEADERFATT ASC , PP_KEYBODYFATT ASC , PP_NUMEROLINEA ASC )   
	; 
  
CREATE INDEX  PAF2701I 
	ON  PAF2700F ( PQ_KEYHEADERFATT ASC , PQ_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF2801I 
	ON  PAF2800F ( PR_KEYHEADERFATT ASC , PR_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF2901I 
	ON  PAF2900F ( PS_KEYHEADERFATT ASC , PS_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF3101I 
	ON  PAF3100F ( PH_KEYHEADERFATT ASC , PH_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF3201I 
	ON  PAF3200F ( PU_KEYHEADERFATT ASC , PU_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAFW301L 
	ON  PAFW300F ( PW_KEYHEADERFATT ASC , PW_KEYBODYFATT ASC , PW_TIPODOC ASC , PW_TIPONUM ASC , PW_NUMERO ASC , PW_DATA ASC )   
	;
-- Indici essenziali al funzionamento di Campo
CREATE INDEX  PAF0100F_KEY 
	ON  PAF0100F ( P1_KEYPRGINVIO ASC , [REDACTED] ASC , P1_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0200F_KEY 
	ON  PAF0200F (P2_KEYPRGINVIO ASC , [REDACTED] ASC , P2_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0300F_KEY 
	ON  PAF0300F (P3_KEYPRGINVIO ASC , [REDACTED] ASC , P3_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0400F_KEY 
	ON  PAF0400F (P4_KEYPRGINVIO ASC , [REDACTED] ASC , P4_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0500F_KEY 
	ON  PAF0500F (P5_KEYPRGINVIO ASC , [REDACTED] ASC , P5_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0600F_KEY 
	ON  PAF0600F (P6_KEYPRGINVIO ASC , [REDACTED] ASC , P6_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0700F_KEY
	ON  PAF0700F (P7_KEYPRGINVIO ASC , [REDACTED] ASC , P7_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF0800F_KEY
	ON  PAF0800F (P8_KEYPRGINVIO ASC , [REDACTED] ASC , P8_KEYBODYFATT ASC , P8_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF0900F_KEY
	ON  PAF0900F (P9_KEYPRGINVIO ASC , [REDACTED] ASC , P9_KEYBODYFATT ASC , P9_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF1000F_KEY
	ON  PAF1000F (P0_KEYPRGINVIO ASC , [REDACTED] ASC , P0_KEYBODYFATT ASC , P0_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF1100F_KEY
	ON  PAF1100F (PA_KEYPRGINVIO ASC , PA_KEYHEADERFATT ASC , PA_KEYBODYFATT ASC , PA_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF1200F_KEY
	ON  PAF1200F (PB_KEYPRGINVIO ASC , PB_KEYHEADERFATT ASC , PB_KEYBODYFATT ASC , PB_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF1300F_KEY
	ON  PAF1300F (PC_KEYPRGINVIO ASC , PC_KEYHEADERFATT ASC , PC_KEYBODYFATT ASC , PC_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF1400F_KEY
	ON  PAF1400F (PD_KEYPRGINVIO ASC , PD_KEYHEADERFATT ASC , PD_KEYBODYFATT ASC , PD_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF1500F_KEY
	ON  PAF1500F (PE_KEYPRGINVIO ASC , PE_KEYHEADERFATT ASC , PE_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF1600F_KEY
	ON  PAF1600F (PF_KEYPRGINVIO ASC , PF_KEYHEADERFATT ASC , PF_KEYBODYFATT ASC , PF_RIFNUMLINEA ASC )   
	; 
  
CREATE INDEX  PAF1700F_KEY
	ON  PAF1700F (PG_KEYPRGINVIO ASC , PG_KEYHEADERFATT ASC , PG_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF1800F_KEY
	ON  PAF1800F (PI_KEYPRGINVIO ASC , PI_KEYHEADERFATT ASC , PI_KEYBODYFATT ASC , PI_NUMEROLINEA ASC )   
	; 
  
CREATE INDEX  PAF1900F_KEY
	ON  PAF1900F (PY_KEYPRGINVIO ASC , PY_KEYHEADERFATT ASC , PY_KEYBODYFATT ASC , PY_KEYNLINEA ASC )   
	; 
  
CREATE INDEX  PAF2000F_KEY
	ON  PAF2000F (PJ_KEYPRGINVIO ASC , PJ_KEYHEADERFATT ASC , PJ_KEYBODYFATT ASC , PJ_KEYNLINEA ASC , PJ_KEYNLINAR ASC )   
	; 
  
CREATE INDEX  PAF2100F_KEY
	ON  PAF2100F (PK_KEYPRGINVIO ASC , PK_KEYHEADERFATT ASC , PK_KEYBODYFATT ASC , PK_KEYNLINEA ASC )   
	; 
  
CREATE INDEX  PAF2200F_KEY
	ON  PAF2200F (PL_KEYPRGINVIO ASC , PL_KEYHEADERFATT ASC , PL_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF2300F_KEY
	ON  PAF2300F (PM_KEYPRGINVIO ASC , PM_KEYHEADERFATT ASC , PM_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF2400F_KEY
	ON  PAF2400F (PN_KEYPRGINVIO ASC , PN_KEYHEADERFATT ASC , PN_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF2500F_KEY
	ON  PAF2500F (PO_KEYPRGINVIO ASC , PO_KEYHEADERFATT ASC , PO_KEYBODYFATT ASC , PO_RIGA ASC )   
	; 
  
CREATE INDEX  PAF2600F_KEY
	ON  PAF2600F (PP_KEYPRGINVIO ASC , PP_KEYHEADERFATT ASC , PP_KEYBODYFATT ASC , PP_NUMEROLINEA ASC )   
	; 
  
CREATE INDEX  PAF2700F_KEY
	ON  PAF2700F (PQ_KEYPRGINVIO ASC , PQ_KEYHEADERFATT ASC , PQ_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF2800F_KEY
	ON  PAF2800F (PR_KEYPRGINVIO ASC , PR_KEYHEADERFATT ASC , PR_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF2900F_KEY
	ON  PAF2900F (PS_KEYPRGINVIO ASC , PS_KEYHEADERFATT ASC , PS_KEYBODYFATT ASC )   
	; 

CREATE INDEX  PAF3000F_KEY
	ON PAF3000F (PT_KEYPRGINVIO ASC, PT_KEYHEADERFATT ASC, PT_KEYBODYFATT ASC, PT_RIFNUMLINEA ASC) 
	;

CREATE INDEX  PAF3100F_KEY
	ON  PAF3100F (PH_KEYPRGINVIO ASC , PH_KEYHEADERFATT ASC , PH_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAF3200F_KEY
	ON  PAF3200F (PU_KEYPRGINVIO ASC , PU_KEYHEADERFATT ASC , PU_KEYBODYFATT ASC )   
	; 
  
CREATE INDEX  PAFW300F_KEY
	ON  PAFW300F (PW_KEYPRGINVIO ASC , PW_KEYHEADERFATT ASC , PW_KEYBODYFATT ASC)   
	;
