&GetCurrency
&GetCurrencies
- &ModCurrencies
&ConvertCurrency
&GetBudgetsPlanCell
# link child to parent
my @first_parents;
- foreach ( sort keys %links ) {
- my $child = $links{$_};
+ foreach my $budget ( sort { $a->{budget_code} cmp $b->{budget_code} } values %links ) {
+ my $child = $links{$budget->{budget_id}};
if ( $child->{'budget_parent_id'} ) {
my $parent = $links{ $child->{'budget_parent_id'} };
if ($parent) {
return $r;
}
-=head2 ModCurrencies
-
-&ModCurrencies($currency, $newrate);
-
-Sets the exchange rate for C<$currency> to be C<$newrate>.
-
-=cut
-
-sub ModCurrencies {
- my ( $currency, $rate ) = @_;
- my $dbh = C4::Context->dbh;
- my $query = qq|
- UPDATE currency
- SET rate=?
- WHERE currency=? |;
- my $sth = $dbh->prepare($query);
- $sth->execute( $rate, $currency );
-}
-
# -------------------------------------------------------------------
=head2 ConvertCurrency