navariltd / navari_csf_ke

EXPNext Country Specific Customizations for Kenya
GNU General Public License v3.0
15 stars 28 forks source link

fix: Fixed issue where the Kenya Sales Tax Report fetches data from cancelled Sales Invoices. #76

Closed GichanaMayaka closed 3 months ago

GichanaMayaka commented 4 months ago

In this PR, I have endeavoured to fix an Issue in the Kenya Sales Tax Report where sales from cancelled Sales Invoices are shown in the report, leading to wildly incorrect information being displayed. This can be seen in the following images of the report before the fix where the cancelled Sales Invoice of 300Billion causes the report to indicate 300Billion+ of "Unregistered customers total sales", which is incorrect.

The fix for the issue includes adding an explicit filter for such cases - cases where an invoice is cancelled - to the SQL query that fetches Sales information.