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;
|
TString sigla,key,str,codreg;
|
||||||
int numfield = 3; //Per i movimenti i primi due campi della mappa non sono significativi
|
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;
|
int fnrmov = 13;
|
||||||
TString tmp_path,tipodoc;
|
TString tmp_path,tipodoc;
|
||||||
real importo = ZERO;
|
real importo = ZERO;
|
||||||
|
static bool create = TRUE;
|
||||||
|
|
||||||
int solo_sezionale = atoi(record.mid(218,1));
|
int solo_sezionale = atoi(record.mid(218,1));
|
||||||
if (solo_sezionale != 1)
|
if (solo_sezionale != 1)
|
||||||
@ -1713,11 +1714,13 @@ void TTransfer_file::write_tmp_movPN(TString& record,bool create)
|
|||||||
key.format("%2s%d", (const char*) sigla,numfield);
|
key.format("%2s%d", (const char*) sigla,numfield);
|
||||||
}
|
}
|
||||||
while (trc.is_key((const char*) key));
|
while (trc.is_key((const char*) key));
|
||||||
|
|
||||||
_prog->addstatus(1);
|
_prog->addstatus(1);
|
||||||
|
|
||||||
if (importo != ZERO)
|
if (importo != ZERO)
|
||||||
trasfer_data_mov(*file, *dep);
|
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 file;
|
||||||
delete dep;
|
delete dep;
|
||||||
@ -1831,7 +1834,7 @@ const char* TTransfer_file::scrivi_occasionali(const TString& record)
|
|||||||
return cfpi;
|
return cfpi;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TTransfer_file::write_tmp_movIVA(TString& record, bool create)
|
void TTransfer_file::write_tmp_movIVA(TString& record)
|
||||||
{
|
{
|
||||||
TString sigla,key,str;
|
TString sigla,key,str;
|
||||||
int numfield = 3; //Per i movimenti i primi due campi della mappa non sono significativi
|
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;
|
TString nreg,tipodoc;
|
||||||
int fnrmiva = 11;
|
int fnrmiva = 11;
|
||||||
TString tmp_path;
|
TString tmp_path;
|
||||||
|
static bool create = TRUE;
|
||||||
|
|
||||||
sigla = record.mid(0,2);
|
sigla = record.mid(0,2);
|
||||||
key.format("%2s%d", (const char*)sigla,numfield);
|
key.format("%2s%d", (const char*)sigla,numfield);
|
||||||
@ -1965,6 +1969,9 @@ void TTransfer_file::write_tmp_movIVA(TString& record, bool create)
|
|||||||
|
|
||||||
_prog->addstatus(1);
|
_prog->addstatus(1);
|
||||||
trasfer_data_moviva(*file, *dep, logicnum_p);
|
trasfer_data_moviva(*file, *dep, logicnum_p);
|
||||||
|
|
||||||
|
if (create)
|
||||||
|
create = FALSE;
|
||||||
|
|
||||||
delete file;
|
delete file;
|
||||||
delete dep;
|
delete dep;
|
||||||
@ -2072,7 +2079,7 @@ int TTransfer_file::ultima_riga_partita(TString& record)
|
|||||||
return riga+1;
|
return riga+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TTransfer_file::write_tmp_movSC(TString& record, bool create)
|
void TTransfer_file::write_tmp_movSC(TString& record)
|
||||||
{
|
{
|
||||||
TString annostr;
|
TString annostr;
|
||||||
|
|
||||||
@ -3418,7 +3425,6 @@ void TTransfer_file::scrivi_PN(long nrec)
|
|||||||
const word size = 256;
|
const word size = 256;
|
||||||
TString buffer(size);
|
TString buffer(size);
|
||||||
TString16 trec;
|
TString16 trec;
|
||||||
bool create = TRUE;
|
|
||||||
|
|
||||||
_prog = new TProgind (nrec,"Trasferimento Movimenti di Prima nota in corso\nPrego attendere",FALSE, TRUE, 1);
|
_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;
|
buffer = (const char*) recf;
|
||||||
|
|
||||||
write_tmp_movPN(buffer,create);
|
write_tmp_movPN(buffer);
|
||||||
create = FALSE;
|
|
||||||
}
|
}
|
||||||
delete _prog;
|
delete _prog;
|
||||||
}
|
}
|
||||||
@ -3445,7 +3450,6 @@ void TTransfer_file::scrivi_IVA(long nrec)
|
|||||||
const word size = 256;
|
const word size = 256;
|
||||||
TString buffer(size);
|
TString buffer(size);
|
||||||
TString16 trec;
|
TString16 trec;
|
||||||
bool create = TRUE;
|
|
||||||
|
|
||||||
_prog = new TProgind (nrec,"Trasferimento Movimenti Iva in corso\nPrego attendere",FALSE, TRUE, 1);
|
_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;
|
buffer = (const char*) recf;
|
||||||
|
|
||||||
write_tmp_movIVA(buffer,create);
|
write_tmp_movIVA(buffer);
|
||||||
create = FALSE;
|
|
||||||
}
|
}
|
||||||
delete _prog;
|
delete _prog;
|
||||||
}
|
}
|
||||||
@ -3472,7 +3475,6 @@ void TTransfer_file::scrivi_SC(long nrec)
|
|||||||
const word size = 256;
|
const word size = 256;
|
||||||
TString buffer(size);
|
TString buffer(size);
|
||||||
TString16 trec;
|
TString16 trec;
|
||||||
bool create = TRUE;
|
|
||||||
|
|
||||||
_nregSC_p = -1;
|
_nregSC_p = -1;
|
||||||
_numrigSC_p = -1;
|
_numrigSC_p = -1;
|
||||||
@ -3493,8 +3495,7 @@ void TTransfer_file::scrivi_SC(long nrec)
|
|||||||
|
|
||||||
buffer = (const char*) recf;
|
buffer = (const char*) recf;
|
||||||
|
|
||||||
write_tmp_movSC(buffer,create);
|
write_tmp_movSC(buffer);
|
||||||
create = FALSE;
|
|
||||||
}
|
}
|
||||||
delete _prog;
|
delete _prog;
|
||||||
delete _tpart;
|
delete _tpart;
|
||||||
|
@ -203,12 +203,12 @@ private:
|
|||||||
|
|
||||||
void write_tmp_tabelle(TString& record, bool create);
|
void write_tmp_tabelle(TString& record, bool create);
|
||||||
int trasfer_data_tab(TIsamtempfile& file, TRectype& dep);
|
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);
|
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);
|
int trasfer_data_moviva(TIsamtempfile& file, TRectype& dep, int ln);
|
||||||
// Funzioni per la ricezione del Saldaconto da Sistema
|
// 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 new_key(TString& key, int tipo, TString& buffer);
|
||||||
void tipo_anagrafica(TString& record,TString& tipo);
|
void tipo_anagrafica(TString& record,TString& tipo);
|
||||||
int ultima_riga_partita(TString& record);
|
int ultima_riga_partita(TString& record);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user