Incorrect Journal Balance (sales invoice) when many decimals in tax and price.
[fa-stable.git] / reporting / rep310.php
index 1b34b86c75f6633d6ba153175dd7def3e7fc7065..54de32e84b6047344e8734994d890f87291a1fb8 100644 (file)
@@ -86,10 +86,7 @@ function get_supp_inv_reference($supplier_id, $stock_id, $date)
                AND trans.tran_date=".db_escape($date);
     $result = db_query($sql,"No transactions were returned");
     $row = db_fetch_row($result);
-    if (isset($row[0]))
-       return $row[0];
-    else
-       return '';
+       return is_array($row) ? $row[0] : '';
 }
 
 //----------------------------------------------------------------------------------------------------
@@ -137,7 +134,7 @@ function print_inventory_purchase()
        else
                $itm = $item;
 
-       $cols = array(0, 60, 180, 225, 275, 400, 420, 465,      520);
+       $cols = array(0, 60, 180, 230, 275, 400, 420, 465,      520);
 
        $headers = array(_('Item'), _('Description'), _('Date'), _('#'), _('Supplier'), _('Qty'), _('Unit Price'), _('Location'));
        if ($fromsupp != '')