Thread: [Weberp-svn] SF.net SVN: weberp:[4051] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-01-08 15:01:39
|
Revision: 4051 http://weberp.svn.sourceforge.net/weberp/?rev=4051&view=rev Author: tim_schofield Date: 2011-01-08 15:01:33 +0000 (Sat, 08 Jan 2011) Log Message: ----------- Correct the quotes in the sql literals Modified Paths: -------------- trunk/Z_ReApplyCostToSA.php trunk/Z_RePostGLFromPeriod.php Modified: trunk/Z_ReApplyCostToSA.php =================================================================== --- trunk/Z_ReApplyCostToSA.php 2011-01-08 15:01:21 UTC (rev 4050) +++ trunk/Z_ReApplyCostToSA.php 2011-01-08 15:01:33 UTC (rev 4051) @@ -13,10 +13,10 @@ echo "<form method='POST' action='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>"; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -$SQL = 'SELECT MonthName(lastdate_in_period) AS mnth, +$SQL = "SELECT MonthName(lastdate_in_period) AS mnth, YEAR(lastdate_in_period) AS yr, periodno - FROM periods'; + FROM periods"; echo '<p><div class="centre">' . _('Select the Period to update the costs for') . ":<select name='PeriodNo'>"; $result = DB_query($SQL,$db); @@ -34,12 +34,12 @@ echo '</form>'; if (isset($_POST['UpdateSalesAnalysis']) AND $_POST['PeriodNo']!=0){ - $sql = 'SELECT stockmaster.stockid, + $sql = "SELECT stockmaster.stockid, materialcost+overheadcost+labourcost AS standardcost, stockmaster.mbflag FROM salesanalysis INNER JOIN stockmaster ON salesanalysis.stockid=stockmaster.stockid - WHERE periodno=' . $_POST['PeriodNo'] . " + WHERE periodno='" . $_POST['PeriodNo'] . "' AND stockmaster.mbflag<>'D' GROUP BY stockmaster.stockid, stockmaster.materialcost, Modified: trunk/Z_RePostGLFromPeriod.php =================================================================== --- trunk/Z_RePostGLFromPeriod.php 2011-01-08 15:01:21 UTC (rev 4050) +++ trunk/Z_RePostGLFromPeriod.php 2011-01-08 15:01:33 UTC (rev 4051) @@ -19,9 +19,9 @@ <td>' . _('Select Period From') . ":</td> <td><select Name='FromPeriod'>"; - $sql = 'SELECT periodno, + $sql = "SELECT periodno, lastdate_in_period - FROM periods ORDER BY periodno'; + FROM periods ORDER BY periodno"; $Periods = DB_query($sql,$db); while ($myrow=DB_fetch_array($Periods,$db)){ @@ -46,7 +46,7 @@ $sql = 'UPDATE chartdetails SET actual =0 WHERE period >= ' . $_POST['FromPeriod']; $UpdActualChartDetails = DB_query($sql,$db); - $ChartDetailBFwdResult = DB_query('SELECT accountcode, bfwd FROM chartdetails WHERE period=' . $_POST['FromPeriod'],$db); + $ChartDetailBFwdResult = DB_query("SELECT accountcode, bfwd FROM chartdetails WHERE period='" . $_POST['FromPeriod'] . "'",$db); while ($ChartRow=DB_fetch_array($ChartDetailBFwdResult)){ $sql = 'UPDATE chartdetails SET bfwd =' . $ChartRow['bfwd'] . ' WHERE period > ' . $_POST['FromPeriod'] . ' AND accountcode=' . $ChartRow['accountcode']; $UpdActualChartDetails = DB_query($sql,$db); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-01-08 17:17:45
|
Revision: 4098 http://weberp.svn.sourceforge.net/weberp/?rev=4098&view=rev Author: tim_schofield Date: 2011-01-08 17:17:37 +0000 (Sat, 08 Jan 2011) Log Message: ----------- Correct the quotes in the sql literals Modified Paths: -------------- trunk/StockQuantityByDate.php trunk/includes/footer.inc Modified: trunk/StockQuantityByDate.php =================================================================== --- trunk/StockQuantityByDate.php 2011-01-08 17:17:26 UTC (rev 4097) +++ trunk/StockQuantityByDate.php 2011-01-08 17:17:37 UTC (rev 4098) @@ -16,7 +16,7 @@ echo "<form action='" . $_SERVER['PHP_SELF'] . "?". SID . "' method=post>"; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -$sql = 'SELECT categoryid, categorydescription FROM stockcategory'; +$sql = "SELECT categoryid, categorydescription FROM stockcategory"; $resultStkLocs = DB_query($sql, $db); echo '<table class=selection><tr>'; @@ -36,7 +36,7 @@ } echo '</select></td>'; -$sql = 'SELECT loccode, locationname FROM locations'; +$sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql, $db); echo '<td>' . _('For Stock Location') . ":</td> Modified: trunk/includes/footer.inc =================================================================== --- trunk/includes/footer.inc 2011-01-08 17:17:26 UTC (rev 4097) +++ trunk/includes/footer.inc 2011-01-08 17:17:37 UTC (rev 4098) @@ -28,7 +28,7 @@ echo '<tr><td class="footer">webERP v' . $_SESSION['VersionNumber'] . ' ' . _('Copyright') . ' © weberp.org - '.date('Y').'</td></tr>'; if(http_file_exists('http://sflogo.sourceforge.net/sflogo.php')) { -// echo '<tr><td class="footer"><a href="https://sourceforge.net/projects/web-erp"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=70949&type=12" width="120" height="30" border="0" alt="Get webERP web-based ERP Accounting at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a></td></tr>'; + echo '<tr><td class="footer"><a href="https://sourceforge.net/projects/weberp"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=391629&type=12" width="120" height="30" border="0" alt="Get webERP web-based ERP Accounting at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a></td></tr>'; } echo '</table>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-01-08 17:19:14
|
Revision: 4107 http://weberp.svn.sourceforge.net/weberp/?rev=4107&view=rev Author: tim_schofield Date: 2011-01-08 17:19:09 +0000 (Sat, 08 Jan 2011) Log Message: ----------- Correct the quotes in the sql literals Modified Paths: -------------- trunk/SMTPServer.php trunk/StockAdjustments.php Modified: trunk/SMTPServer.php =================================================================== --- trunk/SMTPServer.php 2011-01-08 17:18:57 UTC (rev 4106) +++ trunk/SMTPServer.php 2011-01-08 17:19:09 UTC (rev 4107) @@ -24,7 +24,7 @@ echo '<br>'; } -$sql='SELECT id, +$sql="SELECT id, host, port, heloaddress, @@ -32,7 +32,7 @@ password, timeout, auth - FROM emailsettings'; + FROM emailsettings"; $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2011-01-08 17:18:57 UTC (rev 4106) +++ trunk/StockAdjustments.php 2011-01-08 17:19:09 UTC (rev 4107) @@ -55,9 +55,9 @@ '" alt="" />' . ' ' . _('Select Item to Adjust') . '</p>'; if (strlen($_POST['StockText'])>0) { - $sql='SELECT stockid, description from stockmaster where description like "%'.$_POST['StockText'].'%"'; + $sql="SELECT stockid, description from stockmaster where description like '%".$_POST['StockText']."%'"; } else { - $sql='SELECT stockid, description from stockmaster where stockid like "%'.$_POST['StockCode'].'%"'; + $sql="SELECT stockid, description from stockmaster where stockid like '%".$_POST['StockCode']."%'"; } $ErrMsg=_('The stock information cannot be retrieved because'); $DbgMsg=_('The SQL to get the stock description was'); @@ -339,7 +339,7 @@ echo '<tr><td>'. _('Adjustment to Stock At Location').':</td><td><select name="StockLocation"> '; -$sql = 'SELECT loccode, locationname FROM locations'; +$sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql,$db); while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_SESSION['Adjustment']->StockLocation)){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-01-08 20:12:25
|
Revision: 4118 http://weberp.svn.sourceforge.net/weberp/?rev=4118&view=rev Author: tim_schofield Date: 2011-01-08 20:12:19 +0000 (Sat, 08 Jan 2011) Log Message: ----------- Correct the quotes in the sql literals Modified Paths: -------------- trunk/SalesTypes.php trunk/SelectAsset.php Modified: trunk/SalesTypes.php =================================================================== --- trunk/SalesTypes.php 2011-01-08 20:12:04 UTC (rev 4117) +++ trunk/SalesTypes.php 2011-01-08 20:12:19 UTC (rev 4118) @@ -181,7 +181,7 @@ links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - $sql = 'SELECT * FROM salestypes'; + $sql = "SELECT * FROM salestypes"; $result = DB_query($sql,$db); echo '<table class=selection>'; Modified: trunk/SelectAsset.php =================================================================== --- trunk/SelectAsset.php 2011-01-08 20:12:04 UTC (rev 4117) +++ trunk/SelectAsset.php 2011-01-08 20:12:19 UTC (rev 4118) @@ -27,10 +27,10 @@ $_POST['AssetCode'] = trim(strtoupper($_POST['AssetCode'])); } // Always show the search facilities -$SQL = 'SELECT categoryid, +$SQL = "SELECT categoryid, categorydescription FROM fixedassetcategories - ORDER BY categorydescription'; + ORDER BY categorydescription"; $result = DB_query($SQL, $db); if (DB_num_rows($result) == 0) { echo '<p><font size=4 color=red>' . _('Problem Report') . ':</font><br>' . _('There are no asset categories currently defined please use the link below to set them up'); @@ -79,7 +79,7 @@ } else { echo '<option value="ALL">' . _('Any asset location') . '</option>'; } -$result = DB_query('SELECT locationid, locationdescription FROM fixedassetlocations',$db); +$result = DB_query("SELECT locationid, locationdescription FROM fixedassetlocations",$db); while ($myrow = DB_fetch_array($result)) { if ($myrow['locationid'] == $_POST['AssetLocation']) { @@ -113,12 +113,12 @@ if ($_POST['Keywords'] AND $_POST['AssetCode']) { prnMsg( _('Asset description keywords have been used in preference to the asset code extract entered'), 'info' ); } - $SQL = 'SELECT assetid, + $SQL = "SELECT assetid, description, datepurchased, fixedassetlocations.locationdescription FROM fixedassets INNER JOIN fixedassetlocations - ON fixedassets.assetlocation=fixedassetlocations.locationid '; + ON fixedassets.assetlocation=fixedassetlocations.locationid "; if ($_POST['Keywords']) { //insert wildcard characters in spaces This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sot...@us...> - 2011-01-09 11:01:37
|
Revision: 4187 http://weberp.svn.sourceforge.net/weberp/?rev=4187&view=rev Author: sotandeka Date: 2011-01-09 11:01:31 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Correct the quotes in SQL literals Modified Paths: -------------- trunk/BOMIndented.php trunk/BOMIndentedReverse.php Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2011-01-09 11:00:48 UTC (rev 4186) +++ trunk/BOMIndented.php 2011-01-09 11:01:31 UTC (rev 4187) @@ -17,19 +17,19 @@ $PageNumber=1; $line_height=12; - $sql = 'DROP TABLE IF EXISTS tempbom'; + $sql = "DROP TABLE IF EXISTS tempbom"; $result = DB_query($sql,$db); - $sql = 'DROP TABLE IF EXISTS passbom'; + $sql = "DROP TABLE IF EXISTS passbom"; $result = DB_query($sql,$db); - $sql = 'DROP TABLE IF EXISTS passbom2'; + $sql = "DROP TABLE IF EXISTS passbom2"; $result = DB_query($sql,$db); - $sql = 'CREATE TEMPORARY TABLE passbom ( + $sql = "CREATE TEMPORARY TABLE passbom ( part char(20), - sortpart text)'; + sortpart text)"; $ErrMsg = _('The SQL to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); - $sql = 'CREATE TEMPORARY TABLE tempbom ( + $sql = "CREATE TEMPORARY TABLE tempbom ( parent char(20), component char(20), sortpart text, @@ -38,7 +38,7 @@ loccode char(5), effectiveafter date, effectiveto date, - quantity double)'; + quantity double)"; $result = DB_query($sql,$db,_('Create of tempbom failed because')); // First, find first level of components below requested assembly // Put those first level parts in passbom, use COMPONENT in passbom @@ -46,11 +46,11 @@ // those parts into tempbom // This finds the top level - $sql = 'INSERT INTO passbom (part, sortpart) + $sql = "INSERT INTO passbom (part, sortpart) SELECT bom.component AS part, CONCAT(bom.parent,bom.component) AS sortpart FROM bom - WHERE bom.parent =' . "'" . $_POST['Part'] . "' + WHERE bom.parent =" . "'" . $_POST['Part'] . "' AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW()"; $result = DB_query($sql,$db); @@ -112,18 +112,18 @@ AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW()"; $result = DB_query($sql,$db); - $sql = 'DROP TABLE IF EXISTS passbom2'; + $sql = "DROP TABLE IF EXISTS passbom2"; $result = DB_query($sql,$db); - $sql = 'ALTER TABLE passbom RENAME AS passbom2'; + $sql = "ALTER TABLE passbom RENAME AS passbom2"; $result = DB_query($sql,$db); - $sql = 'DROP TABLE IF EXISTS passbom'; + $sql = "DROP TABLE IF EXISTS passbom"; $result = DB_query($sql,$db); - $sql = 'CREATE TEMPORARY TABLE passbom ( + $sql = "CREATE TEMPORARY TABLE passbom ( part char(20), - sortpart text)'; + sortpart text)"; $result = DB_query($sql,$db); @@ -136,7 +136,7 @@ $result = DB_query($sql,$db); - $sql = 'SELECT COUNT(*) FROM bom,passbom WHERE bom.parent = passbom.part'; + $sql = "SELECT COUNT(*) FROM bom,passbom WHERE bom.parent = passbom.part"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -158,10 +158,10 @@ } - $sql = 'SELECT stockmaster.stockid, + $sql = "SELECT stockmaster.stockid, stockmaster.description FROM stockmaster - WHERE stockid = ' . "'" . $_POST['Part'] . "'"; + WHERE stockid = " . "'" . $_POST['Part'] . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_array($result,$db); $assembly = $_POST['Part']; @@ -171,12 +171,12 @@ $Right_Margin,$assemblydesc); $Tot_Val=0; - $sql = 'SELECT tempbom.*, + $sql = "SELECT tempbom.*, stockmaster.description, stockmaster.mbflag FROM tempbom,stockmaster WHERE tempbom.component = stockmaster.stockid - ORDER BY sortpart'; + ORDER BY sortpart"; $result = DB_query($sql,$db); // $fill is used to alternate between lines with transparent and painted background Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2011-01-09 11:00:48 UTC (rev 4186) +++ trunk/BOMIndentedReverse.php 2011-01-09 11:01:31 UTC (rev 4187) @@ -18,19 +18,19 @@ $PageNumber=1; $line_height=12; - $sql = 'DROP TABLE IF EXISTS tempbom'; + $sql = "DROP TABLE IF EXISTS tempbom"; $result = DB_query($sql,$db); - $sql = 'DROP TABLE IF EXISTS passbom'; + $sql = "DROP TABLE IF EXISTS passbom"; $result = DB_query($sql,$db); - $sql = 'DROP TABLE IF EXISTS passbom2'; + $sql = "DROP TABLE IF EXISTS passbom2"; $result = DB_query($sql,$db); - $sql = 'CREATE TEMPORARY TABLE passbom ( + $sql = "CREATE TEMPORARY TABLE passbom ( part char(20), - sortpart text)'; + sortpart text)"; $ErrMsg = _('The SQL to to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); - $sql = 'CREATE TEMPORARY TABLE tempbom ( + $sql = "CREATE TEMPORARY TABLE tempbom ( parent char(20), component char(20), sortpart text, @@ -39,7 +39,7 @@ loccode char(5), effectiveafter date, effectiveto date, - quantity double)'; + quantity double)"; $result = DB_query($sql,$db,_('Create of tempbom failed because')); // First, find first level of components below requested assembly // Put those first level parts in passbom, use COMPONENT in passbom @@ -47,11 +47,11 @@ // those parts into tempbom // This finds the top level - $sql = 'INSERT INTO passbom (part, sortpart) + $sql = "INSERT INTO passbom (part, sortpart) SELECT bom.parent AS part, CONCAT(bom.component,bom.parent) AS sortpart FROM bom - WHERE bom.component =' . "'" . $_POST['Part'] . "' + WHERE bom.component =" . "'" . $_POST['Part'] . "' AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW()"; $result = DB_query($sql,$db); @@ -112,18 +112,18 @@ AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW()"; $result = DB_query($sql,$db); - $sql = 'DROP TABLE IF EXISTS passbom2'; + $sql = "DROP TABLE IF EXISTS passbom2"; $result = DB_query($sql,$db); - $sql = 'ALTER TABLE passbom RENAME AS passbom2'; + $sql = "ALTER TABLE passbom RENAME AS passbom2"; $result = DB_query($sql,$db); - $sql = 'DROP TABLE IF EXISTS passbom'; + $sql = "DROP TABLE IF EXISTS passbom"; $result = DB_query($sql,$db); - $sql = 'CREATE TEMPORARY TABLE passbom ( + $sql = "CREATE TEMPORARY TABLE passbom ( part char(20), - sortpart text)'; + sortpart text)"; $result = DB_query($sql,$db); @@ -136,7 +136,7 @@ $result = DB_query($sql,$db); - $sql = 'SELECT COUNT(*) FROM bom,passbom WHERE bom.component = passbom.part'; + $sql = "SELECT COUNT(*) FROM bom,passbom WHERE bom.component = passbom.part"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -157,10 +157,10 @@ } - $sql = 'SELECT stockmaster.stockid, + $sql = "SELECT stockmaster.stockid, stockmaster.description FROM stockmaster - WHERE stockid = ' . "'" . $_POST['Part'] . "'"; + WHERE stockid = " . "'" . $_POST['Part'] . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_array($result,$db); $assembly = $_POST['Part']; @@ -172,12 +172,12 @@ $Tot_Val=0; $fill = false; $pdf->SetFillColor(224,235,255); - $sql = 'SELECT tempbom.*, + $sql = "SELECT tempbom.*, stockmaster.description, stockmaster.mbflag FROM tempbom,stockmaster WHERE tempbom.parent = stockmaster.stockid - ORDER BY sortpart'; + ORDER BY sortpart"; $result = DB_query($sql,$db); $ListCount = DB_num_rows($result); // UldisN This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sot...@us...> - 2011-01-09 11:57:49
|
Revision: 4192 http://weberp.svn.sourceforge.net/weberp/?rev=4192&view=rev Author: sotandeka Date: 2011-01-09 11:57:43 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Correct the quotes in SQL literals Modified Paths: -------------- trunk/CustomerBranches.php trunk/CustomerInquiry.php trunk/CustomerReceipt.php Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-01-09 11:56:52 UTC (rev 4191) +++ trunk/CustomerBranches.php 2011-01-09 11:57:43 UTC (rev 4192) @@ -656,7 +656,7 @@ DB_data_seek($result,0); - $sql = 'SELECT areacode, areadescription FROM areas'; + $sql = "SELECT areacode, areadescription FROM areas"; $result = DB_query($sql,$db); if (DB_num_rows($result)==0){ echo '</table>'; @@ -682,7 +682,7 @@ echo '</select></td></tr>'; DB_data_seek($result,0); - $sql = 'SELECT loccode, locationname FROM locations'; + $sql = "SELECT loccode, locationname FROM locations"; $result = DB_query($sql,$db); if (DB_num_rows($result)==0){ @@ -749,7 +749,7 @@ DB_data_seek($result,0); - $sql = 'SELECT taxgroupid, taxgroupdescription FROM taxgroups'; + $sql = "SELECT taxgroupid, taxgroupdescription FROM taxgroups"; $result = DB_query($sql,$db); while ($myrow = DB_fetch_array($result)) { @@ -775,7 +775,7 @@ echo ' </select></td></tr>'; echo '<tr><td>'._('Default freight/shipper method').":</td><td><select tabindex=21 name='DefaultShipVia'>"; - $SQL = 'SELECT shipper_id, shippername FROM shippers'; + $SQL = "SELECT shipper_id, shippername FROM shippers"; $ShipperResults = DB_query($SQL,$db); while ($myrow=DB_fetch_array($ShipperResults)){ if (isset($_POST['DefaultShipVia'])and $myrow['shipper_id']==$_POST['DefaultShipVia']){ @@ -829,4 +829,4 @@ } //end if record deleted no point displaying form to add record include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2011-01-09 11:56:52 UTC (rev 4191) +++ trunk/CustomerInquiry.php 2011-01-09 11:57:43 UTC (rev 4192) @@ -26,16 +26,16 @@ } if (!isset($_POST['TransAfterDate'])) { - $sql = 'SELECT confvalue + $sql = "SELECT confvalue FROM `config` - WHERE confname ="NumberOfMonthMustBeShown"'; + WHERE confname ='NumberOfMonthMustBeShown'"; $ErrMsg=_('The config value NumberOfMonthMustBeShown cannot be retrieved'); $result = DB_query($sql,$db,$ErrMsg); $row = DB_fetch_array($result); $_POST['TransAfterDate'] = Date($_SESSION['DefaultDateFormat'],Mktime(0,0,0,Date('m')-$row['confvalue'],Date('d'),Date('Y'))); } -$SQL = 'SELECT debtorsmaster.name, +$SQL = "SELECT debtorsmaster.name, currencies.currency, paymentterms.terms, debtorsmaster.creditlimit, @@ -47,23 +47,23 @@ CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) >= paymentterms.daysbeforedue THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END ELSE - CASE WHEN TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, ' . INTERVAL('1', 'MONTH') . '), ' . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ')) >= 0 THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END + CASE WHEN TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ")) >= 0 THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END) AS due, SUM(CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue - AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + ' . - $_SESSION['PastDueDays1'] . ') + AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . + $_SESSION['PastDueDays1'] . ") THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END ELSE - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, ' . INTERVAL('1', 'MONTH') . '), ' . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ')) >= ' . $_SESSION['PastDueDays1'] . ') + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, ". INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ")) >= " . $_SESSION['PastDueDays1'] . ") THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END) AS overdue1, SUM(CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue - AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + ' . $_SESSION['PastDueDays2'] . ') THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END + AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays2'] . ") THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END ELSE - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, ' . INTERVAL('1','MONTH') . '), ' . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ')) >= ' . $_SESSION['PastDueDays2'] . ") THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1','MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ")) >= " . $_SESSION['PastDueDays2'] . ") THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END) AS overdue2 FROM debtorsmaster, paymentterms, Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-01-09 11:56:52 UTC (rev 4191) +++ trunk/CustomerReceipt.php 2011-01-09 11:57:43 UTC (rev 4192) @@ -605,7 +605,7 @@ unset($_SESSION['CustomerRecord']); } - $SQL = 'SELECT debtorsmaster.name, + $SQL = "SELECT debtorsmaster.name, debtorsmaster.pymtdiscount, debtorsmaster.currcode, currencies.currency, @@ -618,17 +618,17 @@ SUM(CASE WHEN paymentterms.daysbeforedue > 0 THEN CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) >= paymentterms.daysbeforedue THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END ELSE - CASE WHEN TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, ' . INTERVAL('1','MONTH') . '), ' . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ')) >= 0 THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END + CASE WHEN TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1','MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ")) >= 0 THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END) AS due, SUM(CASE WHEN paymentterms.daysbeforedue > 0 THEN - CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + ' . $_SESSION['PastDueDays1'] . ') THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight - debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END + CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight - debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END ELSE - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, ' . INTERVAL('1', 'MONTH') .'), ' . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ')) >= ' . $_SESSION['PastDueDays1'] . ') THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1', 'MONTH') ."), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ")) >= " . $_SESSION['PastDueDays1'] . ") THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END) AS overdue1, SUM(CASE WHEN paymentterms.daysbeforedue > 0 THEN - CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + ' . $_SESSION['PastDueDays2'] . ') THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END + CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays2'] . ") THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END ELSE - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, ' . INTERVAL('1','MONTH') . '), ' . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ')) >= ' . $_SESSION['PastDueDays2'] . ") THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1','MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ")) >= " . $_SESSION['PastDueDays2'] . ") THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END) AS overdue2 FROM debtorsmaster, paymentterms, @@ -760,7 +760,7 @@ $_SESSION['ReceiptBatch']->Currency=$_SESSION['CompanyRecord']['currencydefault']; } -$SQL = 'SELECT currency, currabrev, rate FROM currencies'; +$SQL = "SELECT currency, currabrev, rate FROM currencies"; $result=DB_query($SQL,$db); if (DB_num_rows($result)==0){ echo '</select></td></tr>'; @@ -938,10 +938,10 @@ //Select the tag echo '<tr><td>' . _('Select Tag') . ':</td><td><select name="tag">'; - $SQL = 'SELECT tagref, + $SQL = "SELECT tagref, tagdescription FROM tags - ORDER BY tagref'; + ORDER BY tagref"; $result=DB_query($SQL,$db); echo '<option value=0></option>'; @@ -957,7 +957,7 @@ /*now set up a GLCode field to select from avaialble GL accounts */ echo '<tr><td>' . _('GL Account') . ':</td><td><select tabindex=8 name="GLCode">'; - $SQL = 'SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode'; + $SQL = "SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode"; $result=DB_query($SQL,$db); if (DB_num_rows($result)==0){ echo '</select>' . _('No General ledger accounts have been set up yet') . ' - ' . _('receipts cannot be entered against GL accounts until the GL accounts are set up') . '</td></tr>'; @@ -1084,4 +1084,4 @@ echo '</form>'; 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: <sot...@us...> - 2011-01-09 12:12:40
|
Revision: 4193 http://weberp.svn.sourceforge.net/weberp/?rev=4193&view=rev Author: sotandeka Date: 2011-01-09 12:12:33 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Correct the quotes in SQL literals Modified Paths: -------------- trunk/COGSGLPostings.php trunk/ConfirmDispatch_Invoice.php trunk/CounterSales.php trunk/CreditStatus.php trunk/Currencies.php Modified: trunk/COGSGLPostings.php =================================================================== --- trunk/COGSGLPostings.php 2011-01-09 11:57:43 UTC (rev 4192) +++ trunk/COGSGLPostings.php 2011-01-09 12:12:33 UTC (rev 4193) @@ -76,14 +76,14 @@ $ShowLivePostingRecords = true; - $sql = 'SELECT cogsglpostings.id, + $sql = "SELECT cogsglpostings.id, cogsglpostings.area, cogsglpostings.stkcat, cogsglpostings.salestype, chartmaster.accountname FROM cogsglpostings LEFT JOIN chartmaster ON cogsglpostings.glcode = chartmaster.accountcode - WHERE chartmaster.accountcode IS NULL'; + WHERE chartmaster.accountcode IS NULL"; $result = DB_query($sql,$db); if (DB_num_rows($result)>0){ @@ -124,11 +124,11 @@ echo '</table>'; } - $sql = 'SELECT cogsglpostings.id, + $sql = "SELECT cogsglpostings.id, cogsglpostings.area, cogsglpostings.stkcat, cogsglpostings.salestype - FROM cogsglpostings'; + FROM cogsglpostings"; $result = DB_query($sql,$db); @@ -152,7 +152,7 @@ $result = DB_query($sql,$db); } - $sql = 'SELECT accountcode FROM chartmaster WHERE accountcode =1'; + $sql = "SELECT accountcode FROM chartmaster WHERE accountcode =1"; $result = DB_query($sql,$db); if (DB_num_rows($result)==0){ /* account number 1 is not used, so insert a new account */ @@ -182,14 +182,14 @@ } if ($ShowLivePostingRecords){ - $sql = 'SELECT cogsglpostings.id, + $sql = "SELECT cogsglpostings.id, cogsglpostings.area, cogsglpostings.stkcat, cogsglpostings.salestype, chartmaster.accountname FROM cogsglpostings, chartmaster - WHERE cogsglpostings.glcode = chartmaster.accountcode'; + WHERE cogsglpostings.glcode = chartmaster.accountcode"; $result = DB_query($sql,$db); @@ -283,7 +283,7 @@ } //end while loop DB_free_result($result); -$sql = 'SELECT categoryid, categorydescription FROM stockcategory'; +$sql = "SELECT categoryid, categorydescription FROM stockcategory"; $result = DB_query($sql,$db); echo "</select></td></tr><tr><td>" . _('Stock Category') . ":</td><td><select tabindex=2 name='StkCat'> @@ -301,7 +301,7 @@ DB_free_result($result); -$sql = 'SELECT typeabbrev, sales_type FROM salestypes'; +$sql = "SELECT typeabbrev, sales_type FROM salestypes"; $result = DB_query($sql,$db); echo "</select></td></tr><tr><td>" . _('Sales Type') . " / " . _('Price List') . ":</td> @@ -347,4 +347,4 @@ echo "<br><div class='centre'><input tabindex=5 type='Submit' name='submit' value=" . _('Enter Information') . "></form></div>"; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-01-09 11:57:43 UTC (rev 4192) +++ trunk/ConfirmDispatch_Invoice.php 2011-01-09 12:12:33 UTC (rev 4193) @@ -36,7 +36,7 @@ /*read in all the guff from the selected order into the Items cart */ - $OrderHeaderSQL = 'SELECT salesorders.orderno, + $OrderHeaderSQL = "SELECT salesorders.orderno, salesorders.debtorno, debtorsmaster.name, salesorders.branchcode, @@ -73,7 +73,7 @@ AND salesorders.debtorno = custbranch.debtorno AND locations.loccode=salesorders.fromstkloc AND debtorsmaster.currcode = currencies.currabrev - AND salesorders.orderno = "' . $_GET['OrderNumber'].'"'; + AND salesorders.orderno = '" . $_GET['OrderNumber']."'"; $ErrMsg = _('The order cannot be retrieved because'); $DbgMsg = _('The SQL to get the order header was'); @@ -122,7 +122,7 @@ /*now populate the line items array with the sales order details records */ - $LineItemsSQL = 'SELECT stkcode, + $LineItemsSQL = "SELECT stkcode, stockmaster.description, stockmaster.controlled, stockmaster.serialised, @@ -147,9 +147,9 @@ stockmaster.overheadcost AS standardcost FROM salesorderdetails INNER JOIN stockmaster ON salesorderdetails.stkcode = stockmaster.stockid - WHERE salesorderdetails.orderno ="' . $_GET['OrderNumber'] . '" + WHERE salesorderdetails.orderno ='" . $_GET['OrderNumber'] . "' AND salesorderdetails.quantity - salesorderdetails.qtyinvoiced >0 - ORDER BY salesorderdetails.orderlineno'; + ORDER BY salesorderdetails.orderlineno"; $ErrMsg = _('The line items of the order cannot be retrieved because'); $DbgMsg = _('The SQL that failed was'); @@ -420,13 +420,13 @@ $FreightCost =0; } if (!is_numeric($BestShipper)){ - $SQL = 'SELECT shipper_id FROM shippers WHERE shipper_id=' . $_SESSION['Default_Shipper']; + $SQL = "SELECT shipper_id FROM shippers WHERE shipper_id=" . $_SESSION['Default_Shipper']; $ErrMsg = _('There was a problem testing for a default shipper because'); $TestShipperExists = DB_query($SQL,$db, $ErrMsg); if (DB_num_rows($TestShipperExists)==1){ $BestShipper = $_SESSION['Default_Shipper']; } else { - $SQL = 'SELECT shipper_id FROM shippers'; + $SQL = "SELECT shipper_id FROM shippers"; $ErrMsg = _('There was a problem testing for a default shipper'); $TestShipperExists = DB_query($SQL,$db, $ErrMsg); if (DB_num_rows($TestShipperExists)>=1){ @@ -1659,4 +1659,4 @@ echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-01-09 11:57:43 UTC (rev 4192) +++ trunk/CounterSales.php 2011-01-09 12:12:33 UTC (rev 4193) @@ -786,7 +786,7 @@ echo '</td><th valign="bottom">'; //for the master table echo '<table class="selection">'; // a new nested table in the second column of master table //now the payment stuff in this column - $PaymentMethodsResult = DB_query('SELECT paymentid, paymentname FROM paymentmethods',$db); + $PaymentMethodsResult = DB_query("SELECT paymentid, paymentname FROM paymentmethods",$db); echo '<tr><td>' . _('Payment Type') . ':</td><td><select name="PaymentMethod">'; while ($PaymentMethodRow = DB_fetch_array($PaymentMethodsResult)){ @@ -798,7 +798,7 @@ } echo '</select></td></tr>'; - $BankAccountsResult = DB_query('SELECT bankaccountname, accountcode FROM bankaccounts',$db); + $BankAccountsResult = DB_query("SELECT bankaccountname, accountcode FROM bankaccounts",$db); echo '<tr><td>' . _('Banked to') . ':</td><td><select name="BankAccount">'; while ($BankAccountsRow = DB_fetch_array($BankAccountsResult)){ @@ -2300,4 +2300,4 @@ } echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/CreditStatus.php =================================================================== --- trunk/CreditStatus.php 2011-01-09 11:57:43 UTC (rev 4192) +++ trunk/CreditStatus.php 2011-01-09 12:12:33 UTC (rev 4193) @@ -144,7 +144,7 @@ links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - $sql = 'SELECT reasoncode, reasondescription, dissallowinvoices FROM holdreasons'; + $sql = "SELECT reasoncode, reasondescription, dissallowinvoices FROM holdreasons"; $result = DB_query($sql, $db); echo '<table class=selection>'; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-01-09 11:57:43 UTC (rev 4192) +++ trunk/Currencies.php 2011-01-09 12:12:33 UTC (rev 4193) @@ -177,7 +177,7 @@ links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - $sql = 'SELECT currency, currabrev, country, hundredsname, rate FROM currencies'; + $sql = "SELECT currency, currabrev, country, hundredsname, rate FROM currencies"; $result = DB_query($sql, $db); echo '<table class=selection>'; @@ -343,4 +343,4 @@ } //end if record deleted no point displaying form to add record 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-01-09 12:28:28
|
Revision: 4195 http://weberp.svn.sourceforge.net/weberp/?rev=4195&view=rev Author: tim_schofield Date: 2011-01-09 12:28:19 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Updates to purchase orders for conversion factor and order status Modified Paths: -------------- trunk/PO_Header.php trunk/PO_Items.php trunk/includes/DefinePOClass.php trunk/includes/PO_ReadInOrder.inc Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-01-09 12:15:06 UTC (rev 4194) +++ trunk/PO_Header.php 2011-01-09 12:28:19 UTC (rev 4195) @@ -58,11 +58,11 @@ } } -if (isset($_POST['UpdateStat']) AND $_POST['UpdateStat']!='') { +if (isset($_POST['UpdateStatus']) AND $_POST['UpdateStatus']!='') { /*The cancel button on the header screen - to delete order */ - $OK_to_updstat = 1; + $OKToUpdateStatus = 1; $OldStatus=$_SESSION['PO'.$identifier]->Status; - $NewStatus=$_POST['Stat']; + $NewStatus=$_POST['Status']; $EmailSQL="SELECT email FROM www_users WHERE userid='".$_SESSION['PO'.$identifier]->Initiator."'"; $EmailResult=DB_query($EmailSQL, $db); $EmailRow=DB_fetch_array($EmailResult); @@ -773,7 +773,6 @@ echo '<tr><td><a href="' .$rootpath . "/GoodsReceived.php?" . SID . "&PONumber=" . $_SESSION['PO'.$identifier]->OrderNo . "&identifier=".$identifier.'">'._('Receive this order').'</a></td></tr>'; } - echo '<td>' . _('Status') . ' : </td><td><select name="Stat" onChange="ReloadForm(form1.UpdateStat)">'; switch ($_SESSION['PO'.$identifier]->Status) { case '': @@ -808,22 +807,23 @@ break; } + echo '<td>' . _('Status') . ' : </td><td><select name="Status" onChange="ReloadForm(UpdateStatus)">'; foreach ($StatusList as $Status) { - if ($_SESSION['PO'.$identifier]->Stat == $Status){ + if ($_SESSION['PO'.$identifier]->Status == $Status){ echo '<option selected value="' . $Status . '">' . _($Status) . '</option>'; } else { echo '<option value="'.$Status.'">' . _($Status) . '</option>'; } - echo '</select></td></tr>'; + } //end its not a new order + echo '</select></td></tr>'; - echo '<tr><td>' . _('Status Comment') . ':</td> + echo '<tr><td>' . _('Status Comment') . ':</td> <td><input type=text name="StatusComments" size=50></td></tr> - <tr><td colspan=2><b>' . $_SESSION['PO'.$identifier]->StatusComments .'</b></td></tr>'; - //need to use single quotes as double quotes inside the string of StatusComments - echo "<input type='hidden' name='StatusCommentsComplete' value='" . $_SESSION['PO'.$identifier]->StatusComments ."'>"; - echo '<tr><td><input type="submit" name="UpdateStatus" value="' . _('Status Update') .'"></td>'; - } //end its not a new order + <tr><td colspan=2><b>' . $_SESSION['PO'.$identifier]->StatComments .'</b></td></tr>'; + //need to use single quotes as double quotes inside the string of StatusComments + echo "<input type='hidden' name='StatusCommentsComplete' value='" . $_SESSION['PO'.$identifier]->StatComments ."'>"; + echo '<tr><td><input type="submit" name="UpdateStatus" value="' . _('Status Update') .'"></td>'; echo '</tr></table></td>'; Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-01-09 12:15:06 UTC (rev 4194) +++ trunk/PO_Items.php 2011-01-09 12:28:19 UTC (rev 4195) @@ -39,6 +39,8 @@ */ $sql = "SELECT stockmaster.description, purchdata.suppliers_partno, + purchdata.conversionfactor, + purchdata.suppliersuom, stockmaster.pkg_type, stockmaster.units, stockmaster.netweight, @@ -53,15 +55,16 @@ _('cannot be retrieved because'); $DbgMsg = _('The SQL used to retrieve the supplier details and failed was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); - $myrow = DB_fetch_row($result); + $myrow = DB_fetch_array($result); - $_POST['ItemDescription'] = $myrow[0]; - $_POST['Suppliers_PartNo'] = $myrow[1]; - $_POST['Package'] = $myrow[2]; - $_POST['uom'] = $myrow[3]; - $_POST['nw'] = $myrow[4]; - $_POST['gw'] = $myrow[5]; - $_POST['CuFt'] = $myrow[6]; + $_POST['ItemDescription'] = $myrow['description']; + $_POST['Suppliers_PartNo'] = $myrow['suppliers_partno']; + $_POST['ConversionFactor'] = $myrow['conversionfactor']; + $_POST['Package'] = $myrow['pkg_type']; + $_POST['uom'] = $myrow['suppliersuom']; + $_POST['nw'] = $myrow['netweight']; + $_POST['gw'] = $myrow['kgs']; + $_POST['CuFt'] = $myrow['volume']; } // end if (isset($_POST['StockID2']) && $_GET['Edit']=='') if (isset($_POST['UpdateLines']) OR isset($_POST['Commit'])) { @@ -187,6 +190,7 @@ jobref, itemno, uom, + conversionfactor, suppliers_partno, subtotal_amount, package, @@ -209,6 +213,7 @@ '" . $POLine->JobRef . "', '" . $POLine->ItemNo . "', '" . $POLine->SuppUOM . "', + '" . $POLine->ConversionFactor . "', '" . $POLine->Suppliers_PartNo . "', '" . $POLine->SubTotal_Amount . "', '" . $POLine->Package . "', @@ -334,8 +339,8 @@ shiptref='" . $POLine->ShiptRef . "', jobref='" . $POLine->JobRef . "', itemno='" . $POLine->ItemNo . "', - uom='" . $POLine->uom . "', - uom='" . $POLine->ConversionFactor. "', + uom='" . $POLine->UOM . "', + conversionfactor='" . $POLine->ConversionFactor. "', suppliers_partno='" . $POLine->Suppliers_PartNo . "', subtotal_amount='" . $POLine->SubTotal_Amount . "', package='" . $POLine->Package . "', @@ -358,8 +363,8 @@ shiptref='" . $POLine->ShiptRef . "', jobref='" . $POLine->JobRef . "', itemno='" . $POLine->ItemNo . "', - uom='" . $POLine->uom . "', - uom='" . $POLine->ConversionFactor . "', + uom='" . $POLine->UOM. "', + conversionfactor='" . $POLine->ConversionFactor . "', suppliers_partno='" . $POLine->Suppliers_PartNo . "', subtotal_amount='" . $POLine->SubTotal_Amount . "', package='" . $POLine->Package . "', @@ -816,7 +821,7 @@ $Quantity, /* Qty */ $myrow['description'], $myrow['price'], - $myrow['units'], + $myrow['unitname'], $myrow['stockact'], $_SESSION['PO'.$identifier]->DeliveryDate, 0, @@ -945,28 +950,8 @@ echo '<tr class="OddTableRows">'; $k=1; } - $UomSQL="SELECT conversionfactor, - suppliersuom, - unitsofmeasure. - unitname - FROM purchdata - LEFT JOIN unitsofmeasure - ON purchdata.suppliersuom=unitsofmeasure.unitid - WHERE supplierno='".$_SESSION['PO'.$identifier]->SupplierID."' - AND stockid='".$POLine->StockID."'"; - - $UomResult=DB_query($UomSQL, $db); - if (DB_num_rows($UomResult)>0) { - $UomRow=DB_fetch_array($UomResult); - if (strlen($UomRow['suppliersuom'])>0) { - $Uom=$UomRow['unitname']; - } else { - $Uom=$POLine->Units; - } - } else { - $Uom=$POLine->Units; - } - echo '<input type="hidden" name="ConversionFactor" value="'.$UomRow['conversionfactor'].'" />'; + $Uom=$POLine->UOM; + echo '<input type="hidden" name="ConversionFactor" value="'.$POLine->ConversionFactor.'" />'; echo '<td>' . $POLine->StockID . '</td> <td>' . $POLine->ItemDescription . '</td> <td><input type="text" class="number" name="Qty' . $POLine->LineNo .'" size="11" value="' . $DisplayQuantity . '"></td> Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2011-01-09 12:15:06 UTC (rev 4194) +++ trunk/includes/DefinePOClass.php 2011-01-09 12:28:19 UTC (rev 4195) @@ -225,7 +225,7 @@ Var $GLActName; Var $Quantity; Var $Price; - Var $Units; //errrrr what is uom for then + Var $UOM; //errrrr what is uom for then Var $ReqDelDate; Var $QtyInv; Var $QtyReceived; @@ -295,7 +295,7 @@ $this->Quantity = $Qty; $this->ReqDelDate = $ReqDelDate; $this->Price = $Price; - $this->Units = $UOM; + $this->UOM = $UOM; $this->QtyReceived = $QtyRecd; $this->QtyInv = $QtyInv; $this->GLCode = $GLCode; Modified: trunk/includes/PO_ReadInOrder.inc =================================================================== --- trunk/includes/PO_ReadInOrder.inc 2011-01-09 12:15:06 UTC (rev 4194) +++ trunk/includes/PO_ReadInOrder.inc 2011-01-09 12:28:19 UTC (rev 4195) @@ -15,7 +15,7 @@ /*read in all the guff from the selected order into the PO PurchOrder Class variable */ - $OrderHeaderSQL = 'SELECT purchorders.supplierno, + $OrderHeaderSQL = "SELECT purchorders.supplierno, suppliers.suppname, purchorders.comments, purchorders.orddate, @@ -53,7 +53,7 @@ LEFT JOIN locations ON purchorders.intostocklocation=locations.loccode, suppliers WHERE purchorders.supplierno = suppliers.supplierid - AND purchorders.orderno = ' . $_GET['ModifyOrderNumber']; + AND purchorders.orderno = '" . $_GET['ModifyOrderNumber'] . "'"; $ErrMsg = _('The order cannot be retrieved because'); $DbgMsg = _('The SQL statement that was used and failed was'); @@ -94,7 +94,7 @@ $_SESSION['PO'.$identifier]->Version = $myrow['version']; $_SESSION['PO'.$identifier]->Port = $myrow['port']; $_SESSION['PO'.$identifier]->Status = $myrow['status']; - $_SESSION['PO'.$identifier]->StatusComments = $myrow['stat_comment']; + $_SESSION['PO'.$identifier]->StatComments = $myrow['stat_comment']; $_SESSION['PO'.$identifier]->DeliveryDate = ConvertSQLDate($myrow['deliverydate']); $_SESSION['ExistingOrder'] = $_SESSION['PO'.$identifier]->OrderNo; $_SESSION['PO'.$identifier]->PaymentTerms= $myrow['paymentterms']; @@ -152,7 +152,8 @@ cuft, total_quantity, total_amount, - assetid + assetid, + uom FROM purchorderdetails LEFT JOIN stockmaster ON purchorderdetails.itemcode=stockmaster.stockid @@ -187,27 +188,27 @@ } else { $StockID = $myrow['itemcode']; } - $LatestPurchDataSQL='SELECT max(effectivefrom) + $LatestPurchDataSQL="SELECT max(effectivefrom) FROM purchdata - WHERE supplierno="'.$_SESSION['PO'.$identifier]->SupplierID.'" - AND stockid="'. $StockID.'" - AND effectivefrom<="'.$_SESSION['PO'.$identifier]->Orig_OrderDate.'"'; + WHERE supplierno='".$_SESSION['PO'.$identifier]->SupplierID."' + AND stockid='". $StockID."' + AND effectivefrom<='".$_SESSION['PO'.$identifier]->Orig_OrderDate."'"; $LatestPurchDataResult=DB_query($LatestPurchDataSQL, $db); $LatestPurchDataRow=DB_fetch_row($LatestPurchDataResult); if ($LatestPurchDataRow[0] != '') { - $sql='SELECT unitsofmeasure.unitname, + $sql="SELECT unitsofmeasure.unitname, suppliers_partno, conversionfactor FROM purchdata LEFT JOIN unitsofmeasure ON purchdata.suppliersuom=unitsofmeasure.unitid - WHERE supplierno="'.$_SESSION['PO'.$identifier]->SupplierID.'" - AND stockid="'.$StockID.'" - AND effectivefrom="'.$LatestPurchDataRow[0].'"'; + WHERE supplierno='".$_SESSION['PO'.$identifier]->SupplierID."' + AND stockid='".$StockID."' + AND effectivefrom='".$LatestPurchDataRow[0]."'"; $PurchDataResult=DB_query($sql, $db); $myrow2=DB_fetch_array($PurchDataResult); } else { - $sql='SELECT units as unitname, stockid as suppliers_partno FROM stockmaster WHERE stockid="'.$StockID.'"'; + $sql="SELECT units as unitname, stockid as suppliers_partno FROM stockmaster WHERE stockid='".$StockID."'"; $PurchDataResult=DB_query($sql, $db); $myrow2=DB_fetch_array($PurchDataResult); $myrow2['conversionfactor']=1; @@ -220,7 +221,7 @@ $myrow['quantityord'], stripslashes($myrow['itemdescription']), $myrow['unitprice'], - $Units, + $myrow['uom'], $GLCode, ConvertSQLDate($myrow['deliverydate']), $myrow['shiptref'], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sot...@us...> - 2011-01-09 12:36:59
|
Revision: 4196 http://weberp.svn.sourceforge.net/weberp/?rev=4196&view=rev Author: sotandeka Date: 2011-01-09 12:36:52 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Correct the quotes in SQL literals Modified Paths: -------------- trunk/DailyBankTransactions.php trunk/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/DiscountCategories.php Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2011-01-09 12:28:19 UTC (rev 4195) +++ trunk/DailyBankTransactions.php 2011-01-09 12:36:52 UTC (rev 4196) @@ -14,12 +14,12 @@ echo '<table class=selection>'; - $SQL = 'SELECT bankaccountname, + $SQL = "SELECT bankaccountname, bankaccounts.accountcode, bankaccounts.currcode FROM bankaccounts, chartmaster - WHERE bankaccounts.accountcode=chartmaster.accountcode'; + WHERE bankaccounts.accountcode=chartmaster.accountcode"; $ErrMsg = _('The bank accounts could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve the bank accounts was'); @@ -118,4 +118,4 @@ } include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-01-09 12:28:19 UTC (rev 4195) +++ trunk/DailySalesInquiry.php 2011-01-09 12:36:52 UTC (rev 4196) @@ -25,7 +25,7 @@ $_POST['MonthToShow'] = GetPeriod(Date($_SESSION['DefaultDateFormat']),$db); } -$PeriodsResult = DB_query('SELECT periodno, lastdate_in_period FROM periods',$db); +$PeriodsResult = DB_query("SELECT periodno, lastdate_in_period FROM periods",$db); while ($PeriodRow = DB_fetch_array($PeriodsResult)){ if ($_POST['MonthToShow']==$PeriodRow['periodno']) { @@ -38,7 +38,7 @@ echo '</select></td>'; echo '<td>' . _('Salesperson') . ':</td><td><select tabindex=2 name="Salesperson">'; -$SalespeopleResult = DB_query('SELECT salesmancode, salesmanname FROM salesman',$db); +$SalespeopleResult = DB_query("SELECT salesmancode, salesmanname FROM salesman",$db); if (!isset($_POST['Salesperson'])){ $_POST['Salesperson'] = 'All'; echo '<option selected value="All">' . _('All') . '</option>'; @@ -180,4 +180,4 @@ echo '</table>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-01-09 12:28:19 UTC (rev 4195) +++ trunk/DebtorsAtPeriodEnd.php 2011-01-09 12:36:52 UTC (rev 4196) @@ -150,7 +150,7 @@ echo '<tr><td>' . _('Balances As At') . ":</td><td><select tabindex=3 Name='PeriodEnd'>"; - $sql = 'SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC'; + $sql = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC"; $Periods = DB_query($sql,$db,_('Could not retrieve period data because'),_('The SQL that failed to get the period data was')); while ($myrow = DB_fetch_array($Periods,$db)){ @@ -168,4 +168,4 @@ include('includes/footer.inc'); } /*end of else not PrintPDF */ -?> \ No newline at end of file +?> Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-01-09 12:28:19 UTC (rev 4195) +++ trunk/DeliveryDetails.php 2011-01-09 12:36:52 UTC (rev 4196) @@ -918,8 +918,8 @@ $ErrMsg = _('The stock locations could not be retrieved'); $DbgMsg = _('SQL used to retrieve the stock locations was') . ':'; -$StkLocsResult = DB_query('SELECT locationname,loccode - FROM locations',$db, $ErrMsg, $DbgMsg); +$StkLocsResult = DB_query("SELECT locationname,loccode + FROM locations",$db, $ErrMsg, $DbgMsg); while ($myrow=DB_fetch_row($StkLocsResult)){ if ($_SESSION['Items'.$identifier]->Location==$myrow[1]){ @@ -1055,8 +1055,8 @@ echo '<tr><td>'. _('Freight/Shipper Method') .':</td><td><select name="ShipVia">'; $ErrMsg = _('The shipper details could not be retrieved'); $DbgMsg = _('SQL used to retrieve the shipper details was') . ':'; -$sql = 'SELECT shipper_id, shippername - FROM shippers'; +$sql = "SELECT shipper_id, shippername + FROM shippers"; $ShipperResults = DB_query($sql,$db,$ErrMsg,$DbgMsg); while ($myrow=DB_fetch_array($ShipperResults)){ if ($myrow['shipper_id']==$_POST['ShipVia']){ @@ -1093,4 +1093,4 @@ echo '</div></form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2011-01-09 12:28:19 UTC (rev 4195) +++ trunk/DiscountCategories.php 2011-01-09 12:36:52 UTC (rev 4196) @@ -127,12 +127,12 @@ if (isset($_POST['search'])) { if ($_POST['PartID']!='' and $_POST['PartDesc']=='') - $sql='SELECT stockid, description FROM stockmaster WHERE stockid LIKE"%'.$_POST['PartID'].'%"'; + $sql="SELECT stockid, description FROM stockmaster WHERE stockid LIKE '%".$_POST['PartID']."%'"; if ($_POST['PartID']=='' and $_POST['PartDesc']!='') - $sql='SELECT stockid, description FROM stockmaster WHERE description LIKE"%'.$_POST['PartDesc'].'%"'; + $sql="SELECT stockid, description FROM stockmaster WHERE description LIKE '%".$_POST['PartDesc']."%'"; if ($_POST['PartID']!='' and $_POST['PartDesc']!='') - $sql='SELECT stockid, description FROM stockmaster WHERE stockid LIKE"%'.$_POST['PartID'].'%" and - description LIKE"%'.$_POST['PartDesc'].'%"'; + $sql="SELECT stockid, description FROM stockmaster WHERE stockid LIKE '%".$_POST['PartID']."%' and + description LIKE '%".$_POST['PartDesc']."%'"; $result=DB_query($sql,$db); if (!isset($_POST['stockID'])) { echo _('Select a part code').':<br>'; @@ -145,9 +145,9 @@ echo '<table class=selection><tr><td>'._('Assign discount category').'</td>'; echo '<td><input type="text" name="DiscountCategory" maxlength=2 size=2></td>'; echo '<td>'._('to all items in stock category').'</td>'; - $sql = 'SELECT categoryid, + $sql = "SELECT categoryid, categorydescription - FROM stockcategory'; + FROM stockcategory"; $result = DB_query($sql, $db); echo '<td><select name="stockcategory">'; while ($myrow=DB_fetch_array($result)) { @@ -232,4 +232,4 @@ } 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: <sot...@us...> - 2011-01-09 12:53:57
|
Revision: 4197 http://weberp.svn.sourceforge.net/weberp/?rev=4197&view=rev Author: sotandeka Date: 2011-01-09 12:53:51 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Correct the quotes in SQL literals Modified Paths: -------------- trunk/EDIMessageFormat.php trunk/EDIProcessOrders.php trunk/EDISendInvoices.php trunk/ExchangeRateTrend.php Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-01-09 12:36:52 UTC (rev 4196) +++ trunk/EDIMessageFormat.php 2011-01-09 12:53:51 UTC (rev 4197) @@ -174,13 +174,13 @@ if (isset($SelectedMessageLine)) { //editing an existing message line - $sql = 'SELECT messagetype, + $sql = "SELECT messagetype, partnercode, section, sequenceno, linetext FROM edimessageformat - WHERE id=' . $SelectedMessageLine; + WHERE id=" . $SelectedMessageLine; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); @@ -252,4 +252,4 @@ echo "</form>"; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-01-09 12:36:52 UTC (rev 4196) +++ trunk/EDIProcessOrders.php 2011-01-09 12:53:51 UTC (rev 4197) @@ -40,7 +40,7 @@ /*Read in the EANCOM Order Segments for the current seg group from the segments table */ -$sql = 'SELECT id, segtag, maxoccur, seggroup FROM edi_orders_segs'; +$sql = "SELECT id, segtag, maxoccur, seggroup FROM edi_orders_segs"; $OrderSeg = DB_query($sql,$db); $i=0; $Seg = array(); @@ -571,4 +571,4 @@ } } -?> \ No newline at end of file +?> Modified: trunk/EDISendInvoices.php =================================================================== --- trunk/EDISendInvoices.php 2011-01-09 12:36:52 UTC (rev 4196) +++ trunk/EDISendInvoices.php 2011-01-09 12:53:51 UTC (rev 4197) @@ -11,7 +11,7 @@ include('includes/htmlMimeMail.php'); // need for sending email attachments /*Get the Customers who are enabled for EDI invoicing */ -$sql = 'SELECT debtorno, +$sql = "SELECT debtorno, edireference, editransport, ediaddress, @@ -20,7 +20,7 @@ daysbeforedue, dayinfollowingmonth FROM debtorsmaster INNER JOIN paymentterms ON debtorsmaster.paymentterms=paymentterms.termsindicator - WHERE ediinvoices=1'; + WHERE ediinvoices=1"; $EDIInvCusts = DB_query($sql,$db); @@ -261,4 +261,4 @@ } /*loop around all the customers enabled for EDI Invoices */ include ('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/ExchangeRateTrend.php =================================================================== --- trunk/ExchangeRateTrend.php 2011-01-09 12:36:52 UTC (rev 4196) +++ trunk/ExchangeRateTrend.php 2011-01-09 12:53:51 UTC (rev 4197) @@ -29,7 +29,7 @@ _('View Currency Trend') . '" alt="" />' . ' ' . _('View Currency Trend') . '</p>'; echo '<table>'; // First column - $SQL = 'SELECT * FROM currencies'; + $SQL = "SELECT * FROM currencies"; $result=DB_query($SQL,$db); @@ -71,4 +71,4 @@ 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: <sot...@us...> - 2011-01-09 13:28:01
|
Revision: 4200 http://weberp.svn.sourceforge.net/weberp/?rev=4200&view=rev Author: sotandeka Date: 2011-01-09 13:27:55 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Correct the quotes in SQL literals Modified Paths: -------------- trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/FixedAssetList.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/FixedAssetTransfer.php trunk/FreightCosts.php Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2011-01-09 13:15:19 UTC (rev 4199) +++ trunk/FixedAssetDepreciation.php 2011-01-09 13:27:55 UTC (rev 4200) @@ -13,12 +13,12 @@ /*Get the last period depreciation (depn is transtype =44) was posted for */ -$result = DB_query('SELECT periods.lastdate_in_period, +$result = DB_query("SELECT periods.lastdate_in_period, max(fixedassettrans.periodno) FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 - GROUP BY periods.lastdate_in_period',$db); + GROUP BY periods.lastdate_in_period",$db); $LastDepnRun = DB_fetch_row($result); @@ -40,7 +40,7 @@ /* Get list of assets for journal */ -$sql='SELECT fixedassets.assetid, +$sql="SELECT fixedassets.assetid, fixedassets.description, fixedassets.depntype, fixedassets.depnrate, @@ -48,14 +48,14 @@ fixedassetcategories.accumdepnact, fixedassetcategories.depnact, fixedassetcategories.categorydescription, - SUM(CASE WHEN fixedassettrans.fixedassettranstype="cost" THEN fixedassettrans.amount ELSE 0 END) AS costtotal, - SUM(CASE WHEN fixedassettrans.fixedassettranstype="depn" THEN fixedassettrans.amount ELSE 0 END) AS depnbfwd + SUM(CASE WHEN fixedassettrans.fixedassettranstype='cost' THEN fixedassettrans.amount ELSE 0 END) AS costtotal, + SUM(CASE WHEN fixedassettrans.fixedassettranstype='depn' THEN fixedassettrans.amount ELSE 0 END) AS depnbfwd FROM fixedassets INNER JOIN fixedassetcategories ON fixedassets.assetcategoryid=fixedassetcategories.categoryid INNER JOIN fixedassettrans ON fixedassets.assetid=fixedassettrans.assetid - WHERE fixedassettrans.transdate<="' . FormatDateForSQL($_POST['ProcessDate']) . '" + WHERE fixedassettrans.transdate<='" . FormatDateForSQL($_POST['ProcessDate']) . "' GROUP BY fixedassets.assetid, fixedassets.description, fixedassets.depntype, @@ -64,7 +64,7 @@ fixedassetcategories.accumdepnact, fixedassetcategories.depnact, fixedassetcategories.categorydescription - ORDER BY assetcategoryid, assetid'; + ORDER BY assetcategoryid, assetid"; $AssetsResult=DB_query($sql, $db); $InputError = false; //always hope for the best @@ -261,4 +261,4 @@ echo '</form>'; } include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-01-09 13:15:19 UTC (rev 4199) +++ trunk/FixedAssetItems.php 2011-01-09 13:27:55 UTC (rev 4200) @@ -277,25 +277,25 @@ $CancelDelete = 0; //what validation is required before allowing deletion of assets .... maybe there should be no deletion option? - $result = DB_query('SELECT cost, + $result = DB_query("SELECT cost, accumdepn, accumdepnact, costact FROM fixedassets INNER JOIN fixedassetcategories ON fixedassets.assetcategoryid=fixedassetcategories.categoryid - WHERE assetid="' . $AssetID . '"', $db); + WHERE assetid='" . $AssetID . "'", $db); $AssetRow = DB_fetch_array($result); $NBV = $AssetRow['cost'] -$AssetRow['accumdepn']; if ($NBV!=0) { $CancelDelete =1; //cannot delete assets where NBV is not 0 prnMsg(_('The asset still has a net book value - only assets with a zero net book value can be deleted'),'error'); } - $result = DB_query('SELECT * FROM fixedassettrans WHERE assetid="' . $AssetID . '"',$db); + $result = DB_query("SELECT * FROM fixedassettrans WHERE assetid='" . $AssetID . "'",$db); if (DB_num_rows($result) > 0){ $CancelDelete =1; /*cannot delete assets with transactions */ prnMsg(_('The asset has transactions associated with it. The asset can only be deleted when the fixed asset transactions are purged, otherwise the integrity of fixed asset reports may be compromised'),'error'); } - $result = DB_query('SELECT * FROM purchorderdetails WHERE assetid="' . $AssetID . '"',$db); + $result = DB_query("SELECT * FROM purchorderdetails WHERE assetid='" . $AssetID . "'",$db); if (DB_num_rows($result) > 0){ $CancelDelete =1; /*cannot delete assets where there is a purchase order set up for it */ prnMsg(_('There is a purchase order set up for this asset. The purchase order line must be deleted first'),'error'); @@ -464,7 +464,7 @@ echo '<tr><td>' . _('Asset Category') . ':</td><td><select name="AssetCategoryID">'; -$sql = 'SELECT categoryid, categorydescription FROM fixedassetcategories'; +$sql = "SELECT categoryid, categorydescription FROM fixedassetcategories"; $ErrMsg = _('The asset categories could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve stock categories and failed was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); @@ -486,7 +486,7 @@ echo '<tr><td>' . _('Date Purchased') . ':</td><td>' . ConvertSQLDate($AssetRow['datepurchased']) . '</td></tr>'; } -$sql = 'SELECT locationid, locationdescription FROM fixedassetlocations'; +$sql = "SELECT locationid, locationdescription FROM fixedassetlocations"; $ErrMsg = _('The asset locations could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve asset locations and failed was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); @@ -531,7 +531,7 @@ echo '<tr><td>' . _('Accumulated Depreciation') . ':</td><td class="number">' . number_format($AssetRow['accumdepn'],2) . '</td></tr>'; echo '<tr><td>' . _('Net Book Value') . ':</td><td class="number">' . number_format($AssetRow['cost']-$AssetRow['accumdepn'],2) . '</td></tr>'; -$result = DB_query('SELECT periods.lastdate_in_period, max(fixedassettrans.periodno) FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 GROUP BY periods.lastdate_in_period',$db); +$result = DB_query("SELECT periods.lastdate_in_period, max(fixedassettrans.periodno) FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 GROUP BY periods.lastdate_in_period",$db); $LastDepnRun = DB_fetch_row($result); if(DB_num_rows($result)==0){ $LastRunDate = _('Not Yet Run'); @@ -554,4 +554,4 @@ echo '</form></div>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/FixedAssetList.php =================================================================== --- trunk/FixedAssetList.php 2011-01-09 13:15:19 UTC (rev 4199) +++ trunk/FixedAssetList.php 2011-01-09 13:27:55 UTC (rev 4200) @@ -7,7 +7,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title .'</p>'; -$sql='SELECT stockmaster.stockid, +$sql="SELECT stockmaster.stockid, assetmanager.serialno, stockmaster.description, stockcatproperties.label, @@ -20,7 +20,7 @@ LEFT JOIN stockitemproperties ON stockcatproperties.stkcatpropid=stockitemproperties.stkcatpropid WHERE stockmaster.stockid=stockitemproperties.stockid - ORDER BY assetmanager.serialno,stockmaster.stockid'; + ORDER BY assetmanager.serialno,stockmaster.stockid"; $result=DB_query($sql, $db); echo '<table class=selection>'; @@ -43,4 +43,4 @@ echo '</table>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2011-01-09 13:15:19 UTC (rev 4199) +++ trunk/FixedAssetLocations.php 2011-01-09 13:27:55 UTC (rev 4200) @@ -19,16 +19,16 @@ $InputError=1; } if ($InputError==0) { - $sql='INSERT INTO fixedassetlocations + $sql="INSERT INTO fixedassetlocations VALUES ( - "'.$_POST['LocationID'].'", - "'.$_POST['LocationDescription'].'", - "'.$_POST['ParentLocationID'].'")'; + '".$_POST['LocationID']."', + '".$_POST['LocationDescription']."', + '".$_POST['ParentLocationID']."')"; $result=DB_query($sql, $db); } } if (isset($_GET['SelectedLocation'])) { - $sql='SELECT * FROM fixedassetlocations WHERE locationid="'.$_GET['SelectedLocation'].'"'; + $sql="SELECT * FROM fixedassetlocations WHERE locationid='".$_GET['SelectedLocation']."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); $LocationID = $myrow['locationid']; @@ -49,10 +49,10 @@ $InputError=1; } if ($InputError==0) { - $sql='UPDATE fixedassetlocations SET - locationdescription="'.$_POST['LocationDescription'].'", - parentlocationid="'.$_POST['ParentLocationID'].'" - WHERE locationid ="'.$_POST['LocationID'].'"'; + $sql="UPDATE fixedassetlocations SET + locationdescription='".$_POST['LocationDescription']."', + parentlocationid='".$_POST['ParentLocationID']."' + WHERE locationid ='".$_POST['LocationID']."'"; $result=DB_query($sql,$db); echo '<meta http-equiv="Refresh" content="0; url="'.$_SERVER['PHP_SELF'].'">'; } @@ -83,7 +83,7 @@ } } -$sql='SELECT * FROM fixedassetlocations'; +$sql="SELECT * FROM fixedassetlocations"; $result=DB_query($sql, $db); if (DB_num_rows($result) > 0) { @@ -119,7 +119,7 @@ echo '<tr><th style="text-align:left">'._('Parent Location').'</th>'; echo '<td><select name=ParentLocationID>'; -$sql='SELECT * FROM fixedassetlocations'; +$sql="SELECT * FROM fixedassetlocations"; $result=DB_query($sql, $db); echo '<option value=""></option>'; @@ -151,4 +151,4 @@ echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/FixedAssetRegister.php =================================================================== --- trunk/FixedAssetRegister.php 2011-01-09 13:15:19 UTC (rev 4199) +++ trunk/FixedAssetRegister.php 2011-01-09 13:27:55 UTC (rev 4200) @@ -14,7 +14,7 @@ } $DateFrom = FormatDateForSQL($_POST['FromDate']); $DateTo = FormatDateForSQL($_POST['ToDate']); - $sql = 'SELECT fixedassets.assetid, + $sql = "SELECT fixedassets.assetid, fixedassets.description, fixedassets.longdescription, fixedassets.assetcategoryid, @@ -24,17 +24,17 @@ fixedassetlocations.parentlocationid, fixedassets.assetlocation, fixedassets.disposaldate, - SUM(CASE WHEN (fixedassettrans.transdate <"' . $DateFrom . '" AND fixedassettrans.fixedassettranstype="cost") THEN fixedassettrans.amount ELSE 0 END) AS bfwdcost, - SUM(CASE WHEN (fixedassettrans.transdate <"' . $DateFrom .'" AND fixedassettrans.fixedassettranstype="depn") THEN fixedassettrans.amount ELSE 0 END) AS bfwddepn, - SUM(CASE WHEN (fixedassettrans.transdate >="' . $DateFrom .'" AND fixedassettrans.transdate <="' . $DateTo . '" AND fixedassettrans.fixedassettranstype="cost") THEN fixedassettrans.amount ELSE 0 END) AS periodadditions, - SUM(CASE WHEN fixedassettrans.transdate >="' . $DateFrom . '" AND fixedassettrans.transdate <="' . $DateTo . '" AND fixedassettrans.fixedassettranstype="depn" THEN fixedassettrans.amount ELSE 0 END) AS perioddepn, - SUM(CASE WHEN fixedassettrans.transdate >="' . $DateFrom . '" AND fixedassettrans.transdate <="' . $DateTo . '" AND fixedassettrans.fixedassettranstype="disposal" THEN fixedassettrans.amount ELSE 0 END) AS perioddisposal + SUM(CASE WHEN (fixedassettrans.transdate <'" . $DateFrom . "' AND fixedassettrans.fixedassettranstype='cost') THEN fixedassettrans.amount ELSE 0 END) AS bfwdcost, + SUM(CASE WHEN (fixedassettrans.transdate <'" . $DateFrom . "' AND fixedassettrans.fixedassettranstype='depn') THEN fixedassettrans.amount ELSE 0 END) AS bfwddepn, + SUM(CASE WHEN (fixedassettrans.transdate >='" . $DateFrom ."' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='cost') THEN fixedassettrans.amount ELSE 0 END) AS periodadditions, + SUM(CASE WHEN fixedassettrans.transdate >='" . $DateFrom . "' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='depn' THEN fixedassettrans.amount ELSE 0 END) AS perioddepn, + SUM(CASE WHEN fixedassettrans.transdate >='" . $DateFrom . "' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='disposal' THEN fixedassettrans.amount ELSE 0 END) AS perioddisposal FROM fixedassets INNER JOIN fixedassetcategories ON fixedassets.assetcategoryid=fixedassetcategories.categoryid INNER JOIN fixedassetlocations ON fixedassets.assetlocation=fixedassetlocations.locationid INNER JOIN fixedassettrans ON fixedassets.assetid=fixedassettrans.assetid - WHERE fixedassets.assetcategoryid ' . LIKE . '"' . $_POST['AssetCategory'] . '" - AND fixedassets.assetid ' . LIKE . '"' . $_POST['AssetID'] . '" + WHERE fixedassets.assetcategoryid " . LIKE . "'" . $_POST['AssetCategory'] . "' + AND fixedassets.assetid " . LIKE . "'" . $_POST['AssetID'] . "' GROUP BY fixedassets.assetid, fixedassets.description, fixedassets.longdescription, @@ -43,7 +43,7 @@ fixedassetlocations.locationdescription, fixedassets.datepurchased, fixedassetlocations.parentlocationid, - fixedassets.assetlocation'; + fixedassets.assetlocation"; $result = DB_query($sql, $db); if (isset($_POST['pdf'])) { $FontSize = 10; @@ -53,7 +53,7 @@ if ($_POST['AssetCategory']=='%') { $AssetCategory=_('All'); } else { - $CategorySQL='SELECT categorydescription FROM fixedassetcategories WHERE categoryid="'.$_POST['AssetCategory'].'"'; + $CategorySQL="SELECT categorydescription FROM fixedassetcategories WHERE categoryid='".$_POST['AssetCategory']."'"; $CategoryResult=DB_query($CategorySQL, $db); $CategoryRow=DB_fetch_array($CategoryResult); $AssetCategory=$CategoryRow['categorydescription']; @@ -62,7 +62,7 @@ if ($_POST['AssetID']=='%') { $AssetDescription =_('All'); } else { - $AssetSQL='SELECT description FROM fixedassets WHERE assetid="'.$_POST['AssetID'].'"'; + $AssetSQL="SELECT description FROM fixedassets WHERE assetid='".$_POST['AssetID']."'"; $AssetResult=DB_query($AssetSQL, $db); $AssetRow=DB_fetch_array($AssetResult); $AssetDescription =$AssetRow['description']; @@ -231,7 +231,7 @@ include ('includes/header.inc'); echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title; - $result = DB_query('SELECT categoryid,categorydescription FROM fixedassetcategories', $db); + $result = DB_query("SELECT categoryid,categorydescription FROM fixedassetcategories", $db); echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><th>' . _('Asset Category') . '</th>'; @@ -245,7 +245,7 @@ } } echo '</select></td></tr>'; - $sql = 'SELECT locationid, locationdescription FROM fixedassetlocations'; + $sql = "SELECT locationid, locationdescription FROM fixedassetlocations"; $result = DB_query($sql, $db); echo '<tr><th>' . _('Asset Location') . '</th>'; echo '<td><select name=AssetLocation>'; @@ -258,7 +258,7 @@ } } echo '</select></td></tr>'; - $sql = 'SELECT assetid, description FROM fixedassets'; + $sql = "SELECT assetid, description FROM fixedassets"; $result = DB_query($sql, $db); echo '<tr><th>' . _('Asset') . '</th>'; echo '<td><select name="AssetID">'; @@ -368,4 +368,4 @@ $PageNumber++; } -?> \ No newline at end of file +?> Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2011-01-09 13:15:19 UTC (rev 4199) +++ trunk/FixedAssetTransfer.php 2011-01-09 13:27:55 UTC (rev 4200) @@ -11,9 +11,9 @@ foreach ($_POST as $AssetToMove => $Value) { //Value is not used? if (substr($AssetToMove,0,4)=='Move') { // the form variable is of the format MoveAssetID so need to strip the move bit off $AssetID=substr($AssetToMove,4); - $sql='UPDATE fixedassets - SET assetlocation="'.$_POST['Location'.$AssetID] .'" - WHERE assetid="'. $AssetID . '"'; + $sql="UPDATE fixedassets + SET assetlocation='".$_POST['Location'.$AssetID] ."' + WHERE assetid='". $AssetID . "'"; $result=DB_query($sql, $db); } @@ -24,7 +24,7 @@ } else if (isset($_POST['AssetID'])) { $AssetID=$_POST['AssetID']; } else { - $sql='SELECT categoryid, categorydescription FROM fixedassetcategories'; + $sql="SELECT categoryid, categorydescription FROM fixedassetcategories"; $result=DB_query($sql, $db); echo '<form action="'. $_SERVER['PHP_SELF'] . '?' . SID .'" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -87,7 +87,7 @@ $_POST['AssetID']='%'; } - $sql= 'SELECT fixedassets.assetid, + $sql= "SELECT fixedassets.assetid, fixedassets.cost, fixedassets.accumdepn, fixedassets.description, @@ -99,10 +99,10 @@ FROM fixedassets INNER JOIN fixedassetlocations ON fixedassets.assetlocation=fixedassetlocations.locationid - WHERE fixedassets.assetcategoryid ' . LIKE . '"'.$_POST['AssetCat'].'" - AND fixedassets.description ' . LIKE . '"'.$_POST['Keywords'].'" - AND fixedassets.assetid ' . LIKE . '"'.$_POST['AssetID'].'" - AND fixedassets.serialno ' . LIKE . '"'.$_POST['SerialNumber'].'"'; + WHERE fixedassets.assetcategoryid " . LIKE . "'".$_POST['AssetCat']."' + AND fixedassets.description " . LIKE . "'".$_POST['Keywords']."' + AND fixedassets.assetid " . LIKE . "'".$_POST['AssetID']."' + AND fixedassets.serialno " . LIKE . "'".$_POST['SerialNumber']."'"; $Result=DB_query($sql, $db); echo '<form action="'. $_SERVER['PHP_SELF'] . '?' . SID .'" method=post><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -115,7 +115,7 @@ <th>' . _('Move To :') . '</th> </tr>'; - $locationsql='SELECT locationid, locationdescription from fixedassetlocations'; + $locationsql="SELECT locationid, locationdescription from fixedassetlocations"; $LocationResult=DB_query($locationsql, $db); while ($myrow=DB_fetch_array($Result)) { @@ -149,4 +149,4 @@ include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/FreightCosts.php =================================================================== --- trunk/FreightCosts.php 2011-01-09 13:15:19 UTC (rev 4199) +++ trunk/FreightCosts.php 2011-01-09 13:27:55 UTC (rev 4200) @@ -35,7 +35,7 @@ echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>"; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - $sql = 'SELECT shippername, shipper_id FROM shippers'; + $sql = "SELECT shippername, shipper_id FROM shippers"; $ShipperResults = DB_query($sql,$db); echo '<table class=selection> @@ -51,7 +51,7 @@ <td>' . _('Select the warehouse') . ' (' . _('ship from location') . ")</td> <td><select name='LocationFrom'>"; - $sql = 'SELECT loccode, locationname FROM locations'; + $sql = "SELECT loccode, locationname FROM locations"; $LocationResults = DB_query($sql,$db); while ($myrow = DB_fetch_array($LocationResults)){ @@ -346,4 +346,4 @@ } //end if record deleted no point displaying form to add record 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-01-09 14:43:32
|
Revision: 4211 http://weberp.svn.sourceforge.net/weberp/?rev=4211&view=rev Author: tim_schofield Date: 2011-01-09 14:43:26 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Updates Modified Paths: -------------- trunk/Contracts.php trunk/GoodsReceived.php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-01-09 19:26:00
|
Revision: 4218 http://weberp.svn.sourceforge.net/weberp/?rev=4218&view=rev Author: tim_schofield Date: 2011-01-09 19:25:54 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Correct the quotes in the sql literals Modified Paths: -------------- trunk/AddCustomerNotes.php trunk/RecurringSalesOrders.php Modified: trunk/RecurringSalesOrders.php =================================================================== --- trunk/RecurringSalesOrders.php 2011-01-09 16:10:31 UTC (rev 4217) +++ trunk/RecurringSalesOrders.php 2011-01-09 19:25:54 UTC (rev 4218) @@ -179,6 +179,7 @@ exit; } If (isset($_POST['Process'])) { + $Result = DB_Txn_Begin($db); $InputErrors =0; If (!Is_Date($_POST['StartDate'])){ $InputErrors =1; @@ -199,10 +200,11 @@ if ($InputErrors == 0 ){ /*Error checks above all passed ok so lets go*/ + + if ($NewRecurringOrder=='Yes'){ /* finally write the recurring order header to the database and then the line details*/ - $DelDate = FormatDateforSQL($_SESSION['Items'.$identifier]->DeliveryDate); $HeaderSQL = "INSERT INTO recurringsalesorders ( @@ -228,7 +230,7 @@ stopdate, frequency, autoinvoice) - valueS ( + values ( '" . $_SESSION['Items'.$identifier]->DebtorNo . "', '" . $_SESSION['Items'.$identifier]->Branch . "', '". $_SESSION['Items'.$identifier]->CustRef ."', @@ -253,9 +255,10 @@ '" . $_POST['AutoInvoice'] . "')"; $ErrMsg = _('The recurring order cannot be added because'); - $InsertQryResult = DB_query($HeaderSQL,$db,$ErrMsg); + $InsertQryResult = DB_query($HeaderSQL,$db,$ErrMsg,true); $RecurrOrderNo = DB_Last_Insert_ID($db,'recurringsalesorders','recurrorderno'); + echo 'xxx'.$RecurrOrderNo; $StartOf_LineItemsSQL = "INSERT INTO recurrsalesorderdetails ( recurrorderno, stkcode, @@ -275,7 +278,7 @@ '" . $StockItem->DiscountPercent . "', '" . $StockItem->Narrative . "' )"; - $Ins_LineItemResult = DB_query($LineItemsSQL,$db); + $Ins_LineItemResult = DB_query($LineItemsSQL,$db,$ErrMsg,$DbgMsg,true); } /* inserted line items into sales order details */ prnmsg(_('The new recurring order template has been added'),'success'); @@ -302,6 +305,7 @@ exit; } + $result = DB_Txn_Commit($db); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Search') . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-01-09 19:35:20
|
Revision: 4222 http://weberp.svn.sourceforge.net/weberp/?rev=4222&view=rev Author: tim_schofield Date: 2011-01-09 19:35:13 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Correct the quotes in the sql literals Modified Paths: -------------- trunk/includes/GetConfig.php trunk/includes/GetPaymentMethods.php trunk/includes/MiscFunctions.php trunk/reportwriter/WriteForm.inc trunk/reportwriter/WriteReport.inc Modified: trunk/includes/GetConfig.php =================================================================== --- trunk/includes/GetConfig.php 2011-01-09 19:26:30 UTC (rev 4221) +++ trunk/includes/GetConfig.php 2011-01-09 19:35:13 UTC (rev 4222) @@ -5,7 +5,7 @@ if(isset($ForceConfigReload) and $ForceConfigReload==TRUE OR !isset($_SESSION['CompanyDefaultsLoaded'])) { global $db; // It is global, we may not be. - $sql = 'SELECT confname, confvalue FROM config'; + $sql = "SELECT confname, confvalue FROM config"; $ErrMsg = _('Could not get the configuration parameters from the database because'); $ConfigResult = DB_query($sql,$db,$ErrMsg); while( $myrow = DB_fetch_row($ConfigResult) ) { @@ -23,7 +23,7 @@ /*Load the pagesecurity settings from the database */ if (DB_table_exists('pagesecurity', $db)) { - $sql='SELECT script, security FROM pagesecurity'; + $sql="SELECT script, security FROM pagesecurity"; $ErrMsg = _('Could not get the page security details from the database because'); $result=DB_query($sql, $db); @@ -41,7 +41,7 @@ /* Also reads all the company data set up in the company record and returns an array */ - $sql= 'SELECT coyname, + $sql= "SELECT coyname, gstno, regoffice1, regoffice2, @@ -66,7 +66,7 @@ gllink_creditors, gllink_stock FROM companies - WHERE coycode=1'; + WHERE coycode=1"; $ErrMsg = _('An error occurred accessing the database to retrieve the company information'); $ReadCoyResult = DB_query($sql,$db,$ErrMsg); @@ -80,7 +80,7 @@ } /*Now read in smtp email settings - not needed in a properly set up server environment - but helps for those who can't control their server .. I think! */ - $sql='SELECT id, + $sql="SELECT id, host, port, heloaddress, @@ -88,7 +88,7 @@ password, timeout, auth - FROM emailsettings'; + FROM emailsettings"; $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); Modified: trunk/includes/GetPaymentMethods.php =================================================================== --- trunk/includes/GetPaymentMethods.php 2011-01-09 19:26:30 UTC (rev 4221) +++ trunk/includes/GetPaymentMethods.php 2011-01-09 19:35:13 UTC (rev 4222) @@ -4,11 +4,11 @@ $PaytTypes = array(); $ReceiptTypes = array(); -$sql = 'SELECT paymentname, - paymenttype, - receipttype - FROM paymentmethods - ORDER by paymentname'; +$sql = "SELECT paymentname, + paymenttype, + receipttype + FROM paymentmethods + ORDER by paymentname"; $PMResult = DB_query($sql,$db); while( $PMrow = DB_fetch_array($PMResult) ) { if ($PMrow['paymenttype']==1) Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2011-01-09 19:26:30 UTC (rev 4221) +++ trunk/includes/MiscFunctions.php 2011-01-09 19:35:13 UTC (rev 4222) @@ -234,14 +234,14 @@ }//wikiLink function DecimalPlaces($currcode, $db) { - $sql='SELECT decimalplaces FROM currencies WHERE currabrev="'.$currcode.'"'; + $sql="SELECT decimalplaces FROM currencies WHERE currabrev='".$currcode."'"; $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); return $myrow['decimalplaces']; } function StockDecimalPlaces($StockID, $db) { - $sql='SELECT decimalplaces FROM stockmaster WHERE stockid="'.$StockID.'"'; + $sql="SELECT decimalplaces FROM stockmaster WHERE stockid='".$StockID."'"; $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); return $myrow['decimalplaces']; Modified: trunk/reportwriter/WriteForm.inc =================================================================== --- trunk/reportwriter/WriteForm.inc 2011-01-09 19:26:30 UTC (rev 4221) +++ trunk/reportwriter/WriteForm.inc 2011-01-09 19:35:13 UTC (rev 4222) @@ -31,7 +31,7 @@ $this->SetFont('Helvetica'); $this->SetDrawColor(128,0,0); $this->SetLineWidth(.35); // 1 point - + if ($_SESSION['Language']=='zh_CN'){ $this->AddBig5Font(); } elseif ($_SESSION['Language']=='ja_JP'){ @@ -46,25 +46,25 @@ $i=0; // set sequence to pull data fields should be sorted by seqnum foreach ($FieldListings as $SingleObject) { switch ($SingleObject['params']['index']) { - case "Data": + case "Data": $SingleObject['params']['TextField'] = $FieldValues[$i]; // fill the data to display $i++; // increment to the next field - case "TBlk": // same operation as page number - case "Text": - case "CDta": - case "CBlk": - case "PgNum": - $this->FormText($SingleObject['params']); + case "TBlk": // same operation as page number + case "Text": + case "CDta": + case "CBlk": + case "PgNum": + $this->FormText($SingleObject['params']); break; - case "Img": - $this->FormImage($SingleObject['params']); + case "Img": + $this->FormImage($SingleObject['params']); break; - case "Line": - $this->FormLine($SingleObject['params']); + case "Line": + $this->FormLine($SingleObject['params']); break; - case "Rect": - $this->FormRect($SingleObject['params']); + case "Rect": + $this->FormRect($SingleObject['params']); break; default: // do nothing @@ -116,7 +116,7 @@ } elseif ($Params['LineType']=='3') { // Custom $XEnd = $Params['LineXEnd']; $YEnd = $Params['LineYEnd']; - } + } $this->Line($Params['LineXStrt'],$Params['LineYStrt'],$XEnd,$YEnd); } @@ -126,7 +126,7 @@ if ($Params['Line']=='0') { // No Border $this->SetDrawColor(255); $this->SetLineWidth(0); - } else { + } else { $DrawFill = 'D'; if ($Params['Line']=='2') $RGB=$Params['BrdrRed'].':'.$Params['BrdrGreen'].':'.$Params['BrdrBlue']; else $RGB=$Params['BrdrColor']; @@ -156,7 +156,7 @@ $this->SetTextColor($FC[0],$FC[1],$FC[2]); if ($Params['Line']=='0') { // No Border $Border = '0'; - } else { + } else { $Border = '1'; if ($Params['Line']=='2') $RGB=$Params['BrdrRed'].':'.$Params['BrdrGreen'].':'.$Params['BrdrBlue']; else $RGB=$Params['BrdrColor']; @@ -166,7 +166,7 @@ } if ($Params['Fill']=='0') { // No Fill $Fill = '0'; - } else { + } else { $Fill = '1'; if ($Params['Fill']=='2') $RGB=$Params['FillRed'].':'.$Params['FillGreen'].':'.$Params['FillBlue']; else $RGB=$Params['FillColor']; @@ -206,8 +206,8 @@ } $this->SetLeftMargin($Params['LineXStrt']); $this->SetXY($Params['LineXStrt'], $this->y0); - // Fill with Fill color if it's time - if ($FillThisRow AND $Params['Fill']) $this->SetFillColor($FC[0],$FC[1],$FC[2]); + // Fill with Fill color if it's time + if ($FillThisRow AND $Params['Fill']) $this->SetFillColor($FC[0],$FC[1],$FC[2]); else $this->SetFillColor(255); $this->Cell($Params['BoxWidth'],$MaxBoxY-$this->y0,'',0,0,'L',1); // fill in the data @@ -232,7 +232,7 @@ $CellHeight = ($Params['Seq'][$Col]['FontSize']+RowSpace)*0.35; // if ($trunc) $value=$this->TruncData($value, $Params['Seq'][$Col]['TblColWidth']); if ($Heading) { // center the heading - $FA='C'; + $FA='C'; } else { $FA=$Params['Seq'][$Col]['FontAlign']; if (isset($Params['Seq'][$Col]['Processing'])) $value = $this->ProcessData($value, $Params['Seq'][$Col]['Processing']); @@ -303,11 +303,11 @@ global $FieldListings, $FieldValues; // first fetch all the fields we need to display $FieldListings = ''; - $sql = "SELECT seqnum, params FROM ".DBRptFields." + $sql = "SELECT seqnum, params FROM ".DBRptFields." WHERE reportid=".$ReportID." AND entrytype='fieldlist' AND visible=1 ORDER BY seqnum"; $Result=DB_query($sql,$db,'','',false,true); - while ($FieldValues = DB_fetch_assoc($Result)) { + while ($FieldValues = DB_fetch_assoc($Result)) { $FieldValues['params'] = unserialize($FieldValues['params']); $FieldListings[] = $FieldValues; } @@ -323,7 +323,7 @@ foreach ($FieldListings as $OneField) { // check for a data field and build sql field list if ($OneField['params']['index']=='Data') { // then it's data field make sure it's not empty if ($OneField['params']['DataField']<>'') { - $strField .= $OneField['params']['DataField'].', '; + $strField .= $OneField['params']['DataField'].', '; } else { // the field is empty, bad news, error and exit $usrMsg['message'] = RPT_EMPTYFIELD.$OneField['seqnum']; $usrMsg['level'] = 'error'; @@ -332,7 +332,7 @@ } } // strip the extra comma, space and continue - $strField = substr($strField,0,-2); + $strField = substr($strField,0,-2); // fetch date filter info $df = $Prefs['DateListings']['fieldname']; @@ -341,15 +341,15 @@ $ThisMonth = substr($Today,5,2); $ThisYear = substr($Today,0,4); // find total number of days in this month - if ($ThisMonth=='04' OR $ThisMonth=='06' OR $ThisMonth=='09' OR $ThisMonth=='11') { - $TotalDays=30; - } elseif ($ThisMonth=='02' AND date('L')) { - $TotalDays=29; + if ($ThisMonth=='04' OR $ThisMonth=='06' OR $ThisMonth=='09' OR $ThisMonth=='11') { + $TotalDays=30; + } elseif ($ThisMonth=='02' AND date('L')) { + $TotalDays=29; } // Leap year - elseif ($ThisMonth=='02' AND !date('L')) { - $TotalDays=28; - } else { - $TotalDays=31; + elseif ($ThisMonth=='02' AND !date('L')) { + $TotalDays=28; + } else { + $TotalDays=31; } // Calculate date range $DateArray=explode(':',$Prefs['DateListings']['params']); @@ -388,8 +388,8 @@ case "h": // RPT_GROUP_QUARTER $QtrStrt = intval(($ThisMonth-1)/3)*3+1; $QtrEnd = intval(($ThisMonth-1)/3)*3+3; - if ($QtrEnd==4 OR $QtrEnd==6 OR $QtrEnd==9 OR $QtrEnd==11) { - $TotalDays=30; + if ($QtrEnd==4 OR $QtrEnd==6 OR $QtrEnd==9 OR $QtrEnd==11) { + $TotalDays=30; } $qs = date('Y-m-d', mktime(0,0,0, $QtrStrt, 1, $ThisYear)); $qe = date('Y-m-d', mktime(0,0,0, $QtrEnd, $TotalDays, $ThisYear)); @@ -412,7 +412,7 @@ // Fetch the Criteria $strCrit = ''; - if (is_array($Prefs['CritListings'])) while ($FieldValues = array_shift($Prefs['CritListings'])) { + if (is_array($Prefs['CritListings'])) while ($FieldValues = array_shift($Prefs['CritListings'])) { $Params = explode(':',$FieldValues['params']); switch ($Params[1]) { case RPT_RANGE: @@ -440,7 +440,7 @@ case RPT_UNPRINTED: if (strlen($strCrit)>0) $strCrit .= ' AND '; $strCrit .= $FieldValues['fieldname'].'=0'; - break; + break; case RPT_STOCK: // TBD field to compare so default to nothing case RPT_ASSEMBLY: // TBD field to compare so default to nothing case RPT_ALL: // sql default anyway @@ -464,9 +464,9 @@ // We now have the sql, find out how many groups in the query (to determine the number of forms) $PageBreakField = $Prefs['GroupListings'][0]['fieldname']; - $sql = 'SELECT '.$PageBreakField.' FROM '.$sqlTable; + $sql = "SELECT ".$PageBreakField." FROM ".$sqlTable; if ($sqlCrit) $sql .=' WHERE '.$sqlCrit; - $sql .=' GROUP BY '.$PageBreakField; + $sql .=" GROUP BY ".$PageBreakField; // execute sql to see if we have data $Result=DB_query($sql,$db,'','',false,true); if (DB_num_rows($Result)==0) { @@ -482,7 +482,7 @@ foreach ($FieldListings as $OneField) { // check for a data field and build sql field list if ($OneField['params']['index']=='CDta') { // then it's data field make sure it's not empty if ($OneField['params']['DataField']<>'') { - $strTxtBlk .= $OneField['params']['DataField'].', '; + $strTxtBlk .= $OneField['params']['DataField'].', '; } else { // the field is empty, bad news, error and exit $usrMsg['message'] = RPT_EMPTYFIELD.$OneField['seqnum']; $usrMsg['level'] = 'error'; @@ -491,7 +491,7 @@ } } if ($strTxtBlk<>'') { // then we have data, fill in TextField value with data - $strTxtBlk = substr($strTxtBlk,0,-2); + $strTxtBlk = substr($strTxtBlk,0,-2); $sql = "SELECT ".$strTxtBlk." FROM ".CompanyDataBase." LIMIT 1;"; $Result=DB_query($sql,$db,'','',false,true); $CoyData = DB_fetch_row($Result); @@ -512,8 +512,8 @@ return $usrMsg; } $strTxtBlk=''; // Build the fieldlist - foreach ($SingleObject['params']['Seq'] as $OneField) $strTxtBlk .= $OneField['TblField'].', '; - $strTxtBlk = substr($strTxtBlk,0,-2); + foreach ($SingleObject['params']['Seq'] as $OneField) $strTxtBlk .= $OneField['TblField'].', '; + $strTxtBlk = substr($strTxtBlk,0,-2); $sql = "SELECT ".$strTxtBlk." FROM ".CompanyDataBase." LIMIT 1;"; $Result=DB_query($sql,$db,'','',false,true); $TxtBlkValues = DB_fetch_row($Result); @@ -540,8 +540,8 @@ return $usrMsg; } $strTxtBlk=''; // Build the fieldlist - foreach ($SingleObject['params']['Seq'] as $OneField) $strTxtBlk .= $OneField['TblField'].', '; - $strTxtBlk = substr($strTxtBlk,0,-2); + foreach ($SingleObject['params']['Seq'] as $OneField) $strTxtBlk .= $OneField['TblField'].', '; + $strTxtBlk = substr($strTxtBlk,0,-2); $sql = "SELECT ".$strTxtBlk.$TrailingSQL; $Result=DB_query($sql,$db,'','',false,true); $TxtBlkValues = DB_fetch_row($Result); @@ -554,7 +554,7 @@ $pdf->AddPage(); // Pre-load all total fields with 'Continued' label for multipage foreach ($FieldListings as $key=>$SingleObject) { - if ($SingleObject['params']['index']=='Ttl') + if ($SingleObject['params']['index']=='Ttl') $FieldListings[$key]['params']['TextField'] = 'Continued'; } // Send the table Modified: trunk/reportwriter/WriteReport.inc =================================================================== --- trunk/reportwriter/WriteReport.inc 2011-01-09 19:26:30 UTC (rev 4221) +++ trunk/reportwriter/WriteReport.inc 2011-01-09 19:35:13 UTC (rev 4222) @@ -6,7 +6,7 @@ var $y0; // current y position var $x0; // current x position var $pageY; // y value of bottom of page less bottom margin - + function PDF() { global $Prefs; $PaperSize = explode(':',$Prefs['papersize']); @@ -18,14 +18,14 @@ } $this->SetMargins($Prefs['marginleft'], $Prefs['margintop'], $Prefs['marginright']); $this->SetAutoPageBreak(0, $Prefs['marginbottom']); - + $this->SetDrawColor(128,0,0); $this->SetLineWidth(.35); // 1 point $this->AliasNbPages(); $this->AddPage(); - + } - + function Header() { global $Prefs, $Heading, $Seq; define(RowSpace,2); // define separation between the heading rows @@ -67,14 +67,14 @@ // Fetch the column break array foreach ($Seq as $Temp) { if ($Temp['break']) { - $ColBreak[] = true; + $ColBreak[] = true; } else { $ColBreak[] = false; } } // See if we need to truncate the data if ($Prefs['TruncListings']['params']=='1') { - $trunc=true; + $trunc=true; } else { $trunc=false; } @@ -91,7 +91,7 @@ $value=$this->TruncData($value, $Prefs['col'.$col.'width']); } $this->MultiCell($CellXPos[$col]-$CellXPos[$col-1],$CellHeight,$value); - if ($ColBreak[$key]) { + if ($ColBreak[$key]) { $col++; $LastY = $this->y0; } else $LastY = $this->GetY(); @@ -104,7 +104,7 @@ $this->Cell(0,$maxY-$this->y0,' ','B'); $this->y0=$maxY+0.35; } - + function SubTitle($Title) { global $Prefs; // substitutes a command string with current information @@ -112,7 +112,7 @@ $Title=preg_replace('/%reportname%/', $Prefs['reportname'], $Title); return $Title; } - + function Footer() { //Position at 1.5 cm from bottom $this->SetY(-15); @@ -121,10 +121,10 @@ //Page number $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C'); } - + function ReportTable($Data) { global $Prefs, $Seq; - + $FillColor = array(224, 235, 255); $this->SetFillColor($FillColor[0],$FillColor[1],$FillColor[2]); $Colors = explode(':',$Prefs['datafontcolor']); @@ -143,7 +143,7 @@ } // See if we need to truncate the data if ($Prefs['TruncListings']['params']=='1') { - $trunc=true; + $trunc=true; } else { $trunc=false; } @@ -185,15 +185,15 @@ // now fall into the 'd' case to show the data case "d": // data element default: - // figure out if a border needs to be drawn for total separation + // figure out if a border needs to be drawn for total separation // and fill color (draws an empty box over the row just written with the fill color) $brdr = 0; if ($NeedTop=='Yes') { - $brdr='T'; + $brdr='T'; $fill=false; // set so first data after total will not be filled $NeedTop='No'; } elseif ($NeedTop=='Next') { - $brdr='LR'; + $brdr='LR'; $NeedTop='Yes'; } // Draw a fill box @@ -223,7 +223,7 @@ // truncate data if necessary if ($trunc) $value=$this->TruncData($value, $Prefs['col'.$col.'width']); $this->MultiCell($CellXPos[$col]-$CellXPos[$col-1],$CellHeight,$value,0); - if ($ColBreak[$key]) { + if ($ColBreak[$key]) { $col++; $LastY = $this->y0; } else $LastY = $this->GetY(); @@ -244,7 +244,7 @@ $this->SetFillColor(255); $this->Cell(0,$this->pageY-$this->y0,'','T',0,'L',1); } - + function TruncData($strData, $ColWidth) { $percent=0.90; //percent to truncate from max to account for proportional spacing $CurWidth = $this->GetStringWidth($strData); @@ -257,7 +257,7 @@ } return $strData; } - + function Stream($FileName) { $this->Output($FileName,'D'); } @@ -267,8 +267,8 @@ function BuildSQL($Prefs) { //fetch the listing fields (must have at least one) to build select field $strField = ''; - if (is_array($Prefs['FieldListings'])) while ($FieldValues = array_shift($Prefs['FieldListings'])) { - if ($FieldValues['visible']) $strField .= $FieldValues['fieldname'].', '; + if (is_array($Prefs['FieldListings'])) while ($FieldValues = array_shift($Prefs['FieldListings'])) { + if ($FieldValues['visible']) $strField .= $FieldValues['fieldname'].', '; } // check for at least one field selected to show if (!$strField) { // No fields are checked to show, that's bad @@ -281,16 +281,16 @@ $Prefs['filterdesc'] = RPT_RPTFILTER; // Initialize the filter display string //fetch the groupings and build first level of SORT BY string (for sub totals) $strGroup = ''; - if (is_array($Prefs['GroupListings'])) while ($FieldValues = array_shift($Prefs['GroupListings'])) { + if (is_array($Prefs['GroupListings'])) while ($FieldValues = array_shift($Prefs['GroupListings'])) { if ($FieldValues['params']=='1') { // then it's the group by field match - $strGroup .= $FieldValues['fieldname']; + $strGroup .= $FieldValues['fieldname']; $Prefs['filterdesc'] .= ' '.RPT_GROUPBY.' '.$FieldValues['displaydesc'].';'; break; } } // fetch the sort order and add to group by string to finish ORDER BY string $strSort = $strGroup; - if (is_array($Prefs['SortListings'])) while ($FieldValues = array_shift($Prefs['SortListings'])) { + if (is_array($Prefs['SortListings'])) while ($FieldValues = array_shift($Prefs['SortListings'])) { if ($FieldValues['params']=='1') { // then it's the sort by field match if ($strSort=='') $strSort=$FieldValues['fieldname']; else $strSort.=', '.$FieldValues['fieldname']; $Prefs['filterdesc'] .= ' '.RPT_SORTBY.' '.$FieldValues['displaydesc'].';'; @@ -328,7 +328,7 @@ $d .= $df."<='".FormatDateForSQL($DateArray[2])."'"; $fildesc .= ' '.RPT_TO.' '.$DateArray[1]; } - $fildesc .= ';'; + $fildesc .= ';'; break; case "c": // RPT_GROUP_TODAY $d = $df."='".$Today."'"; @@ -397,7 +397,7 @@ // Fetch the Criteria $strCrit = ''; $filCrit = ''; - if (is_array($Prefs['CritListings'])) while ($FieldValues = array_shift($Prefs['CritListings'])) { + if (is_array($Prefs['CritListings'])) while ($FieldValues = array_shift($Prefs['CritListings'])) { $Params = explode(':',$FieldValues['params']); switch ($Params[1]) { case RPT_RANGE: @@ -433,7 +433,7 @@ $strCrit .= $FieldValues['fieldname'].'=0'; if (strlen($filCrit)>0) $filCrit .= ' AND '; $filCrit .= $FieldValues['displaydesc'].'='.$Params[1]; - break; + break; case RPT_STOCK: // TBD field to compare so default to nothing case RPT_ASSEMBLY: // TBD field to compare so default to nothing case RPT_ALL: // sql default anyway @@ -447,7 +447,7 @@ if ($Prefs['table3']) $strTable .= ' INNER JOIN '.$Prefs['table3']. ' ON '.$Prefs['table3criteria']; if ($Prefs['table4']) $strTable .= ' INNER JOIN '.$Prefs['table4']. ' ON '.$Prefs['table4criteria']; // Build query string and execute - $sql = 'SELECT '.$strField.' FROM '.$strTable; + $sql = "SELECT ".$strField." FROM ".$strTable; if ($strCrit AND $strDate) $sql .= ' WHERE '.$strDate.' AND '.$strCrit; if (!$strCrit AND $strDate) $sql .= ' WHERE '.$strDate; if ($strCrit AND !$strDate) $sql .= ' WHERE '.$strCrit; @@ -503,7 +503,7 @@ $GrpWorking = $myrow[$GrpField]; // set to new grouping value } $OutputArray[$RowCnt][0] = 'd'; // let the display class know its a data element - foreach($Seq as $key=>$TableCtl) { // + foreach($Seq as $key=>$TableCtl) { // // insert data into output array and set to next column $OutputArray[$RowCnt][$ColCnt] = $myrow[$key]; $ColCnt++; @@ -527,7 +527,7 @@ } // see if we have a total to send $ShowTotals = false; - foreach($Seq as $TotalCtl) if ($TotalCtl['total']=='1') $ShowTotals = true; + foreach($Seq as $TotalCtl) if ($TotalCtl['total']=='1') $ShowTotals = true; if ($ShowTotals) { $OutputArray[$RowCnt][0] = 'r:'.$Prefs['reportname']; foreach($Seq as $TotalCtl) { @@ -577,7 +577,7 @@ header('Expires: '.date('r', time()+60*60)); header('Last-Modified: '.date('r', time())); print $CSVOutput; - exit(); + exit(); } function GeneratePDFFile($Data, $Prefs) { @@ -586,14 +586,14 @@ $pdfcode = $pdf->output(); $len = strlen($pdfcode); $ReportName = ReplaceNonAllowedCharacters($Prefs['reportname']) .'.pdf'; - + header('Content-type: application/pdf'); header('Content-Length: ' . $len); header('Content-Disposition: inline; filename="' . $ReportName . '"'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); - + $pdf->Stream($ReportName); exit(); // needs to be here to properly render the pdf file. } @@ -603,9 +603,9 @@ $DodgyCharactersArray = array('"',' ', '&',"'"); $ContainsDodgyCharacters = true; while ($ContainsDodgyCharacters == true){ - + $ContainsDodgyCharacters = false; //assume all dodgy characters are replaced on the last pass - + foreach ($DodgyCharactersArray as $DodgyCharacter){ if (strpos($String,$DodgyCharacter,0)){ $StrPointer = strpos($String,$DodgyCharacter,0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-01-09 20:09:42
|
Revision: 4228 http://weberp.svn.sourceforge.net/weberp/?rev=4228&view=rev Author: tim_schofield Date: 2011-01-09 20:09:36 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Correct foreign key in recurringsalesorders table Modified Paths: -------------- trunk/RecurringSalesOrders.php trunk/includes/session.inc Modified: trunk/RecurringSalesOrders.php =================================================================== --- trunk/RecurringSalesOrders.php 2011-01-09 20:09:19 UTC (rev 4227) +++ trunk/RecurringSalesOrders.php 2011-01-09 20:09:36 UTC (rev 4228) @@ -267,7 +267,7 @@ discountpercent, narrative) values ('"; - +echo $StartOf_LineItemsSQL; foreach ($_SESSION['Items'.$identifier]->LineItems as $StockItem) { $LineItemsSQL = $StartOf_LineItemsSQL . Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-01-09 20:09:19 UTC (rev 4227) +++ trunk/includes/session.inc 2011-01-09 20:09:36 UTC (rev 4228) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=58; +$DBVersion=59; if (isset($SessionSavePath)){ session_save_path($SessionSavePath); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-01-09 21:04:01
|
Revision: 4238 http://weberp.svn.sourceforge.net/weberp/?rev=4238&view=rev Author: tim_schofield Date: 2011-01-09 21:03:55 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Correct foreign key in recurringsalesorders table Modified Paths: -------------- trunk/RecurringSalesOrders.php trunk/SelectRecurringSalesOrder.php Modified: trunk/RecurringSalesOrders.php =================================================================== --- trunk/RecurringSalesOrders.php 2011-01-09 20:28:16 UTC (rev 4237) +++ trunk/RecurringSalesOrders.php 2011-01-09 21:03:55 UTC (rev 4238) @@ -179,7 +179,6 @@ exit; } If (isset($_POST['Process'])) { - $Result = DB_Txn_Begin($db); $InputErrors =0; If (!Is_Date($_POST['StartDate'])){ $InputErrors =1; @@ -267,7 +266,7 @@ discountpercent, narrative) values ('"; -echo $StartOf_LineItemsSQL; + foreach ($_SESSION['Items'.$identifier]->LineItems as $StockItem) { $LineItemsSQL = $StartOf_LineItemsSQL . @@ -305,7 +304,6 @@ exit; } - $result = DB_Txn_Commit($db); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Search') . Modified: trunk/SelectRecurringSalesOrder.php =================================================================== --- trunk/SelectRecurringSalesOrder.php 2011-01-09 20:28:16 UTC (rev 4237) +++ trunk/SelectRecurringSalesOrder.php 2011-01-09 21:03:55 UTC (rev 4238) @@ -66,7 +66,7 @@ recurringsalesorders.lastrecurrence, recurringsalesorders.stopdate, recurringsalesorders.frequency"; - +echo $SQL; $ErrMsg = _('No recurring orders were returned by the SQL because'); $SalesOrdersResult = DB_query($SQL,$db,$ErrMsg); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-01-10 13:47:17
|
Revision: 4243 http://weberp.svn.sourceforge.net/weberp/?rev=4243&view=rev Author: tim_schofield Date: 2011-01-10 13:47:11 +0000 (Mon, 10 Jan 2011) Log Message: ----------- Improvements to the database upgrade system Modified Paths: -------------- trunk/Z_UpgradeDatabase.php trunk/includes/UpgradeDB_mysql.inc Modified: trunk/Z_UpgradeDatabase.php =================================================================== --- trunk/Z_UpgradeDatabase.php 2011-01-10 12:03:32 UTC (rev 4242) +++ trunk/Z_UpgradeDatabase.php 2011-01-10 13:47:11 UTC (rev 4243) @@ -54,16 +54,25 @@ if (isset($_POST['CreateSQLFile'])) { $SQLFile=fopen("./companies/" . $_SESSION['DatabaseName'] . "/reportwriter/UpgradeDB" . $StartingUpdate ."-".$EndingUpdate.".sql","w"); } - echo '<table>'; + unset($_SESSION['Updates']); + $_SESSION['Updates']['Errors']=0; + $_SESSION['Updates']['Successes']=0; + $_SESSION['Updates']['Warnings']=0; for($UpdateNumber=$StartingUpdate; $UpdateNumber<=$EndingUpdate; $UpdateNumber++) { - echo '<tr><td>'.$UpdateNumber.'</td>'; +// echo '<tr><td>'.$UpdateNumber.'</td>'; $sql="SET FOREIGN_KEY_CHECKS=0"; $result=DB_Query($sql, $db); include('sql/mysql/updates/'.$UpdateNumber.'.php'); $sql="SET FOREIGN_KEY_CHECKS=1"; $result=DB_Query($sql, $db); - echo '</tr>'; +// echo '</tr>'; } + echo '<table class="selection"><tr>'; + echo '<th colspan="4"><font size="2" color="navy"><b>'._('Database Updates Have Been Run').'</b></font></th></tr>'; + echo '<tr><td style="background-color: #fddbdb;color: red;">'.$_SESSION['Updates']['Errors'].' '._('updates have errors in them').'</td></tr>'; + echo '<tr><td style="background-color: #b9ecb4;color: #006400;">'.$_SESSION['Updates']['Successes'].' '._('updates have succeeded').'</td></tr>'; + echo '<tr><td style="background-color: #c7ccf6;color: navy;">'.$_SESSION['Updates']['Warnings'].' '._('updates have not been done as the update was unnecessary on this database').'</td></tr>'; + echo '</table>'; } if (isset($SQLFile)) { // header('Location: Z_UpgradeDatabase.php'); //divert to the db upgrade if the table doesn't exist Modified: trunk/includes/UpgradeDB_mysql.inc =================================================================== --- trunk/includes/UpgradeDB_mysql.inc 2011-01-10 12:03:32 UTC (rev 4242) +++ trunk/includes/UpgradeDB_mysql.inc 2011-01-10 13:47:11 UTC (rev 4243) @@ -368,14 +368,18 @@ function OutputResult($msg, $status) { if ($status=='error') { - echo '<td style="background-color: #fddbdb;color: red;">'; + $_SESSION['Updates']['Errors']++; + $_SESSION['Updates']['Messages'][]=$msg; +// echo '<td style="background-color: #fddbdb;color: red;">'; } else if ($status=='success') { - echo '<td style="background-color: #b9ecb4;color: #006400;">'; + $_SESSION['Updates']['Successes']++; +// echo '<td style="background-color: #b9ecb4;color: #006400;">'; } else { - echo '<td style="background-color: #c7ccf6;color: navy;">'; + $_SESSION['Updates']['Warnings']++; +// echo '<td style="background-color: #c7ccf6;color: navy;">'; } - echo $msg; - echo '</td>'; +// echo $msg; +// echo '</td>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-01-11 12:28:17
|
Revision: 4251 http://weberp.svn.sourceforge.net/weberp/?rev=4251&view=rev Author: tim_schofield Date: 2011-01-11 12:28:10 +0000 (Tue, 11 Jan 2011) Log Message: ----------- Phil: Improvements to Sales Invoice layouts Modified Paths: -------------- trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/companies/weberpdemo/FormDesigns/SalesInvoice.xml trunk/includes/PDFTransPageHeader.inc trunk/includes/PDFTransPageHeaderPortrait.inc Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2011-01-11 11:42:44 UTC (rev 4250) +++ trunk/PrintCustTrans.php 2011-01-11 12:28:10 UTC (rev 4251) @@ -31,7 +31,6 @@ if (isset($PrintPDF) or isset($_GET['PrintPDF']) and $PrintPDF and isset($FromTransNo) and isset($InvOrCredit) and $FromTransNo != '') { $PaperSize = $FormDesign->PaperSize; include ('includes/PDFStarter.php'); - require ('fpdi/fpdi.php'); // Javier: now I use the native constructor, better to not use references if ($InvOrCredit == 'Invoice') { $pdf->addInfo('Title', _('Sales Invoice') . ' ' . $FromTransNo . ' to ' . $_POST['ToTransNo']); @@ -360,92 +359,31 @@ $FromTransNo++; } } /* end loop to print invoices */ -// Start FPDI concatination to append PDF files conditionally to the invoice -// This part taken from FPDI example page -not used yet since change to TCPDF Dec 2009 -if (isset($PrintPDF)) { - class concat_pdf extends FPDI { - var $files = array(); - function setFiles($files) { - $this->files = $files; - } - function concat() { - foreach($this->files as $file) { - if ($file != 'pdf_append/none') { - $pagecount = $this->setSourceFile($file); - for ($i = 1;$i <= $pagecount;$i++) { - $tplidx = $this->ImportPage($i); - $s = $this->getTemplatesize($tplidx); - $this->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); - $this->useTemplate($tplidx); - } - } - } - } - } -} -// $pdf =& new concat_pdf(); -// Have to get the TransNo again, GET[FromTransNo] is updated on each pass of loop -if (isset($_GET['FromTransNo'])) { - $FromTransNo = trim($_GET['FromTransNo']); -} elseif (isset($_POST['FromTransNo'])) { - $FromTransNo = trim($_POST['FromTransNo']); -} -if (!isset($InvOrCredit)) { - $InvOrCredit=''; -} + if (($InvOrCredit == 'Invoice' or $InvOrCredit == 'Credit') and isset($PrintPDF)) { - $sql = "SELECT stockmoves.stockid, stockmaster.appendfile - FROM stockmoves, stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=10 - AND stockmoves.transno='" . $FromTransNo . "' - AND stockmoves.show_on_inv_crds=1"; - // }; - if ($FromTransNo!='Preview') { - $result = DB_query($sql, $db); - } - // Loop the result set and add appendfile if the field is not 0 or none - while (isset($result) and $row = DB_fetch_array($result)) { - if ($row['appendfile'] != '0' AND $row['appendfile'] !== 'none') { - $pdf->setFiles(array($_SESSION['reports_dir'] . '/Invoice.pdf', 'companies/' . $_SESSION['DatabaseName'] . '/pdf_append/' . $row['appendfile'])); - $pdf->concat(); - $pdf->Output($_SESSION['CompanyRecord']['coyname'] . '_Invoice.pdf', 'I'); - exit; - // If EMAIL is selected, send the invoice via email, this is not appending pages yet though - } elseif (isset($_GET['Email'])) { - $pdf->Output($_SESSION['reports_dir'] . '/Invoice.pdf', 'F'); - } else { - // If the appendfile field is empty and EMAIL is not selected, just print the invoice without any appended pages - $pdf->Output($_SESSION['CompanyRecord']['coyname'] . '_Invoice.pdf', 'I'); - exit; - } - } - //End FPDI Concat if (isset($_GET['Email'])) { //email the invoice to address supplied include ('includes/header.inc'); include ('includes/htmlMimeMail.php'); $mail = new htmlMimeMail(); - $filename = $_SESSION['reports_dir'] . '/Invoice.pdf'; - $fp = fopen($_SESSION['reports_dir'] . '/Invoice.pdf', 'wb'); - fwrite($fp, $pdfcode); - fclose($fp); - $attachment = $mail->getFile($filename); + $FileName = $_SESSION['reports_dir'] . '/' . $_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $_GET['FromTransNo'] . '.pdf'; + $pdf->Output($FileName, 'F'); + $Attachment = $mail->getFile($FileName); $mail->setText(_('Please find attached') . ' ' . $InvOrCredit . ' ' . $_GET['FromTransNo']); $mail->SetSubject($InvOrCredit . ' ' . $_GET['FromTransNo']); - $mail->addAttachment($attachment, $filename, 'application/pdf'); + $mail->addAttachment($Attachment, $FileName, 'application/pdf'); $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); $result = $mail->send(array($_GET['Email'])); - unlink($filename); //delete the temporary file + unlink($FileName); //delete the temporary file $title = _('Emailing') . ' ' . $InvOrCredit . ' ' . _('Number') . ' ' . $FromTransNo; include ('includes/header.inc'); - echo "<p>$InvOrCredit " . _('number') . ' ' . $_GET['FromTransNo'] . ' ' . _('has been emailed to') . ' ' . $_GET['Email']; + echo '<p>' . $InvOrCredit . ' ' . _('number') . ' ' . $_GET['FromTransNo'] . ' ' . _('has been emailed to') . ' ' . $_GET['Email']; include ('includes/footer.inc'); exit; } else { - $pdf->OutputD('PrintCustTrans.pdf'); - $pdf->__destruct(); + $pdf->OutputD( $_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $_GET['FromTransNo'] . '.pdf'); } + $pdf->__destruct(); } else { /*The option to print PDF was not hit */ $title = _('Select Invoices/Credit Notes To Print'); include ('includes/header.inc'); Modified: trunk/PrintCustTransPortrait.php =================================================================== --- trunk/PrintCustTransPortrait.php 2011-01-11 11:42:44 UTC (rev 4250) +++ trunk/PrintCustTransPortrait.php 2011-01-11 12:28:10 UTC (rev 4251) @@ -41,9 +41,9 @@ and isset($InvOrCredit) and $FromTransNo!=''){ - include ('includes/class.pdf.php'); - require('fpdi/fpdi.php'); + include ('includes/class.pdf.php'); + $Page_Width=595; $Page_Height=842; $Top_Margin=30; @@ -487,101 +487,35 @@ $FromTransNo++; } /* end loop to print invoices */ -/* Javier: This actually would produce the output, and maybe it should do -// $pdfcode = $pdf->stream(); - $pdfcode = $pdf->Output('Invoice.pdf', "I"); una mala jugada de cierta persona - $len = strlen($pdfcode); Este fichero es especial pq $len anulado en L596 -*/ -// Start FPDI concatination to append PDF files conditionally to the invoice -// This part taken from FPDI example page - but not actually used .... yet Muz?? -class concat_pdf extends FPDI { - - var $files = array(); - - function setFiles($files) { - $this->files = $files; - } - - function concat() { - foreach($this->files AS $file) { - $pagecount = $this->setSourceFile($file); - for ($i = 1; $i <= $pagecount; $i++) { - $tplidx = $this->ImportPage($i); - $s = $this->getTemplatesize($tplidx); - $this->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); - $this->useTemplate($tplidx); - } - } - } - } - -// $pdf =& new concat_pdf(); - -// Have to get the TransNo again, $_GET{FromTransNo] is updated with each pass - if (isset($_GET['FromTransNo'])){ - $FromTransNo = trim($_GET['FromTransNo']); - } elseif (isset($_POST['FromTransNo'])){ - $FromTransNo = trim($_POST['FromTransNo']); - } - // Check its an Invoice type again, then select appendfile filename - if ($InvOrCredit=='Invoice'){ - $sql = "SELECT stockmoves.stockid, stockmaster.appendfile - FROM stockmoves INNER JOIN stockmaster - ON stockmoves.stockid = stockmaster.stockid - WHERE stockmoves.type=10 - AND stockmoves.transno='" . $FromTransNo . "' - AND stockmoves.show_on_inv_crds=1"; - } else { - $sql = "SELECT stockmoves.stockid, stockmaster.appendfile - FROM stockmoves INNER JOIN stockmaster - ON stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=11 - AND stockmoves.transno='" . $FromTransNo . "' - AND stockmoves.show_on_inv_crds=1"; - } - $result=DB_query($sql,$db); - // Loop the result set and add appendfile if the field is not 0 or none - - while ($row=DB_fetch_array($result)){ - if ($row['appendfile'] !='0' AND $row['appendfile'] !=='none') { - $pdf->setFiles(array($_SESSION['reports_dir'] . '/Invoice.pdf','companies/' . $_SESSION['DatabaseName'] . '/pdf_append/' . $row['appendfile'])); - $pdf->concat(); - } - }//End FPDI Concat - if (isset($_GET['Email'])){ //email the invoice to address supplied include('includes/header.inc'); include ('includes/htmlMimeMail.php'); - $pdf->Output($_SESSION['reports_dir'] . '/Invoice.pdf','F'); - $pdf-> __destruct(); + $FileName = $_SESSION['reports_dir'] . '/' . $_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $_GET['FromTransNo'] . '.pdf'; + $pdf->Output($FileName,'F'); $mail = new htmlMimeMail(); - $filename = $_SESSION['reports_dir'] . '/Invoice.pdf'; - $fp = fopen( $_SESSION['reports_dir'] . '/Invoice.pdf','wb'); - fwrite ($fp, $pdfcode); - fclose ($fp); - $attachment = $mail->getFile($filename); + $Attachment = $mail->getFile($FileName); $mail->setText(_('Please find attached') . ' ' . $InvOrCredit . ' ' . $_GET['FromTransNo'] ); $mail->SetSubject($InvOrCredit . ' ' . $_GET['FromTransNo']); - $mail->addAttachment($attachment, $filename, 'application/pdf'); + $mail->addAttachment($Attachment, $FileName, 'application/pdf'); $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); $result = $mail->send(array($_GET['Email'])); - unlink($filename); //delete the temporary file + unlink($FileName); //delete the temporary file $title = _('Emailing') . ' ' .$InvOrCredit . ' ' . _('Number') . ' ' . $FromTransNo; include('includes/header.inc'); - echo "<p>$InvOrCredit " . _('number') . ' ' . $_GET['FromTransNo'] . ' ' . _('has been emailed to') . ' ' . $_GET['Email']; + echo '<p>' . $InvOrCredit . ' ' . _('number') . ' ' . $_GET['FromTransNo'] . ' ' . _('has been emailed to') . ' ' . $_GET['Email']; include('includes/footer.inc'); exit; } else { //its not an email just print the invoice to PDF - $pdf->OutputD($_SESSION['DatabaseName'] . '_Invoice' . date('Y-m-d') . '.pdf'); - $pdf-> __destruct(); - } + $pdf->OutputD($_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $_GET['FromTransNo'] . '.pdf'); + } + $pdf->__destruct(); } else { /*The option to print PDF was not hit */ $title=_('Select Invoices/Credit Notes To Print'); Modified: trunk/companies/weberpdemo/FormDesigns/SalesInvoice.xml =================================================================== --- trunk/companies/weberpdemo/FormDesigns/SalesInvoice.xml 2011-01-11 11:42:44 UTC (rev 4250) +++ trunk/companies/weberpdemo/FormDesigns/SalesInvoice.xml 2011-01-11 12:28:10 UTC (rev 4251) @@ -15,7 +15,7 @@ </Title> <BillingDetailBox type="CurvedRectangle" name="Billing detail box" id="BillingDetailBox"> <x>567</x> - <y>51</y> + <y>61</y> <width>225</width> <height>88</height> <radius>10</radius> @@ -248,7 +248,7 @@ </Currency> <MainOutputBox type="CurvedRectangle" name="Main Output Box" id="MainOutputBox"> <x>40</x> - <y>164</y> + <y>176</y> <width>762</width> <height>390</height> <radius>10</radius> @@ -256,44 +256,44 @@ <CustomerTaxReferenceCaption type="SimpleText" name="Customer Tax Reference Caption" id="CustomerTaxReferenceCaption"> <FontSize>10</FontSize> <x>44</x> - <y>174</y> + <y>166</y> </CustomerTaxReferenceCaption> <CustomerTaxReference type="SimpleText" name="Customer Tax Reference" id="CustomerTaxReference"> <FontSize>10</FontSize> <x>130</x> - <y>174</y> + <y>166</y> </CustomerTaxReference> <OrderRefLine type="Line" name="Order Reference Line" id="OrderRefLine"> <startx>288</startx> - <starty>155</starty> + <starty>165</starty> <endx>288</endx> <endy>182</endy> </OrderRefLine> <CustomerOrderReferenceCaption type="SimpleText" name="Customer Order Reference Caption" id="CustomerOrderReferenceCaption"> <FontSize>10</FontSize> <x>290</x> - <y>174</y> + <y>166</y> </CustomerOrderReferenceCaption> <CustomerOrderReference type="SimpleText" name="Customer Order Reference" id="CustomerOrderReference"> <FontSize>10</FontSize> <x>388</x> - <y>174</y> + <y>166</y> </CustomerOrderReference> <SalesmanLine type="Line" name="Salesman Line" id="SalesmanLine"> <startx>490</startx> - <starty>155</starty> + <starty>165</starty> <endx>490</endx> <endy>182</endy> </SalesmanLine> <SalesmanReferenceCaption type="SimpleText" name="Salesman Reference Caption" id="SalesmanReferenceCaption"> <FontSize>10</FontSize> <x>493</x> - <y>174</y> + <y>166</y> </SalesmanReferenceCaption> <SalesmanReference type="SimpleText" name="Salesman Reference" id="SalesmanReference"> <FontSize>10</FontSize> <x>570</x> - <y>174</y> + <y>166</y> </SalesmanReference> <LineAboveColumns type="Line" name="Line Above Columns" id="LineAboveColumns"> <startx>40</startx> @@ -311,37 +311,37 @@ <Column1 type="SimpleText" name="Heading 1" id="Heading1"> <FontSize>10</FontSize> <x>44</x> - <y>194</y> + <y>184</y> </Column1> <Column2 type="SimpleText" name="Heading 2" id="Heading2"> <FontSize>10</FontSize> <x>140</x> - <y>194</y> + <y>184</y> </Column2> <Column3 type="SimpleText" name="Heading 3" id="Heading3"> <FontSize>10</FontSize> <x>431</x> - <y>194</y> + <y>184</y> </Column3> <Column4 type="SimpleText" name="Heading 4" id="Heading4"> <FontSize>10</FontSize> <x>541</x> - <y>194</y> + <y>184</y> </Column4> <Column5 type="SimpleText" name="Heading 5" id="Heading5"> <FontSize>10</FontSize> <x>596</x> - <y>194</y> + <y>184</y> </Column5> <Column6 type="SimpleText" name="Heading 6" id="Heading6"> <FontSize>10</FontSize> <x>631</x> - <y>194</y> + <y>184</y> </Column6> <Column7 type="SimpleText" name="Heading 7" id="Heading7"> <FontSize>10</FontSize> <x>731</x> - <y>194</y> + <y>184</y> </Column7> </Headings> <Data type="ElementArray" name="Column Data"> @@ -441,7 +441,7 @@ <SubTotalCaption type="SimpleText" name="Sub-Total Caption" id="SubTotalCaption"> <FontSize>10</FontSize> <x>592</x> - <y>512</y> + <y>502</y> </SubTotalCaption> <SubTotal type="MultiLineText" name="Sub-Total" id="SubTotal"> <FontSize>10</FontSize> @@ -452,7 +452,7 @@ <FreightCaption type="SimpleText" name="Freight Caption" id="FreightCaption"> <FontSize>10</FontSize> <x>592</x> - <y>528</y> + <y>518</y> </FreightCaption> <Freight type="MultiLineText" name="Freight" id="Freight"> <FontSize>10</FontSize> @@ -463,7 +463,7 @@ <TaxCaption type="SimpleText" name="Tax Caption" id="TaxCaption"> <FontSize>10</FontSize> <x>592</x> - <y>544</y> + <y>534</y> </TaxCaption> <Tax type="MultiLineText" name="Tax" id="Tax"> <FontSize>10</FontSize> @@ -479,14 +479,14 @@ </TotalLine> <RomalpaLine type="Line" name="Romalpa Line" id="RomalpaLine"> <startx>590</startx> - <starty>490</starty> + <starty>500</starty> <endx>590</endx> - <endy>565</endy> + <endy>575</endy> </RomalpaLine> <TotalCaption type="SimpleText" name="Total Caption" id="TotalCaption"> <FontSize>10</FontSize> <x>592</x> - <y>560</y> + <y>550</y> </TotalCaption> <Total type="MultiLineText" name="Total" id="Total"> <FontSize>10</FontSize> Modified: trunk/includes/PDFTransPageHeader.inc =================================================================== --- trunk/includes/PDFTransPageHeader.inc 2011-01-11 11:42:44 UTC (rev 4250) +++ trunk/includes/PDFTransPageHeader.inc 2011-01-11 12:28:10 UTC (rev 4251) @@ -71,7 +71,11 @@ } /*draw a nice curved corner box around the billing details */ /*from the top right*/ -$pdf->RoundRectangle($FormDesign->BillingDetailBox->x, $Page_Height - $FormDesign->BillingDetailBox->y,$FormDesign->BillingDetailBox->width, $FormDesign->BillingDetailBox->height, $FormDesign->BillingDetailBox->radius); +$pdf->RoundRectangle($FormDesign->BillingDetailBox->x, + $Page_Height - $FormDesign->BillingDetailBox->y, + $FormDesign->BillingDetailBox->width, + $FormDesign->BillingDetailBox->height, + $FormDesign->BillingDetailBox->radius); $pdf->addText($FormDesign->NumberCaption->x, $Page_Height -$FormDesign->NumberCaption->y, $FormDesign->NumberCaption->FontSize, _('Number')); $pdf->addText($FormDesign->InvoiceNumber->x, $Page_Height -$FormDesign->InvoiceNumber->y, $FormDesign->InvoiceNumber->FontSize, $FromTransNo); @@ -160,28 +164,41 @@ /*draw a box with nice round corner for entering line items */ /*90 degree arc at top right of box 0 degrees starts a bottom */ -$pdf->RoundRectangle($FormDesign->MainOutputBox->x, $Page_Height - $FormDesign->MainOutputBox->y,$FormDesign->MainOutputBox->width, $FormDesign->MainOutputBox->height, $FormDesign->MainOutputBox->radius); +$pdf->RoundRectangle($FormDesign->MainOutputBox->x, + $Page_Height - $FormDesign->MainOutputBox->y, + $FormDesign->MainOutputBox->width, + $FormDesign->MainOutputBox->height, + $FormDesign->MainOutputBox->radius); /*Set up headings */ $pdf->addText($FormDesign->CustomerTaxReferenceCaption->x, $Page_Height -$FormDesign->CustomerTaxReferenceCaption->y, $FormDesign->CustomerTaxReferenceCaption->FontSize, _('Customer Tax Ref') . ':'); $pdf->addText($FormDesign->CustomerTaxReference->x, $Page_Height -$FormDesign->CustomerTaxReference->y, $FormDesign->CustomerTaxReference->FontSize, $myrow['taxref']); /*Print a vertical line */ -$pdf->line($FormDesign->OrderRefLine->startx, $Page_Height -$FormDesign->OrderRefLine->starty,$FormDesign->OrderRefLine->endx, $Page_Height -$FormDesign->OrderRefLine->endy); +$pdf->line($FormDesign->OrderRefLine->startx, + $Page_Height -$FormDesign->OrderRefLine->starty, + $FormDesign->OrderRefLine->endx, + $Page_Height -$FormDesign->OrderRefLine->endy); $pdf->addText($FormDesign->CustomerOrderReferenceCaption->x, $Page_Height -$FormDesign->CustomerOrderReferenceCaption->y, $FormDesign->CustomerOrderReferenceCaption->FontSize, _('Customer Order Ref.') . ':'); $pdf->addText($FormDesign->CustomerOrderReference->x, $Page_Height -$FormDesign->CustomerOrderReference->y, $FormDesign->CustomerOrderReference->FontSize, $myrow['customerref']); /*Print a vertical line */ -$pdf->line($FormDesign->SalesmanLine->startx, $Page_Height -$FormDesign->SalesmanLine->starty,$FormDesign->SalesmanLine->endx, $Page_Height -$FormDesign->SalesmanLine->endy); +$pdf->line($FormDesign->SalesmanLine->startx, + $Page_Height -$FormDesign->SalesmanLine->starty, + $FormDesign->SalesmanLine->endx, + $Page_Height -$FormDesign->SalesmanLine->endy); $pdf->addText($FormDesign->SalesmanReferenceCaption->x, $Page_Height -$FormDesign->SalesmanReferenceCaption->y, $FormDesign->SalesmanReferenceCaption->FontSize, _('Sales Person') . ':'); $pdf->addText($FormDesign->SalesmanReference->x, $Page_Height -$FormDesign->SalesmanReference->y, $FormDesign->SalesmanReference->FontSize, $myrow['salesmanname']); /*draw a line */ -$pdf->line($FormDesign->LineAboveColumns->startx, $Page_Height -$FormDesign->LineAboveColumns->starty,$FormDesign->LineAboveColumns->endx, $Page_Height -$FormDesign->LineAboveColumns->endy); +$pdf->line($FormDesign->LineAboveColumns->startx, + $Page_Height -$FormDesign->LineAboveColumns->starty, + $FormDesign->LineAboveColumns->endx, + $Page_Height -$FormDesign->LineAboveColumns->endy); -$pdf->addText($FormDesign->Headings->Column1->x,$Page_Height - $FormDesign->Headings->Column1->y, $FormDesign->Headings->Column1->FontSize, _('Item Code')); +$pdf->addText($FormDesign->Headings->Column1->x, $Page_Height - $FormDesign->Headings->Column1->y, $FormDesign->Headings->Column1->FontSize, _('Item Code')); $pdf->addText($FormDesign->Headings->Column2->x,$Page_Height - $FormDesign->Headings->Column2->y, $FormDesign->Headings->Column2->FontSize, _('Description')); $pdf->addText($FormDesign->Headings->Column3->x,$Page_Height - $FormDesign->Headings->Column3->y, $FormDesign->Headings->Column3->FontSize, _('Unit Price')); $pdf->addText($FormDesign->Headings->Column4->x,$Page_Height - $FormDesign->Headings->Column4->y, $FormDesign->Headings->Column4->FontSize, _('Quantity')); @@ -190,6 +207,9 @@ $pdf->addText($FormDesign->Headings->Column7->x,$Page_Height - $FormDesign->Headings->Column7->y, $FormDesign->Headings->Column7->FontSize, _('Extended Price')); /*draw a line */ -$pdf->line($FormDesign->LineBelowColumns->startx, $Page_Height -$FormDesign->LineBelowColumns->starty,$FormDesign->LineBelowColumns->endx, $Page_Height -$FormDesign->LineBelowColumns->endy); +$pdf->line($FormDesign->LineBelowColumns->startx, + $Page_Height -$FormDesign->LineBelowColumns->starty, + $FormDesign->LineBelowColumns->endx, + $Page_Height -$FormDesign->LineBelowColumns->endy); ?> \ No newline at end of file Modified: trunk/includes/PDFTransPageHeaderPortrait.inc =================================================================== --- trunk/includes/PDFTransPageHeaderPortrait.inc 2011-01-11 11:42:44 UTC (rev 4250) +++ trunk/includes/PDFTransPageHeaderPortrait.inc 2011-01-11 12:28:10 UTC (rev 4251) @@ -9,7 +9,7 @@ $YPos = $Page_Height - $Top_Margin; -$pdf->addJpegFromFile($_SESSION['LogoFile'],$Page_Width/2 -115,$YPos-35,0,35); +$pdf->addJpegFromFile($_SESSION['LogoFile'],$Page_Width/2 -115,$YPos-50,0,35); $FontSize =15; if ($InvOrCredit=='Invoice') { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-01-11 12:42:15
|
Revision: 4252 http://weberp.svn.sourceforge.net/weberp/?rev=4252&view=rev Author: tim_schofield Date: 2011-01-11 12:42:08 +0000 (Tue, 11 Jan 2011) Log Message: ----------- Phil: Improvements to Supplier Invoice and Credit notes Modified Paths: -------------- trunk/SupplierCredit.php trunk/SupplierInvoice.php Modified: trunk/SupplierCredit.php =================================================================== --- trunk/SupplierCredit.php 2011-01-11 12:28:10 UTC (rev 4251) +++ trunk/SupplierCredit.php 2011-01-11 12:42:08 UTC (rev 4252) @@ -661,22 +661,21 @@ the debit is to creditors control act done later for the total credit note value + tax*/ $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount, - jobref) - VALUES (21, - '" . $CreditNoteNo . "', - '" . $SQLCreditNoteDate . "', - '" . $PeriodNo . "', - '" . $EnteredGLCode->GLCode . "', - '" . $_SESSION['SuppTrans']->SupplierID . " " . $EnteredGLCode->Narrative . "', - '" . round(-$EnteredGLCode->Amount/$_SESSION['SuppTrans']->ExRate,2) ."', - '' - )"; + typeno, + trandate, + periodno, + account, + narrative, + amount, + jobref) + VALUES (21, + '" . $CreditNoteNo . "', + '" . $SQLCreditNoteDate . "', + '" . $PeriodNo . "', + '" . $EnteredGLCode->GLCode . "', + '" . $_SESSION['SuppTrans']->SupplierID . " " . $EnteredGLCode->Narrative . "', + '" . round(-$EnteredGLCode->Amount/$_SESSION['SuppTrans']->ExRate,2) ."', + '' )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added because'); @@ -694,20 +693,19 @@ these entries are reversed from the GRN suspense when the shipment is closed - entries only to open shipts*/ $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES (21, - '" . $CreditNoteNo . "', - '" . $SQLCreditNoteDate . "', - '" . $PeriodNo . "', - '" . $_SESSION['SuppTrans']->GRNAct . "', - '" . $_SESSION['SuppTrans']->SupplierID . ' ' . _('Shipment credit against') . ' ' . $ShiptChg->ShiptRef . "', - '" . round(-$ShiptChg->Amount/$_SESSION['SuppTrans']->ExRate,2) . "' - )"; + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (21, + '" . $CreditNoteNo . "', + '" . $SQLCreditNoteDate . "', + '" . $PeriodNo . "', + '" . $_SESSION['SuppTrans']->GRNAct . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' ' . _('Shipment credit against') . ' ' . $ShiptChg->ShiptRef . "', + '" . round(-$ShiptChg->Amount/$_SESSION['SuppTrans']->ExRate,2) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction for the shipment') . ' ' . $ShiptChg->ShiptRef . ' ' . _('could not be added because'); $DbgMsg = _('The following SQL to insert the GL transaction was used'); @@ -810,7 +808,7 @@ } - $PurchPriceVar = round($EnteredGRN->This_QuantityInv * (($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit),2); + $PurchPriceVar = $EnteredGRN->This_QuantityInv * (($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit); /*Yes but where to post this difference to - if its a stock item the variance account must be retrieved from the stock category record if its a nominal purchase order item with no stock item then post it to the account specified in the purchase order detail record */ @@ -1125,7 +1123,8 @@ $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } - /* Now update the GRN and PurchOrderDetails records for amounts invoiced */ + /* Now update the GRN and PurchOrderDetails records for amounts invoiced + * can't use the previous loop around GRNs as this was only for where the creditors->GL link was active*/ foreach ($_SESSION['SuppTrans']->GRNs as $EnteredGRN){ @@ -1169,34 +1168,37 @@ $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); } if ($EnteredGRN->AssetID!=0) { //then it is an asset - /*Add the fixed asset trans for the difference in the cost */ - $SQL = "INSERT INTO fixedassettrans (assetid, - transtype, - transno, - transdate, - periodno, - inputdate, - fixedassettranstype, - amount) - VALUES ('" . $EnteredGRN->AssetID . "', - 21, - '" . $CreditNoteNo . "', - '" . $SQLCreditNoteDate . "', - '" . $PeriodNo . "', - '" . Date('Y-m-d') . "', - 'cost', - '" . -($PurchPriceVar) . "')"; - $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE The fixed asset transaction could not be inserted because'); - $DbgMsg = _('The following SQL to insert the fixed asset transaction record was used'); - $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); + $PurchPriceVar = $EnteredGRN->This_QuantityInv * (($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit); + if ($PurchPriceVar !=0){ + /*Add the fixed asset trans for the difference in the cost */ + $SQL = "INSERT INTO fixedassettrans (assetid, + transtype, + transno, + transdate, + periodno, + inputdate, + fixedassettranstype, + amount) + VALUES ('" . $EnteredGRN->AssetID . "', + 21, + '" . $CreditNoteNo . "', + '" . $SQLCreditNoteDate . "', + '" . $PeriodNo . "', + '" . Date('Y-m-d') . "', + 'cost', + '" . -($PurchPriceVar) . "')"; + $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE The fixed asset transaction could not be inserted because'); + $DbgMsg = _('The following SQL to insert the fixed asset transaction record was used'); + $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); - /*Now update the asset cost in fixedassets table */ - $SQL = "UPDATE fixedassets SET cost = cost - " . $PurchPriceVar . " - WHERE assetid = '" . $EnteredGRN->AssetID . "'"; - $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE. The fixed asset cost was not able to be updated because:'); - $DbgMsg = _('The following SQL was used to attempt the update of the fixed asset cost:'); - $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); - } + /*Now update the asset cost in fixedassets table */ + $SQL = "UPDATE fixedassets SET cost = cost - " . $PurchPriceVar . " + WHERE assetid = '" . $EnteredGRN->AssetID . "'"; + $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE. The fixed asset cost was not able to be updated because:'); + $DbgMsg = _('The following SQL was used to attempt the update of the fixed asset cost:'); + $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); + } //end if there is a cost difference on invoice compared to purchase order for the fixed asset + }//the line is a fixed asset } /* end of the loop to do the updates for the quantity of order items the supplier has credited */ /*Add shipment charges records as necessary */ Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2011-01-11 12:28:10 UTC (rev 4251) +++ trunk/SupplierInvoice.php 2011-01-11 12:42:08 UTC (rev 4252) @@ -7,7 +7,7 @@ Also an array of GLCodes objects - only used if the AP - GL link is effective Also an array of shipment charges for charges to shipments to be apportioned accross the cost of stock items */ -//$PageSecurity = 5; +//$PageSecurity = 5; now retrieved from database include('includes/DefineSuppTransClass.php'); /* Session started in header.inc for password checking and authorisation level check */ @@ -1122,10 +1122,11 @@ $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } - /* Now update the GRN and PurchOrderDetails records for amounts invoiced */ + /* Now update the GRN and PurchOrderDetails records for amounts invoiced - can't use the other loop through the GRNs as this was only where the GL link to credtors is active */ foreach ($_SESSION['SuppTrans']->GRNs as $EnteredGRN){ + $SQL = "UPDATE purchorderdetails SET qtyinvoiced = qtyinvoiced + " . $EnteredGRN->This_QuantityInv .", actprice = '" . $EnteredGRN->ChgPrice . "' WHERE podetailitem = '" . $EnteredGRN->PODetailItem . "'"; @@ -1166,32 +1167,35 @@ if ($EnteredGRN->AssetID!=0) { //then it is an asset - /*Add the fixed asset trans for the difference in the cost */ - $SQL = "INSERT INTO fixedassettrans (assetid, - transtype, - transno, - transdate, - periodno, - inputdate, - fixedassettranstype, - amount) - VALUES ('" . $EnteredGRN->AssetID . "', - 20, - '" . $InvoiceNo . "', - '" . $SQLInvoiceDate . "', - '" . $PeriodNo . "', - '" . Date('Y-m-d') . "', - 'cost', - '" . ($PurchPriceVar) . "')"; - $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE The fixed asset transaction could not be inserted because'); - $DbgMsg = _('The following SQL to insert the fixed asset transaction record was used'); - $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); + $PurchPriceVar = $EnteredGRN->This_QuantityInv * (($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit); + if ($PurchPriceVar !=0) { + /*Add the fixed asset trans for the difference in the cost */ + $SQL = "INSERT INTO fixedassettrans (assetid, + transtype, + transno, + transdate, + periodno, + inputdate, + fixedassettranstype, + amount) + VALUES ('" . $EnteredGRN->AssetID . "', + 20, + '" . $InvoiceNo . "', + '" . $SQLInvoiceDate . "', + '" . $PeriodNo . "', + '" . Date('Y-m-d') . "', + 'cost', + '" . ($PurchPriceVar) . "')"; + $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE The fixed asset transaction could not be inserted because'); + $DbgMsg = _('The following SQL to insert the fixed asset transaction record was used'); + $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); - /*Now update the asset cost in fixedassets table */ - $SQL = "UPDATE fixedassets SET cost = cost - " . ($PurchPriceVar) . " WHERE assetid = '" . $EnteredGRN->AssetID . "'"; - $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE. The fixed asset cost could not be updated because:'); - $DbgMsg = _('The following SQL was used to attempt the update of the asset cost:'); - $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); + /*Now update the asset cost in fixedassets table */ + $SQL = "UPDATE fixedassets SET cost = cost + " . ($PurchPriceVar) . " WHERE assetid = '" . $EnteredGRN->AssetID . "'"; + $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE. The fixed asset cost could not be updated because:'); + $DbgMsg = _('The following SQL was used to attempt the update of the asset cost:'); + $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); + } //end if there was a difference in the cost } //the item was an asset received on a purchase order } /* end of the GRN loop to do the updates for the quantity of order items the supplier has invoiced */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-01-13 10:31:38
|
Revision: 4260 http://weberp.svn.sourceforge.net/weberp/?rev=4260&view=rev Author: tim_schofield Date: 2011-01-13 10:31:31 +0000 (Thu, 13 Jan 2011) Log Message: ----------- Phil SupplierInvoice.php and SupplierCredit.php now check to ensure the total of contracts fixed asset charges goods received charges, shipment charges and GL charges are at least equal to the amount of the invoice or credit. It was possible when GL interface turned off to get strange results Modified Paths: -------------- trunk/SupplierCredit.php trunk/SupplierInvoice.php Modified: trunk/SupplierCredit.php =================================================================== --- trunk/SupplierCredit.php 2011-01-12 10:49:39 UTC (rev 4259) +++ trunk/SupplierCredit.php 2011-01-13 10:31:31 UTC (rev 4260) @@ -608,9 +608,9 @@ } elseif (DateDiff(Date($_SESSION['DefaultDateFormat']), $_SESSION['SuppTrans']->TranDate, "d") < 0){ $InputError = True; prnMsg(_('The credit note as entered cannot be processed because the date is after today') . '. ' . _('Purchase credit notes are expected to have a date prior to or today'),'error'); - }elseif ($_SESSION['SuppTrans']->ExRate <= 0){ + }elseif ($_SESSION['SuppTrans']->OvAmount < round($TotalGRNValue + $TotalGLValue + $TotalAssetValue + $TotalShiptValue + $TotalContractsValue,2)){ + prnMsg(_('The credit note total as entered is less than the sum of the shipment charges, the general ledger entries (if any) and the charges for goods received, contracts and fixed assets. There must be a mistake somewhere, the credit note as entered will not be processed'),'error'); $InputError = True; - prnMsg(_('The credit note as entered cannot be processed because the exchange rate for the credit note has been entered as a negative or zero number') . '. ' . _('The exchange rate is expected to show how many of the suppliers currency there are in 1 of the local currency'),'warn'); }elseif ($_SESSION['SuppTrans']->OvAmount < round($TotalShiptValue + $TotalGLValue + $TotalAssetValue + $TotalGRNValue,2)){ prnMsg(_('The credit note total as entered is less than the sum of the shipment charges') . ', ' . _('the general ledger entries (if any) and the charges for goods received') . '. ' . _('There must be a mistake somewhere') . ', ' . _('the credit note as entered will not be processed'),'error'); $InputError = True; Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2011-01-12 10:49:39 UTC (rev 4259) +++ trunk/SupplierInvoice.php 2011-01-13 10:31:31 UTC (rev 4260) @@ -574,8 +574,7 @@ }elseif ( $_SESSION['SuppTrans']->ExRate <= 0){ $InputError = True; - prnMsg( _('The invoice as entered cannot be processed because the exchange rate for the invoice has been entered as a negative or zero number') . '. ' . _('The exchange rate is expected to show how many of the suppliers currency there are in 1 of the local currency'),'error'); - + prnMsg( _('The invoice total as entered is less than the sum of the shipment charges, the general ledger entries (if any), the charges for goods received, contract charges and fixed asset charges. There must be a mistake somewhere, the invoice as entered will not be processed'),'error'); }elseif ( $_SESSION['SuppTrans']->OvAmount < round($TotalShiptValue + $TotalGLValue + $TotalContractsValue+ $TotalAssetValue+$TotalGRNValue,2)){ prnMsg( _('The invoice total as entered is less than the sum of the shipment charges, the general ledger entries (if any) and the charges for goods received') . '. ' . _('There must be a mistake somewhere, the invoice as entered will not be processed'),'error'); $InputError = True; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-01-13 15:13:55
|
Revision: 4261 http://weberp.svn.sourceforge.net/weberp/?rev=4261&view=rev Author: tim_schofield Date: 2011-01-13 15:13:46 +0000 (Thu, 13 Jan 2011) Log Message: ----------- Update links to show correct addresses Modified Paths: -------------- trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/MailInventoryValuation.php trunk/PrintCustOrder.php trunk/PrintCustTransPortrait.php trunk/Z_CreateCompanyTemplateFile.php trunk/css/default/default.css trunk/css/fresh/default.css trunk/css/gel/default.css trunk/css/jelly/default.css trunk/css/professional/default.css trunk/css/professional-rtl/default.css trunk/css/silverwolf/default.css trunk/doc/INSTALL.txt trunk/doc/Manual/ManualContributors.html trunk/doc/Manual/ManualGettingStarted.html trunk/doc/Manual/ManualMultilanguage.html trunk/doc/README.txt trunk/includes/PDFSalesAnalysis.inc trunk/includes/PDFStarter.php trunk/includes/class.pdf.php trunk/includes/footer.inc trunk/install/index.php trunk/locale/de_DE.utf8/Manual/ManualContributors.html trunk/locale/de_DE.utf8/Manual/ManualGettingStarted.html trunk/locale/de_DE.utf8/Manual/ManualMultilanguage.html trunk/locale/zh_CN.utf8/Manual/ManualGettingStarted.html trunk/locale/zh_HK.utf8/Manual/ManualGettingStarted.html Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/InventoryPlanning.php 2011-01-13 15:13:46 UTC (rev 4261) @@ -30,7 +30,7 @@ // Javier: better to not use references // $pdf = & new Cpdf($PageSize); $pdf = new Cpdf('L', 'pt', 'A4'); - $pdf->addInfo('Creator','webERP http://www.weberp.org'); + $pdf->addInfo('Creator','webERP http://www.web-erp.org'); $pdf->addInfo('Author','webERP ' . $Version); $pdf->addInfo('Title',_('Inventory Planning Report') . ' ' . Date($_SESSION['DefaultDateFormat'])); $pdf->addInfo('Subject',_('Inventory Planning')); Modified: trunk/InventoryPlanningPrefSupplier.php =================================================================== --- trunk/InventoryPlanningPrefSupplier.php 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/InventoryPlanningPrefSupplier.php 2011-01-13 15:13:46 UTC (rev 4261) @@ -128,7 +128,7 @@ $pdf = new Cpdf('L', 'pt', 'A4'); $pdf->addInfo('Author','webERP ' . $Version); - $pdf->addInfo('Creator','webERP http://www.weberp.org'); + $pdf->addInfo('Creator','webERP http://www.web-erp.org'); $pdf->addInfo('Title',_('Inventory Planning Based On Lead Time Of Preferred Supplier') . ' ' . Date($_SESSION['DefaultDateFormat'])); // $PageNumber = 0; $pdf->addInfo('Subject',_('Inventory Planning Based On Lead Time Of Preferred Supplier')); Modified: trunk/MailInventoryValuation.php =================================================================== --- trunk/MailInventoryValuation.php 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/MailInventoryValuation.php 2011-01-13 15:13:46 UTC (rev 4261) @@ -39,7 +39,7 @@ /* Standard PDF file creation header stuff */ -$pdf->addInfo('Creator','WebERP http://www.weberp.org'); +$pdf->addInfo('Creator','WebERP http://www.web-erp.org'); $pdf->addInfo('Author','WebERP ' . $Version); Modified: trunk/PrintCustOrder.php =================================================================== --- trunk/PrintCustOrder.php 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/PrintCustOrder.php 2011-01-13 15:13:46 UTC (rev 4261) @@ -140,7 +140,7 @@ // $pdf = & new Cpdf($PageSize); $pdf = new Cpdf('L', 'pt', 'LETTER'); - $pdf->addInfo('Creator', 'webERP http://www.weberp.org'); + $pdf->addInfo('Creator', 'webERP http://www.web-erp.org'); $pdf->addInfo('Author', 'webERP ' . $Version); $pdf->addInfo('Title', _('Customer Packing Slip') ); $pdf->addInfo('Subject', _('Packing slip for order') . ' ' . $_GET['TransNo']); Modified: trunk/PrintCustTransPortrait.php =================================================================== --- trunk/PrintCustTransPortrait.php 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/PrintCustTransPortrait.php 2011-01-13 15:13:46 UTC (rev 4261) @@ -53,7 +53,7 @@ $pdf = new Cpdf('P', 'pt', 'A4'); $pdf->addInfo('Author','webERP ' . $Version); - $pdf->addInfo('Creator','webERP http://www.weberp.org'); + $pdf->addInfo('Creator','webERP http://www.web-erp.org'); if ($InvOrCredit=='Invoice'){ $pdf->addInfo('Title',_('Sales Invoice') . ' ' . $FromTransNo . ' to ' . $_POST['ToTransNo']); Modified: trunk/Z_CreateCompanyTemplateFile.php =================================================================== --- trunk/Z_CreateCompanyTemplateFile.php 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/Z_CreateCompanyTemplateFile.php 2011-01-13 15:13:46 UTC (rev 4261) @@ -202,7 +202,7 @@ echo '<P><a href="' . $rootpath . '/companies/' . $_SESSION['DatabaseName'] . '/reports/' . $_POST['TemplateName'] .'.sql">' . _('Show the sql template file produced') . '</a>'; include('includes/htmlMimeMail.php'); - $Recipients = array('"Submissions" <sub...@we...>'); + $Recipients = array('"Submissions" <sub...@we...>'); $mail = new htmlMimeMail(); $attachment = $mail->getFile( $rootpath . '/companies/' . $_SESSION['DatabaseName'] . '/reports/' . $_POST['TemplateName'] .'.sql'); $mail->setText('Please find company template ' . $_POST['TemplateName']); Modified: trunk/css/default/default.css =================================================================== --- trunk/css/default/default.css 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/css/default/default.css 2011-01-13 15:13:46 UTC (rev 4261) @@ -2,7 +2,7 @@ | | | default.css | |---------------------------------------------------| | For use with: | -| Web-ERP - http://web-erp.sourceforge.net | +| Web-ERP - http://weberp.sourceforge.net | | by Logic Works Ltd | |---------------------------------------------------| | Developer: | Modified: trunk/css/fresh/default.css =================================================================== --- trunk/css/fresh/default.css 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/css/fresh/default.css 2011-01-13 15:13:46 UTC (rev 4261) @@ -2,7 +2,7 @@ | | | default.css | |---------------------------------------------------| | For use with: | -| Web-ERP - http://web-erp.sourceforge.net | +| Web-ERP - http://weberp.sourceforge.net | | by Logic Works Ltd | |---------------------------------------------------| | Developer: | Modified: trunk/css/gel/default.css =================================================================== --- trunk/css/gel/default.css 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/css/gel/default.css 2011-01-13 15:13:46 UTC (rev 4261) @@ -4,7 +4,7 @@ |Pretty blue gradients with lighting. | |---------------------------------------------------| | For use with: | -| Web-ERP - http://web-erp.sourceforge.net | +| Web-ERP - http://weberp.sourceforge.net | | by Logic Works Ltd | |---------------------------------------------------| | Developer: | Modified: trunk/css/jelly/default.css =================================================================== --- trunk/css/jelly/default.css 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/css/jelly/default.css 2011-01-13 15:13:46 UTC (rev 4261) @@ -4,7 +4,7 @@ |Pretty blue gradients with lighting. | |---------------------------------------------------| | For use with: | -| Web-ERP - http://web-erp.sourceforge.net | +| Web-ERP - http://weberp.sourceforge.net | | by Logic Works Ltd | |---------------------------------------------------| | Developer: | Modified: trunk/css/professional/default.css =================================================================== --- trunk/css/professional/default.css 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/css/professional/default.css 2011-01-13 15:13:46 UTC (rev 4261) @@ -2,7 +2,7 @@ | | | default.css | |---------------------------------------------------| | For use with: | -| Web-ERP - http://web-erp.sourceforge.net | +| Web-ERP - http://weberp.sourceforge.net | | by Logic Works Ltd | |---------------------------------------------------| | Developer: | Modified: trunk/css/professional-rtl/default.css =================================================================== --- trunk/css/professional-rtl/default.css 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/css/professional-rtl/default.css 2011-01-13 15:13:46 UTC (rev 4261) @@ -2,7 +2,7 @@ | | | default.css | |---------------------------------------------------| | For use with: | -| Web-ERP - http://web-erp.sourceforge.net | +| Web-ERP - http://weberp.sourceforge.net | | by Logic Works Ltd | |---------------------------------------------------| | Developer: | Modified: trunk/css/silverwolf/default.css =================================================================== --- trunk/css/silverwolf/default.css 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/css/silverwolf/default.css 2011-01-13 15:13:46 UTC (rev 4261) @@ -3,7 +3,7 @@ | | | default.css | |---------------------------------------------------| | For use with: | -| Web-ERP - http://web-erp.sourceforge.net | +| Web-ERP - http://weberp.sourceforge.net | | by Logic Works Ltd | |---------------------------------------------------| | Developer: | Modified: trunk/doc/INSTALL.txt =================================================================== --- trunk/doc/INSTALL.txt 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/doc/INSTALL.txt 2011-01-13 15:13:46 UTC (rev 4261) @@ -14,7 +14,7 @@ at the beginning of the script. Where mydatabase is the name of the company database that you are using in your webERP installation. -It is recommended to use phpMyAdmin to run the upgrade script since you select the database to use using the web GUI and you can click on the import tab and select the upgrade script to run against the DB more easily. +It is recommended to use phpMyAdmin to run the upgrade script since you select the database to use using the web GUI and you can click on the import tab and select the upgrade script to run against the DB more easily. If you are running the upgrade script with the mysql command line client, after editing the script as described above the syntax to use is as follows: @@ -23,16 +23,16 @@ where weberp_db_user is the name of your mysql user and some_pass is the password for that user. -If you have some modified scripts that you require these should be saved in a separate directory for the purposes of reworking against the new scripts. +If you have some modified scripts that you require these should be saved in a separate directory for the purposes of reworking against the new scripts. The old version scripts should be deleted and the new scripts extracted to the webERP installation directory under the web-server root directory. config.php will require modification for your database username and password and company specific details. ***************New Installations*************** -There is an automated Installation script to +There is an automated Installation script to -Extract the webERP archive under your web-root directory (folder). Browse to the +Extract the webERP archive under your web-root directory (folder). Browse to the http://yourhost/webERP/ @@ -63,7 +63,7 @@ There are a number of traps with PHP installation depending on the web-server - see: - http://www.weberp.org/wikidocs/FrequentlyAskedQuestionsInstallation + http://www.web-erp.org/wikidocs/FrequentlyAskedQuestionsInstallation The system is developed using MySQL. webERP was also tested up to version 3.05 with the Postgres database server. Postgres is no longer supported due to lack of a developer using and testing with postgres and writing upgrade scripts. Instructions here are for mysql. @@ -145,7 +145,7 @@ 2. Creating the Database -MySQL version 4.1 or above is required +MySQL version 4.1 or above is required INNODB TABLES MUST BE ENABLED IN THE MYSQL SERVER. @@ -205,7 +205,7 @@ 1. weberp-demo.sql This has a minimal amount of demonstration data in a bogus company set up so that transactions can be tried to see how the system works. 2. weberp-new.sql This script has only the basic data necessary to start a new company system off. If you wish to set up your company on webERP then this is the script to use. weberp-new.sql you will need to create a database first (using phpMyAdmin for example) or add the following sql commands to this script - CREATE DATABASE mycompanyname DEFAULT CHARACTER SET utf8 DEFAULT + CREATE DATABASE mycompanyname DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci; USE mycompanyname @@ -267,7 +267,7 @@ //DefaultLanguage $DefaultLanguage ='en_GB.utf8'; -// Whether to display the admin login and password or not +// Whether to display the admin login and password or not $allow_demo_mode = True; // Application version @@ -352,9 +352,9 @@ All the standing configuration data is defined from the system setup tab and each link should be reviewed to enter appropriate data for the business. The manual has a section on Getting Started which is essential reading before going live. -Please try not to refer questions about PHP or database configuration +Please try not to refer questions about PHP or database configuration - check your PHP web server works by installing phpMyAdmin before referring any installation issues -- check http://www.weberp.org for Installation FAQ +- check http://www.web-erp.org for Installation FAQ _____________________________________________________________________ @@ -369,4 +369,4 @@ A copy of the GNU General Public License is included in the doc directory along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -Copyright weberp.org 2010 - Contact: in...@we... \ No newline at end of file +Copyright web-erp.org 2010 - Contact: in...@we... \ No newline at end of file Modified: trunk/doc/Manual/ManualContributors.html =================================================================== --- trunk/doc/Manual/ManualContributors.html 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/doc/Manual/ManualContributors.html 2011-01-13 15:13:46 UTC (rev 4261) @@ -17,9 +17,9 @@ <br><br> Danie Brink <br><br> -Phil Daintree +Phil Daintree <br><br> -Murray Dancey +Murray Dancey <br><br> Gilles Deacur <br><br> @@ -119,7 +119,7 @@ <br><br> Mark Yeager (MRP) <br><br> -Zhiguo Yuan +Zhiguo Yuan </td> <td valign="top"> <b>Translation </b> @@ -181,5 +181,5 @@ Some Icons sourced via Creative Commons Attribution 2.5 License. http://www.famfamfam.com/lab/icons/silk/ <br> <br> -If anyone has been overlooked or should have their entry modified please email in...@we... +If anyone has been overlooked or should have their entry modified please email in...@we... <br><br> Modified: trunk/doc/Manual/ManualGettingStarted.html =================================================================== --- trunk/doc/Manual/ManualGettingStarted.html 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/doc/Manual/ManualGettingStarted.html 2011-01-13 15:13:46 UTC (rev 4261) @@ -8,7 +8,7 @@ independent since PHP can be configured as a CGI module for use on MS IIS or as a module for Apache under either Windows (NT, 2000 or XP) or Unix/Linux. It has been tested under both Windows (NT and XP) and -Linux. +Linux. </li><li>MySQL greater than version 4 with Innodb transactional tables support. Foreign key constraints are also required. These were added to Innodb in 2003. Innodb was introduced in 2001 to MySQL and has @@ -49,7 +49,7 @@ The main issues with installation of PHP appear to be: <ol> <li>Some Windows installations come with a setting for -session.save_path= /tmp this is an inappropriate directory for Windows +session.save_path= /tmp this is an inappropriate directory for Windows and should be changed to session.save_path=C:\temp or something more appropriate. </li><li>When the system is hosted on a multi-homed web server farm, @@ -97,7 +97,7 @@ <li>The installer checks that all the pre-requistes are met for an installation. You will note from the screen shot above that this installation does not have sufficient privileges to install webERP because the web-server is unable to write to the webERP directory. It is first necessary to change the permissions on the directory where webERP is installed to ensure that the user that the web-server runs as is able to write a new configuration file to the web space. Cpanel and Plesk have facilities to enable this change to the permissions. Any messages on this screen displayed in red need to be resolved before the installation can proceed. Do not attempt to run the installer while red messages persist. </li> <li> -Many of the fields required will be populated correctly based. However, it is important to check the entries are correct. The installer will not be able to determine the host (computer) where the mysql database server is installed and this must be entered. +Many of the fields required will be populated correctly based. However, it is important to check the entries are correct. The installer will not be able to determine the host (computer) where the mysql database server is installed and this must be entered. </li> <li>The user name and the password to the mysql database server are also required. </li> @@ -136,7 +136,7 @@ <br> All files in the archive except the installation instructions in INSTALL.txt, weberp-demo.sql and weberp-new.sql should be copied -to a directory under the web server DocumentRoot directory. This varies +to a directory under the web server DocumentRoot directory. This varies by distribution but:<br> <br> /srv/www/htdocs<br> @@ -198,7 +198,7 @@ Where 'some_pass' is a password of your choice for the new user 'weberp'. Note that this user 'weberp' can only connect from the local machine so if the web server is on a different machine then the MySQL -server you need to give privileges to connect from other computers. +server you need to give privileges to connect from other computers. See the MySQL manual.<br> <br> Innodb tables must be enabled in the MySQL server. These @@ -220,11 +220,11 @@ </li><li>weberp-new.sql This script has only the basic data necessary to start a new company. If you wish to set up your company using the webERP software, then this is the script to use. This creates -a webERP database and populates it with only the very basic starting data. +a webERP database and populates it with only the very basic starting data. </li></ol><br> <br> The files weberp-demo.sql and web-erp-new.sql should be in -the directory with all the PHP scripts. Change to the directory +the directory with all the PHP scripts. Change to the directory where the scripts are held or use the full path and enter:<br> <br> shell > mysql --user=weberp --password='some_pass' < path_to_web_server/webERP/sql/mysql/weberp-demo.sql<br> @@ -246,13 +246,13 @@ (computer name), username and password of the database connection required to connect to the database server. There is also an option to chose which type of database server is to be used. Currently there are -only options for mysql and mysqli. There is no going forward without +only options for mysql and mysqli. There is no going forward without this data.<br> <br> The default contents of the config.php file are as follows and must be edited in an editor of choice. Then, -save config.php in the web directory where the scripts are located. -Note, the system is continually evolving and may well have changed +save config.php in the web directory where the scripts are located. +Note, the system is continually evolving and may well have changed since this was written.<br> <br> <br> @@ -271,7 +271,7 @@ <br> /* $Revision: 1.8 $<br> config.php<br> -Web-ERP - http://web-erp.sourceforge.net<br> +Web-ERP - http://weberp.sourceforge.net<br> */<br> <br> // User configurable variables<br> @@ -372,8 +372,8 @@ enter password 'weberp'<br> <br> The quotation marks are not required. To set up additional users go to -Main Menu > Setup > User Accounts. Users can change there own -passwords at any time by clicking on their user name shown at the top +Main Menu > Setup > User Accounts. Users can change there own +passwords at any time by clicking on their user name shown at the top left of the screen. For example: "webERP Demo: <i>administrator</i>". Be careful not to delete the demonstration user until a new System Administrator user has been set up. If there are no users defined the @@ -399,7 +399,7 @@ <br> <br> This script may not work because it requires that the web-server has write permission to the scripts directory, in which case you may need to fall back to the manual method described below. -<br>In the default install above you created a database called weberp and there is a directory under webERP/companies also called weberp. To make another company you need to copy this directory and all the sub-directories under it to a new directory under webERP/companies/. The name of this directory needs to be identical to the name of the new database created on the same mysql server. +<br>In the default install above you created a database called weberp and there is a directory under webERP/companies also called weberp. To make another company you need to copy this directory and all the sub-directories under it to a new directory under webERP/companies/. The name of this directory needs to be identical to the name of the new database created on the same mysql server. <br> <br> <font size="+2"><b>Configuration Parameters</b></font><br> @@ -430,7 +430,7 @@ 'fresh'.<br> <br> Each user can select their own preference from the user settings screen. -This is revealed by clicking on their user name shown at the top left of +This is revealed by clicking on their user name shown at the top left of the screen. For example: "webERP Demo: <i>administrator</i>".<br> <br> To create a new theme copy the directory of one of the @@ -459,7 +459,7 @@ the functions between staff so that no user can complete an entire transaction. There are occasions in smaller businesses where this is impractical. However, the system has great flexibility to allow the -user access to be finely defined. See the security schema section.<br> +user access to be finely defined. See the security schema section.<br> <br> As well as allowing the access to be restricted there is some flexibility about the links that are made available to a user. In the @@ -501,7 +501,7 @@ <br> <br> If you are interested in contributing a language pack to webERP - which is always very much appreciated! There are instructions for how to proceed at -http://www.weberp.org/HowToTranslate +http://www.web-erp.org/HowToTranslate <br> <br> <!-- Help End: WWW_Users --> Modified: trunk/doc/Manual/ManualMultilanguage.html =================================================================== --- trunk/doc/Manual/ManualMultilanguage.html 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/doc/Manual/ManualMultilanguage.html 2011-01-13 15:13:46 UTC (rev 4261) @@ -13,9 +13,9 @@ <br>www_root/webERP/locale/en_GB/LC_MESSAGES/message.po <br> Edit the file provided entering the translations for the strings labelled msgid in the string labelled msgstr. Watch for html strings embedded inside the strings the html will also be required in the translated string. Also be sure to ensure that each translated string is enclosed in speech marks ("). Please also complete the translation file header information - with your details so that you are accorded proper recognition for your contribution. -<br>It is especially important to ensure that the string "ISO-8859-1" (at the time of writing around line 19400 in the messages.po file) is translated to be the character set that you wish your translation to use. webERP uses the translated string here to send appropriate html headers so your browser knows how to interpret the characters sent. +<br>It is especially important to ensure that the string "ISO-8859-1" (at the time of writing around line 19400 in the messages.po file) is translated to be the character set that you wish your translation to use. webERP uses the translated string here to send appropriate html headers so your browser knows how to interpret the characters sent. <br><br>It is worthwhile investigating the poedit package as this has some time saving features for creating gettext translation files. -<br><br>Return the file containing your translations to sub...@we... +<br><br>Return the file containing your translations to sub...@we... <br><br>An archive of the new language directory and instructions will be put up on sourceforge so everyone can access your translation. <br><br> <FONT SIZE=+1><B>Technical Overview</B></FONT> @@ -24,7 +24,7 @@ <br><br> webERP uses the GNU gettext package for language translations. For the gettext library to be used - which must be installed on your webserver, PHP must be compiled with gettext functions. However, since version 3.01 thanks to Briain Gomez and the authors of PHP-GETTEXT Danilo Segan and Nico Kaiser their php class to enable the translations to work (albeit more slowly than the gettext library functions) is bundled with webERP so translations will still work even though gettext is not installed. <br><br> -The gettext translation files are held in the locale directory, under this directory there are sub-directories for each locale, a five character code representing the language to be used. eg en for English an underscore and then another two character code in capitals for the local version of the language eg US for USA - so the full locale code becomes en_US. For english of the Great British variety - the full locale code is then en_GB - this is the default language that webERP is written in. The locale for this code needs to be installed on the web-server - all locales installed can be inspected using the command line #locale -a on a linux web server. +The gettext translation files are held in the locale directory, under this directory there are sub-directories for each locale, a five character code representing the language to be used. eg en for English an underscore and then another two character code in capitals for the local version of the language eg US for USA - so the full locale code becomes en_US. For english of the Great British variety - the full locale code is then en_GB - this is the default language that webERP is written in. The locale for this code needs to be installed on the web-server - all locales installed can be inspected using the command line #locale -a on a linux web server. <br><br>New directories will need to be made up if a translator wishes to have a local version for their language. Under the locale directory the five character locale abbreviation code directory there is a further sub-directory called LC_MESSAGES - this is where the translation files exist. There are two files in each of these directories: <BR><BR> 1. messages.po this file contains all the strings to be translated. This is the only file of concern for translators @@ -95,7 +95,7 @@ <BR>* TIS-620 for Thai, <BR>* UTF-8 for any language, including those listed above. <BR><BR> -Since there are such a lot of potential characters in utf-8, the size of font files necessary to be embedded in pdf files makes the resulting pdf file too big to be sent over dial up connections and is therefore to be avoided in favour of the more specific character sets above. +Since there are such a lot of potential characters in utf-8, the size of font files necessary to be embedded in pdf files makes the resulting pdf file too big to be sent over dial up connections and is therefore to be avoided in favour of the more specific character sets above. <BR> <BR>The character encoding name can be written in either upper or lower case. Usually upper case is preferred. <BR><BR> @@ -104,7 +104,7 @@ <BR><BR> <B>Administration</B> <BR><BR> -Once this exercise has been completed the file must be returned to the project administrator: sub...@we... for the .mo file to be created. The new directory will be returned in a zip file for extraction from the webERP directory. The language will then be added to the webERP system for the benefit of other users as well. +Once this exercise has been completed the file must be returned to the project administrator: sub...@we... for the .mo file to be created. The new directory will be returned in a zip file for extraction from the webERP directory. The language will then be added to the webERP system for the benefit of other users as well. <BR><BR> Upon logging into the system each time the system sets the language used by looking up the user information to see what language they have set, The user can change which language is set by clicking on their user name at the top left which brings up User Settings. Changing the language setting will activate the new language right away upon saving the change. Only languages for which there is a directory under the locale directory are allowed to be selected by users. <BR><BR> @@ -118,7 +118,7 @@ The following explains how to use the language translation utilities provided with webERP for the purpose of adding languages and maintaining their translations. <br><br> -In general before using the utilities you need to click on your user name at the top left in order to access user preferences. +In general before using the utilities you need to click on your user name at the top left in order to access user preferences. Select the language to translate and click on Modify. The language utilities all use the currently selected user language. If the language you wish to use is not there then a new translation can be initiated with the 'Add a New Language' utility - see below. By default a new install of webERP will only have the english - en_GB available. The most recent submitted language packs are available from the <A HREF='http://sourceforge.net/project/showfiles.php?group_id=70949'>sourceforge webERP page</A> <br><br> Translations are maintained from the utilities menu - this does not have its own link on the main menu since it is an area that only the system administrator should be able to access. Unauthorised modification of translation files is therefore discouraged. The utlities menu is Z_index.php - so you can modify the URL on the main menu by prefixing it with Z_ - this brings up the utilities menu - only if you have system administrator permissions on your user account. The link to 'Maintain Language Files' is where the translations are managed. @@ -129,7 +129,7 @@ <li>Add a New Language to the System</li> <li>Edit a Language File Header</li> <li>Edit a Language File Module</li> -<br><br> +<br><br> Note that the discussion about what the system does is intended for those handling the system and its files. It is not necessary to understand if you are only dealing with translation. <br><br> @@ -143,7 +143,7 @@ <br><br> <font size="+2"><b>Add a New Language to the System</b></font> <br><br> -Use this utility to create a new language. It is important to recognise that only languages that have appropriate locale files on your web-server can be added. The language identifier must match with the language files on the web-server. Enter the language in the form xx_XX where the first two characters are the lower case standard code for the language such as en for English and the last two are the upper case standard code for the country such as US for United States. This example would be en_US. The underscore must separate the language and country for a total of 5 characters. The Proceed button must be clicked after entering the language in order for it to be created. The system then creates a new language directory under the locale directory and an LC_MESSAGES directory under this new language directory. Then, in this new locale/xx_XX/LC_MESSAGES directory it copies accross the Default Language file (messages.po). Initially there are no translations in the new messages.po file. +Use this utility to create a new language. It is important to recognise that only languages that have appropriate locale files on your web-server can be added. The language identifier must match with the language files on the web-server. Enter the language in the form xx_XX where the first two characters are the lower case standard code for the language such as en for English and the last two are the upper case standard code for the country such as US for United States. This example would be en_US. The underscore must separate the language and country for a total of 5 characters. The Proceed button must be clicked after entering the language in order for it to be created. The system then creates a new language directory under the locale directory and an LC_MESSAGES directory under this new language directory. Then, in this new locale/xx_XX/LC_MESSAGES directory it copies accross the Default Language file (messages.po). Initially there are no translations in the new messages.po file. <br><br> Once the new language has been created, to use the language translation utlities to maintain the new translation you must change to the new language. To change language, the user name shown at the top left of all webERP screens is clicked on and the drop down box should now show the new language created above. Select the new language to enable you to operate with the translation utilities. <br><br> @@ -157,7 +157,7 @@ <br><br> The language file header can be modified using this utility. One important reason for modifying the header is to modify the charset to what is suitable for the locale. For en, the charset is usually set to 8829-1 or something like that. After editing - the various areas of the header make sure to click on Enter Information at the bottom in order to save the changes. + the various areas of the header make sure to click on Enter Information at the bottom in order to save the changes. <br><br> <font size="+2"><b>Edit a Language File Module</b></font> <br><br> @@ -166,7 +166,7 @@ do index.php and includes/header.inc first in order for the main menu to be in their language. From that point, the most important modules can be done first or all can be done alphabetically. Some memorable system should be used though in order to remember which modules still need translating in subsequent sessions. -<br><br> +<br><br> Once the language and module have been selected then click on Proceed. A handy interface comes up with all of the strings listed that are within that module and beside them an area to enter your translation of that string. On the right is a list of the line number where the string occurs in the code within the module. After entering some translations click on Enter Modified: trunk/doc/README.txt =================================================================== --- trunk/doc/README.txt 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/doc/README.txt 2011-01-13 15:13:46 UTC (rev 4261) @@ -10,16 +10,16 @@ SUPPORT -The primary means of support queries is through the user mailing list. +The primary means of support queries is through the user mailing list. Please join the list at: http://lists.sourceforge.net/lists/listinfo/web-erp-users -if you have queries. The archives of the mailing lists on sourceforge and the FAQ (see http://www.weberp.org/wikidocs/FrequentlyAskedQuestionsInstallation) contain the most common issues with respect to installation. +if you have queries. The archives of the mailing lists on sourceforge and the FAQ (see http://www.web-erp.org/wikidocs/FrequentlyAskedQuestionsInstallation) contain the most common issues with respect to installation. Feedback, wants and gripes are encouraged in the interests of improving this applicaton. -DEVELOPING +DEVELOPING -All contributions of code are needed and encouraged. -Guidelines for contributing code are in the document at http://www.weberp.org/wikidocs/ContributingtowebERP developers should read this document carefully and follow the guidelines therein. Standards and conventions used in the code are rigorously applied in the interests of consistency and readability. Code submitted that does not conform to these standards will be changed so it does where possible. +All contributions of code are needed and encouraged. +Guidelines for contributing code are in the document at http://www.web-erp.org/wikidocs/ContributingtowebERP developers should read this document carefully and follow the guidelines therein. Standards and conventions used in the code are rigorously applied in the interests of consistency and readability. Code submitted that does not conform to these standards will be changed so it does where possible. TRANSLATIONS @@ -27,7 +27,7 @@ http://sourceforge.net/project/showfiles.php?group_id=70949 -Translators should read the document http://www.weberp.org/HowToTranslate which describes how to translate webERP. +Translators should read the document http://www.web-erp.org/HowToTranslate which describes how to translate webERP. Translations must be installed under the webERP/locale directory and the locale must be available on the web-server. @@ -42,4 +42,4 @@ A copy of the GNU General Public License is included in the doc directory along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -Copyright weberp.org 2010 - Contact: in...@we... \ No newline at end of file +Copyright web-erp.org 2010 - Contact: in...@we... \ No newline at end of file Modified: trunk/includes/PDFSalesAnalysis.inc =================================================================== --- trunk/includes/PDFSalesAnalysis.inc 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/includes/PDFSalesAnalysis.inc 2011-01-13 15:13:46 UTC (rev 4261) @@ -24,7 +24,7 @@ /* Standard PDF file creation header stuff */ $pdf->addInfo('Author','webERP ' . $Version); -$pdf->addInfo('Creator','webERP http://www.weberp.org'); +$pdf->addInfo('Creator','webERP http://www.web-erp.org'); $pdf->addInfo('Title',$ReportSpec['reportheading']); $pdf->addInfo('Subject',_('Sales Analysis Report') . ' ' . $ReportSpec['reportheading']); Modified: trunk/includes/PDFStarter.php =================================================================== --- trunk/includes/PDFStarter.php 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/includes/PDFStarter.php 2011-01-13 15:13:46 UTC (rev 4261) @@ -156,7 +156,7 @@ // $pdf = new Cpdf($PageSize); $pdf = new Cpdf($DocumentOrientation, 'pt', $DocumentPaper); -$pdf->addInfo('Creator', 'WebERP http://www.weberp.org'); +$pdf->addInfo('Creator', 'WebERP http://www.web-erp.org'); $pdf->addInfo('Author', 'WebERP ' . $_SESSION['VersionNumber']); Modified: trunk/includes/class.pdf.php =================================================================== --- trunk/includes/class.pdf.php 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/includes/class.pdf.php 2011-01-13 15:13:46 UTC (rev 4261) @@ -75,7 +75,7 @@ if ($label == 'Creator') { /* Javier: Some scripts set the creator to be WebERP like this - $pdf->addInfo('Creator', 'WebERP http://www.weberp.org'); + $pdf->addInfo('Creator', 'WebERP http://www.web-erp.org'); But the Creator is TCPDF by Nicola Asuni, PDF_CREATOR is defined as 'TCPDF' in tcpdf/config/tcpdfconfig.php */ $this->SetCreator(PDF_CREATOR); } Modified: trunk/includes/footer.inc =================================================================== --- trunk/includes/footer.inc 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/includes/footer.inc 2011-01-13 15:13:46 UTC (rev 4261) @@ -20,12 +20,12 @@ echo '<tr>'; echo '<td class="footer">'; - echo '<a href="http://www.weberp.org" rel="external"><img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © webrp.org - ' . date('Y') . '" /></a>'; + echo '<a href="http://www.web-erp.org" rel="external"><img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © webrp.org - ' . date('Y') . '" /></a>'; echo '<br />'; echo '</td></tr>'; - echo '<tr><td class="footer">webERP v' . $_SESSION['VersionNumber'] . ' ' . _('Copyright') . ' © weberp.org - '.date('Y').'</td></tr>'; + echo '<tr><td class="footer">webERP v' . $_SESSION['VersionNumber'] . ' ' . _('Copyright') . ' © web-erp.org - '.date('Y').'</td></tr>'; if(http_file_exists('http://sflogo.sourceforge.net/sflogo.php')) { echo '<tr><td class="footer"><a href="https://sourceforge.net/projects/weberp"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=391629&type=12" width="120" height="30" border="0" alt="Get webERP web-based ERP Accounting at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a></td></tr>'; Modified: trunk/install/index.php =================================================================== --- trunk/install/index.php 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/install/index.php 2011-01-13 15:13:46 UTC (rev 4261) @@ -168,7 +168,7 @@ $GuessedURL = rtrim(dirname($GuessedURL), 'install'); ?> <input type="text" tabindex="30" name="ba_url" size="30" value="<?php if(isset($_SESSION['ba_url'])) echo $_SESSION['ba_url']; else echo $GuessedURL; ?>"/> - + </td> </tr> </table> @@ -182,24 +182,24 @@ </td> <td width="180"> <input type="radio" tabindex="40" name="operating_system" id="operating_system_linux" onclick="document.getElementById('file_perms_box').style.display = 'block';" value="linux" - <?php - if(!isset($_SESSION['operating_system']) OR $_SESSION['operating_system'] == 'linux') { - echo ' checked'; - } ?> + <?php + if(!isset($_SESSION['operating_system']) OR $_SESSION['operating_system'] == 'linux') { + echo ' checked'; + } ?> /> <font style="cursor: pointer;" onclick="javascript: change_os('linux');">Linux/Unix based</font> <br /> <input type="radio" tabindex="41" name="operating_system" id="operating_system_windows" onclick="document.getElementById('file_perms_box').style.display = 'none';" value="windows" - <?php - if(isset($_SESSION['operating_system']) AND $_SESSION['operating_system'] == 'windows') { - echo ' checked'; } - ?> + <?php + if(isset($_SESSION['operating_system']) AND $_SESSION['operating_system'] == 'windows') { + echo ' checked'; } + ?> /> <font style="cursor: pointer;" onclick="javascript: change_os('windows');">Windows</font> </td> <td> - <div name="file_perms_box" id="file_perms_box" style="margin: 0; padding: 0; display: - <?php + <div name="file_perms_box" id="file_perms_box" style="margin: 0; padding: 0; display: + <?php if(isset($_SESSION['operating_system']) AND $_SESSION['operating_system'] == 'windows') { echo 'none'; } else { @@ -312,8 +312,8 @@ <td style="color: #666666;">Username:</td> <td> admin - <!--<input type="text" tabindex="60" name="admin_username" style="width: 98%;" value="<?php if(isset($_SESSION['admin_username'])) { echo $_SESSION['admin_username']; - } else { + <!--<input type="text" tabindex="60" name="admin_username" style="width: 98%;" value="<?php if(isset($_SESSION['admin_username'])) { echo $_SESSION['admin_username']; + } else { echo 'admin'; } ?>" />--> </td> <td> </td> @@ -374,7 +374,7 @@ <tr> <td align="center" style="font-size: 10px;"> <!-- Please note: the below reference to the GNU GPL should not be removed, as it provides a link for users to read about warranty, etc. --> - <a href="http://www.weberp.org/" style="color: #000000;" target="_blank">WebERP</a> + <a href="http://www.web-erp.org/" style="color: #000000;" target="_blank">WebERP</a> is released under the <a href="http://www.gnu.org/licenses/gpl.html" style="color: #000000;" target="_blank">GNU General Public License</a> <!-- Please note: the above reference to the GNU GPL should not be removed, as it provides a link for users to read about warranty, etc. --> Modified: trunk/locale/de_DE.utf8/Manual/ManualContributors.html =================================================================== --- trunk/locale/de_DE.utf8/Manual/ManualContributors.html 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/locale/de_DE.utf8/Manual/ManualContributors.html 2011-01-13 15:13:46 UTC (rev 4261) @@ -91,7 +91,7 @@ <br/><br/> Jake Stride <br/><br/> -Marcos Garcia Trejo +Marcos Garcia Trejo </td> <td valign="top"> @@ -138,5 +138,5 @@ </tr> </table> <br><br> -Falls jemand \xFCbersehen wurde oder dessen Eintrag ge\xE4ndert werden sollte, bitte mit Email an in...@we... melden. +Falls jemand \xFCbersehen wurde oder dessen Eintrag ge\xE4ndert werden sollte, bitte mit Email an in...@we... melden. <br><br> \ No newline at end of file Modified: trunk/locale/de_DE.utf8/Manual/ManualGettingStarted.html =================================================================== --- trunk/locale/de_DE.utf8/Manual/ManualGettingStarted.html 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/locale/de_DE.utf8/Manual/ManualGettingStarted.html 2011-01-13 15:13:46 UTC (rev 4261) @@ -34,7 +34,7 @@ <li> Aus unklaren Gr\xFCnden sind manche Server nicht in der Lage, \xFCber $rootpath = dirname($_SERVER['PHP_SELF']); automatisch das korrekte Verzeichnis zu ermitteln. Das \xE4u\xDFert sich darin, dass das System nicht in der Lage ist, die Seiten-Links f\xFCr die unterschiedlichen Systemfunktionen zu finden. Wenn das geschieht, kann die Variable $rootpath direkt auf den Pfad gesetzt werden, in dem die Skripte liegen. <br><br> -Das System k\xF6nnte mit vielen anderen Datenbankservern genutzt werden, aber es ist auf MySQL entwickelt und getestet worden. Eine ConnectDB.inc-Datei f\xFCr Postgres ist mit beigef\xFCgt und es gibt eine Einstellung in der config.php ($dbtype), die es dem Systemadministrator erlaubt, eine Postrgres-Datenbank zu verwenden, wenn ihm diese lieber ist. Unabh\xE4ngige Benchmarks zeigen, dass MySQL f\xFCr die allgemeinsten Datenbankaufgaben eines der schnellsten Systeme ist. Es ist insbesondere schnell beim Aufbau der Verbindungen, und weil es in der Natur des Web liegt, dass f\xFCr jede Seite eine neue Verbindung erstellt wird, macht das MySQL f\xFCr Web-Anwendungen besonders tauglich. +Das System k\xF6nnte mit vielen anderen Datenbankservern genutzt werden, aber es ist auf MySQL entwickelt und getestet worden. Eine ConnectDB.inc-Datei f\xFCr Postgres ist mit beigef\xFCgt und es gibt eine Einstellung in der config.php ($dbtype), die es dem Systemadministrator erlaubt, eine Postrgres-Datenbank zu verwenden, wenn ihm diese lieber ist. Unabh\xE4ngige Benchmarks zeigen, dass MySQL f\xFCr die allgemeinsten Datenbankaufgaben eines der schnellsten Systeme ist. Es ist insbesondere schnell beim Aufbau der Verbindungen, und weil es in der Natur des Web liegt, dass f\xFCr jede Seite eine neue Verbindung erstellt wird, macht das MySQL f\xFCr Web-Anwendungen besonders tauglich. <br><br> Wenn die Integration mit einem Knowledge-Management-System gew\xFCnscht wird, ist die Installation von WackoWiki oder MediaWiki auf dem selben Webserver erforderlich. Dies ist v\xF6llig optional, wird aber als eine M\xF6glichkeit, freiz\xFCgig Informationen im Unternehmen auszutauschen, sehr empfohlen. http://wackowiki.com/WackoDownload/InEnglish?v=xlv <br><br> @@ -56,7 +56,7 @@ <li> Einstellen der Unternehmensangaben im System</li> </ul> -<font size="+2"><b>Die PHP-Scripte kopieren</b></font> +<font size="+2"><b>Die PHP-Scripte kopieren</b></font> <br><br> Alle Dateien des Archives werden in ein Verzeichnis unterhalb des Dokumenten-Wurzelverzeichnisses des Webservers entpackt. Dieses kann je nach Installation variieren: <br><br> @@ -67,7 +67,7 @@ Kopieren Sie das Archiv in dieses Verzeichnis und entpacken Sie dann das Archiv, das das weberp-Verzeichnis im Root-Verzeichnis anlegt und alle ben\xF6tigten Dateien in diesem Verzeichnis ablegt. <br><br> <font size="+2"><b>Die Datenbank anlegen</b></font> -<br><br> +<br><br> Diese Information unterstellt, dass Sie einen MySQL-Datenbankserver verwenden. Es ist zwar eine SQL-Dump-Datei f\xFCr Postgres ebenso enthalten, diese Anleitung bezieht sich aber auf das f\xFCr MySQL N\xF6tige. <br><br> Sie m\xFCssen den Benutzernamen und das Passwort f\xFCr den MySQL-Server kennen. Wenn Sie selbst noch keine vergeben haben, ist der Standard @@ -82,7 +82,7 @@ <br><br> Aus dem MySQL-Handbuch (bearbeitet): <br><br> -Der MySQL-root-Benutzer wird als Superuser angelegt, der alles tun darf. Verbindungen m\xFCssen vom lokalen Host aus gemacht werden. HINWEIS: Das anf\xE4ngliche root-Passwort ist leer, daher kann sich jeder als root ohne Passwort verbinden und hat alle Berechtigungen. Weil Ihre Installation anfangs weit offen ist, sollten Sie als eins der ersten Dinge ein Passwort f\xFCr den MySQL-root-Benutzer anlegen. Das k\xF6nnen Sie wie folgt tun (beachten Sie, dass das Passwort mit der PASSWORD()-Funktion angegeben wird): +Der MySQL-root-Benutzer wird als Superuser angelegt, der alles tun darf. Verbindungen m\xFCssen vom lokalen Host aus gemacht werden. HINWEIS: Das anf\xE4ngliche root-Passwort ist leer, daher kann sich jeder als root ohne Passwort verbinden und hat alle Berechtigungen. Weil Ihre Installation anfangs weit offen ist, sollten Sie als eins der ersten Dinge ein Passwort f\xFCr den MySQL-root-Benutzer anlegen. Das k\xF6nnen Sie wie folgt tun (beachten Sie, dass das Passwort mit der PASSWORD()-Funktion angegeben wird): <br><br> Ab MySQL-Version 3.22 k\xF6nnen Sie das SET PASSWORD-Statement benutzen: <br><br> @@ -127,7 +127,7 @@ shell > mysql --user=weberp --password='some_pass' < /path_to_the_sql_script/weberp-new.sql <br><br> wobei Sie den hier eingegebenen Benutzernamen weberp auf den Namen \xE4ndern, den Sie in MySQL angelegt haben und das Passwort, das hier mit 'ein_passwort' angegeben ist, durch das entsprechende Passwort f\xFCr Ihren Benutzer ersetzen. Auch wird der pfad_zum_sql_skript durch etwas wie /usr/local/apache/htdocs/web-erp/sql/mysql/ ersetzt. -<br><br> +<br><br> <font size="+2"><b>Die Datei config.php bearbeiten</b></font> <br><br> Die Datei config.php enth\xE4lt eine Reihe von benutzerdefinierten Variablen, die festlegen, wie sich das System verh\xE4lt. Kritisch ist, dass sie den Computernamen, Benutzernamen und Passwort der Datenbankverbindung enth\xE4lt, die f\xFCr die Verbindung mit dem Server erforderlich ist. Es gibt hier auch eine Option zu w\xE4hlen, welche Art von Datenbankserver zu verwenden ist. Gegenw\xE4rtig gibt es hier nur die Optionen mysql und postgres. Es ist keine weitere Arbeit m\xF6glich, solange Sie nicht die Datei mit den Angaben versorgt haben. @@ -141,7 +141,7 @@ <br> /* $Revision: 1.6 $<br> config.php<br> -Web-ERP - http://web-erp.sourceforge.net<br> +Web-ERP - http://weberp.sourceforge.net<br> by Logic Works Ltd<br> */<br> <br> Modified: trunk/locale/de_DE.utf8/Manual/ManualMultilanguage.html =================================================================== --- trunk/locale/de_DE.utf8/Manual/ManualMultilanguage.html 2011-01-13 10:31:31 UTC (rev 4260) +++ trunk/locale/de_DE.utf8/Manual/ManualMultilanguage.html 2011-01-13 15:13:46 UTC (rev 4261) @@ -23,7 +23,7 @@ <br><br> Es empfiehlt sich zum \xDCbersetzen poedit einzusezten, weil es einige zeitsparende Funktionen f\xFCr das Erstellen von \xDCbersetzungsdateien besitzt. <br><br> -Schicken Sie die Datei die Ihre \xDCbersetzung enth\xE4lt an sub...@we... ein. +Schicken Sie die Datei die Ihre \xDCbersetzung enth\xE4lt an sub...@we... ein. <br><br> Ein Archiv mit dem neuen Sprachverzeichnis und Anleitungen wird bei sourceforge eingestellt, so dass jeder auf Ihre \xDCbersetzung zugreifen kann. <br><br> @@ -34,9 +34,9 @@ <B> Wie es gemacht wird</B> <br><br> -webERP verwendet das GNU-gettext-Paket f\xFCr die Sprach\xFCbersetzung. Damit die gettext-Bibliothek verwendet werden kann, muss sie auf Ihrem Webserver installiert sein. PHP muss mit den gettext-Funktionen kompiliert werden. Seit der Version 3.01 wird dank Brian Gomez und der Autoren von PHP-gettext Danilo Segan und Nico Kaiser deren PHP-Klasse zusammen mit webERP ausgeliefert, damit die \xDCbersetzungen auch funktionieren (wielleicht etwas langsamer als mit den Funktionen der gettext-Bibliothek), wenn gettext nicht installiert ist. +webERP verwendet das GNU-gettext-Paket f\xFCr die Sprach\xFCbersetzung. Damit die gettext-Bibliothek verwendet werden kann, muss sie auf Ihrem Webserver installiert sein. PHP muss mit den gettext-Funktionen kompiliert werden. Seit der Version 3.01 wird dank Brian Gomez und der Autoren von PHP-gettext Danilo Segan und Nico Kaiser deren PHP-Klasse zusammen mit webERP ausgeliefert, damit die \xDCbersetzungen auch funktionieren (wielleicht etwas langsamer als mit den Funktionen der gettext-Bibliothek), wenn gettext nicht installiert ist. <br><br> -Die gettext-\xDCbersetzungsdateien werden im Locale-Verzeichnis abgelegt, in welchem Unterverzeichnisse f\xFCr die einzelnen Sprachversionen vorhanden sind. Die Unterverzeichnisse werden durch einen f\xFCnf Zeichen langen Schl\xFCssel gekennzeichnet, zwei kleinen Buchstaben f\xFCr die Sprache, einem Unterstrich und zwei gro\xDFen Buchstaben f\xFCr das Land. Die englische Version f\xFCr die USA hei\xDFt so en_US, die f\xFCr die britische Version en_GB. en_GB ist die Sprachversion, in der webERP geschrieben ist. Die Sprachversion f\xFCr diesen Schl\xFCssel muss auf dem Webserver installiert sein. Die installierten Sprachversionen k\xF6nnen Sie mit dem Kommando locale -a in der Konsole des Linux-Webservers pr\xFCfen. +Die gettext-\xDCbersetzungsdateien werden im Locale-Verzeichnis abgelegt, in welchem Unterverzeichnisse f\xFCr die einzelnen Sprachversionen vorhanden sind. Die Unterverzeichnisse werden durch einen f\xFCnf Zeichen langen Schl\xFCssel gekennzeichnet, zwei kleinen Buchstaben f\xFCr die Sprache, einem Unterstrich und zwei gro\xDFen Buchstaben f\xFCr das Land. Die englische Version f\xFCr die USA hei\xDFt so en_US, die f\xFCr die britische Version en_GB. en_GB ist die Sprachversion, in der webERP geschrieben ist. Die Sprachversion f\xFCr diesen Schl\xFCssel muss auf dem Webserver installiert sein. Die installierten Sprachversionen k\xF6nnen Sie mit dem Kommando locale -a in der Konsole des Linux-Webservers pr\xFCfen. <br><br> Neue Verzeichnisse m\xFCssen erstellt werden, wenn ein \xDCbersetzer eine lokale Sprachversion haben m\xF6chte. Unter dem Verzeichnis mit dem f\xFCnf Zeichen langen Schl\xFCssel der Sprachversion gibt es ein weiteres Unterverzeichnis LC_MESSAGES, in diesem werden die Sprachendateien abgelegt. In jedem solchen Verzeichnis gibt es zwei Dateien: <BR><BR> @@ -50,11 +50,11 @@ Die Datei messages.po verstehen </FONT></B> <BR><BR> -Die \xDCbersetzung wird vorgenommen, indem die Zeichenketten ind der Datei messages.po in die andere Sprache \xFCbersetzt werden. Es ist wichtig, diese \xDCbersetzung mit der neuesten messages.po-Datei aus dem Verzeichnis locale/en_GB/LC_MESSAGES/ vorzunehmen. Sie haben auch die M\xF6glichkeit, diese mit einer Email an in...@we... oder eine Nachricht im \xDCbersetzungs-Board abzufordern. +Die \xDCbersetzung wird vorgenommen, indem die Zeichenketten ind der Datei messages.po in die andere Sprache \xFCbersetzt werden. Es ist wichtig, diese \xDCbersetzung mit der neuesten messages.po-Datei aus dem Verzeichnis locale/en_GB/LC_MESSAGES/ vorzunehmen. Sie haben auch die M\xF6glichkeit, diese mit einer Email an in...@we... oder eine Nachricht im \xDCbersetzungs-Board abzufordern. <!-- The translation is performed by tranlating the strings in the messages.po file into the other language. It is important to work on the most recent messages.po file from the locale/en_GB/LC_MESSAGES/ deirectory in the CVS. However, the most recent messages template file can be emailed on request to C or through a note to the translation list. --> <BR><BR> -Die Datei messages.po besteht aus einzelnen Abschnitten, +Die Datei messages.po besteht aus einzelnen Abschnitten, <BR><BR> z. B. bei einer franz\xF6sischen \xDCbersetzungsdatei: <BR><BR> @@ -127,9 +127,9 @@ <B> Verwaltung</B> <BR><BR> -Wenn diese \xDCbung vollst\xE4ndig haben, muss die Datei an den Projektadministrator \xFCber die Email-Adresse sub...@we... zum Erstellen der .mo-Datei zur\xFCckgeschickt werden. Das neue Verzeichnis wird in einer ZIP-Datei zum Entpacken in das webERP-Verzeichnis erstellt. Die Sprache wird dann auch f\xFCr andere Nutzer von webERP zur Verf\xFCgung gestellt. +Wenn diese \xDCbung vollst\xE4ndig haben, muss die Datei an den Projektadministrator \xFCber die Email-Adresse sub...@we... zum Erstellen der .mo-Datei zur\xFCckgeschickt werden. Das neue Verzeichnis wird in einer ZIP-Datei zum Entpacken in das webERP-Verzeichnis erstellt. Die Sprache wird dann auch f\xFCr andere Nutzer von webERP zur Verf\xFCgung gestellt. <BR><BR> -Jedesmal wenn Sie sich am System anmelden, setzt das System die Sprache auf das was Sie im Benutzerstammsatz eingetragen haben. Der Benutzer kann einstellen, welche Sprache er m\xF6chte, indem er auf seinen Benutzernamen in der Men\xFCzeile dr\xFCckt, wodurch er in seine Benutzereinstellungen gelangt. Wenn Sie die Spracheinstellung \xE4ndern, wird dies aktiv, wenn sie diese Einstellung sichern. Nur Spracheinstellungen die im locale-Verzeichnis installiert sind, stehen den Benutzern f\xFCr die Auswahl zur Verf\xFCgung. +Jedesmal wenn Sie sich am System anmelden, setzt das System die Sprache auf das was Sie im Benutzerstammsatz eingetragen haben. Der Benutzer kann einstellen, welche Sprache er m\xF6chte, indem er auf seinen Benutzernamen in der Men\xFCzeile dr\xFCckt, wodurch er in seine Benutzereinstellungen gelangt. Wenn Sie die Spracheinstellung \xE4ndern, wird dies aktiv, wenn sie diese Einstellung sichern. Nur Spracheinstellungen die im locale-Verzeichnis installiert sind, stehen den Benutzern f\xFCr die Auswahl zur Verf\xFCgung. <BR><BR> <B> Weitere Ressourcen</B> @@ -159,7 +159,7 @@ Sprachdatei-Kopf bearbeiten</li> <li> Sprachdatei-Module bearbeiten</li> -<br><br> +<br><br> Beachten Sie, dass die Erl\xE4uterungen dar\xFCber, was das System macht, f\xFCr diejenigen bestimmt sind, die das System bedienen und die Dateien verwalten. Wenn Sie sich nur mit der \xDCbersetzung besch\xE4ftigen, m\xFCssen Sie das nicht verstehen. <br><br> <font size="+2"><b> @@ -196,7 +196,7 @@ </b></font> <br><br> Der Hauptteil der \xDCbersetzungsarbeit wird mit diesem Werkzeug gemacht. Zuerst w\xE4hlen Sie die Sprache, die Sie bearbeiten wollen und dann w\xE4hlen Sie Sprachdatei-Module bearbeiten. F\xFCr eine vollst\xE4ndige \xDCbersetzung des gesamten Systems m\xFCssen Sie alle diese Module \xFCbersetzen. Viele ziehen zuerst einmal die Module von index.php und includes/header.inc vor, damit das Hauptmen\xFC in ihrer Sprache erscheint. Von da aus k\xF6nnen zuerst die wichtigsten Module bearbeitet werden oder alles nacheinander. Ein Merksystem sollte verwendet werden, damit S... [truncated message content] |
From: <tim...@us...> - 2011-01-13 16:01:09
|
Revision: 4272 http://weberp.svn.sourceforge.net/weberp/?rev=4272&view=rev Author: tim_schofield Date: 2011-01-13 16:01:03 +0000 (Thu, 13 Jan 2011) Log Message: ----------- Correct the quotes in the sql literals Modified Paths: -------------- trunk/CounterSales.php trunk/GLAccounts.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-01-13 16:00:50 UTC (rev 4271) +++ trunk/CounterSales.php 2011-01-13 16:01:03 UTC (rev 4272) @@ -965,7 +965,7 @@ $ErrMsg = _('The order cannot be added because'); $InsertQryResult = DB_query($HeaderSQL,$db,$ErrMsg); - $StartOf_LineItemsSQL = 'INSERT INTO salesorderdetails (orderlineno, + $StartOf_LineItemsSQL = "INSERT INTO salesorderdetails (orderlineno, orderno, stkcode, unitprice, @@ -976,7 +976,7 @@ actualdispatchdate, qtyinvoiced, completed) - VALUES ('; + VALUES ("; $DbgMsg = _('Trouble inserting a line of a sales order. The SQL that failed was'); foreach ($_SESSION['Items'.$identifier]->LineItems as $StockItem) { Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2011-01-13 16:00:50 UTC (rev 4271) +++ trunk/GLAccounts.php 2011-01-13 16:01:03 UTC (rev 4272) @@ -62,12 +62,12 @@ /*Maybe not required since these will be created from GLPostings.inc with correct B/fwd balances $ErrMsg = _('Could not add the chart details for the new account'); - $sql = 'INSERT INTO chartdetails (accountcode, period) + $sql = "INSERT INTO chartdetails (accountcode, period) SELECT chartmaster.accountcode, periods.periodno FROM chartmaster CROSS JOIN periods WHERE ( chartmaster.accountcode, periods.periodno ) NOT - IN ( SELECT chartdetails.accountcode, chartdetails.period FROM chartdetails )'; + IN ( SELECT chartdetails.accountcode, chartdetails.period FROM chartdetails )"; $result = DB_query($sql,$db,$ErrMsg); */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-01-13 19:32:16
|
Revision: 4290 http://weberp.svn.sourceforge.net/weberp/?rev=4290&view=rev Author: tim_schofield Date: 2011-01-13 19:32:09 +0000 (Thu, 13 Jan 2011) Log Message: ----------- Remove unnecessary year and month from options Modified Paths: -------------- trunk/SupplierBalsAtPeriodEnd.php trunk/includes/SQL_CommonFunctions.inc Modified: trunk/SupplierBalsAtPeriodEnd.php =================================================================== --- trunk/SupplierBalsAtPeriodEnd.php 2011-01-13 18:38:17 UTC (rev 4289) +++ trunk/SupplierBalsAtPeriodEnd.php 2011-01-13 19:32:09 UTC (rev 4290) @@ -143,12 +143,12 @@ $Periods = DB_query($sql,$db,$ErrMsg); while ($myrow = DB_fetch_array($Periods,$db)){ - if ($myrow['YearMonth'] == date("Ym")) { // get the current month - + if ($myrow['YearMonth'] == date("Ym")) { // get the current month + echo '<option VALUE=' . $myrow['lastdate_in_period'] . ' selected="TRUE">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period'],'M',-1); } - else { - echo '<option VALUE=' . $myrow['lastdate_in_period'] . '> '.$myrow['YearMonth'].' '.MonthAndYearFromSQLDate($myrow['lastdate_in_period']).'</option>'; + else { + echo '<option VALUE=' . $myrow['lastdate_in_period'] . '> '.MonthAndYearFromSQLDate($myrow['lastdate_in_period']).'</option>'; } } echo '</select></td></tr>'; @@ -159,4 +159,4 @@ include('includes/footer.inc'); }/*end of else not PrintPDF */ -?> +?> \ No newline at end of file Modified: trunk/includes/SQL_CommonFunctions.inc =================================================================== --- trunk/includes/SQL_CommonFunctions.inc 2011-01-13 18:38:17 UTC (rev 4289) +++ trunk/includes/SQL_CommonFunctions.inc 2011-01-13 19:32:09 UTC (rev 4290) @@ -237,7 +237,7 @@ while ($MyRow=DB_fetch_array($result)){ $NewParent = $MyRow['parent']; $MaterialCost = BomMaterialCost($NewParent, $db); - $SQL = 'UPDATE stockmaster SET materialcost=' . $MaterialCost . " WHERE stockid='" . $NewParent . "'"; + $SQL = "UPDATE stockmaster SET materialcost='" . $MaterialCost . "' WHERE stockid='" . $NewParent . "'"; $result1 = DB_query($SQL,$db); if (DB_error_no($db)!=0) { return 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-01-16 12:17:38
|
Revision: 4318 http://weberp.svn.sourceforge.net/weberp/?rev=4318&view=rev Author: tim_schofield Date: 2011-01-16 12:17:31 +0000 (Sun, 16 Jan 2011) Log Message: ----------- fix order qties Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/companies/weberpdemo/reportwriter/labels.xml Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-01-16 12:04:06 UTC (rev 4317) +++ trunk/ConfirmDispatch_Invoice.php 2011-01-16 12:17:31 UTC (rev 4318) @@ -15,9 +15,6 @@ include('includes/FreightCalculation.inc'); include('includes/GetSalesTransGLCodes.inc'); -// This is not required -//echo '<a href="'. $rootpath . '/SelectSalesOrder.php?' . SID . '">'. _('Back to Sales Orders'). '</a><br>'; - if (!isset($_GET['OrderNumber']) && !isset($_SESSION['ProcessingOrder'])) { /* This page can only be called with an order number for invoicing*/ echo '<div class="centre"><a href="' . $rootpath . '/SelectSalesOrder.php?' . SID . '">' . _('Select a sales order to invoice'). '</a></div>'; @@ -243,12 +240,16 @@ } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Confirm Invoice') . '" alt="" />' . ' ' . _('Confirm Dispatch and Invoice'). '</p>'; -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . - '" alt="" />' . ' ' . _('Customer Code') . ' :<b> ' . $_SESSION['Items']->DebtorNo.'</b></p>'; -//echo '<br><br><font size=4>' . _('Customer Code') . ':<b> ' . $_SESSION['Items']->DebtorNo; -echo ' ' . _('Customer Name') . ' :<b> ' . $_SESSION['Items']->CustomerName. '</b>'; -//echo '<font size=4><b><U>' . $_SESSION['Items']->CustomerName . '</U></b></font><font size=3> - ' . -echo '<br>' . _('Invoice amounts stated in') . ' ' . $_SESSION['Items']->DefaultCurrency . ''; +echo '<table class="selection"> + <tr> + <th><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer Code') . ' :<b> ' . $_SESSION['Items']->DebtorNo.'</b></th> + <th>' . _('Customer Name') . ' :<b> ' . $_SESSION['Items']->CustomerName. '</b></th> + </tr> + <tr> + <th colspan ="2"><b>' . _('Invoice amounts stated in') . ' ' . $_SESSION['Items']->DefaultCurrency . '</b></th> + </tr> + </table> + <br />'; echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/companies/weberpdemo/reportwriter/labels.xml =================================================================== --- trunk/companies/weberpdemo/reportwriter/labels.xml 2011-01-16 12:04:06 UTC (rev 4317) +++ trunk/companies/weberpdemo/reportwriter/labels.xml 2011-01-16 12:17:31 UTC (rev 4318) @@ -1,2 +1,2 @@ <?xml version="1.0"?> -<labels><label><id>111-price</id><description>111-CodePrice</description><dimensions><Unit>mm</Unit><Rows>12</Rows><Cols>10</Cols><Sh>162</Sh><Sw>196</Sw><He>12</He><Wi>18</Wi><Tm>3</Tm><Lm>3</Lm><Rh>12.5</Rh><Cw>18.5</Cw></dimensions><data><line><row>7</row><pos>1</pos><max>15</max><font>2</font><dat>code</dat></line><line><row>2</row><pos>1</pos><max>15</max><font>2</font><dat>price</dat></line></data></label><label><id>130-price</id><description>130-CodePrice</description><dimensions><Unit>mm</Unit><Rows>8</Rows><Cols>6</Cols><Sh>170</Sh><Sw>205</Sw><He>18</He><Wi>31</Wi><Tm>3</Tm><Lm>2</Lm><Rh>20.5</Rh><Cw>33.5</Cw></dimensions><data><line><row>13</row><pos>2</pos><max>27</max><font>4</font><dat>code</dat></line><line><row>5</row><pos>2</pos><max>27</max><font>4</font><dat>price</dat></line></data></label></labels> +<labels><label><id>111-price</id><description>111-CodePrice</description><dimensions><Unit>mm</Unit><Rows>12</Rows><Cols>10</Cols><Sh>162</Sh><Sw>196</Sw><He>12</He><Wi>18</Wi><Tm>3</Tm><Lm>3</Lm><Rh>12.5</Rh><Cw>18.5</Cw></dimensions><data><line><row>7</row><pos>1</pos><max>15</max><font>2</font><dat>code</dat></line><line><row>2</row><pos>1</pos><max>15</max><font>2</font><dat>bcode</dat></line></data></label><label><id>130-price</id><description>130-CodePrice</description><dimensions><Unit>mm</Unit><Rows>8</Rows><Cols>6</Cols><Sh>170</Sh><Sw>205</Sw><He>18</He><Wi>31</Wi><Tm>3</Tm><Lm>2</Lm><Rh>20.5</Rh><Cw>33.5</Cw></dimensions><data><line><row>13</row><pos>2</pos><max>27</max><font>4</font><dat>code</dat></line><line><row>5</row><pos>2</pos><max>27</max><font>4</font><dat>price</dat></line></data></label></labels> \ 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-01-18 10:58:23
|
Revision: 4324 http://weberp.svn.sourceforge.net/weberp/?rev=4324&view=rev Author: tim_schofield Date: 2011-01-18 10:58:17 +0000 (Tue, 18 Jan 2011) Log Message: ----------- Update prices scripts changed to create a new record for the new price and correctly show start and end dates Modified Paths: -------------- trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php Modified: trunk/PricesBasedOnMarkUp.php =================================================================== --- trunk/PricesBasedOnMarkUp.php 2011-01-17 12:26:31 UTC (rev 4323) +++ trunk/PricesBasedOnMarkUp.php 2011-01-18 10:58:17 UTC (rev 4324) @@ -238,7 +238,7 @@ if (Is_Date($_POST['PriceEndDate'])){ $SQLEndDate = FormatDateForSQL($_POST['PriceEndDate']); } else { - $SQLEndDate = '0000-00-00'; + $SQLEndDate = '2030-12-31'; } $sql = "SELECT stockid, materialcost+labourcost+overheadcost AS cost @@ -322,7 +322,7 @@ AND startdate='" . FormatDateForSQL($_POST['PriceStartDate']) . "' AND stockid='" . $myrow['stockid'] . "'",$db); if (DB_num_rows($CurrentPriceResult)==1){ - $sql = "UPDATE prices SET price='" . $RoundedPrice . "' + $UpdateSQL = "UPDATE prices SET enddate='" . date("Y-m-d",mktime(0,0,0,date("m") ,date("d")-1,date("Y"))) . "' WHERE typeabbrev='" . $_POST['PriceList'] . "' AND currabrev='" . $_POST['CurrCode'] . "' AND debtorno='' @@ -330,7 +330,20 @@ AND enddate ='" . $SQLEndDate . "' AND stockid='" . $myrow['stockid'] . "'"; $ErrMsg =_('Error updating prices for') . ' ' . $myrow['stockid'] . ' ' . _('because'); - $result = DB_query($sql,$db,$ErrMsg); + $result = DB_query($UpdateSQL,$db,$ErrMsg); + $InsertSQL = "INSERT INTO prices (stockid, + typeabbrev, + currabrev, + startdate, + enddate, + price) + VALUES ('" . $myrow['stockid'] . "', + '" . $_POST['PriceList'] . "', + '" . $_POST['CurrCode'] . "', + '" . FormatDateForSQL($_POST['PriceStartDate']) . "', + '" . $SQLEndDate . "', + '" . $RoundedPrice . "')"; + $result = DB_query($InsertSQL,$db,$ErrMsg); prnMsg(_('Updating price for') . ' ' . $myrow['stockid'] . ' ' . _('to') . ' ' . $RoundedPrice,'info'); } else { $sql = "INSERT INTO prices (stockid, Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2011-01-17 12:26:31 UTC (rev 4323) +++ trunk/PricesByCost.php 2011-01-18 10:58:17 UTC (rev 4324) @@ -47,7 +47,7 @@ while ($myrow = DB_fetch_array($result)) { //update database if update pressed $SQLUpdate = "UPDATE prices - SET price = '" . $_POST['Price_' . $PriceCounter] . "' + SET enddate = '" . date("Y-m-d",mktime(0,0,0,date("m") ,date("d")-1,date("Y"))) . "' WHERE `prices`.`stockid` = '" . $_POST['StockID_' . $PriceCounter] . "' AND prices.typeabbrev ='" . $_POST['SalesType'] . "' AND prices.currabrev ='" . $_POST['CurrCode'] . "' @@ -56,6 +56,26 @@ AND prices.startdate ='" . $_POST['StartDate_' . $PriceCounter] . "' AND prices.enddate ='" . $_POST['EndDate_' . $PriceCounter] . "'"; $ResultUpdate = DB_query($SQLUpdate, $db); + $SQLInsert = "INSERT INTO prices ( + stockid, + price, + typeabbrev, + currabrev, + debtorno, + branchcode, + startdate, + enddate + ) VALUES ( + '" . $_POST['StockID_' . $PriceCounter] . "', + '" . $_POST['Price_' . $PriceCounter] . "', + '" . $_POST['SalesType'] . "', + '" . $_POST['CurrCode'] . "', + '" . $_POST['DebtorNo_' . $PriceCounter] . "', + '" . $_POST['BranchCode_' . $PriceCounter] . "', + '" . date('Y-m-d') . "', + '2030-12-31' + )"; + $ResultInsert = DB_query($SQLInsert, $db); $PriceCounter++; } DB_free_result($result); //clear the old result This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |