05f6b4d1eb
Files correlati : Commento : Aggiornati alcune personalizzazioni per poterle compilare sulla 12.0 git-svn-id: svn://10.65.10.50/branches/R_10_00@23223 c028cbd2-c16b-5b4b-a496-9718f37d4682
492 lines
22 KiB
C++
Executable File
492 lines
22 KiB
C++
Executable File
#include <applicat.h>
|
|
#include <automask.h>
|
|
#include <execp.h>
|
|
#include <progind.h>
|
|
#include <utility.h>
|
|
#include <textset.h>
|
|
#include <sheet.h>
|
|
|
|
#include "../ce/ammce.h"
|
|
#include "../ce/cespi.h"
|
|
#include "../ce/salce.h"
|
|
|
|
#include "../cg/cglib01.h"
|
|
|
|
#include "pi0001.h"
|
|
#include "pi0001100.h"
|
|
#include "pi0001300a.h"
|
|
|
|
#include <pconti.h>
|
|
#include <mov.h>
|
|
#include <rmov.h>
|
|
#include <rmoviva.h>
|
|
|
|
// Tracciato File: FGA5DAT/AMANA00F - AMANA : Anagrafico Cespiti INDEX UNIQUE 26/11/09 12:15:29 Pag. 1
|
|
|
|
#define AT01AA 0 // Record attivo/sospeso/annullato DIZSMAS - ATTI
|
|
#define DT01AA 1 // Data ult.manut. DIZSMAS - DATS
|
|
#define NR01AA 2 // Numero azione di aggiornamento DIZSMAS - NRAZ
|
|
#define CDDTAA 3 // Codice Ditta DIZSMAS - CDDT
|
|
#define CCESAA 4 // Codice Cespite DIZSMAS - CCES Key 1
|
|
#define DCESAA 5 // Descr. Cespite DIZSMAS - DCES
|
|
#define SIGLAA 6 // Sigla DIZSMAS - SIGL
|
|
#define DACEAA 7 // Descr. Aggiun. Cespite DIZSMAS - DACE
|
|
#define MATRAA 8 // Matricola DIZSMAS - MATR
|
|
#define UMBAAA 9 // Unita' Misura Base DIZSMAS - UMBA
|
|
#define UBMAAA 10 // Ubicazione Magazzino DIZSMAS - UBMA
|
|
#define CDNAAA 11 // Cod.Natura del Bene DIZSMAS - CDNA
|
|
#define CDAFAA 12 // Codice Ammortamento Fiscale DIZSMAS - CDAF
|
|
#define CDACAA 13 // Codice Ammortamento Civilis. DIZSMAS - CDAC
|
|
#define CDATAA 14 // Codice Ammortamento Tecnico DIZSMAS - CDAT
|
|
#define CCTPAA 15 // Centri Costo Tipico TB=CC DIZSMAS - CCTP
|
|
#define NCOMAA 16 // Numero Commessa DIZSMAS - NCOM
|
|
#define CDSCAA 17 // Codice Sottocommessa DIZSMAS - CDSC
|
|
#define CLA1AA 18 // Classe 1 DIZSMAS - CLA1
|
|
#define CLA2AA 19 // Classe 2 DIZSMAS - CLA2
|
|
#define CLA3AA 20 // Classe 3 DIZSMAS - CLA3
|
|
#define CLA4AA 21 // Classe 4 DIZSMAS - CLA4
|
|
#define CLA5AA 22 // Classe 5 DIZSMAS - CLA5
|
|
#define DTIAAA 23 // Data Inizio Ammort. DIZSMAS - DATS
|
|
#define DTITAA 24 // Data Inizio Ammort.Tecnico DIZSMAS - DATS
|
|
#define DTFAAA 25 // Data Fine Ammort. DIZSMAS - DATS
|
|
#define FLSMAA 26 // Flag Soggetto a Manut. S/ DIZSMAS - FLSM
|
|
#define CCEPAA 27 // Codice Cespite DIZSMAS - CCES
|
|
|
|
// Tracciato File: FGA5DAT/AMANI00F - AMANI : Anagrafico Cespiti: Valori iniziali INDEX UNIQUE 26/11/09 12:16:06 Pag. 1
|
|
|
|
#define DT01AAS 0 // Data ult.manut. DIZSMAS - DATS
|
|
#define CDDTAAS 1 // Codice Ditta DIZSMAS - CDDT
|
|
#define CCESAAS 2 // Codice Cespite DIZSMAS - CCES Key 1
|
|
#define CCERAA 3 // Cesp. Rif. DIZSMAS - CCES
|
|
#define VLIFAA 4 // Val.iniziale Fiscale DIZSMAS - $PRO
|
|
#define DTIFAA 5 // Data Inizio Ammort.Fiscale DIZSMAS - DATS
|
|
#define VLICAA 6 // Val.iniziale Civilistico DIZSMAS - $PRO
|
|
#define DTICAA 7 // Data Inizio Ammort.Civilistico DIZSMAS - DATS
|
|
#define VLG1AA 8 // Valore iniziale Gestion.1 DIZSMAS - $PRO
|
|
#define DTG1AA 9 // Data Inizio Ammort.Gestion.1 DIZSMAS - DATS
|
|
#define VLG2AA 10 // Valore iniziale Gestion.2 DIZSMAS - $PRO
|
|
#define DTG2AA 11 // Data Inizio Ammort.Gestion.2 DIZSMAS - DATS
|
|
#define VLG3AA 12 // Valore iniziale Gestion.3 DIZSMAS - $PRO
|
|
#define DTG3AA 13 // Data Inizio Ammort.Gestion.3 DIZSMAS - DATS
|
|
#define VLG4AA 14 // Valore iniziale Gestion.4 DIZSMAS - $PRO
|
|
#define DTG4AA 15 // Data Inizio Ammort.Gestion.4 DIZSMAS - DATS
|
|
#define VLG5AA 16 // Valore iniziale Gestion.5 DIZSMAS - $PRO
|
|
#define DTG5AA 17 // Data Inizio Ammort.Gestion.5 DIZSMAS - DATS
|
|
#define CAMBAA 18 // Cambio EURO DIZSMAS - CAME
|
|
#define VLIFAA2 19 // Val.iniz.Fisc. 2 DIZSMAS - $PRO
|
|
#define VLICAA2 20 // Val.iniz. Civil. 2 DIZSMAS - $PRO
|
|
#define VLG1AA2 21 // Val. iniz. Gest.1/2 DIZSMAS - $PRO
|
|
#define VLG2AA2 22 // Val. iniz. Gest.2/2 DIZSMAS - $PRO
|
|
#define VLG3AA2 23 // Val. iniz. Gest.3/2 DIZSMAS - $PRO
|
|
#define VLG4AA2 24 // Val. iniz. Gest.4/2 DIZSMAS - $PRO
|
|
#define VLG5AA2 25 // Val. iniz. Gest.5/2 DIZSMAS - $PRO
|
|
#define FLG1AA 26 // Amm. inf. Gest.1/2 DIZSMAS - $FLG
|
|
#define FLG2AA 27 // Amm. inf. Gest.2/2 DIZSMAS - $FLG
|
|
#define FLG3AA 28 // Amm. inf. Gest.3/2 DIZSMAS - $FLG
|
|
#define FLG4AA 29 // Amm. inf. Gest.4/2 DIZSMAS - $FLG
|
|
#define FLG5AA 30 // Amm. inf. Gest.5/2 DIZSMAS - $FLG
|
|
#define DTAQAA 31 // Data Acquisizione Cespite DIZSMAS - DATS
|
|
#define CDCLAA 32 // Codice Centro Lavoro -
|
|
#define CDMUAA 33 // Codice Macchina Utensile -
|
|
#define DPERAA 34 // Dati personalizzabili
|
|
|
|
// Tracciato File: FGA5DAT/AMSTO00F - AMSTO : Storico Movimenti Cespiti *NOMAX IN 26/11/09 12:16:29 Pag. 1
|
|
|
|
#define AT01AS 0 // Record attivo/sospeso/annullato DIZSMAS - ATTI
|
|
#define DT01AS 1 // Data ult.manut. DIZSMAS - DATS
|
|
#define NR01AS 2 // Numero azione di aggiornamento DIZSMAS - NRAZ
|
|
#define CDDTAS 3 // Codice Ditta DIZSMAS - CDDT
|
|
#define CCESAS 4 // Codice Cespite DIZSMAS - CCES Key 1
|
|
#define ANNOAS 5 // Anno Competenza DIZSMAS - ANNO
|
|
#define DTIAAS 6 // Data Inizio Ammort. DIZSMAS - DATS
|
|
#define DTFAAS 7 // Data Fine Ammort. DIZSMAS - DATS Key 2
|
|
#define VLINAS 8 // Valore Iniziale DIZSMAS - VLIN
|
|
#define VAVIAS 9 // Variazione Valore Iniziale DIZSMAS - VAVI
|
|
#define PAGNAS 10 // % Ammort. Normale DIZSMAS - PAGN
|
|
#define VAMNAS 11 // Valore Ammortamento Normale DIZSMAS - VAMN
|
|
#define PAGAAS 12 // % Ammort. Anticipato DIZSMAS - PAGA
|
|
#define VAMAAS 13 // Valore Ammortamento Anticip. DIZSMAS - VAMA
|
|
#define PFANAS 14 // Progr.Fondo Ammort.Normale DIZSMAS - PFAN
|
|
#define VAFNAS 15 // Variaz. Fondo Ammort.Norm. DIZSMAS - VAFN
|
|
#define PFAAAS 16 // Progr.Fondo Ammort.Anticip. DIZSMAS - PFAA
|
|
#define VAFAAS 17 // Variaz. Fondo Ammort.Antic. DIZSMAS - VAFA
|
|
#define RESAAS 18 // Residuo da Ammortizzare DIZSMAS - RESA
|
|
#define VAREAS 19 // Variazione Residuo da Amm. DIZSMAS - VARE
|
|
#define PALFAS 20 // % Amm. Accelerato Fiscale DIZSMAS - PAGN
|
|
#define VALFAS 21 // Valore Ammort.Accelerato Fiscale DIZSMAS - VAMN
|
|
#define M1LFAS 22 // Mese Iniziale Accelerato Fiscale DIZSMAS - MMOP
|
|
#define M2LFAS 23 // Mese Finale Accelerato Fiscale DIZSMAS - MMOP
|
|
#define VLICAS 24 // Valore Iniziale Civilistico DIZSMAS - VLIN
|
|
#define VVICAS 25 // Variaz. Valore Iniz. Civil. DIZSMAS - VAVI
|
|
#define PANCAS 26 // % Ammort.Normale Civilistico DIZSMAS - PAGN
|
|
#define VANCAS 27 // Valore Ammort.Normale Civil. DIZSMAS - VAMN
|
|
#define PAACAS 28 // % Ammort.Anticipato Civilis. DIZSMAS - PAGA
|
|
#define VAACAS 29 // Valore Ammort.Anticip.Civil. DIZSMAS - VAMA
|
|
#define FANCAS 30 // Progr.Fondo Amm.Normale Civ. DIZSMAS - PFAN
|
|
#define VFNCAS 31 // Variaz. Fondo Amm.Norm. Civ. DIZSMAS - VAFN
|
|
#define FAACAS 32 // Progr.Fondo Amm.Anticip.Civ. DIZSMAS - PFAA
|
|
#define VFACAS 33 // Variaz. Fondo Amm.Antic.Civ. DIZSMAS - VAFA
|
|
#define RESCAS 34 // Residuo da Ammortizzare Civ. DIZSMAS - RESA
|
|
#define VRECAS 35 // Variaz. Residuo da Amm. Civ. DIZSMAS - VARE
|
|
#define PALCAS 36 // % Amm. Accelerato Civilistico DIZSMAS - PAGN
|
|
#define VALCAS 37 // Valore Ammort.Accelerato Civilistico DIZSMAS - VAMN
|
|
#define M1LCAS 38 // Mese Iniziale Accelerato Civilistico DIZSMAS - MMOP
|
|
#define M2LCAS 39 // Mese Finale Accelerato Civilistico DIZSMAS - MMOP
|
|
#define CAMBAS 40 // Cambio EURO DIZSMAS - CAME
|
|
#define VLINAS2 41 // Val.iniz.2 DIZSMAS - VLIN
|
|
#define VAVIAS2 42 // Var.iniz.2 DIZSMAS - VAVI
|
|
#define VAMNAS2 43 // Val.Amm.Nor.2 DIZSMAS - VAMN
|
|
#define VAMAAS2 44 // Val.Amm.Ant.2 DIZSMAS - VAMA
|
|
#define PFANAS2 45 // Prg.Fondo Nor.2 DIZSMAS - PFAN
|
|
#define VAFNAS2 46 // Var.Fondo Nor.2 DIZSMAS - VAFN
|
|
#define PFAAAS2 47 // Prg.Fondo Ant.2 DIZSMAS - PFAA
|
|
#define VAFAAS2 48 // Var.Fondo Ant.2 DIZSMAS - VAFA
|
|
#define RESAAS2 49 // Residuo.2 DIZSMAS - RESA
|
|
#define VAREAS2 50 // Var.Res.2 DIZSMAS - VARE
|
|
#define VLICAS2 51 // Valore Iniziale Civil.2 DIZSMAS - VLIN
|
|
#define VVICAS2 52 // Variaz. Valore Iniz. Civ.2 DIZSMAS - VAVI
|
|
#define VANCAS2 53 // Valore Ammort.Normale Civ.2 DIZSMAS - VAMN
|
|
#define VAACAS2 54 // Valore Ammort.Anti.Civil.2 DIZSMAS - VAMA
|
|
#define FANCAS2 55 // Progr.Fondo Amm.Norm Civ.2 DIZSMAS - PFAN
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// TAutomask
|
|
///////////////////////////////////////////////////////////
|
|
|
|
class TImporta_cesp_mask : public TAutomask
|
|
{
|
|
protected:
|
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
|
|
|
public:
|
|
TImporta_cesp_mask();
|
|
};
|
|
|
|
TImporta_cesp_mask::TImporta_cesp_mask() :TAutomask ("pi0001300a")
|
|
{
|
|
}
|
|
|
|
bool TImporta_cesp_mask::on_field_event(TOperable_field& f, TField_event e, long jolly)
|
|
{
|
|
switch (f.dlg())
|
|
{
|
|
//giochetto per avere la lista dei files validi nella directory di trasferimento!
|
|
case F_NAME:
|
|
if (e == fe_button)
|
|
{
|
|
TArray_sheet as(-1, -1, 72, 20, TR("Selezione file"),
|
|
"File@32");
|
|
TFilename path = get(F_PATH);
|
|
path.add("*.txt"); //files delle testate
|
|
list_files(path, as.rows_array());
|
|
TFilename name;
|
|
FOR_EACH_ARRAY_ROW(as.rows_array(), i, row)
|
|
{
|
|
name = *row;
|
|
*row = name.name();
|
|
}
|
|
if (as.run() == K_ENTER)
|
|
{
|
|
f.set(as.row(as.selected()));
|
|
}
|
|
}
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
|
|
///////////////////////////////////////
|
|
// TSkeleton_application
|
|
///////////////////////////////////////
|
|
class TImporta_cesp : public TSkeleton_application
|
|
{
|
|
virtual bool check_autorization() const {return false;}
|
|
virtual const char * extra_modules() const {return "ba";}
|
|
|
|
TImporta_cesp_mask* _msk;
|
|
|
|
//protected:
|
|
|
|
|
|
public:
|
|
virtual bool create();
|
|
virtual bool destroy();
|
|
virtual void main_loop();
|
|
void transfer(const TFilename& file, const TFilename& filesto);
|
|
const char * galileo2campo(const TString & codces);
|
|
|
|
TImporta_cesp() {};
|
|
};
|
|
|
|
const char * TImporta_cesp::galileo2campo(const TString & codces)
|
|
{
|
|
TString & str = get_tmp_string(16);
|
|
const long cod = atoi(codces.left(6));
|
|
const long prog = atoi(codces.mid(7));
|
|
|
|
str.format("%06ld%04ld", cod, prog);
|
|
return str;
|
|
}
|
|
|
|
void TImporta_cesp::transfer(const TFilename& file, const TFilename& filesto)
|
|
{
|
|
TFilename outdir(_msk->get(F_PATHOUT));
|
|
TImporta_galileo_recset s(file);
|
|
TImporta_galileo_recset st(filesto);
|
|
const long ditta = _msk->get_long(F_CODITTA);
|
|
long ntran = 1;
|
|
TString str(50);
|
|
const int codes = _msk->get_int(F_ANNOES);
|
|
const int codessucc = esercizi().date2nextesc(esercizi().esercizio(codes).inizio());
|
|
real val;
|
|
TAssoc_array sto_keys;
|
|
TString16 pos;
|
|
|
|
{
|
|
TProgind pk(s.items(),"Creazione indice storico ...",true,true);
|
|
|
|
for (bool ok = st.move_first(); ok ; ok = st.move_next())
|
|
{
|
|
if (!pk.addstatus(1))
|
|
break;
|
|
|
|
const long dtst = st.get(CDDTAS).as_int();
|
|
const int annoes = st.get(ANNOAS).as_int();
|
|
|
|
if (ditta == dtst && annoes == codes)
|
|
{
|
|
const TString16 codces(galileo2campo(st.get(CCESAS).as_string()));
|
|
pos.format("%ld", st.current_row());
|
|
sto_keys.add(codces, pos);
|
|
}
|
|
}
|
|
}
|
|
|
|
TProgind pi(s.items(),"Importazione cespiti in corso ...",true,true);
|
|
|
|
for (bool ok = s.move_first(); ok ; ok = s.move_next())
|
|
{
|
|
if (!pi.addstatus(1))
|
|
break;
|
|
|
|
const long dt = s.get(CDDTAA).as_int();
|
|
|
|
if (ditta != dt)
|
|
continue;
|
|
|
|
TFilename temp(outdir);
|
|
|
|
temp << '/' << format("%05ld", ntran++);
|
|
temp.ext("ini");
|
|
if (fexist(temp))
|
|
remove_file(temp);
|
|
TConfig conf(temp);
|
|
conf.set_paragraph("Transaction"); //setto il paragrafo [Transaction] del file ini
|
|
conf.set("Action","INSERT");
|
|
conf.set("Mode","AUTO");
|
|
|
|
conf.set_paragraph("139"); // setto il paragrafo cespi
|
|
const TString16 codces(galileo2campo(s.get(CCESAA).as_string()));
|
|
|
|
conf.set(CESPI_IDCESPITE, codces);
|
|
conf.set(CESPI_CODCAT, str = s.get(CDNAAA).as_string());
|
|
|
|
str = s.get(DCESAA).as_string();
|
|
str.left(60);
|
|
conf.set(CESPI_DESC, str);
|
|
conf.set(CESPI_DTCOMP, s.get(DTIAAA).as_date());
|
|
conf.set(CESPI_DTFUNZ, s.get(DTIAAA).as_date());
|
|
conf.set(CESPI_DTALIEN, s.get(DTFAAA).as_date());
|
|
conf.set(CESPI_TPSPEMAN, s.get(FLSMAA).as_bool() ? 2 : 1);
|
|
/*
|
|
#define CESPI_CODCGRA "CODCGRA"
|
|
#define CESPI_CODSPA "CODSPA"
|
|
#define CESPI_CODCGR "CODCGR"
|
|
#define CESPI_CODSP "CODSP"
|
|
#define CESPI_CODCAT "CODCAT"
|
|
#define CESPI_CODIMP "CODIMP"
|
|
#define CESPI_CODLOC "CODLOC"
|
|
#define CESPI_CODORIG "CODORIG"
|
|
#define CESPI_DTCOMP "DTCOMP"
|
|
#define CESPI_AMMPROP "AMMPROP"
|
|
#define CESPI_ESCLPR "ESCLPR"
|
|
#define CESPI_USOPROM "USOPROM"
|
|
#define CESPI_LEASING "LEASING"
|
|
#define CESPI_TUIR "TUIR"
|
|
#define CESPI_USATO "USATO"
|
|
#define CESPI_ANNIRIC "ANNIRIC"
|
|
#define CESPI_PMAT "PMAT"
|
|
#define CESPI_PIMM "PIMM"
|
|
#define CESPI_VINCOLO "VINCOLO"
|
|
#define CESPI_PMINP "PMINP"
|
|
#define CESPI_PMAXP "PMAXP"
|
|
#define CESPI_CODVAL "CODVAL"
|
|
#define CESPI_FLGTPVEI "FLGTPVEI"
|
|
#define CESPI_VEIDIP "VEIDIP"
|
|
#define CESPI_STABILIM "STABILIM"
|
|
#define CESPI_REPARTO "REPARTO"
|
|
#define CESPI_IDIMP "IDIMP"
|
|
#define CESPI_PERCIMP "PERCIMP"
|
|
#define CESPI_FABBR06 "FABBR06"
|
|
|
|
*/
|
|
conf.set_paragraph("143"); // setto il paragrafo del file salce
|
|
conf.set(SALCE_IDCESPITE, codces);
|
|
conf.set(SALCE_CODES, codessucc);
|
|
conf.set(SALCE_ANNIAMM, 1);
|
|
conf.set(SALCE_NUMELE, 1);
|
|
TString * p = (TString *) sto_keys.objptr(codces);
|
|
if (p != NULL)
|
|
{
|
|
st.move_to(atol(*p));
|
|
|
|
const TString16 wcodces(galileo2campo(st.get(CCESAS).as_string()));
|
|
|
|
CHECK(codces == wcodces, format("Errore di posizionamento Cespite %s - %s", (const char *)codces, (const char *) wcodces));
|
|
val = st.get(VLINAS).as_real() + st.get(VAVIAS).as_real();
|
|
conf.set(SALCE_CSTO, val.string());
|
|
/*
|
|
#define SALCE_VNONAMM "VNONAMM"
|
|
#define SALCE_VNONAMM06 "VNONAMM06"
|
|
#define SALCE_VNONAMMC "VNONAMMC"
|
|
#define SALCE_PLUSREIN "PLUSREIN"
|
|
#define SALCE_RIV75 "RIV75"
|
|
#define SALCE_RIV83 "RIV83"
|
|
#define SALCE_RIV90 "RIV90"
|
|
#define SALCE_ANNIPOST90 "ANNIPOST90"
|
|
#define SALCE_ANNIPOST91 "ANNIPOST91"
|
|
#define SALCE_RIV91 "RIV91"
|
|
#define SALCE_RIVGF "RIVGF"
|
|
#define SALCE_RIVGC "RIVGC"
|
|
#define SALCE_VSPMANU "VSPMANU"
|
|
#define SALCE_DTSTBOLL "DTSTBOLL"
|
|
|
|
val = s.get(VLICAS).as_real() + s.get(VVICAS).as_real(); // civ
|
|
val = s.get(VLINAS2).as_real() + s.get(VAVIAS2).as_real(); // gest
|
|
*/
|
|
conf.set_paragraph("136"); // setto il paragrafo del file ammce fiscale
|
|
conf.set(AMMCE_IDCESPITE, codces);
|
|
conf.set(AMMCE_CODES, codes);
|
|
val = st.get(PFANAS).as_real() + st.get(VAFNAS).as_real(); // prog amm norm fisc
|
|
conf.set(AMMCE_QNOR, val.string());
|
|
val = st.get(VAMAAS).as_real(); // val amm acc fisc
|
|
conf.set(AMMCE_QACC, val.string());
|
|
val = st.get(PFAAAS).as_real() + st.get(VAFAAS).as_real(); // prog amm ant fisc
|
|
conf.set(AMMCE_QANT, val.string());
|
|
|
|
conf.set_paragraph("-1"); // setto il paragrafo del file ammce civilistico
|
|
conf.set(AMMCE_IDCESPITE, codces);
|
|
conf.set(AMMCE_CODES, codes);
|
|
val = st.get(FANCAS).as_real() + st.get(VFNCAS).as_real(); // prog amm norm civ
|
|
conf.set(AMMCE_QNOR, val.string());
|
|
val = st.get(VALCAS).as_real(); // val amm acc civ
|
|
conf.set(AMMCE_QACC, val.string());
|
|
val = st.get(FAACAS).as_real() + st.get(VFACAS).as_real(); // prog amm ant civ
|
|
conf.set(AMMCE_QANT, val.string());
|
|
|
|
conf.set_paragraph("-2"); // setto il paragrafo del file ammce gestionale
|
|
conf.set(AMMCE_IDCESPITE, codces);
|
|
conf.set(AMMCE_CODES, codes);
|
|
val = st.get(PFANAS2).as_real() + st.get(VAFNAS2).as_real(); // prog amm norm gest
|
|
conf.set(AMMCE_QNOR, val.string());
|
|
val = st.get(VALCAS).as_real(); // val amm acc gest
|
|
conf.set(AMMCE_QACC, val.string());
|
|
val = st.get(PFAAAS2).as_real() + st.get(VAFAAS2).as_real(); // prog amm ant gest
|
|
conf.set(AMMCE_QANT, val.string());
|
|
|
|
/*
|
|
|
|
#define AMMCE_TPSALDO "TPSALDO"
|
|
#define AMMCE_TPAMM "TPAMM"
|
|
#define AMMCE_SCELTE "SCELTE"
|
|
#define AMMCE_AMMRIT "AMMRIT"
|
|
#define AMMCE_CSCEN "CSCEN"
|
|
#define AMMCE_FZPER "FZPER"
|
|
#define AMMCE_PNOR "PNOR"
|
|
#define AMMCE_PACC "PACC"
|
|
#define AMMCE_PANT "PANT"
|
|
#define AMMCE_FZQUO "FZQUO"
|
|
#define AMMCE_QPERSE "QPERSE"
|
|
#define AMMCE_FPRIVATO "FPRIVATO"
|
|
#define AMMCE_QPPRIVATE "QPPRIVATE"
|
|
#define AMMCE_QNORP "QNORP"
|
|
#define AMMCE_QACCP "QACCP"
|
|
#define AMMCE_QANTP "QANTP"
|
|
#define AMMCE_QPERSEP "QPERSEP"
|
|
#define AMMCE_FPRIVATOP "FPRIVATOP"
|
|
#define AMMCE_QPPRIVATEP "QPPRIVATEP"
|
|
#define AMMCE_MSG01 "MSG01"
|
|
#define AMMCE_MSG02 "MSG02"
|
|
#define AMMCE_MSG03 "MSG03"
|
|
#define AMMCE_MSG04 "MSG04"
|
|
#define AMMCE_MSG05 "MSG05"
|
|
#define AMMCE_MSGD05 "MSGD05"
|
|
#define AMMCE_MSG06 "MSG06"
|
|
#define AMMCE_FRINGEBEN "FRINGEBEN"
|
|
|
|
val = s.get(VAMNAS).as_real(); val amm norm fisc
|
|
val = s.get(VALFAS).as_real(); val amm acc fisc
|
|
val = s.get(VANCAS).as_real(); val amm norm civ
|
|
val = s.get(VAACAS).as_real(); val amm ant civ
|
|
val = s.get(VAMNAS2).as_real(); val amm norm gest
|
|
val = s.get(VAMAAS2).as_real(); val amm ant gest
|
|
|
|
??? conf.set(, s.get(VLICAS2 51 // Valore Iniziale Civil.2 DIZSMAS - VLIN
|
|
conf.set(, s.get(VVICAS2 52 // Variaz. Valore Iniz. Civ.2 DIZSMAS - VAVI
|
|
conf.set(, s.get(VANCAS2 53 // Valore Ammort.Normale Civ.2 DIZSMAS - VAMN
|
|
conf.set(, s.get(VAACAS2 54 // Valore Ammort.Anti.Civil.2 DIZSMAS - VAMA
|
|
conf.set(, s.get(FANCAS2 55 // Progr.Fondo Amm.Norm Civ.2 DIZSMAS - PFAN */
|
|
}
|
|
}
|
|
if (yesno_box(FR("Si desidera confermare l'importazione di %ld record di cespiti"), ntran - 1))
|
|
{
|
|
TString app;
|
|
|
|
app << "ce0 -4 -i" << outdir << "/*.ini";
|
|
TExternal_app primanota(app);
|
|
primanota.run(true);
|
|
}
|
|
}
|
|
|
|
|
|
bool TImporta_cesp::create()
|
|
{
|
|
_msk = new TImporta_cesp_mask();
|
|
|
|
return TSkeleton_application::create();
|
|
}
|
|
|
|
bool TImporta_cesp::destroy()
|
|
{
|
|
delete _msk;
|
|
return TApplication::destroy();
|
|
}
|
|
|
|
void TImporta_cesp::main_loop()
|
|
{
|
|
KEY tasto;
|
|
tasto = _msk->run();
|
|
if (tasto == K_ENTER)
|
|
{
|
|
//genero il nome del file da caricare
|
|
TFilename name = _msk->get(F_PATH);
|
|
name.add(_msk->get(F_NAME));
|
|
TFilename namesto = _msk->get(F_PATH);
|
|
namesto.add(_msk->get(F_NAME_STO));
|
|
transfer(name, namesto);
|
|
}
|
|
}
|
|
|
|
|
|
TImporta_cesp& app() { return (TImporta_cesp&) main_app(); }
|
|
|
|
|
|
int pi0001300 (int argc, char* argv[])
|
|
{
|
|
TImporta_cesp main_app;
|
|
main_app.run(argc, argv, TR("Importazione cespiti"));
|
|
return true;
|
|
} |