Revision 0956f2d4
Von Felix Eichler vor mehr als 4 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
929 | 929 |
sub action_update_exchangerate { |
930 | 930 |
my ($self) = @_; |
931 | 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 |
} |
|
932 |
|
|
933 |
$data = { |
|
934 |
is_standard => $self->order->currency_id == $::instance_conf->get_currency_id, |
|
935 |
currency_name => $self->order->currency->name, |
|
936 |
exchangerate => $self->order->exchangerate_as_null_number, |
|
937 |
}; |
|
938 |
|
|
938 | 939 |
$self->render(\SL::JSON::to_json($data), { type => 'json', process => 0 }); |
939 | 940 |
} |
940 | 941 |
|
... | ... | |
1372 | 1373 |
|
1373 | 1374 |
my $form_orderitems = delete $::form->{order}->{orderitems}; |
1374 | 1375 |
my $form_periodic_invoices_config = delete $::form->{order}->{periodic_invoices_config}; |
1375 |
my $exchangerate = delete $::form->{order}->{exchangerate};
|
|
1376 |
my $exchangerate_as_null_number = delete $::form->{order}->{exchangerate_as_null_number};
|
|
1376 | 1377 |
|
1377 | 1378 |
$order->assign_attributes(%{$::form->{order}}); |
1378 | 1379 |
|
... | ... | |
1382 | 1383 |
} |
1383 | 1384 |
|
1384 | 1385 |
# set exchangerate after transdate and currency_id |
1385 |
$order->assign_attributes(exchangerate => $exchangerate);
|
|
1386 |
$order->assign_attributes(exchangerate_as_null_number => $exchangerate_as_null_number) if $order->currency_id;
|
|
1386 | 1387 |
|
1387 | 1388 |
# remove deleted items |
1388 | 1389 |
$self->item_ids_to_delete([]); |
Auch abrufbar als: Unified diff
Auftragsschnellerfassung: Korrekturen für Währung/Wechselkurs
- Feld auf disabled setzen wenn nicht gebraucht
- _as_null_number damit undef nicht zu 0 wird
- Übersetzte Fehlermeldungen
ticket #9491
(cherry picked from commit c581e4685a217bdd5b73380b1f808037a473dd9f)
(cherry pick von odyn)