ivylabs / suitecrm-analytics

4 stars 4 forks source link

Periodic Agent Country Sales Report - The "Deleted" parameter does not filter out Deleted Invoices/Line Items when set to "Hide" #293

Closed johnM2401 closed 3 years ago

johnM2401 commented 3 years ago

Describe the bug Periodic Agent Country Sales Report's "Deleted" parameter does not seem to filter out deleted Invoices/Line Items.

This does take place on the "Agent Sales" Report, so should be the same result on the "Periodic Agent Country Sales" report

**Component What component does this bug relate to?

  1. Report - Periodic Agent Country Sales Report


**Solution File PeriodicAgentCountrySales.prpt


To Reproduce Steps to reproduce the behavior:

  1. Create some Invoices, with multiple Line Items, in the CRM
  2. Pull this to the DWH with the ./run script
  3. Check this data is available in the Periodic Agent Country Sales Report.
  4. In the CRM, delete a Line item on an Invoice
  5. Pull this to the DWH with the ./run script
  6. Toggle the "Deleted" parameter on the Periodic Agent Country Sales Report, and check that this deleted Line is no longer taken into consideration.
  7. Delete this Invoice in the CRM
  8. Pull this to the DWH with the ./run script
  9. Again, Hide Deleted Items on the Periodic Agent Country Sales Report, and ensure that this full invoice is no longer taken into consideration


Expected behavior Deleted Invoices/Line Items should not be taken into consideration, if the "Deleted" parameter is set to "Hide" However, it currently does not hide deleted items.

Screenshots For comparison, the Agent Sales Report does hide deleted items.

When set to "Show": image

When set to "Hide": image

And, on the Periodic Agent Country Sales Report:

When set to "Show": image

When set to "Hide": image


Desktop (please complete the following information):

harrisward commented 3 years ago

The issue was to do with the SQL query.

Fixed and merged into master @johnM2401