X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FAP.pm;h=810a15e529dde57170709145d6ba3f3f1491b22d;hb=41276623722df9317163274551400fc42a2722e0;hp=54abcd17e4ada7633a51a3e72ed821ee3f9fdb63;hpb=88bb5aaaa09976ba6310116828121d28afe8ffc8;p=kivitendo-erp.git diff --git a/SL/AP.pm b/SL/AP.pm index 54abcd17e..810a15e52 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -55,7 +55,6 @@ sub post_transaction { my $exchangerate = 0; $form->{defaultcurrency} = $form->get_default_currency($myconfig); - delete $form->{currency} unless $form->{defaultcurrency}; ($null, $form->{department_id}) = split(/--/, $form->{department}); @@ -185,7 +184,7 @@ sub post_transaction { $query = qq|UPDATE ap SET invnumber = ?, transdate = ?, ordnumber = ?, vendor_id = ?, taxincluded = ?, amount = ?, duedate = ?, paid = ?, netamount = ?, - curr = ?, notes = ?, department_id = ?, storno = ?, storno_id = ?, + curr = (SELECT id FROM currencies WHERE curr = ?), notes = ?, department_id = ?, storno = ?, storno_id = ?, globalproject_id = ?, direct_debit = ? WHERE id = ?|; @values = ($form->{invnumber}, conv_date($form->{transdate}), @@ -665,7 +664,6 @@ sub post_payment { $form->{exchangerate} = $form->format_amount($myconfig, $form->{exchangerate}); $form->{defaultcurrency} = $form->get_default_currency($myconfig); - delete $form->{currency} unless $form->{defaultcurrency}; # Get the AP accno. $query =