Correzione creazione file temporaneo LF_MOV/LF_RMOV nel caso
vi siano anche movimenti sezionali, che come ben si sa non vanno trasferiti git-svn-id: svn://10.65.10.50/trunk@4893 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3a99a9d92a
commit
14e9b5e84c
@ -1521,7 +1521,7 @@ void TTransfer_file::negativo(TString& importo)
|
||||
}
|
||||
}
|
||||
|
||||
void TTransfer_file::write_tmp_movPN(TString& record,bool create)
|
||||
void TTransfer_file::write_tmp_movPN(TString& record)
|
||||
{
|
||||
TString sigla,key,str,codreg;
|
||||
int numfield = 3; //Per i movimenti i primi due campi della mappa non sono significativi
|
||||
@ -1535,6 +1535,7 @@ void TTransfer_file::write_tmp_movPN(TString& record,bool create)
|
||||
int fnrmov = 13;
|
||||
TString tmp_path,tipodoc;
|
||||
real importo = ZERO;
|
||||
static bool create = TRUE;
|
||||
|
||||
int solo_sezionale = atoi(record.mid(218,1));
|
||||
if (solo_sezionale != 1)
|
||||
@ -1713,12 +1714,14 @@ void TTransfer_file::write_tmp_movPN(TString& record,bool create)
|
||||
key.format("%2s%d", (const char*) sigla,numfield);
|
||||
}
|
||||
while (trc.is_key((const char*) key));
|
||||
|
||||
_prog->addstatus(1);
|
||||
|
||||
if (importo != ZERO)
|
||||
trasfer_data_mov(*file, *dep);
|
||||
|
||||
if (create)
|
||||
create = FALSE; // I files (mov e rmov) vanno creati la prima volta che si tenta di scrivere un record su di essi
|
||||
|
||||
delete file;
|
||||
delete dep;
|
||||
} // if (trc.is_key((const char*) key))
|
||||
@ -1831,7 +1834,7 @@ const char* TTransfer_file::scrivi_occasionali(const TString& record)
|
||||
return cfpi;
|
||||
}
|
||||
|
||||
void TTransfer_file::write_tmp_movIVA(TString& record, bool create)
|
||||
void TTransfer_file::write_tmp_movIVA(TString& record)
|
||||
{
|
||||
TString sigla,key,str;
|
||||
int numfield = 3; //Per i movimenti i primi due campi della mappa non sono significativi
|
||||
@ -1843,6 +1846,7 @@ void TTransfer_file::write_tmp_movIVA(TString& record, bool create)
|
||||
TString nreg,tipodoc;
|
||||
int fnrmiva = 11;
|
||||
TString tmp_path;
|
||||
static bool create = TRUE;
|
||||
|
||||
sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
@ -1966,6 +1970,9 @@ void TTransfer_file::write_tmp_movIVA(TString& record, bool create)
|
||||
_prog->addstatus(1);
|
||||
trasfer_data_moviva(*file, *dep, logicnum_p);
|
||||
|
||||
if (create)
|
||||
create = FALSE;
|
||||
|
||||
delete file;
|
||||
delete dep;
|
||||
} // if (trc.is_key((const char*) key))
|
||||
@ -2072,7 +2079,7 @@ int TTransfer_file::ultima_riga_partita(TString& record)
|
||||
return riga+1;
|
||||
}
|
||||
|
||||
void TTransfer_file::write_tmp_movSC(TString& record, bool create)
|
||||
void TTransfer_file::write_tmp_movSC(TString& record)
|
||||
{
|
||||
TString annostr;
|
||||
|
||||
@ -3418,7 +3425,6 @@ void TTransfer_file::scrivi_PN(long nrec)
|
||||
const word size = 256;
|
||||
TString buffer(size);
|
||||
TString16 trec;
|
||||
bool create = TRUE;
|
||||
|
||||
_prog = new TProgind (nrec,"Trasferimento Movimenti di Prima nota in corso\nPrego attendere",FALSE, TRUE, 1);
|
||||
|
||||
@ -3434,8 +3440,7 @@ void TTransfer_file::scrivi_PN(long nrec)
|
||||
|
||||
buffer = (const char*) recf;
|
||||
|
||||
write_tmp_movPN(buffer,create);
|
||||
create = FALSE;
|
||||
write_tmp_movPN(buffer);
|
||||
}
|
||||
delete _prog;
|
||||
}
|
||||
@ -3445,7 +3450,6 @@ void TTransfer_file::scrivi_IVA(long nrec)
|
||||
const word size = 256;
|
||||
TString buffer(size);
|
||||
TString16 trec;
|
||||
bool create = TRUE;
|
||||
|
||||
_prog = new TProgind (nrec,"Trasferimento Movimenti Iva in corso\nPrego attendere",FALSE, TRUE, 1);
|
||||
|
||||
@ -3461,8 +3465,7 @@ void TTransfer_file::scrivi_IVA(long nrec)
|
||||
|
||||
buffer = (const char*) recf;
|
||||
|
||||
write_tmp_movIVA(buffer,create);
|
||||
create = FALSE;
|
||||
write_tmp_movIVA(buffer);
|
||||
}
|
||||
delete _prog;
|
||||
}
|
||||
@ -3472,7 +3475,6 @@ void TTransfer_file::scrivi_SC(long nrec)
|
||||
const word size = 256;
|
||||
TString buffer(size);
|
||||
TString16 trec;
|
||||
bool create = TRUE;
|
||||
|
||||
_nregSC_p = -1;
|
||||
_numrigSC_p = -1;
|
||||
@ -3493,8 +3495,7 @@ void TTransfer_file::scrivi_SC(long nrec)
|
||||
|
||||
buffer = (const char*) recf;
|
||||
|
||||
write_tmp_movSC(buffer,create);
|
||||
create = FALSE;
|
||||
write_tmp_movSC(buffer);
|
||||
}
|
||||
delete _prog;
|
||||
delete _tpart;
|
||||
|
@ -203,12 +203,12 @@ private:
|
||||
|
||||
void write_tmp_tabelle(TString& record, bool create);
|
||||
int trasfer_data_tab(TIsamtempfile& file, TRectype& dep);
|
||||
void write_tmp_movPN(TString& record, bool create);
|
||||
void write_tmp_movPN(TString& record);
|
||||
int trasfer_data_mov(TIsamtempfile& file, TRectype& dep);
|
||||
void write_tmp_movIVA(TString& record, bool create);
|
||||
void write_tmp_movIVA(TString& record);
|
||||
int trasfer_data_moviva(TIsamtempfile& file, TRectype& dep, int ln);
|
||||
// Funzioni per la ricezione del Saldaconto da Sistema
|
||||
void write_tmp_movSC(TString& record, bool create);
|
||||
void write_tmp_movSC(TString& record);
|
||||
void new_key(TString& key, int tipo, TString& buffer);
|
||||
void tipo_anagrafica(TString& record,TString& tipo);
|
||||
int ultima_riga_partita(TString& record);
|
||||
|
Loading…
x
Reference in New Issue
Block a user