Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 02-08-2022 10:25:38

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Function generateordernum help

Hi Nick.

I need to generate order numbers of the same length so the barcodes work better with my shipping software.

I use the datastamp method, and don't want to change it, but I need the unique part of the order number to be 3 digits long

In generateordernum I have changed the following lines:

Code:

if ((!(empty($sourceorder))) || ($ontype == 'PD') || ($ontype == 'D')) {$order_number .= '100';}

if ((!(empty($sourceorder))) || ($ontype == 'PD') || ($ontype == 'D')) {$xorder_number = $order_number . '100';}

$count = 99;

I changed the 1 to 100 and the count from 0 to 99.

Now, the first order generated is 20220208100, then 20220208101, etc.

Does this look about right?
I can't think of anywhere else this will have an effect??

Thanks
Rob


Rob

Offline

 

#2 02-08-2022 11:38:59

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Function generateordernum help

That would work perfectly to do what you want to do (start incrementing at 100).


Nick Hendler

Offline

 

Board footer