From: <te...@us...> - 2012-05-03 08:37:01
|
Revision: 5310 http://web-erp.svn.sourceforge.net/web-erp/?rev=5310&view=rev Author: tehonu Date: 2012-05-03 08:36:51 +0000 (Thu, 03 May 2012) Log Message: ----------- Order By changed to Category Description Modified Paths: -------------- trunk/InventoryValuation.php Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2012-05-02 09:34:07 UTC (rev 5309) +++ trunk/InventoryValuation.php 2012-05-03 08:36:51 UTC (rev 5310) @@ -216,7 +216,7 @@ $sql="SELECT categoryid, categorydescription FROM stockcategory - ORDER BY categoryid"; + ORDER BY categorydescription"; $CatResult= DB_query($sql,$db); While ($myrow = DB_fetch_array($CatResult)){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2012-05-03 08:37:05
|
Revision: 5310 http://web-erp.svn.sourceforge.net/web-erp/?rev=5310&view=rev Author: tehonu Date: 2012-05-03 08:36:51 +0000 (Thu, 03 May 2012) Log Message: ----------- Order By changed to Category Description Modified Paths: -------------- trunk/InventoryValuation.php Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2012-05-02 09:34:07 UTC (rev 5309) +++ trunk/InventoryValuation.php 2012-05-03 08:36:51 UTC (rev 5310) @@ -216,7 +216,7 @@ $sql="SELECT categoryid, categorydescription FROM stockcategory - ORDER BY categoryid"; + ORDER BY categorydescription"; $CatResult= DB_query($sql,$db); While ($myrow = DB_fetch_array($CatResult)){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-06-12 10:08:46
|
Revision: 5436 http://web-erp.svn.sourceforge.net/web-erp/?rev=5436&view=rev Author: tim_schofield Date: 2012-06-12 10:08:35 +0000 (Tue, 12 Jun 2012) Log Message: ----------- Fix sql to search on description range rateh than id range Modified Paths: -------------- trunk/InventoryValuation.php Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2012-06-10 03:44:49 UTC (rev 5435) +++ trunk/InventoryValuation.php 2012-06-12 10:08:35 UTC (rev 5436) @@ -46,8 +46,8 @@ stockmaster.stockid, stockmaster.description HAVING SUM(locstock.quantity)!=0 - AND stockmaster.categoryid >= '" . $_POST['FromCriteria'] . "' - AND stockmaster.categoryid <= '" . $_POST['ToCriteria'] . "' + AND stockcategory.categorydescription >= '" . $_POST['FromCriteria'] . "' + AND stockcategory.categorydescription <= '" . $_POST['ToCriteria'] . "' ORDER BY stockmaster.categoryid, stockmaster.stockid"; } else { @@ -66,8 +66,8 @@ WHERE stockmaster.stockid=locstock.stockid AND stockmaster.categoryid=stockcategory.categoryid AND locstock.quantity!=0 - AND stockmaster.categoryid >= '" . $_POST['FromCriteria'] . "' - AND stockmaster.categoryid <= '" . $_POST['ToCriteria'] . "' + AND stockcategory.categorydescription >= '" . $_POST['FromCriteria'] . "' + AND stockcategory.categorydescription <= '" . $_POST['ToCriteria'] . "' AND locstock.loccode = '" . $_POST['Location'] . "' ORDER BY stockmaster.categoryid, stockmaster.stockid"; @@ -148,7 +148,7 @@ $LeftOvers = $pdf->addTextWrap(360,$YPos,60,$FontSize,$DisplayQtyOnHand,'right'); $LeftOvers = $pdf->addTextWrap(423,$YPos,15,$FontSize,$InventoryValn['units'],'left'); $LeftOvers = $pdf->addTextWrap(438,$YPos,60,$FontSize,$DisplayUnitCost, 'right'); - + $LeftOvers = $pdf->addTextWrap(500,$YPos,60,$FontSize,$DisplayItemTotal, 'right'); } $Tot_Val += $InventoryValn['itemtotal']; @@ -168,7 +168,7 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200-$Left_Margin,$FontSize, _('Total for') . ' ' . $Category . ' - ' . $CategoryName, 'left'); } $DisplayCatTotVal = locale_number_format($CatTot_Val,$_SESSION['CompanyRecord']['decimalplaces']); - + $LeftOvers = $pdf->addTextWrap(480,$YPos,80,$FontSize,$DisplayCatTotVal, 'right'); $DisplayCatTotQty = locale_number_format($CatTot_Qty,2); $LeftOvers = $pdf->addTextWrap(360,$YPos,60,$FontSize,$DisplayCatTotQty, 'right'); @@ -213,14 +213,14 @@ <td>' . _('From Inventory Category Code') . ':</td> <td><select name="FromCriteria">'; - $sql="SELECT categoryid, - categorydescription - FROM stockcategory + $sql="SELECT categoryid, + categorydescription + FROM stockcategory ORDER BY categorydescription"; - + $CatResult= DB_query($sql,$db); While ($myrow = DB_fetch_array($CatResult)){ - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . ' - ' . $myrow['categoryid'] . '</option>'; + echo '<option value="' . $myrow['categorydescription'] . '">' . $myrow['categorydescription'] . ' - ' . $myrow['categoryid'] . '</option>'; } echo '</select></td> </tr>'; @@ -233,7 +233,7 @@ DB_data_seek($CatResult,0); While ($myrow = DB_fetch_array($CatResult)){ - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . ' - ' . $myrow['categoryid'] . '</option>'; + echo '<option value="' . $myrow['categorydescription'] . '">' . $myrow['categorydescription'] . ' - ' . $myrow['categoryid'] . '</option>'; } echo '</select></td> </tr>'; @@ -241,11 +241,11 @@ echo '<tr> <td>' . _('For Inventory in Location') . ':</td> <td><select name="Location">'; - - $sql = "SELECT loccode, - locationname + + $sql = "SELECT loccode, + locationname FROM locations"; - + $LocnResult=DB_query($sql,$db); echo '<option value="All">' . _('All Locations') . '</option>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-06-12 10:08:46
|
Revision: 5436 http://web-erp.svn.sourceforge.net/web-erp/?rev=5436&view=rev Author: tim_schofield Date: 2012-06-12 10:08:35 +0000 (Tue, 12 Jun 2012) Log Message: ----------- Fix sql to search on description range rateh than id range Modified Paths: -------------- trunk/InventoryValuation.php Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2012-06-10 03:44:49 UTC (rev 5435) +++ trunk/InventoryValuation.php 2012-06-12 10:08:35 UTC (rev 5436) @@ -46,8 +46,8 @@ stockmaster.stockid, stockmaster.description HAVING SUM(locstock.quantity)!=0 - AND stockmaster.categoryid >= '" . $_POST['FromCriteria'] . "' - AND stockmaster.categoryid <= '" . $_POST['ToCriteria'] . "' + AND stockcategory.categorydescription >= '" . $_POST['FromCriteria'] . "' + AND stockcategory.categorydescription <= '" . $_POST['ToCriteria'] . "' ORDER BY stockmaster.categoryid, stockmaster.stockid"; } else { @@ -66,8 +66,8 @@ WHERE stockmaster.stockid=locstock.stockid AND stockmaster.categoryid=stockcategory.categoryid AND locstock.quantity!=0 - AND stockmaster.categoryid >= '" . $_POST['FromCriteria'] . "' - AND stockmaster.categoryid <= '" . $_POST['ToCriteria'] . "' + AND stockcategory.categorydescription >= '" . $_POST['FromCriteria'] . "' + AND stockcategory.categorydescription <= '" . $_POST['ToCriteria'] . "' AND locstock.loccode = '" . $_POST['Location'] . "' ORDER BY stockmaster.categoryid, stockmaster.stockid"; @@ -148,7 +148,7 @@ $LeftOvers = $pdf->addTextWrap(360,$YPos,60,$FontSize,$DisplayQtyOnHand,'right'); $LeftOvers = $pdf->addTextWrap(423,$YPos,15,$FontSize,$InventoryValn['units'],'left'); $LeftOvers = $pdf->addTextWrap(438,$YPos,60,$FontSize,$DisplayUnitCost, 'right'); - + $LeftOvers = $pdf->addTextWrap(500,$YPos,60,$FontSize,$DisplayItemTotal, 'right'); } $Tot_Val += $InventoryValn['itemtotal']; @@ -168,7 +168,7 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200-$Left_Margin,$FontSize, _('Total for') . ' ' . $Category . ' - ' . $CategoryName, 'left'); } $DisplayCatTotVal = locale_number_format($CatTot_Val,$_SESSION['CompanyRecord']['decimalplaces']); - + $LeftOvers = $pdf->addTextWrap(480,$YPos,80,$FontSize,$DisplayCatTotVal, 'right'); $DisplayCatTotQty = locale_number_format($CatTot_Qty,2); $LeftOvers = $pdf->addTextWrap(360,$YPos,60,$FontSize,$DisplayCatTotQty, 'right'); @@ -213,14 +213,14 @@ <td>' . _('From Inventory Category Code') . ':</td> <td><select name="FromCriteria">'; - $sql="SELECT categoryid, - categorydescription - FROM stockcategory + $sql="SELECT categoryid, + categorydescription + FROM stockcategory ORDER BY categorydescription"; - + $CatResult= DB_query($sql,$db); While ($myrow = DB_fetch_array($CatResult)){ - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . ' - ' . $myrow['categoryid'] . '</option>'; + echo '<option value="' . $myrow['categorydescription'] . '">' . $myrow['categorydescription'] . ' - ' . $myrow['categoryid'] . '</option>'; } echo '</select></td> </tr>'; @@ -233,7 +233,7 @@ DB_data_seek($CatResult,0); While ($myrow = DB_fetch_array($CatResult)){ - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . ' - ' . $myrow['categoryid'] . '</option>'; + echo '<option value="' . $myrow['categorydescription'] . '">' . $myrow['categorydescription'] . ' - ' . $myrow['categoryid'] . '</option>'; } echo '</select></td> </tr>'; @@ -241,11 +241,11 @@ echo '<tr> <td>' . _('For Inventory in Location') . ':</td> <td><select name="Location">'; - - $sql = "SELECT loccode, - locationname + + $sql = "SELECT loccode, + locationname FROM locations"; - + $LocnResult=DB_query($sql,$db); echo '<option value="All">' . _('All Locations') . '</option>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2012-06-14 08:05:22
|
Revision: 5437 http://web-erp.svn.sourceforge.net/web-erp/?rev=5437&view=rev Author: tehonu Date: 2012-06-14 08:05:15 +0000 (Thu, 14 Jun 2012) Log Message: ----------- Change ORDER BY to be consistent with stock category description selection Modified Paths: -------------- trunk/InventoryValuation.php Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2012-06-12 10:08:35 UTC (rev 5436) +++ trunk/InventoryValuation.php 2012-06-14 08:05:15 UTC (rev 5437) @@ -48,7 +48,7 @@ HAVING SUM(locstock.quantity)!=0 AND stockcategory.categorydescription >= '" . $_POST['FromCriteria'] . "' AND stockcategory.categorydescription <= '" . $_POST['ToCriteria'] . "' - ORDER BY stockmaster.categoryid, + ORDER BY stockcategory.categorydescription, stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.categoryid, @@ -69,7 +69,7 @@ AND stockcategory.categorydescription >= '" . $_POST['FromCriteria'] . "' AND stockcategory.categorydescription <= '" . $_POST['ToCriteria'] . "' AND locstock.loccode = '" . $_POST['Location'] . "' - ORDER BY stockmaster.categoryid, + ORDER BY stockcategory.categorydescription, stockmaster.stockid"; } $InventoryResult = DB_query($SQL,$db,'','',false,true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2012-06-14 08:05:25
|
Revision: 5437 http://web-erp.svn.sourceforge.net/web-erp/?rev=5437&view=rev Author: tehonu Date: 2012-06-14 08:05:15 +0000 (Thu, 14 Jun 2012) Log Message: ----------- Change ORDER BY to be consistent with stock category description selection Modified Paths: -------------- trunk/InventoryValuation.php Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2012-06-12 10:08:35 UTC (rev 5436) +++ trunk/InventoryValuation.php 2012-06-14 08:05:15 UTC (rev 5437) @@ -48,7 +48,7 @@ HAVING SUM(locstock.quantity)!=0 AND stockcategory.categorydescription >= '" . $_POST['FromCriteria'] . "' AND stockcategory.categorydescription <= '" . $_POST['ToCriteria'] . "' - ORDER BY stockmaster.categoryid, + ORDER BY stockcategory.categorydescription, stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.categoryid, @@ -69,7 +69,7 @@ AND stockcategory.categorydescription >= '" . $_POST['FromCriteria'] . "' AND stockcategory.categorydescription <= '" . $_POST['ToCriteria'] . "' AND locstock.loccode = '" . $_POST['Location'] . "' - ORDER BY stockmaster.categoryid, + ORDER BY stockcategory.categorydescription, stockmaster.stockid"; } $InventoryResult = DB_query($SQL,$db,'','',false,true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2014-01-13 05:31:13
|
Revision: 6536 http://sourceforge.net/p/web-erp/reponame/6536 Author: daintree Date: 2014-01-13 05:31:11 +0000 (Mon, 13 Jan 2014) Log Message: ----------- Tim: typo on InventoryValuation.php Modified Paths: -------------- trunk/InventoryValuation.php Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2014-01-12 02:35:26 UTC (rev 6535) +++ trunk/InventoryValuation.php 2014-01-13 05:31:11 UTC (rev 6536) @@ -208,7 +208,7 @@ } header('Content-Encoding: UTF-8'); header('Content-type: text/csv; charset=UTF-8'); - header("Content-disposition: attachment; filename=InventoryValuation_Categories_" . $_POST['FromCriteria'] . '-' . $_POST['Toriteria'] .'.csv'); + header("Content-disposition: attachment; filename=InventoryValuation_Categories_" . $_POST['FromCriteria'] . '-' . $_POST['ToCriteria'] .'.csv'); header("Pragma: public"); header("Expires: 0"); echo "\xEF\xBB\xBF"; // UTF-8 BOM |
From: <ex...@us...> - 2014-08-28 15:15:39
|
Revision: 6848 http://sourceforge.net/p/web-erp/reponame/6848 Author: exsonqu Date: 2014-08-28 15:15:31 +0000 (Thu, 28 Aug 2014) Log Message: ----------- 28/08/2014 Exson: Fixed the csv file aligned abnormal when there are commas in fields strings. Modified Paths: -------------- trunk/InventoryValuation.php Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2014-08-28 05:26:07 UTC (rev 6847) +++ trunk/InventoryValuation.php 2014-08-28 15:15:31 UTC (rev 6848) @@ -206,7 +206,8 @@ $CSVListing = _('Category ID') .','. _('Category Description') .','. _('Stock ID') .','. _('Description') .','. _('Decimal Places') .','. _('Qty On Hand') .','. _('Units') .','. _('Unit Cost') .','. _('Total') . "\n"; while ($InventoryValn = DB_fetch_row($InventoryResult, $db)) { - $CSVListing .= implode(',', $InventoryValn) . "\n"; + $CSVListing .= '"'; + $CSVListing .= implode('","', $InventoryValn) . '"' . "\n"; } header('Content-Encoding: UTF-8'); header('Content-type: text/csv; charset=UTF-8'); @@ -301,4 +302,4 @@ include('includes/footer.inc'); } /*end of else not PrintPDF */ -?> \ No newline at end of file +?> |
From: <te...@us...> - 2015-08-10 01:43:48
|
Revision: 7336 http://sourceforge.net/p/web-erp/reponame/7336 Author: tehonu Date: 2015-08-10 01:43:46 +0000 (Mon, 10 Aug 2015) Log Message: ----------- Added ORBER BY clause Modified Paths: -------------- trunk/InventoryValuation.php Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2015-08-05 02:41:53 UTC (rev 7335) +++ trunk/InventoryValuation.php 2015-08-10 01:43:46 UTC (rev 7336) @@ -247,7 +247,8 @@ $sql = "SELECT locations.loccode, locationname FROM locations - INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1"; + INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1 + ORDER BY locationname"; $LocnResult=DB_query($sql); |