Patch level : main 104
Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la ersione 1.7 aga patch 104 git-svn-id: svn://10.65.10.50/trunk@9770 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d5861b30c0
commit
0fa3bebcd7
@ -1468,9 +1468,9 @@ bool TForm_currency::update()
|
||||
TCurrency curr = get_currency();
|
||||
if (!_driver)
|
||||
{
|
||||
const TExchange* oe = form().output_exchange();
|
||||
if (oe != NULL && !curr.get_exchange().same_value_as(*oe))
|
||||
curr.change_value(*oe);
|
||||
const TExchange& oe = form().output_exchange();
|
||||
if (!curr.get_exchange().same_value_as(oe))
|
||||
curr.change_value(oe);
|
||||
}
|
||||
|
||||
// Niente apply_format(), la picture viene ignorata per i TForm_currency
|
||||
@ -1505,15 +1505,9 @@ bool TForm_currency::update()
|
||||
d = z.decimals();
|
||||
}
|
||||
else
|
||||
{
|
||||
const TExchange* oe = form().output_exchange();
|
||||
if (oe != NULL)
|
||||
{
|
||||
const TCurrency z(ZERO, *oe, _flag.price != 0);
|
||||
d = z.decimals();
|
||||
}
|
||||
else
|
||||
d = TCurrency::get_firm_dec(_flag.price != 0);
|
||||
{
|
||||
const TCurrency z(ZERO, form().output_exchange(), _flag.price != 0);
|
||||
d = z.decimals();
|
||||
}
|
||||
|
||||
if (d > 0)
|
||||
@ -1534,6 +1528,9 @@ bool TForm_currency::update()
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void TForm_currency::send_message(const TString& cmd, TForm_item& dest) const
|
||||
{
|
||||
if (cmd == "ADD")
|
||||
|
@ -1372,38 +1372,6 @@ char *real ::literals () const
|
||||
return __string;
|
||||
}
|
||||
|
||||
// Certified 75%
|
||||
char* real::points (int dec) const
|
||||
{
|
||||
const char *str = stringa (0, dec);
|
||||
const int neg = (*str == '-') ? 1 : 0;
|
||||
TFixed_string n ((char *)str, 64);
|
||||
int i;
|
||||
|
||||
int dot = n.find (',');
|
||||
if (dot < 0)
|
||||
dot = n.len ();
|
||||
|
||||
if (dec > 0)
|
||||
{
|
||||
if (n[dot] == '\0')
|
||||
n << ',';
|
||||
const int d = strlen (str + dot + 1); // Decimals already there
|
||||
|
||||
if (d <= dec)
|
||||
for (i = d; i < dec; i++)
|
||||
n << '0';
|
||||
else
|
||||
n.cut (dot + dec + 1);
|
||||
}
|
||||
|
||||
for (i = dot - 3; i > neg; i -= 3)
|
||||
n.insert (".", i);
|
||||
|
||||
return __string;
|
||||
}
|
||||
|
||||
|
||||
HIDDEN int get_picture_decimals (const TString& picture, char& decsep)
|
||||
{
|
||||
int decimali = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user