Patch level : 12.0 866
Files correlati : fp0.exe Commento : - Sistemata funzione cco, non andava a causa del programma diverso rispetto a dove era prima - Aggiunta gestione commesse sanità - Tolto else inutile in TFP_expression::parse_search()
This commit is contained in:
parent
a56e6648ad
commit
64a9566522
@ -1024,15 +1024,27 @@ bool TDoc_fp::initialize(TDocumentoEsteso& doc)
|
|||||||
}
|
}
|
||||||
const TRectype& TDoc_fp::cco(const TRectype& doc) const
|
const TRectype& TDoc_fp::cco(const TRectype& doc) const
|
||||||
{
|
{
|
||||||
TString80 conkey;
|
TString80 conkey;
|
||||||
const TString& con = doc.get(DOC_CONTRATTO);
|
const TString& con = doc.get(DOC_CONTRATTO);
|
||||||
if (con.full())
|
if (con.full())
|
||||||
{
|
{
|
||||||
char tcon = doc.get_char(DOC_MODPAG);
|
char tcon = doc.get_char(DOC_MODPAG);
|
||||||
if (tcon < 'C') tcon = 'C';
|
if (tcon < 'C') tcon = 'C';
|
||||||
conkey.format("%c%6ld%s", tcon, doc.get_long(DOC_CODCF), static_cast<const char*>(con));
|
conkey.format("%c%6ld%s", tcon, doc.get_long(DOC_CODCF), static_cast<const char*>(con));
|
||||||
}
|
}
|
||||||
return cache().get("&CON", conkey);
|
|
||||||
|
static TLocalisamfile tabmod(LF_TABMOD);
|
||||||
|
// Controllo se non sono già sul record, così evito read inutili
|
||||||
|
// Lo sto facendo a mano perchè usare cache() metterebbe FP nella colonna "MOD"
|
||||||
|
if (tabmod.get("MOD") != "PA" || tabmod.get("COD") != "CON" || tabmod.get("CODTAB") != conkey)
|
||||||
|
{
|
||||||
|
tabmod.zero();
|
||||||
|
tabmod.put("MOD", "PA");
|
||||||
|
tabmod.put("COD", "CON");
|
||||||
|
tabmod.put("CODTAB", conkey);
|
||||||
|
tabmod.read();
|
||||||
|
}
|
||||||
|
return tabmod.curr();
|
||||||
}
|
}
|
||||||
void TDoc_fp::log(int severity, const char* msg)
|
void TDoc_fp::log(int severity, const char* msg)
|
||||||
{
|
{
|
||||||
@ -1573,7 +1585,15 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
|||||||
// Fuori dallo scope per dopo
|
// Fuori dallo scope per dopo
|
||||||
const TString16 cup = doc.get(DOC_CUP);
|
const TString16 cup = doc.get(DOC_CUP);
|
||||||
const TString16 cig = doc.get(DOC_CIG);
|
const TString16 cig = doc.get(DOC_CIG);
|
||||||
const TString80 com = doc.get(DOC_CODCMS);
|
|
||||||
|
// Codice commessa, spostato nel campo S5 di TABCOM
|
||||||
|
TString80 com = cco(doc).get("S5");
|
||||||
|
// Se è una commessa della sanità bisogna aggiungere un cancelletto davanti e dietro
|
||||||
|
if(cco(doc).get_bool("B0"))
|
||||||
|
{
|
||||||
|
com.add_front_and_back("#");
|
||||||
|
}
|
||||||
|
|
||||||
// SEMPRE
|
// SEMPRE
|
||||||
// Azzera contratti
|
// Azzera contratti
|
||||||
TPaf_record& paf1000f = _paf_container.get_paf("PAF1000F");
|
TPaf_record& paf1000f = _paf_container.get_paf("PAF1000F");
|
||||||
|
@ -639,8 +639,6 @@ TVariant& TFP_expression::parse_search(const TString& str, TRiga_documento& rdoc
|
|||||||
{
|
{
|
||||||
return get_value(cache().get(tabella, search, key), campo);
|
return get_value(cache().get(tabella, search, key), campo);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
return get_value(cache().get(file, search, key), campo);
|
||||||
return get_value(cache().get(file, search, key), campo);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user