webERP Forum
Sales Graphs - Meaning of Budget - SOLVED - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (/forumdisplay.php?fid=8)
+--- Thread: Sales Graphs - Meaning of Budget - SOLVED (/showthread.php?tid=8077)



Sales Graphs - Meaning of Budget - SOLVED - VortecCPI - 02-06-2018 07:56 AM

SalesGraph.php

The graph generates a Budget Bar based upon the budgetoractual field in salesanalysis table but as far as I can see it has no correlation with GL budgets.

Is this correct? It seems then the Budget Bar will only show if budgetoractual field in salesanalysis table is set to "0" using Credit_Invoice.php?

Perhaps I don't understand how the Sales Graph is used?

Any help is greatly appreciated!

Below is SQL:
SELECT salesanalysis.periodno,
periods.lastdate_in_period,
SUM(CASE WHEN budgetoractual=1 THEN amt ELSE 0 END) AS sales,
SUM(CASE WHEN budgetoractual=0 THEN amt ELSE 0 END) AS budget
FROM salesanalysis
INNER JOIN periods
ON salesanalysis.periodno=periods.periodno
WHERE salesanalysis.periodno>='1'
AND salesanalysis.periodno <= '14'
GROUP BY salesanalysis.periodno, periods.lastdate_in_period
ORDER BY salesanalysis.periodno


RE: Sales Graphs - Meaning of Budget? - VortecCPI - 02-06-2018 09:36 AM

I believe I have found some explanation in the manual in that we must import this data into the DB manually, which makes sense given the granularity of the report versus that of the GL COA.

I will insert some data to test in the morning...


Okay... My OCD would not allow me to let it go so I tested it and it works as expected.

This is a VERY powerful and VERY useful webERP feature in my opinion.