Patch level : 2.0 618

Files correlati     : cg6.exe
Ricompilazione Demo : [ ]
Commento            :

CM20052
Se invio il piano dei conti con la IV direttiva Cee pur essendoci nel trasfer
la ditta che riceve non riceve la IV Direttiva


git-svn-id: svn://10.65.10.50/trunk@11536 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-10-24 13:41:40 +00:00
parent 574b37af3f
commit 7a217f6176
3 changed files with 32 additions and 26 deletions

View File

@ -311,7 +311,8 @@ bool TRic_archivi::leggi_marker_rep()
return error_box(FR("Gli archivi della ditta %ld non sono presenti su disco"), _dittaric); return error_box(FR("Gli archivi della ditta %ld non sono presenti su disco"), _dittaric);
} }
else else
return error_box(TR("Codici NON PRESENTI in tabella ricezione: caricarli e riprovare")); return error_box(FR("Codici NON PRESENTI in tabella ricezione:\nStudio %s Ditta inviante %ld"),
(const char*)_nomeid, _dittainv);
} }
return TRUE; return TRUE;
@ -685,13 +686,10 @@ void TRic_archivi::ditta_ricevente()
long TRic_archivi::leggi_tabella_tras() long TRic_archivi::leggi_tabella_tras()
{ {
TString dep(16);
long ditta = 0; long ditta = 0;
bool agg_fatatt,agg_fatpas;
TString16 dep;
TTable tab_tra ("%TRA"); TTable tab_tra ("%TRA");
tab_tra.zero();
dep.format("%10s%05ld", (const char*)_nomeid, _dittainv); dep.format("%10s%05ld", (const char*)_nomeid, _dittainv);
tab_tra.put("CODTAB", dep); tab_tra.put("CODTAB", dep);
if (tab_tra.read() == NOERR) if (tab_tra.read() == NOERR)
@ -703,13 +701,13 @@ long TRic_archivi::leggi_tabella_tras()
_agg_clifo = tab_tra.get_char("S1"); _agg_clifo = tab_tra.get_char("S1");
_agg_pcon = tab_tra.get_char("S2"); _agg_pcon = tab_tra.get_char("S2");
_agg_cls = tab_tra.get_char("S3"); _agg_cls = tab_tra.get_char("S3");
agg_fatatt = tab_tra.get_bool("B0"); bool agg_fatatt = tab_tra.get_bool("B0");
if (agg_fatatt) if (agg_fatatt)
_agg_fatatt = 'X'; _agg_fatatt = 'X';
else else
_agg_fatatt = ' '; _agg_fatatt = ' ';
agg_fatpas = tab_tra.get_bool("B1"); bool agg_fatpas = tab_tra.get_bool("B1");
if (agg_fatpas) if (agg_fatpas)
_agg_fatpas = 'X'; _agg_fatpas = 'X';
else else

View File

@ -27,7 +27,6 @@
class TRic_tab : public TSkeleton_application class TRic_tab : public TSkeleton_application
{ {
TTable* _tab_tra; TTable* _tab_tra;
TLocalisamfile* _caus,*_rcaus,*_clifo,*_pcon,*_mov,*_rmov,*_rmoviva; TLocalisamfile* _caus,*_rcaus,*_clifo,*_pcon,*_mov,*_rmov,*_rmoviva;
TLocalisamfile* _saldi,*_occas,*_part,*_scad,*_pagsca; TLocalisamfile* _saldi,*_occas,*_part,*_scad,*_pagsca;
@ -623,9 +622,9 @@ void TRic_tab::ricevi_pcon(TString& key, char uselab)
{ {
_prog->addstatus(1); _prog->addstatus(1);
int g = _tpcon->get_int (PCN_GRUPPO); const int g = _tpcon->get_int (PCN_GRUPPO);
int c = _tpcon->get_int (PCN_CONTO); const int c = _tpcon->get_int (PCN_CONTO);
long s = _tpcon->get_long(PCN_SOTTOCONTO); const long s = _tpcon->get_long(PCN_SOTTOCONTO);
_pcon->curr() = _tpcon->curr(); _pcon->curr() = _tpcon->curr();
@ -668,10 +667,19 @@ void TRic_tab::ricevi_pcon(TString& key, char uselab)
if (f_IV == 'T') if (f_IV == 'T')
{ {
/*
if (g != 0 && c == 0) if (g != 0 && c == 0)
conto(pcon,flag,esiste); conto(pcon,flag,esiste);
if (g != 0 && c != 0 && s != 0) if (g != 0 && c != 0 && s != 0)
sottoconto(pcon,flag,esiste); sottoconto(pcon,flag,esiste);
*/
if (g != 0 && c != 0)
{
if (s == 0)
conto(pcon,flag,esiste);
else
sottoconto(pcon,flag,esiste);
}
} }
if (esiste) if (esiste)
@ -735,12 +743,12 @@ void TRic_tab::scrivi_pcon(TRectype& pcon,bool esiste)
void TRic_tab::conto(TRectype& pcon,char flag,bool esiste) void TRic_tab::conto(TRectype& pcon,char flag,bool esiste)
{ {
int g = _tpcon->get_int(PCN_GRUPPO); const int g = _tpcon->get_int(PCN_GRUPPO);
int c = _tpcon->get_int(PCN_CONTO); const int c = _tpcon->get_int(PCN_CONTO);
TString sez = _tpcon->get (PCN_SEZIVD); TString8 sez = _tpcon->get (PCN_SEZIVD);
TString let = _tpcon->get (PCN_LETTIVD); TString8 let = _tpcon->get (PCN_LETTIVD);
TString numr = _tpcon->get (PCN_NUMRIVD); TString8 numr = _tpcon->get (PCN_NUMRIVD);
int num = _tpcon->get_int(PCN_NUMIVD); int num = _tpcon->get_int(PCN_NUMIVD);
if (sez.not_empty()) if (sez.not_empty())

View File

@ -3681,7 +3681,7 @@ bool TTransfer_file::fcopytemp_PC(const char* orig, const char* dest)
{ {
const word letti = fread((char*)(const char*)buffer, 1, size, i); const word letti = fread((char*)(const char*)buffer, 1, size, i);
trec = buffer.sub(0,2); trec = buffer.left(2);
if (trec == " 1") // Copio il record di controllo nel file di appoggio if (trec == " 1") // Copio il record di controllo nel file di appoggio
{ // header. { // header.
@ -3749,8 +3749,8 @@ bool TTransfer_file::fcopytemp_PC(const char* orig, const char* dest)
} }
if (sigle.find('P') >= 0) if (sigle.find('P') >= 0)
{ {
delete _tpcon; delete _tpcon; _tpcon = NULL;
delete _deppcon; delete _deppcon; _deppcon = NULL;
} }
if (sigle.find('Z') >= 0) if (sigle.find('Z') >= 0)
{ {
@ -4028,11 +4028,11 @@ void TTransfer_file::write_clienti_fornitori(TString& record)
void TTransfer_file::write_piano_conti(TString& record) void TTransfer_file::write_piano_conti(TString& record)
{ {
TString sigla,key; TString8 key;
int numfield = 1; int numfield = 1;
TMappa_trc& trc = mappa(); TMappa_trc& trc = mappa();
sigla = record.mid(0,2); const TString4 sigla = record.left(2);
key.format("%2s%d", (const char*)sigla,numfield); key.format("%2s%d", (const char*)sigla,numfield);
_deppcon->zero(); _deppcon->zero();