Help for this page

Select Code to Download


  1. or download this
    package LedgerSMB::Currency;
    use Moose;
    with 'LedgerSMB::PGOSimple::Role', 'LedgerSMB::MooseTypes';
    ...
    dbmethod get_by_id =>  (funcname => 'get_by_id', returns_objects => 1,
                            arg_list => ['id']);
    __PACKAGE__->meta->make_immutable;
    
  2. or download this
    my $usd = LedgerSMB::Currency->get('USD');
    
    ...
    $usd->{allowed_variance} = 0.2;
    
    $usd->save;