Patch level : 12.0 752
Files correlati : fp Commento : File mancante
This commit is contained in:
parent
bae2110307
commit
817a2c74c0
37
src/fp/fplib04.cpp
Normal file
37
src/fp/fplib04.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#include "fplib.h"
|
||||||
|
|
||||||
|
TFP_righe_custom& fp_righe_custom()
|
||||||
|
{
|
||||||
|
static TFP_righe_custom* fidel_custom = nullptr;
|
||||||
|
if(fidel_custom == nullptr)
|
||||||
|
{
|
||||||
|
fidel_custom = new TFP_righe_custom;
|
||||||
|
}
|
||||||
|
return *fidel_custom;
|
||||||
|
}
|
||||||
|
|
||||||
|
real TFPRiga_documento::prezzo(const bool scontato, const bool lordo, const int ndec) const
|
||||||
|
{
|
||||||
|
const TString& field_prezzo = fp_righe_custom().get_prezzo(tipo().codice(), doc().tipo().codice());
|
||||||
|
return field_prezzo.full() ? get_real(field_prezzo) : TRiga_documento::prezzo(scontato, lordo, ndec);
|
||||||
|
}
|
||||||
|
|
||||||
|
real TFPRiga_documento::importo(const bool scontato, const bool lordo, const int ndec) const
|
||||||
|
{
|
||||||
|
const TString& field_importo = fp_righe_custom().get_imponibile(tipo().codice(), doc().tipo().codice());
|
||||||
|
return field_importo.full() ? get_real(field_importo) : TRiga_documento::importo(scontato, lordo, ndec);
|
||||||
|
}
|
||||||
|
|
||||||
|
real TFPRiga_documento::quantita() const
|
||||||
|
{
|
||||||
|
const TString& field_qta = fp_righe_custom().get_qta(tipo().codice(), doc().tipo().codice());
|
||||||
|
real qta = field_qta.full() ? get_real(field_qta) : TRiga_documento::quantita();
|
||||||
|
return qta.is_zero() ? UNO : qta;
|
||||||
|
}
|
||||||
|
|
||||||
|
TString& TFPRiga_documento::quantita_string() const
|
||||||
|
{
|
||||||
|
static TString qta_string;
|
||||||
|
qta_string.cut(0) << quantita().string();
|
||||||
|
return qta_string;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user