Patch level : 10.0 no patch
Files correlati :pi0001.exe Ricompilazione Demo : [ ] Commento : Conversione movimenti partite e cespiti GALILEO git-svn-id: svn://10.65.10.50/trunk@19920 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a453998974
commit
a755b63aff
@ -7,10 +7,13 @@
|
||||
#include <textset.h>
|
||||
|
||||
#include "../cg/cglib01.h"
|
||||
#include "../cg/cg2103.h"
|
||||
|
||||
|
||||
#include "pi0001.h"
|
||||
#include "pi0001100.h"
|
||||
#include "pi0001100a.h"
|
||||
#include "pi0001200.h"
|
||||
|
||||
#include <pconti.h>
|
||||
#include <mov.h>
|
||||
@ -241,6 +244,8 @@ void TImporta_mov::transfer(const TFilename& file)
|
||||
TArray rows;
|
||||
TArray impcg;
|
||||
TString_array concg;
|
||||
TCausali_cache cache_causali;
|
||||
|
||||
|
||||
for (bool ok=s.move_first();ok;ok=s.move_next())
|
||||
{
|
||||
@ -288,9 +293,17 @@ void TImporta_mov::transfer(const TFilename& file)
|
||||
conf->set("Mode","AUTO");
|
||||
|
||||
conf->set_paragraph("23"); //setto il paragrafo [23] del file ini (testata)
|
||||
|
||||
TString8 codcaus = s.get(CAUSCM).as_string();
|
||||
|
||||
iva = s.get(TPMVCM).as_string() == "I";
|
||||
if (atoi(codcaus) != 0)
|
||||
{
|
||||
codcaus << '0';
|
||||
const TCausale & c = cache_causali.causale(codcaus, codes);
|
||||
if (!iva && c.iva() != nessuna_iva)
|
||||
codcaus.cut(0);
|
||||
}
|
||||
conf->set(MOV_CODCAUS, codcaus);
|
||||
conf->set(MOV_DATAREG, datareg.string());
|
||||
const int codpag = s.get(CDPGCM).as_int();
|
||||
@ -310,7 +323,6 @@ void TImporta_mov::transfer(const TFilename& file)
|
||||
conf->set(MOV_REGST, "X");
|
||||
|
||||
descr = s.get(DSUPCM).as_string();
|
||||
iva = s.get(TPMVCM).as_string() == "I";
|
||||
|
||||
if (iva)
|
||||
{
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include "pi0001.h"
|
||||
#include "pi0001100.h"
|
||||
#include "pi0001200.h"
|
||||
#include "pi0001200a.h"
|
||||
|
||||
#include <pconti.h>
|
||||
@ -75,14 +76,6 @@
|
||||
#define CAMBPA2 29 // Cambio EURO DIZSMAS - CAME
|
||||
#define IMPOPA2 30 // Importo val 2 DIZSMAS - IMPO
|
||||
|
||||
class TCausali_cache : public TCache
|
||||
{
|
||||
protected:
|
||||
virtual TObject* key2obj(const char* key);
|
||||
|
||||
public:
|
||||
const TCausale& causale(const char* codice, int annoiva);
|
||||
};
|
||||
|
||||
TObject* TCausali_cache::key2obj(const char* key)
|
||||
{
|
||||
|
8
ps/pi0001200.h
Executable file
8
ps/pi0001200.h
Executable file
@ -0,0 +1,8 @@
|
||||
class TCausali_cache : public TCache
|
||||
{
|
||||
protected:
|
||||
virtual TObject* key2obj(const char* key);
|
||||
|
||||
public:
|
||||
const TCausale& causale(const char* codice, int annoiva);
|
||||
};
|
@ -232,8 +232,24 @@ void TImporta_cesp::transfer(const TFilename& file, const TFilename& filesto)
|
||||
const int lastes = esc.last();
|
||||
const int eschiuso = esc.pred(lastes);
|
||||
real val;
|
||||
TAssoc_array sto_keys;
|
||||
TString16 key;
|
||||
TString16 pos;
|
||||
|
||||
for (bool ok = s.move_first() && st.move_first(); ok ; ok = s.move_next() && st.move_next())
|
||||
for (bool ok = st.move_first(); ok ; ok = st.move_next())
|
||||
{
|
||||
const long dtst = st.get(CDDTAS).as_int();
|
||||
const int annoes = st.get(ANNOAS).as_int();
|
||||
|
||||
if (ditta == dtst && annoes == eschiuso)
|
||||
{
|
||||
const long codces = st.get(CCESAS).as_int();
|
||||
key.format("%010ld", codces);
|
||||
pos.format("%ld", st.current_row());
|
||||
sto_keys.add(key, pos);
|
||||
}
|
||||
}
|
||||
for (bool ok = s.move_first(); ok ; ok = s.move_next())
|
||||
{
|
||||
if (!pi.addstatus(1))
|
||||
break;
|
||||
@ -300,27 +316,11 @@ void TImporta_cesp::transfer(const TFilename& file, const TFilename& filesto)
|
||||
#define CESPI_FABBR06 "FABBR06"
|
||||
|
||||
*/
|
||||
long dtst = st.get(CDDTAS).as_int();
|
||||
long codcesst = st.get(CCESAS).as_int();
|
||||
|
||||
if (ditta == dtst && codces == codcesst)
|
||||
TString * p = (TString *) sto_keys.objptr(key);
|
||||
if (p != NULL)
|
||||
{
|
||||
int annoes = st.get(ANNOAS).as_bool();
|
||||
|
||||
while (annoes != eschiuso)
|
||||
{
|
||||
ok = st.move_next();
|
||||
if (ok)
|
||||
{
|
||||
dtst = st.get(CDDTAS).as_int();
|
||||
codcesst = st.get(CCESAS).as_int();
|
||||
annoes = st.get(ANNOAS).as_bool();
|
||||
|
||||
if (ditta != dtst || codces != codcesst)
|
||||
break;
|
||||
}
|
||||
}
|
||||
conf.set_paragraph("143"); // setto il paragrafo del file salce
|
||||
st.move_to(atol(*p));
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user