Thread: [Weberp-svn] SF.net SVN: weberp:[5795] trunk/DailySalesInquiry.php
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-07-11 16:49:43
|
Revision: 5795 http://weberp.svn.sourceforge.net/weberp/?rev=5795&view=rev Author: tim_schofield Date: 2011-07-11 16:49:37 +0000 (Mon, 11 Jul 2011) Log Message: ----------- Remove old references to $PageSecurity Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-11 16:49:27 UTC (rev 5794) +++ trunk/DailySalesInquiry.php 2011-07-11 16:49:37 UTC (rev 5795) @@ -3,8 +3,6 @@ /* $Revision: 1.00$ */ /* $Id$*/ -//$PageSecurity = 2; - include('includes/session.inc'); $title = _('Daily Sales Inquiry'); include('includes/header.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-14 16:00:57
|
Revision: 6195 http://weberp.svn.sourceforge.net/weberp/?rev=6195&view=rev Author: tim_schofield Date: 2011-07-14 16:00:51 +0000 (Thu, 14 Jul 2011) Log Message: ----------- XHTML quoting corrections Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-14 16:00:40 UTC (rev 6194) +++ trunk/DailySalesInquiry.php 2011-07-14 16:00:51 UTC (rev 6195) @@ -14,7 +14,7 @@ echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table cellpadding=2 class=selection><tr>'; +echo '<table cellpadding=2 class="selection"><tr>'; echo '<td>' . _('Month to Show') . ':</td><td><select tabindex=1 name="MonthToShow">'; @@ -90,7 +90,7 @@ $ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg($db); $SalesResult = DB_query($sql, $db,$ErrMsg); -echo '<table cellpadding=2 class=selection>'; +echo '<table cellpadding=2 class="selection">'; echo'<tr> <th>' . _('Sunday') . '</th> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-16 18:16:59
|
Revision: 6690 http://weberp.svn.sourceforge.net/weberp/?rev=6690&view=rev Author: tim_schofield Date: 2011-07-16 18:16:53 +0000 (Sat, 16 Jul 2011) Log Message: ----------- XHTML quoting corrections Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-16 18:16:42 UTC (rev 6689) +++ trunk/DailySalesInquiry.php 2011-07-16 18:16:53 UTC (rev 6690) @@ -53,7 +53,7 @@ } echo '</select></td>'; -echo '</tr></table><br /><div class="centre"><input tabindex=4 type=submit name="ShowResults" value="' . _('Show Daily Sales For The Selected Month') . '">'; +echo '</tr></table><br /><div class="centre"><input tabindex=4 type="submit" name="ShowResults" value="' . _('Show Daily Sales For The Selected Month') . '" />'; echo '</form></div>'; echo '<br />'; /*Now get and display the sales data returned */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-26 14:01:50
|
Revision: 6978 http://weberp.svn.sourceforge.net/weberp/?rev=6978&view=rev Author: tim_schofield Date: 2011-07-26 14:01:44 +0000 (Tue, 26 Jul 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-26 14:01:33 UTC (rev 6977) +++ trunk/DailySalesInquiry.php 2011-07-26 14:01:44 UTC (rev 6978) @@ -27,7 +27,7 @@ while ($PeriodRow = DB_fetch_array($PeriodsResult)){ if ($_POST['MonthToShow']==$PeriodRow['periodno']) { - echo '<option selected Value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; + echo '<option selected="True" Value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; $EndDateSQL = $PeriodRow['lastdate_in_period']; } else { echo '<option Value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; @@ -39,16 +39,16 @@ $SalespeopleResult = DB_query("SELECT salesmancode, salesmanname FROM salesman",$db); if (!isset($_POST['Salesperson'])){ $_POST['Salesperson'] = 'All'; - echo '<option selected value="All">' . _('All') . '</option>'; + echo '<option selected="True" value="All">' . _('All') . '</option>'; } else { echo '<option value="All">' . _('All') . '</option>'; } while ($SalespersonRow = DB_fetch_array($SalespeopleResult)){ if ($_POST['Salesperson']==$SalespersonRow['salesmancode']) { - echo '<option selected value="' . $SalespersonRow['salesmancode'] . '">' . $SalespersonRow['salesmanname'] . '</option>'; + echo '<option selected="True" value="' . $SalespersonRow['salesmancode'] . '">' . $SalespersonRow['salesmanname'] . '</option>'; } else { - echo '<option Value="' . $SalespersonRow['salesmancode'] . '">' . $SalespersonRow['salesmanname'] . '</option>'; + echo '<option value="' . $SalespersonRow['salesmancode'] . '">' . $SalespersonRow['salesmanname'] . '</option>'; } } echo '</select></td>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-29 21:39:06
|
Revision: 7362 http://weberp.svn.sourceforge.net/weberp/?rev=7362&view=rev Author: tim_schofield Date: 2011-07-29 21:39:00 +0000 (Fri, 29 Jul 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-29 21:38:49 UTC (rev 7361) +++ trunk/DailySalesInquiry.php 2011-07-29 21:39:00 UTC (rev 7362) @@ -14,7 +14,7 @@ echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table cellpadding=2 class="selection"><tr>'; +echo '<table cellpadding="2" class="selection"><tr>'; echo '<td>' . _('Month to Show') . ':</td><td><select tabindex=1 name="MonthToShow">'; @@ -173,9 +173,9 @@ $AverageDailySales = 0; } -echo '<th colspan=7>' . _('Total Sales for month') . ': ' . number_format($CumulativeTotalSales,0) . ' ' . _('GP%') . ': ' . number_format($AverageGPPercent,1) . '% ' . _('Avg Daily Sales') . ': ' . number_format($AverageDailySales,0) . '</th></tr>'; +echo '<th colspan="7">' . _('Total Sales for month') . ': ' . number_format($CumulativeTotalSales,0) . ' ' . _('GP%') . ': ' . number_format($AverageGPPercent,1) . '% ' . _('Avg Daily Sales') . ': ' . number_format($AverageDailySales,0) . '</th></tr>'; echo '</table>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-17 10:55:23
|
Revision: 7797 http://weberp.svn.sourceforge.net/weberp/?rev=7797&view=rev Author: tim_schofield Date: 2011-08-17 10:55:17 +0000 (Wed, 17 Aug 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-08-17 10:55:03 UTC (rev 7796) +++ trunk/DailySalesInquiry.php 2011-08-17 10:55:17 UTC (rev 7797) @@ -16,7 +16,7 @@ echo '<table cellpadding="2" class="selection"><tr>'; -echo '<td>' . _('Month to Show') . ':</td><td><select tabindex=1 name="MonthToShow">'; +echo '<td>' . _('Month to Show') . ':</td><td><select tabindex="1" name="MonthToShow">'; if (!isset($_POST['MonthToShow'])){ @@ -34,7 +34,7 @@ } } echo '</select></td>'; -echo '<td>' . _('Salesperson') . ':</td><td><select tabindex=2 name="Salesperson">'; +echo '<td>' . _('Salesperson') . ':</td><td><select tabindex="2" name="Salesperson">'; $SalespeopleResult = DB_query("SELECT salesmancode, salesmanname FROM salesman",$db); if (!isset($_POST['Salesperson'])){ @@ -53,7 +53,7 @@ } echo '</select></td>'; -echo '</tr></table><br /><div class="centre"><input tabindex=4 type="submit" name="ShowResults" value="' . _('Show Daily Sales For The Selected Month') . '" />'; +echo '</tr></table><br /><div class="centre"><input tabindex="4" type="submit" name="ShowResults" value="' . _('Show Daily Sales For The Selected Month') . '" />'; echo '</form></div>'; echo '<br />'; /*Now get and display the sales data returned */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-10-08 19:56:59
|
Revision: 8263 http://weberp.svn.sourceforge.net/weberp/?rev=8263&view=rev Author: tim_schofield Date: 2011-10-08 19:56:53 +0000 (Sat, 08 Oct 2011) Log Message: ----------- Show numbers in correct formatting for the users locale Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-10-08 19:56:42 UTC (rev 8262) +++ trunk/DailySalesInquiry.php 2011-10-08 19:56:53 UTC (rev 8263) @@ -142,9 +142,9 @@ for ($i=1;$i<=$LastDayOfMonth;$i++){ $ColumnCounter++; if(isset($DaySalesArray[$i])) { - echo '<td class="number" style="outline: 1px solid gray;">' . number_format($DaySalesArray[$i]->Sales,0) . '<br />' . number_format($DaySalesArray[$i]->GPPercent*100,1) . '%</td>'; + echo '<td class="number" style="outline: 1px solid gray;">' . locale_money_format($DaySalesArray[$i]->Sales,$_SESSION['CompanyRecord']['currencydefault']) . '<br />' . locale_number_format($DaySalesArray[$i]->GPPercent*100,1) . '%</td>'; } else { - echo '<td class="number" style="outline: 1px solid gray;">' . number_format(0,0) . '<br />' . number_format(0,1) . '%</td>'; + echo '<td class="number" style="outline: 1px solid gray;">' . locale_money_format(0,$_SESSION['CompanyRecord']['currencydefault']) . '<br />' . locale_number_format(0,1) . '%</td>'; } if ($ColumnCounter==7){ echo '</tr><tr>'; @@ -173,7 +173,7 @@ $AverageDailySales = 0; } -echo '<th colspan="7">' . _('Total Sales for month') . ': ' . number_format($CumulativeTotalSales,0) . ' ' . _('GP%') . ': ' . number_format($AverageGPPercent,1) . '% ' . _('Avg Daily Sales') . ': ' . number_format($AverageDailySales,0) . '</th></tr>'; +echo '<th colspan="7">' . _('Total Sales for month') . ': ' . locale_money_format($CumulativeTotalSales,$_SESSION['CompanyRecord']['currencydefault']) . ' ' . _('GP%') . ': ' . locale_number_format($AverageGPPercent,1) . '% ' . _('Avg Daily Sales') . ': ' . locale_money_format($AverageDailySales,$_SESSION['CompanyRecord']['currencydefault']) . '</th></tr>'; echo '</table>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-01-09 19:19:34
|
Revision: 8440 http://weberp.svn.sourceforge.net/weberp/?rev=8440&view=rev Author: tim_schofield Date: 2012-01-09 19:19:28 +0000 (Mon, 09 Jan 2012) Log Message: ----------- XHTML corrections - replace Value= with value= Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2012-01-09 19:19:19 UTC (rev 8439) +++ trunk/DailySalesInquiry.php 2012-01-09 19:19:28 UTC (rev 8440) @@ -27,10 +27,10 @@ while ($PeriodRow = DB_fetch_array($PeriodsResult)){ if ($_POST['MonthToShow']==$PeriodRow['periodno']) { - echo '<option selected="True" Value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; + echo '<option selected="True" value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; $EndDateSQL = $PeriodRow['lastdate_in_period']; } else { - echo '<option Value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; + echo '<option value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; } } echo '</select></td>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-02-19 22:26:04
|
Revision: 8531 http://weberp.svn.sourceforge.net/weberp/?rev=8531&view=rev Author: tim_schofield Date: 2012-02-19 22:25:58 +0000 (Sun, 19 Feb 2012) Log Message: ----------- Fix the width of the columns Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2012-02-19 04:41:15 UTC (rev 8530) +++ trunk/DailySalesInquiry.php 2012-02-19 22:25:58 UTC (rev 8531) @@ -93,13 +93,13 @@ echo '<table cellpadding="2" class="selection">'; echo'<tr> - <th>' . _('Sunday') . '</th> - <th>' . _('Monday') . '</th> - <th>' . _('Tuesday') . '</th> - <th>' . _('Wednesday') . '</th> - <th>' . _('Thursday') . '</th> - <th>' . _('Friday') . '</th> - <th>' . _('Saturday') . '</th></tr>'; + <th style="width: 14%">' . _('Sunday') . '</th> + <th style="width: 14%">' . _('Monday') . '</th> + <th style="width: 14%">' . _('Tuesday') . '</th> + <th style="width: 14%">' . _('Wednesday') . '</th> + <th style="width: 14%">' . _('Thursday') . '</th> + <th style="width: 14%">' . _('Friday') . '</th> + <th style="width: 14%">' . _('Saturday') . '</th></tr>'; $CumulativeTotalSales = 0; $CumulativeTotalCost = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-02-21 16:51:39
|
Revision: 8542 http://weberp.svn.sourceforge.net/weberp/?rev=8542&view=rev Author: tim_schofield Date: 2012-02-21 16:51:28 +0000 (Tue, 21 Feb 2012) Log Message: ----------- Change object to an array, and style fixes from Phils branch Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2012-02-21 10:02:30 UTC (rev 8541) +++ trunk/DailySalesInquiry.php 2012-02-21 16:51:28 UTC (rev 8542) @@ -1,61 +1,69 @@ <?php -/* $Revision: 1.00$ */ /* $Id$*/ include('includes/session.inc'); $title = _('Daily Sales Inquiry'); include('includes/header.inc'); -include('includes/DefineCartClass.php'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Daily Sales') . '" alt="" />' . ' ' . _('Daily Sales') . '</p>'; -echo '<div class="page_help_text">' . _('Select the month to show daily sales for') . '</div><br />'; +echo '<div class="page_help_text">' . _('Select the month to show daily sales for') . '</div> + <br />'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table cellpadding="2" class="selection"><tr>'; - -echo '<td>' . _('Month to Show') . ':</td><td><select tabindex="1" name="MonthToShow">'; - - if (!isset($_POST['MonthToShow'])){ $_POST['MonthToShow'] = GetPeriod(Date($_SESSION['DefaultDateFormat']),$db); + $Result = DB_query("SELECT lastdate_in_period FROM periods WHERE periodno='" . $_POST['MonthToShow'] . "'",$db); + $myrow = DB_fetch_array($Result); + $EndDateSQL = $myrow['lastdate_in_period']; } +echo '<table class="selection"> + <tr> + <td>' . _('Month to Show') . ':</td> + <td><select tabindex="1" name="MonthToShow">'; + $PeriodsResult = DB_query("SELECT periodno, lastdate_in_period FROM periods",$db); while ($PeriodRow = DB_fetch_array($PeriodsResult)){ if ($_POST['MonthToShow']==$PeriodRow['periodno']) { - echo '<option selected="True" value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; - $EndDateSQL = $PeriodRow['lastdate_in_period']; + echo '<option selected="selected" value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; + $EndDateSQL = $PeriodRow['lastdate_in_period']; } else { - echo '<option value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; + echo '<option value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; } } -echo '</select></td>'; -echo '<td>' . _('Salesperson') . ':</td><td><select tabindex="2" name="Salesperson">'; +echo '</select></td> + <td>' . _('Salesperson') . ':</td> + <td><select tabindex="2" name="Salesperson">'; $SalespeopleResult = DB_query("SELECT salesmancode, salesmanname FROM salesman",$db); if (!isset($_POST['Salesperson'])){ $_POST['Salesperson'] = 'All'; - echo '<option selected="True" value="All">' . _('All') . '</option>'; + echo '<option selected="selected" value="All">' . _('All') . '</option>'; } else { echo '<option value="All">' . _('All') . '</option>'; } while ($SalespersonRow = DB_fetch_array($SalespeopleResult)){ if ($_POST['Salesperson']==$SalespersonRow['salesmancode']) { - echo '<option selected="True" value="' . $SalespersonRow['salesmancode'] . '">' . $SalespersonRow['salesmanname'] . '</option>'; + echo '<option selected="selected" value="' . $SalespersonRow['salesmancode'] . '">' . $SalespersonRow['salesmanname'] . '</option>'; } else { - echo '<option value="' . $SalespersonRow['salesmancode'] . '">' . $SalespersonRow['salesmanname'] . '</option>'; + echo '<option value="' . $SalespersonRow['salesmancode'] . '">' . $SalespersonRow['salesmanname'] . '</option>'; } } echo '</select></td>'; -echo '</tr></table><br /><div class="centre"><input tabindex="4" type="submit" name="ShowResults" value="' . _('Show Daily Sales For The Selected Month') . '" />'; -echo '</form></div>'; -echo '<br />'; +echo '</tr> + </table> + <br /> + <div class="centre"> + <input tabindex="4" type="submit" name="ShowResults" value="' . _('Show Daily Sales For The Selected Month') . '" /> + </div> + </form> + <br />'; /*Now get and display the sales data returned */ if (mb_strpos($EndDateSQL,'/')) { $Date_Array = explode('/',$EndDateSQL); @@ -90,33 +98,33 @@ $ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg($db); $SalesResult = DB_query($sql, $db,$ErrMsg); -echo '<table cellpadding="2" class="selection">'; +echo '<table class="selection"> + <tr> + <th style="width: 14%">' . _('Sunday') . '</th> + <th style="width: 14%">' . _('Monday') . '</th> + <th style="width: 14%">' . _('Tuesday') . '</th> + <th style="width: 14%">' . _('Wednesday') . '</th> + <th style="width: 14%">' . _('Thursday') . '</th> + <th style="width: 14%">' . _('Friday') . '</th> + <th style="width: 14%">' . _('Saturday') . '</th> + </tr>'; -echo'<tr> - <th style="width: 14%">' . _('Sunday') . '</th> - <th style="width: 14%">' . _('Monday') . '</th> - <th style="width: 14%">' . _('Tuesday') . '</th> - <th style="width: 14%">' . _('Wednesday') . '</th> - <th style="width: 14%">' . _('Thursday') . '</th> - <th style="width: 14%">' . _('Friday') . '</th> - <th style="width: 14%">' . _('Saturday') . '</th></tr>'; - $CumulativeTotalSales = 0; $CumulativeTotalCost = 0; $BilledDays = 0; $DaySalesArray = array(); while ($DaySalesRow=DB_fetch_array($SalesResult)) { - $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])] = new Cart; + if ($DaySalesRow['salesvalue'] > 0) { - $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]->Sales = $DaySalesRow['salesvalue']; + $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]['Sales'] = $DaySalesRow['salesvalue']; } else { - $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]->Sales = 0; - } + $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]['Sales'] = 0; + } if ($DaySalesRow['salesvalue'] > 0 ) { - $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]->GPPercent = ($DaySalesRow['salesvalue']-$DaySalesRow['cost'])/$DaySalesRow['salesvalue']; - } else { - $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]->GPPercent = 0; - } + $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]['GPPercent'] = ($DaySalesRow['salesvalue']-$DaySalesRow['cost'])/$DaySalesRow['salesvalue']; + } else { + $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]['GPPercent'] = 0; + } $BilledDays++; $CumulativeTotalSales += $DaySalesRow['salesvalue']; $CumulativeTotalCost += $DaySalesRow['cost']; @@ -130,8 +138,8 @@ $DayNumber = 1; /*Set up day number headings*/ for ($i=$ColumnCounter;$i<=6;$i++){ - echo '<th>' . $DayNumber . '</th>'; - $DayNumber++; + echo '<th>' . $DayNumber . '</th>'; + $DayNumber++; } echo '</tr><tr>'; for ($i=0;$i<$ColumnCounter;$i++){ @@ -142,20 +150,20 @@ for ($i=1;$i<=$LastDayOfMonth;$i++){ $ColumnCounter++; if(isset($DaySalesArray[$i])) { - echo '<td class="number" style="outline: 1px solid gray;">' . locale_money_format($DaySalesArray[$i]->Sales,$_SESSION['CompanyRecord']['currencydefault']) . '<br />' . locale_number_format($DaySalesArray[$i]->GPPercent*100,1) . '%</td>'; + echo '<td class="number" style="outline: 1px solid gray;">' . locale_money_format($DaySalesArray[$i]['Sales'],$_SESSION['CompanyRecord']['currencydefault']) . '<br />' . locale_number_format($DaySalesArray[$i]['GPPercent']*100,1) . '%</td>'; } else { echo '<td class="number" style="outline: 1px solid gray;">' . locale_money_format(0,$_SESSION['CompanyRecord']['currencydefault']) . '<br />' . locale_number_format(0,1) . '%</td>'; } if ($ColumnCounter==7){ echo '</tr><tr>'; - for ($j=1;$j<=7;$j++){ - echo '<th>' . $DayNumber. '</th>'; - $DayNumber++; - if($DayNumber>$LastDayOfMonth){ - break; - } - } - echo '</tr><tr>'; + for ($j=1;$j<=7;$j++){ + echo '<th>' . $DayNumber. '</th>'; + $DayNumber++; + if($DayNumber>$LastDayOfMonth){ + break; + } + } + echo '</tr><tr>'; $ColumnCounter=0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-06-04 21:12:22
|
Revision: 8981 http://weberp.svn.sourceforge.net/weberp/?rev=8981&view=rev Author: tim_schofield Date: 2012-06-04 21:12:15 +0000 (Mon, 04 Jun 2012) Log Message: ----------- Correct output to stop at last day of month Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2012-06-04 20:36:02 UTC (rev 8980) +++ trunk/DailySalesInquiry.php 2012-06-04 21:12:15 UTC (rev 8981) @@ -148,27 +148,26 @@ $LastDayOfMonth = DayOfMonthFromSQLDate($EndDateSQL); for ($i=1;$i<=$LastDayOfMonth;$i++){ - $ColumnCounter++; - if(isset($DaySalesArray[$i])) { - echo '<td class="number" style="outline: 1px solid gray;">' . locale_money_format($DaySalesArray[$i]['Sales'],$_SESSION['CompanyRecord']['currencydefault']) . '<br />' . locale_number_format($DaySalesArray[$i]['GPPercent']*100,1) . '%</td>'; - } else { - echo '<td class="number" style="outline: 1px solid gray;">' . locale_money_format(0,$_SESSION['CompanyRecord']['currencydefault']) . '<br />' . locale_number_format(0,1) . '%</td>'; + $ColumnCounter++; + if(isset($DaySalesArray[$i])) { + echo '<td class="number" style="outline: 1px solid gray;">' . locale_money_format($DaySalesArray[$i]['Sales'],$_SESSION['CompanyRecord']['currencydefault']) . '<br />' . locale_number_format($DaySalesArray[$i]['GPPercent']*100,1) . '%</td>'; + } else { + echo '<td class="number" style="outline: 1px solid gray;">' . locale_money_format(0,$_SESSION['CompanyRecord']['currencydefault']) . '<br />' . locale_number_format(0,1) . '%</td>'; + } + if ($ColumnCounter==7){ + echo '</tr><tr>'; + for ($j=1;$j<=7;$j++){ + if($DayNumber>$LastDayOfMonth){ + break; + } + echo '<th>' . $DayNumber. '</th>'; + $DayNumber++; } - if ($ColumnCounter==7){ - echo '</tr><tr>'; - for ($j=1;$j<=7;$j++){ - echo '<th>' . $DayNumber. '</th>'; - $DayNumber++; - if($DayNumber>$LastDayOfMonth){ - break; - } - } - echo '</tr><tr>'; - $ColumnCounter=0; - } - - + echo '</tr><tr>'; + $ColumnCounter=0; + } } + if ($ColumnCounter!=0) { echo '</tr><tr>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-06-06 20:43:33
|
Revision: 8988 http://weberp.svn.sourceforge.net/weberp/?rev=8988&view=rev Author: tim_schofield Date: 2012-06-06 20:43:24 +0000 (Wed, 06 Jun 2012) Log Message: ----------- Correctly stop at the last day of the month Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2012-06-06 20:43:15 UTC (rev 8987) +++ trunk/DailySalesInquiry.php 2012-06-06 20:43:24 UTC (rev 8988) @@ -150,9 +150,9 @@ for ($i=1;$i<=$LastDayOfMonth;$i++){ $ColumnCounter++; if(isset($DaySalesArray[$i])) { - echo '<td class="number" style="outline: 1px solid gray;">' . locale_money_format($DaySalesArray[$i]['Sales'],$_SESSION['CompanyRecord']['currencydefault']) . '<br />' . locale_number_format($DaySalesArray[$i]['GPPercent']*100,1) . '%</td>'; + echo '<td class="number" style="border: 1px solid gray;border-radius: 3px;">' . locale_money_format($DaySalesArray[$i]['Sales'],$_SESSION['CompanyRecord']['currencydefault']) . '<br />' . locale_number_format($DaySalesArray[$i]['GPPercent']*100,1) . '%</td>'; } else { - echo '<td class="number" style="outline: 1px solid gray;">' . locale_money_format(0,$_SESSION['CompanyRecord']['currencydefault']) . '<br />' . locale_number_format(0,1) . '%</td>'; + echo '<td class="number" style="border: 1px solid gray;border-radius: 3px;">' . locale_money_format(0,$_SESSION['CompanyRecord']['currencydefault']) . '<br />' . locale_number_format(0,1) . '%</td>'; } if ($ColumnCounter==7){ echo '</tr><tr>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-06-30 10:52:10
|
Revision: 9307 http://weberp.svn.sourceforge.net/weberp/?rev=9307&view=rev Author: tim_schofield Date: 2012-06-30 10:52:04 +0000 (Sat, 30 Jun 2012) Log Message: ----------- Provide event handler for new Ajax functionality Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2012-06-30 10:51:49 UTC (rev 9306) +++ trunk/DailySalesInquiry.php 2012-06-30 10:52:04 UTC (rev 9307) @@ -10,7 +10,7 @@ echo '<div class="page_help_text">' . _('Select the month to show daily sales for') . '</div> <br />'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (!isset($_POST['MonthToShow'])){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-06 09:17:23
|
Revision: 9586 http://weberp.svn.sourceforge.net/weberp/?rev=9586&view=rev Author: tim_schofield Date: 2012-09-06 09:17:13 +0000 (Thu, 06 Sep 2012) Log Message: ----------- Improvements for new layout Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2012-09-06 09:17:01 UTC (rev 9585) +++ trunk/DailySalesInquiry.php 2012-09-06 09:17:13 UTC (rev 9586) @@ -6,10 +6,6 @@ $title = _('Daily Sales Inquiry'); include('includes/header.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Daily Sales') . '" alt="" />' . ' ' . _('Daily Sales') . '</p>'; -echo '<div class="page_help_text">' . _('Select the month to show daily sales for') . '</div> - <br />'; - echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -20,8 +16,15 @@ $EndDateSQL = $myrow['lastdate_in_period']; } -echo '<table class="selection"> - <tr> +echo '<table class="selection">'; + +echo '<tr> + <th class="header" colspan="4"> + <img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Select the month to show daily sales for') . '" alt="" />' . ' ' . _('Select the month to show daily sales for') . ' + </th> + </tr>'; + +echo '<tr> <td>' . _('Month to Show') . ':</td> <td><select tabindex="1" name="MonthToShow" onChange="ReloadForm(ShowResults)">'; @@ -58,12 +61,10 @@ echo '</tr> </table> - <br /> <div class="centre"> <button tabindex="4" type="submit" name="ShowResults">' . _('Show Daily Sales For The Selected Month') . '</button> </div> - </form> - <br />'; + </form>'; /*Now get and display the sales data returned */ if (mb_strpos($EndDateSQL,'/')) { $Date_Array = explode('/',$EndDateSQL); @@ -100,6 +101,11 @@ echo '<table class="selection"> <tr> + <th class="header" colspan="7"> + <img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Daily Sales For') . ' ' . MonthAndYearFromSQLDate($EndDateSQL) . '" alt="" />' . _('Daily Sales For') . ' ' . MonthAndYearFromSQLDate($EndDateSQL) . ' + </th> + </tr> + <tr> <th style="width: 14%">' . _('Sunday') . '</th> <th style="width: 14%">' . _('Monday') . '</th> <th style="width: 14%">' . _('Tuesday') . '</th> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |