da confermare
STDDTPTS = Stampa DDT da pulito con Touch Screen
STDICITURA = Stampa dicitura
diff --git a/exe/recdesc/d171.des b/exe/recdesc/d171.des
index e2d8c9637..cf3c1de1c 100644
--- a/exe/recdesc/d171.des
+++ b/exe/recdesc/d171.des
@@ -7,6 +7,7 @@ DATAREGP = Data pagamento
IMPONIBILE = Imponibile
IMPORTO = Importo
IMPOSTA = Imposta
+INDETR = Riga di IVA indetraibile
MESELIQ = Mese liquidazione
NUMPRO = Numero progressivo PAG o NC
NUMREG = Numero operazione Fattura
diff --git a/exe/recdesc/d20.des b/exe/recdesc/d20.des
index 208976f43..23121fdc1 100644
--- a/exe/recdesc/d20.des
+++ b/exe/recdesc/d20.des
@@ -42,7 +42,7 @@ NUMCC = Numero di conto corrente
OCCAS = Cliente / fornitore occasionale
OGGETTI = Link ad oggetti esterni
PAIV = Partita IVA
-PEC = Missing description
+PEC = Indirizzo di posta elettronica certificato
PFAX = Prefisso del numero di FAX
PTEL = Prefisso del numero di telefono
PTEL2 = Prefisso del 2 numero di telefono
diff --git a/exe/recdesc/d21.des b/exe/recdesc/d21.des
index c40ac4f10..93cd6d741 100644
--- a/exe/recdesc/d21.des
+++ b/exe/recdesc/d21.des
@@ -9,8 +9,12 @@ GRUPPO = Gruppo
NUMULTMOV = Numero operazione dell'ultimo movimento
PAVERE = Progressivo avere
PAVEREPRO = Progressivo avere movimenti provvisori
+PAVEREPROB = Progressivo avere movimenti provvisori bilancio costi ricavi
+PAVEREPROC = Progressivo avere movimenti provvisori cespiti
PDARE = Progressivo dare
PDAREPRO = Progressivo dare movimenti provvisori
+PDAREPROB = Progressivo dare movimenti provvisori bilancio costi ricavi
+PDAREPROC = Progressivo dare movimenti provvisori cespiti
SALDO = Saldo iniziale
SALDOFIN = Saldo di chiusura
SOTTOCONTO = Sottoconto
diff --git a/exe/recdesc/d23.des b/exe/recdesc/d23.des
index 8b9c8b963..c91ef9b5b 100644
--- a/exe/recdesc/d23.des
+++ b/exe/recdesc/d23.des
@@ -4,6 +4,7 @@ ANNOFE = Anno invio definitivo dati rilevanti
ANNOIVA = Anno IVA
CAMBIO = Cambio della valuta
CAMBIOI = Cambio della valuta intra-comunitaria
+CFBOLLADOG = Codice fornitore a cui riferita la bolla doganale
CODCAUS = Codice causale
CODCF = Codice
CODPAG = Codice pagamento
@@ -17,6 +18,7 @@ DANNO = Documento originale ANNO
DATA74TER = Data per art. 74 ter
DATACAM = Data del cambio
DATACOMP = Data competenza
+DATACOMPCR = Data competenza costi/ricavi
DATACOMPI = Data di competenza intra-comunitaria
DATADOC = Data documento
DATAINC = Data di incasso per liquidazione differita
@@ -29,10 +31,13 @@ DPROVV = Documento originale PROVV
INVIATO = Inviato ad altra contabilit
INVIOFE = Data invio definitivo dati rilevanti
INVIVA = Inviata la parte IVA ad altra contabilita'
+IVALIQ = Iva per cassa liquidata completamente
IVAXCASSA = Flag di movimento IVA per cassa
+KEYFPPRO = Chiave FpPro
LIQDIFF = Flag di movimento a liquidazione differita
MESELIQ = Mese per liquidazione differita
MODPAG = Modalit di pagamento 1=Non frazionato; 2=Frazionato; 3=Periodico
+MOVCOLL = Movimento collegato
NOLEGGIO = Tipo veicolo Auto, Camper, Altro, Diporto, aEreo
NUMDOC = Numero documento
NUMDOCEXT = Numero documento esteso
@@ -41,15 +46,18 @@ NUMREG = Numero di operazione
NUMRETT = Numero documento rettificato
OCFPI = Codice cliente / fornitore occasionale
PROTIVA = Numero di protocollo IVA
-PROVVIS = Tipo movimento (" " Normale, "P" Provvisorio cancellabile, "C" Provvisorio cespiti)
+PROVVIS = Tipo movimento (< > Normale, Provvisorio cancellabile, cespiti, bilancio costi/ricavi
REG = Codice registro IVA
REGST = Stampato su registro IVA
REVCHARGE = Reverse charge
+RITFATT = Fattura in ritardo
RITFIS = Ritenute fiscali
RITSOC = Ritenute sociali
SCARCON = Scaricata la contabilit
SPLITPAY = Flag di scissione pagamenti [_=Auto,S=Split,N=Normale]
STAMPATO = Stampato su giornale
+TFDATA = Data ultimo invio Trasferimento Fatture
+TFINVIO = Flag Invio Trasferimento Fatture
TIPO = Tipo liente o ornitore
TIPODOC = Tipo documento
TIPOMOV = Tipo movimento
diff --git a/exe/recdesc/d26.des b/exe/recdesc/d26.des
index 995766ea8..bda3f4a97 100644
--- a/exe/recdesc/d26.des
+++ b/exe/recdesc/d26.des
@@ -7,6 +7,7 @@ CODCAUSIM = Codice causale incasso immediato
COLLCESP = Collegamnto ai cespiti
CONTIND = Causale per contabilit industriale
DATADOC = Data documento
+DATAREGPR = Data di registrazion nell'ereserciozio precedente per il caso del campo precedente
DESCR = Descrizione causale
INTRACOM = Movimento intra-comunitario
LIQDIFF = Fatture a liquidazione differita
@@ -20,7 +21,8 @@ NUMDOC = Numero documento
PROVV = Tipo movimento (" " Normale, "P" Provvisorio cancellabile, "C" Provvisorio da cepiti)
REG = Codice registro
REGSPIVA = Regimi speciali IVA
-RITFATT =
+RILFTEMRI = Causale di rilevazione fatture de emettere o ricevere
+RITFATT = Fattura in ritardo
SOLOIVA = Movimento di sola IVA
SOSPESO = Causale sospesa
TIPODOC = Tipo documento
diff --git a/exe/recdesc/d3.des b/exe/recdesc/d3.des
index 136567b95..7c483afa4 100644
--- a/exe/recdesc/d3.des
+++ b/exe/recdesc/d3.des
@@ -22,6 +22,7 @@ D1 =
D2 =
D3 =
D4 =
+DATAAGG =
FPC =
I0 =
I1 =
@@ -66,6 +67,7 @@ R30 =
R31 =
R32 =
R33 =
+R34 =
R4 =
R5 =
R6 =
@@ -76,6 +78,9 @@ S0 =
S1 =
S10 =
S11 =
+S12 =
+S13 =
+S14 =
S2 =
S3 =
S4 =
@@ -84,4 +89,5 @@ S6 =
S7 =
S8 =
S9 =
+UTENTE =
diff --git a/exe/recdesc/d33.des b/exe/recdesc/d33.des
index 1b0385af2..1a7720cf2 100644
--- a/exe/recdesc/d33.des
+++ b/exe/recdesc/d33.des
@@ -93,6 +93,7 @@ TARA = Tara
TIPOCF = Tipo liente ornitore
TIPOCFFATT = Tipo liente ornitore cui fatturare
TIPODOC = Tipo documento
+TIPODOCSDI = Tido documento secondo Agenzia delle Entrate
UMPNETTO = Unit di misura per il peso netto
UMTARA = Unit di misura per la tara
UTENTE = Utente ultimo aggiornamento
diff --git a/exe/recdesc/d4.des b/exe/recdesc/d4.des
index 6286a4608..7c483afa4 100644
--- a/exe/recdesc/d4.des
+++ b/exe/recdesc/d4.des
@@ -78,6 +78,9 @@ S0 =
S1 =
S10 =
S11 =
+S12 =
+S13 =
+S14 =
S2 =
S3 =
S4 =
diff --git a/exe/recdesc/d5.des b/exe/recdesc/d5.des
index 6286a4608..7c483afa4 100644
--- a/exe/recdesc/d5.des
+++ b/exe/recdesc/d5.des
@@ -78,6 +78,9 @@ S0 =
S1 =
S10 =
S11 =
+S12 =
+S13 =
+S14 =
S2 =
S3 =
S4 =
diff --git a/exe/recdesc/d6.des b/exe/recdesc/d6.des
index 58c212b66..f8f92e731 100644
--- a/exe/recdesc/d6.des
+++ b/exe/recdesc/d6.des
@@ -45,6 +45,7 @@ STATOPAIV =
STATORES =
TELRF =
TIPOA =
+TIPORFSO = Definisce se la persona un appr. Fiscale, tabile Organizzazione o nessuno dei due
TIPOSTDEL =
TITCF =
TLEXRFX =
@@ -52,6 +53,7 @@ UFFCONC =
UFFIIDD =
UFFIVA =
UFFUUE =
+UTENTE =
VARDF =
VARSLORES =
diff --git a/exe/recdesc/d9.des b/exe/recdesc/d9.des
index bf00652e7..558225e7c 100644
--- a/exe/recdesc/d9.des
+++ b/exe/recdesc/d9.des
@@ -10,6 +10,7 @@ CESSIVA = Cessata attivita' o variata partita IVA
CODANAGR =
CODATTPREV =
CODDITTA =
+CODRFSO = Codice Rappresentante Fiscale/Stabile Organizzazione
CODSOGDEL = Codice del soggetto delegato
CODSTAT1 =
CODSTAT2 =
@@ -18,6 +19,7 @@ COMAA =
CONDFAM =
CONTORD =
DATAISCRAA =
+DATARFSO = Data immissione valore
DATLAV =
DECCARINT =
DEDART13 =
diff --git a/exe/recdesc/f109.dir b/exe/recdesc/f109.dir
index e6c0ca675..86ff32ae7 100644
--- a/exe/recdesc/f109.dir
+++ b/exe/recdesc/f109.dir
@@ -1,3 +1,3 @@
109
0
-$mag|0|0|692|0|Giacenze di magazzino|||
+$mag|38313|38313|692|0|Giacenze di magazzino|||
diff --git a/exe/recdesc/f109.trr b/exe/recdesc/f109.trr
index a26ba4eb5..0a172c4f4 100644
--- a/exe/recdesc/f109.trr
+++ b/exe/recdesc/f109.trr
@@ -47,6 +47,7 @@ USER5|4|15|5|campo definito dall'utente
USERVAL5|4|18|3|valore
USER6|4|15|5|campo definito dall'utente
USERVAL6|4|18|3|valore
-2
+3
ANNOES+CODART+NRIGA|
ANNOES+CODMAG+CODART+LIVELLO|X
+ANNOES+CODMAG+LIVELLO|X
diff --git a/exe/recdesc/f120.dir b/exe/recdesc/f120.dir
index ef5c7cd37..6948f0058 100644
--- a/exe/recdesc/f120.dir
+++ b/exe/recdesc/f120.dir
@@ -1,3 +1,3 @@
120
1
-m770/quadrodb|0|0|117|4|Quadro D bis 770|||
+m770/quadrodb|0|0|118|0|Quadro D bis 770|||
diff --git a/exe/recdesc/f120.trr b/exe/recdesc/f120.trr
index 116e7ab0b..fdb310434 100644
--- a/exe/recdesc/f120.trr
+++ b/exe/recdesc/f120.trr
@@ -5,7 +5,7 @@ TIPOA|1|1|0|Tipo anagrafica (Sempre 'F')
CODANAGR|3|5|0|Codice anagrafica
NPROG|2|4|0|Numero progressivo di riga
CODCAUS|9|2|0|Codice causale
-CAUSALE|1|1|0|15 - Causale
+CAUSALE|1|2|0|15 - Causale
TOTALE|4|18|0|16 - Ammontare lordo corrisposto
SOMME|4|18|0|17 - Somme non soggette a ritenuta
IMPONIBILE|4|18|0|19 - Imponibile
diff --git a/exe/recdesc/f20.dir b/exe/recdesc/f20.dir
index a6f8bd30d..4e005c3b5 100644
--- a/exe/recdesc/f20.dir
+++ b/exe/recdesc/f20.dir
@@ -1,3 +1,3 @@
20
0
-$clifo|774|774|875|0|Clienti/Fornitori|||
+$clifo|||905|0|Clienti/Fornitori|||
diff --git a/exe/recdesc/f20.trr b/exe/recdesc/f20.trr
index 4b9c2a166..64e8deec5 100644
--- a/exe/recdesc/f20.trr
+++ b/exe/recdesc/f20.trr
@@ -34,7 +34,7 @@ PTELEX|1|10|0|Prefisso del numero di TELEX
TELEX|1|30|0|Prefisso del numero di TELEX
MAIL|1|50|0|Indirizzo di posta elettronica generico
BYMAIL|8|1|0|Consenso all' invio dei documenti per posta elettronica
-PEC|1|50|0|Indirizzo di posta elettronica certificato
+PEC|1|80|0|Indirizzo di posta elettronica certificato
DOCMAIL|1|50|0|Indirizzo di posta elettronica per i documenti
DATANASC|5|8|0|Data di nascita
STATONASC|2|3|0|Codice stato di nascita
@@ -64,10 +64,10 @@ ENTE|1|4|0|Codice ente pubblico di appartenenza (Dipendente Pubblico)
SPLITPAY|8|1|0|Ente pubblico soggetto a split payment
UTENTE|1|32|0|Utente dell'ultima modifica
DATAAGG|5|8|0|Data ultima modifica
-CODRFSO|1|6|0|Codice Rappresentate Fisc/Stabile Org
-DATARFSO|5|8|0|Data Rappresentate Fisc/Stabile Org
-INIFATTEL|5|8|0|Data inizio fatturazione elettronica
-INIREVCHG|5|8|0|Data inizio reverse charge
+CODRFSO|1|6|0|Missing description
+DATARFSO|5|8|0|Missing description
+INIFATTEL|5|8|0|Missing description
+INIREVCHG|5|8|0|Missing description
6
TIPOCF+CODCF|
TIPOCF+UPPER(RAGSOC)|X
diff --git a/exe/recdesc/f21.dir b/exe/recdesc/f21.dir
index 954c6a0e2..fff204ad0 100644
--- a/exe/recdesc/f21.dir
+++ b/exe/recdesc/f21.dir
@@ -1,3 +1,3 @@
21
0
-$saldi|||143|0|Saldi|||
+$saldi|||215|0|Saldi|||
diff --git a/exe/recdesc/f21.trr b/exe/recdesc/f21.trr
index 739382832..c35355e5a 100644
--- a/exe/recdesc/f21.trr
+++ b/exe/recdesc/f21.trr
@@ -1,5 +1,5 @@
21
-15
+19
ANNOES|9|4|0|Codice esercizio
GRUPPO|2|3|0|Gruppo
CONTO|2|3|0|Conto
@@ -13,6 +13,10 @@ PDARE|4|18|3|Progressivo dare
PAVERE|4|18|3|Progressivo avere
PDAREPRO|4|18|3|Progressivo dare movimenti provvisori
PAVEREPRO|4|18|3|Progressivo avere movimenti provvisori
+PDAREPROB|4|18|3|Progressivo dare movimenti provvisori bilancio costi ricavi
+PAVEREPROB|4|18|3|Progressivo avere movimenti provvisori bilancio costi ricavi
+PDAREPROC|4|18|3|Progressivo dare movimenti provvisori cespiti
+PAVEREPROC|4|18|3|Progressivo avere movimenti provvisori cespiti
DATAULMOV|5|8|0|Data ultimo movimento
NUMULTMOV|3|7|0|Numero operazione dell'ultimo movimento
3
diff --git a/exe/recdesc/f3.dir b/exe/recdesc/f3.dir
index bfa97a835..21d77491f 100644
--- a/exe/recdesc/f3.dir
+++ b/exe/recdesc/f3.dir
@@ -1,3 +1,3 @@
3
1
-%tabgen|0|0|1181|0|Tabelle di studio|50||
+%tabgen|0|0|1285|0|Tabelle di studio|50||
diff --git a/exe/recdesc/f3.trr b/exe/recdesc/f3.trr
index 631975380..886bb94db 100644
--- a/exe/recdesc/f3.trr
+++ b/exe/recdesc/f3.trr
@@ -1,5 +1,5 @@
3
-86
+91
COD|1|3|0|
CODTAB|1|25|0|
S0|1|70|0|
@@ -14,6 +14,9 @@ S8|1|5|0|
S9|1|5|0|
S10|1|5|0|
S11|1|5|0|
+S12|1|5|0|
+S13|1|70|0|
+S14|1|5|0|
I0|3|7|0|
I1|3|7|0|
I2|3|7|0|
@@ -59,11 +62,11 @@ R26|4|18|5|
R27|4|18|5|
R28|4|18|5|
R29|4|18|5|
-R29|4|18|5|
R30|4|18|5|
R31|4|18|5|
R32|4|18|5|
R33|4|18|5|
+R34|4|18|5|
D0|5|8|0|
D1|5|8|0|
D2|5|8|0|
@@ -85,6 +88,8 @@ B12|8|1|0|
B13|8|1|0|
B14|8|1|0|
B15|8|1|0|
+DATAAGG|5|8|0|
+UTENTE|1|16|0|
FPC|8|1|0|
2
COD+CODTAB|
diff --git a/exe/recdesc/f39.dir b/exe/recdesc/f39.dir
index b1f9921b5..3ec246a9f 100644
--- a/exe/recdesc/f39.dir
+++ b/exe/recdesc/f39.dir
@@ -1,3 +1,3 @@
39
1
-m770/schper|0|0|193|0|Schede percipienti|#9||
+m770/schper|0|0|194|0|Schede percipienti|#9||
diff --git a/exe/recdesc/f39.trr b/exe/recdesc/f39.trr
index 85a3f8215..c9a872e3e 100644
--- a/exe/recdesc/f39.trr
+++ b/exe/recdesc/f39.trr
@@ -16,7 +16,7 @@ TOTRIT|4|18|2|Totale ritenute (collegamento contabilit
RITSOC|4|18|2|Ritenute sociali (collegamento contabilit)
MESEC|2|2|0|Mese competenza
ANNOC|2|4|0|Anno competenza
-CAUSQUA|7|1|0|Causale quadro
+CAUSQUA|1|2|0|Causale quadro
FLAGTS|7|1|0|Flag T.S.
RITOPE|4|18|2|Ritenute operate
RITVER|4|18|2|Ritenute versate
diff --git a/exe/recdesc/f4.dir b/exe/recdesc/f4.dir
index 26ed68cf0..2e04936ab 100644
--- a/exe/recdesc/f4.dir
+++ b/exe/recdesc/f4.dir
@@ -1,3 +1,3 @@
4
1
-%tabcom|0|0|1210|0|Tabelle comuni|1500||
+%tabcom|0|0|1285|0|Tabelle comuni|1500||
diff --git a/exe/recdesc/f4.trr b/exe/recdesc/f4.trr
index bebb2871c..d5d69ef69 100644
--- a/exe/recdesc/f4.trr
+++ b/exe/recdesc/f4.trr
@@ -1,5 +1,5 @@
4
-89
+91
COD|1|3|0|
CODTAB|1|25|0|
S0|1|70|0|
@@ -15,6 +15,8 @@ S9|1|5|0|
S10|1|5|0|
S11|1|5|0|
S12|1|5|0|
+S13|1|70|0|
+S14|1|5|0|
I0|3|7|0|
I1|3|7|0|
I2|3|7|0|
diff --git a/exe/recdesc/f5.dir b/exe/recdesc/f5.dir
index a60807a80..2d2b15a27 100644
--- a/exe/recdesc/f5.dir
+++ b/exe/recdesc/f5.dir
@@ -1,3 +1,3 @@
5
0
-$tab|0|0|1197|0|Tabelle ditta|400||
+$tab|3666|3666|1285|0|Tabelle ditta|400||
diff --git a/exe/recdesc/f5.trr b/exe/recdesc/f5.trr
index 1b8c89633..bcef5f3d4 100644
--- a/exe/recdesc/f5.trr
+++ b/exe/recdesc/f5.trr
@@ -1,5 +1,5 @@
5
-88
+91
COD|1|3|0|
CODTAB|1|25|0|
S0|1|70|0|
@@ -14,6 +14,9 @@ S8|1|5|0|
S9|1|5|0|
S10|1|5|0|
S11|1|5|0|
+S12|1|5|0|
+S13|1|70|0|
+S14|1|5|0|
I0|3|7|0|
I1|3|7|0|
I2|3|7|0|
diff --git a/exe/recdesc/f61.dir b/exe/recdesc/f61.dir
index 5026ee525..23a90c790 100644
--- a/exe/recdesc/f61.dir
+++ b/exe/recdesc/f61.dir
@@ -1,3 +1,3 @@
61
1
-m770/quadroc|||192|0|Quadro C 770|||
+m770/quadroc|0|0|193|0|Quadro C 770|||
diff --git a/exe/recdesc/f61.trr b/exe/recdesc/f61.trr
index 1cbdfafb6..b995f483c 100644
--- a/exe/recdesc/f61.trr
+++ b/exe/recdesc/f61.trr
@@ -7,7 +7,7 @@ NPROG|2|4|0|Numero progressivo
GENERATA|8|1|0|Riga generata dalle schede
CODCAUS|9|2|0|Codice causale
PERC|4|6|2|Aliquota applicata
-CAUSALE|1|1|0|11 - Causale quadro C
+CAUSALE|1|2|0|11 - Causale quadro C
TASSAZIONE|6|1|0|12 - Tassazione operata
AMMLORDO|4|18|0|13 - Ammontare lordo corrisposto
CONTROBB|4|18|0|14 - Contributi obbligatori
diff --git a/exe/recdesc/f62.dir b/exe/recdesc/f62.dir
index 258c9f1c6..79917a168 100644
--- a/exe/recdesc/f62.dir
+++ b/exe/recdesc/f62.dir
@@ -1,3 +1,3 @@
62
1
-m770/quadrod|0|0|116|4|Quadro D 770|||
+m770/quadrod|0|0|117|0|Quadro D 770|||
diff --git a/exe/recdesc/f62.trr b/exe/recdesc/f62.trr
index c78d1f625..5d751acd2 100644
--- a/exe/recdesc/f62.trr
+++ b/exe/recdesc/f62.trr
@@ -5,7 +5,7 @@ TIPOA|1|1|0|Tipo anagrafica (Sempre 'F')
CODANAGR|3|5|0|Codice anagrafica
NPROG|2|4|0|Numero progressivo di riga
CODCAUS|9|2|0|Codice causale
-CAUSALE|1|1|0|15 - Causale
+CAUSALE|1|2|0|15 - Causale
TOTALE|4|18|2|16 - Ammontare lordo corrisposto
SOMME|4|18|2|17 - Somme non soggette a ritenuta
IMPONIBILE|4|18|2|19 - Imponibile
diff --git a/exe/recdesc/f63.dir b/exe/recdesc/f63.dir
index f27113c8e..eed0cdf94 100644
--- a/exe/recdesc/f63.dir
+++ b/exe/recdesc/f63.dir
@@ -1,3 +1,3 @@
63
1
-m770/quadrod1|0|0|116|4|Quadro D1 770|||
+m770/quadrod1|0|0|117|0|Quadro D1 770|||
diff --git a/exe/recdesc/f63.trr b/exe/recdesc/f63.trr
index 2be9bd91d..6551152e1 100644
--- a/exe/recdesc/f63.trr
+++ b/exe/recdesc/f63.trr
@@ -5,7 +5,7 @@ TIPOA|1|1|0|Tipo anagrafica (sempre 'F')
CODANAGR|3|5|0|Codice anagrafica
NPROG|2|4|0|Numero progrssivo riga
CODCAUS|9|2|0|Codice causale
-CAUSALE|7|1|0|11 - Causale
+CAUSALE|1|2|0|11 - Causale
TOTALE|4|18|2|12 - Ammontare lordo corrisposto
QUOTAPRO|4|18|2|14 - Quota provvigioni
SPESEANT|4|18|2|13 - Spese anticipate
diff --git a/exe/recdesc/f64.dir b/exe/recdesc/f64.dir
index ecd2e9c18..c7d919879 100644
--- a/exe/recdesc/f64.dir
+++ b/exe/recdesc/f64.dir
@@ -1,3 +1,3 @@
64
1
-m770/quadroe|||98|0|Quadro E 770|||
+m770/quadroe|0|0|99|0|Quadro E 770|||
diff --git a/exe/recdesc/f64.trr b/exe/recdesc/f64.trr
index d2dc35416..45dfdc2ed 100644
--- a/exe/recdesc/f64.trr
+++ b/exe/recdesc/f64.trr
@@ -5,7 +5,7 @@ TIPOA|1|1|0|Natura giuridica del percipiente
CODANAGR|3|5|0|Codice anagrafico
NPROG|2|4|0|Numero progressivo di riga
CODCAUS|9|2|0|Codice causale
-CAUSALE|7|1|0|11 - Causale quadro
+CAUSALE|1|2|0|11 - Causale quadro
IMPONIBILE|4|18|2|12 - Imponibile corrisposto
PERC|4|6|2|13 - Aliquota
IMPORTO|4|18|2|14 - Ritenute operate
diff --git a/exe/recdesc/f65.dir b/exe/recdesc/f65.dir
index bddcfc0cf..3954da404 100644
--- a/exe/recdesc/f65.dir
+++ b/exe/recdesc/f65.dir
@@ -1,3 +1,3 @@
65
1
-m770/quadroe1|||98|0|Quadro E1 770|||
+m770/quadroe1|0|0|99|0|Quadro E1 770|||
diff --git a/exe/recdesc/f65.trr b/exe/recdesc/f65.trr
index 72d36a0e7..df8bddd27 100644
--- a/exe/recdesc/f65.trr
+++ b/exe/recdesc/f65.trr
@@ -5,7 +5,7 @@ TIPOA|1|1|0|Natura giuridica
CODANAGR|3|5|0|Codice anagrafica
NPROG|2|4|0|Numero progrssivo i riga
CODCAUS|9|2|0|Codice causale
-CAUSALE|7|1|0|11 - Causale quadro
+CAUSALE|1|2|0|11 - Causale quadro
SOMME|4|18|2|12 - Somme corrisposte
AMMONTARE|4|18|2|13 - Ammontare complessivo dei premi riscossi
PERC|4|6|2|14 - Aliquota
diff --git a/exe/servers/servers.ini b/exe/servers/servers.ini
index bac3714bb..aae84f4ad 100644
--- a/exe/servers/servers.ini
+++ b/exe/servers/servers.ini
@@ -24,6 +24,6 @@ LogVerbose=
PingFreq=
[Spotlite]
-Data(0) = f:\clienti\Bellegotti\spotlite
+Data(0) = h:\e\dati\din\spotlite
Study(0) =
diff --git a/exe/setup/oem.ini b/exe/setup/oem.ini
index 8a75e0661..ceacffb14 100644
--- a/exe/setup/oem.ini
+++ b/exe/setup/oem.ini
@@ -1,5 +1,5 @@
[MAIN]
-OEM = 1
+OEM = 2
[OEM_0]
Administrator =
diff --git a/exe/xi.dll b/exe/xi.dll
index e4bc12d0e..aca54f781 100644
Binary files a/exe/xi.dll and b/exe/xi.dll differ
diff --git a/exe/xvaga.dll b/exe/xvaga.dll
index a1b5b4687..eb221d78d 100644
Binary files a/exe/xvaga.dll and b/exe/xvaga.dll differ
diff --git a/src/ba/bastiva.rep b/src/ba/bastiva.rep
index ec2628a52..d212b14c1 100755
--- a/src/ba/bastiva.rep
+++ b/src/ba/bastiva.rep
@@ -1,99 +1,102 @@
-
+
-
-
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
-
-
-
-
+
+
+
+
CODTAB
-
+
S0
-
+
R0
-
+
S12
-
+
S1
@@ -103,20 +106,20 @@
-
-
+
+
S2
-
+
S9
-
+
S10
-
+
S11
-
+
S6
@@ -127,10 +130,10 @@
-
+
I0
-
+
S3
@@ -139,7 +142,7 @@
-
+
S4
@@ -148,7 +151,7 @@
-
+
S5
@@ -159,34 +162,37 @@
-
+
B3
-
+
B4
-
+
B2
-
+
+ B8
+
+
B6
-
+
B7
-
+
-
-
-
+
+
+
#SYSTEM.DATE
-
+
#PAGE
-
+
-
+
USE %IVA
FROM CODTAB=#FROM
TO CODTAB=#TO
diff --git a/src/ba/batbiva.h b/src/ba/batbiva.h
index 4dd8920c2..fb9c29a5a 100755
--- a/src/ba/batbiva.h
+++ b/src/ba/batbiva.h
@@ -27,3 +27,4 @@
#define CHK_TABIVA_B5 128
#define FLD_NUM_B6 129
#define FLD_DEN_B7 130
+#define FLD_DEN_B8 131
diff --git a/src/ba/batbiva.uml b/src/ba/batbiva.uml
index 3da9e088c..bdbd4447f 100755
--- a/src/ba/batbiva.uml
+++ b/src/ba/batbiva.uml
@@ -340,9 +340,15 @@ BEGIN
FIELD B7
END
+BOOLEAN FLD_DEN_B8
+BEGIN
+ PROMPT 3 22 "Reverse charge attivo"
+ FIELD B8
+END
+
BOOLEAN FLD_SOSPESO_B2
BEGIN
- PROMPT 3 22 "Codice IVA sospeso"
+ PROMPT 3 23 "Codice IVA sospeso"
FIELD B2
END
diff --git a/src/crpa/crpa0.cpp b/src/crpa/crpa0.cpp
index c40cda5b5..37c6cb0cc 100755
--- a/src/crpa/crpa0.cpp
+++ b/src/crpa/crpa0.cpp
@@ -15,6 +15,7 @@
#include "../ca/movana.h"
#include "../ca/rmovana.h"
+#include "../cg/cglib03.h"
// Fine del comando sql con separatore magico per crpa.exe
#define SQL_EOL ""
diff --git a/src/ef/ef0100.h b/src/ef/ef0100.h
index 06370cda7..7a4803b32 100755
--- a/src/ef/ef0100.h
+++ b/src/ef/ef0100.h
@@ -44,6 +44,7 @@
#define F_DESCONTSEP 239
#define F_MANDATO 240
+
#define F_IBAN 250
#define F_IBAN_STATO 251
#define F_IBAN_CHECK 252
diff --git a/src/ef/ef0100a.uml b/src/ef/ef0100a.uml
index b7ff5789c..57eab6f3e 100755
--- a/src/ef/ef0100a.uml
+++ b/src/ef/ef0100a.uml
@@ -26,7 +26,8 @@ BEGIN
PROMPT 30 1 "Numero "
FIELD NPROGTR
KEY 1
- USE LF_EFFETTI SELECT (TIPOCF=#F_TIPOCF)&&(BETWEEN(CODCF,#F_CODCF,#F_CODCF))
+ USE LF_EFFETTI
+// SELECT (TIPOCF=#F_TIPOCF)&&(BETWEEN(CODCF,#F_CODCF,#F_CODCF))
JOIN LF_CLIFO INTO CODCF=CODCF TIPOCF=TIPOCF
INPUT NPROGTR F_NPROGTR
DISPLAY "Nr.progr." NPROGTR
diff --git a/src/ef/ef0101.cpp b/src/ef/ef0101.cpp
index 1ed13813f..2c2232dc3 100755
--- a/src/ef/ef0101.cpp
+++ b/src/ef/ef0101.cpp
@@ -98,8 +98,10 @@ int TEffetto::leggi(TLocalisamfile &f, const TRectype& r, word lockop)
if (err == NOERR)
{ // leggo dai record array
_righe.read(k_reff);
+ _righe.pack();
_cess.read(k_cess);
- }
+ _cess.pack();
+ }
else // se ho trovato un errore
{
head() = r;
diff --git a/src/ef/ef0301.cpp b/src/ef/ef0301.cpp
index 5ce5bd7d6..ed7cc4864 100755
--- a/src/ef/ef0301.cpp
+++ b/src/ef/ef0301.cpp
@@ -54,20 +54,20 @@ int TDistinta::read(const char tipo, const long numero, word lockop)
{
TISAM_recordset reff(query(tipo, numero));
TLocalisamfile& f = reff.cursor()->file();
- int i = 0;
- for (bool ok = reff.move_first(); ok; ok = reff.move_next())
+ int i = 0;
+
+ for (bool ok = reff.move_first(); ok; ok = reff.move_next(), i++)
{
const word lock = (i == 0 && lockop == _lock) ? _lock : _nolock; // Lock solo sulla prima riga
const int n = reff.get(EFF_NRIGADIST).as_int();
- TEffetto* effetto = new TEffetto;
- err = effetto->read(f, tipo, numero, n, lock);//legge un effetto per chiave 4
+ TEffetto effetto;
+
+ err = effetto.read(f, tipo, numero, n, lock);//legge un effetto per chiave 4
if (err == NOERR)
{
- i = _righe_dist.add(effetto) + 1;
- effetto->put(EFF_NRIGADIST, i);
+ _righe_dist.add(effetto, i);
+ effetto.put(EFF_NRIGADIST, i + 1);
}
- else
- delete effetto;
}
}
// se ho letto degli effetti della distinta ed ho
diff --git a/src/ef/ef1100.cpp b/src/ef/ef1100.cpp
index 041ec1f95..ef37cebb7 100644
--- a/src/ef/ef1100.cpp
+++ b/src/ef/ef1100.cpp
@@ -24,43 +24,6 @@
static XVT_SQLDB _db = NULL; // SEPA sqlite db
-/////////////////////////////////////////////////////////////////////////////////////
-// Utilities
-/////////////////////////////////////////////////////////////////////////////////////
-
-// Cerca una stringa all'interno di una SLIST (Potrebbe diventare una funzione di XVT.h)
-static SLIST_ELT xvt_slist_find_str(SLIST list, const char* str)
-{
- SLIST_ELT e = NULL;
- for (e = xvt_slist_get_first(list); e; e = xvt_slist_get_next(list, e))
- {
- const char* val = xvt_slist_get(list, e, NULL);
- if (xvt_str_compare_ignoring_case(str, val) == 0)
- break;
- }
- return e;
-}
-
-// Aggiorna il file dst se pi vecchio di src (Potrebbe diventare una funzione di XVT.h)
-bool xvt_fsys_fupdate(const char* src, const char* dst)
-{
- bool ok = false;
- if (xvt_fsys_file_exists(src))
- {
- const long tsrc = xvt_fsys_file_attr(src, XVT_FILE_ATTR_MTIME);
- if (tsrc > 0)
- {
- long tdst = 0;
- if (xvt_fsys_file_exists(dst))
- tdst = xvt_fsys_file_attr(dst, XVT_FILE_ATTR_MTIME);
- if (tsrc > tdst)
- ok = xvt_fsys_fcopy(src, dst) != 0;
- }
- }
-
- return ok;
-}
-
/////////////////////////////////////////////////////////////////////////////////////
// TJava_profile
/////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/fe/fe0100.cpp b/src/fe/fe0100.cpp
index f3c1eca20..226673b79 100755
--- a/src/fe/fe0100.cpp
+++ b/src/fe/fe0100.cpp
@@ -244,10 +244,6 @@ TExclusion_mode TSpesometro_msk::validate_mov(const TRectype& mov)
if (anno < 2012)
return segnala_movimento(mov, em_data_limite);
-#ifdef DBG
- if (mov.get_long(MOV_NUMREG) ==14224)
- int sn = 1;
-#endif
const char tipocf = mov.get_char(MOV_TIPO);
const real impmin = get_real(F_IMPMIN);
diff --git a/src/gfm/median.c b/src/gfm/median.c
index 6cf7d88ed..9fbd519fb 100755
--- a/src/gfm/median.c
+++ b/src/gfm/median.c
@@ -73,7 +73,7 @@ int n;
tmpa[i] = pSrc[i];
/* sort pointers */
- qsort((void *)tmpa,n,sizeof(DEC *), _SortInc);
+ qsort((void *)tmpa,n,sizeof(DEC *), (int (__cdecl *)(void)) _SortInc);
if (n%2)
_MacDCopy(pDst, tmpa[(n-1)/2]);
diff --git a/src/ic/ic0100f.rep b/src/ic/ic0100f.rep
index d9aa99419..d671d9cd9 100644
--- a/src/ic/ic0100f.rep
+++ b/src/ic/ic0100f.rep
@@ -395,7 +395,9 @@ THEN
#F1.203 +!
- USE IVADIFF SELECT (BETWEEN(DATAREG,#DAL,#AL))(TIPOIVA==#TIPOIVA)(TIPODIFF==#TIPODIFF)((CHIUSA=#CHIUSA)||(#CHIUSA="T"))
+ USE IVADIFF KEY 4 SELECT (BETWEEN(DATAREGP;#DAL;#AL))(TIPOIVA==#TIPOIVA)(TIPODIFF==#TIPODIFF)((CHIUSA=#CHIUSA)||(#CHIUSA="T"))
+FROM DATAREG=#DAL
+TO DATAREG=#AL
JOIN MOV INTO NUMREG==NUMREG
JOIN CLIFO TO MOV INTO TIPOCF==TIPO CODCF==CODCF
\ No newline at end of file
diff --git a/src/include/alex.cpp b/src/include/alex.cpp
index 12cdfa7c9..37dd01e0f 100755
--- a/src/include/alex.cpp
+++ b/src/include/alex.cpp
@@ -1170,7 +1170,12 @@ bool TAlex_virtual_machine::execute(const TBytecode& bc)
bool TAlex_virtual_machine::compile(const char* cmd, TBytecode& bc)
{
+#ifdef LINUX
+ string s(cmd);
+ istringstream instr(s);
+#else
istrstream instr((const char*)cmd, strlen(cmd));
+#endif
return compile(instr, bc);
}
diff --git a/src/include/applicat.cpp b/src/include/applicat.cpp
index f420d7fbc..95d640f7d 100755
--- a/src/include/applicat.cpp
+++ b/src/include/applicat.cpp
@@ -296,12 +296,11 @@ void TApplication::stop_run()
{
if (_savefirm)
prefix().set_codditta(_savefirm);
- terminate();
+ terminate();
xvt_app_destroy();
}
-
bool TApplication::add_menu(TString_array& menu, MENU_TAG id)
{
TTemp_window tw(TASK_WIN);
@@ -316,19 +315,77 @@ bool TApplication::remove_menu(MENU_TAG id)
TApplication::TApplication()
- : _god_vars(NULL),_savefirm(0), _running(FALSE), _create_ok(FALSE)
+ : _god_vars(nullptr),_savefirm(0), _running(false), _create_ok(false), _force(false)
{
}
-
TApplication::~TApplication()
{
- if (_god_vars != NULL)
- delete _god_vars;
+ SAFE_DELETE(_god_vars);
+}
+
+const TString & logdir()
+{
+ TString & name = get_tmp_string(1024);
+
+ name << firm2dir(prefix().get_codditta()) << "/log";
+
+ return name;
+}
+
+const TString & logname()
+{
+ TString & name = (TString &) logdir();
+
+ name << "/dblog.xml";
+ return name;
+}
+const TString & rollname(const TDate & day)
+{
+ TString & name = (TString &)logdir();
+
+ name << "/dblog" << day.date2ansi() << ".txt";
+ return name;
}
bool TApplication::create()
-{ return true; }
+{
+ if (use_files())
+ {
+ TConfig c(CONFIG_STUDIO, "Main");
+
+ db_log(c.get("DBLog", "Main", -1, "off") == "on");
+
+ if (db_log())
+ {
+ TFilename logd = logdir();
+ int roll_days = c.get_int("RollingDays", "Main", -1, 10);
+ TDate oggi(TODAY);
+ TDate lastroll(c.get("LastDate", "Main", -1, oggi.stringa()));
+ TDate limit(lastroll);
+
+ if (!logd.exist())
+ make_dir(logd);
+ limit += roll_days;
+ if (!lastroll.ok() || (limit <= oggi))
+ {
+ TSystemisamfile dblog(LF_DBLOG);
+ TFilename roll = rollname(lastroll);
+ TFilename logn = logname();
+
+ dblog.dump(roll);
+ dblog.zap();
+ if (logn.exist())
+ {
+ roll.ext("xml");
+ rename(logn, roll);
+ }
+ c.set("LastDate", oggi.date2ansi());
+ }
+ }
+ }
+ return true;
+}
bool TApplication::destroy()
@@ -341,7 +398,8 @@ void TApplication::terminate()
if (_create_ok)
destroy(); // Distruzione files e maschere
- do_events();
+ if(!_force)
+ do_events();
if (use_files())
{
@@ -371,7 +429,8 @@ const char* TApplication::get_module_name() const
const TDongle& d = dongle();
const TString4 modname = _name.left(2);
word aut = d.module_name2code(modname);
- if (aut == 0xFFFF && modname == "ps")
+
+ if (aut == 0xFFFF && modname == "ps")
{
aut = 0;
module = TR("Personalizzazioni");
@@ -404,19 +463,12 @@ const char* TApplication::get_module_name() const
}
}
}
- if (!ok)
- {
- if(is_power_station())
- {
- warning_box("Attenzione! Non sei abilitato per l'utilizzo del modulo %s", static_cast(module));
- }
- else
- {
- cantaccess_box(module);
- module.cut(0);
- }
- }
- }
+ if (!ok && !is_power_station())
+ {
+ cantaccess_box(module);
+ module.cut(0);
+ }
+ }
}
return module;
}
@@ -769,7 +821,7 @@ void TApplication::open_files(int logicnum, ...)
va_start(marker, logicnum);
while (logicnum >= LF_USER && logicnum < LF_EXTERNAL)
{
- if (_used_files.objptr(logicnum) == NULL)
+ if (_used_files.objptr(logicnum) == nullptr)
_used_files.add(new TLocalisamfile(logicnum), logicnum);
logicnum = va_arg(marker, int);
}
diff --git a/src/include/applicat.h b/src/include/applicat.h
index f2a0695f2..01f75df7d 100755
--- a/src/include/applicat.h
+++ b/src/include/applicat.h
@@ -51,6 +51,9 @@ class TApplication
// @cmember:(INTERNAL) Codice della ditta
long _savefirm;
+ // @cmember:(INTERNAL) Chiusura forzata per programmi senza interfaccia
+ bool _force;
+
// @cmember:(INTERNAL) Indica se l'applicazione e' partita
bool _running;
@@ -59,7 +62,7 @@ class TApplication
// @cmember:(INTERNAL) Termine dell'applicazione
void terminate();
-
+
// @access Protected Member
protected:
// @cmember Ritorna il nome del modulo dell'applicazione
@@ -135,6 +138,8 @@ public:
// @cmember Forza la chiusura dell'applicazione
void stop_run();
+ void TApplication::force_stop() {_force = true;}
+
// @cmember Mette il segno Check a fianco di una voce di menu
void check_menu_item(MENU_TAG item, bool on = true);
@@ -195,6 +200,10 @@ public:
virtual ~TApplication();
};
+const TString & logdir();
+const TString & logname();
+const TString & rollname(const TDate & day);
+
class TSkeleton_application : public TApplication
{
protected:
diff --git a/src/include/dongle.h b/src/include/dongle.h
index 87fba2205..d78f3cec5 100755
--- a/src/include/dongle.h
+++ b/src/include/dongle.h
@@ -17,7 +17,7 @@
#include
#endif
-enum TDongleHardware { _dongle_unknown=0, _dongle_network=3, _dongle_ssa=4, _dongle_ssanet=5 };
+enum TDongleHardware { _dongle_unknown, _dongle_hardlock, _dongle_eutron, _dongle_network, _dongle_ssa, _dongle_ssanet,_dongle_software };
enum TDongleType { _no_dongle, _user_dongle, _developer_dongle };
class TDongle : public TObject
diff --git a/src/include/fraction.cpp b/src/include/fraction.cpp
index 2a11a7ce6..3f904340c 100755
--- a/src/include/fraction.cpp
+++ b/src/include/fraction.cpp
@@ -122,7 +122,11 @@ void fraction::build_fraction (const char *s)
}
}
n.strip(",.-+/[]");
+#ifdef WIN32
sscanf_s(n, "%I64d", &_num);
+#else
+ sscanf_s(n, "%Ld", &_num);
+#endif
if (len_periodo > 0)
{
_den = 9;
diff --git a/src/include/isam.h b/src/include/isam.h
index 63e0c6ff1..6347d58b4 100755
--- a/src/include/isam.h
+++ b/src/include/isam.h
@@ -27,6 +27,13 @@
const int MAX_KEYS = 8;
+enum db_op {db_add = 1, db_remove, db_update};
+
+void db_log(bool on);
+void db_log_on();
+void db_log_off();
+bool db_log();
+
class TBaseisamfile;
class TLocalisamfile;
class TRecfield;
@@ -82,6 +89,9 @@ protected:
// @cmember:(INTERNAL) Campo "COD" della tabella
TMemo_data* _memo_data;
+ TString_array _modified_fields;
+ bool _preserve_values;
+
// @access Protected Member
protected:
// @cmember Segnalazione di un campo inesistente
@@ -100,6 +110,7 @@ protected:
virtual void put_str(const char* fieldname, const char* val);
bool set_edit_info(const char* ut, const char* dt, const char* or);
+ void set_modified_field(int i, const char * val);
// @access Public Member
public:
@@ -161,6 +172,8 @@ public:
virtual int ndec(const char* fieldname) const;
// @cmember Indica se esiste il campo
virtual bool exist(const char* fieldname) const;
+ // @cmember Indica se esiste il campo
e ritorna la ppsizionr
+ virtual int find(const char* fieldname) const;
// @cmember Ritorna il nome del campo
-esimo
const char* fieldname(int i) const;
@@ -259,6 +272,12 @@ public:
// @cmember Ritorna true se sono uguali
bool is_equal(const TRectype& r) const;
+ bool field_modified(int i) const { return _modified_fields.objptr(i) != NULL; }
+ const TString & get_modified_field(int i) const { return field_modified(i) ? _modified_fields.row(i) : EMPTY_STRING; }
+ void clear_modified_fields(int i = -1) { _modified_fields.destroy(i); }
+ bool preserve_values() { return _preserve_values; }
+ void set_preserve_values(bool on = true) { _preserve_values = on; }
+
virtual void init_memo(const TRecnotype recno = RECORD_NON_FISICO, TIsam_handle file = 0);
virtual void reset_memo() { _memo_data->init(RECORD_NON_FISICO, 0); }
virtual void update_memo() {}
@@ -331,6 +350,7 @@ protected:
// @access Protected Member
protected:
// @cmember:(INTERNAL) IO su file:
+ virtual bool writelog(const db_op op, TRectype & rec, TRectype * new_rec, int fhnd);
virtual int _read(TRectype& rec, word op = _isequal, word lockop = _nolock);
virtual int _readat(TRectype& rec, TRecnotype nrec, word lockop = _nolock);
virtual int _write(const TRectype& rec);
@@ -798,6 +818,7 @@ class TRecfield : public TObject
TString16 _name, _sub_field;
// @cmember:(INTERNAL) Puntatore a inizio record
TRectype* _rec;
+ int _nf;
// @cmember:(INTERNAL) Puntatore a inizio campo
char* _p;
// @cmember:(INTERNAL) Lunghezza del campo
diff --git a/src/include/lffiles.h b/src/include/lffiles.h
index 27ef6c2bc..2680b5b96 100755
--- a/src/include/lffiles.h
+++ b/src/include/lffiles.h
@@ -198,6 +198,7 @@
#define LF_FPCART 178
#define LF_FPCADG 179
#define LF_CONART 180
+#define LF_DBLOG 181
#define LF_EXTERNAL 1000 // Files with id >= are considered to be externals
diff --git a/src/include/postman.cpp b/src/include/postman.cpp
index 7d811ae3d..8d33b6960 100755
--- a/src/include/postman.cpp
+++ b/src/include/postman.cpp
@@ -368,7 +368,12 @@ bool TPostman::dispatch_transaction(const TRectype& rec,
TSocketClient socket;
char * buf = new char[1024 * 256];
+#ifdef WIN32
ostrstream stream(buf, 1024 * 256);
+#else
+ ostringstream stream(buf);
+#endif
+
bool ok = true;
item.SetTag("m:CampoTransaction");
diff --git a/src/include/prefix.cpp b/src/include/prefix.cpp
index b7485fc5f..8930b5982 100755
--- a/src/include/prefix.cpp
+++ b/src/include/prefix.cpp
@@ -495,7 +495,7 @@ const TFilename& TFile_info::load_filedes()
{
_dir = _filedes.SysName[0] != '$' ? _comdir : _nordir;
_name = CAddPref(_filedes.SysName);
- strncpy(_filedes.Des, dictionary_translate(_filedes.Des), sizeof(_filedes.Des)-1);
+ strncpy_s(_filedes.Des, dictionary_translate(_filedes.Des), sizeof(_filedes.Des)-1);
}
else
_name.cut(0);
@@ -534,7 +534,7 @@ TFile_info::TFile_info(int logicnum, TFilename& name)
int err = DB_recinfo(_name, &_filedes, (RecDes*)&rec.rec(), keys.get_buffer());
if (err == NOERR && prefix().add_recdes(logicnum, rec, keys))
{
- strncpy(_filedes.SysName, _name, sizeof(_filedes.SysName));
+ strncpy_s(_filedes.SysName, _name, sizeof(_filedes.SysName));
_filedes.SysName[41] = '\0';
}
else
@@ -1036,7 +1036,7 @@ void TPrefix::set(
{
const TString saved_prf = __ptprf; // Salvo __ptprf che viene cambiato da CGetPref
char* prfx = (char*)CGetPref(); // Safe non const cast for StPath cprefix
- strcpy(__ptprf, saved_prf);
+ strcpy_s(__ptprf, saved_prf);
xvt_fsys_build_pathname(prfx, NULL, __ptprf, _prefix, NULL, NULL);
}
else
@@ -1168,7 +1168,7 @@ bool TPrefix::set_studio(const char* study, long ditta)
const TString old_firm(_prefix);
strcpy_s(__ptprf, sizeof(__ptprf), study);
- const word len = strlen(__ptprf);
+ const word len = (word) strlen(__ptprf);
if (len > 0 && __ptprf[len-1] != '\\' && __ptprf[len-1] != '/')
{
__ptprf[len] = SLASH;
diff --git a/src/include/recarray.cpp b/src/include/recarray.cpp
index f6ef8ac1d..535219595 100755
--- a/src/include/recarray.cpp
+++ b/src/include/recarray.cpp
@@ -205,6 +205,21 @@ void TRecord_array::sort(COMPARE_FUNCTION sort_func)
}
}
+int TRecord_array::find(const TRectype & rec, int nkey) const
+{
+ const int last = last_row();
+ const TString80 key2find = rec.key(nkey);
+ TString80 key;
+
+ for (int nrow = first_row(); nrow <= last; nrow = succ_row(nrow))
+ {
+ key = row(nrow).key(nkey);
+ if (key2find == key)
+ return nrow;
+ }
+ return -1;
+}
+
int TRecord_array::rec2row(const TRectype& r) const
{
CHECK(r.num() == _file, "Incompatible record");
@@ -447,34 +462,36 @@ int TRecord_array::write(bool re) const
const int u = _data.last();
- CHECK(u<1 || !key().empty(), "Can't write rows using an empty key");
+ CHECK(u < 1 || !key().empty(), "Can't write rows using an empty key");
int i;
for (i = 1; i <= u; i++)
{
- const TRectype* r = (TRectype*)_data.objptr(i);
+ TRectype* r = (TRectype*)_data.objptr(i);
- if (r != NULL)
- {
- if (re)
- {
- err = r->rewrite(f);
- if (err == _iskeynotfound || err == _iseof || err == _isemptyfile)
- err = r->write(f);
- if (err != NOERR)
- break;
- }
- else
- {
- err = r->write(f);
- if (err == _isreinsert)
- {
- err = r->rewrite(f);
- re = true;
- }
- if (err != NOERR)
- break;
- }
- }
+ if (r != NULL)
+ {
+ if (re)
+ {
+ if (db_log() && _file != LF_DBLOG)
+ r->set_preserve_values(false);
+ err = r->rewrite(f);
+ if (err == _iskeynotfound || err == _iseof || err == _isemptyfile)
+ err = r->write(f);
+ if (err != NOERR)
+ break;
+ }
+ else
+ {
+ err = r->write(f);
+ if (err == _isreinsert)
+ {
+ err = r->rewrite(f);
+ re = true;
+ }
+ if (err != NOERR)
+ break;
+ }
+ }
else
{
const int pos = i+_offset;
@@ -507,7 +524,7 @@ int TRecord_array::write(bool re) const
last_on_file = EOR; // Sul file non ci sono piu' righe da cancellare
delete rec;
}
- }
+ }
}
// Cancella eventuali residui successivi
diff --git a/src/include/recarray.h b/src/include/recarray.h
index b49293570..bc1348715 100755
--- a/src/include/recarray.h
+++ b/src/include/recarray.h
@@ -123,6 +123,8 @@ public:
bool renum_key(const char* field, long num);
// @cmember Ordina il Record Array secondo il criterio definito in
void sort(COMPARE_FUNCTION sort_func);
+ // @cmember Cerca un record nel Record Array secondo la chiave nkey
+ int find(const TRectype & rec, int nkey = 1) const ;
// @cmember Legge tutto l'array dal file
virtual int read(const TRectype& r);
diff --git a/src/include/relapp.cpp b/src/include/relapp.cpp
index 46dcf31db..4764041fe 100755
--- a/src/include/relapp.cpp
+++ b/src/include/relapp.cpp
@@ -565,10 +565,15 @@ bool TRelation_application::modify_mode()
{
if (err == _islocked)
{
- _locked = true;
- message_box(TR("I dati sono gi usati da un altro programma, scrittura disabilitata"));
- }
- else
+ if (db_log())
+ _locked = !yesno_box(TR("I dati sono gi usati da un altro programma, vuoi modificare ugualmente"));
+ else
+ {
+ _locked = true;
+ message_box(TR("I dati sono gi usati da un altro programma, scrittura disabilitata"));
+ }
+ }
+ else
{
error_box(FR("Impossibile leggere i dati: errore %d"), err);
if (!is_transaction())
@@ -893,7 +898,7 @@ int TRelation_application::delete_mode()
{
cur = pos;
brw->do_output();
- bool can_delete = FALSE;
+ bool can_delete = false;
if (find(1))
{
TRelation& r = *get_relation();
@@ -909,14 +914,14 @@ int TRelation_application::delete_mode()
query_mode();
cur.freeze(true);
}
- _autodelete = FALSE;
+ _autodelete = false;
}
if (!can_delete)
skipped++;
deleting--;
}
}
- cur.freeze(FALSE);
+ cur.freeze(false);
set_limits(); // Riaggiorno il numero del primo/ultimo record
if (skipped > 0)
@@ -930,9 +935,9 @@ int TRelation_application::delete_mode()
else
{
if (search_mode())
- _autodelete = TRUE;
+ _autodelete = true;
}
- return TRUE;
+ return true;
}
// @doc INTERNAL
@@ -1411,7 +1416,7 @@ void TRelation_application::main_loop()
_mask->send_key(K_CTRL+'E', 0);
else
error_box(TR("Elemento non eliminabile."));
- _autodelete = FALSE;
+ _autodelete = false;
}
}
@@ -1422,7 +1427,7 @@ void TRelation_application::main_loop()
batch(false);
}
else
- k = _mask->run();
+ k = _mask->run();
switch (k)
{
@@ -1680,7 +1685,9 @@ void TRelation_application::main_loop()
}
if (_curr_trans_mode == TM_BATCH)
{
- TString_array & errs = errors();
+ batch(false);
+
+ TString_array & errs = errors();
FOR_EACH_ARRAY_ROW(errs, r, s)
ini.set("ErrMsg", *s, "Main", false, r);
@@ -1694,6 +1701,8 @@ void TRelation_application::main_loop()
}
_trans_counter++;
} while ( _trans_counter < _ntransactions);
+ if (_curr_trans_mode == TM_BATCH)
+ force_stop();
}
bool TRelation_application::filter()
diff --git a/src/include/xml.cpp b/src/include/xml.cpp
index 932aa8825..5fb219f5e 100755
--- a/src/include/xml.cpp
+++ b/src/include/xml.cpp
@@ -1,6 +1,7 @@
#include
#include
#include
+#include
#include
#include
@@ -142,7 +143,7 @@ TXmlItem& TXmlItem::SetAttr(const char* strAttr, const char* strVal)
if (m_Attributes == NULL)
m_Attributes = new TAssoc_array;
m_Attributes->remove(strAttr);
- if (strVal && *strVal)
+ if (strVal)
m_Attributes->add(strAttr, new TXmlAttr(strVal));
return *this;
}
@@ -518,7 +519,11 @@ void TXmlItem::AsString(TString& str) const
{
char* buf = str.get_buffer(nSize);
memset(buf, 0, nSize);
+#ifdef WIN32
ostrstream outf(buf, nSize);
+#else
+ ostringstream outf(buf);
+#endif
Write(outf, 0);
if (buf[nSize-1] == '\0')
@@ -532,6 +537,15 @@ void TXmlItem::Save(const char* strFilename) const
Write(outf, 0);
}
+void TXmlItem::Append(const char* strFilename) const
+{
+ bool AppendToExisting = fexist(strFilename);
+ ofstream outf;
+
+ outf.open(strFilename, ios::app);
+ Write(outf, AppendToExisting);
+}
+
bool TXmlItem::Load(const char* strFilename)
{
bool ok = false;
diff --git a/src/include/xml.h b/src/include/xml.h
index ee016509b..36e760ad5 100755
--- a/src/include/xml.h
+++ b/src/include/xml.h
@@ -67,6 +67,7 @@ public:
void Save(const char* strFilename) const;
bool Load(const char* strFilename);
+ void Append(const char* strFilename) const;
TXmlItem* ForEach(XmlItemCallback cb, long jolly = 0);
TXmlItem* FindFirst(const char* strTag) const; // Recursive
diff --git a/src/pa/pa0100.cpp b/src/pa/pa0100.cpp
index 79de425a6..17c4026f1 100644
--- a/src/pa/pa0100.cpp
+++ b/src/pa/pa0100.cpp
@@ -65,39 +65,6 @@ static bool chiave_paf(const TRectype& doc, TString& cess, TString& numdoc)
return cess.full();
}
-// Cerca una stringa all'interno di una SLIST (Potrebbe diventare una funzione di XVT.h)
-static SLIST_ELT xvt_slist_find_str(SLIST list, const char* str)
-{
- SLIST_ELT e = NULL;
- for (e = xvt_slist_get_first(list); e; e = xvt_slist_get_next(list, e))
- {
- const char* val = xvt_slist_get(list, e, NULL);
- if (xvt_str_compare_ignoring_case(str, val) == 0)
- break;
- }
- return e;
-}
-
-// Aggiorna il file dst se pi vecchio di src (Potrebbe diventare una funzione di XVT.h)
-bool xvt_fsys_fupdate(const char* src, const char* dst)
-{
- bool ok = false;
- if (xvt_fsys_file_exists(src))
- {
- const long tsrc = xvt_fsys_file_attr(src, XVT_FILE_ATTR_MTIME);
- if (tsrc > 0)
- {
- long tdst = 0;
- if (xvt_fsys_file_exists(dst))
- tdst = xvt_fsys_file_attr(dst, XVT_FILE_ATTR_MTIME);
- if (tsrc > tdst)
- ok = xvt_fsys_fcopy(src, dst) != 0;
- }
- }
-
- return ok;
-}
-
/////////////////////////////////////////////////////////////////////////////////////
// TJava_profile
/////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/ps/ps0214100.cpp b/src/ps/ps0214100.cpp
index 7a6ddc793..6d1b885d3 100755
--- a/src/ps/ps0214100.cpp
+++ b/src/ps/ps0214100.cpp
@@ -358,7 +358,6 @@ void TDichiarazione_CONAI::scrivi_csv(const TRectype& prima_riga, TDichiarazione
break;
}
}
-
if (n_riga_generata > 0)
scrivi_csv_doc_con_riga_generata(doc, n_riga_generata, csv, conai_specie);
else
diff --git a/src/sc/sc0100.cpp b/src/sc/sc0100.cpp
index 8bb87743d..88dc094b9 100755
--- a/src/sc/sc0100.cpp
+++ b/src/sc/sc0100.cpp
@@ -6,6 +6,8 @@
#include "sc0100.h"
#include "sc0100a.h"
+#include "../cg/cg2105.h"
+
#include
HIDDEN bool gruppo_handler(TMask_field& f, KEY key)
diff --git a/src/xvaga/wxinc.h b/src/xvaga/wxinc.h
index 4f575f950..c0fd60d92 100755
--- a/src/xvaga/wxinc.h
+++ b/src/xvaga/wxinc.h
@@ -10,8 +10,14 @@
#define WINVER 0x0500
#define STRICT
#define WXUSINGDLL 1
+#include
+#else
+#define _FILE_OFFSET_BITS 64
+#define _LARGE_FILES
+#define __WXGTK__
+#define GTK_NO_CHECK_CASTS
+#define _IODBC
+#include
#endif
-#include
-
-#endif
\ No newline at end of file
+#endif
diff --git a/src/xvaga/xvt.h b/src/xvaga/xvt.h
index dcbb2a9ab..e53973748 100755
--- a/src/xvaga/xvt.h
+++ b/src/xvaga/xvt.h
@@ -352,6 +352,9 @@ XVTDLL long* xvt_slist_get_data(SLIST_ELT elt);
XVTDLL SLIST_ELT xvt_slist_get_first(SLIST list);
XVTDLL SLIST_ELT xvt_slist_get_next(SLIST list, SLIST_ELT item);
+XVTDLL SLIST_ELT xvt_slist_find_str(SLIST list, const char* str); // Cerca una stringa all'interno di una SLIST
+XVTDLL BOOLEAN xvt_fsys_fupdate(const char* src, const char* dst); // Aggiorna il file dst se pi vecchio di src
+
XVTDLL int xvt_str_compare_ignoring_case (const char* s1, const char* s2);
XVTDLL int xvt_str_encode(const char* text, char* cypher, int mode);
XVTDLL int xvt_str_decode(const char* cypher, char* text, int mode);
@@ -478,6 +481,8 @@ XVTDLL void xvt_win_set_handler(WINDOW win, EVENT_HANDLER eh);
XVTDLL void xvt_win_trap_pointer(WINDOW win);
XVTDLL BOOLEAN xvt_win_is_taskbar_visible();
+XVTDLL BOOLEAN xvt_win_is_taskbar_visible();
+
// Added by XVAGA
XVTDLL BOOLEAN xvt_pane_add(WINDOW parent, WINDOW pane, const char* name, int dock, int flags);
XVTDLL BOOLEAN xvt_pane_change_flags(WINDOW pane, int set, int reset);
diff --git a/src/xvaga/xvt_type.h b/src/xvaga/xvt_type.h
index 38d5f0933..db3d9f36f 100755
--- a/src/xvaga/xvt_type.h
+++ b/src/xvaga/xvt_type.h
@@ -6,6 +6,14 @@
#define TRUE 1
#endif
+#ifdef LINUX
+#define _MAX_PATH 512
+#define _MAX_EXT 6
+#define _MAX_DRIVE 6
+#define _MAX_DIR 512
+#define _MAX_FNAME 512
+#endif
+
typedef unsigned long WINDOW;
typedef unsigned int UNIT_TYPE;
typedef unsigned long ULONG;
diff --git a/src/xvaga/xvtart.cpp b/src/xvaga/xvtart.cpp
index 39186eca2..b186e7887 100755
--- a/src/xvaga/xvtart.cpp
+++ b/src/xvaga/xvtart.cpp
@@ -2,7 +2,12 @@
#include "xvt.h"
#include "xvtart.h"
+
+#ifdef __WXMSW__
#include "oswin32.h"
+#else
+#include "oslinux.h"
+#endif
#include
#include