Patch level : 2.0 680

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

AO20134
Per poter stampare il documento precedente bisognerebbe far riferimento alla
prima riga non di descrizione e non alla prima riga di riferimento sul
documento generato.


git-svn-id: svn://10.65.10.50/trunk@11749 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2004-02-06 13:51:56 +00:00
parent b3f899b13c
commit 15d1490823

View File

@ -1053,15 +1053,32 @@ bool TDocumento_form::validate(TForm_item &cf, TToken_string &s)
if (cf.section().section_type() != 'B')
{
const TDocumento& doc = (const TDocumento&)cursor()->curr();
const TRiga_documento* first_merc = NULL;
const TRiga_documento* first_desc = NULL;
for (int r = 1; r < doc.physical_rows(); r++)
{
const TRiga_documento& row = doc[r];
if (row.get(RDOC_DANDOC).not_empty())
{
rdoc = &row;
break;
if (row.is_descrizione())
{
if (first_desc == NULL)
first_desc = &row; // Non e' una riga buona, ma nemmeno da buttare!
}
else
{
first_merc = &row;
break; // Ho trovato la riga buona!
}
}
}
if (first_merc != NULL)
rdoc = first_merc;
else
{
if (first_desc != NULL)
rdoc = first_desc;
}
}
int level = s.get_int(1);