From: <tim...@us...> - 2013-02-24 22:26:05
|
Revision: 5822 http://sourceforge.net/p/web-erp/reponame/5822 Author: tim_schofield Date: 2013-02-24 22:26:00 +0000 (Sun, 24 Feb 2013) Log Message: ----------- Tim: Fix syntax error, missing ; at end of line Modified Paths: -------------- trunk/SalesGraph.php Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2013-02-24 22:22:53 UTC (rev 5821) +++ trunk/SalesGraph.php 2013-02-24 22:26:00 UTC (rev 5822) @@ -2,19 +2,19 @@ /* $Id$*/ - include('includes/session.inc'); - include('includes/phplot/phplot.php'); - $Title=_('Sales Report Graph'); +include('includes/session.inc'); +include('includes/phplot/phplot.php'); +$Title=_('Sales Report Graph'); - $ViewTopic = 'ARInquiries'; - $BookMark = 'SalesGraph' - - include('includes/header.inc'); +$ViewTopic = 'ARInquiries'; +$BookMark = 'SalesGraph'; - $SelectADifferentPeriod =''; +include('includes/header.inc'); - if (isset($_POST['FromPeriod']) AND isset($_POST['ToPeriod'])){ +$SelectADifferentPeriod =''; +if (isset($_POST['FromPeriod']) AND isset($_POST['ToPeriod'])){ + if ($_POST['FromPeriod'] > $_POST['ToPeriod']){ prnMsg(_('The selected period from is actually after the period to! Please re-select the reporting period'),'error'); $SelectADifferentPeriod =_('Select A Different Period'); @@ -27,9 +27,9 @@ prnMsg(_('For graphs including either a customer or item range - the range must be specified. Please enter the value from and the value to for the range'),'error'); $SelectADifferentPeriod= _('Select A Different Period'); } - } +} - if ((! isset($_POST['FromPeriod']) OR ! isset($_POST['ToPeriod'])) +if ((! isset($_POST['FromPeriod']) OR ! isset($_POST['ToPeriod'])) OR $SelectADifferentPeriod==_('Select A Different Period')){ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; |
From: <te...@us...> - 2014-09-12 09:07:34
|
Revision: 6881 http://sourceforge.net/p/web-erp/reponame/6881 Author: tehonu Date: 2014-09-12 09:07:31 +0000 (Fri, 12 Sep 2014) Log Message: ----------- Fixed Type Modified Paths: -------------- trunk/SalesGraph.php Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2014-09-12 00:40:01 UTC (rev 6880) +++ trunk/SalesGraph.php 2014-09-12 09:07:31 UTC (rev 6881) @@ -299,7 +299,7 @@ exit; } - $GraphArrays = array(); + $GraphArray = array(); $i = 0; while ($myrow = DB_fetch_array($SalesResult)){ $GraphArray[$i] = array(MonthAndYearFromSQLDate($myrow['lastdate_in_period']),$myrow['sales'],$myrow['budget']); |
From: <te...@us...> - 2014-09-13 03:12:59
|
Revision: 6882 http://sourceforge.net/p/web-erp/reponame/6882 Author: tehonu Date: 2014-09-13 03:12:46 +0000 (Sat, 13 Sep 2014) Log Message: ----------- Formatting tweaks Modified Paths: -------------- trunk/SalesGraph.php Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2014-09-12 09:07:31 UTC (rev 6881) +++ trunk/SalesGraph.php 2014-09-13 03:12:46 UTC (rev 6882) @@ -19,11 +19,12 @@ prnMsg(_('The selected period from is actually after the period to! Please re-select the reporting period'),'error'); $SelectADifferentPeriod =_('Select A Different Period'); } +/* There is no PHPlot reason to restrict the graph to 12 months... if ($_POST['ToPeriod'] - $_POST['FromPeriod'] >12){ prnMsg(_('The selected period range is more than 12 months - only graphs for a period less than 12 months can be created'),'error'); $SelectADifferentPeriod= _('Select A Different Period'); } - if ((!isset($_POST['ValueFrom']) OR $_POST['ValueFrom']='' OR !isset($_POST['ValueTo']) OR $_POST['ValueTo']='') AND $_POST['GraphOn'] !='All'){ +*/ if ((!isset($_POST['ValueFrom']) OR $_POST['ValueFrom']='' OR !isset($_POST['ValueTo']) OR $_POST['ValueTo']='') AND $_POST['GraphOn'] !='All'){ prnMsg(_('For graphs including either a customer or item range - the range must be specified. Please enter the value from and the value to for the range'),'error'); $SelectADifferentPeriod= _('Select A Different Period'); } @@ -285,6 +286,8 @@ $graph->SetShading(5); $graph->SetDrawYGrid(TRUE); $graph->SetDataType('text-data'); + $graph->SetNumberFormat('.', ','); + $graph->SetPrecisionY($_SESSION['CompanyRecord']['decimalplaces']); $SalesResult = DB_query($SQL, $db); if (DB_error_no($db) !=0) { |
From: <te...@us...> - 2014-09-14 00:40:02
|
Revision: 6885 http://sourceforge.net/p/web-erp/reponame/6885 Author: tehonu Date: 2014-09-14 00:39:55 +0000 (Sun, 14 Sep 2014) Log Message: ----------- Improve X label, so it's readable with more than 12 columns Modified Paths: -------------- trunk/SalesGraph.php Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2014-09-13 23:06:42 UTC (rev 6884) +++ trunk/SalesGraph.php 2014-09-14 00:39:55 UTC (rev 6885) @@ -281,6 +281,7 @@ } $graph->SetXTickPos('none'); $graph->SetXTickLabelPos('none'); + $graph->SetXLabelAngle(90); $graph->SetBackgroundColor('white'); $graph->SetTitleColor('blue'); $graph->SetFileFormat('png'); |
From: <te...@us...> - 2014-09-21 10:08:09
|
Revision: 6898 http://sourceforge.net/p/web-erp/reponame/6898 Author: tehonu Date: 2014-09-21 10:07:59 +0000 (Sun, 21 Sep 2014) Log Message: ----------- Added ORDER BY to area, stock category and sales person drop down (ordered by the field shown to user) Modified Paths: -------------- trunk/SalesGraph.php Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2014-09-21 05:07:16 UTC (rev 6897) +++ trunk/SalesGraph.php 2014-09-21 10:07:59 UTC (rev 6898) @@ -91,7 +91,7 @@ } echo '</select></td></tr>'; - $AreasResult = DB_query("SELECT areacode, areadescription FROM areas",$db); + $AreasResult = DB_query("SELECT areacode, areadescription FROM areas ORDER BY areadescription",$db); if (!isset($_POST['SalesArea'])){ $_POST['SalesArea']=''; @@ -113,7 +113,7 @@ } echo '</select></td></tr>'; - $CategoriesResult = DB_query("SELECT categoryid, categorydescription FROM stockcategory",$db); + $CategoriesResult = DB_query("SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription",$db); if (!isset($_POST['CategoryID'])){ $_POST['CategoryID']=''; @@ -135,7 +135,7 @@ } echo '</select></td></tr>'; - $SalesFolkResult = DB_query("SELECT salesmancode, salesmanname FROM salesman",$db); + $SalesFolkResult = DB_query("SELECT salesmancode, salesmanname FROM salesman ORDER BY salesmanname",$db); if (! isset($_POST['SalesmanCode'])){ $_POST['SalesmanCode'] = ''; @@ -162,7 +162,7 @@ </tr>'; echo '<tr> - <td>' . _('Graph Type') . '</td + <td>' . _('Graph Type') . '</td> <td><select name="GraphType"> <option value="bars">' . _('Bar Graph') . '</option> <option value="stackedbars">' . _('Stacked Bar Graph') . '</option> |
From: <ex...@us...> - 2016-06-08 04:16:45
|
Revision: 7552 http://sourceforge.net/p/web-erp/reponame/7552 Author: exsonqu Date: 2016-06-08 04:16:42 +0000 (Wed, 08 Jun 2016) Log Message: ----------- 08/06/16 Exson: add data label for SalesGraph.php. Modified Paths: -------------- trunk/SalesGraph.php Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2016-06-06 15:28:31 UTC (rev 7551) +++ trunk/SalesGraph.php 2016-06-08 04:16:42 UTC (rev 7552) @@ -319,6 +319,7 @@ array('black') //Border Colors ); $graph->SetLegend(array(_('Actual'),_('Budget'))); + $graph->SetYDataLabelPos('plotin'); //Draw it $graph->DrawGraph(); @@ -329,4 +330,4 @@ </table>'; include('includes/footer.inc'); } -?> \ No newline at end of file +?> |