Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Customer Special Price: expired but still grabbed
08-30-2020, 12:32 PM, (This post was last modified: 08-30-2020, 03:25 PM by phil.)
#7
RE: Customer Special Price: expired but still grabbed
No it's still not right as we are joining on the prices.debtorno=debtorsmaster.debtorno - should not have that join there. I need to look more closely at this!
I think this is it ... removing the join on debtors master

Code:
$sql = "SELECT prices.price
FROM prices,
debtorsmaster
WHERE debtorsmaster.salestype=prices.typeabbrev
AND debtorsmaster.debtorno='" . $DebtorNo . "'
AND prices.stockid = '" . $StockID . "'
AND prices.currabrev = debtorsmaster.currcode
AND prices.branchcode=''
AND prices.startdate <='" . Date('Y-m-d') . "'
AND prices.enddate >='" . Date('Y-m-d') . "'
ORDER BY prices.startdate DESC";

Not tested!
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply


Messages In This Thread
RE: Customer Special Price: expired but still grabbed - by phil - 08-30-2020, 12:32 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)