bug in purchase order delete when invoking hook_db_prevoid () Fixed.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 26 Sep 2020 07:53:49 +0000 (09:53 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 26 Sep 2020 07:53:49 +0000 (09:53 +0200)
purchasing/includes/db/po_db.inc

index a904c2ff4b396cf47135975c05b31b6362a7dd61..115b73f1f8381c051177fe539712cfb3161479be 100644 (file)
@@ -49,7 +49,7 @@ function delete_po($po)
        global $Refs;
 
        begin_transaction();
-       hook_db_prevoid($po, ST_PURCHORDER);
+       hook_db_prevoid(ST_PURCHORDER, $po);
        $sql = "DELETE FROM ".TB_PREF."purch_orders WHERE order_no=".db_escape($po);
        db_query($sql, "The order header could not be deleted");