Patch level : 2.0 662
Files correlati : ve1.exe Ricompilazione Demo : [ ] Commento : AO20087 La stampa dei campi dei documenti origine (come previsto dalla nuova implementazione) utilizzando il PARENTDOC funziona soltanto se inserisco tali campi sul FOOTER della stampa, in testata non ne tiene conto. git-svn-id: svn://10.65.10.50/trunk@11672 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
09c70a9b8d
commit
3d3e82c2c0
@ -1011,6 +1011,7 @@ bool TDocumento_form::validate(TForm_item &cf, TToken_string &s)
|
|||||||
const short fld = s.get_int(i);
|
const short fld = s.get_int(i);
|
||||||
edit_picture(cf.section().find_field(fld), ndec);
|
edit_picture(cf.section().find_field(fld), ndec);
|
||||||
}
|
}
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (code == "_SEPARATOR") // Riempitore
|
if (code == "_SEPARATOR") // Riempitore
|
||||||
@ -1018,7 +1019,6 @@ bool TDocumento_form::validate(TForm_item &cf, TToken_string &s)
|
|||||||
TString sep;
|
TString sep;
|
||||||
sep.fill('-',s.get_int(1));
|
sep.fill('-',s.get_int(1));
|
||||||
cf.set(sep);
|
cf.set(sep);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1043,12 +1043,28 @@ bool TDocumento_form::validate(TForm_item &cf, TToken_string &s)
|
|||||||
cf.set(data.format("%d", week));
|
cf.set(data.format("%d", week));
|
||||||
else
|
else
|
||||||
cf.set(data.format("%d", year));
|
cf.set(data.format("%d", year));
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (code== "_PARENTDOC")
|
if (code== "_PARENTDOC")
|
||||||
{
|
{
|
||||||
const TRectype* rdoc = &cursor()->curr(LF_RIGHEDOC);
|
const TRectype* rdoc = &cursor()->curr(LF_RIGHEDOC);
|
||||||
int level = s.get_int(1);
|
|
||||||
|
|
||||||
|
// Se il campo corrente non appartiene al body allora cerco la prima riga documento buona!
|
||||||
|
if (cf.section().section_type() != 'B')
|
||||||
|
{
|
||||||
|
const TDocumento& doc = (const TDocumento&)cursor()->curr();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int level = s.get_int(1);
|
||||||
for (; rdoc != NULL && level > 0; level--)
|
for (; rdoc != NULL && level > 0; level--)
|
||||||
rdoc = ((const TRiga_documento*)rdoc)->find_original_rdoc();
|
rdoc = ((const TRiga_documento*)rdoc)->find_original_rdoc();
|
||||||
|
|
||||||
@ -1056,7 +1072,7 @@ bool TDocumento_form::validate(TForm_item &cf, TToken_string &s)
|
|||||||
{
|
{
|
||||||
const char provv = rdoc->get_char(RDOC_PROVV);
|
const char provv = rdoc->get_char(RDOC_PROVV);
|
||||||
const int anno = rdoc->get_int(RDOC_ANNO);
|
const int anno = rdoc->get_int(RDOC_ANNO);
|
||||||
const TString8 codnum = rdoc->get(RDOC_CODNUM);
|
const TString4 codnum = rdoc->get(RDOC_CODNUM);
|
||||||
const long ndoc = rdoc->get_long(RDOC_NDOC);
|
const long ndoc = rdoc->get_long(RDOC_NDOC);
|
||||||
|
|
||||||
if (s.get(3) != NULL) // "FULL"
|
if (s.get(3) != NULL) // "FULL"
|
||||||
@ -1076,6 +1092,7 @@ bool TDocumento_form::validate(TForm_item &cf, TToken_string &s)
|
|||||||
output_values(doc, s.get(2), cf);
|
output_values(doc, s.get(2), cf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (code== "_PARENTROW")
|
if (code== "_PARENTROW")
|
||||||
{
|
{
|
||||||
@ -1091,7 +1108,7 @@ bool TDocumento_form::validate(TForm_item &cf, TToken_string &s)
|
|||||||
{
|
{
|
||||||
const char provv = rdoc->get_char(RDOC_PROVV);
|
const char provv = rdoc->get_char(RDOC_PROVV);
|
||||||
const int anno = rdoc->get_int(RDOC_ANNO);
|
const int anno = rdoc->get_int(RDOC_ANNO);
|
||||||
const TString8 codnum = rdoc->get(RDOC_CODNUM);
|
const TString4 codnum = rdoc->get(RDOC_CODNUM);
|
||||||
const long ndoc = rdoc->get_long(RDOC_NDOC);
|
const long ndoc = rdoc->get_long(RDOC_NDOC);
|
||||||
TDocumento doc(provv, anno, codnum, ndoc);
|
TDocumento doc(provv, anno, codnum, ndoc);
|
||||||
output_values(doc[rdoc->get_int(RDOC_NRIGA)], s.get(2), cf);
|
output_values(doc[rdoc->get_int(RDOC_NRIGA)], s.get(2), cf);
|
||||||
@ -1099,6 +1116,7 @@ bool TDocumento_form::validate(TForm_item &cf, TToken_string &s)
|
|||||||
else
|
else
|
||||||
output_values(*rdoc, s.get(2), cf);
|
output_values(*rdoc, s.get(2), cf);
|
||||||
}
|
}
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (code == "_LISTADOC") // Messaggio per riepilogo lista documenti
|
if (code == "_LISTADOC") // Messaggio per riepilogo lista documenti
|
||||||
@ -1155,6 +1173,7 @@ bool TDocumento_form::validate(TForm_item &cf, TToken_string &s)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TForm::validate(cf, s); // se il codice del messaggio non è identificato viene passato alla funzione standard
|
return TForm::validate(cf, s); // se il codice del messaggio non è identificato viene passato alla funzione standard
|
||||||
|
Loading…
x
Reference in New Issue
Block a user