Patch level : 10.0 no patch
Files correlati :pe0001.exe Ricompilazione Demo : [ ] Commento : Conversione movimenti partite e cespiti GALILEO git-svn-id: svn://10.65.10.50/trunk@19868 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
23ced5468b
commit
5cc1c81e21
@ -15,6 +15,7 @@
|
|||||||
#include "../cg/cglib01.h"
|
#include "../cg/cglib01.h"
|
||||||
|
|
||||||
#include "pe0001.h"
|
#include "pe0001.h"
|
||||||
|
#include "pe0001100.h"
|
||||||
#include "pe0001100a.h"
|
#include "pe0001100a.h"
|
||||||
|
|
||||||
#include <pconti.h>
|
#include <pconti.h>
|
||||||
@ -78,17 +79,7 @@
|
|||||||
#define IMVACM2 53 // Importo Val 2 DIZSMAS - IMPO
|
#define IMVACM2 53 // Importo Val 2 DIZSMAS - IMPO
|
||||||
#define IMPSCM2 54 // Imposta 2 DIZSMAS - IMPS
|
#define IMPSCM2 54 // Imposta 2 DIZSMAS - IMPS
|
||||||
|
|
||||||
class TImporta_mov_recset : public TCSV_recordset
|
const TVariant& TImporta_galileo_recset::get(unsigned int column) const
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
virtual const TVariant& get(unsigned int column) const;
|
|
||||||
|
|
||||||
TImporta_mov_recset(const char* query = "") : TCSV_recordset(TString("CSV(\";)\n") << query) {}
|
|
||||||
virtual ~TImporta_mov_recset() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
const TVariant& TImporta_mov_recset::get(unsigned int column) const
|
|
||||||
{
|
{
|
||||||
TString str = TCSV_recordset::get(column).as_string();
|
TString str = TCSV_recordset::get(column).as_string();
|
||||||
TVariant& var = get_tmp_var();
|
TVariant& var = get_tmp_var();
|
||||||
@ -236,7 +227,7 @@ void TImporta_mov::build_IVA(TConfig & conf, TArray & rows, TString_array & conc
|
|||||||
void TImporta_mov::transfer(const TFilename& file)
|
void TImporta_mov::transfer(const TFilename& file)
|
||||||
{
|
{
|
||||||
TFilename outdir(_msk->get(F_PATHOUT));
|
TFilename outdir(_msk->get(F_PATHOUT));
|
||||||
TImporta_mov_recset s(file);
|
TImporta_galileo_recset s(file);
|
||||||
TProgind pi(s.items(),"Importazione movimenti in corso ...",true,true);
|
TProgind pi(s.items(),"Importazione movimenti in corso ...",true,true);
|
||||||
TConfig * conf = NULL;
|
TConfig * conf = NULL;
|
||||||
long nmov = - 1;
|
long nmov = - 1;
|
||||||
|
10
ps/pe0001100.h
Executable file
10
ps/pe0001100.h
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
class TImporta_galileo_recset : public TCSV_recordset
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual const TVariant& get(unsigned int column) const;
|
||||||
|
|
||||||
|
TImporta_galileo_recset(const char* query = "") : TCSV_recordset(TString("CSV(\";)\n") << query) {}
|
||||||
|
virtual ~TImporta_galileo_recset() {}
|
||||||
|
};
|
||||||
|
|
@ -18,6 +18,7 @@
|
|||||||
#include "../cg/cgpagame.h"
|
#include "../cg/cgpagame.h"
|
||||||
|
|
||||||
#include "pe0001.h"
|
#include "pe0001.h"
|
||||||
|
#include "pe0001100.h"
|
||||||
#include "pe0001200a.h"
|
#include "pe0001200a.h"
|
||||||
|
|
||||||
#include <pconti.h>
|
#include <pconti.h>
|
||||||
@ -108,31 +109,6 @@ const TCausale& TCausali_cache::causale(const char* codice, int annoiva)
|
|||||||
return *(const TCausale*)objptr(key);
|
return *(const TCausale*)objptr(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
class TImporta_sc_recset : public TCSV_recordset
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
virtual const TVariant& get(unsigned int column) const;
|
|
||||||
|
|
||||||
TImporta_sc_recset(const char* query = "") : TCSV_recordset(TString("CSV(\";)\n") << query) {}
|
|
||||||
virtual ~TImporta_sc_recset() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
const TVariant& TImporta_sc_recset::get(unsigned int column) const
|
|
||||||
{
|
|
||||||
TString str = TCSV_recordset::get(column).as_string();
|
|
||||||
TVariant& var = get_tmp_var();
|
|
||||||
int len = str.len();
|
|
||||||
|
|
||||||
if (len == 0)
|
|
||||||
return NULL_VARIANT;
|
|
||||||
if (str[len -1] == '"')
|
|
||||||
str.rtrim(1);
|
|
||||||
if (str[0] == '"')
|
|
||||||
str.ltrim(1);
|
|
||||||
var.set(str);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TAutomask
|
// TAutomask
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -241,7 +217,7 @@ void TImporta_sc::build_table()
|
|||||||
|
|
||||||
void TImporta_sc::transfer(const TFilename& file)
|
void TImporta_sc::transfer(const TFilename& file)
|
||||||
{
|
{
|
||||||
TImporta_sc_recset s(file);
|
TImporta_galileo_recset s(file);
|
||||||
TProgind pi(s.items(),"Importazione saldaconto in corso ...",true,true);
|
TProgind pi(s.items(),"Importazione saldaconto in corso ...",true,true);
|
||||||
TConfig * conf = NULL;
|
TConfig * conf = NULL;
|
||||||
int anno = 0;
|
int anno = 0;
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "../cg/cglib01.h"
|
#include "../cg/cglib01.h"
|
||||||
|
|
||||||
#include "pe0001.h"
|
#include "pe0001.h"
|
||||||
|
#include "pe0001100.h"
|
||||||
#include "pe0001300a.h"
|
#include "pe0001300a.h"
|
||||||
|
|
||||||
#include <pconti.h>
|
#include <pconti.h>
|
||||||
@ -154,31 +155,6 @@
|
|||||||
#define VAACAS2 54 // Valore Ammort.Anti.Civil.2 DIZSMAS - VAMA
|
#define VAACAS2 54 // Valore Ammort.Anti.Civil.2 DIZSMAS - VAMA
|
||||||
#define FANCAS2 55 // Progr.Fondo Amm.Norm Civ.2 DIZSMAS - PFAN
|
#define FANCAS2 55 // Progr.Fondo Amm.Norm Civ.2 DIZSMAS - PFAN
|
||||||
|
|
||||||
class TImporta_cesp_recset : public TCSV_recordset
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
virtual const TVariant& get(unsigned int column) const;
|
|
||||||
|
|
||||||
TImporta_cesp_recset(const char* query = "") : TCSV_recordset(TString("CSV(\";)\n") << query) {}
|
|
||||||
virtual ~TImporta_cesp_recset() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
const TVariant& TImporta_cesp_recset::get(unsigned int column) const
|
|
||||||
{
|
|
||||||
TString str = TCSV_recordset::get(column).as_string();
|
|
||||||
TVariant& var = get_tmp_var();
|
|
||||||
int len = str.len();
|
|
||||||
|
|
||||||
if (len == 0)
|
|
||||||
return NULL_VARIANT;
|
|
||||||
if (str[len -1] == '"')
|
|
||||||
str.rtrim(1);
|
|
||||||
if (str[0] == '"')
|
|
||||||
str.ltrim(1);
|
|
||||||
var.set(str);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TAutomask
|
// TAutomask
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -253,14 +229,16 @@ public:
|
|||||||
void TImporta_cesp::transfer(const TFilename& file, const TFilename& filesto)
|
void TImporta_cesp::transfer(const TFilename& file, const TFilename& filesto)
|
||||||
{
|
{
|
||||||
TFilename outdir(_msk->get(F_PATHOUT));
|
TFilename outdir(_msk->get(F_PATHOUT));
|
||||||
TImporta_cesp_recset s(file);
|
TImporta_galileo_recset s(file);
|
||||||
TImporta_cesp_recset st(fileSTO);
|
TImporta_galileo_recset st(filesto);
|
||||||
TProgind pi(s.items(),"Importazione cespiti in corso ...",true,true);
|
TProgind pi(s.items(),"Importazione cespiti in corso ...",true,true);
|
||||||
const long ditta = _msk->get_long(F_CODITTA);
|
const long ditta = _msk->get_long(F_CODITTA);
|
||||||
long ntran = 1;
|
long ntran = 1;
|
||||||
TString str(50);
|
TString str(50);
|
||||||
const TEsercizi_contabili esc;
|
const TEsercizi_contabili esc;
|
||||||
int lastes = esc.last();
|
const int lastes = esc.last();
|
||||||
|
const int eschiuso = esc.pred(lastes);
|
||||||
|
real val;
|
||||||
|
|
||||||
for (bool ok = s.move_first() && st.move_first(); ok ; ok = s.move_next() && st.move_next())
|
for (bool ok = s.move_first() && st.move_first(); ok ; ok = s.move_next() && st.move_next())
|
||||||
{
|
{
|
||||||
@ -285,8 +263,9 @@ void TImporta_cesp::transfer(const TFilename& file, const TFilename& filesto)
|
|||||||
|
|
||||||
conf.set_paragraph("139"); // setto il paragrafo cespi
|
conf.set_paragraph("139"); // setto il paragrafo cespi
|
||||||
const long codces = s.get(CCESAA).as_int();
|
const long codces = s.get(CCESAA).as_int();
|
||||||
|
const TString16 scodces(format("%010ld", codces));
|
||||||
|
|
||||||
conf.set(CESPI_IDCESPITE, format("%010ld", codces));
|
conf.set(CESPI_IDCESPITE, scodces);
|
||||||
str = s.get(DCESAA).as_string();
|
str = s.get(DCESAA).as_string();
|
||||||
str << ' ' << s.get(SIGLAA).as_string();
|
str << ' ' << s.get(SIGLAA).as_string();
|
||||||
str << ' ' << s.get(DACEAA).as_string();
|
str << ' ' << s.get(DACEAA).as_string();
|
||||||
@ -335,7 +314,7 @@ void TImporta_cesp::transfer(const TFilename& file, const TFilename& filesto)
|
|||||||
{
|
{
|
||||||
int annoes = st.get(ANNOAS).as_bool();
|
int annoes = st.get(ANNOAS).as_bool();
|
||||||
|
|
||||||
while (annoes != lastes)
|
while (annoes != eschiuso)
|
||||||
{
|
{
|
||||||
ok = st.move_next();
|
ok = st.move_next();
|
||||||
if (ok)
|
if (ok)
|
||||||
@ -349,14 +328,13 @@ void TImporta_cesp::transfer(const TFilename& file, const TFilename& filesto)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
conf.set_paragraph("143"); // setto il paragrafo del file salce
|
conf.set_paragraph("143"); // setto il paragrafo del file salce
|
||||||
|
conf.set(SALCE_IDCESPITE, scodces);
|
||||||
|
conf.set(SALCE_CODES, eschiuso);
|
||||||
|
conf.set(SALCE_ANNIAMM, 1);
|
||||||
conf.set(SALCE_NUMELE, 1);
|
conf.set(SALCE_NUMELE, 1);
|
||||||
real val = s.get(VLINAS).as_real() + s.get(VAVIAS).as_real();
|
val = s.get(VLINAS).as_real() + s.get(VAVIAS).as_real();
|
||||||
conf.set(SALCE_CSTO, val.string());
|
conf.set(SALCE_CSTO, val.string());
|
||||||
/*
|
/*
|
||||||
#define SALCE_IDCESPITE "IDCESPITE"
|
|
||||||
#define SALCE_CODES "CODES"
|
|
||||||
#define SALCE_TPSALDO "TPSALDO"
|
|
||||||
#define SALCE_NUMELE "NUMELE"
|
|
||||||
#define SALCE_VNONAMM "VNONAMM"
|
#define SALCE_VNONAMM "VNONAMM"
|
||||||
#define SALCE_VNONAMM06 "VNONAMM06"
|
#define SALCE_VNONAMM06 "VNONAMM06"
|
||||||
#define SALCE_VNONAMMC "VNONAMMC"
|
#define SALCE_VNONAMMC "VNONAMMC"
|
||||||
@ -370,17 +348,43 @@ void TImporta_cesp::transfer(const TFilename& file, const TFilename& filesto)
|
|||||||
#define SALCE_RIVGF "RIVGF"
|
#define SALCE_RIVGF "RIVGF"
|
||||||
#define SALCE_RIVGC "RIVGC"
|
#define SALCE_RIVGC "RIVGC"
|
||||||
#define SALCE_VSPMANU "VSPMANU"
|
#define SALCE_VSPMANU "VSPMANU"
|
||||||
#define SALCE_ANNIAMM "ANNIAMM"
|
|
||||||
#define SALCE_DTSTBOLL "DTSTBOLL"
|
#define SALCE_DTSTBOLL "DTSTBOLL"
|
||||||
|
|
||||||
val = s.get(VLICAS).as_real() + s.get(VVICAS).as_real(); // civ
|
val = s.get(VLICAS).as_real() + s.get(VVICAS).as_real(); // civ
|
||||||
val = s.get(VLINAS2).as_real() + s.get(VAVIAS2).as_real(); // gest
|
val = s.get(VLINAS2).as_real() + s.get(VAVIAS2).as_real(); // gest
|
||||||
*/
|
*/
|
||||||
conf.set_paragraph("136"); // setto il paragrafo del file ammce
|
conf.set_paragraph("136"); // setto il paragrafo del file ammce fiscale
|
||||||
|
conf.set(AMMCE_IDCESPITE, scodces);
|
||||||
|
conf.set(AMMCE_CODES, eschiuso);
|
||||||
|
val = s.get(PFANAS).as_real() + s.get(VAFNAS).as_real(); // prog amm norm fisc
|
||||||
|
conf.set(AMMCE_QNOR, val.string());
|
||||||
|
val = s.get(VAMAAS).as_real(); // val amm acc fisc
|
||||||
|
conf.set(AMMCE_QACC, val.string());
|
||||||
|
val = s.get(PFAAAS).as_real() + s.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, scodces);
|
||||||
|
conf.set(AMMCE_CODES, eschiuso);
|
||||||
|
val = s.get(FANCAS).as_real() + s.get(VFNCAS).as_real(); // prog amm norm civ
|
||||||
|
conf.set(AMMCE_QNOR, val.string());
|
||||||
|
val = s.get(VALCAS).as_real(); // val amm acc civ
|
||||||
|
conf.set(AMMCE_QACC, val.string());
|
||||||
|
val = s.get(FAACAS).as_real() + s.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, scodces);
|
||||||
|
conf.set(AMMCE_CODES, eschiuso);
|
||||||
|
val = s.get(PFANAS2).as_real() + s.get(VAFNAS2).as_real(); // prog amm norm gest
|
||||||
|
conf.set(AMMCE_QNOR, val.string());
|
||||||
|
val = s.get(VALCAS).as_real(); // val amm acc gest
|
||||||
|
conf.set(AMMCE_QACC, val.string());
|
||||||
|
val = s.get(PFAAAS2).as_real() + s.get(VAFAAS2).as_real(); // prog amm ant gest
|
||||||
|
conf.set(AMMCE_QANT, val.string());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
#define AMMCE_IDCESPITE "IDCESPITE"
|
|
||||||
#define AMMCE_CODES "CODES"
|
|
||||||
#define AMMCE_TPSALDO "TPSALDO"
|
#define AMMCE_TPSALDO "TPSALDO"
|
||||||
#define AMMCE_TPAMM "TPAMM"
|
#define AMMCE_TPAMM "TPAMM"
|
||||||
#define AMMCE_SCELTE "SCELTE"
|
#define AMMCE_SCELTE "SCELTE"
|
||||||
@ -391,9 +395,6 @@ void TImporta_cesp::transfer(const TFilename& file, const TFilename& filesto)
|
|||||||
#define AMMCE_PACC "PACC"
|
#define AMMCE_PACC "PACC"
|
||||||
#define AMMCE_PANT "PANT"
|
#define AMMCE_PANT "PANT"
|
||||||
#define AMMCE_FZQUO "FZQUO"
|
#define AMMCE_FZQUO "FZQUO"
|
||||||
#define AMMCE_QNOR "QNOR"
|
|
||||||
#define AMMCE_QACC "QACC"
|
|
||||||
#define AMMCE_QANT "QANT"
|
|
||||||
#define AMMCE_QPERSE "QPERSE"
|
#define AMMCE_QPERSE "QPERSE"
|
||||||
#define AMMCE_FPRIVATO "FPRIVATO"
|
#define AMMCE_FPRIVATO "FPRIVATO"
|
||||||
#define AMMCE_QPPRIVATE "QPPRIVATE"
|
#define AMMCE_QPPRIVATE "QPPRIVATE"
|
||||||
@ -413,22 +414,12 @@ void TImporta_cesp::transfer(const TFilename& file, const TFilename& filesto)
|
|||||||
#define AMMCE_FRINGEBEN "FRINGEBEN"
|
#define AMMCE_FRINGEBEN "FRINGEBEN"
|
||||||
|
|
||||||
val = s.get(VAMNAS).as_real(); val amm norm fisc
|
val = s.get(VAMNAS).as_real(); val amm norm fisc
|
||||||
val = s.get(PFANAS).as_real() + s.get(VAFNAS).as_real(); prog amm norm fisc
|
|
||||||
val = s.get(VAMAAS).as_real(); val amm ant fisc
|
|
||||||
val = s.get(PFAAAS).as_real() + s.get(VAFAAS).as_real(); prog amm ant fisc
|
|
||||||
val = s.get(VALFAS).as_real(); val amm acc fisc
|
val = s.get(VALFAS).as_real(); val amm acc fisc
|
||||||
|
|
||||||
val = s.get(VANCAS).as_real(); val amm norm civ
|
val = s.get(VANCAS).as_real(); val amm norm civ
|
||||||
val = s.get(FANCAS).as_real() + s.get(VFNCAS).as_real(); prog amm norm civ
|
|
||||||
val = s.get(VAACAS).as_real(); val amm ant civ
|
val = s.get(VAACAS).as_real(); val amm ant civ
|
||||||
val = s.get(FAACAS).as_real() + s.get(VFACAS).as_real(); prog amm ant civ
|
|
||||||
val = s.get(VALCAS).as_real(); val amm acc civ
|
|
||||||
|
|
||||||
val = s.get(VAMNAS2).as_real(); val amm norm gest
|
val = s.get(VAMNAS2).as_real(); val amm norm gest
|
||||||
val = s.get(PFANAS2).as_real() + s.get(VAFNAS2).as_real(); prog amm norm gest
|
|
||||||
val = s.get(VAMAAS2).as_real(); val amm ant gest
|
val = s.get(VAMAAS2).as_real(); val amm ant gest
|
||||||
val = s.get(PFAAAS2).as_real() + s.get(VAFAAS2).as_real(); prog amm ant gest
|
|
||||||
val = s.get(VALCAS).as_real(); val amm acc gest
|
|
||||||
??? conf.set(, s.get(VLICAS2 51 // Valore Iniziale Civil.2 DIZSMAS - VLIN
|
??? 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(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(VANCAS2 53 // Valore Ammort.Normale Civ.2 DIZSMAS - VAMN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user