Thread Rating:
  • 0 Vote(s) - 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.)
#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
Reply


Messages In This Thread
Sales Integrity Check Ignores Discount - SOLVED - by VortecCPI - 02-08-2018, 09:49 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)