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:
parent
b3f899b13c
commit
15d1490823
@ -1053,14 +1053,31 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user