Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sales Graphs - Meaning of Budget - SOLVED
02-06-2018, 07:56 AM (This post was last modified: 02-06-2018 09:58 AM by VortecCPI.)
Post: #1
Sales Graphs - Meaning of Budget - SOLVED
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

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Sales Graphs - Meaning of Budget - SOLVED - VortecCPI - 02-06-2018 07:56 AM

Forum Jump:


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