From: Janusz Dobrowolski Date: Thu, 6 Mar 2008 09:35:47 +0000 (+0000) Subject: Concurrent edition fix X-Git-Tag: v2.4.2~19^2~2220 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=a4ef7051b7958c87657d5a14b90c0fce294f84cb;p=fa-stable.git Concurrent edition fix --- diff --git a/includes/systypes.inc b/includes/systypes.inc index e9aa6987..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");