Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sales Integrity Check Ignores Discount - SOLVED
02-08-2018, 09:49 AM (This post was last modified: 02-09-2018 12:26 AM by VortecCPI.)
Post: #1
Sales Integrity Check Ignores Discount - SOLVED
Z_SalesIntegrityCheck.php

This script does not take into account discountpercent so it shows an issue where non exists.

Fixed by changing line 145

FROM:

$sumsql = "SELECT SUM( qtyinvoiced * unitprice ) AS InvoiceTotal

TO:

$sumsql = "SELECT SUM(qtyinvoiced * unitprice * (1 - discountpercent)) AS InvoiceTotal

To further tidy it up try:

$sumsql = "SELECT ROUND(SUM(qtyinvoiced * unitprice * (1 - discountpercent)), 3) AS InvoiceTotal

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
02-08-2018, 11:32 AM
Post: #2
RE: Sales Integrity Check Ignores Discount
Change committed to SVN.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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