Delivery notes removed from Customer Balnces, warning fix.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 20 Mar 2008 11:48:07 +0000 (11:48 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 20 Mar 2008 11:48:07 +0000 (11:48 +0000)
reporting/rep101.php

index fa6d832841a7f508cd0c6c0f059ca84ff0356829..3fd3e979030e69771a01e5a1d900f94ee201135f 100644 (file)
@@ -30,7 +30,9 @@ function get_transactions($debtorno, $date)
                ((".TB_PREF."debtor_trans.type = 10)
                AND ".TB_PREF."debtor_trans.due_date < '$date') AS OverDue
        FROM ".TB_PREF."debtor_trans, ".TB_PREF."sys_types
-       WHERE ".TB_PREF."debtor_trans.tran_date <= '$date' AND ".TB_PREF."debtor_trans.debtor_no = '$debtorno'
+       WHERE ".TB_PREF."debtor_trans.tran_date <= '$date' 
+       AND ".TB_PREF."debtor_trans.debtor_no = '$debtorno'
+       AND ".TB_PREF."debtor_trans.type != 13
        AND ".TB_PREF."debtor_trans.type = ".TB_PREF."sys_types.type_id
        ORDER BY ".TB_PREF."debtor_trans.tran_date";
 
@@ -82,8 +84,8 @@ function print_customer_balances()
     $rep->Info($params, $cols, $headers, $aligns);
     $rep->Header();
 
-       $total = array();
-       $grandtotal = array();
+       $total = array(0,0,0,0);
+       $grandtotal = array(0,0,0,0);
 
        $sql = "SELECT debtor_no, name, curr_code FROM ".TB_PREF."debtors_master ";
        if ($fromcust != reserved_words::get_all_numeric())
@@ -105,7 +107,6 @@ function print_customer_balances()
                if (db_num_rows($res)==0)
                        continue;
                $rep->Line($rep->row + 4);
-               $total[0] = $total[1] = $total[2] = $total[3] = 0.0;
                while ($trans = db_fetch($res))
                {
                        $rep->NewLine(1, 2);