From: Joe Hunt Date: Sat, 16 Feb 2013 12:45:45 +0000 (+0100) Subject: If reference was increased by more than one when entering documents, the next referen... X-Git-Tag: 2.3-final~308 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=7d4687a00e3ee61cd628d5c74ceb7251fc11a7ac;p=fa-stable.git If reference was increased by more than one when entering documents, the next reference was not updated. --- diff --git a/includes/references.inc b/includes/references.inc index 16781175..c18bcd04 100644 --- a/includes/references.inc +++ b/includes/references.inc @@ -57,7 +57,7 @@ class references function save($type, $id, $reference) { update_reference($type, $id, $reference); // store in refs table - if ($reference == $this->get_next($type)) { // if reference was not changed from default + if ($reference >= $this->get_next($type)) { // if reference was bigger or not changed from default $next = $this->_increment($reference); // increment default save_next_reference($type, $next); }