Patch level : 4.0

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
Risolti un po' di problemi di DEPRERCATED che erano veramente INGUARDABLE


git-svn-id: svn://10.65.10.50/trunk@15201 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2007-04-10 09:24:01 +00:00
parent 898b547350
commit c745684200
4 changed files with 16 additions and 5 deletions

View File

@ -655,7 +655,7 @@ void TLista_fatture::set_the_header()
if (_tipo == costo_ricavo)
{
set_header(soh++,FR("@50gLISTA FATTURE PER TIPO COSTO/RICAVO"));
strncpy(c,"CR",2);
c[0] = 'C'; c[1] = 'R';
}
else
set_header(soh++,FR("@50gLISTA FATTURE CON IVA INDETRAIBILE"));

View File

@ -145,7 +145,7 @@ public: // TObject
const real percentuale() const { return get_real("R0"); }
const TString& tipo() const { return get("S1"); }
int detraibilita() const { return get_int("I1"); }
int allegato(char tipocf) const { return get_int(tipocf == 'F' ? "S8" : "S7");}
int allegato(char tipocf) const { return get_int(tipocf == 'F' ? "S8" : "S7"); }
real imposta(const real& imponibile, int ndec = AUTO_DECIMALS, const char * codval = "") const; // Calcola l'imposta sull'imponibile l'imposta e la ritorna
real scorpora(real& imponibile, int ndec = AUTO_DECIMALS, const char * codval = "") const; // Scorpora dall'imponibile l'imposta e la ritorna

View File

@ -41,6 +41,7 @@ TDate TPagamento::_rata_dfield(int n, int f) const
return TDate(t.get(f));
}
/* Funzione sgradita al nuovo C ed anche a Guy: static bleah!
const char* TPagamento::_rata_sfield(int n, int f) const
{
static char kak[16];
@ -52,6 +53,16 @@ const char* TPagamento::_rata_sfield(int n, int f) const
kak[0] = '\0';
return kak;
}
*/
// Funzione digeribile dal nuovo C
const TString& TPagamento::_rata_sfield(int n, int f) const
{
const TToken_string& t = _rate.row(n);
TString& kak = get_tmp_string();
t.get(f, kak);
return kak;
}
void TPagamento::set_inizio(const TDate& d, bool rispetta_date)
{
@ -203,7 +214,7 @@ void TPagamento::set_numero_rate(int n, int sscad, int rdiff)
int nact = first == 1 ? n - 1 : n;
real p = real(100) / real(nact);
real p = CENTO / real(nact);
p.round(PERC_DECIMALS);
if (_inited || (!_inited && rdiff == 1)) // se e' inited rdiff e' 2 per forza

View File

@ -71,7 +71,7 @@ class TPagamento : public TObject
long _rata_lfield(int n, int f) const;
real _rata_rfield(int n, int f) const;
TDate _rata_dfield(int n, int f) const;
const char* _rata_sfield(int n, int f) const;
const TString& _rata_sfield(int n, int f) const;
int _def_tpr; // tipo rata default
TString16 _def_ulc; // ulteriore classificazione default
@ -135,7 +135,7 @@ public:
real importo_rata(int n, bool v = FALSE) const
{ return v ? tval_rata(n) : tlit_rata(n); }
const char* ulc_rata(int n) const { return _rata_sfield(n,5);}
bool ratapagata(int n) const { return _rata_sfield(n,6)[0] > ' ';}
bool ratapagata(int n) const { return _rata_sfield(n,6).full();}
char inizio_scadenza() const { return _inscad; }
bool mese_commerciale() const { return _mcomm; }