Fehler beim Buchen. Wenn EUR gesetzt war, wurde bei Eingangsrechnungen das Bestandskonto
[kivitendo-erp.git] / SL / OE.pm
index c5e3665..460e191 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -35,6 +35,7 @@
 package OE;
 
 use SL::AM;
+use SL::DBUtils;
 
 sub transactions {
   $main::lxdebug->enter_sub();
@@ -560,6 +561,21 @@ sub close_orders {
   $main::lxdebug->leave_sub();
 }
 
+sub close_order {
+  $main::lxdebug->enter_sub();
+
+  my ($self, $myconfig, $form) = @_;
+
+  $main::lxdebug->leave_sub() unless ($form->{"id"});
+
+  my $dbh = $form->dbconnect($myconfig);
+  do_query($form, $dbh, qq|UPDATE oe SET closed = TRUE where ordnumber = ?|,
+           $form->{"id"});
+  $dbh->disconnect;
+
+  $main::lxdebug->leave_sub();
+}
+
 sub delete {
   $main::lxdebug->enter_sub();