Aggiornata parte Java per supporto fattura P.A. xml versione 1.1
git-svn-id: svn://10.65.10.50/branches/R_10_00@23044 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
9abac455f4
commit
90547b2a47
BIN
pa/SiaggPA/SSADll.dll
Normal file
BIN
pa/SiaggPA/SSADll.dll
Normal file
Binary file not shown.
BIN
pa/SiaggPA/SSADll64.dll
Normal file
BIN
pa/SiaggPA/SSADll64.dll
Normal file
Binary file not shown.
BIN
pa/SiaggPA/SiaggPACAMPO.jar
Normal file
BIN
pa/SiaggPA/SiaggPACAMPO.jar
Normal file
Binary file not shown.
2
pa/SiaggPA/SiaggPAGUI.bat
Normal file
2
pa/SiaggPA/SiaggPAGUI.bat
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
set path=%PATH%;%USERPROFILE%\SoftwareSirio\SiaggPA
|
||||||
|
java -jar SiaggPACAMPO.jar
|
40
pa/SiaggPA/config.properties
Normal file
40
pa/SiaggPA/config.properties
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
#properties setting for sqllite
|
||||||
|
dbserver=sqllite
|
||||||
|
classForName=org.sqlite.JDBC
|
||||||
|
connectionString=jdbc:sqlite
|
||||||
|
#user=putDBUserHere
|
||||||
|
#password=putDBPasswordHere
|
||||||
|
|
||||||
|
|
||||||
|
#properties setting for AS400
|
||||||
|
#dbserver=as400
|
||||||
|
#classForName=com.ibm.as400.access.AS400JDBCDriver
|
||||||
|
#connectionString=jdbc:as400://IpAs400
|
||||||
|
#user=putDBUserHere
|
||||||
|
#password=putDBPasswordHere
|
||||||
|
|
||||||
|
|
||||||
|
#properties setting for mysql
|
||||||
|
#dbserver=mysql
|
||||||
|
#classForName=com.mysql.jdbc.Driver
|
||||||
|
#connectionString=jdbc:mysql://hostname:port/dbname
|
||||||
|
#user=putDBUserHere
|
||||||
|
#password=putDBPasswordHere
|
||||||
|
|
||||||
|
|
||||||
|
#properties setting for sqlserver
|
||||||
|
#dbserver=sqlserver
|
||||||
|
#classForName=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
#connectionString=jdbc:sqlserver://hostname:port;DatabaseName=databasename
|
||||||
|
#user=putDBUserHere
|
||||||
|
#password=putDBPasswordHere
|
||||||
|
|
||||||
|
|
||||||
|
#properties setting for oracle
|
||||||
|
#dbserver=oracle
|
||||||
|
#classForName=oracle.jdbc.driver.OracleDriver
|
||||||
|
#connectionString=jdbc:oracle:thin:@hostnamet:port:database
|
||||||
|
#user=putDBUserHere
|
||||||
|
#password=putDBPasswordHere
|
||||||
|
|
||||||
|
|
5
pa/SiaggPA/configGUI.properties
Normal file
5
pa/SiaggPA/configGUI.properties
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#File Stored by SiaggPAGUI
|
||||||
|
#Tue May 27 12:36:48 CEST 2014
|
||||||
|
percorso=
|
||||||
|
libas400=
|
||||||
|
raggruppa=
|
BIN
pa/SiaggPA/lib/SiaggPAXCAMPO.jar
Normal file
BIN
pa/SiaggPA/lib/SiaggPAXCAMPO.jar
Normal file
Binary file not shown.
BIN
pa/SiaggPA/lib/commons-codec-1.3.jar
Normal file
BIN
pa/SiaggPA/lib/commons-codec-1.3.jar
Normal file
Binary file not shown.
BIN
pa/SiaggPA/lib/jt400.jar
Normal file
BIN
pa/SiaggPA/lib/jt400.jar
Normal file
Binary file not shown.
BIN
pa/SiaggPA/lib/sqlite-jdbc4-3.8.2-SNAPSHOT.jar
Normal file
BIN
pa/SiaggPA/lib/sqlite-jdbc4-3.8.2-SNAPSHOT.jar
Normal file
Binary file not shown.
BIN
pa/SiaggPA/lib/ssa.jar
Normal file
BIN
pa/SiaggPA/lib/ssa.jar
Normal file
Binary file not shown.
15
pa/SiaggPA/ssa.ini
Normal file
15
pa/SiaggPA/ssa.ini
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# LIVELLO DI DEBUG
|
||||||
|
# 0 = No debug
|
||||||
|
# 1 = Livello ERRORE
|
||||||
|
# 2 = Livello ERRORE + INFO
|
||||||
|
# 3 = Livello ERRORE + INFO + DEBUG
|
||||||
|
SSA-DEBUG=3
|
||||||
|
|
||||||
|
# ATTIVAZIONE MODALITA' CLIENT-SERVER
|
||||||
|
# IP_SERVER:PORTA
|
||||||
|
SSA-PORT=
|
||||||
|
|
||||||
|
#Tempo in secondi dopo il quale un utente puo' essere dichiarato scaduto
|
||||||
|
PING-MAXTIME=300
|
||||||
|
#Tempo in secondi ogni quanto pingare
|
||||||
|
PING-DELAY=60
|
@ -467,7 +467,7 @@ void TPA_mask::fill()
|
|||||||
|
|
||||||
query.cut(0);
|
query.cut(0);
|
||||||
query << "USE 33 KEY 2\nSELECT (BETWEEN(STATO,2,8))";
|
query << "USE 33 KEY 2\nSELECT (BETWEEN(STATO,2,8))";
|
||||||
query << "\nFROM TIPOCF=C CODCF=#CLIENTE PROVV=D ANNO=2014 DATADOC=" << dal.date2ansi()
|
query << "\nFROM TIPOCF=C CODCF=#CLIENTE PROVV=D ANNO=" << dal.year() << " DATADOC=" << dal.date2ansi()
|
||||||
<< "\nTO TIPOCF=C CODCF=#CLIENTE PROVV=D";
|
<< "\nTO TIPOCF=C CODCF=#CLIENTE PROVV=D";
|
||||||
TISAM_recordset doc_pa(query);
|
TISAM_recordset doc_pa(query);
|
||||||
doc_pa.set_var("#CLIENTE", clifo_pa.get(CLI_CODCF));
|
doc_pa.set_var("#CLIENTE", clifo_pa.get(CLI_CODCF));
|
||||||
@ -499,6 +499,7 @@ void TPA_mask::fill()
|
|||||||
row->add(clifo_pa.get(CFV_PADESTIN).as_string());
|
row->add(clifo_pa.get(CFV_PADESTIN).as_string());
|
||||||
row->add(clifo_pa.get(CFV_PARIFAMM).as_string());
|
row->add(clifo_pa.get(CFV_PARIFAMM).as_string());
|
||||||
row->add(clifo_pa.get("20."CLI_COFI).as_string());
|
row->add(clifo_pa.get("20."CLI_COFI).as_string());
|
||||||
|
row->add(clifo_pa.get("20."CLI_SPLITPAY).as_bool() ? "X" : "");
|
||||||
|
|
||||||
sht.add(row);
|
sht.add(row);
|
||||||
}
|
}
|
||||||
@ -742,7 +743,7 @@ bool TDoc2Paf::elabora(TDocumentoEsteso& doc)
|
|||||||
paf0100f.set("P1_TRASMITTPAESE", paese);
|
paf0100f.set("P1_TRASMITTPAESE", paese);
|
||||||
paf0100f.set("P1_TRASMITTCOD", _ditta.partita_IVA());
|
paf0100f.set("P1_TRASMITTCOD", _ditta.partita_IVA());
|
||||||
paf0100f.set("P1_PRGINVIO", ""); // Ci pensa SiAggPA
|
paf0100f.set("P1_PRGINVIO", ""); // Ci pensa SiAggPA
|
||||||
paf0100f.set("P1_FMTTRASMISS", "SDI10");
|
paf0100f.set("P1_FMTTRASMISS", "SDI11"); // SDI11 si usa dal 2015 per lo split payment (prima era SDI10)
|
||||||
|
|
||||||
paf0100f.set("P1_CODDEST", hfatt);
|
paf0100f.set("P1_CODDEST", hfatt);
|
||||||
TString80 tel; tel << firm.get(NDT_PTEL) << firm.get(NDT_TEL);
|
TString80 tel; tel << firm.get(NDT_PTEL) << firm.get(NDT_TEL);
|
||||||
@ -1119,6 +1120,12 @@ bool TDoc2Paf::elabora(TDocumentoEsteso& doc)
|
|||||||
paf2200f.set("PL_KEYBODYFATT", bfatt);
|
paf2200f.set("PL_KEYBODYFATT", bfatt);
|
||||||
paf2200f.remove(); // Cancella tutte le righe di riepilogo IVA
|
paf2200f.remove(); // Cancella tutte le righe di riepilogo IVA
|
||||||
|
|
||||||
|
const char* eiva = "I"; // Esigibilità IVA: Immediata, Differita, Split payment
|
||||||
|
if (doc.is_split_payment())
|
||||||
|
eiva = "S"; else
|
||||||
|
if (doc.get_bool(DOC_LIQDIFF) || doc.get_bool(DOC_IVAXCASSA))
|
||||||
|
eiva = "D";
|
||||||
|
|
||||||
long num_riep = 0;
|
long num_riep = 0;
|
||||||
TAssoc_array& tiva = doc.tabella_iva(false);
|
TAssoc_array& tiva = doc.tabella_iva(false);
|
||||||
FOR_EACH_ASSOC_OBJECT(tiva, obj, key, itm)
|
FOR_EACH_ASSOC_OBJECT(tiva, obj, key, itm)
|
||||||
@ -1135,10 +1142,8 @@ bool TDoc2Paf::elabora(TDocumentoEsteso& doc)
|
|||||||
if (tipo == "ES") natura = "N4"; // Esente
|
if (tipo == "ES") natura = "N4"; // Esente
|
||||||
paf2200f.set("PL_NATURA", natura);
|
paf2200f.set("PL_NATURA", natura);
|
||||||
}
|
}
|
||||||
paf2200f.set("PL_IMPONIBILE", riva.imponibile());
|
paf2200f.set("PL_IMPONIBILE", riva.imponibile());
|
||||||
paf2200f.set("PL_IMPOSTA", riva.imposta());
|
paf2200f.set("PL_IMPOSTA", riva.imposta());
|
||||||
// Esigibilità IVA: immediata o no?
|
|
||||||
const char* eiva = (doc.get_bool(DOC_LIQDIFF) || doc.get_bool(DOC_IVAXCASSA)) ? "D" : "I";
|
|
||||||
paf2200f.set("PL_ESIGIVA", eiva);
|
paf2200f.set("PL_ESIGIVA", eiva);
|
||||||
paf2200f.set("PL_RIFNORMATIVO", riva.cod_iva().descrizione());
|
paf2200f.set("PL_RIFNORMATIVO", riva.cod_iva().descrizione());
|
||||||
paf2200f.set("PL_GESTIONE", "D");
|
paf2200f.set("PL_GESTIONE", "D");
|
||||||
@ -1287,6 +1292,22 @@ bool TDoc2Paf::genera_xml()
|
|||||||
tmp = PABASE"\\SiaggPACAMPO.jar";
|
tmp = PABASE"\\SiaggPACAMPO.jar";
|
||||||
tmp.make_absolute_path();
|
tmp.make_absolute_path();
|
||||||
|
|
||||||
|
const int ssa_err = xvt_dongle_sa_test("FATTPA.pa");
|
||||||
|
if (ssa_err != 0)
|
||||||
|
{
|
||||||
|
TString80 msg;
|
||||||
|
switch (ssa_err)
|
||||||
|
{
|
||||||
|
case -100: msg = TR("File .ssa non valido o non trovato"); break;
|
||||||
|
case -101: msg = TR("Prodotto non trovato"); break;
|
||||||
|
case -103: msg = TR("Prodotto scaduto"); break;
|
||||||
|
case -201: msg = TR("Modulo non trovato"); break;
|
||||||
|
case -203: msg = TR("Modulo scaduto"); break;
|
||||||
|
default : break;
|
||||||
|
}
|
||||||
|
warning_box(FR("Non risulta attivo il modulo 'pa' del prodotto 'FATTPA'.\nErrore %d: %s"), ssa_err, (const char*)msg);
|
||||||
|
}
|
||||||
|
|
||||||
DIRECTORY old_dir; xvt_fsys_get_dir(&old_dir);
|
DIRECTORY old_dir; xvt_fsys_get_dir(&old_dir);
|
||||||
DIRECTORY new_dir; xvt_fsys_convert_str_to_dir(tmp.path(), &new_dir);
|
DIRECTORY new_dir; xvt_fsys_convert_str_to_dir(tmp.path(), &new_dir);
|
||||||
xvt_fsys_set_dir(&new_dir);
|
xvt_fsys_set_dir(&new_dir);
|
||||||
@ -1337,8 +1358,6 @@ void TDoc2Paf::main_loop()
|
|||||||
ndocs = 0;
|
ndocs = 0;
|
||||||
FOR_EACH_ARRAY_ROW(sht, r, riga)
|
FOR_EACH_ARRAY_ROW(sht, r, riga)
|
||||||
{
|
{
|
||||||
if (!pi.add_status(1))
|
|
||||||
break;
|
|
||||||
if (riga->starts_with("X"))
|
if (riga->starts_with("X"))
|
||||||
{
|
{
|
||||||
const int anno = riga->get_int(1);
|
const int anno = riga->get_int(1);
|
||||||
@ -1348,6 +1367,8 @@ void TDoc2Paf::main_loop()
|
|||||||
if (elabora(key))
|
if (elabora(key))
|
||||||
ndocs++;
|
ndocs++;
|
||||||
}
|
}
|
||||||
|
if (!pi.add_status(1))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
message_box(FR("Sono stati elaborati %d documenti"), ndocs);
|
message_box(FR("Sono stati elaborati %d documenti"), ndocs);
|
||||||
if (ndocs > 0)
|
if (ndocs > 0)
|
||||||
|
@ -12,4 +12,5 @@
|
|||||||
#define S_UFFICIO 108
|
#define S_UFFICIO 108
|
||||||
#define S_RIFAMM 109
|
#define S_RIFAMM 109
|
||||||
#define S_COFI 110
|
#define S_COFI 110
|
||||||
|
#define S_SPLITPAY 111
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ BEGIN
|
|||||||
ITEM "Ufficio"
|
ITEM "Ufficio"
|
||||||
ITEM "Riferimento\nAmministrazione@20"
|
ITEM "Riferimento\nAmministrazione@20"
|
||||||
ITEM "Codice Fiscale@16"
|
ITEM "Codice Fiscale@16"
|
||||||
|
ITEM "Scissione\nPagamenti@9"
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
@ -97,6 +98,12 @@ BEGIN
|
|||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BOOLEAN S_SPLITPAY
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 6 "Assogettato scissione pagamenti art.17 ter DPR 633/72"
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
TOOLBAR "Documento" 0 0 0 2
|
TOOLBAR "Documento" 0 0 0 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user