Corretto errore 1210

git-svn-id: svn://10.65.10.50/trunk@383 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1994-10-14 18:43:56 +00:00
parent 0a90ee7de7
commit a2bc61e198
3 changed files with 19 additions and 25 deletions

View File

@ -12,6 +12,7 @@
#include <anagr.h>
#include <anafis.h>
#include <cfven.h>
#include <mov.h>
#include <indsp.h>
#include "cg0.h"
@ -29,7 +30,7 @@ class CG0200_application : public TRelation_application
{
TMask* _msk;
TClifoVI *_rel;
TLocalisamfile* _saldi;
TLocalisamfile* _mov;
TLocalisamfile* _anag;
TLocalisamfile* _fis;
TLocalisamfile* _comuni;
@ -61,9 +62,8 @@ protected:
void reset_sheet();
void indsp_pack();
void common_f(const TMask& m);
///////////
static bool tipo_handler(TMask_field& f, KEY key);
static bool tipo_handler(TMask_field& f, KEY key);
static bool percip_handler(TMask_field& f, KEY key);
public:
@ -77,20 +77,16 @@ bool CG0200_application::protected_record(TRectype &rec)
{
TMask* m = get_mask(MODE_MOD);
const int gruppo = atoi(m->get(F_GRUPPO));
const int conto = atoi(m->get(F_CONTO));
const long sottoc = atol(m->get(F_CODCF));
const TString16 tipocf(m->get(F_TIPOCF));
const long codice = atol(m->get(F_CODCF));
_saldi->zero();
_saldi->put(PCN_GRUPPO, gruppo);
_saldi->put(PCN_CONTO, conto);
_saldi->put(PCN_SOTTOCONTO, sottoc);
_saldi->read();
return _saldi->good() &&
gruppo ==_saldi->get_int(PCN_GRUPPO) &&
conto ==_saldi->get_int(PCN_CONTO) &&
sottoc ==_saldi->get_long(PCN_SOTTOCONTO);
_mov->curr().zero();
_mov->curr().put(MOV_TIPO, tipocf);
_mov->curr().put(MOV_CODCF, codice);
_mov->read();
return tipocf == _mov->get(MOV_TIPO) &&
codice == atol(_mov->get(MOV_CODCF));
return FALSE;
}
const char* CG0200_application::get_next_key()
@ -565,7 +561,7 @@ bool CG0200_application::user_create() // initvar e arrmask
_rel = new TClifoVI;
_saldi = new TLocalisamfile(LF_SALDI);
_mov = new TLocalisamfile(LF_MOV);
_anag = new TLocalisamfile(LF_ANAG);
_fis = new TLocalisamfile(LF_ANAGFIS);
_pcon = new TLocalisamfile(LF_PCON);
@ -585,7 +581,7 @@ bool CG0200_application::user_create() // initvar e arrmask
ind.set_notify(indsp_notify);
_saldi->setkey(2);
_mov->setkey(3);
return TRUE;
}
@ -593,7 +589,7 @@ bool CG0200_application::user_destroy() // releasev e arrmask
{
delete _msk;
delete _rel;
delete _saldi;
delete _mov;
delete _anag;
delete _fis;
delete _pcon;

View File

@ -129,6 +129,7 @@
#define DLG_RIC 300
#define DLG_CST 301
#define F_RAGSOCA 302
//////////////////////////////////////

View File

@ -167,11 +167,8 @@ const char * SortRecord::fill_dati_dettaglio (const char * tipocf, long codcf)
if (tipop == "F")
{
int pos = rag.find (" ");
if (pos < 0) pos = rag.find (" ");
if (pos < 0) pos = 30; // se non ci sono spazi prendo i primi 30
cog = rag.left(pos);
nom = rag.mid (pos+1);
cog = rag.left(30);
nom = rag.mid (31);
strcpy (_all->cognome_dett , cog.trim());
strcpy (_all->nome_dett , nom.trim());
//