Merged all main trunk bugfixes up to release 2.0.5
[fa-stable.git] / purchasing / includes / db / invoice_db.inc
index 33ec2b57205f662e7f599d4a9337fbf8c860c0f1..ec22b1cb2cdde221fff4f02df3c73ad3e5559fb3 100644 (file)
@@ -362,7 +362,7 @@ function void_supp_invoice($type, $type_no)
                $date_ = Today();
         while ($details_row = db_fetch($result))
         {
-               if (strlen($details_row["grn_item_id"]) > 0) // it can be empty for GL items
+               if ((int)$details_row["grn_item_id"] > 0) // it can be empty for GL items
                {
                        // Changed 2008-10-17 by Joe Hunt to get the avg. material cost updated
                                $old = update_supp_received_items_for_invoice($details_row["grn_item_id"],