projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow changing urrency on customer/supplier as long as no transactions exist.
[fa-stable.git]
/
includes
/
references.inc
diff --git
a/includes/references.inc
b/includes/references.inc
index 0c11ebee3defacaa1d96bcdfb61a25a862f08160..7f79fbc7157901fc954712e5f7cf370bcf4060e9 100644
(file)
--- 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
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);
}
$next = $this->_increment($reference); // increment default
save_next_reference($type, $next);
}
@@
-114,10
+114,10
@@
function is_new_reference($ref, $type)
$type = db_escape($type);
if ($db_ref == null) { // journal or bank trans store references in refs table
$type = db_escape($type);
if ($db_ref == null) { // journal or bank trans store references in refs table
- $db_
ref
= TB_PREF."refs";
+ $db_
name
= TB_PREF."refs";
$db_type = 'type';
$db_trans = 'id';
$db_type = 'type';
$db_trans = 'id';
- $
r
b_ref = 'reference';
+ $
d
b_ref = 'reference';
}
if ($db_type != null) {
}
if ($db_type != null) {