Dio gabrone
git-svn-id: svn://10.65.10.50/trunk@2319 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
585c6020ac
commit
f9ac1b045a
@ -768,10 +768,11 @@ word TPagamento::recalc_rate(int row, bool is_perc_modified,
|
|||||||
// here's the bell
|
// here's the bell
|
||||||
if (new_value != NULL)
|
if (new_value != NULL)
|
||||||
{
|
{
|
||||||
if (newv == ZERO || (rsum+newv) > rmax)
|
real totogl((row == first && _inited && _tpr > 0 && _tpr < 4) ? _secndr : 0.0);
|
||||||
|
if (newv == ZERO || (rsum+newv-totogl) > rmax)
|
||||||
return P_RSUM;
|
return P_RSUM;
|
||||||
// did not sforate
|
// did not sforate
|
||||||
rsum += newv;
|
rsum += newv-totogl;
|
||||||
TToken_string& rt = rata(row);
|
TToken_string& rt = rata(row);
|
||||||
// setta nuovo valore e ricalcola cio' che ne consegue
|
// setta nuovo valore e ricalcola cio' che ne consegue
|
||||||
if (is_perc_modified) rt.add(new_value,1);
|
if (is_perc_modified) rt.add(new_value,1);
|
||||||
@ -1049,7 +1050,7 @@ word TPagamento::recalc_rate(int row, bool is_perc_modified,
|
|||||||
if (!is_perc_modified && j == first && _tpr > 0 && _tpr < 4)
|
if (!is_perc_modified && j == first && _tpr > 0 && _tpr < 4)
|
||||||
rvl -= _secndr;
|
rvl -= _secndr;
|
||||||
real zpx = rvl/rmax; // percentuale
|
real zpx = rvl/rmax; // percentuale
|
||||||
dt.add(zpx);
|
dt.add(zpx); // * cento???
|
||||||
}
|
}
|
||||||
for (j = first; j < _rate.items(); j++)
|
for (j = first; j < _rate.items(); j++)
|
||||||
{
|
{
|
||||||
@ -1057,6 +1058,8 @@ word TPagamento::recalc_rate(int row, bool is_perc_modified,
|
|||||||
TToken_string& tr = rata(j);
|
TToken_string& tr = rata(j);
|
||||||
|
|
||||||
real rvl = dt.get();
|
real rvl = dt.get();
|
||||||
|
if (!is_perc_modified)
|
||||||
|
rvl *= real(100.0);
|
||||||
|
|
||||||
if (j == first)
|
if (j == first)
|
||||||
{
|
{
|
||||||
@ -1116,8 +1119,11 @@ word TPagamento::recalc_rate(int row, bool is_perc_modified,
|
|||||||
if (is_perc_modified)
|
if (is_perc_modified)
|
||||||
rsum += perc_rata(i);
|
rsum += perc_rata(i);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
rsum += tpay_rata(i);
|
rsum += tpay_rata(i);
|
||||||
|
if (i == 0 && _tpr > 0 && _tpr < 4)
|
||||||
|
rsum -= _secndr;
|
||||||
|
}
|
||||||
lastdate = data_rata(i);
|
lastdate = data_rata(i);
|
||||||
oldtype = tipo_rata(i);
|
oldtype = tipo_rata(i);
|
||||||
if (scad_rata(i) > 0) oldscad = scad_rata(i);
|
if (scad_rata(i) > 0) oldscad = scad_rata(i);
|
||||||
|
@ -2372,6 +2372,7 @@ bool TPrint_section::edit(const char* title)
|
|||||||
{
|
{
|
||||||
TForm_item& f = field(i);
|
TForm_item& f = field(i);
|
||||||
field(i).print_on_sheet_row(tt);
|
field(i).print_on_sheet_row(tt);
|
||||||
|
// TBI colorare se specials (e vedi se colorare solo se non standard)
|
||||||
ms.row(-1) = tt;
|
ms.row(-1) = tt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1259,7 +1259,7 @@ char *real ::stringa (int len, int dec, char pad) const
|
|||||||
|
|
||||||
void TDistrib ::add(real slice)
|
void TDistrib ::add(real slice)
|
||||||
{
|
{
|
||||||
// if (slice > real (1.0))
|
if (slice > real (1.0))
|
||||||
slice /= 100.0;
|
slice /= 100.0;
|
||||||
CHECK (!_ready, "TDistrib: les jeux sont faits");
|
CHECK (!_ready, "TDistrib: les jeux sont faits");
|
||||||
_slices.add (slice);
|
_slices.add (slice);
|
||||||
|
@ -49,9 +49,9 @@ class TViswin : public TScroll_window
|
|||||||
bool _isedit;
|
bool _isedit;
|
||||||
// @cmember Indica la presenza del bottone Stampa
|
// @cmember Indica la presenza del bottone Stampa
|
||||||
bool _isprint;
|
bool _isprint;
|
||||||
// @cmember Indice se effettuare il disgno della crossbar
|
// @cmember Indica se effettuare il disegno della crossbar
|
||||||
bool _iscross;
|
bool _iscross;
|
||||||
// @cmember India se e' in corso la selezione
|
// @cmember Indica se e' in corso la selezione
|
||||||
bool _selecting;
|
bool _selecting;
|
||||||
// @cmember Indica se la selezione e' attiva
|
// @cmember Indica se la selezione e' attiva
|
||||||
bool _isselection;
|
bool _isselection;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user