X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FAM.pm;h=67c3c2060e2fa7f0922768b49158dbc5891b1af4;hb=abd4a0b007159d46da41dc6ed832acc3e85c9744;hp=f6c93ada039ce8df4a3fbbc1b83c7af27ff11e54;hpb=9a194d6adb43e503eba75d2604d8081095ca1414;p=kivitendo-erp.git diff --git a/SL/AM.pm b/SL/AM.pm index f6c93ada0..67c3c2060 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -213,6 +213,13 @@ sub save_account { qw(AR_amount AR_tax AR_paid AP_amount AP_tax AP_paid IC_sale IC_cogs IC_taxpart IC_income IC_expense IC_taxservice); } + if ($form->{AR_include_in_dropdown}) { + $form->{$form->{AR_include_in_dropdown}} = $form->{AR_include_in_dropdown}; + } + if ($form->{AP_include_in_dropdown}) { + $form->{$form->{AP_include_in_dropdown}} = $form->{AP_include_in_dropdown}; + } + $form->{link} = ""; foreach my $item ($form->{AR}, $form->{AR_amount}, $form->{AR_tax}, $form->{AR_paid}, @@ -540,7 +547,7 @@ sub save_lead { $query = qq|UPDATE leads SET lead = ? WHERE id = ?|; - puhs(@values, $form->{id}); + push(@values, $form->{id}); } else { $query = qq|INSERT INTO leads (lead) @@ -1502,6 +1509,10 @@ sub convert_unit { $main::lxdebug->enter_sub(2); my ($this, $a, $b, $all_units) = @_; + if (!$all_units) { + $all_units = $this->retrieve_all_units; + } + $main::lxdebug->leave_sub(2) and return 0 unless $a && $b; $main::lxdebug->leave_sub(2) and return 0 unless $all_units->{$a} && $all_units->{$b}; $main::lxdebug->leave_sub(2) and return 0 unless $all_units->{$a}{base_unit} eq $all_units->{$b}{base_unit};