Patch level : 12.0 844
Files correlati : fp0, fp0500a.msk Commento : - Sistemata maschera fp0500 per lo sheet altri dati gestionali - Corretto indice passato a load_adg_paf() nelle righe del documento - Tolto inserimento riga "Altri dati gestionali" se non vengono scritti altri dati gestionali - Corretta lettura e scrittura record FPCUSTADG durante il salvataggio - Aggiunti left() a campi nuovi per evitare data binary truncation - Sistamato controllo booleano split - Sistemato controllo simbolo in split_condition() - Sistemata parse_var per variabili vuote
This commit is contained in:
parent
aea092103f
commit
98a38dd34d
@ -64,7 +64,6 @@ TFpcust_mask::TFpcust_mask() : TAutomask("fp0500a")
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// APPLICAZIONE
|
||||
//--------------------------------------------------------------
|
||||
@ -154,7 +153,6 @@ int TFpcust::read(TMask& m)
|
||||
row.add(radg->get(FPCADG_TIPORIGA), xvtil_cid2index(S_ADG_TIPORIGA));
|
||||
row.add(radg->get(FPCADG_COND), xvtil_cid2index(S_ADG_COND));
|
||||
row.add(radg->get(FPCADG_SPLIT), xvtil_cid2index(S_ADG_SPLIT));
|
||||
|
||||
}
|
||||
|
||||
return NOERR;
|
||||
|
@ -61,7 +61,7 @@ BEGIN
|
||||
PROMPT 1 0 "@bArticoli"
|
||||
END
|
||||
|
||||
SPREADSHEET F_ARTICOLI 0 10
|
||||
SPREADSHEET F_ARTICOLI 0 9
|
||||
BEGIN
|
||||
PROMPT 0 1 ""
|
||||
ITEM "2.2.1.3.1 Tipo@35"
|
||||
@ -74,7 +74,7 @@ BEGIN
|
||||
PROMPT 1 11 "@bAltri dati gestionali"
|
||||
END
|
||||
|
||||
SPREADSHEET F_ADG 0 10
|
||||
SPREADSHEET F_ADG 0 9
|
||||
BEGIN
|
||||
PROMPT 0 12 ""
|
||||
ITEM "2.2.1.16.1 Tipo Dato@35"
|
||||
|
@ -1867,7 +1867,7 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
||||
{
|
||||
if(_has_cust)
|
||||
{
|
||||
cached_custom_fp().get_custom(doc).load_adg_paf(paf2100f, *rdoc, *this, _idx_adg_doc_row);
|
||||
cached_custom_fp().get_custom(doc).load_adg_paf(paf2100f, *rdoc, *this, riga);
|
||||
}
|
||||
|
||||
paf1800f.set("PI_GESTIONE", "D");
|
||||
@ -2004,8 +2004,10 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
||||
|
||||
// Resetto il contatore
|
||||
_idx_adg_doc_row = 1L;
|
||||
ok &= cached_custom_fp().get_custom(doc).load_adg_paf(paf2100f, doc[1], *this, riga, true) &&
|
||||
insert(paf1800f) && insert(paf3000f);
|
||||
ok &= cached_custom_fp().get_custom(doc).load_adg_paf(paf2100f, doc[1], *this, riga, true);
|
||||
|
||||
if(_idx_adg_doc_row > 1L)
|
||||
ok &= insert(paf1800f) && insert(paf3000f);
|
||||
|
||||
riga++;
|
||||
}
|
||||
|
@ -69,8 +69,8 @@ void TFP_custom::autoload(const TSheet_field& sf, const int file) const
|
||||
rec_row.put(FPCADG_RNUMERO, row->get());
|
||||
rec_row.put(FPCADG_RDATA, row->get());
|
||||
rec_row.put(FPCADG_TIPORIGA, row->get());
|
||||
rec_row.put(FPCADG_SPLIT, row->get());
|
||||
rec_row.put(FPCADG_COND, row->get());
|
||||
rec_row.put(FPCADG_SPLIT, row->get());
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -89,7 +89,7 @@ bool TFP_custom::load_caus_paf(TPaf_record& paf3400f, TDocumento& doc, TDoc_fp&
|
||||
{
|
||||
// Evito il reset visto che setto sempre i campi
|
||||
paf3400f.set("PZ_LINEA", ++row_paf);
|
||||
paf3400f.set("PZ_CAUSALE", TFP_expression::parse_expression(rec_caus->get(FPCCAUS_VALORE), doc));
|
||||
paf3400f.set("PZ_CAUSALE", TFP_expression::parse_expression(rec_caus->get(FPCCAUS_VALORE), doc).as_string().left(200)); // 200 caratteri max
|
||||
if (!doc_fp.insert(paf3400f))
|
||||
return false;
|
||||
}
|
||||
@ -108,8 +108,8 @@ bool TFP_custom::load_articolo_paf(TPaf_record& paf1900f, TRiga_documento& rdoc,
|
||||
doc_fp.reset(paf1900f);
|
||||
paf1900f.set("PY_KEYNLINEA", row_num);
|
||||
paf1900f.set("PY_KEYNLINAR", ++row_paf);
|
||||
paf1900f.set("PY_TIPOARTICOLO", TFP_expression::parse_expression(rec_art->get(FPCART_TIPO), rdoc));
|
||||
paf1900f.set("PY_VALOREARTICOLO", TFP_expression::parse_expression(rec_art->get(FPCART_VALORE), rdoc));
|
||||
paf1900f.set("PY_TIPOARTICOLO", TFP_expression::parse_expression(rec_art->get(FPCART_TIPO), rdoc).as_string().left(35)); // 35 caratteri max
|
||||
paf1900f.set("PY_VALOREARTICOLO", TFP_expression::parse_expression(rec_art->get(FPCART_VALORE), rdoc).as_string().left(35)); // 35 caratteri max
|
||||
if (!doc_fp.insert(paf1900f))
|
||||
return false;
|
||||
}
|
||||
@ -122,17 +122,21 @@ bool TFP_custom::load_adg_paf(TPaf_record& paf2100f, TRiga_documento& rdoc, TDoc
|
||||
FOR_EACH_FPADG_ROW(*this, r, rec_adg)
|
||||
{
|
||||
|
||||
if (split && !rec_adg->get_bool(FPCADG_SPLIT))
|
||||
if (split != rec_adg->get_bool(FPCADG_SPLIT))
|
||||
continue;
|
||||
|
||||
// Controllo che la riga sia uguale e la condizione sia valida
|
||||
if (rdoc.tipo().codice() == rec_adg->get(FPCADG_TIPORIGA) && TFP_expression::check_condition(rec_adg->get(FPCADG_COND), rdoc))
|
||||
// Controllo che la riga sia uguale
|
||||
if (rec_adg->get(FPCADG_TIPORIGA).full() && rdoc.tipo().codice() != rec_adg->get(FPCADG_TIPORIGA))
|
||||
continue;
|
||||
|
||||
// Controllo la condizione
|
||||
if (TFP_expression::check_condition(rec_adg->get(FPCADG_COND), rdoc))
|
||||
{
|
||||
doc_fp.reset(paf2100f);
|
||||
paf2100f.set("PK_KEYNLINEA", static_cast<long>(row_num));
|
||||
paf2100f.set("PK_KEYNLINAR", doc_fp._idx_adg_doc_row++);
|
||||
paf2100f.set("PK_TIPODATO", TFP_expression::parse_expression(rec_adg->get(FPCADG_TIPODATO), rdoc));
|
||||
paf2100f.set("PK_RIFDATO", TFP_expression::parse_expression(rec_adg->get(FPCADG_RTESTO), rdoc));
|
||||
paf2100f.set("PK_TIPODATO", TFP_expression::parse_expression(rec_adg->get(FPCADG_TIPODATO), rdoc).as_string().left(10)); // 10 caratteri max
|
||||
paf2100f.set("PK_RIFDATO", TFP_expression::parse_expression(rec_adg->get(FPCADG_RTESTO), rdoc).as_string().left(60)); // 60 caratteri max
|
||||
paf2100f.set("PK_RIFDATA", TFP_expression::parse_expression(rec_adg->get(FPCADG_RDATA), rdoc));
|
||||
paf2100f.set("PK_RIFNUMERO", TFP_expression::parse_expression(rec_adg->get(FPCADG_RNUMERO), rdoc));
|
||||
if (!doc_fp.insert(paf2100f))
|
||||
@ -394,6 +398,7 @@ void TFP_expression::split_condition(const TString& cond, TString& cond_sx, TStr
|
||||
{
|
||||
// Cerchiamo di capire che condizione ho
|
||||
TString4 symbol;
|
||||
symb = error;
|
||||
if(cond.contains(" == "))
|
||||
{
|
||||
symb = eq;
|
||||
@ -490,6 +495,11 @@ TVariant& TFP_expression::get_value(const TRectype& rec, const TString& campo)
|
||||
TVariant& TFP_expression::parse_var(const TString& str)
|
||||
{
|
||||
TVariant& ret = get_tmp_var();
|
||||
if (str.empty())
|
||||
{
|
||||
ret.add(EMPTY_STRING);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Come prima cosa leggo la stringa e cerco di capire se ci sono numeri o no
|
||||
bool is_real = false, is_string = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user