Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 616cfe28

Von Jan Büren vor mehr als 1 Jahr hinzugefügt

  • ID 616cfe28371dcdb9a18687ef2ea17ba014b0bdc5
  • Vorgänger 46a49667
  • Nachfolger 5ba855af

Form: get_exchangerate entfernt

Unterschiede anzeigen:

SL/Form.pm
1505 1505
  $main::lxdebug->leave_sub();
1506 1506
}
1507 1507

  
1508
sub get_exchangerate {
1509
  $main::lxdebug->enter_sub();
1510

  
1511
  my ($self, $dbh, $curr, $transdate, $fld) = @_;
1512
  my ($query);
1513

  
1514
  unless ($transdate && $curr) {
1515
    $main::lxdebug->leave_sub();
1516
    return 1;
1517
  }
1518

  
1519
  $query = qq|SELECT name AS curr FROM currencies WHERE id = (SELECT currency_id FROM defaults)|;
1520

  
1521
  my ($defaultcurrency) = selectrow_query($self, $dbh, $query);
1522

  
1523
  if ($curr eq $defaultcurrency) {
1524
    $main::lxdebug->leave_sub();
1525
    return 1;
1526
  }
1527

  
1528
  $query = qq|SELECT e.$fld FROM exchangerate e
1529
                 WHERE e.currency_id = (SELECT id FROM currencies WHERE name = ?) AND e.transdate = ?|;
1530
  my ($exchangerate) = selectrow_query($self, $dbh, $query, $curr, $transdate);
1531

  
1532

  
1533

  
1534
  $main::lxdebug->leave_sub();
1535

  
1536
  return $exchangerate;
1537
}
1538

  
1539 1508
sub check_exchangerate {
1540 1509
  $main::lxdebug->enter_sub();
1541 1510

  

Auch abrufbar als: Unified diff