Patch level : 12.0 894
Files correlati : lv2.exe Commento to : aggiornati i dati di testat dei clienti nelle varie bolle di consegne ritiro pui ito buoni etc IN fatturazione se indicato in configurazione
This commit is contained in:
parent
c49d782f50
commit
c994768908
15
build/ca.sln
15
build/ca.sln
@ -1,6 +1,8 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.645
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ca0", "ca0.vcxproj", "{5E2A482C-0B8F-4D04-A732-07303504377E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ca1", "ca1.vcxproj", "{2EFD079D-A428-4039-9E97-64FF97E91185}"
|
||||
@ -34,8 +36,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vedoc", "vedoc.vcxproj", "{
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AgaLib", "AgaLib.vcxproj", "{2D38A763-3D74-4338-9362-B891784EC90E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xvaga", "xvaga.vcxproj", "{4A2FC619-2461-4F58-8F1D-92FA153E39A2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pdflibwrap", "pdflibwrap.vcxproj", "{21876C3B-F5A9-4AAA-9D58-F8DDDAF6F10C}"
|
||||
EndProject
|
||||
Global
|
||||
@ -76,10 +76,6 @@ Global
|
||||
{2D38A763-3D74-4338-9362-B891784EC90E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{2D38A763-3D74-4338-9362-B891784EC90E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{2D38A763-3D74-4338-9362-B891784EC90E}.Release|Win32.Build.0 = Release|Win32
|
||||
{4A2FC619-2461-4F58-8F1D-92FA153E39A2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4A2FC619-2461-4F58-8F1D-92FA153E39A2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4A2FC619-2461-4F58-8F1D-92FA153E39A2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4A2FC619-2461-4F58-8F1D-92FA153E39A2}.Release|Win32.Build.0 = Release|Win32
|
||||
{21876C3B-F5A9-4AAA-9D58-F8DDDAF6F10C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{21876C3B-F5A9-4AAA-9D58-F8DDDAF6F10C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{21876C3B-F5A9-4AAA-9D58-F8DDDAF6F10C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
@ -88,4 +84,7 @@ Global
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {E7ABB3DB-72AB-49C7-BD54-630AD358EF10}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -114,7 +114,6 @@
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
@ -215,6 +214,7 @@
|
||||
<ClInclude Include="..\src\xvaga\xvtart.h" />
|
||||
<ClInclude Include="..\src\xvaga\xvtextra.h" />
|
||||
<ClInclude Include="..\src\xvaga\xvtwin.h" />
|
||||
<ClInclude Include="..\src\xvtdb\xvtdb.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="..\libraries\wx28X\lib\vc_dll\wxbase28.lib">
|
||||
|
@ -143,6 +143,9 @@
|
||||
<ClInclude Include="..\src\xvaga\xvtwin.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\xvtdb\xvtdb.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="..\lib\SSADll.lib">
|
||||
|
BIN
cd/Setup.exe
BIN
cd/Setup.exe
Binary file not shown.
BIN
exe/Ba1.exe
BIN
exe/Ba1.exe
Binary file not shown.
BIN
exe/Cb6.dll
BIN
exe/Cb6.dll
Binary file not shown.
BIN
exe/DIR.GEN
BIN
exe/DIR.GEN
Binary file not shown.
BIN
exe/TRC.GEN
BIN
exe/TRC.GEN
Binary file not shown.
BIN
exe/ba0.exe
BIN
exe/ba0.exe
Binary file not shown.
BIN
exe/bainst.exe
BIN
exe/bainst.exe
Binary file not shown.
@ -7,9 +7,10 @@ Item_01 = "Anagrafiche di base", [MENU_001], "", 10214
|
||||
Item_02 = "Amministrazione", <cgarea.men>, "", 10212
|
||||
Item_03 = "Acquisti e vendite", <vearea.men>, "", 10211
|
||||
Item_04 = "Magazzino e Produzione", <mgarea.men>, "", 10215
|
||||
Item_05 = "Gestione Lavanderie", <lvmenu.men>, "", 10220
|
||||
Item_06 = "Manutenzione", [MENU_015], "", 10210
|
||||
Item_07 = "Preferiti", [MENU_PREFERITI], "", 10216
|
||||
Item_05 = "Fatturazione Elettronica", <fpmenu.men>, "", 10239
|
||||
Item_06 = "Gestione Lavanderie", <lvmenu.men>, "", 10220
|
||||
Item_07 = "Manutenzione", [MENU_015], "", 10210
|
||||
Item_08 = "Preferiti", [MENU_PREFERITI], "", 10216
|
||||
|
||||
[MENU_001]
|
||||
Caption = "Gestione Anagrafiche"
|
||||
|
@ -2,7 +2,7 @@
|
||||
Donglehw =4
|
||||
Firm =00001a
|
||||
MaxHandles = 32
|
||||
Study =h:\e\dati\crpa\
|
||||
Study =C:\u\clienti\crpa\
|
||||
Type = 1
|
||||
User = ADMIN
|
||||
|
||||
|
BIN
exe/gfm.dll
BIN
exe/gfm.dll
Binary file not shown.
@ -2178,6 +2178,7 @@ Patch = 848
|
||||
Versione = 21511200
|
||||
|
||||
[ve1]
|
||||
Edit_163 = ve0 -6
|
||||
File(0) = ve0.exe
|
||||
File(1) = ve0100a.msk
|
||||
File(2) = ve0100b.msk
|
||||
@ -2323,7 +2324,7 @@ File(155) = vestatr.msk
|
||||
File(156) = vestatr.rep
|
||||
File(157) = vestcaa.msk
|
||||
File(158) = vestcaa.rep
|
||||
File(159) = vestcra.msk
|
||||
le(159) = vestcra.msk
|
||||
File(160) = vestcra.rep
|
||||
File(161) = vestctr.msk
|
||||
File(162) = vestctr.rep
|
||||
|
BIN
exe/pdflib.dll
BIN
exe/pdflib.dll
Binary file not shown.
@ -0,0 +1,102 @@
|
||||
[FieldDescr]
|
||||
ANTICORPI = Anticorpi
|
||||
BENEM = Vuole le benemerenze S/N
|
||||
CATDON = Categoria donatori
|
||||
CATNOND1 = Categoria non donatori 1
|
||||
CATNOND2 = Categoria non donatori 2
|
||||
CF = Codice fiscale
|
||||
CMV = CMV
|
||||
CODCL = Codice cartella clinica
|
||||
CODCT = Codice centro trasfusionale
|
||||
CODICE = Codice
|
||||
CODMED = Codice regionale medico di base
|
||||
CODSEZ = Codice sezione di appartenenza
|
||||
CODSOT = Codice sottogruppo di appartenenza
|
||||
COGNOME = Cognome
|
||||
COGNOME_SP = Cognome del marito
|
||||
COMNASC = Codice comune o stato estero di nascita
|
||||
CONDOCC = Condizione occupazionale (da cambiare)
|
||||
CONSENSO = Consenso informato (legge privacy)
|
||||
DATAAF = Data stato AF
|
||||
DATACONV = Data ultima convocazione spedita
|
||||
DATADIM = Data dimissione
|
||||
DATAISC = Data iscrizione
|
||||
DATANASC = Data di nascita
|
||||
DATAPRIAF = Data prima donazione AF
|
||||
DATAPRISI = Data prima donazione SI
|
||||
DATAPROSAF = Data prossima AF
|
||||
DATAPROSSI = Data prossima SI
|
||||
DATASI = Data stato SI
|
||||
DATASTATO = Data in cui è stato attribuito lo stato
|
||||
DATAULTAF = Data ultima donazione AF
|
||||
DATAULTAGG = Data ultimo aggiornamento
|
||||
DATAULTDON = Data ultima donazione
|
||||
DATAULTID = Data ultima idoneità
|
||||
DATAULTSI = Data ultima donazione SI
|
||||
DATAULTSOL = Data ultimo sollecito
|
||||
DATA_PROS = Data prossimo stato (per fine sospensione)
|
||||
DISP_AF_1 = Disponibilita AF 1
|
||||
DISP_AF_2 = Disponibilita AF 2
|
||||
DOCID = Documento di identità
|
||||
DOM_CAP = Domicilio - CAP
|
||||
DOM_CODCOM = Domicilio - codice comune
|
||||
DOM_CODLOC = Domicilio - codice localita' postale
|
||||
DOM_DISTRI = Domicilio - presso/località - ex distribuzione
|
||||
DOM_INDIR = Domicilio - indirizzo
|
||||
DOM_STRADA = Domicilio - codice stradario
|
||||
DONPRECAF = Numero donazioni AF non dettagliate
|
||||
DONPRECSI = Numero donazioni SI non dettagliate
|
||||
DU = Du
|
||||
EMAIL = Indirizzo di posta elettronica
|
||||
ESCLUSO = Esclusione non sanitaria
|
||||
FENOTIPORH = Fenotipo Rh
|
||||
FINESOSAF = Data fine sospensione AF
|
||||
FINESOSSI = Data fine sospensione per SI
|
||||
GIOPRECON = Giorni preferiti per controlli
|
||||
GIOPREDON = Giorni preferiti per donazioni
|
||||
GRUPPOAB0 = Gruppo AB0
|
||||
GRUPPOAZIE = Codice gruppo aziendale
|
||||
IDON1 = Idoneità 1
|
||||
IDON2 = Idoneità 2
|
||||
IDON3 = Idoneità 3
|
||||
IDON4 = Idoneità 4
|
||||
INTAF = Intervallo aferesi
|
||||
INTSI = Intervallo sangue intero
|
||||
KELL = Kell
|
||||
LUOGOLAV = Luogo di lavoro (codice)
|
||||
MODCONV = Modalita' di convocazione
|
||||
MOTESCL = Motivo esclusione
|
||||
NOME = Nome
|
||||
NOTE = Note
|
||||
NOTIZIARIO = Vuole il notiziario S/N
|
||||
NUMCONV = Numero convocazioni spedite
|
||||
POSPROF = Posizione professionale (da cambiare)
|
||||
PROFESS = Professione (codice)
|
||||
PROS_STATO = Stato prossimo
|
||||
PUNTORACC = Punto di raccolta per convocazione
|
||||
RAMOATT = Ramo di attività (da cambiare)
|
||||
RES_CAP = Residenza - CAP
|
||||
RES_CODCOM = Residenza - codice comune
|
||||
RES_CODLOC = Residenza - codice localita' postale
|
||||
RES_INDIR = Residenza - indirizzo
|
||||
RHANTID = Rh/AntiD
|
||||
SESSO = Sesso
|
||||
STATO = Stato attuale
|
||||
STATOAF = Stato sanitario AF
|
||||
STATOSI = Stato sanitario per SI
|
||||
TELABI = Telefono abitazione
|
||||
TELALT = Telefono altro
|
||||
TELLAV = Telefono lavoro
|
||||
TERMESCL = Data termine esclusione
|
||||
TESSAVIS = Tessera AVIS
|
||||
TESSSSN = Tessera SSN
|
||||
TIPOULTDON = Tipo ultima donazione
|
||||
TIPOULTID = Tipo ultima idoneità
|
||||
TITINDIR = Titolo in indirizzo
|
||||
TITSTUD = Titolo di studio (da cambiare)
|
||||
TOTDON = Totale donazioni
|
||||
TOTDONAF = Numero donazioni AF
|
||||
TOTDONSI = Numero donazioni SI
|
||||
T_STAMPATA = Tessera stampata (S/N)
|
||||
UTENULTAGG = Utente ultimo aggiornamento
|
||||
|
@ -1,3 +1,18 @@
|
||||
[FieldDescr]
|
||||
XX =
|
||||
CC = CC
|
||||
CODICE = Codice soggetto
|
||||
CODSEZ = Sezione di app. al momento della donazione
|
||||
CODSOT = Sottogruppo di app.
|
||||
DATADON = Data donazione
|
||||
ETICHETTA = Etichetta sacca
|
||||
HB = Hb
|
||||
LUOGODON = Luogo donazione
|
||||
PA = P.A.
|
||||
PRIMADON = Prima donazione
|
||||
PROGDON = Progressivo donazione per soggetto
|
||||
PROGINS = Progressivo inserimento
|
||||
PROTIDEMIA = Protidemia
|
||||
SGPT = SGPT
|
||||
TIPODON = Tipo donazione
|
||||
XX =
|
||||
|
||||
|
@ -0,0 +1,17 @@
|
||||
[FieldDescr]
|
||||
CODICE = Codice soggetto
|
||||
DATACON = Data controllo
|
||||
IDON1 = Idoneità 1
|
||||
IDON2 = Idoneità 2
|
||||
IDON3 = Idoneità 3
|
||||
IDON4 = Idoneità 4
|
||||
INTAF = Intervallo per aferesi
|
||||
INTSI = Intervallo per sangue intero
|
||||
MOTIVO = Motivo (per controlli che modificano lo stato)
|
||||
PROGCON = Progressivo controllo
|
||||
PROSSDATA = Data prossimo tipo
|
||||
PROSSTIPO = Prossimo tipo di controllo (programmato e/o presunto)
|
||||
RESPONSAB = Responsabile (per controlli che modificano lo stato)
|
||||
SINGOLI = Singoli controlli
|
||||
TIPOCON = Tipo o esito controllo
|
||||
|
@ -0,0 +1,6 @@
|
||||
[FieldDescr]
|
||||
CODFAM = Codice soggetto familiare
|
||||
FAMIGLIA = Codice famiglia (progressivo automatico)
|
||||
GRADOPAR = Grado di parentela
|
||||
PROGFAM = Progressivo familiare
|
||||
|
@ -0,0 +1,40 @@
|
||||
[FieldDescr]
|
||||
CATCANC = Categoria cancellati
|
||||
CATEMER = Categoria emeriti
|
||||
CATESTI = Categoria estinti
|
||||
CODSEZ = Codice sezione
|
||||
CODSOT = Codice sottogruppo
|
||||
COM = Codice comune residenza
|
||||
CONVNOTE = Note
|
||||
CONVORA = Orario per stampa cartolina
|
||||
CONVSEDE1 = Sede: 1° riga
|
||||
CONVSEDE2 = Sede: 2° riga
|
||||
CONVSEDE3 = Sede: 3° riga
|
||||
CONVSEDE4 = Sede: 4° riga
|
||||
DATAULTCON = Data ultima convocazione
|
||||
DENOMINAZ = Denominazione completa della sezione
|
||||
DENSEZ = Denominazione sezione
|
||||
DENSOT = Denominazione sottogruppo
|
||||
DONEMER = Numero donazioni per passaggio a emeriti
|
||||
FAX = Fax sezione
|
||||
GIOCARSOL = Giorni tra cartolina e primo sollecito
|
||||
GIOPERRIT = Giorni tra le chiamate per ritardatari
|
||||
GIOSOLSOL = Giorni tra sollecito e sollecito
|
||||
GIOULTSOL = Giorni tra penultimo e ultimo sollecito
|
||||
INDIRIZZO = Indirizzo
|
||||
INTESTAZ1 = 1° Riga di intestazione per tessere e cartoline
|
||||
INTESTAZ2 = 2° Riga di intestazione per tessere e cartoline
|
||||
INTESTAZ3 = 3° Riga di intestazione per tessere e cartoline
|
||||
INTESTAZ4 = 4° Riga di intestazione per tessere e cartoline
|
||||
INTESTI = Intervallo di estinzione in anni
|
||||
INTMAX = Intervallo max per cartolina
|
||||
INTMIN = Intervallo min. per cartolina
|
||||
INTMINCONV = Intervallo minimo di convocazione in gg.
|
||||
LOCALITA = Località postale
|
||||
NUMMAXSOL = Numero massimo di solleciti
|
||||
PUNTORACC = Codice punto di raccolta per convocazione
|
||||
REFERCED = Cognome e nome referente CED
|
||||
STATO = Stato sezione
|
||||
TELEFONO = Telefono sezione
|
||||
TIPOCONV = Tipo convocazione
|
||||
|
@ -0,0 +1,10 @@
|
||||
[FieldDescr]
|
||||
CODMED = Codice regionale del medico
|
||||
COGNOME = Cognome medico
|
||||
COM = Codice comune di residenza
|
||||
INDIRIZZO = Indirizzo medico
|
||||
LOCALITA = Località postale
|
||||
NOME = Nome medico
|
||||
TELABI = Telefono abitazione
|
||||
TELAMB = Telefono ambulatorio
|
||||
|
@ -1,6 +1,7 @@
|
||||
[FieldDescr]
|
||||
AL = Data fine periodo
|
||||
ANNO = Anno
|
||||
CHIUSA = Indica se una lettera di intento è chiusa
|
||||
CODCLI = Codice cliente
|
||||
DAL = Data inizio periodo
|
||||
DATAREG = Data di registrazione
|
||||
@ -8,6 +9,8 @@ IMPORTO = Importo
|
||||
INVIATO = Inviato
|
||||
NOTE = Note
|
||||
NUMPROT = Numero protocollo
|
||||
PROTINTF = Numero di protocollo passato dall agenzia delle entrate (prima parte)
|
||||
PROTINTS = Numero di protocollo passato dall agenzia delle entrate (seconda parte)
|
||||
STAMPATO = Stampato
|
||||
TIPOOP = Tipo operazione (1=singola,2=fino a,3=nel periodo dal/al)
|
||||
UFFIVA = Codice ufficio IVA
|
||||
|
@ -46,7 +46,7 @@ RIFBOL = Riferimenti bolle in fattura
|
||||
RIFBOLFAT = Riferimenti bolle in fattura
|
||||
RIPCONS = Stampa riepilogo consegne
|
||||
RITAUDTTMP = Ritiro automatico dotazione temporanea
|
||||
SSCONS = Spese di spedizione alla consegna
|
||||
SSCONS = Spese da addebitare alla consegna
|
||||
STATUS = Stato del contratto, <CH>chiuso, <CO>confermato, <DC>da confermare
|
||||
STDDTPTS = Stampa DDT da pulito con Touch Screen
|
||||
STDICITURA = Stampa dicitura
|
||||
|
@ -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
|
||||
|
@ -12,7 +12,7 @@ CODCFASS = Codice cliente (fornitori) o fornitore (clienti) associato
|
||||
CODCFFATT = Codice cliente (fornitore) cui fatturare
|
||||
CODLIN = Codice lingua
|
||||
CODPAG = Codice pagamento
|
||||
CODRFSO = Missing description
|
||||
CODRFSO = Codice Rappresentate Fisc/Stabile Org
|
||||
CODSTAT = Codice statistico
|
||||
CODVAL = Codice valuta
|
||||
COFI = Codice fiscale
|
||||
@ -22,7 +22,7 @@ CONTO = Conto prevalente (se presente)
|
||||
CONTORIC = Conto prevalente di ricavo (se presente)
|
||||
DATAAGG = Data ultima modifica
|
||||
DATANASC = Data di nascita
|
||||
DATARFSO = Missing description
|
||||
DATARFSO = Data Rappresentate Fisc/Stabile Org
|
||||
DIPPUBB = Dipendente Pubblico
|
||||
DIRTY = Anagrafica modificata (NON UTILIZZATO)
|
||||
DOCMAIL = Indirizzo di posta elettronica per i documenti
|
||||
@ -34,15 +34,15 @@ GRUPPORIC = Gruppo prevalente di ricavo (se presente)
|
||||
IBAN = Codice IBAN
|
||||
INDCF = Indirizzo
|
||||
INDENTE = Indirizzo ente (Dipendente Pubblico)
|
||||
INIFATTEL = Missing description
|
||||
INIREVCHG = Missing description
|
||||
INIFATTEL = Data inizio fatturazione elettronica
|
||||
INIREVCHG = Data inizio reverse charge
|
||||
LOCALITACF = Loacalita'
|
||||
MAIL = Indirizzo di posta elettronica generico
|
||||
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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -26,13 +28,17 @@ DCODNUM = Documento originale CODNUM
|
||||
DESCR = Descrizione
|
||||
DNDOC = Documento originale NDOC
|
||||
DPROVV = Documento originale PROVV
|
||||
ELABF9 = archiviato , data , esclusione
|
||||
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 = Chiavi dell'FPPRO [KEYPRGINVIO;KEYHEADERFATT;KEYBODYFATT]
|
||||
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 +47,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 <P> cancellabile, <C> cespiti, <B> 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 <C>liente o <F>ornitore
|
||||
TIPODOC = Tipo documento
|
||||
TIPOMOV = Tipo movimento
|
||||
|
@ -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
|
||||
|
@ -93,6 +93,7 @@ TARA = Tara
|
||||
TIPOCF = Tipo <C>liente <F>ornitore
|
||||
TIPOCFFATT = Tipo <C>liente <F>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
|
||||
|
@ -78,6 +78,7 @@ S0 =
|
||||
S1 =
|
||||
S10 =
|
||||
S11 =
|
||||
S12 =
|
||||
S2 =
|
||||
S3 =
|
||||
S4 =
|
||||
|
@ -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 =
|
||||
|
@ -1,3 +1,3 @@
|
||||
21
|
||||
0
|
||||
$saldi|||143|0|Saldi|||
|
||||
$saldi|||215|0|Saldi|||
|
||||
|
@ -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
|
||||
|
@ -1,3 +1,3 @@
|
||||
6
|
||||
1
|
||||
%anagr|0|0|613|0|Anagrafica persone fisiche e giuridiche|100||
|
||||
%anagr|0|0|596|0|Anagrafica persone fisiche e giuridiche|100||
|
||||
|
@ -1,5 +1,5 @@
|
||||
6
|
||||
57
|
||||
55
|
||||
TIPOA|1|1|0|
|
||||
CODANAGR|3|5|0|
|
||||
COFI|1|16|0|
|
||||
@ -7,7 +7,6 @@ STATOPAIV|1|3|0|
|
||||
PAIV|1|12|0|
|
||||
COFIEST|1|20|0|
|
||||
DATAAGG|5|8|0|
|
||||
UTENTE|1|16|0|
|
||||
RAGSOC|1|50|0|
|
||||
STATORES|1|3|0|
|
||||
COMRES|1|4|0|
|
||||
@ -56,7 +55,6 @@ OGGETTI|11|10|0|
|
||||
CAUSQUA|1|2|0|
|
||||
CATPAR|1|2|0|
|
||||
ESCPRECOMP|2|1|0|
|
||||
TIPORFSO|7|1|0|Definisce se la persona è un <R>appr. Fiscale, <S>tabile Organizzazione o nessuno dei due
|
||||
4
|
||||
TIPOA+CODANAGR|
|
||||
TIPOA+UPPER(RAGSOC)|X
|
||||
|
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
[MAIN]
|
||||
OEM = 1
|
||||
OEM = 2
|
||||
|
||||
[OEM_0]
|
||||
Administrator = ’—’Œ<EFBFBD>
|
||||
|
BIN
exe/xi.dll
BIN
exe/xi.dll
Binary file not shown.
BIN
exe/xvaga.dll
BIN
exe/xvaga.dll
Binary file not shown.
@ -382,6 +382,7 @@ bool TCond_pag_app::ult_class(TMask_field& f, KEY k)
|
||||
|
||||
bool TCond_pag_app::cond_pagamento(TMask_field& f, KEY k)
|
||||
{
|
||||
/*
|
||||
if (!f.to_check(k) || f.mask().query_mode() || !f.mask().get(F_NUM_RATE).full())
|
||||
return true;
|
||||
// Controllo se il tipo è coerente con quello segnato prima
|
||||
@ -416,6 +417,36 @@ bool TCond_pag_app::cond_pagamento(TMask_field& f, KEY k)
|
||||
warning_box("Impossibile impostare questo tipo di pagamento con %d rate!", nrate);
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
if (f.to_check(k) || (!f.mask().query_mode() && k == K_ENTER))
|
||||
{
|
||||
// Controllo se il tipo è coerente con quello segnato prima
|
||||
int nrate = f.mask().sfield(F_SHEET_RPG).items();
|
||||
|
||||
switch (atoi(f.get().right(1)))
|
||||
{
|
||||
case 1: // Pagamento a rate
|
||||
if (nrate <= 1)
|
||||
{
|
||||
warning_box("Impossibile impostare questo tipo di pagamento con %d rat%c!", nrate, nrate == 0 ? 'e' : 'a');
|
||||
f.set("TP02");
|
||||
}
|
||||
break;
|
||||
// Pagamento completo
|
||||
case 2:
|
||||
if (nrate > 1)
|
||||
{
|
||||
warning_box("Impossibile impostare questo tipo di pagamento con %d rate!", nrate);
|
||||
f.set("TP01");
|
||||
}
|
||||
break;
|
||||
// Pagamento anticipo
|
||||
case 3:
|
||||
// Non so che fare!
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// qui viene il belloccio
|
||||
|
@ -25,3 +25,5 @@
|
||||
#define FLD_INDET_S4 126
|
||||
#define FLD_NATURA 127
|
||||
#define CHK_TABIVA_B5 128
|
||||
#define FLD_NUM_B6 129
|
||||
#define FLD_DEN_B7 130
|
||||
|
@ -332,6 +332,18 @@ BEGIN
|
||||
FIELD B2
|
||||
END
|
||||
|
||||
BOOLEAN FLD_NUM_B6
|
||||
BEGIN
|
||||
PROMPT 3 23 "Fa parte del numeratore pro-rata"
|
||||
FIELD B6
|
||||
END
|
||||
|
||||
BOOLEAN FLD_DEN_B7
|
||||
BEGIN
|
||||
PROMPT 40 23 "Fa parte del denominatore pro-rata"
|
||||
FIELD B7
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
@ -39,7 +39,7 @@ TFsc_anal_msk::TFsc_anal_msk()
|
||||
read("ca0700a");
|
||||
|
||||
const bool use_pdcc = ca_config().get_bool("UsePdcc");
|
||||
const int nfields = ca_create_fields(*this, 0, use_pdcc ? LF_PCON : LF_PCONANA, 2 + compute_offset(), 8, F_FSCPDA1, F_FSCDES1, 0x0, FASI_CODCONTO);
|
||||
const int nfields = ca_create_fields(*this, 0, use_pdcc ? LF_PCON : LF_PCONANA, 2 + compute_offset(), 8, 1, F_FSCDES1, 0x0, FASI_CODCONTO);
|
||||
int from = 1;
|
||||
|
||||
for (int i = 0; i < nfields; i++)
|
||||
@ -124,7 +124,8 @@ bool TFsc_app::user_create()
|
||||
if (mci.levels() <= 0)
|
||||
return error_box(TR("Le fasi non sono state configurate"));
|
||||
|
||||
//eventuali filtri per utente
|
||||
|
||||
//eventuali filtri per utente
|
||||
_has_filter = cache().get("%AUC", user(), "S2").full();
|
||||
|
||||
return TAnal_app::user_create();
|
||||
|
@ -298,7 +298,7 @@ TAssoc_array& TPrint_saldana_recordset::get_row(TAssoc_array& cms, const char* c
|
||||
//cerca se la commessa (e l'eventuale fase) esistono gia' nell'assocarray delle commesse
|
||||
TAssoc_array* riga_array = (TAssoc_array*)cms.objptr(chiave);
|
||||
//se non esiste la crea!
|
||||
if (riga_array == NULL)
|
||||
if (riga_array == nullptr)
|
||||
{
|
||||
riga_array = new TAssoc_array;
|
||||
|
||||
@ -577,7 +577,7 @@ const TString& TPrint_saldana_recordset::crea_select(const int logicnum)
|
||||
if (_fase.full())
|
||||
{
|
||||
TString clause;
|
||||
clause << ca_dollar2fieldname(logicnum, "$(FAS)") << "=\"" << _fase << "\"";
|
||||
clause << ca_dollar2fieldname(logicnum, "$(FAS)") << "==\"" << _fase << "\"";
|
||||
ca_append_and(select, clause);
|
||||
}
|
||||
break;
|
||||
@ -586,7 +586,7 @@ const TString& TPrint_saldana_recordset::crea_select(const int logicnum)
|
||||
if (_cdc.full())
|
||||
{
|
||||
TString clause;
|
||||
clause << ca_dollar2fieldname(logicnum, "$(CDC)") << "=\"" << _cdc << "\"";
|
||||
clause << ca_dollar2fieldname(logicnum, "$(CDC)") << "==\"" << _cdc << "\"";
|
||||
ca_append_and(select, clause);
|
||||
}
|
||||
break;
|
||||
@ -595,14 +595,14 @@ const TString& TPrint_saldana_recordset::crea_select(const int logicnum)
|
||||
{
|
||||
TString clause;
|
||||
if (_fase.full() && _cdc.full())
|
||||
clause << "(" << ca_dollar2fieldname(logicnum, "$(FAS)") << "=\"" << _fase
|
||||
<< "\")&&(" << ca_dollar2fieldname(logicnum, "$(CDC)") << "=\"" << _cdc << "\")";
|
||||
clause << "(" << ca_dollar2fieldname(logicnum, "$(FAS)") << "==\"" << _fase
|
||||
<< "\")&&(" << ca_dollar2fieldname(logicnum, "$(CDC)") << "==\"" << _cdc << "\")";
|
||||
else
|
||||
{
|
||||
if (_fase.full())
|
||||
clause << ca_dollar2fieldname(logicnum, "$(FAS)") << "=\"" << _fase << "\"";
|
||||
clause << ca_dollar2fieldname(logicnum, "$(FAS)") << "==\"" << _fase << "\"";
|
||||
else
|
||||
clause << ca_dollar2fieldname(logicnum, "$(CDC)") << "=\"" << _cdc << "\"";
|
||||
clause << ca_dollar2fieldname(logicnum, "$(CDC)") << "==\"" << _cdc << "\"";
|
||||
}
|
||||
ca_append_and(select, clause);
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ int file4tempLow( FILE4 *file, CODE4 *c4, const int autoRemove )
|
||||
|
||||
time( &t ) ;
|
||||
t %= 10000L ;
|
||||
c4ltoa45( t, fileName + 4, -4 ) ;
|
||||
c4ltoa45( (long) t, fileName + 4, -4 ) ;
|
||||
u4nameMake( name, sizeof( name ), drive, env + strlen( drive ), fileName ) ;
|
||||
|
||||
rc = file4create( file, c4, name, 1 ) ;
|
||||
|
@ -153,6 +153,9 @@ bool TLiquidazione_app::user_create()
|
||||
{
|
||||
_year = subj.get(0);
|
||||
_month = subj.get_int(1);
|
||||
_is_liq_acconto = _month == 20;
|
||||
if (_is_liq_acconto)
|
||||
_month = 12;
|
||||
ditta = subj.get_long(2);
|
||||
char rcl = *(subj.get(3));
|
||||
TRectype & lim = (TRectype &) get_lim(_month);
|
||||
@ -586,10 +589,15 @@ bool TLiquidazione_app::ch_year_handler(TMask_field& f, KEY key)
|
||||
(wht)f.mask().get_int(CG43_RDB_VERS) : all);
|
||||
TMask& msk = f.mask();
|
||||
const int vers = msk.get_int(CG43_RDB_VERS);
|
||||
const int m = (vers == 3) ? msk.get_int(CG43_LST_TRIM) : msk.get_int(CG43_LST_MESE);
|
||||
int m = (vers == 3) ? msk.get_int(CG43_LST_TRIM) : msk.get_int(CG43_LST_MESE);
|
||||
|
||||
app()._is_liq_acconto = (m == 20);
|
||||
if (app()._is_liq_acconto)
|
||||
m = 12;
|
||||
|
||||
const TRectype & lim = app().get_lim(m);
|
||||
const bool def = lim.get_bool("B1");
|
||||
const bool calc = !def && (lim.empty() || lim.get_bool("B0"));
|
||||
const bool calc = app()._is_liq_acconto || (!def && (lim.empty() || lim.get_bool("B0")));
|
||||
|
||||
msk.set(CG43_CHK_CALCULATE, app()._lim_cleared && calc, 0x3);
|
||||
msk.set(CG43_CHK_FINAL, app()._lim_cleared && def, 0x3);
|
||||
@ -690,6 +698,11 @@ bool TLiquidazione_app::what_freq_handler(TMask_field& f, KEY key)
|
||||
if (key == K_SPACE)
|
||||
{
|
||||
int month = f.mask().get_int(CG43_LST_MESE);
|
||||
|
||||
app()._is_liq_acconto = (month == 20);
|
||||
if (app()._is_liq_acconto)
|
||||
month = 12;
|
||||
|
||||
if (f.get()[0] == '3') // trimestre intelligente
|
||||
{
|
||||
if (month > 3)
|
||||
@ -778,7 +791,11 @@ bool TLiquidazione_app::chk_calculate_handler(TMask_field& f, KEY key)
|
||||
TMask& m = f.mask();
|
||||
// Abilita solo se il mese di ricalcolo e' != 13 (annuale) e non e' checkkato il campo
|
||||
const int vers = m.get_int(CG43_RDB_VERS);
|
||||
const int mese = vers == 3 ? m.get_int(CG43_LST_TRIM) : m.get_int(CG43_LST_MESE);
|
||||
int mese = vers == 3 ? m.get_int(CG43_LST_TRIM) : m.get_int(CG43_LST_MESE);
|
||||
|
||||
app()._is_liq_acconto = (mese == 20);
|
||||
if (app()._is_liq_acconto)
|
||||
mese = 12;
|
||||
const bool abilita = m.get_bool(CG43_CHK_CALCULATE) && mese != 13;
|
||||
m.enable(CG43_LST_CALC, abilita);
|
||||
}
|
||||
@ -893,6 +910,16 @@ bool TLiquidazione_app::set_liquidazione()
|
||||
// handlers have set everything
|
||||
_month = _what == trimestre ? m.get_int(CG43_LST_TRIM) : m.get_int(CG43_LST_MESE);
|
||||
|
||||
app()._is_liq_acconto = (_month == 20);
|
||||
if (app()._is_liq_acconto)
|
||||
{
|
||||
_month = 12;
|
||||
_recalc = one;
|
||||
}
|
||||
else
|
||||
_recalc = m.get_bool(CG43_CHK_CALCULATE) ? one : never;
|
||||
|
||||
|
||||
_year = m.get(CG43_FLD_ANNO);
|
||||
_date = m.get(CG43_FLD_DATA);
|
||||
_isprint = m.get_bool(CG43_CHK_STAMPA);
|
||||
|
@ -27,15 +27,16 @@ BEGIN
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
LIST CG43_LST_MESE 15
|
||||
LIST CG43_LST_MESE 20
|
||||
BEGIN
|
||||
PROMPT 28 3 "Periodo "
|
||||
HELP "Mese per cui effettuare il calcolo liquidazione"
|
||||
ITEM "13|13a liquid."
|
||||
ITEM "20|Acconto Dicembre"
|
||||
FLAGS "MP"
|
||||
END
|
||||
|
||||
LIST CG43_LST_TRIM 15
|
||||
LIST CG43_LST_TRIM 20
|
||||
BEGIN
|
||||
PROMPT 28 3 "Periodo "
|
||||
HELP "Trimestre di cui effettuare il calcolo liquidazione"
|
||||
@ -44,6 +45,7 @@ BEGIN
|
||||
ITEM "9|3 Trimestre "
|
||||
ITEM "12|4 Trimestre"
|
||||
ITEM "13|13a liquid."
|
||||
ITEM "20|Acconto Dicembre"
|
||||
END
|
||||
|
||||
BOOLEAN CG43_CHK_CALCULATE
|
||||
|
@ -1157,7 +1157,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
#ifdef DBG
|
||||
long nr = _mov->get_long(MOV_NUMREG);
|
||||
|
||||
if (nr == 97882 || nr == 98707)
|
||||
if (nr == 18489 || nr == 27710)
|
||||
int i = 1;
|
||||
#endif
|
||||
|
||||
@ -1184,10 +1184,6 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
if (date.year() != year_int) // Controlla anno di appartenenza, altrimenti is_date_ok potrebbe non funzionare
|
||||
continue;
|
||||
}
|
||||
#ifdef DBG
|
||||
if (nr == 97882 || nr == 98707)
|
||||
int i = 1;
|
||||
#endif
|
||||
const TRectype& rcs = _cur->curr(LF_CAUSALI);
|
||||
const TDate datareg = _mov->get_date(MOV_DATAREG);
|
||||
const TDate datadoc = _mov->get_date(MOV_DATADOC);
|
||||
@ -1240,7 +1236,6 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
TPointer_array pagscatt; // Righe di pagsca interessate
|
||||
|
||||
#ifdef DBG
|
||||
if (nr == 97882 || nr == 98707)
|
||||
int i = 1;
|
||||
#endif
|
||||
|
||||
@ -1285,7 +1280,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
bool regular_month = orizzonte >= date;
|
||||
bool first_month = regular_month && date > inizio + 1L;
|
||||
#ifdef DBG
|
||||
if (nr == 97882 || nr == 98707)
|
||||
if (rp.get_long(PART_NREG) == 100616)
|
||||
int i = 1;
|
||||
#endif
|
||||
flag_pg_nc = rp.calcola_pagato_periodo(first_month ? botime : inizio + 1L, orizzonte, pg_per, nc_per, &pagscatt) && regular_month;
|
||||
@ -1555,7 +1550,6 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
#ifdef DBG
|
||||
long nr = _mov->get_long(MOV_NUMREG);
|
||||
|
||||
if (nr == 97882 || nr == 98707)
|
||||
int i = 1;
|
||||
#endif
|
||||
|
||||
@ -1648,11 +1642,11 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
const TPartita& p = arrpart.partita(pagsca);
|
||||
const TRiga_partite& rp = p.riga(nrigp);
|
||||
|
||||
datapag = rp.get(PART_DATAPAG);
|
||||
datapag = rp.get(PART_DATAREG);
|
||||
if (!datapag.ok())
|
||||
datapag = rp.get(PART_DATADOC);
|
||||
if (!datapag.ok())
|
||||
datapag = rp.get(PART_DATAREG);
|
||||
datapag = rp.get(PART_DATAPAG);
|
||||
if (datapag < datafat)
|
||||
datapag = datafat;
|
||||
}
|
||||
@ -1942,6 +1936,82 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Calcoli sprecati: dal 2016 calcolimao la comuncazione annuale direttamente in cg5
|
||||
const TString& iva_vpn = _iva->get(tipomov == vendita ? "S10" : "S11");
|
||||
|
||||
// Aggiunto "&& is_detraibile==0" al test altrimenti somma due volte imponibile_orig (22/01/2015)
|
||||
if (!bIsMovDiff && iva_vpn.full() && _mov->get_int(MOV_ANNOIVA) == year_int && is_detraibile == 0)
|
||||
{
|
||||
switch (tipomov)
|
||||
{
|
||||
case vendita: // CD1 - 1 2 3 4
|
||||
{
|
||||
// bool is_valid = !corrisp && tipodoc != "AF" && (cau_intra || !cau_valintra) &&
|
||||
// sosp_imp != normale && sosp_imp != liquidazione;
|
||||
bool is_valid = tipodoc != "AF" && sosp_imp != normale && sosp_imp != liquidazione;
|
||||
if (is_valid)
|
||||
{
|
||||
cessioni_cd1_1 += imponibile_orig;
|
||||
if (iva_vpn.starts_with("CD1"))
|
||||
{
|
||||
if (tipocr == 4)
|
||||
cessioni_cd1_5 += imponibile_orig;
|
||||
}
|
||||
if (!cau_intra)
|
||||
{
|
||||
if (iva_vpn == "CD12")
|
||||
cessioni_cd1_2 += imponibile_orig; else
|
||||
if (iva_vpn == "CD13")
|
||||
cessioni_cd1_3 += imponibile_orig;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (iva_vpn == "CD14")
|
||||
cessioni_cd1_4 += imponibile_orig;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case acquisto: // CD2 - 1 2 3 4
|
||||
{
|
||||
acquisti_cd2_1 += imponibile_orig;
|
||||
if (iva_vpn.starts_with("CD2"))
|
||||
{
|
||||
if (tipocr == 2 || tipocr == 3 || tipocr == 8)
|
||||
acquisti_cd2_5 += imponibile_orig;
|
||||
}
|
||||
if (!cau_intra)
|
||||
{
|
||||
if (iva_vpn == "CD22")
|
||||
acquisti_cd2_2 += imponibile_orig;
|
||||
else
|
||||
if (iva_vpn == "CD23")
|
||||
acquisti_cd2_3 += imponibile_orig;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (iva_vpn == "CD24")
|
||||
acquisti_cd2_4 += imponibile_orig;
|
||||
}
|
||||
if (iva_vpn == "CD31")
|
||||
{
|
||||
oroargento_cd3_1 += imponibile_orig;
|
||||
oroargento_cd3_2 += imposta_orig;
|
||||
}
|
||||
if (iva_vpn == "CD33")
|
||||
{
|
||||
rottami_cd3_3 += imponibile_orig;
|
||||
rottami_cd3_4 += imposta_orig;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
bool bMovDiffToAdd = true;
|
||||
@ -2850,10 +2920,10 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
|
||||
// Somma i vari prorata calcolati per gli anni precedenti
|
||||
prorata += prorata_precedente1 + prorata_precedente2;
|
||||
acquisti_iva -= prorata; // Rettifica acquisti_iva
|
||||
prorata += prorata_diff;
|
||||
if (!lia.get_bool("B7"))
|
||||
prorata = ZERO;
|
||||
acquisti_iva -= prorata; // Rettifica acquisti_iva
|
||||
fdiffinc_iva_acq -= prorata_diff; // Rettifica acquisti_iva differiti incassati
|
||||
}
|
||||
look_plm(month, codatt, true);
|
||||
@ -4562,6 +4632,8 @@ void TLiquidazione_app::recalc_annual(const char* att, bool & first)
|
||||
TAssoc_array corr_ann;
|
||||
_CorrItem *cc;
|
||||
bool is_key;
|
||||
real num_pro_rata;
|
||||
real den_pro_rata;
|
||||
|
||||
_pim->zero(); _pim->put("CODTAB", _year); // 24-02-2014 Partiamo dall'anno giusto
|
||||
for (int err = _pim->read(_isgteq); err == NOERR; err = _pim->next())
|
||||
@ -4569,6 +4641,7 @@ void TLiquidazione_app::recalc_annual(const char* att, bool & first)
|
||||
if (_year != *_pim_anno || _month != atoi(*_pim_mese)) // In questo caso _month vale sempre 13
|
||||
continue;
|
||||
|
||||
|
||||
const int tipocr = atoi(*_pim_tipocr);
|
||||
codiva = *_pim_codiva;
|
||||
reg = *_pim_codreg;
|
||||
@ -4608,6 +4681,13 @@ void TLiquidazione_app::recalc_annual(const char* att, bool & first)
|
||||
volaff1 += imp_ifs;
|
||||
else
|
||||
volaff2 += imp_ifs;
|
||||
|
||||
TCodiceIVA ci(codiva);
|
||||
|
||||
if (ci.numeratore_pro_rata())
|
||||
num_pro_rata += imp_ifs;
|
||||
if (ci.denominatore_pro_rata())
|
||||
den_pro_rata += imp_ifs;
|
||||
}
|
||||
|
||||
// Ora si scorporano i corrispettivi raggruppati per codice IVA e si totalizzano gli imponibili
|
||||
@ -4620,6 +4700,13 @@ void TLiquidazione_app::recalc_annual(const char* att, bool & first)
|
||||
volaff1 += imp;
|
||||
else
|
||||
volaff2 += imp;
|
||||
|
||||
TCodiceIVA ci(codiva);
|
||||
|
||||
if (ci.numeratore_pro_rata())
|
||||
num_pro_rata += imp;
|
||||
if (ci.denominatore_pro_rata())
|
||||
den_pro_rata += imp;
|
||||
}
|
||||
|
||||
// calcola esenti, cessioni, lordo vendite, prorata pagato
|
||||
@ -4685,8 +4772,9 @@ void TLiquidazione_app::recalc_annual(const char* att, bool & first)
|
||||
const int tipomov = id.get(ID_TIPOMOV).as_int();
|
||||
const int annoliq = id.get(ID_ANNOLIQ).as_int();
|
||||
const TDate dataregp = id.get(ID_DATAREGP).as_date();
|
||||
const TImporto imp(sezione, id.get(RMI_IMPONIBILE).as_real());
|
||||
TImporto imp(sezione, id.get(RMI_IMPONIBILE).as_real());
|
||||
|
||||
imp.normalize('D');
|
||||
key = id.get(ID_NUMREG).as_string();
|
||||
key.add(id.get(ID_NUMRIG).as_string());
|
||||
codiva = cache().get(LF_RMOVIVA, key, RMI_CODIVA);
|
||||
@ -4702,6 +4790,13 @@ void TLiquidazione_app::recalc_annual(const char* att, bool & first)
|
||||
}
|
||||
if ((annoliq == year) && (tipoiva == 1))
|
||||
tot1 += imp;
|
||||
|
||||
TCodiceIVA ci(codiva);
|
||||
|
||||
if (ci.numeratore_pro_rata())
|
||||
num_pro_rata += imp.valore();
|
||||
if (ci.denominatore_pro_rata())
|
||||
den_pro_rata += imp.valore();
|
||||
}
|
||||
}
|
||||
first = false;
|
||||
|
@ -58,6 +58,7 @@ bool TLiquidazione_app::is_month_ok(int x, int mtocalc) const
|
||||
// per l'annuale ritorna true per tutti i mesi da liquidare
|
||||
ret = x <= 13;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -138,7 +139,12 @@ bool TLiquidazione_app::is_date_ok(const TDate& d, int month, int liqmonth, int
|
||||
else // Nuova selezione dal 1998 in poi
|
||||
{
|
||||
if (month <= 12)
|
||||
{
|
||||
if (_is_liq_acconto)
|
||||
return (regyear == year) && ((regmonth == month && liqmonth == 0) || (liqmonth == month)) && (d.day() <= _ver->giorno_acc());
|
||||
else
|
||||
return (regyear == year) && ((regmonth == month && liqmonth == 0) || (liqmonth == month));
|
||||
}
|
||||
else // Annuale, month == 13
|
||||
return (regyear == year && liqmonth != 12) || (regyear == year + 1 && liqmonth == 12);
|
||||
}
|
||||
|
@ -809,62 +809,6 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
||||
art40_iva += va7v;
|
||||
}
|
||||
}
|
||||
// if (tipomov == vendita) // ci sono anche gli acquisti per cassa!
|
||||
{
|
||||
/* Non voglio piu' il riepilogo delle fatture emesse IVA diff
|
||||
if (!diffimp.is_zero() || !diffiva.is_zero() ||
|
||||
!diffimp_acq.is_zero() || !diffiva_acq.is_zero())
|
||||
{
|
||||
const word id = describe_pis ? PIS_ROW_D : PIM_ROW_D;
|
||||
int j;
|
||||
|
||||
d = NULL;
|
||||
for (j = totpos + 1; j < _descr_arr.items(); j++)
|
||||
{
|
||||
_DescrItem * wd = (_DescrItem*)&_descr_arr[j];
|
||||
const bool found = wd->_flags == id && wd->_s0 == ref;
|
||||
|
||||
if (found && wd->_s1 == codiva)
|
||||
{
|
||||
d = wd;
|
||||
break;
|
||||
}
|
||||
if (wd->_flags == TOT_ROW_D)
|
||||
break;
|
||||
if (found && wd->_s1 > codiva)
|
||||
break;
|
||||
}
|
||||
if (d == NULL)
|
||||
{
|
||||
const bool isfirst = head == NULL;
|
||||
|
||||
if (isfirst)
|
||||
{
|
||||
head = new _DescrItem(describe_pis ? PIS_HEAD_D : PIM_HEAD_D);
|
||||
_descr_arr.insert(head, j++);
|
||||
head->_f0 = false;
|
||||
head->_f1 = true;
|
||||
head->_f2 = atoi(activity.right(1)); // Tipo attività = 1 (servizi) o 2 (mista)
|
||||
head->_f3 = tipomov;
|
||||
totd = new _DescrItem(TOT_ROW_D);
|
||||
_descr_arr.insert(totd, j);
|
||||
}
|
||||
d = new _DescrItem(id);
|
||||
_descr_arr.insert(d, j);
|
||||
d->_f0 = isfirst;
|
||||
d->_s0 = ref;
|
||||
d->_s1 = codiva;
|
||||
}
|
||||
d->_r26 += diffimp;
|
||||
d->_r27 += diffiva;
|
||||
t26 += diffimp;
|
||||
t27 += diffiva;
|
||||
d->_r30 += diffimp_acq;
|
||||
d->_r31 += diffiva_acq;
|
||||
t30 += diffimp_acq;
|
||||
t31 += diffiva_acq;
|
||||
}
|
||||
*/
|
||||
if (!diffincimp.is_zero() || !diffinciva.is_zero() ||
|
||||
!diffincimp_acq.is_zero() || !diffinciva_acq.is_zero())
|
||||
{
|
||||
@ -915,7 +859,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
||||
t32 += diffincimp_acq;
|
||||
t33 += diffinciva_acq;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} // End of _pim cycle
|
||||
|
||||
@ -1170,17 +1114,17 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
||||
real pr;
|
||||
const real rsa = ris - (e3-e5) - (e4-e6) - ven_rev;
|
||||
const real rsn = rsa - e1;
|
||||
const real prsa = _pla->get_real("R20");
|
||||
const real prsn = _pla->get_real("R19");
|
||||
|
||||
if (!rsa.is_zero())
|
||||
if (!prsa.is_zero())
|
||||
{
|
||||
pr = CENTO - (rsn * CENTO / rsa); // Percentuale di indetraibilita: reciproco della percentuale di detraibilita'
|
||||
pr = CENTO - (prsn * CENTO / prsa); // Percentuale di indetraibilita: reciproco della percentuale di detraibilita'
|
||||
pr.round(0);
|
||||
}
|
||||
|
||||
real co = 0.0;
|
||||
real topay = 0.0;
|
||||
//if (pr != _prorata.current())
|
||||
{
|
||||
// calcolo conguaglio -- se positivo e' a debito
|
||||
if (pr > ZERO)
|
||||
{
|
||||
@ -1189,7 +1133,6 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
||||
}
|
||||
co = topay - ppg;
|
||||
round_imposta(co);
|
||||
}
|
||||
|
||||
_DescrItem* dd = new _DescrItem(ANNUAL);
|
||||
|
||||
@ -1221,8 +1164,10 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
||||
dd->_r8 = e5;
|
||||
dd->_r9 = e6;
|
||||
dd->_r10 = vrc;
|
||||
dd->_ra0 = rsa;
|
||||
dd->_ra1 = rsn;
|
||||
dd->_ra0 = prsa;
|
||||
dd->_ra1 = prsn;
|
||||
dd->_ra2 = rsa;
|
||||
dd->_ra3 = rsn;
|
||||
t->_arr.add(dd);
|
||||
}
|
||||
}
|
||||
@ -1454,6 +1399,9 @@ void TLiquidazione_app::set_firm(_DescrItem& d)
|
||||
if (d._s2 == "T")
|
||||
tim_title << format(FR(" del %d° Trimestre %s"), d._f1/3, (const char*) _year);
|
||||
else
|
||||
if (_is_liq_acconto)
|
||||
tim_title << format(FR(" al %d %s %s"), _ver->giorno_acc(), itom(d._f1), (const char*)_year);
|
||||
else
|
||||
tim_title << format(FR(" del mese di %s %s"), itom(d._f1), (const char*)_year);
|
||||
}
|
||||
|
||||
@ -1515,6 +1463,9 @@ void TLiquidazione_app::set_att(_DescrItem& d)
|
||||
if (d._s4 == "T")
|
||||
tim_title << format(FR(" del %d° Trimestre %s"), d._f1 / 3, (const char*)_year);
|
||||
else
|
||||
if (_is_liq_acconto)
|
||||
tim_title << format(FR(" al %d %s %s"), _ver->giorno_acc(), itom(d._f1), (const char*)_year);
|
||||
else
|
||||
tim_title << format(FR(" del mese di %s %s"), itom(d._f1), (const char*)_year);
|
||||
}
|
||||
|
||||
|
@ -457,7 +457,14 @@ bool TStampa_registri_app::mask_mese (TMask_field& f, KEY k)
|
||||
if (id == MESE) //Per stampa su libro unico
|
||||
mese = f.mask().get_int(MESE);
|
||||
if (id == FINO_A_MESE)
|
||||
{
|
||||
mese = m.get_int(FINO_A_MESE); //Per stampa su bollato
|
||||
if (mese == 20)
|
||||
mese = 12;
|
||||
if (mese == 12)
|
||||
m.show(TIPO_RIEPILOGATIVO);
|
||||
else m.hide(TIPO_RIEPILOGATIVO);
|
||||
}
|
||||
if (id == MESE)
|
||||
{
|
||||
if (mese == 12)
|
||||
@ -470,13 +477,10 @@ bool TStampa_registri_app::mask_mese (TMask_field& f, KEY k)
|
||||
m.hide (TIPO_RIEPILOGATIVO);
|
||||
m.hide (RIF_VID);
|
||||
}
|
||||
mese = m.get_int(FINO_A_MESE); //Per stampa su bollato
|
||||
if (mese == 20)
|
||||
mese = 12;
|
||||
}
|
||||
if (id == FINO_A_MESE)
|
||||
{
|
||||
if (mese == 12)
|
||||
m.show (TIPO_RIEPILOGATIVO);
|
||||
else m.hide (TIPO_RIEPILOGATIVO);
|
||||
}
|
||||
}
|
||||
if (k==K_TAB && f.mask().is_running())
|
||||
{
|
||||
@ -601,6 +605,11 @@ bool TStampa_registri_app::mask_libun (TMask_field& f, KEY k)
|
||||
|
||||
const TString& cod = f.mask().get(CODICE_LIBRO_IVA);
|
||||
int fino_a_mese = f.mask().get_int(MESE);
|
||||
|
||||
if (fino_a_mese == 12)
|
||||
f.mask().show(TIPO_RIEPILOGATIVO);
|
||||
else f.mask().hide(TIPO_RIEPILOGATIVO);
|
||||
|
||||
int anno = f.mask().get_int(ANNO);
|
||||
bool ok = false;
|
||||
int last_mese = 13;
|
||||
@ -926,7 +935,8 @@ bool TStampa_registri_app::user_create()
|
||||
add_file(LF_MOV);
|
||||
add_file(LF_RMOVIVA);
|
||||
|
||||
return true;
|
||||
_ver = new TInteressi_IVA_table();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TStampa_registri_app::user_destroy()
|
||||
@ -935,6 +945,7 @@ bool TStampa_registri_app::user_destroy()
|
||||
delete _nditte;
|
||||
delete _tabreg;
|
||||
delete _rel;
|
||||
delete _ver;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -2305,7 +2316,7 @@ bool TStampa_registri_app::preprocess_page(int file, int counter)
|
||||
merge_export_file(t,false,true);
|
||||
_intesta_liq = false;
|
||||
reset_print();
|
||||
remove(t);
|
||||
t.fremove();
|
||||
}
|
||||
}
|
||||
_st_liq[m] = true;
|
||||
@ -3118,7 +3129,7 @@ void TStampa_registri_app::liq_b0_settato()
|
||||
_intesta_liq = true;
|
||||
merge_export_file(f,false,true);
|
||||
_intesta_liq = false;
|
||||
remove(f);
|
||||
f.fremove();
|
||||
}
|
||||
}
|
||||
|
||||
@ -3302,8 +3313,12 @@ void TStampa_registri_app::aggiorna_reg(const bool aggiorna_vidi)
|
||||
if (!_mov_empty) //cioe' se e' stata stampata almeno una pagina
|
||||
{ //controllo inutile visto che e' chiamata nella
|
||||
//preprocess_header
|
||||
TDate ultima_data(_datareg);
|
||||
ultima_data.set_end_month();
|
||||
TDate ultima_data(_datareg);
|
||||
|
||||
if (_stampa_acconto)
|
||||
ultima_data.set_day(_ver->giorno_acc());
|
||||
else
|
||||
ultima_data.set_end_month();
|
||||
|
||||
if (ultima_data > d)
|
||||
Tabreg.put("D3", ultima_data);
|
||||
@ -3313,7 +3328,7 @@ void TStampa_registri_app::aggiorna_reg(const bool aggiorna_vidi)
|
||||
|
||||
Tabreg.put("I1", _pagine_stampate);
|
||||
|
||||
if (_intesta_liq)
|
||||
if (!_stampa_acconto && _intesta_liq)
|
||||
if (_tipo_riepilogativo == 'A')
|
||||
Tabreg.put("I4", 13L);
|
||||
else Tabreg.put("I4", (long)_datareg.month());
|
||||
@ -3585,7 +3600,7 @@ void TStampa_registri_app::no_movimenti()
|
||||
merge_export_file(f,false,true);
|
||||
printer().formfeed();
|
||||
_intesta_liq = false;
|
||||
remove(f);
|
||||
f.fremove();
|
||||
}
|
||||
}
|
||||
}//for
|
||||
@ -3638,7 +3653,7 @@ void TStampa_registri_app::stampa_liq_mesi_succ()
|
||||
printer().formfeed();
|
||||
merge_export_file(t,false,true);
|
||||
_intesta_liq = false;
|
||||
remove(t);
|
||||
t.fremove();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3657,10 +3672,15 @@ void TStampa_registri_app::send_message(char tipo, const TFilename& nome, int me
|
||||
|
||||
TToken_string ss(36);
|
||||
ss.add(_annoIVA);
|
||||
if (_tipo_riepilogativo == 'A' && mese == 12)
|
||||
ss.add(13);
|
||||
else
|
||||
ss.add(mese);
|
||||
if (_tipo_riepilogativo == 'A' && mese == 12)
|
||||
ss.add(13);
|
||||
else
|
||||
{
|
||||
if (_stampa_acconto)
|
||||
ss.add(20);
|
||||
else
|
||||
ss.add(mese);
|
||||
}
|
||||
ss.add(_ditta);
|
||||
ss.add(tipo);
|
||||
ss.add(_data_stampa.string());
|
||||
@ -3753,9 +3773,14 @@ bool TStampa_registri_app::set_print(int n)
|
||||
}
|
||||
else //stampe definitive
|
||||
{
|
||||
_fino_a_mese = m.get_int(FINO_A_MESE);
|
||||
_stampa_acconto = (_fino_a_mese == 20);
|
||||
|
||||
if (_stampa_acconto)
|
||||
_fino_a_mese = 12;
|
||||
if (_tipo_stampa == bollato || _tipo_stampa == rif_giornale)
|
||||
{
|
||||
_fino_a_mese = m.get_int(FINO_A_MESE);
|
||||
|
||||
_data_da = TDate(1, 1, _annoIVA); // Meglio cosi'
|
||||
}
|
||||
else //stampa su libro unico
|
||||
@ -3771,7 +3796,15 @@ bool TStampa_registri_app::set_print(int n)
|
||||
int giorni_del_mese = 31;
|
||||
if (_fino_a_mese == 12)
|
||||
{
|
||||
giorni_del_mese = 31;
|
||||
TInteressi_IVA_table i; i.read(_annoIVA, _fino_a_mese);
|
||||
|
||||
giorni_del_mese = i.get_int("I0");
|
||||
if (_stampa_acconto)
|
||||
giorni_del_mese = _ver->giorno_acc();
|
||||
{
|
||||
if (giorni_del_mese == 0)
|
||||
giorni_del_mese = 31;
|
||||
}
|
||||
_tipo_riepilogativo = m.get(TIPO_RIEPILOGATIVO)[0];
|
||||
}
|
||||
else
|
||||
|
@ -57,6 +57,7 @@ class TStampa_registri_app : public TPrintapp
|
||||
long _u_stampata, _primast, __firm, _uprotivap, _ditta;
|
||||
long _numini, _pagine_stampate;
|
||||
int _fino_a_mese, _cod_un_loc;
|
||||
bool _stampa_acconto;
|
||||
int _annoIVA, _r, _stampa_width, _mese_ultima_liq, _mese_credito;
|
||||
int _stampa_len, _stampa_mese, _size_header;
|
||||
real _totale_doc, _credito;
|
||||
@ -72,7 +73,8 @@ class TStampa_registri_app : public TPrintapp
|
||||
|
||||
messaggio _scelta;
|
||||
tipo_stampa _tipo_stampa;
|
||||
|
||||
TInteressi_IVA_table* _ver;
|
||||
|
||||
protected:
|
||||
|
||||
static bool filter_func (const TRelation * r);
|
||||
|
@ -158,18 +158,20 @@ BEGIN
|
||||
GROUP 3
|
||||
END
|
||||
|
||||
LISTBOX FINO_A_MESE 10
|
||||
LISTBOX FINO_A_MESE 20
|
||||
BEGIN
|
||||
PROMPT 3 9 "Fino al mese "
|
||||
HELP "Mese fino al quale eseguire la stampa"
|
||||
ITEM "20|Acconto di dicembre"
|
||||
FLAGS "M"
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
LISTBOX MESE 10
|
||||
LISTBOX MESE 20
|
||||
BEGIN
|
||||
PROMPT 3 9 "Mese "
|
||||
HELP "Mese di cui eseguire la stampa"
|
||||
ITEM "20|Acconto di dicembre"
|
||||
FLAGS "M"
|
||||
GROUP 2
|
||||
END
|
||||
|
@ -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 "æ"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -62,7 +62,7 @@ BEGIN
|
||||
OUTPUT F_CAB CODTAB[6,10]
|
||||
OUTPUT F_PRO CODTAB[11,12]
|
||||
OUTPUT F_BANCA 4->S0
|
||||
|
||||
CHECTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_BANCA 50 47
|
||||
|
@ -5,14 +5,14 @@ TOOLBAR "topbar" 0 0 0 2
|
||||
BUTTON B_ORDER 2 2
|
||||
BEGIN
|
||||
PROMPT 1 5 "Ordinamento"
|
||||
PICTURE TOOL_EDIT
|
||||
PICTURE TOOL_PERMISSIONS
|
||||
FLAGS ""
|
||||
END
|
||||
|
||||
BUTTON B_ASSOC 2 2
|
||||
BEGIN
|
||||
PROMPT 1 6 "Associa mov."
|
||||
PICTURE TOOL_SAVEREC
|
||||
PICTURE TOOL_PERMISSIONS
|
||||
FLAGS ""
|
||||
END
|
||||
|
||||
@ -25,14 +25,14 @@ END
|
||||
BUTTON B_SELESCL 2 2
|
||||
BEGIN
|
||||
PROMPT 1 8 "Sel. esclusi"
|
||||
PICTURE TOOL_MULTISEL
|
||||
PICTURE TOOL_PERMISSIONS
|
||||
FLAGS ""
|
||||
END
|
||||
|
||||
BUTTON B_ESCL 2 2
|
||||
BEGIN
|
||||
PROMPT 1 7 "Conf. esclusi"
|
||||
PICTURE TOOL_WARNING
|
||||
PICTURE TOOL_PERMISSIONS
|
||||
FLAGS ""
|
||||
END
|
||||
|
||||
@ -48,48 +48,38 @@ ENDPAGE
|
||||
|
||||
PAGE "Elenco di controllo" -1 -1 78 13
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 0 0 "Movimenti da controllare"
|
||||
END
|
||||
|
||||
SPREADSHEET S_CONTROLLO -1 10
|
||||
BEGIN
|
||||
PROMPT 0 1 "Movimenti da controllare"
|
||||
PROMPT 0 0 "Movimenti da controllare"
|
||||
ITEM " "
|
||||
ITEM "Numero\nReg.@8"
|
||||
ITEM "Data\nReg.@8"
|
||||
ITEM "Data\nDoc.@8"
|
||||
ITEM "Codice\nCaus.@8"
|
||||
ITEM "Mese\nliquidazione@8"
|
||||
ITEM "Numero\nDocumento@8"
|
||||
ITEM "Totale\nDocumento@8"
|
||||
ITEM "Fornitore@8"
|
||||
ITEM "Ragione\nSociale@8"
|
||||
ITEM "Cod. regis./\nprot.IVA@8"
|
||||
ITEM "Descrizione@8"
|
||||
ITEM "NUMREG@8"
|
||||
ITEM "DATAREG@8"
|
||||
ITEM "DATADOC@8"
|
||||
ITEM "CODCAUS@8"
|
||||
ITEM "MESELIQ@8"
|
||||
ITEM "NUMDOC@8"
|
||||
ITEM "IMPTOTDOC@8"
|
||||
ITEM "FORNITORE@8"
|
||||
ITEM "RAGSOC@8"
|
||||
ITEM "PROTIVA@8"
|
||||
ITEM "DESCR@8"
|
||||
ITEM "ESCLUDI@5"
|
||||
ITEM "ESCLUSO@6"
|
||||
ITEM "Descrizione\nErrore"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 0 12 "Fatture el. in ingresso"
|
||||
ITEM "DESCR ERR"
|
||||
END
|
||||
|
||||
SPREADSHEET S_FPPRO -1 -1
|
||||
BEGIN
|
||||
PROMPT 0 13 "Movimenti da controllare"
|
||||
PROMPT 0 11 "Movimenti da controllare"
|
||||
ITEM " "
|
||||
ITEM "Tipo Doc."
|
||||
ITEM "Data@8"
|
||||
ITEM "Num. Doc.@12"
|
||||
ITEM "Tot. Doc.@9"
|
||||
ITEM "Fornitore@6"
|
||||
ITEM "Rag. Soc.@20"
|
||||
ITEM "Stato P.IVA"
|
||||
ITEM "P.IVA@8"
|
||||
ITEM "TIPODOC"
|
||||
ITEM "DATA@8"
|
||||
ITEM "NUMDOC@12"
|
||||
ITEM "IMPTOTDOC@9"
|
||||
ITEM "FORNITORE@6"
|
||||
ITEM "RAGSOC@20"
|
||||
ITEM "STATOPIVA"
|
||||
ITEM "PIVA@8"
|
||||
ITEM "@1"
|
||||
END
|
||||
|
||||
|
@ -35,17 +35,17 @@ SPREADSHEET S_ESCL -1 10
|
||||
BEGIN
|
||||
PROMPT 0 1 "Movimenti da controllare"
|
||||
ITEM " "
|
||||
ITEM "Numero\nReg.@8"
|
||||
ITEM "Data\nReg.@8"
|
||||
ITEM "Data\nDoc.@8"
|
||||
ITEM "Codice\nCaus.@8"
|
||||
ITEM "Mese\nliquidazione@8"
|
||||
ITEM "Numero\nDocumento@8"
|
||||
ITEM "Totale\nDocumento@8"
|
||||
ITEM "Fornitore@8"
|
||||
ITEM "Ragione\nSociale@8"
|
||||
ITEM "Cod. regis./\nprot.IVA@8"
|
||||
ITEM "Descrizione@8"
|
||||
ITEM "NUMREG@8"
|
||||
ITEM "DATAREG@8"
|
||||
ITEM "DATADOC@8"
|
||||
ITEM "CODCAUS@8"
|
||||
ITEM "MESELIQ@8"
|
||||
ITEM "NUMDOC@8"
|
||||
ITEM "IMPTOTDOC@8"
|
||||
ITEM "FORNITORE@8"
|
||||
ITEM "RAGSOC@8"
|
||||
ITEM "PROTIVA@8"
|
||||
ITEM "DESCR@8"
|
||||
END
|
||||
ENDPAGE
|
||||
ENDMASK
|
||||
|
@ -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);
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "../f1/f1lib.h"
|
||||
#include "mov.h"
|
||||
#include "comuni.h"
|
||||
#include "urldefid.h"
|
||||
|
||||
#define FILTER_NOASS ""
|
||||
#define FILTER_ASS "E"
|
||||
@ -46,7 +45,7 @@ class TPassive_mask : public TAutomask
|
||||
char esigibilita;
|
||||
};
|
||||
|
||||
TLog_report* _log{};
|
||||
TLog_report* _log;
|
||||
bool _f1;
|
||||
|
||||
protected:
|
||||
@ -62,36 +61,35 @@ protected:
|
||||
|
||||
static bool clifo_handler(TMask_field& f, KEY key);
|
||||
void set_filter_changed();
|
||||
void select_all(int sheet_field) const;
|
||||
void select_all(int sheet_field);
|
||||
|
||||
// Tasto nuovo: apre nuovo fornitore valorizzando già i dati dalla fattura
|
||||
void new_forn();
|
||||
// Tasto aggiorna: aggiorna cliente che non corrisponde.
|
||||
bool aggiorna_forn();
|
||||
void salva_for() const;
|
||||
void clean_ini(const TString& filename) const;
|
||||
void run_cg0(const TString& filename) const;
|
||||
void clean_ini(const TString& filename) const;
|
||||
void run_cg0(const TString& filename) const;
|
||||
void elenco_prots_sel(TString& string) const;
|
||||
|
||||
static vector<iva>& get_righe_iva(TToken_string& keys);
|
||||
static real calcola_importo(vector<iva> riva);
|
||||
real calcola_importo(vector<iva> riva) const;
|
||||
// Gestione F1
|
||||
int prepara_contab() const;
|
||||
void log_contab() const;
|
||||
void log_contab();
|
||||
int check_err() const;
|
||||
void contabilizza();
|
||||
TDate load_data() const;
|
||||
static bool is_doc_split(const vector<iva>& riva);
|
||||
bool is_doc_split(const vector<iva>& riva) const;
|
||||
const TString& get_tot_imp_riva(const vector<iva>& riva) const;
|
||||
// Handlers
|
||||
static bool causfa_handler(TMask_field& f, KEY k);
|
||||
|
||||
void fattsel(int dlg, TField_event& e);
|
||||
// Non permette la selezione multipla delle righe
|
||||
void sel() const;
|
||||
bool on_key(KEY key);
|
||||
void sel();
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||
void check_buttons(int p) const;
|
||||
void check_buttons(int p);
|
||||
void next_page(int p) override;
|
||||
// Elenco dei protocolli selezionati
|
||||
|
||||
@ -101,12 +99,12 @@ protected:
|
||||
void aggiungi_riga(TLocalisamfile& clifo, TSheet_field& sf, TSheet_field& sf_err);
|
||||
// Aggiunge i protocolli che sono già presenti per le fatture nel db alla tabellina per il filtro
|
||||
void aggiungi_prot() const;
|
||||
void init() const;
|
||||
void init();
|
||||
|
||||
public:
|
||||
TString& get_fattsel() const;
|
||||
|
||||
static void auto_assoc();
|
||||
void auto_assoc();
|
||||
TPassive_mask(bool f1);
|
||||
};
|
||||
|
||||
@ -176,7 +174,7 @@ void TPassive_mask::fill()
|
||||
|
||||
TDate dal;
|
||||
TDate al;
|
||||
//const TString& filter_elab = get_fattsel();
|
||||
const TString& filter_elab = get_fattsel();
|
||||
const TDate reg_dal(get(F_DATAINI));
|
||||
const TDate reg_al(get(F_DATAEND));
|
||||
const TString& ordin = get(F_FATTORD);
|
||||
@ -275,7 +273,7 @@ vector<TPassive_mask::iva>& TPassive_mask::get_righe_iva(TToken_string& keys)
|
||||
return riva;
|
||||
}
|
||||
|
||||
real TPassive_mask::calcola_importo(vector<iva> riva)
|
||||
real TPassive_mask::calcola_importo(vector<iva> riva) const
|
||||
{
|
||||
real tot = ZERO;
|
||||
for(auto it = riva.begin(); it != riva.end(); ++it)
|
||||
@ -450,13 +448,11 @@ void TPassive_mask::auto_assoc()
|
||||
{
|
||||
TToken_string key("",';');
|
||||
key.add(fp_db().sq_get("KEYPROG")); key.add(fp_db().sq_get("KEYHEAD")); key.add(fp_db().sq_get("KEYFATT"));
|
||||
if (TString(key.get(0)) == "fNuBh" && TString(key.get(1)) == "05094400966" && TString(key.get(2)) == "TD012019-07-22609")
|
||||
bool simo = true;
|
||||
|
||||
clifo.zero();
|
||||
clifo.put(CLI_TIPOCF, "F");
|
||||
|
||||
const int for_cod = find_fornitore(clifo);
|
||||
int for_cod = find_fornitore(clifo);
|
||||
if(for_cod > 0)
|
||||
{
|
||||
static TString update;
|
||||
@ -470,11 +466,11 @@ void TPassive_mask::auto_assoc()
|
||||
|
||||
int TPassive_mask::find_fornitore(TLocalisamfile& clifo)
|
||||
{
|
||||
const TString paa_codfisc = fp_db().sq_get("COD_FISC");
|
||||
TString paa_codfisc = fp_db().sq_get("COD_FISC");
|
||||
const TString paa_piva = fp_db().sq_get("P_IVA");
|
||||
const TString paa_codpaese = fp_db().sq_get("COD_PAESE");
|
||||
TString paa_codpaese = fp_db().sq_get("COD_PAESE");
|
||||
const TString fppro_tipocf = fp_db().sq_get("TIPO_CF");
|
||||
const TString fppro_codcf = fp_db().sq_get("COD_CLIFOR");
|
||||
TString fppro_codcf = fp_db().sq_get("COD_CLIFOR");
|
||||
|
||||
// Cerco se il fornitore è presente in Campo
|
||||
int found_clifo = -1;
|
||||
@ -542,7 +538,7 @@ int TPassive_mask::find_fornitore(TLocalisamfile& clifo)
|
||||
return found_clifo;
|
||||
}
|
||||
|
||||
void TPassive_mask::init() const
|
||||
void TPassive_mask::init()
|
||||
{
|
||||
aggiungi_prot();
|
||||
}
|
||||
@ -566,7 +562,7 @@ bool TPassive_mask::causfa_handler(TMask_field& f, KEY k)
|
||||
return true;
|
||||
}
|
||||
|
||||
void TPassive_mask::select_all(const int sheet_field) const
|
||||
void TPassive_mask::select_all(const int sheet_field)
|
||||
{
|
||||
TSheet_field& docs = sfield((short)sheet_field);
|
||||
TString_array& sht = docs.rows_array();
|
||||
@ -591,6 +587,8 @@ void TPassive_mask::salva_for() const
|
||||
sf.hide();
|
||||
FOR_EACH_SHEET_ROW(sf, nr, row)
|
||||
{
|
||||
if (row->starts_with("X") && strcmp(clifo.get(CLI_CODCF), "17") == 0)
|
||||
bool simo = true;
|
||||
TString cod_forn = row->get(sf.cid2index(S_FORNITORE));
|
||||
if(row->starts_with("X") && !cod_forn.empty())
|
||||
{
|
||||
@ -716,8 +714,8 @@ int TPassive_mask::prepara_contab() const
|
||||
for (auto it = riva.begin(); it != riva.end(); ++it)
|
||||
{
|
||||
contab_ini.set_paragraph(LF_RMOVIVA, i);
|
||||
contab_ini.set("IMPONIBILE", abs(it->imponibile).string());
|
||||
contab_ini.set("IMPOSTA", abs(it->imposta).string());
|
||||
contab_ini.set("IMPONIBILE", it->imponibile.string());
|
||||
contab_ini.set("IMPOSTA", it->imposta.string());
|
||||
contab_ini.set("PERCIVA", it->aliquota.string());
|
||||
contab_ini.set("NATURA", it->natura);
|
||||
contab_ini.set("NRIGA", i);
|
||||
@ -755,7 +753,7 @@ int TPassive_mask::prepara_contab() const
|
||||
return is_ready;
|
||||
}
|
||||
|
||||
void TPassive_mask::log_contab() const
|
||||
void TPassive_mask::log_contab()
|
||||
{
|
||||
TFilename cg_ini;
|
||||
TString msg;
|
||||
@ -891,7 +889,7 @@ TDate TPassive_mask::load_data() const
|
||||
return start_date;
|
||||
}
|
||||
|
||||
bool TPassive_mask::is_doc_split(const vector<iva>& riva)
|
||||
bool TPassive_mask::is_doc_split(const vector<iva>& riva) const
|
||||
{
|
||||
for (iva const& riga : riva)
|
||||
{
|
||||
@ -917,7 +915,7 @@ void TPassive_mask::new_forn()
|
||||
TSheet_field& sf = sfield(F_ERR);
|
||||
static const TString newf = "fpnewf";
|
||||
clean_ini(newf);
|
||||
TFilename newf_ini;
|
||||
|
||||
FOR_EACH_SHEET_ROW(sf, nr, row)
|
||||
{
|
||||
const TString denom = row->get(sf.cid2index(S_RAGSERR));
|
||||
@ -939,6 +937,7 @@ void TPassive_mask::new_forn()
|
||||
TString pec = fp_db().sq_get("PEC");
|
||||
|
||||
TString num; num.format("%04d", nr);
|
||||
TFilename newf_ini;
|
||||
#ifdef DBG
|
||||
newf_ini << newf << num << ".ini";
|
||||
#else
|
||||
@ -979,18 +978,9 @@ void TPassive_mask::new_forn()
|
||||
forn_conf.set("RAGGOR", "O");
|
||||
|
||||
row->add("", 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
run_cg0(newf);
|
||||
TConfig ini(newf_ini);
|
||||
ini.set_paragraph("Transaction");
|
||||
if (ini.get("Action") == "INSERT" && ini.get("Result") == "OK")
|
||||
{
|
||||
auto_assoc();
|
||||
_filter_changed = true;
|
||||
next_page(1000);
|
||||
}
|
||||
sf.force_update();
|
||||
}
|
||||
|
||||
@ -1054,9 +1044,6 @@ bool TPassive_mask::aggiorna_forn()
|
||||
}
|
||||
if (count)
|
||||
run_cg0(newf);
|
||||
auto_assoc();
|
||||
_filter_changed = true;
|
||||
next_page(1000);
|
||||
sf.force_update();
|
||||
return count;
|
||||
}
|
||||
@ -1078,7 +1065,7 @@ void TPassive_mask::fattsel(const int dlg, TField_event& e)
|
||||
field(F_DATAENDREG).enable(get_bool(F_CONTABIL));
|
||||
}
|
||||
|
||||
void TPassive_mask::sel() const
|
||||
void TPassive_mask::sel()
|
||||
{
|
||||
TSheet_field& sf = sfield(F_DOCS);
|
||||
FOR_EACH_SHEET_ROW(sf, nr, row)
|
||||
@ -1091,47 +1078,6 @@ void TPassive_mask::sel() const
|
||||
sf.force_update();
|
||||
}
|
||||
|
||||
bool TPassive_mask::on_key(KEY key)
|
||||
{
|
||||
if(key == K_CTRL + K_F12)
|
||||
{
|
||||
TMask msk_psw("enable fields on sheet", 1, 60, 5);
|
||||
msk_psw.add_button_tool(DLG_OK, "Ok", TOOL_OK);
|
||||
msk_psw.add_string(202, 0, "Password:", 4, 1, 250, "*", 40);
|
||||
msk_psw.run();
|
||||
if (msk_psw.get(202) == "PratoFiorato20!")
|
||||
{
|
||||
TSheet_field& sf = sfield(F_DOCS);
|
||||
sf.enable_column(cid2index(S_ANNO));
|
||||
sf.enable_column(cid2index(S_TIPODOCSDI));
|
||||
sf.enable_column(cid2index(S_NDOC));
|
||||
sf.enable_column(cid2index(S_DATARIC));
|
||||
sf.enable_column(cid2index(S_DATADOC));
|
||||
sf.enable_column(cid2index(S_TOTDOC));
|
||||
sf.enable_column(cid2index(S_TOTRIT));
|
||||
sf.enable_column(cid2index(S_FPPRO));
|
||||
sf.enable_column(cid2index(S_NUMREGCONT));
|
||||
sf.enable_column(cid2index(S_DATAREGCONT));
|
||||
sf.enable_column(cid2index(S_STATOPAIV));
|
||||
sf.enable_column(cid2index(S_PARIVA));
|
||||
sf.enable_column(cid2index(S_CODFISC));
|
||||
sf.enable_column(cid2index(S_ATTACH));
|
||||
sf.enable_column(cid2index(S_RAGXML));
|
||||
sf.enable_column(cid2index(S_NPROT));
|
||||
sf.enable_column(cid2index(S_PROKEY));
|
||||
sf.force_update();
|
||||
TSheet_field& sf_err = sfield(F_ERR);
|
||||
sf_err.enable_column(cid2index(S_STATOERR));
|
||||
sf_err.enable_column(cid2index(S_PIVAERR));
|
||||
sf_err.enable_column(cid2index(S_CODFIERR));
|
||||
sf_err.enable_column(cid2index(S_RAGSERR));
|
||||
sf_err.enable_column(cid2index(S_DESCERR));
|
||||
sf_err.force_update();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPassive_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
switch (o.dlg())
|
||||
@ -1212,7 +1158,7 @@ bool TPassive_mask::on_field_event(TOperable_field& o, TField_event e, long joll
|
||||
case F_ENABLEFORN:
|
||||
if(e == fe_modify)
|
||||
{
|
||||
const bool en = o.get() == "X";
|
||||
bool en = o.get() == "X";
|
||||
field(F_FORNITORE).enable(en);
|
||||
field(F_RAGSOC).enable(en);
|
||||
field(F_PARIVA).enable(en);
|
||||
@ -1230,7 +1176,7 @@ bool TPassive_mask::on_field_event(TOperable_field& o, TField_event e, long joll
|
||||
return true;
|
||||
}
|
||||
|
||||
void TPassive_mask::check_buttons(const int p) const
|
||||
void TPassive_mask::check_buttons(const int p)
|
||||
{
|
||||
const TString& fattsel = get_fattsel();
|
||||
const bool err_forn = fattsel.empty() || fattsel == FILTER_ALL;
|
||||
@ -1269,7 +1215,7 @@ class TPassive_app : public TSkeleton_application
|
||||
{
|
||||
void load_mask(const TPassive_mask& mask) const;
|
||||
bool check_f1() const;
|
||||
void save_field(const TPassive_mask& mask) const;
|
||||
void save_field(const TPassive_mask& mask);
|
||||
|
||||
public:
|
||||
void main_loop() override;
|
||||
@ -1306,7 +1252,7 @@ bool TPassive_app::check_f1() const
|
||||
return has_module(F1AUT);
|
||||
}
|
||||
|
||||
void TPassive_app::save_field(const TPassive_mask& mask) const
|
||||
void TPassive_app::save_field(const TPassive_mask& mask)
|
||||
{
|
||||
if (check_f1())
|
||||
{
|
||||
|
@ -1373,19 +1373,21 @@ bool TDoc_fp::export_info_articolo(TFPRiga_documento* rdoc, TPaf_record& paf1900
|
||||
}
|
||||
}
|
||||
// Controllo se ha il CONAI in tal caso aggiungo i dati
|
||||
FOR_EACH_CONFIGURED_CONAI_CLASS(cc)
|
||||
for (int i = 0; i < FR_CMAX; i++)
|
||||
{
|
||||
const TString conai_fld(conai_peso_name(cc, LF_RIGHEDOC));
|
||||
if (rdoc->get(conai_fld).full())
|
||||
if (rdoc->get(conai_peso_name(i)).full())
|
||||
{
|
||||
reset(paf2100f);
|
||||
paf2100f.set("PK_KEYNLINEA", static_cast<long>(riga_doc));
|
||||
paf2100f.set("PK_KEYNLINAR", _idx_adg_doc_row++);
|
||||
static TString msg_conai;
|
||||
msg_conai.cut(0) << "Contributo CONAI " << conai_material(cc) << " (KG)";
|
||||
|
||||
TString scat = rdoc->get(conai_sottocat_name(i));
|
||||
TString msg_conai;
|
||||
|
||||
msg_conai << "Contributo CONAI " << conai_material(conai_str2class(scat)) << " (KG)";
|
||||
paf2100f.set("PK_TIPODATO", "CONAI");
|
||||
paf2100f.set("PK_RIFDATO", msg_conai);
|
||||
paf2100f.set("PK_RIFNUMERO", rdoc->get_real(conai_fld).string());
|
||||
paf2100f.set("PK_RIFNUMERO", rdoc->get_real(conai_peso_name(i)).string());
|
||||
ok &= insert(paf2100f);
|
||||
}
|
||||
}
|
||||
|
@ -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]);
|
||||
|
@ -395,7 +395,9 @@ THEN
|
||||
#F1.203 +!</postscript>
|
||||
</field>
|
||||
</section>
|
||||
<sql>USE IVADIFF SELECT (BETWEEN(DATAREG,#DAL,#AL))(TIPOIVA==#TIPOIVA)(TIPODIFF==#TIPODIFF)((CHIUSA=#CHIUSA)||(#CHIUSA="T"))
|
||||
<sql>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</sql>
|
||||
</report>
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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,11 +315,10 @@ bool TApplication::remove_menu(MENU_TAG id)
|
||||
|
||||
|
||||
TApplication::TApplication()
|
||||
: _god_vars(NULL),_savefirm(0), _running(FALSE), _create_ok(FALSE)
|
||||
: _god_vars(NULL),_savefirm(0), _running(false), _create_ok(false), _force(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
TApplication::~TApplication()
|
||||
{
|
||||
if (_god_vars != NULL)
|
||||
@ -328,7 +326,45 @@ TApplication::~TApplication()
|
||||
}
|
||||
|
||||
bool TApplication::create()
|
||||
{ return true; }
|
||||
{
|
||||
if (use_files())
|
||||
{
|
||||
TFilename logname = prefix().get_studio();
|
||||
|
||||
logname.add("/log");
|
||||
if (!logname.exist())
|
||||
make_dir(logname);
|
||||
|
||||
TConfig c(CONFIG_STUDIO, "Main");
|
||||
|
||||
db_log(c.get("DBLog", "Main", -1, "off") == "on");
|
||||
|
||||
if (db_log())
|
||||
{
|
||||
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);
|
||||
|
||||
logname.add("/dblog.xml");
|
||||
limit += roll_days;
|
||||
if (!lastroll.ok() || (limit <= oggi))
|
||||
{
|
||||
if (logname.exist())
|
||||
{
|
||||
TFilename roll(logname.path());
|
||||
TString s("/");
|
||||
|
||||
s << lastroll.date2ansi();
|
||||
roll.ext("log");
|
||||
rename(roll, logname);
|
||||
}
|
||||
c.set("LastDate", oggi.date2ansi());
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool TApplication::destroy()
|
||||
@ -341,7 +377,8 @@ void TApplication::terminate()
|
||||
if (_create_ok)
|
||||
destroy(); // Distruzione files e maschere
|
||||
|
||||
do_events();
|
||||
if(!_force)
|
||||
do_events();
|
||||
|
||||
if (use_files())
|
||||
{
|
||||
@ -371,7 +408,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,17 +442,10 @@ 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<const char*>(module));
|
||||
}
|
||||
else
|
||||
{
|
||||
cantaccess_box(module);
|
||||
module.cut(0);
|
||||
}
|
||||
if (!ok && !is_power_station())
|
||||
{
|
||||
cantaccess_box(module);
|
||||
module.cut(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -591,6 +622,7 @@ void TApplication::run(
|
||||
set_xvt_hooks();
|
||||
|
||||
_running = TRUE;
|
||||
// message_box("a");
|
||||
xvt_app_create(argc, argv, 0L, task_eh, &cfg);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -1635,7 +1635,7 @@ void TButton_control::create(WINDOW win, short cid,
|
||||
txt.strip("&~");
|
||||
}
|
||||
const char* t = parse_caption(txt, bold, big, color);
|
||||
if (width <= 0) width = strlen(t)+3;
|
||||
if (width <= 0) width = (short) strlen(t)+3;
|
||||
|
||||
XI_RCT rct = coord2rct(get_interface(win), left, top, width, height);
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <strings.h>
|
||||
#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
|
||||
|
Binary file not shown.
@ -25,4 +25,6 @@ BEGIN
|
||||
PICTURE 0
|
||||
END
|
||||
|
||||
#include <navbar.h>
|
||||
#include <navbar.h>
|
||||
|
||||
// leave a newline at the end
|
||||
|
@ -3014,8 +3014,9 @@ bool TForm::reread(
|
||||
// Legge le modifiche su archivio e poi e' finita.
|
||||
s->set_dirty(FALSE);
|
||||
TLocalisamfile rprof(LF_RFORM);
|
||||
const char sez[3] = {sec,p+'0','\0'};
|
||||
rprof.zero();
|
||||
TString4 sez; sez << sec << p;
|
||||
|
||||
rprof.zero();
|
||||
rprof.put("TIPOPROF", _name);
|
||||
rprof.put("CODPROF", _code);
|
||||
rprof.put("SEZ", sez);
|
||||
@ -4460,8 +4461,9 @@ bool TForm::write_profile()
|
||||
TPrint_section* sec = exist(sc, pt);
|
||||
if (sec != NULL && sec->dirty())
|
||||
{
|
||||
const char codsez[3] = { sc, pt+'0', '\0' };
|
||||
cur.zero();
|
||||
TString4 codsez; codsez << sc << pt;
|
||||
|
||||
cur.zero();
|
||||
cur.put("TIPOPROF", name());
|
||||
cur.put("CODPROF", code());
|
||||
cur.put("SEZ", codsez);
|
||||
|
@ -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;
|
||||
|
@ -1,6 +1,7 @@
|
||||
#define __ISAM_CPP
|
||||
#define _CRT_SECURE_NO_WARNINGS 1
|
||||
|
||||
#include <applicat.h>
|
||||
#include <config.h>
|
||||
#include <execp.h>
|
||||
#include <expr.h>
|
||||
@ -17,6 +18,7 @@
|
||||
#include <utility.h>
|
||||
#include <tabutil.h>
|
||||
#include <varrec.h>
|
||||
#include <xml.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <io.h>
|
||||
@ -679,7 +681,7 @@ TBaseisamfile::TBaseisamfile(int logicnum)
|
||||
_curr_key = 0;
|
||||
_lasterr = NOERR;
|
||||
_current = new TRectype(logicnum);
|
||||
}
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
@ -712,8 +714,7 @@ TBaseisamfile::TBaseisamfile(
|
||||
|
||||
TBaseisamfile::~TBaseisamfile()
|
||||
{
|
||||
if (_current)
|
||||
delete _current;
|
||||
SAFE_DELETE(_current);
|
||||
}
|
||||
|
||||
TCodeb_handle TBaseisamfile::handle(int key) const
|
||||
@ -769,7 +770,7 @@ void TBaseisamfile::set_curr(TRectype * curr)
|
||||
CHECK(num() == curr->num(), "You must set a coherent current record");
|
||||
if (_current != NULL)
|
||||
delete _current;
|
||||
_current = curr;
|
||||
_current = curr;
|
||||
}
|
||||
|
||||
void TBaseisamfile::setkey(int nkey)
|
||||
@ -868,7 +869,8 @@ int TBaseisamfile::_read(TRectype& rec, word op, word lockop)
|
||||
prefix().lock_record(_isam_handle, _recno); else
|
||||
if (lockop == _unlock)
|
||||
prefix().unlock_record(_isam_handle, _recno);
|
||||
}
|
||||
_current->clear_modified_fields();
|
||||
}
|
||||
|
||||
return _lasterr;
|
||||
}
|
||||
@ -902,19 +904,185 @@ int TBaseisamfile::_readat(TRectype& rec, TRecnotype nrec, word lockop)
|
||||
if (_lasterr != NOERR)
|
||||
_lasterr = get_error(_lasterr);
|
||||
else
|
||||
{
|
||||
rec = (const char*)DB_getrecord(fhnd);
|
||||
_current->clear_modified_fields();
|
||||
}
|
||||
_recno = DB_recno(fhnd);
|
||||
if (rec.has_memo())
|
||||
rec.init_memo(_recno, _isam_handle);
|
||||
return _lasterr;
|
||||
}
|
||||
|
||||
bool __db_log = true;
|
||||
|
||||
void db_log(const bool on)
|
||||
{
|
||||
__db_log = on;
|
||||
}
|
||||
|
||||
void db_log_on() { db_log(true); }
|
||||
void db_log_off() { db_log(false); }
|
||||
bool db_log() { return __db_log; }
|
||||
|
||||
bool TBaseisamfile::writelog(const db_op op, TRectype & rec, TRectype * act_rec, int fhnd)
|
||||
{
|
||||
TFilename logname = prefix().get_studio();
|
||||
ofstream log;
|
||||
bool changed = false;
|
||||
|
||||
logname.add("/log");
|
||||
logname.add("/dblog.xml");
|
||||
|
||||
const struct tm * timeloc = xvt_time_now();
|
||||
time_t timestamp = time(NULL);
|
||||
TXmlItem root;
|
||||
TString trans("DBtrans");
|
||||
TString80 user;
|
||||
int year;
|
||||
int release;
|
||||
int tag;
|
||||
int patch;
|
||||
TDate date(timeloc->tm_mday, timeloc->tm_mon, timeloc->tm_year + 1900);
|
||||
TString time;
|
||||
TFilename cmdline(main_app().argv(0));
|
||||
|
||||
cmdline = cmdline.name_only();
|
||||
for (int i = 1; i < main_app().argc(); i++)
|
||||
cmdline << ' ' << main_app().argv(i);
|
||||
time << timeloc->tm_hour << ":" << timeloc->tm_min << ":" << timeloc->tm_sec;
|
||||
|
||||
TApplication::get_version_info(year, release, tag, patch);
|
||||
|
||||
xvt_sys_get_user_name(user.get_buffer(), user.len());
|
||||
// trans << "session " << xvt_sys_get_session_id()
|
||||
// << " date " << date.date2ansi() << " time " << time;
|
||||
|
||||
root.SetTag(trans);
|
||||
|
||||
root.SetAttr("program",cmdline);
|
||||
root.SetAttr("year", year);
|
||||
root.SetAttr("release", release);
|
||||
root.SetAttr("tag", tag);
|
||||
root.SetAttr("patch", patch);
|
||||
|
||||
TXmlItem & head = root.AddChild("Head");
|
||||
|
||||
head.SetAttr("cmd", op);
|
||||
head.SetAttr("file", _logicnum);
|
||||
head.SetAttr("recno", _recno);
|
||||
head.SetAttr("user", user);
|
||||
head.SetAttr("session", xvt_sys_get_session_id());
|
||||
head.SetAttr("date", date.date2ansi());
|
||||
head.SetAttr("timestamp", (long) timestamp);
|
||||
|
||||
TXmlItem & key = root.AddChild("key");
|
||||
|
||||
for (byte i = 0; i < rec.rec_des().Ky[0].NkFields; i++)
|
||||
{
|
||||
const char * keyfieldname = rec.rec_des().Fd[rec.rec_des().Ky[0].FieldSeq[i]].Name;
|
||||
const TString & value = rec.get(keyfieldname);
|
||||
|
||||
TXmlItem & field = key.AddChild("field");
|
||||
|
||||
field.SetAttr(keyfieldname, value);
|
||||
}
|
||||
TXmlItem & data = root.AddChild("data");
|
||||
|
||||
if (op != db_remove)
|
||||
{
|
||||
for (byte i = 0; i < rec.rec_des().NFields; i++)
|
||||
{
|
||||
const TString16 fieldname(rec.rec_des().Fd[i].Name);
|
||||
TString value = rec.get_modified_field(i);
|
||||
|
||||
if (op == db_add)
|
||||
{
|
||||
TXmlItem & field = data.AddChild("field");
|
||||
|
||||
field.SetAttr(fieldname, value);
|
||||
changed = true;
|
||||
}
|
||||
else
|
||||
if (rec.field_modified(i))
|
||||
{
|
||||
bool fchanged = false;
|
||||
|
||||
switch (TFieldtypes(rec.rec_des().Fd[i].TypeF))
|
||||
{
|
||||
case _nullfld: // @emem Campo non definito
|
||||
break;
|
||||
case _alfafld: // @emem Campo di tipo alfanumerico
|
||||
fchanged = act_rec->get(fieldname) != value.trim();
|
||||
break;
|
||||
case _intfld: // @emem Campo di tipo intero
|
||||
fchanged = act_rec->get_int(fieldname) != atoi(value);
|
||||
break;
|
||||
case _longfld: // @emem Campo di tipo intero lungo
|
||||
fchanged = act_rec->get_long(fieldname) != atol(value);
|
||||
break;
|
||||
case _realfld: // @emem Campo di tipo reale (vedi <c real>)
|
||||
fchanged = act_rec->get_real(fieldname) != real(value);
|
||||
break;
|
||||
case _datefld: // @emem Campo di tipo data (vedi <c TDate>)
|
||||
fchanged = act_rec->get_date(fieldname) != TDate(value);
|
||||
break;
|
||||
case _wordfld: // @emem Campo di tipo intero senza segno
|
||||
fchanged = act_rec->get_long(fieldname) != atol(value);
|
||||
break;
|
||||
case _charfld: // @emem Campo di tipo carattere
|
||||
fchanged = act_rec->get_char(fieldname) != value[0];
|
||||
break;
|
||||
case _boolfld: // @emem Campo di tipo booleano
|
||||
{
|
||||
const bool b = (value.full() && strchr("1STXY", toupper(value[0])) != NULL) ? true : false;
|
||||
const bool b1 = act_rec->get_bool(fieldname);
|
||||
|
||||
fchanged = b ^ b1;
|
||||
}
|
||||
break;
|
||||
case _intzerofld: // @emem Campo ditipo intero zero filled
|
||||
fchanged = act_rec->get_int(fieldname) != atoi(value);
|
||||
break;
|
||||
case _longzerofld: // @emem Campo di tipo intero lungo zero filled
|
||||
fchanged = act_rec->get_long(fieldname) != atol(value);
|
||||
break;
|
||||
case _memofld:
|
||||
fchanged = true;
|
||||
default:
|
||||
break;
|
||||
}; // @emem Campo di tipo memo
|
||||
if (fchanged)
|
||||
{
|
||||
TXmlItem & field = data.AddChild("field");
|
||||
|
||||
changed = true;
|
||||
field.SetAttr(fieldname, value);
|
||||
if (act_rec != NULL)
|
||||
act_rec->put(fieldname, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
changed = true;
|
||||
if (changed)
|
||||
{
|
||||
root.Append(logname);
|
||||
if ((op == db_update) && (act_rec != NULL))
|
||||
rec.TRectype::operator =(*act_rec);
|
||||
}
|
||||
rec.clear_modified_fields();
|
||||
return changed;
|
||||
}
|
||||
|
||||
int TBaseisamfile::_write(const TRectype& rec)
|
||||
{
|
||||
CHECK(!rec.empty(), "Can't write an empty record");
|
||||
|
||||
// Controlla che la chiave sia piena
|
||||
TString256 key;
|
||||
TString & key = get_tmp_string(384);
|
||||
|
||||
__build_key(rec.rec_des(), 1, rec.string(), key.get_buffer(), true);
|
||||
if (key.blank())
|
||||
@ -932,7 +1100,9 @@ int TBaseisamfile::_write(const TRectype& rec)
|
||||
_logicnum, rec.len(), dst_len);
|
||||
|
||||
browse_null(rec.string(), dst_len);
|
||||
memcpy(DB_getrecord(fhnd), rec.string(), dst_len);
|
||||
memcpy(DB_getrecord(fhnd), rec.string(), dst_len);
|
||||
if (db_log())
|
||||
writelog(db_add, (TRectype&)rec, NULL, fhnd);
|
||||
_lasterr = DB_add(fhnd);
|
||||
_recno = DB_recno(fhnd);
|
||||
|
||||
@ -981,41 +1151,46 @@ int TBaseisamfile::_rewrite(const TRectype& rec)
|
||||
{
|
||||
CHECK(!rec.empty(), "Can't write an empty record");
|
||||
|
||||
TRectype save_rec(rec);
|
||||
TAuto_variable_rectype act_rec(rec);
|
||||
|
||||
// Forza l'uso della chiave principale (per chiavi duplicate?)
|
||||
|
||||
// Forza l'uso della chiave principale (per chiavi duplicate?)
|
||||
const int fhnd = handle(1);
|
||||
_lasterr = cisread(fhnd, 1, save_rec, _isequal + _nolock, _recno); // Si Posiziona per sicurezza...
|
||||
|
||||
while ((_lasterr = cisread(fhnd, 1, act_rec, _isequal + _testandlock, _recno)) == _islocked) ;// Si Posiziona e locca per sicurezza...
|
||||
|
||||
if (_lasterr == NOERR)
|
||||
{
|
||||
const int len = DB_reclen(fhnd);
|
||||
if (len != save_rec.len())
|
||||
if (len != act_rec.len())
|
||||
NFCHECK("Record size mismatch on file %d: RecDes=%d, DB_reclen=%d",
|
||||
_logicnum, save_rec.len(), len);
|
||||
_logicnum, act_rec.len(), len);
|
||||
|
||||
browse_null(rec.string(), len);
|
||||
if (memcmp(rec.string(), save_rec.string(), len) != 0)
|
||||
{
|
||||
memcpy(DB_getrecord(fhnd), rec.string(), len);
|
||||
bool changed = false;
|
||||
|
||||
if (db_log())
|
||||
changed = writelog(db_update, (TRectype &)rec, &act_rec, fhnd);
|
||||
else
|
||||
changed = memcmp(rec.string(), act_rec.string(), len) != 0;
|
||||
if (changed)
|
||||
{
|
||||
memcpy(DB_getrecord(fhnd), rec.string(), len);
|
||||
_lasterr = DB_rewrite(fhnd);
|
||||
if (_lasterr == NOERR)
|
||||
if (_lasterr == NOERR)
|
||||
rec_cache(_logicnum).notify_change();
|
||||
else
|
||||
_lasterr = get_error(_lasterr);
|
||||
}
|
||||
else
|
||||
DB_unlock(fhnd); // non vale la pena farlo sempre ?
|
||||
DB_unlock(fhnd); // non vale la pena farlo sempre ?
|
||||
_recno = DB_recno(fhnd);
|
||||
prefix().unlock_record(_isam_handle, _recno);
|
||||
|
||||
if (_lasterr == NOERR)
|
||||
{
|
||||
if (curr().has_memo())
|
||||
if (rec.has_memo())
|
||||
((TRectype&)rec).write_memo(_isam_handle, _recno);
|
||||
}
|
||||
}
|
||||
|
||||
return _lasterr;
|
||||
}
|
||||
|
||||
@ -1034,11 +1209,20 @@ int TBaseisamfile::rewriteat(const TRectype& rec, TRecnotype nrec)
|
||||
const int fhnd = handle();
|
||||
|
||||
if ((_lasterr=DB_go(fhnd,nrec))== NOERR)
|
||||
{
|
||||
{
|
||||
TRectype save_rec(rec);
|
||||
const int len = DB_reclen(fhnd);
|
||||
|
||||
memcpy(DB_getrecord(fhnd), save_rec.string(), len);
|
||||
browse_null(rec.string(),DB_reclen(fhnd));
|
||||
memcpy(DB_getrecord(fhnd),rec.string(),DB_reclen(fhnd));
|
||||
_lasterr=DB_rewrite(fhnd);
|
||||
if (_lasterr != NOERR) _lasterr = get_error(_lasterr);
|
||||
|
||||
// if (memcmp(rec.string(), save_rec.string(), len) != 0)
|
||||
if (db_log() ? writelog(db_update, (TRectype &) rec, &save_rec, fhnd) : memcmp(rec.string(), save_rec.string(), len) != 0)
|
||||
{
|
||||
memcpy(DB_getrecord(fhnd), rec.string(), DB_reclen(fhnd));
|
||||
_lasterr = DB_rewrite(fhnd);
|
||||
if (_lasterr != NOERR) _lasterr = get_error(_lasterr);
|
||||
}
|
||||
}
|
||||
else
|
||||
_lasterr = get_error(_lasterr);
|
||||
@ -1064,12 +1248,15 @@ int TBaseisamfile::_remove(const TRectype& rec)
|
||||
CHECK(!rec.empty(), "Can't remove an empty record");
|
||||
|
||||
const int fhnd = handle(1); // Forza l'uso della chiave principale (per chiavi duplicate?)
|
||||
|
||||
TRectype save_rec(rec);
|
||||
|
||||
_lasterr = cisread(fhnd, 1, save_rec, _isequal + _nolock, _recno); // Si Posiziona per sicurezza...
|
||||
|
||||
if (_lasterr == NOERR)
|
||||
{
|
||||
|
||||
if (db_log())
|
||||
writelog(db_remove, (TRectype &) rec, NULL, fhnd);
|
||||
_lasterr = DB_delete(fhnd); // Put only deletion flag on record, must remove keys too!
|
||||
if (_lasterr == NOERR)
|
||||
{
|
||||
@ -1278,10 +1465,14 @@ int TBaseisamfile::is_valid(bool exclusive)
|
||||
if (dbfreclen != trcreclen)
|
||||
{
|
||||
err = _istrcerr;
|
||||
if (_logicnum == LF_CLIFO)
|
||||
error_box("Clifo trc=%d dbf=%d", trcreclen, dbfreclen);
|
||||
}
|
||||
}
|
||||
|
||||
TString msg;
|
||||
|
||||
msg.format("Lunghezza record incoerente sul file %d (%s): file=%d trc=%d",
|
||||
num(), (const char*)description(), dbfreclen, trcreclen);
|
||||
error_box(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
err = _isbadtrc;
|
||||
@ -1457,8 +1648,20 @@ TIsamtempfile::TIsamtempfile(int logicnum, const char* radix, bool create, bool
|
||||
n.insert("%", 0);
|
||||
|
||||
open(n, create, eod, eox);
|
||||
}
|
||||
|
||||
TCodeb_handle cb_handle = prefix().get_handle(_isam_handle, _curr_key);
|
||||
const int dbfreclen = DB_reclen(cb_handle);
|
||||
const int trcreclen = prefix().get_reclen(logicnum);
|
||||
|
||||
if (dbfreclen != trcreclen)
|
||||
{
|
||||
TString msg;
|
||||
msg.format("Lunghezza record incoerente sul file %d (%s): file=%d trc=%d",
|
||||
num(), (const char*)description(), dbfreclen, trcreclen);
|
||||
fatal_box(msg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TIsamtempfile::~TIsamtempfile()
|
||||
{
|
||||
@ -3178,6 +3381,7 @@ void TRectype::init(int logicnum)
|
||||
|
||||
if (_length > 0 && lf_has_memo(logicnum))
|
||||
init_memo(RECORD_NON_FISICO);
|
||||
clear_modified_fields();
|
||||
}
|
||||
|
||||
TRectype::TRectype(int logicnum)
|
||||
@ -3202,6 +3406,7 @@ TRectype::TRectype(const TRectype& r)
|
||||
init_memo(r._memo_data->recno(), r._memo_data->file());
|
||||
*_memo_data = *r._memo_data;
|
||||
}
|
||||
_modified_fields = r._modified_fields;
|
||||
memcpy(_rec, r._rec, _length);
|
||||
memcpy(_tab, r._tab, sizeof(_tab));
|
||||
setempty(r.empty());
|
||||
@ -3499,8 +3704,13 @@ int TRectype::ndec(const char* fieldname) const
|
||||
}
|
||||
|
||||
bool TRectype::exist(const char* fieldname) const
|
||||
{
|
||||
return findfld(&rec_des(), fieldname) != FIELDERR;
|
||||
{
|
||||
return findfld(&rec_des(), fieldname) != FIELDERR;
|
||||
}
|
||||
|
||||
int TRectype::find(const char* fieldname) const
|
||||
{
|
||||
return findfld(&rec_des(), fieldname);
|
||||
}
|
||||
|
||||
const char* TRectype::fieldname(int i) const
|
||||
@ -3642,7 +3852,6 @@ void TRectype::put(const char* fieldname, bool val)
|
||||
put(fieldname, val ? 'X' : ' ');
|
||||
}
|
||||
|
||||
|
||||
void TRectype::put_str(const char* fieldname, const char* val)
|
||||
{
|
||||
const RecDes& recd = rec_des();
|
||||
@ -3657,10 +3866,11 @@ void TRectype::put_str(const char* fieldname, const char* val)
|
||||
const TFieldtypes ft = TFieldtypes(fd.TypeF);
|
||||
|
||||
if (val == NULL)
|
||||
val = "";
|
||||
val = "";
|
||||
if (ft == _boolfld)
|
||||
val = (*val && strchr("1STXY", toupper(*val)) != NULL) ? "T" : "F";
|
||||
|
||||
set_modified_field(nf, val);
|
||||
if (*val == '\0')
|
||||
{
|
||||
TRecfield f(*this, fieldname);
|
||||
@ -3706,6 +3916,8 @@ void TRectype::zero(const char* fieldname)
|
||||
const byte len = recd.Fd[nf].Len;
|
||||
const byte dec = recd.Fd[nf].Dec;
|
||||
const TFieldtypes type = (TFieldtypes) recd.Fd[nf].TypeF;
|
||||
|
||||
set_modified_field(nf, "");
|
||||
switch (type)
|
||||
{
|
||||
case _datefld:
|
||||
@ -3737,6 +3949,24 @@ void TRectype::zero(const char* fieldname)
|
||||
}
|
||||
}
|
||||
|
||||
void TRectype::set_modified_field(int i, const char *val)
|
||||
{
|
||||
const RecFieldDes& fd = rec_des().Fd[i];
|
||||
|
||||
TString * v = (TString *)_modified_fields.objptr(i);
|
||||
|
||||
if (v == NULL)
|
||||
{
|
||||
TString old_val = get(fd.Name);
|
||||
|
||||
if (old_val != val)
|
||||
_modified_fields.add(val, i);
|
||||
}
|
||||
else
|
||||
*v = val;
|
||||
}
|
||||
|
||||
|
||||
void TRectype::zero(char c)
|
||||
{
|
||||
memset(_rec, c, len());
|
||||
@ -3748,6 +3978,7 @@ void TRectype::zero(char c)
|
||||
if(has_memo())
|
||||
init_memo( RECORD_NON_FISICO );
|
||||
setempty(true);
|
||||
clear_modified_fields();
|
||||
}
|
||||
|
||||
// Certified 99%
|
||||
@ -3763,6 +3994,7 @@ TRectype& TRectype::operator =(const TRectype& rec)
|
||||
}
|
||||
memcpy(_tab, rec._tab, sizeof(_tab));
|
||||
setempty(rec.empty()); // Copy emptiness status
|
||||
_modified_fields = rec._modified_fields;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -4084,6 +4316,7 @@ TRecfield::TRecfield(TRectype& rec, const char* name, int from, int to)
|
||||
_len = 0;
|
||||
_dec = 0;
|
||||
_type = _alfafld;
|
||||
_nf = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -4092,6 +4325,7 @@ TRecfield::TRecfield(TRectype& rec, const char* name, int from, int to)
|
||||
NFCHECK("Invalid Start %d", from);
|
||||
from = 0;
|
||||
}
|
||||
_nf = nf;
|
||||
_p = _rec->string() + rd.Fd[nf].RecOff;
|
||||
_dec = rd.Fd[nf].Dec;
|
||||
_type = (TFieldtypes)rd.Fd[nf].TypeF;
|
||||
@ -4156,10 +4390,13 @@ void TRecfield::put_subfield(const char* s)
|
||||
int TRecfield::operator =(int i)
|
||||
{
|
||||
TString16 buff; buff << i;
|
||||
if (_sub_field.empty())
|
||||
__putfieldbuff( _len, _dec, _type, buff, _p);
|
||||
else
|
||||
put_subfield(buff);
|
||||
if (_sub_field.empty())
|
||||
{
|
||||
_rec->set_modified_field(_nf, buff);
|
||||
__putfieldbuff(_len, _dec, _type, buff, _p);
|
||||
}
|
||||
else
|
||||
put_subfield(buff);
|
||||
_rec->setempty(FALSE);
|
||||
return i;
|
||||
}
|
||||
@ -4169,7 +4406,10 @@ long TRecfield::operator =(long l)
|
||||
{
|
||||
TString16 buff; buff << l;
|
||||
if (_sub_field.empty())
|
||||
{
|
||||
_rec->set_modified_field(_nf, buff);
|
||||
__putfieldbuff( _len, _dec, _type, buff, _p);
|
||||
}
|
||||
else
|
||||
put_subfield(buff);
|
||||
_rec->setempty(false);
|
||||
@ -4178,9 +4418,13 @@ long TRecfield::operator =(long l)
|
||||
|
||||
const real& TRecfield::operator =(const real& r)
|
||||
{
|
||||
const char* buff = r.string();
|
||||
const char * buff = r.string();
|
||||
|
||||
if (_sub_field.empty())
|
||||
{
|
||||
_rec->set_modified_field(_nf, buff);
|
||||
__putfieldbuff( _len, _dec, _type, buff, _p);
|
||||
}
|
||||
else
|
||||
put_subfield(buff);
|
||||
_rec->setempty(FALSE);
|
||||
@ -4191,7 +4435,10 @@ const TDate& TRecfield::operator =(const TDate& d)
|
||||
{
|
||||
const TString16 buff = d.stringa();
|
||||
if (_sub_field.empty())
|
||||
{
|
||||
_rec->set_modified_field(_nf, buff);
|
||||
__putfieldbuff( _len, _dec, _type, buff, _p);
|
||||
}
|
||||
else
|
||||
put_subfield(buff);
|
||||
_rec->setempty(FALSE);
|
||||
@ -4201,11 +4448,14 @@ const TDate& TRecfield::operator =(const TDate& d)
|
||||
const char* TRecfield::operator =(const char* s)
|
||||
{
|
||||
if (_sub_field.empty())
|
||||
{
|
||||
{
|
||||
if (_type == _memofld)
|
||||
_rec->put(_name, s);
|
||||
else
|
||||
__putfieldbuff( _len, _dec, _type, s, _p);
|
||||
{
|
||||
_rec->set_modified_field(_nf, s);
|
||||
__putfieldbuff(_len, _dec, _type, s, _p);
|
||||
}
|
||||
}
|
||||
else
|
||||
put_subfield(s);
|
||||
|
@ -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;
|
||||
@ -81,6 +88,9 @@ protected:
|
||||
// @cmember:(INTERNAL) Campo "COD" della tabella
|
||||
TMemo_data* _memo_data;
|
||||
|
||||
TString_array _modified_fields;
|
||||
|
||||
|
||||
// @access Protected Member
|
||||
protected:
|
||||
// @cmember Segnalazione di un campo inesistente
|
||||
@ -99,6 +109,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:
|
||||
@ -160,6 +171,8 @@ public:
|
||||
virtual int ndec(const char* fieldname) const;
|
||||
// @cmember Indica se esiste il campo <p fieldname>
|
||||
virtual bool exist(const char* fieldname) const;
|
||||
// @cmember Indica se esiste il campo <p fieldname> e ritorna la ppsizionr
|
||||
virtual int find(const char* fieldname) const;
|
||||
// @cmember Ritorna il nome del campo <p i>-esimo
|
||||
const char* fieldname(int i) const;
|
||||
|
||||
@ -258,6 +271,10 @@ 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); }
|
||||
|
||||
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 write_memo(TIsam_handle file, const TRecnotype recno);
|
||||
@ -328,6 +345,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);
|
||||
@ -795,6 +813,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
|
||||
|
@ -206,3 +206,6 @@
|
||||
#define CNF_DITTA CNF_GENERAL + 2
|
||||
|
||||
#endif // __LFFILES_H
|
||||
|
||||
// leave a newline at the end
|
||||
|
||||
|
@ -982,7 +982,7 @@ long TMask::handler(WINDOW w, EVENT* ep)
|
||||
|
||||
for (int y = ROWY; y < rct.bottom; y += ROWY)
|
||||
{
|
||||
PNT pt0 = { y, rct.left }, pt1 = { y, rct.right};
|
||||
PNT pt0 = { (short) y, rct.left }, pt1 = { (short) y, rct.right};
|
||||
xvt_dwin_draw_set_pos(w, pt0);
|
||||
xvt_dwin_draw_line(w, pt1);
|
||||
char text[8]; sprintf(text, "%d", y/ROWY);
|
||||
|
@ -241,7 +241,7 @@ void TMultiple_rectype::renum_key()
|
||||
|
||||
TRectype & TMultiple_rectype::operator =(const TRectype & r)
|
||||
{
|
||||
TRectype::operator=(r);
|
||||
TAuto_variable_rectype::operator=(r);
|
||||
reset_fields(*this);
|
||||
set_fields(*this);
|
||||
return *this;
|
||||
@ -249,7 +249,7 @@ TRectype & TMultiple_rectype::operator =(const TRectype & r)
|
||||
|
||||
TRectype & TMultiple_rectype::operator =(const char * r)
|
||||
{
|
||||
TRectype::operator=(r);
|
||||
TAuto_variable_rectype::operator=(r);
|
||||
reset_fields(*this);
|
||||
set_fields(*this);
|
||||
return *this;
|
||||
|
@ -32,3 +32,5 @@ BEGIN
|
||||
MESSAGE EXIT,K_END
|
||||
PICTURE TOOL_LASTREC
|
||||
END
|
||||
|
||||
// leave a newline at the end
|
||||
|
@ -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");
|
||||
|
@ -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;
|
||||
|
@ -19,7 +19,7 @@ word TIndwin::measure_text(TToken_string& s, word& maxlen) const
|
||||
word lines = 0;
|
||||
FOR_EACH_TOKEN(s, t)
|
||||
{
|
||||
const word l = strlen(t);
|
||||
const word l = (word) strlen(t);
|
||||
if (l > maxlen) maxlen = l;
|
||||
lines++;
|
||||
}
|
||||
|
@ -47,6 +47,11 @@
|
||||
#define RDOC_MOVMAG "MOVMAG"
|
||||
#define RDOC_CODMAGC "CODMAGC"
|
||||
#define RDOC_DATACONS "DATACONS"
|
||||
#define RDOC_QTAGG1 "QTAGG1"
|
||||
#define RDOC_QTAGG2 "QTAGG2"
|
||||
#define RDOC_QTAGG3 "QTAGG3"
|
||||
#define RDOC_QTAGG4 "QTAGG4"
|
||||
#define RDOC_QTAGG5 "QTAGG5"
|
||||
#define RDOC_IMPIANTO "IMPIANTO"
|
||||
#define RDOC_LINEA "LINEA"
|
||||
#define RDOC_IDRIGA "IDRIGA"
|
||||
|
@ -34,13 +34,13 @@ TFast_isamfile::~TFast_isamfile()
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
TRecord_array::TRecord_array(const TRectype& r, const char* numfield, int first)
|
||||
: _file(r.num()), _offset(first - 1), _num(numfield)
|
||||
: _file(r.num()), _offset(first - 1), _num(numfield), _original_nrows(0)
|
||||
{
|
||||
read(r);
|
||||
}
|
||||
|
||||
TRecord_array::TRecord_array(int logicnum, const char* numfield, int first)
|
||||
: _file(logicnum), _offset(first - 1), _num(numfield)
|
||||
: _file(logicnum), _offset(first - 1), _num(numfield), _original_nrows(0)
|
||||
{
|
||||
set_key(new TRectype(logicnum));
|
||||
}
|
||||
@ -53,7 +53,7 @@ TRecord_array::TRecord_array(const TRecord_array& a)
|
||||
// Questo si che e' il costruttore dei miei sogni
|
||||
// Senza cavolate come numfield o necessità di interi record come chiave!
|
||||
TRecord_array::TRecord_array(const char* keytok, int logicnum, int first)
|
||||
: _file(logicnum), _offset(first - 1)
|
||||
: _file(logicnum), _offset(first - 1), _original_nrows(0)
|
||||
{
|
||||
const RecDes& rd = prefix().get_recdes(logicnum); // Tracciato record del file
|
||||
const KeyDes& kd = rd.Ky[0]; // Tracciato della chiave primaria
|
||||
@ -359,6 +359,7 @@ int TRecord_array::read(TRectype* filter)
|
||||
}
|
||||
else
|
||||
err = _iskeynotfound;
|
||||
_original_nrows = last_row();
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -374,6 +375,7 @@ TRecord_array& TRecord_array::copy(
|
||||
_data = a._data;
|
||||
_offset = a._offset;
|
||||
_num = a._num;
|
||||
_original_nrows = a._original_nrows;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -447,34 +449,55 @@ 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);
|
||||
|
||||
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 (db_log() && re == true)
|
||||
{
|
||||
TLocalisamfile f(_file);
|
||||
TRectype* rec = (TRectype*)key().dup();
|
||||
|
||||
err = rec->read(f, _isgteq);
|
||||
for (int e = err; e == NOERR && good(*rec); e = rec->next(f))
|
||||
{
|
||||
const int nr = rec2row(*rec);
|
||||
|
||||
if (nr > _original_nrows)
|
||||
{
|
||||
TString8 nrow;
|
||||
|
||||
nrow << last_row() + 1;
|
||||
rec->renum_key(_num, nrow);
|
||||
((TRecord_array *) this)->add_row(rec);
|
||||
}
|
||||
}
|
||||
delete rec;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const int pos = i+_offset;
|
||||
@ -507,7 +530,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
|
||||
|
@ -32,6 +32,7 @@ class TRecord_array : public TObject
|
||||
int _offset;
|
||||
// @cmember:(INTERNAL) Nome del campo col numero di riga
|
||||
TString16 _num;
|
||||
int _original_nrows;
|
||||
|
||||
// @access Protected Member
|
||||
protected:
|
||||
@ -54,7 +55,7 @@ public:
|
||||
// @cmember Ritorna il record che fa da chiave per tutti gli altri
|
||||
const TRectype& key() const;
|
||||
// @cmember Ritorna il numero di righe presenti
|
||||
int rows() const
|
||||
inline int rows() const
|
||||
{ return _data.items()-1; }
|
||||
|
||||
// @cmember Ritorna la riga successiva non vuota a partire da <p r>
|
||||
|
@ -1,2 +1,4 @@
|
||||
#include <filebar.h>
|
||||
#include <cancelbar.h>
|
||||
#include <cancelbar.h>
|
||||
|
||||
// leave a newline at the end
|
||||
|
@ -1422,7 +1422,7 @@ void TRelation_application::main_loop()
|
||||
batch(false);
|
||||
}
|
||||
else
|
||||
k = _mask->run();
|
||||
k = _mask->run();
|
||||
|
||||
switch (k)
|
||||
{
|
||||
@ -1680,7 +1680,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 +1696,8 @@ void TRelation_application::main_loop()
|
||||
}
|
||||
_trans_counter++;
|
||||
} while ( _trans_counter < _ntransactions);
|
||||
if (_curr_trans_mode == TM_BATCH)
|
||||
force_stop();
|
||||
}
|
||||
|
||||
bool TRelation_application::filter()
|
||||
|
@ -660,6 +660,8 @@ public:
|
||||
int parse_field(const char* code, char& type, int& level, int& id) const;
|
||||
TReport_field* field(const char* code);
|
||||
|
||||
virtual bool set_var(const TString& name, const TVariant& var) { return set_usr_val(name, var); }
|
||||
|
||||
void report2mask(TMask & m) const;
|
||||
void mask2report(const TMask & m);
|
||||
|
||||
|
@ -444,7 +444,7 @@ void TPrint_preview_window::page_select()
|
||||
_page = m.get_int(101);
|
||||
if (_page < 1) _page = 1;
|
||||
if (_page > _book->pages())
|
||||
_page = _book->pages();
|
||||
_page = (word)_book->pages();
|
||||
}
|
||||
}
|
||||
|
||||
@ -533,8 +533,8 @@ long TPrint_preview_window::handler(WINDOW win, EVENT* ep)
|
||||
if (processed) _page++;
|
||||
break;
|
||||
case POPUP_LAST :
|
||||
processed = _page < _book->pages();
|
||||
if (processed) _page = _book->pages();
|
||||
processed = _page < (word) _book->pages();
|
||||
if (processed) _page = (word) _book->pages();
|
||||
break;
|
||||
case POPUP_ZOOMIN : if (_zoom < SCREENDPI*4) { _zoom += SCREENDPI/8; update_scroll_range(); } break;
|
||||
case POPUP_ZOOMOUT: if (_zoom > SCREENDPI/4) { _zoom -= SCREENDPI/8; update_scroll_range(); } break;
|
||||
@ -2452,7 +2452,7 @@ bool TReport_book::open_page()
|
||||
if (!TBook::open_page())
|
||||
return false;
|
||||
|
||||
_report->set_page(++_rep_page, page());
|
||||
_report->set_page((word) ++_rep_page, (word) page());
|
||||
|
||||
_page_break_allowed = false;
|
||||
_delta.reset();
|
||||
|
@ -1140,7 +1140,7 @@ void TSheet::repos_buttons() const
|
||||
if (c->parent() == btnwin && c->is_kind_of(CLASS_BUTTON_FIELD))
|
||||
{
|
||||
buttons--;
|
||||
const PNT p = { y, x };
|
||||
const PNT p = { (short) y, (short) x };
|
||||
xvt_rect_set_pos(&br, p);
|
||||
c->set_rect(br);
|
||||
x += space+width;
|
||||
@ -1724,7 +1724,7 @@ bool TCursor_sheet::filter_dialog()
|
||||
default:
|
||||
break;
|
||||
}
|
||||
max_len = max_len < rec.length(fname) + strlen(prompt) ? rec.length(fname) + strlen(prompt) : max_len;
|
||||
max_len = max_len < rec.length(fname) + (int) strlen(prompt) ? rec.length(fname) + (int) strlen(prompt) : max_len;
|
||||
}
|
||||
max_len += 10;
|
||||
}
|
||||
|
@ -53,3 +53,6 @@
|
||||
#define VALIDATE VA
|
||||
#define WARNING WA
|
||||
#define ZOOM ZO
|
||||
|
||||
// leave a newline at the end
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
#define __TSDB_H
|
||||
|
||||
#ifndef __XVTDB_H
|
||||
#include <xvtdb.h>
|
||||
#include <..\xvtdb\xvtdb.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -8,3 +8,5 @@
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
// leave a newline at the end
|
||||
|
@ -209,4 +209,4 @@
|
||||
|
||||
#endif
|
||||
|
||||
/* @END */
|
||||
// leave a newline at the end
|
||||
|
@ -122,13 +122,13 @@ bool fcopy(
|
||||
return error_box(FR("Impossibile scrivere il file '%s'\nper copiare il file '%s'\nErrore %d"), dest, orig, errno);
|
||||
}
|
||||
|
||||
const int size = 16*1024;
|
||||
const size_t size = 16*1024;
|
||||
TString buffer(size);
|
||||
|
||||
bool ok = true;
|
||||
while (ok)
|
||||
{
|
||||
const word letti = fread(buffer.get_buffer(), 1, size, i);
|
||||
const size_t letti = fread(buffer.get_buffer(), 1, size, i);
|
||||
ok = fwrite(buffer.get_buffer(), 1, letti, o) == letti;
|
||||
if (letti < size) break;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <colors.h>
|
||||
#include <dongle.h>
|
||||
#include <real.h>
|
||||
#include <utility.h>
|
||||
#include <xml.h>
|
||||
|
||||
#include <incstr.h>
|
||||
@ -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;
|
||||
|
@ -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
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user