X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fsystypes.inc;h=3d45981038f15f3d61bc53b50b5e26c666036d3d;hb=d34add5e762a470a52fade37173b4491462ee22a;hp=0c9aa0483ee9186bfdff630759d35127017ef1d1;hpb=da8311619dd73feae101d246a1957b972e00cbd2;p=fa-stable.git diff --git a/includes/systypes.inc b/includes/systypes.inc index 0c9aa048..3d459810 100644 --- a/includes/systypes.inc +++ b/includes/systypes.inc @@ -14,7 +14,8 @@ Function get_next_trans_no ($trans_type){ $next_number = $myrow[0] + 1; - $sql = "UPDATE ".TB_PREF."sys_types SET type_no = $next_number WHERE type_id = $trans_type"; + $sql = "UPDATE ".TB_PREF."sys_types SET type_no = $next_number WHERE type_id = $trans_type + AND type_no = ". $myrow[0]; //concurrency paranoic protection db_query($sql,"The next transaction number for $trans_type could not be updated"); @@ -35,6 +36,7 @@ function get_systype_db_info($type) case 10 : return array("".TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); case 11 : return array("".TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); case 12 : return array("".TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); + case 13 : return array("".TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); case 16 : return array("".TB_PREF."stock_moves", "type", "trans_no", "reference", "tran_date"); case 17 : return array("".TB_PREF."stock_moves", "type", "trans_no", "reference", "tran_date"); case 18 : return array("".TB_PREF."purch_orders", null, "order_no", "reference", "tran_date");