X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIR.pm;h=83921779abe595da25d65f06a8fa04c208b2e834;hb=de9a3d743c168703dcaf3aef85dd2d117aacecc9;hp=7fefd41177872685599400873cdd6cab4fcb39de;hpb=fc96e3c77cd070fe249fb885d0bddee64c3f806f;p=kivitendo-erp.git diff --git a/SL/IR.pm b/SL/IR.pm index 7fefd4117..83921779a 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -103,7 +103,7 @@ sub post_invoice { $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"}); $form->{"qty_$i"} *= -1 if $form->{storno}; - $form->{"inventory_accno_$i"} = $form->{"expense_accno_$i"} if $main::eur; + $form->{"inventory_accno_$i"} = $form->{"expense_accno_$i"} if $::lx_office_conf{system}->{eur}; # get item baseunit if (!$item_units{$form->{"id_$i"}}) { @@ -527,7 +527,14 @@ sub post_invoice { # set values which could be empty my $taxzone_id = $form->{taxzone_id} * 1; - $form->{department_id} = (split /--/, $form->{department})[1]; + + # Seit neuestem wird die department_id schon übergeben UND $form->department nicht mehr + # korrekt zusammengebaut. Sehr wahrscheinlich beim Umstieg auf T8 kaputt gegangen + # Ich lass den Code von 2005 erstmal noch stehen ;-) jb 03-2011 + # copy & paste von IS.pm + if (!$form->{department_id}){ + $form->{department_id} = (split /--/, $form->{department})[1]; + } $form->{invnumber} = $form->{id} unless $form->{invnumber}; $taxzone_id = 0 if (3 < $taxzone_id) || (0 > $taxzone_id); @@ -577,7 +584,7 @@ sub post_invoice { # delete zero entries do_query($form, $dbh, qq|DELETE FROM acc_trans WHERE amount = 0|); - Common::webdav_folder($form) if ($main::webdav); + Common::webdav_folder($form); # Link this record to the records it was created from. RecordLinks->create_links('dbh' => $dbh, @@ -875,7 +882,7 @@ sub retrieve_invoice { } $sth->finish(); - Common::webdav_folder($form) if ($main::webdav); + Common::webdav_folder($form); $dbh->disconnect();