Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Frequently Ordered Items
08-24-2015, 07:08 AM
Post: #1
Frequently Ordered Items
Hi All
I would like to modify the Frequently Ordered Items to only show results only for the current customer, has anyone done this? I have tried to modify SelectOrderItems.php line 1508
$SixMonthsAgo = DateAdd (Date($_SESSION['DefaultDateFormat']),'m',-6);
Without success.
Thanks
For all the great work.
Find all posts by this user
Quote this message in a reply
08-24-2015, 06:52 PM
Post: #2
RE: Frequently Ordered Items
Can you try changing the SQL at line 1452 in SelectOrderItems.php to:

$SQL="SELECT stockmaster.units,
stockmaster.description,
stockmaster.longdescription,
stockmaster.stockid,
salesorderdetails.stkcode,
SUM(qtyinvoiced) salesqty
FROM `salesorderdetails`INNER JOIN `stockmaster`
ON salesorderdetails.stkcode = stockmaster.stockid
INNER JOIN salesorders
ON salesorders.orderno=salesorderdetails.orderno
WHERE ActualDispatchDate >= '" . FormatDateForSQL($SixMonthsAgo) . "'
AND salesorders.debtorno='" . $_SESSION['Items'.$identifier]->DebtorNo . "'
GROUP BY stkcode
ORDER BY salesqty DESC
LIMIT " . $_SESSION['FrequentlyOrderedItems'];

This should show the frequently ordered items just for the selected customer but I haven't tested this so can you let me know if it works?

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
08-26-2015, 11:59 AM
Post: #3
RE: Frequently Ordered Items
Thanks For the help
worked great.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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