Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetNextTransNo Not working as expected
03-31-2018, 12:01 PM
Post: #1
GetNextTransNo Not working as expected
Hi

I populated all my customers with one sql file injecting data in my customer tables (debtormaster and the others)

I chose to have in my system parameters my debtor codes being set to automatic, therefore my sql starts my debtor no at 1 and increments for each new record. All my 400+ customers have been successfully created with my sql file

My problem:When I want to create a customer MANUALLY via the weberp interface, I get an error message that says that the key is already taken (trying to use a key=6 instead of something like 403)

After looking at customers.php, I see at line 214:
Code:
if ($_SESSION['AutoDebtorNo']== 1) {
$_POST['DebtorNo'] = GetNextTransNo(500, $db);
}

I'm assuming it's supposed to grab the next available key, but it's not…
Any suggestion?

Thanks!
Find all posts by this user
Quote this message in a reply
04-01-2018, 05:34 AM (This post was last modified: 04-01-2018 05:52 AM by HDeriauFF.)
Post: #2
RE: GetNextTransNo Not working as expected
Fixed: I just need to update systypes where typename=500 with a value equals to my number of debtors.
Find all posts by this user
Quote this message in a reply
04-01-2018, 09:37 PM
Post: #3
RE: GetNextTransNo Not working as expected
Perhaps the import utility should update the SysTypes table upon completion?

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
04-02-2018, 12:15 AM
Post: #4
RE: GetNextTransNo Not working as expected
Hi Paul
I did not use the import utility to populate my customers file but if this is something that happens there too, yes it also needs to be addressed if systype 500 is not set to the correct value after an import.
Find all posts by this user
Quote this message in a reply
04-02-2018, 12:34 AM
Post: #5
RE: GetNextTransNo Not working as expected
It would be very easy to write a utility script that just updated systypes with the correct numbers if it got out of sync.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)