]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Controller/SalesPurchase.pm
kivitendo 3.9.2-0.2
[mfinanz.git] / SL / Controller / SalesPurchase.pm
index ab31b8c65e88b91db239eaceddd9540ace253d29..59ab1951e989d946343b76e5107909250e9be848 100644 (file)
@@ -19,10 +19,10 @@ sub action_check_duplicate_invnumber {
                  );
   # we are modifying a existing daily booking - allow this if
   # booking conditions are not super strict
-  undef $exists_ap if ($::instance_conf->get_ap_changeable != 0
+  undef $exists_ap if ($exists_ap
+                    && $::instance_conf->get_ap_changeable != 0
                     && $exists_ap->gldate == DateTime->today_local);
 
-
   $_[0]->render(\ !!$exists_ap, { type => 'text' });
 }