Bug Found in Supplier Invoice in Calculating Unit Tax
[fa-stable.git] / purchasing / includes / db / supp_trans_db.inc
index aa9490afc707e048723376ab87c05c1704a1fff1..d87e1a9379585205520df1dfbbf0874c845c37a4 100644 (file)
@@ -43,7 +43,8 @@ function write_supp_trans($type, $trans_no, $supplier_id, $date_, $due_date, $re
                $err_msg = "Cannot insert a supplier transaction record";
 
        db_query($sql, $err_msg);
-       add_audit_trail($type, $trans_no, $date_);
+       if ($type != ST_JOURNAL && $type != ST_BANKDEPOSIT && $type != ST_BANKPAYMENT) 
+               add_audit_trail($type, $trans_no, $date_);
 
        return $trans_no;
 }
@@ -288,6 +289,10 @@ function get_sql_for_supplier_inquiry($filter, $after_date, $to_date, $supplier_
                {
                        $sql .= " AND trans.type = ".ST_SUPPCREDIT."  ";
                }
+               elseif (($filter == '7')) 
+               {
+                       $sql .= " AND trans.type = ".ST_JOURNAL."  ";
+               }
 
                if (($filter == '2') || ($filter == '5')) 
                {