X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fsystypes.inc;h=fc0dbb9a315bb574608772709f4cc99fa624ed40;hb=8864b1ec0fd3321e510511ef22614bc36845540e;hp=e9aa69871d677a51010e54944a05dba232f3f4e2;hpb=ccc6ec0bcb632b559ee068effa0b61f5b1b6276f;p=fa-stable.git diff --git a/includes/systypes.inc b/includes/systypes.inc index e9aa6987..fc0dbb9a 100644 --- a/includes/systypes.inc +++ b/includes/systypes.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ Function get_next_trans_no ($trans_type){ // sql to get the next display transaction number @@ -14,7 +23,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"); @@ -47,6 +57,7 @@ function get_systype_db_info($type) case 28 : return array("".TB_PREF."wo_issues", null, "issue_no", "reference", "issue_date"); case 29 : return array("".TB_PREF."wo_manufacture", null, "id", "reference", "date_"); case 30 : return array("".TB_PREF."sales_orders", null, "order_no", "customer_ref", "ord_date"); + case 31 : return array("".TB_PREF."service_orders", null, "order_no", "cust_ref", "date"); case 40 : return array("".TB_PREF."dimensions", null, "id", "reference", "date_"); case 35 : return null; }