Patch level : 10.0

Files correlati     : cg3.exe
Ricompilazione Demo : [ ]
Commento            :
Corretta selezione automatica mastro clienti/fornitori


git-svn-id: svn://10.65.10.50/branches/R_10_00@22542 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2012-01-05 16:53:24 +00:00
parent a3c97c7af1
commit f450447362

View File

@ -2373,8 +2373,17 @@ bool TQuery_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
_last_tipo = tipo;
if (tipo.full())
{
// Controllo se il mastro corrente è già compatibile col tipo C/F
if (!field(F_CONTO).empty())
{
TString8 key; key.format("%d|%d", get_int(F_GRUPPO), get_int(F_CONTO));
const TString& tmcf = cache().get(LF_PCON, key, PCN_TMCF);
if (tmcf == tipo)
return true;
}
// Cerco il primo mastro conforme al tipo C/F selezionato
TWait_cursor hourglass;
TString query;
TString80 query;
query << "USE " << LF_PCON << " SELECT " << PCN_TMCF << "=\"" << tipo << "\"";
TISAM_recordset conti(query);
if (conti.move_first())