Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4b1666b7

Von Felix Eichler vor mehr als 4 Jahren hinzugefügt

  • ID 4b1666b74b0fa70077c64144a57526a1d64b4e64
  • Vorgänger 59626ee2
  • Nachfolger 82098575

Auftragsschnellerfassung: Währung und Wechselkurs definierbar

impl. #9491

(cherry picked from commit 6cdc5a4a33df4530ce4e141151e83138320e27a2)
(cherry pick von odyn)

Unterschiede anzeigen:

SL/Controller/Order.pm
926 926
  $self->js->render();
927 927
}
928 928

  
929
sub action_update_exchangerate {
930
  my ($self) = @_;
931
  my $data = {};
932
  if ($self->order->currency_id != $::instance_conf->get_currency_id) {
933
    $data = {
934
      currency_name => $self->order->currency->name,
935
      exchangerate  => $self->order->exchangerate_as_number,
936
    };
937
  }
938
  $self->render(\SL::JSON::to_json($data), { type => 'json', process => 0 });
939
}
940

  
929 941
# redisplay item rows if they are sorted by an attribute
930 942
sub action_reorder_items {
931 943
  my ($self) = @_;
......
1509 1521
sub recalc {
1510 1522
  my ($self) = @_;
1511 1523

  
1512
  # bb: todo: currency later
1513
  $self->order->currency_id($::instance_conf->get_currency_id());
1524
  $self->order->currency_id($::instance_conf->get_currency_id()) unless $self->order->currency_id;
1514 1525

  
1515 1526
  my %pat = $self->order->calculate_prices_and_taxes();
1516 1527

  
......
1657 1668
  my ($self) = @_;
1658 1669

  
1659 1670
  $self->{all_taxzones}               = SL::DB::Manager::TaxZone->get_all_sorted();
1671
  $self->{all_currencies}             = SL::DB::Manager::Currency->get_all_sorted();
1660 1672
  $self->{all_departments}            = SL::DB::Manager::Department->get_all_sorted();
1661 1673
  $self->{all_employees}              = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->employee_id,
1662 1674
                                                                                              deleted => 0 ] ],

Auch abrufbar als: Unified diff