Patch level : 12.0 732
Files correlati : fp Commento : Aggiunto flag per rimuovere sconti da XML
This commit is contained in:
parent
71c5905f7b
commit
0d87bd4d20
@ -45,6 +45,7 @@ void TParametri_mask::save_all() const
|
||||
fp_settings().set_allega_fat(get_bool(F_ESPORTADOC));
|
||||
fp_settings().set_f8(get_bool(F_F8));
|
||||
fp_settings().set_check_not_block(get_bool(F_CHECK_NOT_BLOCK));
|
||||
fp_settings().set_no_sconti_fatt(get_bool(F_CHECK_NO_SCONTI));
|
||||
TFP_righe_custom().save_sheet(sfield(F_FORMPERS));
|
||||
}
|
||||
|
||||
@ -61,6 +62,7 @@ void TParametri_mask::load_all()
|
||||
set(F_ESPORTADOC, fp_settings().get_allega_fat());
|
||||
set(F_F8, fp_settings().is_f8());
|
||||
set(F_CHECK_NOT_BLOCK, fp_settings().get_check_not_block());
|
||||
set(F_CHECK_NO_SCONTI, fp_settings().get_no_sconti_fatt());
|
||||
TFP_righe_custom().load_sheet(sfield(F_FORMPERS));
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#define F_ESPORTADOC 209
|
||||
#define F_F8 210
|
||||
#define F_CHECK_NOT_BLOCK 211
|
||||
#define F_CHECK_NO_SCONTI 212
|
||||
|
||||
#define F_SETPATCH 301
|
||||
#define F_ENPTYTABLE 302
|
||||
|
@ -112,6 +112,15 @@ BEGIN
|
||||
PROMPT 2 9 "Rendi controlli XML non bloccanti"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 3
|
||||
BEGIN
|
||||
PROMPT 1 11 "@BPersonalizzazioni documento"
|
||||
END
|
||||
|
||||
BOOLEAN F_CHECK_NO_SCONTI
|
||||
BEGIN
|
||||
PROMPT 2 12 "Non esporre sconti in fattura"
|
||||
END
|
||||
|
||||
|
||||
ENDPAGE
|
||||
|
@ -135,7 +135,8 @@ private:
|
||||
int _num_linea;
|
||||
int _counter;
|
||||
TPaf_container _paf_container;
|
||||
int _count_r_conai;
|
||||
int _count_r_conai;
|
||||
bool _nascondi_sconti_righe_fatt;
|
||||
|
||||
// Classe interna per gestire righe aggiuntive in riepilogo
|
||||
class TRiepilogo_agg
|
||||
@ -245,6 +246,7 @@ public:
|
||||
const bool is_f8() const;
|
||||
const bool get_check_not_block() const;
|
||||
const TString& get_body_mail(int idx = -1) const;
|
||||
const bool get_no_sconti_fatt() const;
|
||||
|
||||
// Setters
|
||||
void set_db_indirizzo(const TString& ind) const;
|
||||
@ -262,6 +264,7 @@ public:
|
||||
void set_f8(bool f8) const;
|
||||
void set_check_not_block(bool not_block) const;
|
||||
void set_body_mail(const char* msg, int idx = -1) const;
|
||||
void set_no_sconti_fatt(const bool no_sconti_fatt) const;
|
||||
|
||||
void remove_para_ini(int idx);
|
||||
};
|
||||
|
@ -1191,7 +1191,7 @@ void TDoc_fp::set_qta_prezzo(TPaf_record& paf1800f, TRiga_documento* rdoc) const
|
||||
}
|
||||
else
|
||||
{
|
||||
prezzo_unit = rdoc->prezzo(false, false, 8);
|
||||
prezzo_unit = rdoc->prezzo(_nascondi_sconti_righe_fatt, false, 5);
|
||||
prezzo_tot = rdoc->importo(true, false);
|
||||
}
|
||||
}
|
||||
@ -1207,7 +1207,7 @@ void TDoc_fp::set_qta_prezzo(TPaf_record& paf1800f, TRiga_documento* rdoc) const
|
||||
}
|
||||
else
|
||||
{
|
||||
prezzo_unit = -abs(rdoc->prezzo(false, false, 8));
|
||||
prezzo_unit = -abs(rdoc->prezzo(_nascondi_sconti_righe_fatt, false, 5));
|
||||
prezzo_tot = -abs(rdoc->importo(true, false));
|
||||
}
|
||||
}
|
||||
@ -1786,7 +1786,7 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
||||
real prz = imp;
|
||||
if (qta != UNO)
|
||||
{
|
||||
prz = rdoc->prezzo(true, false, 8);
|
||||
prz = rdoc->prezzo(_nascondi_sconti_righe_fatt, false, 8);
|
||||
if (prz.is_zero() && !imp.is_zero())
|
||||
{
|
||||
const TPrice price(imp / qta);
|
||||
@ -1881,7 +1881,7 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
||||
// <ScontoMaggiorazione>
|
||||
TString80 sconto_expr = rdoc->get(RDOC_SCONTO);
|
||||
TToken_string sconti;
|
||||
if (parse_sconto(sconto_expr, sconti))
|
||||
if (!_nascondi_sconti_righe_fatt && parse_sconto(sconto_expr, sconti))
|
||||
{
|
||||
long nlin_sconto = 0;
|
||||
FOR_EACH_TOKEN(sconti, str)
|
||||
@ -2298,7 +2298,10 @@ TDoc_fp::TDoc_fp() : _doc_rec(nullptr), _log(nullptr), _cache_insert(false), _re
|
||||
_conai_str = ini_get_string(CONFIG_DITTA, "ve", "DESCCONAIASS");
|
||||
if (_conai_str.empty())
|
||||
_conai_str = "Contributo CONAI assolto ove dovuto";
|
||||
|
||||
_nascondi_sconti_righe_fatt = fp_settings().get_no_sconti_fatt();
|
||||
}
|
||||
|
||||
TDoc_fp::~TDoc_fp()
|
||||
{
|
||||
commit();
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
|
||||
|
||||
#define FP_IP "ip"
|
||||
#define FP_DB "db"
|
||||
#define FP_USR "usr"
|
||||
#define FP_PSW "psw"
|
||||
#define FP_FLD_DEST "flddest"
|
||||
#define FP_FLD_USR_DEST "fldusrdest"
|
||||
#define FP_COFI_TRAS "cofitras"
|
||||
#define FP_GEST_ALLEG "gestioneallegati"
|
||||
#define FP_ALLEG_FAT "allegafatt"
|
||||
#define FP_ESP_PRI "esppri"
|
||||
#define FP_ESP_EST "espest"
|
||||
#define FP_ESP_EST_COD "espestcod"
|
||||
#define FP_F8 "f8"
|
||||
#define FP_CHECK_NOT_BLOCK "checknotblock"
|
||||
#define FP_MAIL "mail"
|
||||
#define FP_IP "ip"
|
||||
#define FP_DB "db"
|
||||
#define FP_USR "usr"
|
||||
#define FP_PSW "psw"
|
||||
#define FP_FLD_DEST "flddest"
|
||||
#define FP_FLD_USR_DEST "fldusrdest"
|
||||
#define FP_COFI_TRAS "cofitras"
|
||||
#define FP_GEST_ALLEG "gestioneallegati"
|
||||
#define FP_ALLEG_FAT "allegafatt"
|
||||
#define FP_ESP_PRI "esppri"
|
||||
#define FP_ESP_EST "espest"
|
||||
#define FP_ESP_EST_COD "espestcod"
|
||||
#define FP_F8 "f8"
|
||||
#define FP_CHECK_NOT_BLOCK "checknotblock"
|
||||
#define FP_MAIL "mail"
|
||||
#define FP_CHECK_NO_SCONTI_FATT "noscontifatt"
|
||||
|
||||
// Sheet fp0300
|
||||
#define FP_SLD_COD "SLD"
|
||||
@ -124,6 +125,11 @@ const TString& TFP_settings::get_body_mail(int idx) const
|
||||
return ini_get_string(FILE_CONFIG, FILE_SECTION, FP_MAIL, "STOpsTOP", idx);
|
||||
}
|
||||
|
||||
const bool TFP_settings::get_no_sconti_fatt() const
|
||||
{
|
||||
return ini_get_bool(FILE_CONFIG, FILE_SECTION, FP_CHECK_NO_SCONTI_FATT, false);
|
||||
}
|
||||
|
||||
void TFP_settings::set_db_indirizzo(const TString& ind) const
|
||||
{
|
||||
ini_set_string(FILE_CONFIG, FILE_SECTION, FP_IP, ind);
|
||||
@ -199,6 +205,11 @@ void TFP_settings::set_body_mail(const char* msg, int idx) const
|
||||
ini_set_string(FILE_CONFIG, FILE_SECTION, FP_MAIL, msg, idx);
|
||||
}
|
||||
|
||||
void TFP_settings::set_no_sconti_fatt(const bool no_sconti_fatt) const
|
||||
{
|
||||
ini_set_bool(FILE_CONFIG, FILE_SECTION, FP_CHECK_NO_SCONTI_FATT, no_sconti_fatt);
|
||||
}
|
||||
|
||||
void TFP_settings::remove_para_ini(int idx)
|
||||
{
|
||||
ini_remove(FILE_CONFIG, FILE_SECTION, FP_MAIL, idx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user