Patch level : 12.0 no-patch
Files correlati : fp0, include Commento : - Tolte lettere d'intento e aggiunto indirizzo di spedizione alla READ() - Aggiunti const e spazi
This commit is contained in:
parent
920a6a5639
commit
09c16c2f1d
@ -204,10 +204,10 @@ TString get_dest_sdi(const char tipocf, const long codcf)
|
|||||||
}
|
}
|
||||||
bool get_coddest(const char tipocf, const long codcf, TString& coddest, TString& pec)
|
bool get_coddest(const char tipocf, const long codcf, TString& coddest, TString& pec)
|
||||||
{
|
{
|
||||||
TCli_for clifo(tipocf, codcf);
|
const TCli_for clifo(tipocf, codcf);
|
||||||
coddest = clifo.vendite().get("PADESTIN");
|
coddest = clifo.vendite().get("PADESTIN");
|
||||||
pec = clifo.get("PEC");
|
pec = clifo.get("PEC");
|
||||||
TAnagrafica anag(LF_CLIFO, tipocf, codcf);
|
const TAnagrafica anag(LF_CLIFO, tipocf, codcf);
|
||||||
if (coddest.empty())
|
if (coddest.empty())
|
||||||
{
|
{
|
||||||
if (pec.full() || fp_settings().get_esp_pri_empty())
|
if (pec.full() || fp_settings().get_esp_pri_empty())
|
||||||
@ -223,6 +223,7 @@ bool get_coddest(const char tipocf, const long codcf, TString& coddest, TString&
|
|||||||
|
|
||||||
return coddest.full();
|
return coddest.full();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const TString& no_special(char a)
|
inline const TString& no_special(char a)
|
||||||
{
|
{
|
||||||
TString& r = get_tmp_string().cut(0);
|
TString& r = get_tmp_string().cut(0);
|
||||||
@ -233,6 +234,7 @@ inline const TString& no_special(char a)
|
|||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
const TString& tipo_doc_sdi(const TDocumento& doc)
|
const TString& tipo_doc_sdi(const TDocumento& doc)
|
||||||
{
|
{
|
||||||
static TString tipo_doc_sdi;
|
static TString tipo_doc_sdi;
|
||||||
@ -244,6 +246,7 @@ const TString& tipo_doc_sdi(const TDocumento& doc)
|
|||||||
}
|
}
|
||||||
return doc.tipo().tipo_doc_sdi();
|
return doc.tipo().tipo_doc_sdi();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_fattura(const TRectype& doc)
|
bool is_fattura(const TRectype& doc)
|
||||||
{
|
{
|
||||||
const TTipo_documento& td = cached_tipodoc(doc.get(DOC_TIPODOC));
|
const TTipo_documento& td = cached_tipodoc(doc.get(DOC_TIPODOC));
|
||||||
@ -252,6 +255,7 @@ bool is_fattura(const TRectype& doc)
|
|||||||
const TCodice_numerazione& cn = cached_numerazione(doc.get(DOC_CODNUM));
|
const TCodice_numerazione& cn = cached_numerazione(doc.get(DOC_CODNUM));
|
||||||
return cn.tipo() == 2 && !cn.get_bool("B10"); // Controlla se fattura provvisioria esclusa da P.A.
|
return cn.tipo() == 2 && !cn.get_bool("B10"); // Controlla se fattura provvisioria esclusa da P.A.
|
||||||
}
|
}
|
||||||
|
|
||||||
TString& add_filter(const TString& field, const TString& from, const TString& to)
|
TString& add_filter(const TString& field, const TString& from, const TString& to)
|
||||||
{
|
{
|
||||||
TString& query = get_tmp_string();
|
TString& query = get_tmp_string();
|
||||||
@ -270,6 +274,7 @@ TString& add_filter(const TString& field, const TString& from, const TString& to
|
|||||||
}
|
}
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* TPaf_record
|
* TPaf_record
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
@ -290,12 +295,14 @@ void TPaf_record::set(const char* fld, const TVariant& var)
|
|||||||
_fields.add(fld, new TVariant(var));
|
_fields.add(fld, new TVariant(var));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Imposta il valore di un campo intero
|
// Imposta il valore di un campo intero
|
||||||
void TPaf_record::set(const char* fld, long val)
|
void TPaf_record::set(const char* fld, long val)
|
||||||
{
|
{
|
||||||
const TVariant var(val);
|
const TVariant var(val);
|
||||||
set(fld, var);
|
set(fld, var);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Imposta il valore di un campo stringa
|
// Imposta il valore di un campo stringa
|
||||||
void TPaf_record::set(const char* fld, const char* val)
|
void TPaf_record::set(const char* fld, const char* val)
|
||||||
{
|
{
|
||||||
@ -307,6 +314,7 @@ void TPaf_record::set(const char* fld, const char* val)
|
|||||||
set(fld, var);
|
set(fld, var);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Imposta il valore di un campo stringa
|
// Imposta il valore di un campo stringa
|
||||||
void TPaf_record::set(const char* fld, const TString& val)
|
void TPaf_record::set(const char* fld, const TString& val)
|
||||||
{
|
{
|
||||||
@ -314,12 +322,14 @@ void TPaf_record::set(const char* fld, const TString& val)
|
|||||||
if(!var.is_string() || (val.full()))
|
if(!var.is_string() || (val.full()))
|
||||||
set(fld, var);
|
set(fld, var);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Imposta il valore di un campo numerico
|
// Imposta il valore di un campo numerico
|
||||||
void TPaf_record::set(const char* fld, const real& val)
|
void TPaf_record::set(const char* fld, const real& val)
|
||||||
{
|
{
|
||||||
const TVariant var(val);
|
const TVariant var(val);
|
||||||
set(fld, var);
|
set(fld, var);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Imposta il valore di un campo data in formato ISO
|
// Imposta il valore di un campo data in formato ISO
|
||||||
void TPaf_record::set(const char* fld, const TDate& val)
|
void TPaf_record::set(const char* fld, const TDate& val)
|
||||||
{
|
{
|
||||||
@ -331,21 +341,25 @@ void TPaf_record::set(const char* fld, const TDate& val)
|
|||||||
else
|
else
|
||||||
set(fld, "");
|
set(fld, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Imposta il valore di un campo booleano
|
// Imposta il valore di un campo booleano
|
||||||
void TPaf_record::set(const char* fld, bool var)
|
void TPaf_record::set(const char* fld, bool var)
|
||||||
{
|
{
|
||||||
set(fld, var ? "SI" : "NO");
|
set(fld, var ? "SI" : "NO");
|
||||||
}
|
}
|
||||||
|
|
||||||
const TString TPaf_record::sq_get(const char* fld) const
|
const TString TPaf_record::sq_get(const char* fld) const
|
||||||
{
|
{
|
||||||
return fp_db().sq_get(fld);
|
return fp_db().sq_get(fld);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Legge il valore di un campo variant
|
// Legge il valore di un campo variant
|
||||||
const TVariant& TPaf_record::get(const char* fld) const
|
const TVariant& TPaf_record::get(const char* fld) const
|
||||||
{
|
{
|
||||||
const TVariant* var = (const TVariant*)_fields.objptr(fld);
|
const TVariant* var = (const TVariant*)_fields.objptr(fld);
|
||||||
return var ? *var : NULL_VARIANT;
|
return var ? *var : NULL_VARIANT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Converte un variant in una stringa valida per SQLite
|
// Converte un variant in una stringa valida per SQLite
|
||||||
const TString& TPaf_record::var2str(const TString& fldname, const TVariant& var) const
|
const TString& TPaf_record::var2str(const TString& fldname, const TVariant& var) const
|
||||||
{
|
{
|
||||||
|
@ -262,8 +262,8 @@ TFP_custom_cache::TFP_custom_cache()
|
|||||||
/*
|
/*
|
||||||
* Sintassi:
|
* Sintassi:
|
||||||
* READ(TABELLA, CAMPO) -> legge dalle tabelle predefinite
|
* READ(TABELLA, CAMPO) -> legge dalle tabelle predefinite
|
||||||
* SEARCH(TABELLA, CAMPO, RICERCA) -> legge da una tabella qualsiasi
|
* SEARCH(TABELLA.[CHIAVE], CAMPO, RICERCA) -> legge da una tabella qualsiasi
|
||||||
* SEARCH e READ sono diverse sotto richiesta di Ilaria per avere una sintassi più chiara
|
* SEARCH e READ sono diverse sotto richiesta di Ilaria per avere una sintassi più chiara // Ormai hanno sintassi un po' diversa quindi MEGLIO COSI'
|
||||||
* resto: TExpr_documento()
|
* resto: TExpr_documento()
|
||||||
*/
|
*/
|
||||||
const TVariant TFP_expression::parse_expression(const TString& expr, TRiga_documento& rdoc)
|
const TVariant TFP_expression::parse_expression(const TString& expr, TRiga_documento& rdoc)
|
||||||
@ -584,6 +584,7 @@ TVariant& TFP_expression::do_read(const TString& tabella, const TString& campo,
|
|||||||
{
|
{
|
||||||
return get_value(doc.tipo(), campo);
|
return get_value(doc.tipo(), campo);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tabella == "%NUM")
|
if(tabella == "%NUM")
|
||||||
{
|
{
|
||||||
return get_value(doc.codice_numerazione(), campo);
|
return get_value(doc.codice_numerazione(), campo);
|
||||||
@ -607,8 +608,8 @@ TVariant& TFP_expression::do_read(const TString& tabella, const TString& campo,
|
|||||||
return get_value(doc.clifor(), campo);
|
return get_value(doc.clifor(), campo);
|
||||||
case LF_CFVEN:
|
case LF_CFVEN:
|
||||||
return get_value(doc.clifor().vendite(), campo);
|
return get_value(doc.clifor().vendite(), campo);
|
||||||
case LF_LETINT:
|
case LF_INDSP:
|
||||||
return get_value(doc.clifor().lettera(), campo);
|
return get_value(cache().get(LF_INDSP, doc.get(DOC_CODINDSP)), campo);
|
||||||
case LF_ANAMAG:
|
case LF_ANAMAG:
|
||||||
return get_value(rdoc.articolo(), campo);
|
return get_value(rdoc.articolo(), campo);
|
||||||
case LF_CODCORR:
|
case LF_CODCORR:
|
||||||
|
@ -572,7 +572,7 @@ TInfo_mask::TInfo_mask() : TProperty_sheet(TR("Informazioni"))
|
|||||||
cver = _MSC_VER / 100 - 5 + _MSC_VER % 100 / 10;
|
cver = _MSC_VER / 100 - 5 + _MSC_VER % 100 / 10;
|
||||||
csub = _MSC_VER % 100 % 10; // Is that a thing?
|
csub = _MSC_VER % 100 % 10; // Is that a thing?
|
||||||
}
|
}
|
||||||
TString msg = "Microsoft Visual Studio"; msg << cver << "." << csub;
|
TString msg = "Microsoft Visual Studio "; msg << cver << "." << csub;
|
||||||
add_prop(TR("Libreria C++"), msg);
|
add_prop(TR("Libreria C++"), msg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user