Revision 59626ee2
Von Bernd Bleßmann vor mehr als 4 Jahren hinzugefügt
t/helper/attr.t | ||
---|---|---|
use Test::More tests => 32;
|
||
use Test::More tests => 44;
|
||
|
||
use lib 't';
|
||
|
||
... | ... | |
is($p->sellprice_as_number('2,3442'), '2,3442');
|
||
is($p->sellprice, 2.3442);
|
||
is($p->sellprice_as_number, '2,3442');
|
||
is($p->listprice_as_null_number('2,30'), '2,30');
|
||
is($p->listprice, 2.30);
|
||
is($p->listprice_as_null_number, '2,30');
|
||
is($p->listprice_as_null_number('2,3442'), '2,3442');
|
||
is($p->listprice, 2.3442);
|
||
is($p->listprice_as_null_number, '2,3442');
|
||
is($p->listprice_as_null_number(''), '');
|
||
is($p->listprice, undef);
|
||
is($p->listprice_as_null_number, '');
|
||
is($p->listprice_as_null_number('0'), '0,00');
|
||
is($p->listprice, 0);
|
||
is($p->listprice_as_null_number, '0,00');
|
||
|
||
my $o = new_ok 'SL::DB::Order';
|
||
is($o->reqdate_as_date('11.12.2007'), '11.12.2007');
|
||
... | ... | |
# defaults according to the database
|
||
$i->taxincluded(undef);
|
||
is $i->taxincluded_as_bool_yn, '', 'bool 3';
|
||
|
Auch abrufbar als: Unified diff
Rose-Attr-Helfer: _as_null_number
von odyn abgeguckt, aber nicht mit SL::Helper::Number implementiert
(gibt es in kivitendo nicht)
siehe auch odyn: commit b4177a76db52e94795314b527774f515fd8ee42f