If reference was increased by more than one when entering documents, the next referen...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 16 Feb 2013 12:45:45 +0000 (13:45 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 16 Feb 2013 12:45:45 +0000 (13:45 +0100)
includes/references.inc

index 16781175b5922cc221d6894594becbb38b77a740..c18bcd043c4ce7ec9b9cf037399f106a984e2c3e 100644 (file)
@@ -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);
                }