Thread: [Weberp-svn] SF.net SVN: weberp:[7449] trunk (Page 7)
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-08-01 11:49:31
|
Revision: 7449 http://weberp.svn.sourceforge.net/weberp/?rev=7449&view=rev Author: tim_schofield Date: 2011-08-01 11:49:25 +0000 (Mon, 01 Aug 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/PO_Items.php trunk/SupplierTenderCreate.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-08-01 11:49:12 UTC (rev 7448) +++ trunk/PO_Items.php 2011-08-01 11:49:25 UTC (rev 7449) @@ -1146,7 +1146,7 @@ <td>'.$myrow['description'].'</td> <td>'.$Uom.'</td> <td>'.$ImageSource.'</td> - <td><input class="number" type="text" size=6 value=0 name="Quantity'.$i.'" /></td> + <td><input class="number" type="text" size="6" value="0" name="Quantity'.$i.'" /></td> <input type="hidden" value="'.$myrow['stockid'].'" name="StockID'.$i.'" /></td> <input type="hidden" value="'.$Uom.'" name="uom'.$i.'" /> </tr>'; Modified: trunk/SupplierTenderCreate.php =================================================================== --- trunk/SupplierTenderCreate.php 2011-08-01 11:49:12 UTC (rev 7448) +++ trunk/SupplierTenderCreate.php 2011-08-01 11:49:25 UTC (rev 7449) @@ -791,8 +791,8 @@ <td>'.$myrow['description'].'</td> <td>'.$uom.'</td> <td>'.$ImageSource.'</td> - <td><input class="number" type="text" size=6 value=0 name="qty'.$myrow['stockid'].'"></td> - <input type="hidden" size=6 value="'.$uom.'" name="uom'.$myrow['stockid'].'"> + <td><input class="number" type="text" size="6" value="0" name="qty'.$myrow['stockid'].'" /></td> + <input type="hidden" size="6" value="'.$uom.'" name="uom'.$myrow['stockid'].'" /> </tr>'; $PartsDisplayed++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-06 21:36:02
|
Revision: 7493 http://weberp.svn.sourceforge.net/weberp/?rev=7493&view=rev Author: tim_schofield Date: 2011-08-06 21:35:56 +0000 (Sat, 06 Aug 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/Stocks.php trunk/WorkOrderIssue.php Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-08-06 21:35:42 UTC (rev 7492) +++ trunk/Stocks.php 2011-08-06 21:35:56 UTC (rev 7493) @@ -998,12 +998,12 @@ echo '<tr><td>' . $PropertyRow['label'] . '</td> <td>'; switch ($PropertyRow['controltype']) { - case 0; //textbox + case 0; //text if ($PropertyRow['numericvalue']==1) { - echo '<input type="textbox" class="number" name="PropValue' . $PropertyCounter . '" size="20" maxlength="100" value="' . $PropertyValue . '" />'; + echo '<input type="text" class="number" name="PropValue' . $PropertyCounter . '" size="20" maxlength="100" value="' . $PropertyValue . '" />'; echo _('A number between') . ' ' . $PropertyRow['minimumvalue'] . ' ' . _('and') . ' ' . $PropertyRow['maximumvalue'] . ' ' . _('is expected'); } else { - echo '<input type="textbox" name="PropValue' . $PropertyCounter . '" size="20" maxlength="100" value="' . $PropertyValue . '" />'; + echo '<input type="text" name="PropValue' . $PropertyCounter . '" size="20" maxlength="100" value="' . $PropertyValue . '" />'; } break; case 1; //select box Modified: trunk/WorkOrderIssue.php =================================================================== --- trunk/WorkOrderIssue.php 2011-08-06 21:35:42 UTC (rev 7492) +++ trunk/WorkOrderIssue.php 2011-08-06 21:35:56 UTC (rev 7493) @@ -770,9 +770,9 @@ } else { //controlled but not serialised - just lot/batch control echo '<tr><th colspan="2">' . _('Batch/Lots Issued') . '</th></tr>'; for ($i=0;$i<15;$i++){ - echo '<tr><td><input type="textbox" name="BatchRef' . $i .'" />'; + echo '<tr><td><input type="text" name="BatchRef' . $i .'" />'; echo '</td> - <td><input type="textbox" name="Qty' . $i .'" /></td></tr>'; + <td><input type="text" name="Qty' . $i .'" /></td></tr>'; } echo '<input type="hidden" name="IssueItem" value="' . $_POST['IssueItem'] . '" />'; echo '<tr><td colspan="2"><div class="centre"><input type="submit" name="Process" value="' . _('Process Items Issued') . '" /></div></td></tr>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-06 21:36:41
|
Revision: 7496 http://weberp.svn.sourceforge.net/weberp/?rev=7496&view=rev Author: tim_schofield Date: 2011-08-06 21:36:35 +0000 (Sat, 06 Aug 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/CounterSales.php trunk/WorkOrderEntry.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-08-06 21:36:20 UTC (rev 7495) +++ trunk/CounterSales.php 2011-08-06 21:36:35 UTC (rev 7496) @@ -2154,7 +2154,7 @@ <td style="text-align:center">%s</td> <td style="text-align:center">%s</td> <td style="text-align:center">%s</td> - <td><font size="1"><input class="number" tabindex="'.number_format($j+7).'" type="textbox" size="6" name="itm'.$myrow['stockid'].'" value="0" /> + <td><font size="1"><input class="number" tabindex="'.number_format($j+7).'" type="text" size="6" name="itm'.$myrow['stockid'].'" value="0" /> </td> </tr>', $myrow['stockid'], @@ -2309,7 +2309,7 @@ <td>%s</td> <td>%s</td> <td class="number">%s</td> - <td><font size="1"><input class="number" tabindex="'.number_format($j+7).'" type="textbox" size="15" name="Quantity'.$i.'" value="0" /> + <td><font size="1"><input class="number" tabindex="'.number_format($j+7).'" type="text" size="15" name="Quantity'.$i.'" value="0" /> </font></td> </tr>', $myrow['stockid'], @@ -2335,7 +2335,7 @@ } echo '<input type="hidden" name="Batch'.$i.'" value="'.$BatchRow['serialno'].'" />'; echo '<input type="hidden" name="StockID'.$i.'" value="'.$myrow['stockid'].'" />'; - printf('<td><font size="1"><input class="number" tabindex="'.number_format($j+7).'" type="textbox" size="15" + printf('<td><font size="1"><input class="number" tabindex="'.number_format($j+7).'" type="text" size="15" name="Quantity'.$i.'" value="0" /> </font></td> <td class="number">%s</td> Modified: trunk/WorkOrderEntry.php =================================================================== --- trunk/WorkOrderEntry.php 2011-08-06 21:36:20 UTC (rev 7495) +++ trunk/WorkOrderEntry.php 2011-08-06 21:36:35 UTC (rev 7496) @@ -7,8 +7,7 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Search') . - '" alt="" />' . ' ' . $title.'</p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; if (isset($_GET['ReqDate'])){ $ReqDate = $_GET['ReqDate']; @@ -453,7 +452,7 @@ } } -echo '<input type="hidden" name="WO" value=' .$_POST['WO'] . '>'; +echo '<input type="hidden" name="WO" value="' .$_POST['WO'] . '" />'; echo '<tr><td class="label">' . _('Work Order Reference') . ':</td><td>' . $_POST['WO'] . '</td></tr>'; echo '<tr><td class="label">' . _('Factory Location') .':</td> <td><select name="StockLocation">'; @@ -507,15 +506,15 @@ echo '<tr class="EvenTableRows">'; $j++; } - echo '<td><input type="hidden" name="OutputItem' . $i . '" value="' . $_POST['OutputItem' .$i] . '">' . + echo '<td><input type="hidden" name="OutputItem' . $i . '" value="' . $_POST['OutputItem' .$i] . '" />' . $_POST['OutputItem' . $i] . ' - ' . $_POST['OutputItemDesc' .$i] . '</td>'; if ($_POST['Controlled'.$i]==1 AND $_SESSION['DefineControlledOnWOEntry']==1){ echo '<td style="text-align: right">' . $_POST['OutputQty' . $i] . '</td>'; - echo '<input type="hidden" name="OutputQty' . $i .'" value=' . $_POST['OutputQty' . $i] . '>'; + echo '<input type="hidden" name="OutputQty' . $i .'" value="' . $_POST['OutputQty' . $i] . '" />'; } else { echo'<td><input type="text" class="number" name="OutputQty' . $i . '" value="' . $_POST['OutputQty' . $i] . '" size="10" maxlength="10" /></td>'; } - echo '<td class="number"><input type="hidden" name="RecdQty' . $i . '" value=' . $_POST['RecdQty' .$i] . '>' . $_POST['RecdQty' .$i] .'</td> + echo '<td class="number"><input type="hidden" name="RecdQty' . $i . '" value="' . $_POST['RecdQty' .$i] . '" />' . $_POST['RecdQty' .$i] .'</td> <td class="number">' . ($_POST['OutputQty' . $i] - $_POST['RecdQty' .$i]) . '</td>'; if ($_POST['Controlled'.$i]==1){ echo '<td><input type="text" name="NextLotSNRef' .$i . '" value="' . $_POST['NextLotSNRef'.$i] . '"></td>'; @@ -533,22 +532,22 @@ echo '</td>'; echo '</tr>'; if (isset($_POST['Controlled' . $i])) { - echo '<input type="hidden" name="Controlled' . $i .'" value="' . $_POST['Controlled' . $i] . '">'; + echo '<input type="hidden" name="Controlled' . $i .'" value="' . $_POST['Controlled' . $i] . '" />'; } if (isset( $_POST['Serialised' . $i])) { - echo '<input type="hidden" name="Serialised' . $i .'" value="' . $_POST['Serialised' . $i] . '">'; + echo '<input type="hidden" name="Serialised' . $i .'" value="' . $_POST['Serialised' . $i] . '" />'; } if (isset($_POST['HasWOSerialNos' . $i])) { - echo '<input type="hidden" name="HasWOSerialNos' . $i .'" value="' . $_POST['HasWOSerialNos' . $i] . '">'; + echo '<input type="hidden" name="HasWOSerialNos' . $i .'" value="' . $_POST['HasWOSerialNos' . $i] . '" />'; } } echo '<input type="hidden" name="NumberOfOutputs" value="' . ($i -1).'" />'; } echo '</table>'; -echo '<div class="centre"><br /><input type="submit" name="submit" value="' . _('Update') . '">'; +echo '<div class="centre"><br /><input type="submit" name="submit" value="' . _('Update') . '" />'; -echo '<br /><input type="submit" name="delete" value="' . _('Delete This Work Order') . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">'; +echo '<br /><input type="submit" name="delete" value="' . _('Delete This Work Order') . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');" />'; echo '<br /></div>'; @@ -580,10 +579,10 @@ </select> <td><?php echo _('Enter text extracts in the'); ?> <b><?php echo _('description'); ?></b>:</td> -<td><input type="text" name="Keywords" size="20" maxlength="25" value="<?php if (isset($_POST['Keywords'])) echo $_POST['Keywords']; ?>"></td></tr> +<td><input type="text" name="Keywords" size="20" maxlength="25" value="<?php if (isset($_POST['Keywords'])) echo $_POST['Keywords']; ?>" /></td></tr> <tr><td></td> <td><font size="3"><b><?php echo _('OR'); ?> </b></font><?php echo _('Enter extract of the'); ?> <b><?php echo _('Stock Code'); ?></b>:</td> - <td><input type="text" name="StockCode" size="15" maxlength="18" value="<?php if (isset($_POST['StockCode'])) echo $_POST['StockCode']; ?>"></td> + <td><input type="text" name="StockCode" size="15" maxlength="18" value="<?php if (isset($_POST['StockCode'])) echo $_POST['StockCode']; ?>" /></td> </tr> </table> <br /><div class="centre"><input type="submit" name="Search" value=" <?php echo _('Search Now'); ?>" /> @@ -596,7 +595,7 @@ if (DB_num_rows($SearchResult)>1){ - echo '<table cellpadding=2 colspan="7" class="selection">'; + echo '<table cellpadding="2" colspan="7" class="selection">'; $TableHeader = '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Units') . '</th></tr>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-06 21:39:24
|
Revision: 7510 http://weberp.svn.sourceforge.net/weberp/?rev=7510&view=rev Author: tim_schofield Date: 2011-08-06 21:39:18 +0000 (Sat, 06 Aug 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/StockCounts.php trunk/StockSerialItems.php Modified: trunk/StockCounts.php =================================================================== --- trunk/StockCounts.php 2011-08-06 21:39:06 UTC (rev 7509) +++ trunk/StockCounts.php 2011-08-06 21:39:18 UTC (rev 7510) @@ -122,10 +122,15 @@ } //START OF action=VIEW - $SQL = "SELECT * FROM stockcounts"; + $SQL = "SELECT id, + stockid, + loccode, + qtycounted, + reference + FROM stockcounts"; $result = DB_query($SQL, $db); echo '<input type="hidden" name="Action" value="View" />'; - echo '<table cellpadding=2 class="selection">'; + echo '<table cellpadding="2" class="selection">'; echo '<tr> <th>' . _('Stock Code') . '</th> <th>' . _('Location') . '</th> @@ -141,7 +146,7 @@ <td><input type="checkbox" name="DEL[' .$myrow['id'].']" maxlength="20" size="20" /></td></tr>'; } - echo '</table><br /><div class="centre"><input type="submit" name="SubmitChanges" value="' . _('Save Changes') . '"></div>'; + echo '</table><br /><div class="centre"><input type="submit" name="SubmitChanges" value="' . _('Save Changes') . '" /></div>'; //END OF action=VIEW } Modified: trunk/StockSerialItems.php =================================================================== --- trunk/StockSerialItems.php 2011-08-06 21:39:06 UTC (rev 7509) +++ trunk/StockSerialItems.php 2011-08-06 21:39:18 UTC (rev 7510) @@ -65,7 +65,7 @@ $ErrMsg = _('The serial numbers/batches held cannot be retrieved because'); $LocStockResult = DB_query($sql, $db, $ErrMsg); -echo '<table cellpadding=2 class="selection">'; +echo '<table cellpadding="2" class="selection">'; if ($Serialised==1){ echo '<tr><th colspan="5"><font color="navy" size="2">' . _('Serialised items in') . ' '; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-06 21:40:11
|
Revision: 7514 http://weberp.svn.sourceforge.net/weberp/?rev=7514&view=rev Author: tim_schofield Date: 2011-08-06 21:40:05 +0000 (Sat, 06 Aug 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/CustomerTransInquiry.php trunk/DailySalesInquiry.php Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2011-08-06 21:39:52 UTC (rev 7513) +++ trunk/CustomerTransInquiry.php 2011-08-06 21:40:05 UTC (rev 7514) @@ -14,7 +14,7 @@ echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table cellpadding=2 class="selection"><tr>'; +echo '<table cellpadding="2" class="selection"><tr>'; echo '<td>' . _('Type') . ':</td><td><select tabindex="1" name="TransType">'; @@ -41,10 +41,10 @@ if (!isset($_POST['ToDate'])){ $_POST['ToDate'] = Date($_SESSION['DefaultDateFormat']); } -echo '<td>' . _('From') . ':</td><td><input tabindex="2" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="FromDate" maxlength="10" size="11" value="' . $_POST['FromDate'] . '"></td>'; -echo '<td>' . _('To') . ':</td><td><input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '"></td>'; +echo '<td>' . _('From') . ':</td><td><input tabindex="2" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="FromDate" maxlength="10" size="11" value="' . $_POST['FromDate'] . '" /></td>'; +echo '<td>' . _('To') . ':</td><td><input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '" /></td>'; -echo '</tr></table><br /><div class="centre"><input tabindex="4" type="submit" name="ShowResults" value="' . _('Show Transactions') . '">'; +echo '</tr></table><br /><div class="centre"><input tabindex="4" type="submit" name="ShowResults" value="' . _('Show Transactions') . '" />'; echo '</form></div>'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-08-06 21:39:52 UTC (rev 7513) +++ trunk/DailySalesInquiry.php 2011-08-06 21:40:05 UTC (rev 7514) @@ -90,7 +90,7 @@ $ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg($db); $SalesResult = DB_query($sql, $db,$ErrMsg); -echo '<table cellpadding=2 class="selection">'; +echo '<table cellpadding="2" class="selection">'; echo'<tr> <th>' . _('Sunday') . '</th> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-06 21:45:09
|
Revision: 7539 http://weberp.svn.sourceforge.net/weberp/?rev=7539&view=rev Author: tim_schofield Date: 2011-08-06 21:45:03 +0000 (Sat, 06 Aug 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/StockStatus.php trunk/Stocks.php Modified: trunk/StockStatus.php =================================================================== --- trunk/StockStatus.php 2011-08-06 21:44:51 UTC (rev 7538) +++ trunk/StockStatus.php 2011-08-06 21:45:03 UTC (rev 7539) @@ -39,8 +39,8 @@ $Serialised = $myrow[4]; $Controlled = $myrow[5]; -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . - '" alt="" /><b>' . ' ' . $StockID . ' - ' . $myrow['0'] . ' : ' . _('in units of') . ' : ' . $myrow[1] . '</b></p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" /> + <b>' . ' ' . $StockID . ' - ' . $myrow['0'] . ' : ' . _('in units of') . ' : ' . $myrow[1] . '</b></p>'; $Its_A_KitSet_Assembly_Or_Dummy =False; if ($myrow[2]=='K'){ Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-08-06 21:44:51 UTC (rev 7538) +++ trunk/Stocks.php 2011-08-06 21:45:03 UTC (rev 7539) @@ -33,8 +33,7 @@ echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Back to Items') . '</a><br />' . "\n"; -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' - . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_FILES['ItemPicture']) AND $_FILES['ItemPicture']['name'] !='') { @@ -584,8 +583,8 @@ $StockID=''; } if ($New==1) { - echo '<tr><td>'. _('Item Code'). ':</td><td><input ' . (in_array('StockID',$Errors) ? 'class="inputerror"' : '' ) .' type="text" - value="'.$StockID.'" name="StockID" size="21" maxlength="20" /></td></tr>'. "\n"; + echo '<tr><td>'. _('Item Code'). ':</td> + <td><input ' . (in_array('StockID',$Errors) ? 'class="inputerror"' : '' ) .' type="text" value="'.$StockID.'" name="StockID" size="21" maxlength="20" /></td></tr>'. "\n"; } else { echo '<tr><td>'. _('Item Code'). ':</td><td>'.$StockID.'</td></tr>'. "\n"; echo '<input type="hidden" name ="StockID" value="'.$StockID.'" />'; @@ -654,7 +653,8 @@ } else { $Description =''; } -echo '<tr><td>' . _('Part Description') . ' (' . _('short') . '):</td><td><input ' . (in_array('Description',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Description" size="52" maxlength="50" value="' . $Description . '" /></td></tr>'."\n"; +echo '<tr><td>' . _('Part Description') . ' (' . _('short') . '):</td> + <td><input ' . (in_array('Description',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Description" size="52" maxlength="50" value="' . $Description . '" /></td></tr>'."\n"; if (isset($_POST['LongDescription'])) { $LongDescription = AddCarriageReturns($_POST['LongDescription']); @@ -711,12 +711,7 @@ echo '<tr><td>'. _('Image File (.jpg)') . ':</td><td><input type="file" id="ItemPicture" name="ItemPicture" /></td>'; if (function_exists('imagecreatefromjpg')){ - $StockImgLink = '<img src="GetStockImage.php?automake=1&textcolor=FFFFFF&bgcolor=CCCCCC'. - '&StockID='.urlencode($StockID). - '&text='. - '&width=64'. - '&height=64'. - '" />'; + $StockImgLink = '<img src="GetStockImage.php?automake=1&textcolor=FFFFFF&bgcolor=CCCCCC&StockID='.urlencode($StockID).'&text=&width=64&height=64" />'; } else { if( isset($StockID) and file_exists($_SESSION['part_pics_dir'] . '/' .$StockID.'.jpg') ) { $StockImgLink = '<img src="' . $_SESSION['part_pics_dir'] . '/' .$StockID.'.jpg" />'; @@ -1028,11 +1023,11 @@ echo '</select>'; break; case 2; //checkbox - echo '<input type="checkbox" name="PropValue' . $PropertyCounter . '"'; if ($PropertyValue==1){ - echo ' checked="True"'; + echo '<input type="checkbox" name="PropValue' . $PropertyCounter . '" checked="True" />'; + } else { + echo '<input type="checkbox" name="PropValue' . $PropertyCounter . '" />'; } - echo ' />'; break; } //end switch echo '<input type="hidden" name="PropType' . $PropertyCounter .'" value="' . $PropertyRow['controltype'] . '" />'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-07 16:33:57
|
Revision: 7640 http://weberp.svn.sourceforge.net/weberp/?rev=7640&view=rev Author: tim_schofield Date: 2011-08-07 16:33:51 +0000 (Sun, 07 Aug 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/CustWhereAlloc.php trunk/WorkOrderReceive.php Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2011-08-07 16:33:38 UTC (rev 7639) +++ trunk/CustWhereAlloc.php 2011-08-07 16:33:51 UTC (rev 7640) @@ -9,8 +9,7 @@ echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . - _('Customer Where Allocated'). '" alt="" />' . $title . '</p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Customer Where Allocated'). '" alt="" />' . $title . '</p>'; echo '<table class="selection" cellpadding="2"><tr>'; @@ -33,7 +32,7 @@ if (!isset($_POST['TransNo'])) {$_POST['TransNo']='';} echo '<td>'._('Transaction Number') . ':</td> - <td><input tabindex="2" type="text" name="TransNo" maxlength="10" size="10" value="'. $_POST['TransNo'] . '"></td>'; + <td><input tabindex="2" type="text" name="TransNo" maxlength="10" size="10" value="'. $_POST['TransNo'] . '" /></td>'; echo '</tr></table><br /> <div class="centre"><input tabindex="3" type="submit" name="ShowResults" value="'._('Show How Allocated').'" /></div>'; Modified: trunk/WorkOrderReceive.php =================================================================== --- trunk/WorkOrderReceive.php 2011-08-07 16:33:38 UTC (rev 7639) +++ trunk/WorkOrderReceive.php 2011-08-07 16:33:51 UTC (rev 7640) @@ -850,8 +850,6 @@ } } else { // batches/lots yet to be set up enter them manually for ($i=0;$i<15;$i++){ - echo - if ($i==0){ echo '<tr><td><input type="text" name="BatchRef' . $i .'" value="' . $StringBitOfLotSNRef . ($LotSNRefNumeric + 1) . '" />'; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-08 21:18:07
|
Revision: 7676 http://weberp.svn.sourceforge.net/weberp/?rev=7676&view=rev Author: tim_schofield Date: 2011-08-08 21:18:01 +0000 (Mon, 08 Aug 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/SuppTransGLAnalysis.php trunk/TaxGroups.php Modified: trunk/SuppTransGLAnalysis.php =================================================================== --- trunk/SuppTransGLAnalysis.php 2011-08-08 21:17:49 UTC (rev 7675) +++ trunk/SuppTransGLAnalysis.php 2011-08-08 21:18:01 UTC (rev 7676) @@ -150,7 +150,7 @@ echo '<tr> <td>' . _('Account Code') . ':</td> <td><input type="text" name="GLCode" size="12" maxlength="11" value="' . $_POST['GLCode'] . '" /></td> - <input type="hidden" name="JobRef" value=""> + <input type="hidden" name="JobRef" value="" /> </tr>'; echo '<tr> <td>' . _('Account Selection') . ':<br />(' . _('If you know the code enter it above') . '<br />' . _('otherwise select the account from the list') . ')</td> @@ -176,7 +176,7 @@ } echo '<tr> <td>' . _('Amount') . ':</td> - <td><input type="text" class="number" name="Amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '"></td> + <td><input type="text" class="number" name="Amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '" /></td> </tr>'; if (!isset($_POST['Narrative'])) { Modified: trunk/TaxGroups.php =================================================================== --- trunk/TaxGroups.php 2011-08-08 21:17:49 UTC (rev 7675) +++ trunk/TaxGroups.php 2011-08-08 21:18:01 UTC (rev 7676) @@ -286,7 +286,7 @@ } echo '<td>' . $TaxAuthRow[$i]['taxname'] . '</td><td>'. - '<input type="text" class="number" name="CalcOrder_' . $TaxAuthRow[$i]['taxauthid'] . '" value="' . $TaxAuthRow[$i]['calculationorder'] . '" size="2" maxlength="2" style="width: 100%"></td>'; + '<input type="text" class="number" name="CalcOrder_' . $TaxAuthRow[$i]['taxauthid'] . '" value="' . $TaxAuthRow[$i]['calculationorder'] . '" size="2" maxlength="2" style="width: 100%" /></td>'; echo '<td><select name="TaxOnTax_' . $TaxAuthRow[$i]['taxauthid'] . '" style="width: 100%">'; if ($TaxAuthRow[$i]['taxontax']==1){ echo '<option selected="True" value="1">' . _('Yes') . '</option>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-09 18:59:13
|
Revision: 7712 http://weberp.svn.sourceforge.net/weberp/?rev=7712&view=rev Author: tim_schofield Date: 2011-08-09 18:59:07 +0000 (Tue, 09 Aug 2011) Log Message: ----------- Add the ability to make an order complete once the order has been printed Modified Paths: -------------- trunk/GoodsReceived.php trunk/PO_Header.php trunk/includes/DefinePOClass.php Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-08-09 18:58:43 UTC (rev 7711) +++ trunk/GoodsReceived.php 2011-08-09 18:59:07 UTC (rev 7712) @@ -694,7 +694,7 @@ $date = date($_SESSION['DefaultDateFormat']); $StatusComment=$date.' - Order Completed'.'<br />'.$comment; $sql="UPDATE purchorders - SET status='" . PurchOrder::STATUS_COMPLITED . "', + SET status='" . PurchOrder::STATUS_COMPLETED . "', stat_comment='" . $StatusComment . "' WHERE orderno='" . $_SESSION['PO']->OrderNo . "'"; $result=DB_query($sql,$db); Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-08-09 18:58:43 UTC (rev 7711) +++ trunk/PO_Header.php 2011-08-09 18:59:07 UTC (rev 7712) @@ -308,31 +308,31 @@ $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; $SQL = "SELECT suppliers.supplierid, - suppliers.suppname, - suppliers.address1, - suppliers.address2, - suppliers.address3, - suppliers.address4, - suppliers.address5, - suppliers.address6, - suppliers.currcode - FROM suppliers - WHERE suppliers.suppname LIKE '". $SearchString ."' - ORDER BY suppliers.suppname"; + suppliers.suppname, + suppliers.address1, + suppliers.address2, + suppliers.address3, + suppliers.address4, + suppliers.address5, + suppliers.address6, + suppliers.currcode + FROM suppliers + WHERE suppliers.suppname LIKE '". $SearchString ."' + ORDER BY suppliers.suppname"; } elseif (mb_strlen($_POST['SuppCode'])>0){ $SQL = "SELECT suppliers.supplierid, - suppliers.suppname, - suppliers.address1, - suppliers.address2, - suppliers.address3, - suppliers.address4, - suppliers.address5, - suppliers.address6, - suppliers.currcode - FROM suppliers - WHERE suppliers.supplierid LIKE '%" . $_POST['SuppCode'] . "%' - ORDER BY suppliers.supplierid"; + suppliers.suppname, + suppliers.address1, + suppliers.address2, + suppliers.address3, + suppliers.address4, + suppliers.address5, + suppliers.address6, + suppliers.currcode + FROM suppliers + WHERE suppliers.supplierid LIKE '%" . $_POST['SuppCode'] . "%' + ORDER BY suppliers.supplierid"; } $ErrMsg = _('The searched supplier records requested cannot be retrieved because'); @@ -805,10 +805,10 @@ break; case PurchOrder::STATUS_PRINTED: $StatusList = array(PurchOrder::STATUS_PENDING, PurchOrder::STATUS_PRINTED, - PurchOrder::STATUS_CANCELLED); + PurchOrder::STATUS_CANCELLED, PurchOrder::STATUS_COMPLETED); break; - case PurchOrder::STATUS_COMPLITED: - $StatusList = array(PurchOrder::STATUS_COMPLITED); + case PurchOrder::STATUS_COMPLETED: + $StatusList = array(PurchOrder::STATUS_COMPLETED); break; default: $StatusList = array(PurchOrder::STATUS_NEW_ORDER, PurchOrder::STATUS_PENDING, Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2011-08-09 18:58:43 UTC (rev 7711) +++ trunk/includes/DefinePOClass.php 2011-08-09 18:59:07 UTC (rev 7712) @@ -11,7 +11,7 @@ const STATUS_REJECTED = 'Rejected'; const STATUS_CANCELLED = 'Cancelled'; const STATUS_PRINTED = 'Printed'; - const STATUS_COMPLITED = 'Completed'; + const STATUS_COMPLETED = 'Completed'; var $LineItems; /*array of objects of class LineDetails using the product id as the pointer */ var $CurrCode; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-09 19:26:06
|
Revision: 7714 http://weberp.svn.sourceforge.net/weberp/?rev=7714&view=rev Author: tim_schofield Date: 2011-08-09 18:59:43 +0000 (Tue, 09 Aug 2011) Log Message: ----------- Provide link to the purchase order depending on its status Modified Paths: -------------- trunk/POReport.php trunk/PO_Header.php Modified: trunk/POReport.php =================================================================== --- trunk/POReport.php 2011-08-09 18:59:23 UTC (rev 7713) +++ trunk/POReport.php 2011-08-09 18:59:43 UTC (rev 7714) @@ -58,7 +58,7 @@ if (isset($_POST['submit'])) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . $title.'</p>'; - submit($db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$SaveSummaryType); + submit($db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$SaveSummaryType, $rootpath); } else if (isset($_POST['submitcsv'])) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . $title.'</p>'; submitcsv($db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$SaveSummaryType); @@ -69,7 +69,7 @@ //####_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT#### -function submit(&$db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$SaveSummaryType) +function submit(&$db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$SaveSummaryType, $rootpath) { //initialize no input errors @@ -162,6 +162,7 @@ purchorderdetails.deliverydate, purchorders.supplierno, purchorders.orddate, + purchorders.status, purchorderdetails.quantityord, purchorderdetails.qtyinvoiced, (purchorderdetails.quantityord * purchorderdetails.unitprice) as extprice, @@ -191,6 +192,7 @@ grns.deliverydate, purchorders.supplierno, purchorders.orddate, + purchorders.status, grns.qtyrecd as quantityord, grns.quantityinv as qtyinvoiced, (grns.qtyrecd * purchorderdetails.unitprice) as extprice, @@ -232,6 +234,7 @@ SUM(purchorderdetails.quantityord * purchorderdetails.unitprice) as extprice, SUM(purchorderdetails.quantityord * purchorderdetails.stdcostunit) as extcost, stockmaster.decimalplaces, + purchorders.status, stockmaster.description FROM purchorderdetails LEFT JOIN purchorders ON purchorders.orderno=purchorderdetails.orderno @@ -257,6 +260,7 @@ SUM(purchorderdetails.qtyinvoiced) as qtyinvoiced, SUM(purchorderdetails.quantityord * purchorderdetails.unitprice) as extprice, SUM(purchorderdetails.quantityord * purchorderdetails.stdcostunit) as extcost, + purchorders.status, suppliers.suppname FROM purchorderdetails LEFT JOIN purchorders ON purchorders.orderno=purchorderdetails.orderno @@ -281,6 +285,7 @@ SUM(purchorderdetails.qtyinvoiced) as qtyinvoiced, SUM(purchorderdetails.quantityord * purchorderdetails.unitprice) as extprice, SUM(purchorderdetails.quantityord * purchorderdetails.stdcostunit) as extcost, + purchorders.status, suppliers.suppname FROM purchorderdetails LEFT JOIN purchorders ON purchorders.orderno=purchorderdetails.orderno @@ -302,6 +307,7 @@ } elseif ($_POST['SummaryType'] == 'month') { $sql = "SELECT EXTRACT(YEAR_MONTH from purchorders.orddate) as month, CONCAT(MONTHNAME(purchorders.orddate),' ',YEAR(purchorders.orddate)) as monthname, + purchorders.status, SUM(purchorderdetails.quantityord) as quantityord, SUM(purchorderdetails.qtyinvoiced) as qtyinvoiced, SUM(purchorderdetails.quantityord * purchorderdetails.unitprice) as extprice, @@ -354,6 +360,7 @@ SUM(grns.quantityinv) as qtyinvoiced, SUM(grns.qtyrecd * purchorderdetails.unitprice) as extprice, SUM(grns.qtyrecd * grns.stdcostunit) as extcost, + purchorders.status, stockmaster.description FROM grns LEFT JOIN purchorderdetails ON grns.podetailitem = purchorderdetails.podetailitem @@ -379,6 +386,7 @@ SUM(grns.quantityinv) as qtyinvoiced, SUM(grns.qtyrecd * purchorderdetails.unitprice) as extprice, SUM(grns.qtyrecd * grns.stdcostunit) as extcost, + purchorders.status, suppliers.suppname FROM grns LEFT JOIN purchorderdetails ON grns.podetailitem = purchorderdetails.podetailitem @@ -404,6 +412,7 @@ SUM(grns.quantityinv) as qtyinvoiced, SUM(grns.qtyrecd * purchorderdetails.unitprice) as extprice, SUM(grns.qtyrecd * grns.stdcostunit) as extcost, + purchorders.status, suppliers.suppname FROM grns LEFT JOIN purchorderdetails ON grns.podetailitem = purchorderdetails.podetailitem @@ -429,6 +438,7 @@ SUM(grns.qtyrecd) as quantityord, SUM(grns.quantityinv) as qtyinvoiced, SUM(grns.qtyrecd * purchorderdetails.unitprice) as extprice, + purchorders.status, SUM(grns.qtyrecd * grns.stdcostunit) as extcost FROM grns LEFT JOIN purchorderdetails ON grns.podetailitem = purchorderdetails.podetailitem @@ -453,6 +463,7 @@ SUM(grns.qtyrecd) as quantityord, SUM(grns.quantityinv) as qtyinvoiced, SUM(grns.qtyrecd * purchorderdetails.unitprice) as extprice, + purchorders.status, SUM(grns.qtyrecd * grns.stdcostunit) as extcost FROM grns LEFT JOIN purchorderdetails ON grns.podetailitem = purchorderdetails.podetailitem @@ -549,7 +560,13 @@ } $linectr++; // Detail for both DateType of Order - printf('<td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td class="number">%s</td> + if ($myrow['status']=='Completed' or $myrow['status']=='Cancelled' or $myrow['status']=='Rejected') { + $ViewPurchOrder = $rootpath . '/PO_OrderDetails.php?OrderNo=' . $myrow['orderno']; + } else { + $ViewPurchOrder = $rootpath . '/PO_Header.php?ModifyOrderNumber=' . $myrow['orderno']; + } + printf('<td><a href="' . $ViewPurchOrder . '">%s</td> + <td>%s</td><td>%s</td><td>%s</td><td>%s</td><td class="number">%s</td> <td class="number">%s</td><td class="number">%s</td><td class="number">%s</td><td>%s</td><td>%s</td><td>%s</td></tr>', $myrow['orderno'], $myrow['itemcode'], Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-08-09 18:59:23 UTC (rev 7713) +++ trunk/PO_Header.php 2011-08-09 18:59:43 UTC (rev 7714) @@ -99,7 +99,17 @@ } } + if ($_POST['Status'] == 'Completed') { + if ($AuthorityLevel > $OrderTotal) { + $_SESSION['PO'.$identifier]->StatComments = date($_SESSION['DefaultDateFormat']) . ' - ' . _('Completed by') . $UserChangedStatus . $_POST['StatusComments'] . '<br />' . html_entity_decode($_POST['StatusCommentsComplete']); + $_SESSION['PO'.$identifier]->AllowPrintPO=1; + } else { + $OKToUpdateStatus=0; + prnMsg( _('You do not have permission to complete this purchase order').'.<br />', 'error'); + } + } + if ($_POST['Status'] == 'Rejected' OR $_POST['Status'] == 'Cancelled' ) { if(!isset($_SESSION['ExistingOrder']) OR $_SESSION['ExistingOrder']!=0) { /* need to check that not already dispatched or invoiced by the supplier */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-12 08:20:49
|
Revision: 7752 http://weberp.svn.sourceforge.net/weberp/?rev=7752&view=rev Author: tim_schofield Date: 2011-08-12 08:20:43 +0000 (Fri, 12 Aug 2011) Log Message: ----------- Ensure utf8 is used in htmlentities Modified Paths: -------------- trunk/PcExpenses.php trunk/Z_poEditLangHeader.php Modified: trunk/PcExpenses.php =================================================================== --- trunk/PcExpenses.php 2011-08-12 07:32:11 UTC (rev 7751) +++ trunk/PcExpenses.php 2011-08-12 08:20:43 UTC (rev 7752) @@ -213,7 +213,7 @@ $myrow[1], $myrow[2], $Description[0], - $_SERVER['PHP_SELF'], htmlentities($myrow[0]), + $_SERVER['PHP_SELF'], htmlentities($myrow[0], ENT_QUOTES,'UTF-8'), $_SERVER['PHP_SELF'], $myrow[0]); } //END WHILE LIST LOOP Modified: trunk/Z_poEditLangHeader.php =================================================================== --- trunk/Z_poEditLangHeader.php 2011-08-12 07:32:11 UTC (rev 7751) +++ trunk/Z_poEditLangHeader.php 2011-08-12 08:20:43 UTC (rev 7752) @@ -96,7 +96,7 @@ echo '<tr>'; echo '<td>' . _('Header Line') . ' # ' . $i . '</td>'; - echo '<td><input type="text" size="80" name="Header_' . $i . '" value="' . htmlentities($LanguageHeader[$i]) . '" /></td>'; + echo '<td><input type="text" size="80" name="Header_' . $i . '" value="' . htmlentities($LanguageHeader[$i], ENT_QUOTES,'UTF-8') . '" /></td>'; echo '</tr>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-14 10:31:00
|
Revision: 7760 http://weberp.svn.sourceforge.net/weberp/?rev=7760&view=rev Author: tim_schofield Date: 2011-08-14 10:30:53 +0000 (Sun, 14 Aug 2011) Log Message: ----------- Add in facility to print a GL journal Modified Paths: -------------- trunk/GLJournal.php Added Paths: ----------- trunk/PDFGLJournal.php trunk/companies/weberpdemo/FormDesigns/Journal.xml trunk/includes/PDFGLJournalHeader.inc Modified: trunk/GLJournal.php =================================================================== --- trunk/GLJournal.php 2011-08-14 10:30:30 UTC (rev 7759) +++ trunk/GLJournal.php 2011-08-14 10:30:53 UTC (rev 7760) @@ -111,13 +111,15 @@ prnMsg(_('Journal').' ' . $TransNo . ' '._('has been successfully entered'),'success'); + echo '<br /><div class="centre"><a href="PDFGLJournal.php?JournalNo='.$TransNo.'">'._('Print this Journal').'</a>'; + unset($_POST['JournalProcessDate']); unset($_POST['JournalType']); unset($_SESSION['JournalDetail']->GLEntries); unset($_SESSION['JournalDetail']); /*Set up a newy in case user wishes to enter another */ - echo '<br /><a href="' . $_SERVER['PHP_SELF'] . '?NewJournal=Yes">'._('Enter Another General Ledger Journal').'</a>'; + echo '<br /><a href="' . $_SERVER['PHP_SELF'] . '?NewJournal=Yes">'._('Enter Another General Ledger Journal').'</a></div>'; /*And post the journal too */ include ('includes/GLPostings.inc'); include ('includes/footer.inc'); Added: trunk/PDFGLJournal.php =================================================================== --- trunk/PDFGLJournal.php (rev 0) +++ trunk/PDFGLJournal.php 2011-08-14 10:30:53 UTC (rev 7760) @@ -0,0 +1,111 @@ +<?php +$PageSecurity=1; +/* $Id$*/ + +/* $Revision: 1.5 $ */ + +include('includes/session.inc'); + +if (isset($_POST['JournalNo'])) { + $JournalNo=$_POST['JournalNo']; +} else if (isset($_GET['JournalNo'])) { + $JournalNo=$_GET['JournalNo']; +} else { + $JournalNo=''; +} + +if ($JournalNo=='Preview') { + $FormDesign = simplexml_load_file(sys_get_temp_dir().'/Journal.xml'); +} else { + $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/Journal.xml'); +} + +// Set the paper size/orintation +$PaperSize = $FormDesign->PaperSize; +$PageNumber=1; +$line_height=$FormDesign->LineHeight; +include('includes/PDFStarter.php'); +$pdf->addInfo('Title', _('General Ledger Journal') ); + +if ($JournalNo=='Preview') { + $LineCount = 2; // UldisN +} else { + $sql="SELECT gltrans.typeno, + gltrans.trandate, + gltrans.account, + chartmaster.accountname, + gltrans.narrative, + gltrans.amount, + gltrans.tag, + tags.tagdescription, + gltrans.jobref + FROM gltrans + INNER JOIN chartmaster + ON gltrans.account=chartmaster.accountcode + LEFT JOIN tags + ON gltrans.tag=tags.tagref + WHERE gltrans.type='0' + AND gltrans.typeno='" . $JournalNo . "'"; + $result=DB_query($sql, $db); + $LineCount = DB_num_rows($result); // UldisN + $myrow=DB_fetch_array($result); + $JournalDate=$myrow['trandate']; + DB_data_seek($result, 0); + include('includes/PDFGLJournalHeader.inc'); +} +$counter=1; +$YPos=$FormDesign->Data->y; +while ($counter<=$LineCount) { + if ($JournalNo=='Preview') { + $AccountCode=str_pad('',10,'x'); + $Date='1/1/1900'; + $Description=str_pad('',30,'x'); + $Narrative=str_pad('',30,'x'); + $Amount='XXXX.XX'; + $Tag=str_pad('',25,'x'); + $JobRef=str_pad('',25,'x'); + } else { + $myrow=DB_fetch_array($result); + if ($myrow['tag']==0) { + $myrow['tagdescription']='None'; + } + $AccountCode = $myrow['account']; + $Description = $myrow['accountname']; + $Date = $myrow['trandate']; + $Narrative = $myrow['narrative']; + $Amount = $myrow['amount']; + $Tag = $myrow['tag'].' - '.$myrow['tagdescription']; + $JobRef = $myrow['jobref']; + } + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column1->x,$Page_Height-$YPos,$FormDesign->Data->Column1->Length,$FormDesign->Data->Column1->FontSize, $AccountCode); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column2->x,$Page_Height-$YPos,$FormDesign->Data->Column2->Length,$FormDesign->Data->Column2->FontSize, $Description); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column3->x,$Page_Height-$YPos,$FormDesign->Data->Column3->Length,$FormDesign->Data->Column3->FontSize, $Narrative); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x,$Page_Height-$YPos,$FormDesign->Data->Column4->Length,$FormDesign->Data->Column4->FontSize, number_format($Amount,$_SESSION['Currencies'][$_SESSION['CompanyRecord']['currencydefault']]['DecimalPlaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column5->x,$Page_Height-$YPos,$FormDesign->Data->Column5->Length,$FormDesign->Data->Column5->FontSize, $Tag); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column6->x,$Page_Height-$YPos,$FormDesign->Data->Column6->Length,$FormDesign->Data->Column6->FontSize, $JobRef, 'left'); + $YPos += $line_height; + $counter++; + if ($YPos >= $FormDesign->LineAboveFooter->starty){ + /* We reached the end of the page so finsih off the page and start a newy */ + $PageNumber++; + $YPos=$FormDesign->Data->y; + include ('includes/PDFGrnHeader.inc'); + } //end if need a new page headed up +} + +$LeftOvers = $pdf->addText($FormDesign->ReceiptDate->x,$Page_Height-$FormDesign->ReceiptDate->y,$FormDesign->ReceiptDate->FontSize, _('Date of Receipt: ').$Date); + +$LeftOvers = $pdf->addText($FormDesign->SignedFor->x,$Page_Height-$FormDesign->SignedFor->y,$FormDesign->SignedFor->FontSize, _('Signed for ').'______________________'); + +if ($LineCount == 0) { //UldisN + $title = _('GRN Error'); + include('includes/header.inc'); + prnMsg(_('There were no GRN to print'),'warn'); + echo '<br /><a href="'.$rootpath.'/index.php">'. _('Back to the menu').'</a>'; + include('includes/footer.inc'); + exit; +} else { + $pdf->OutputD($_SESSION['DatabaseName'] . '_GRN_' . date('Y-m-d').'.pdf');//UldisN + $pdf->__destruct(); //UldisN +} +?> \ No newline at end of file Added: trunk/companies/weberpdemo/FormDesigns/Journal.xml =================================================================== --- trunk/companies/weberpdemo/FormDesigns/Journal.xml (rev 0) +++ trunk/companies/weberpdemo/FormDesigns/Journal.xml 2011-08-14 10:30:53 UTC (rev 7760) @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="UTF-8"?> +<form name="Goods Received Note"> + <PaperSize name="Paper size">A4_Landscape</PaperSize> + <LineHeight name="Line height">12</LineHeight> + <logo type="image" name="Logo" id="Logo"> + <x>20</x> + <y>80</y> + <width>0</width> + <height>60</height> + </logo> + <CompanyName type="SimpleText" name="Company name" id="CompanyName"> + <FontSize>10</FontSize> + <x>625</x> + <y>30</y> + </CompanyName> + <GRNNumber type="SimpleText" name="GRN Number" id="GRNNumber"> + <FontSize>10</FontSize> + <x>625</x> + <y>48</y> + </GRNNumber> + <OrderNumber type="SimpleText" name="Order Number" id="OrderNumber"> + <FontSize>10</FontSize> + <x>625</x> + <y>66</y> + </OrderNumber> + <PrintDate type="SimpleText" name="Date Printed" id="PrintDate"> + <FontSize>10</FontSize> + <x>625</x> + <y>84</y> + </PrintDate> + <HeaderRectangle type="Rectangle" name="Header rectangle" id="HeaderRectangle"> + <x>40</x> + <y>114</y> + <width>772</width> + <height>24</height> + </HeaderRectangle> + <Headings type="ElementArray" name="Column headings"> + <Column1 type="SimpleText" name="Heading 1" id="Heading1"> + <FontSize>10</FontSize> + <x>41</x> + <y>126</y> + </Column1> + <Column2 type="SimpleText" name="Heading 2" id="Heading2"> + <FontSize>10</FontSize> + <x>116</x> + <y>126</y> + </Column2> + <Column3 type="SimpleText" name="Heading 3" id="Heading3"> + <FontSize>10</FontSize> + <x>256</x> + <y>126</y> + </Column3> + <Column4 type="MultiLineText" name="Heading 4" id="Heading4"> + <FontSize>10</FontSize> + <x>486</x> + <y>136</y> + <Length>100</Length> + </Column4> + <Column5 type="MultiLineText" name="Heading 5" id="Heading5"> + <FontSize>10</FontSize> + <x>616</x> + <y>136</y> + <Length>100</Length> + </Column5> + </Headings> + <DataRectangle type="Rectangle" name="Data rectangle" id="DataRectangle"> + <x>40</x> + <y>138</y> + <width>772</width> + <height>430</height> + </DataRectangle> + <LineAboveFooter type="Line" name="Line Above Footer" id="LineAboveFooter"> + <startx>40</startx> + <starty>530</starty> + <endx>812</endx> + <endy>530</endy> + </LineAboveFooter> + <Column1 type="Line" name="Column 1" id="Column1"> + <startx>114</startx> + <starty>114</starty> + <endx>114</endx> + <endy>530</endy> + </Column1> + <Column3 type="Line" name="Column 3" id="Column3"> + <startx>254</startx> + <starty>114</starty> + <endx>254</endx> + <endy>530</endy> + </Column3> + <Column4 type="Line" name="Column 4" id="Column4"> + <startx>489</startx> + <starty>114</starty> + <endx>489</endx> + <endy>530</endy> + </Column4> + <Column5 type="Line" name="Column 5" id="Column5"> + <startx>616</startx> + <starty>114</starty> + <endx>616</endx> + <endy>530</endy> + </Column5> + <Data type="ElementArray" name="Column Data"> + <y type="StartLine" name="Y co-ordinate of first data line" id="DataStartLine">156</y> + <Column1 type="DataText" name="Column 1" id="Data1"> + <FontSize>10</FontSize> + <x>41</x> + <Length>94</Length> + </Column1> + <Column2 type="DataText" name="Column 2" id="Data2"> + <FontSize>10</FontSize> + <x>116</x> + <Length>270</Length> + </Column2> + <Column3 type="DataText" name="Column 3" id="Data3"> + <FontSize>10</FontSize> + <x>256</x> + <Length>85</Length> + </Column3> + <Column4 type="DataText" name="Column 5" id="Data5"> + <FontSize>10</FontSize> + <x>568</x> + <Length>30</Length> + </Column4> + <Column5 type="DataText" name="Column 6" id="Data6"> + <FontSize>10</FontSize> + <x>638</x> + <Length>60</Length> + </Column5> + <Column6 type="DataText" name="Column 7" id="Data7"> + <FontSize>10</FontSize> + <x>700</x> + <Length>30</Length> + </Column6> + </Data> + <ReceiptDate type="SimpleText" name="Date Received" id="ReceiptDate"> + <FontSize>10</FontSize> + <x>300</x> + <y>550</y> + </ReceiptDate> + <SignedFor type="SimpleText" name="Signed Fror" id="SignedFor"> + <FontSize>10</FontSize> + <x>50</x> + <y>550</y> + </SignedFor> +</form> Added: trunk/includes/PDFGLJournalHeader.inc =================================================================== --- trunk/includes/PDFGLJournalHeader.inc (rev 0) +++ trunk/includes/PDFGLJournalHeader.inc 2011-08-14 10:30:53 UTC (rev 7760) @@ -0,0 +1,36 @@ +<?php +/* $Id$*/ +/*PDF page header for price list report */ +if ($PageNumber>1){ + $pdf->newPage(); +} + +$pdf->addJpegFromFile($_SESSION['LogoFile'] ,$FormDesign->logo->x,$Page_Height-$FormDesign->logo->y,$FormDesign->logo->width,$FormDesign->logo->height); + +$LeftOvers = $pdf->addText($FormDesign->CompanyName->x,$Page_Height-$FormDesign->CompanyName->y,$FormDesign->CompanyName->FontSize,$_SESSION['CompanyRecord']['coyname']); +$LeftOvers = $pdf->addText($FormDesign->GRNNumber->x,$Page_Height-$FormDesign->GRNNumber->y,$FormDesign->GRNNumber->FontSize, _('Journal number ').' ' . $JournalNo ); +$LeftOvers = $pdf->addText($FormDesign->OrderNumber->x,$Page_Height-$FormDesign->OrderNumber->y,$FormDesign->OrderNumber->FontSize, _('Journal Date ').' ' . ConvertSQLDate($JournalDate) ); +$LeftOvers = $pdf->addText($FormDesign->PrintDate->x,$Page_Height-$FormDesign->PrintDate->y,$FormDesign->PrintDate->FontSize, _('Printed').': ' . Date($_SESSION['DefaultDateFormat']) . ' '. _('Page'). ' ' . $PageNumber); + +/*Draw a rectangle to put the headings in */ +$pdf->Rectangle($FormDesign->HeaderRectangle->x, $Page_Height - $FormDesign->HeaderRectangle->y, $FormDesign->HeaderRectangle->width,$FormDesign->HeaderRectangle->height); + +/*set up the headings */ +$LeftOvers = $pdf->addText($FormDesign->Headings->Column1->x,$Page_Height - $FormDesign->Headings->Column1->y, $FormDesign->Headings->Column1->FontSize, _('Account Code')); +$LeftOvers = $pdf->addText($FormDesign->Headings->Column2->x,$Page_Height - $FormDesign->Headings->Column2->y, $FormDesign->Headings->Column2->FontSize, _('Account Description')); +$LeftOvers = $pdf->addText($FormDesign->Headings->Column3->x,$Page_Height - $FormDesign->Headings->Column3->y, $FormDesign->Headings->Column3->FontSize, _('Narrative')); +$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column4->x,$Page_Height - $FormDesign->Headings->Column4->y, $FormDesign->Headings->Column4->Length, $FormDesign->Headings->Column4->FontSize, _('Amount'), 'right'); +$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column5->x,$Page_Height - $FormDesign->Headings->Column5->y, $FormDesign->Headings->Column5->Length, $FormDesign->Headings->Column5->FontSize, _('Tag Details'), 'right'); + +/*Draw a rectangle to put the data in */ +$pdf->Rectangle($FormDesign->DataRectangle->x, $Page_Height - $FormDesign->DataRectangle->y, $FormDesign->DataRectangle->width,$FormDesign->DataRectangle->height); + +$pdf->Line($FormDesign->LineAboveFooter->startx, $Page_Height - $FormDesign->LineAboveFooter->starty, $FormDesign->LineAboveFooter->endx,$Page_Height - $FormDesign->LineAboveFooter->endy); + +$pdf->Line($FormDesign->Column1->startx, $Page_Height - $FormDesign->Column1->starty, $FormDesign->Column1->endx,$Page_Height - $FormDesign->Column1->endy); +$pdf->Line($FormDesign->Column3->startx, $Page_Height - $FormDesign->Column3->starty, $FormDesign->Column3->endx,$Page_Height - $FormDesign->Column3->endy); +$pdf->Line($FormDesign->Column4->startx, $Page_Height - $FormDesign->Column4->starty, $FormDesign->Column4->endx,$Page_Height - $FormDesign->Column4->endy); +$pdf->Line($FormDesign->Column5->startx, $Page_Height - $FormDesign->Column5->starty, $FormDesign->Column5->endx,$Page_Height - $FormDesign->Column5->endy); + +$PageNumber++; +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-15 12:29:16
|
Revision: 7762 http://weberp.svn.sourceforge.net/weberp/?rev=7762&view=rev Author: tim_schofield Date: 2011-08-15 12:29:09 +0000 (Mon, 15 Aug 2011) Log Message: ----------- Update page securities for new scripts Modified Paths: -------------- trunk/includes/session.inc Added Paths: ----------- trunk/sql/mysql/updates/90.php Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-08-15 09:20:21 UTC (rev 7761) +++ trunk/includes/session.inc 2011-08-15 12:29:09 UTC (rev 7762) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=89; +$DBVersion=90; if (isset($SessionSavePath)){ session_save_path($SessionSavePath); } Added: trunk/sql/mysql/updates/90.php =================================================================== --- trunk/sql/mysql/updates/90.php (rev 0) +++ trunk/sql/mysql/updates/90.php 2011-08-15 12:29:09 UTC (rev 7762) @@ -0,0 +1,11 @@ +<?php + +/* Include the new script for printing quotations in Portrait + */ + +InsertRecord('pagesecurity', array('script', 'security'), array('GLJournalInquiry.php',10), array('script', 'security'), array('GLJournalInquiry.php',10), $db); +InsertRecord('pagesecurity', array('script', 'security'), array('PDFGLJournal.php',10), array('script', 'security'), array('PDFGLJournal.php',10), $db); + +UpdateDBNo(90, $db); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-15 12:29:34
|
Revision: 7763 http://weberp.svn.sourceforge.net/weberp/?rev=7763&view=rev Author: tim_schofield Date: 2011-08-15 12:29:28 +0000 (Mon, 15 Aug 2011) Log Message: ----------- New script for inquiring on general ledger journals Modified Paths: -------------- trunk/PDFGLJournal.php trunk/index.php Added Paths: ----------- trunk/GLJournalInquiry.php Added: trunk/GLJournalInquiry.php =================================================================== --- trunk/GLJournalInquiry.php (rev 0) +++ trunk/GLJournalInquiry.php 2011-08-15 12:29:28 UTC (rev 7763) @@ -0,0 +1,122 @@ +<?php + +include ('includes/session.inc'); +$title = _('General Ledger Journal Inquiry'); +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; + +if (!isset($_POST['Show'])) { + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + echo '<table class="selection">'; + echo '<tr><th colspan="3"><font color="navy" size="2">' . _('Selection Criteria') . '</font></th></tr>'; + + $sql = "SELECT typeno FROM systypes WHERE typeid=0"; + $result = DB_query($sql, $db); + $myrow = DB_fetch_array($result); + $MaxJournalNumberUsed = $myrow['typeno']; + + echo '<tr> + <td>' . _('Journal Number Range') . ' (' . _('Between') . ' 1 ' . _('and') . ' ' . $MaxJournalNumberUsed . ')</td> + <td>' . _('From') . ':'. '<input type="text" class="number" name="NumberFrom" size="10" maxlength="11" value="1" />'.'</td> + <td>' . _('To') . ':'. '<input type="text" class="number" name="NumberTo" size="10" maxlength="11" value="' . $MaxJournalNumberUsed . '" />'.'</td> + </tr>'; + + $sql = "SELECT MIN(trandate) AS fromdate, + MAX(trandate) AS todate FROM gltrans WHERE type=0"; + $result = DB_query($sql, $db); + $myrow = DB_fetch_array($result); + $FromDate = $myrow['fromdate']; + $ToDate = $myrow['todate']; + + echo '<tr><td>' . _('Journals Dated Between') . ':</td> + <td>' . _('From') . ':'. '<input type="text" name="FromTransDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" size="11" value="' . ConvertSQLDate($FromDate) . '" /></td> + <td>' . _('To') . ':'. '<input type="text" name="ToTransDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" size="11" value="' . ConvertSQLDate($ToDate) . '" /></td> + </tr>'; + + echo '</table>'; + echo '<br /><div class="centre"><input type="submit" name="Show" value="' . _('Show transactions'). '" /></div>'; + echo '</form>'; +} else { + + $sql="SELECT gltrans.typeno, + gltrans.trandate, + gltrans.account, + chartmaster.accountname, + gltrans.narrative, + gltrans.amount, + gltrans.tag, + tags.tagdescription, + gltrans.jobref + FROM gltrans + INNER JOIN chartmaster + ON gltrans.account=chartmaster.accountcode + LEFT JOIN tags + ON gltrans.tag=tags.tagref + WHERE gltrans.type='0' + AND gltrans.trandate>='" . FormatDateForSQL($_POST['FromTransDate']) . "' + AND gltrans.trandate<='" . FormatDateForSQL($_POST['ToTransDate']) . "' + AND gltrans.typeno>='" . $_POST['NumberFrom'] . "' + AND gltrans.typeno<='" . $_POST['NumberTo'] . "' + ORDER BY gltrans.typeno"; + + $result = DB_query($sql, $db); + if (DB_num_rows($result)==0) { + prnMsg(_('There are no transactions for this account in the date range selected'), 'info'); + } else { + echo '<table class="selection">'; + echo '<tr> + <th>' . ('Date') . '</th> + <th>'._('Journal Number').'</th> + <th>'._('Account Code').'</th> + <th>'._('Account Description').'</th> + <th>'._('Narrative').'</th> + <th>'._('Amount').' '.$_SESSION['CompanyRecord']['currencydefault'].'</th> + <th>'._('Tag').'</th> + </tr>'; + + $LastJournal = 0; + + while ($myrow = DB_fetch_array($result)){ + + if ($myrow['tag']==0) { + $myrow['tagdescription']='None'; + } + + if ($myrow['typeno']!=$LastJournal) { + echo '<tr><td colspan="8" bgcolor="navy"></td></tr><tr> + <td>'. ConvertSQLDate($myrow['trandate']) . '</td> + <td class="number">'.$myrow['typeno'].'</td>'; + + } else { + echo '<tr><td colspan="2"></td>'; + } + + echo '<td>'.$myrow['account'].'</td> + <td>'.$myrow['accountname'].'</td> + <td>'.$myrow['narrative'] .'</td> + <td class="number">'.number_format($myrow['amount'],$_SESSION['Currencies'][$_SESSION['CompanyRecord']['currencydefault']]['DecimalPlaces']).'</td> + <td class="number">'.$myrow['tag'] . ' - ' . $myrow['tagdescription'].'</td>'; + + if ($myrow['typeno']!=$LastJournal) { + echo '<td class="number"><a href="PDFGLJournal.php?JournalNo='.$myrow['typeno'].'">'._('Print') .'</a></td></tr>'; + + $LastJournal = $myrow['typeno']; + } else { + echo '<td colspan="1"></td></tr>'; + } + + } + echo '</table>'; + } //end if no bank trans in the range to show + + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<br /><div class="centre"><input type="submit" name="Return" value="' . _('Select Another Date'). '" /></div>'; + echo '</form>'; +} +include('includes/footer.inc'); + +?> \ No newline at end of file Modified: trunk/PDFGLJournal.php =================================================================== --- trunk/PDFGLJournal.php 2011-08-15 12:29:09 UTC (rev 7762) +++ trunk/PDFGLJournal.php 2011-08-15 12:29:28 UTC (rev 7763) @@ -1,5 +1,5 @@ <?php -$PageSecurity=1; + /* $Id$*/ /* $Revision: 1.5 $ */ Modified: trunk/index.php =================================================================== --- trunk/index.php 2011-08-15 12:29:09 UTC (rev 7762) +++ trunk/index.php 2011-08-15 12:29:28 UTC (rev 7763) @@ -330,6 +330,7 @@ _('Account Inquiry'), _('Account Listing'), _('Account Listing to CSV File'), + _('General Ledger Journal Inquiry'), _('Bank Account Reconciliation Statement'), _('Cheque Payments Listing'), _('Daily Bank Transactions'), @@ -343,6 +344,7 @@ '/SelectGLAccount.php', '/GLAccountReport.php', '/GLAccountCSV.php', + '/GLJournalInquiry.php', '/BankReconciliation.php', '/PDFChequeListing.php', '/DailyBankTransactions.php', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-21 08:33:32
|
Revision: 7832 http://weberp.svn.sourceforge.net/weberp/?rev=7832&view=rev Author: tim_schofield Date: 2011-08-21 08:33:26 +0000 (Sun, 21 Aug 2011) Log Message: ----------- Improvements to backup system Modified Paths: -------------- trunk/BackupDatabase.php trunk/includes/session.inc trunk/index.php Added Paths: ----------- trunk/sql/mysql/updates/91.php Modified: trunk/BackupDatabase.php =================================================================== --- trunk/BackupDatabase.php 2011-08-21 08:33:08 UTC (rev 7831) +++ trunk/BackupDatabase.php 2011-08-21 08:33:26 UTC (rev 7832) @@ -1,8 +1,6 @@ <?php /* $Id BackupDatabase.php 4183 2010-12-14 09:30:20Z daintree $ */ -$PageSecurity = 15; //hard coded in case database is old and PageSecurity stuff cannot be retrieved - include('includes/session.inc'); $title = _('Backup webERP Database'); include('includes/header.inc'); @@ -42,7 +40,7 @@ if ($ReturnValue ==0) { prnMsg(_('The backup file has now been created. You must now download this to your computer because in case the web-server has a disk failure the backup would then not on the same machine. Use the link below') . '<br /><br /><a href="' . $BackupFile . '">' . _('Download the backup file to your locale machine') . '</a>','success'); prnMsg(_('Once you have downloaded the database backup file to your local machine you should use the link below to delete it - backup files can consume a lot of space on your hosting account and will accumulate if not deleted - they also contain sensitive information which would otherwise be available for others to download!'),'info'); - echo '</div><br /> + echo '<br /> <br /> <div class="centre"><a href="'. $_SERVER['PHP_SELF'] . '?BackupFile=' .$BackupFile .'">' . _('Delete the backup file off the server') . '</a></div>'; } else { Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-08-21 08:33:08 UTC (rev 7831) +++ trunk/includes/session.inc 2011-08-21 08:33:26 UTC (rev 7832) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=90; +$DBVersion=91; if (isset($SessionSavePath)){ session_save_path($SessionSavePath); } Modified: trunk/index.php =================================================================== --- trunk/index.php 2011-08-21 08:33:08 UTC (rev 7831) +++ trunk/index.php 2011-08-21 08:33:26 UTC (rev 7832) @@ -501,7 +501,8 @@ _('Discount Category Maintenance'), _('Units of Measure'), _('MRP Available Production Days'), - _('MRP Demand Types') + _('MRP Demand Types'), + _('Create and Manage Database Backups') ); $MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php', @@ -509,7 +510,8 @@ '/DiscountCategories.php', '/UnitsOfMeasure.php', '/MRPCalendar.php', - '/MRPDemandTypes.php' + '/MRPDemandTypes.php', + '/BackupDatabase.php' ); if (isset($SupplierLogin) and $SupplierLogin==1){ Added: trunk/sql/mysql/updates/91.php =================================================================== --- trunk/sql/mysql/updates/91.php (rev 0) +++ trunk/sql/mysql/updates/91.php 2011-08-21 08:33:26 UTC (rev 7832) @@ -0,0 +1,10 @@ +<?php + +/* Include the new script for printing quotations in Portrait + */ + +InsertRecord('pagesecurity', array('script', 'security'), array('BackupDatabase.php',15), array('script', 'security'), array('BackupDatabase.php',15), $db); + +UpdateDBNo(91, $db); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-24 19:06:21
|
Revision: 7840 http://weberp.svn.sourceforge.net/weberp/?rev=7840&view=rev Author: tim_schofield Date: 2011-08-24 19:06:15 +0000 (Wed, 24 Aug 2011) Log Message: ----------- Add email addresses to test forms Modified Paths: -------------- trunk/Suppliers.php trunk/build/tests/includes/FillForm.php Modified: trunk/Suppliers.php =================================================================== --- trunk/Suppliers.php 2011-08-24 19:06:03 UTC (rev 7839) +++ trunk/Suppliers.php 2011-08-24 19:06:15 UTC (rev 7840) @@ -830,7 +830,7 @@ </tr>'; echo '<tr> <td>' . _('Email Address') . ':</td> - <td><input '.(in_array('Name',$Errors) ? 'class="inputerror"' : '').' type="text" name="Email" value="' . $_POST['Email'] . '" size="42" maxlength="40" /></td> + <td><input class="email" '.(in_array('Name',$Errors) ? 'class="inputerror"' : '').' type="text" name="Email" value="' . $_POST['Email'] . '" size="42" maxlength="40" /></td> </tr>'; echo '<tr><td>' . _('Supplier Type') . ':</td><td><select name="SupplierType">'; $result=DB_query("SELECT typeid, typename FROM suppliertype", $db); Modified: trunk/build/tests/includes/FillForm.php =================================================================== --- trunk/build/tests/includes/FillForm.php 2011-08-24 19:06:03 UTC (rev 7839) +++ trunk/build/tests/includes/FillForm.php 2011-08-24 19:06:15 UTC (rev 7840) @@ -2,8 +2,16 @@ function RandomASCIIString($MaxLength) { $Answer = ''; + $Length = rand(0, $MaxLength-5); + for ($i=0; $i<$Length; $i++) { + $Answer .= chr(rand(32, 127)); + } + return $Answer; +} + +function RandomEmailString($MaxLength) { + $Answer = ''; $Length = rand(0, $MaxLength); - echo $Length.'xxxx'.$MaxLength; for ($i=0; $i<$Length; $i++) { $Answer .= chr(rand(32, 127)); } @@ -32,6 +40,8 @@ $PostData[$Field['name']]=RandomNumberString($Field['maxlength']); } else if (isset($Field['class']) and $Field['class']=='date') { $PostData[$Field['name']]=RandomDateString('2000-01-01', '2012-12-31'); + } else if (isset($Field['class']) and $Field['class']=='email') { + $PostData[$Field['name']]=RandomEmailString($Field['maxlength']); } else { $PostData[$Field['name']]=RandomASCIIString($Field['maxlength']); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-24 20:27:29
|
Revision: 7938 http://weberp.svn.sourceforge.net/weberp/?rev=7938&view=rev Author: tim_schofield Date: 2011-08-24 20:27:23 +0000 (Wed, 24 Aug 2011) Log Message: ----------- Use ENT_QUOTES,UTF-8 for html_entity_decode() function Modified Paths: -------------- trunk/PO_Header.php trunk/Z_poEditLangHeader.php trunk/includes/htmlMimeMail.php Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-08-24 20:26:05 UTC (rev 7937) +++ trunk/PO_Header.php 2011-08-24 20:27:23 UTC (rev 7938) @@ -88,7 +88,7 @@ if ($_POST['Status'] == 'Authorised') { if ($AuthorityLevel > $OrderTotal) { - $_SESSION['PO'.$identifier]->StatComments = date($_SESSION['DefaultDateFormat']) . ' - ' . _('Authorised by') . $UserChangedStatus . $_POST['StatusComments'] . '<br />' . html_entity_decode($_POST['StatusCommentsComplete'],ENT_QUOTES,UTF-8); + $_SESSION['PO'.$identifier]->StatComments = date($_SESSION['DefaultDateFormat']) . ' - ' . _('Authorised by') . $UserChangedStatus . $_POST['StatusComments'] . '<br />' . html_entity_decode($_POST['StatusCommentsComplete'],ENT_QUOTES,'UTF-8'); $_SESSION['PO'.$identifier]->AllowPrintPO=1; } else { $OKToUpdateStatus=0; @@ -101,7 +101,7 @@ if ($_POST['Status'] == 'Completed') { if ($AuthorityLevel > $OrderTotal) { - $_SESSION['PO'.$identifier]->StatComments = date($_SESSION['DefaultDateFormat']) . ' - ' . _('Completed by') . $UserChangedStatus . $_POST['StatusComments'] . '<br />' . html_entity_decode($_POST['StatusCommentsComplete'],ENT_QUOTES,UTF-8); + $_SESSION['PO'.$identifier]->StatComments = date($_SESSION['DefaultDateFormat']) . ' - ' . _('Completed by') . $UserChangedStatus . $_POST['StatusComments'] . '<br />' . html_entity_decode($_POST['StatusCommentsComplete'],ENT_QUOTES,'UTF-8'); $_SESSION['PO'.$identifier]->AllowPrintPO=1; } else { $OKToUpdateStatus=0; @@ -842,9 +842,9 @@ echo '<tr><td>' . _('Status Comment') . ':</td> <td><input type="text" name="StatusComments" size="50" /></td></tr> - <tr><td colspan="2"><b>' . html_entity_decode($_SESSION['PO'.$identifier]->StatComments,ENT_QUOTES,UTF-8) .'</b></td></tr>'; + <tr><td colspan="2"><b>' . html_entity_decode($_SESSION['PO'.$identifier]->StatComments,ENT_QUOTES,'UTF-8') .'</b></td></tr>'; //need to use single quotes as double quotes inside the string of StatusComments - echo "<input type='hidden' name='StatusCommentsComplete' value='" . addslashes(html_entity_decode($_SESSION['PO'.$identifier]->StatComments,ENT_QUOTES,UTF-8)) ."' />"; + echo "<input type='hidden' name='StatusCommentsComplete' value='" . addslashes(html_entity_decode($_SESSION['PO'.$identifier]->StatComments,ENT_QUOTES,'UTF-8')) ."' />"; echo '<tr><td><input type="submit" name="UpdateStatus" value="' . _('Status Update') .'" /></td>'; echo '</tr></table></td>'; Modified: trunk/Z_poEditLangHeader.php =================================================================== --- trunk/Z_poEditLangHeader.php 2011-08-24 20:26:05 UTC (rev 7937) +++ trunk/Z_poEditLangHeader.php 2011-08-24 20:27:23 UTC (rev 7938) @@ -39,7 +39,7 @@ $fpOut = fopen($PathToNewLanguage, 'w'); for ($i=1; $i<=17; $i++) { - $Result = fputs($fpOut, stripslashes(html_entity_decode($_POST['Header_'.$i],ENT_QUOTES,UTF-8))."\n"); + $Result = fputs($fpOut, stripslashes(html_entity_decode($_POST['Header_'.$i],ENT_QUOTES,'UTF-8'))."\n"); } prnMsg (_('Writing the rest of the language file') . '.....<br />', 'info', ' '); Modified: trunk/includes/htmlMimeMail.php =================================================================== --- trunk/includes/htmlMimeMail.php 2011-08-24 20:26:05 UTC (rev 7937) +++ trunk/includes/htmlMimeMail.php 2011-08-24 20:27:23 UTC (rev 7938) @@ -141,8 +141,8 @@ $this->smtp_params['port'] = $_SESSION['SMTPSettings']['port']; $this->smtp_params['helo'] = $_SESSION['SMTPSettings']['heloaddress']; $this->smtp_params['auth'] = $_SESSION['SMTPSettings']['auth']; - $this->smtp_params['user'] = html_entity_decode($_SESSION['SMTPSettings']['username']); - $this->smtp_params['pass'] = html_entity_decode($_SESSION['SMTPSettings']['password']); + $this->smtp_params['user'] = html_entity_decode($_SESSION['SMTPSettings']['username'],ENT_QUOTES,UTF-8); + $this->smtp_params['pass'] = html_entity_decode($_SESSION['SMTPSettings']['password'],ENT_QUOTES,UTF-8); /** * Make sure the MIME version header is first. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-24 20:35:17
|
Revision: 7944 http://weberp.svn.sourceforge.net/weberp/?rev=7944&view=rev Author: tim_schofield Date: 2011-08-24 20:35:11 +0000 (Wed, 24 Aug 2011) Log Message: ----------- Phil: Added BuyerName to Delivery Details and the cart class Modified Paths: -------------- trunk/DeliveryDetails.php trunk/includes/DefineCartClass.php Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-08-24 20:33:17 UTC (rev 7943) +++ trunk/DeliveryDetails.php 2011-08-24 20:35:11 UTC (rev 7944) @@ -188,6 +188,7 @@ $_SESSION['Items'.$identifier]->Quotation = $_POST['Quotation']; } else { $_SESSION['Items'.$identifier]->DeliverTo = $_POST['DeliverTo']; + $_SESSION['Items'.$identifier]->BuyerName = $_POST['BuyerName']; $_SESSION['Items'.$identifier]->DelAdd1 = $_POST['BrAdd1']; $_SESSION['Items'.$identifier]->DelAdd2 = $_POST['BrAdd2']; $_SESSION['Items'.$identifier]->DelAdd3 = $_POST['BrAdd3']; @@ -334,6 +335,7 @@ ordertype, shipvia, deliverto, + buyername, deladd1, deladd2, deladd3, @@ -355,10 +357,11 @@ '" . $_SESSION['Items'.$identifier]->Branch . "', '". DB_escape_string($_SESSION['Items'.$identifier]->CustRef) ."', '". DB_escape_string($_SESSION['Items'.$identifier]->Comments) ."', - '" . Date("Y-m-d H:i") . "', + '" . Date('Y-m-d H:i') . "', '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', '" . $_POST['ShipVia'] ."', - '". DB_escape_string($_SESSION['Items'.$identifier]->DeliverTo) . "', + '" . DB_escape_string($_SESSION['Items'.$identifier]->DeliverTo) . "', + '" . DB_escape_string($_SESSION['Items'.$identifier]->BuyerName) . "', '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd1) . "', '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd2) . "', '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd3) . "', @@ -729,6 +732,7 @@ quotedate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->QuoteDate)) . "', confirmeddate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->ConfirmedDate)) . "', deliverto = '" . DB_escape_string($_SESSION['Items'.$identifier]->DeliverTo) . "', + buyername = '" . DB_escape_string($_SESSION['Items'.$identifier]->BuyerName) . "', deladd1 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd1) . "', deladd2 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd2) . "', deladd3 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd3) . "', @@ -992,6 +996,11 @@ </tr>'; echo '<tr> + <td>'. _('Buyer Name') . ':</td> + <td><input type="text" size="30" maxlength="30" name="BuyerName" value="' . $_SESSION['Items'.$identifier]->BuyerName . '" /></td> +</tr>'; + +echo '<tr> <td>'. _('Delivery Address 1') . ':</td> <td><input type="text" size="42" maxlength="40" name="BrAdd1" value="' . $_SESSION['Items'.$identifier]->DelAdd1 . '" /></td> </tr>'; Modified: trunk/includes/DefineCartClass.php =================================================================== --- trunk/includes/DefineCartClass.php 2011-08-24 20:33:17 UTC (rev 7943) +++ trunk/includes/DefineCartClass.php 2011-08-24 20:35:11 UTC (rev 7944) @@ -57,6 +57,7 @@ Var $DeliveryDays; var $TaxTotals; var $TaxGLCodes; + var $BuyerName; function Cart(){ /*Constructor function initialises a new shopping cart */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-28 20:54:50
|
Revision: 8028 http://weberp.svn.sourceforge.net/weberp/?rev=8028&view=rev Author: tim_schofield Date: 2011-08-28 20:54:44 +0000 (Sun, 28 Aug 2011) Log Message: ----------- Format currency amounts correctly Modified Paths: -------------- trunk/Z_CurrencyDebtorsBalances.php trunk/Z_CurrencySuppliersBalances.php Modified: trunk/Z_CurrencyDebtorsBalances.php =================================================================== --- trunk/Z_CurrencyDebtorsBalances.php 2011-08-28 20:53:57 UTC (rev 8027) +++ trunk/Z_CurrencyDebtorsBalances.php 2011-08-28 20:54:44 UTC (rev 8028) @@ -25,14 +25,14 @@ echo '<tr><td><font size="4">' . _('Total Debtor Balances in') . ' </font></td> <td><font size="4">' . $myrow['currcode'] . '</font></td> - <td class="number"><font size="4">' . number_format($myrow['currencybalance'],2) . '</font></td> + <td class="number"><font size="4">' . currency_number_format($myrow['currencybalance'],$myrow['currcode']) . '</font></td> <td><font size="4"> in ' . $_SESSION['CompanyRecord']['currencydefault'] . '</font></td> - <td class="number"><font size="4">' . number_format($myrow['localbalance'],2) . '</font></td></tr>'; + <td class="number"><font size="4">' . currency_number_format($myrow['localbalance'],$_SESSION['CompanyRecord']['currencydefault']) . '</font></td></tr>'; $LocalTotal += $myrow['localbalance']; } echo '<tr><td colspan="4"><font size="4">' . _('Total Balances in local currency') . ':</font></td> - <td class="number"><font size="4">' . number_format($LocalTotal,2) . '</font></td></tr>'; + <td class="number"><font size="4">' . currency_number_format($LocalTotal,$_SESSION['CompanyRecord']['currencydefault']) . '</font></td></tr>'; echo '</table>'; Modified: trunk/Z_CurrencySuppliersBalances.php =================================================================== --- trunk/Z_CurrencySuppliersBalances.php 2011-08-28 20:53:57 UTC (rev 8027) +++ trunk/Z_CurrencySuppliersBalances.php 2011-08-28 20:54:44 UTC (rev 8028) @@ -25,12 +25,12 @@ <td><font size="4">' . $myrow['currcode'] . '</font></td> <td class="number"><font size="4">' . currency_number_format($myrow['currencybalance'], $myrow['currcode']) . '</font></td> <td><font size="4"> ' . _('in') . ' ' . $_SESSION['CompanyRecord']['currencydefault'] . '</font></td> - <td class="number"><font size="4">' . currency_number_format($myrow['localbalance'], $myrow['currcode']) . '</font></td></tr>'; + <td class="number"><font size="4">' . currency_number_format($myrow['localbalance'], $_SESSION['CompanyRecord']['currencydefault']) . '</font></td></tr>'; $LocalTotal += $myrow['localbalance']; } echo '<tr><td colspan="4"><font size="4">' . _('Total Balances in local currency') . ':</font></td> - <td class="number"><font size="4">' . currency_number_format($LocalTotal, $myrow['currcode']) . '</font></td></tr>'; + <td class="number"><font size="4">' . currency_number_format($LocalTotal, $_SESSION['CompanyRecord']['currencydefault']) . '</font></td></tr>'; echo '</table>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Tu...@us...> - 2011-08-28 23:17:48
|
Revision: 8031 http://weberp.svn.sourceforge.net/weberp/?rev=8031&view=rev Author: TurboPT Date: 2011-08-28 23:17:42 +0000 (Sun, 28 Aug 2011) Log Message: ----------- Apply leading underscores for gettext strings. Modified Paths: -------------- trunk/BOMs.php trunk/DailyBankTransactions.php trunk/Z_UpgradeDatabase.php Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2011-08-28 20:55:47 UTC (rev 8030) +++ trunk/BOMs.php 2011-08-28 23:17:42 UTC (rev 8031) @@ -578,7 +578,7 @@ echo '<br /><input type="hidden" name="SelectedParent" value="'.$SelectedParent.'" />'; echo '<input type="hidden" name="SelectedComponent" value="'.$SelectedComponent.'" />'; echo '<table class="selection">'; - echo '<tr><th colspan="13"><div class="centre"><font color="blue" size="3"><b>'. ('Edit Component Details') .'</font></b></th></tr>'; + echo '<tr><th colspan="13"><div class="centre"><font color="blue" size="3"><b>'. _('Edit Component Details') .'</font></b></th></tr>'; echo '<tr><td>' . _('Component') . ':</td><td><b>' . $SelectedComponent . '</b></td></tr>'; } else { //end of if $SelectedComponent @@ -587,7 +587,7 @@ /* echo "Enter the details of a new component in the fields below. <br />Click on 'Enter Information' to add the new component, once all fields are completed."; */ echo '<table class="selection">'; - echo '<tr><th colspan="13"><div class="centre"><font color="blue" size="3"><b>'. ('New Component Details') .'</font></b></th></tr>'; + echo '<tr><th colspan="13"><div class="centre"><font color="blue" size="3"><b>'. _('New Component Details') .'</font></b></th></tr>'; echo '<tr><td>' . _('Component code') . ':</td><td>'; echo '<select ' . (in_array('ComponentCode',$Errors) ? 'class="selecterror"' : '' ) .' tabindex="1" name="Component">'; Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2011-08-28 20:55:47 UTC (rev 8030) +++ trunk/DailyBankTransactions.php 2011-08-28 23:17:42 UTC (rev 8031) @@ -89,7 +89,7 @@ <th colspan="7"><font size="3" color="blue">' . _('Account Transactions For').' '.$BankDetailRow['bankaccountname'].' '._('Between').' '.$_POST['FromTransDate'] . ' ' . _('and') . ' ' . $_POST['ToTransDate'] . '</font></th> </tr>'; echo '<tr> - <th>' . ('Date') . '</th> + <th>' . _('Date') . '</th> <th>'._('Transaction type').'</th> <th>'._('Type').'</th> <th>'._('Reference').'</th> Modified: trunk/Z_UpgradeDatabase.php =================================================================== --- trunk/Z_UpgradeDatabase.php 2011-08-28 20:55:47 UTC (rev 8030) +++ trunk/Z_UpgradeDatabase.php 2011-08-28 23:17:42 UTC (rev 8031) @@ -45,8 +45,8 @@ echo '<div class="page_help_text">' . _('You have database updates that are required.').'<br />'. _('Please ensure that you have taken a backup of your current database before continuing.'). '</div><br />'; - echo '<div class="centre"><input type="submit" name="continue" value="'.('Continue With Updates').'" /> - <input type="submit" name="CreateSQLFile" value="'.('Create an SQL file to apply manually').'" /></div>'; + echo '<div class="centre"><input type="submit" name="continue" value="'. _('Continue With Updates').'" /> + <input type="submit" name="CreateSQLFile" value="'. _('Create an SQL file to apply manually').'" /></div>'; echo '</form>'; } else { $StartingUpdate=$_SESSION['DBUpdateNumber']+1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-30 20:17:36
|
Revision: 8049 http://weberp.svn.sourceforge.net/weberp/?rev=8049&view=rev Author: tim_schofield Date: 2011-08-30 20:17:30 +0000 (Tue, 30 Aug 2011) Log Message: ----------- Format currency and stock amounts correctly Modified Paths: -------------- trunk/SuppShiptChgs.php trunk/includes/DefineShiptClass.php Modified: trunk/SuppShiptChgs.php =================================================================== --- trunk/SuppShiptChgs.php 2011-08-30 20:17:18 UTC (rev 8048) +++ trunk/SuppShiptChgs.php 2011-08-30 20:17:30 UTC (rev 8049) @@ -17,10 +17,10 @@ include('includes/header.inc'); -if ($_SESSION['SuppTrans']->InvoiceOrCredit == 'Invoice'){ - echo '<a href="' . $rootpath . '/SupplierInvoice.php">' . _('Back to Invoice Entry') . '</a>'; -} else { - echo '<a href="' . $rootpath . '/SupplierCredit.php">' . _('Back to Credit Note Entry') . '</a>'; +foreach ($_POST as $key=>$value) { + if (substr($key, 0, 6)=='Amount') { + $_POST[$key] = filter_currency_input($value); + } } if (!isset($_SESSION['SuppTrans'])){ @@ -69,13 +69,19 @@ /*Show all the selected ShiptRefs so far from the SESSION['SuppInv']->Shipts array */ if ($_SESSION['SuppTrans']->InvoiceOrCredit=='Invoice'){ - echo '<p class="page_title_text">'. _('Shipment charges on Invoice') . ' '.'</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Search') . '" alt="" />'. _('Shipment charges on Invoice') . ' '; } else { - echo '<p class="page_title_text">' . _('Shipment credits on Credit Note') . ' '.'</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Search') . '" alt="" />' . _('Shipment credits on Credit Note') . ' '; } -echo '<p>'.$_SESSION['SuppTrans']->SuppReference . ' ' ._('From') . ' ' . $_SESSION['SuppTrans']->SupplierName.'</p>'; +echo '<br />' . $_SESSION['SuppTrans']->SuppReference . ' ' ._('From') . ' ' . $_SESSION['SuppTrans']->SupplierName.'</p>'; -echo '<table cellpadding="2" class="selection">'; +if ($_SESSION['SuppTrans']->InvoiceOrCredit == 'Invoice'){ + echo '<div class="centre"><a href="' . $rootpath . '/SupplierInvoice.php">' . _('Back to Invoice Entry') . '</a></div>'; +} else { + echo '<div class="centre"><a href="' . $rootpath . '/SupplierCredit.php">' . _('Back to Credit Note Entry') . '</a></div>'; +} + +echo '<br /><table cellpadding="2" class="selection">'; $TableHeader = '<tr><th>' . _('Shipment') . '</th> <th>' . _('Amount') . '</th></tr>'; echo $TableHeader; @@ -85,7 +91,7 @@ foreach ($_SESSION['SuppTrans']->Shipts as $EnteredShiptRef){ echo '<tr><td>' . $EnteredShiptRef->ShiptRef . '</td> - <td class="number">' . number_format($EnteredShiptRef->Amount,2) . '</td> + <td class="number">' . currency_number_format($EnteredShiptRef->Amount,$_SESSION['SuppTrans']->CurrCode) . '</td> <td><a href="' . $_SERVER['PHP_SELF'] . '?Delete=' . $EnteredShiptRef->Counter . '">' . _('Delete') . '</a></td></tr>'; $TotalShiptValue = $TotalShiptValue + $EnteredShiptRef->Amount; @@ -94,7 +100,7 @@ echo '<tr> <td class="number"><font size="2" color="navy">' . _('Total') . ':</font></td> - <td class="number"><font size="2" color="navy"><u>' . number_format($TotalShiptValue,2) . '</u></font></td> + <td class="number"><font size="2" color="navy"><u>' . currency_number_format($TotalShiptValue,$_SESSION['SuppTrans']->CurrCode) . '</u></font></td> </tr> </table><br />'; @@ -105,6 +111,13 @@ if (!isset($_POST['ShiptRef'])) { $_POST['ShiptRef']=''; } + +foreach ($_POST as $key=>$value) { + if (substr($key, 0, 6)=='Amount') { + $_POST[$key] = filter_currency_input($value); + } +} + echo '<table class="selection">'; echo '<tr><td>' . _('Shipment Reference') . ':</td> <td><input type="text" name="ShiptRef" size="12" maxlength="11" value="' . $_POST['ShiptRef'] . '" /></td></tr>'; @@ -134,7 +147,7 @@ $_POST['Amount']=0; } echo '<tr><td>' . _('Amount') . ':</td> - <td><input type="text" name="Amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '" /></td></tr>'; + <td><input type="text" class="number" name="Amount" size="12" maxlength="11" value="' . currency_number_format($_POST['Amount'], $_SESSION['SuppTrans']->CurrCode) . '" /></td></tr>'; echo '</table>'; echo '<br /><div class="centre"><input type="submit" name="AddShiptChgToInvoice" value="' . _('Enter Shipment Charge') . '" /></div>'; Modified: trunk/includes/DefineShiptClass.php =================================================================== --- trunk/includes/DefineShiptClass.php 2011-08-30 20:17:18 UTC (rev 8048) +++ trunk/includes/DefineShiptClass.php 2011-08-30 20:17:30 UTC (rev 8049) @@ -4,17 +4,17 @@ Class Shipment { - Var $ShiptRef; /*unqique identifier for the shipment */ + var $ShiptRef; /*unqique identifier for the shipment */ var $LineItems; /*array of objects of class LineDetails using the product id as the pointer */ - Var $SupplierID; + var $SupplierID; var $SupplierName; var $CurrCode; var $VoyageRef; - Var $Vessel; - Var $ETA; - Var $StockLocation; - Var $Closed; + var $Vessel; + var $ETA; + var $StockLocation; + var $Closed; function Shipment(){ /*Constructor function initialises a new Shipment object */ @@ -43,7 +43,7 @@ $ErrMsg = _('There was an error updating the purchase order detail record to make it part of shipment') . ' ' . $this->ShiptRef . ' ' . _('the error reported was'); $result = DB_query($sql, $db, $ErrMsg); - Return 1; + return 1; } @@ -63,17 +63,17 @@ Class LineDetails { - Var $PODetailItem; - Var $OrderNo; - Var $StockID; - Var $ItemDescription; - Var $QtyInvoiced; - Var $UnitPrice; - Var $UOM; - Var $DelDate; - Var $QuantityOrd; - Var $QuantityRecd; - Var $StdCostUnit; + var $PODetailItem; + var $OrderNo; + var $StockID; + var $ItemDescription; + var $QtyInvoiced; + var $UnitPrice; + var $UOM; + var $DelDate; + var $QuantityOrd; + var $QuantityRecd; + var $StdCostUnit; function LineDetails ($PODetailItem, $OrderNo, $StockID, $ItemDescr, $QtyInvoiced, $UnitPrice, $UOM, $DelDate, $QuantityOrd, $QuantityRecd, $StdCostUnit){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Tu...@us...> - 2011-09-01 00:42:02
|
Revision: 8055 http://weberp.svn.sourceforge.net/weberp/?rev=8055&view=rev Author: TurboPT Date: 2011-09-01 00:41:56 +0000 (Thu, 01 Sep 2011) Log Message: ----------- Replace deprecated font tag with improved layout. Modified Paths: -------------- trunk/css/default/login.css trunk/includes/FailedLogin.php Modified: trunk/css/default/login.css =================================================================== --- trunk/css/default/login.css 2011-08-31 19:39:41 UTC (rev 8054) +++ trunk/css/default/login.css 2011-09-01 00:41:56 UTC (rev 8055) @@ -69,3 +69,12 @@ margin-left:50px; width:200px; } + +div.centre { + margin: 0 auto; + text-align:center; +} + +h3.error { + color:red; +} Modified: trunk/includes/FailedLogin.php =================================================================== --- trunk/includes/FailedLogin.php 2011-08-31 19:39:41 UTC (rev 8054) +++ trunk/includes/FailedLogin.php 2011-09-01 00:41:56 UTC (rev 8055) @@ -10,10 +10,12 @@ <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td> - <div class+"centre"><font size="4" color="red"><br /><br /><br /><b> - - Too many failed login attempts - <p>You will have to see an authorised person to obtain access to the system</p></b></font></div> + <div class="centre"> + <h3 class="error"> + Too many failed login attempts<br /><br /> + You will have to see an authorised person to obtain access to the system + </h3> + </div> </td> </tr> </table> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-09-03 16:08:01
|
Revision: 8062 http://weberp.svn.sourceforge.net/weberp/?rev=8062&view=rev Author: tim_schofield Date: 2011-09-03 16:07:55 +0000 (Sat, 03 Sep 2011) Log Message: ----------- Ricard: StockAdjustments.php now sends an email to the inventory manager on the creation of manual stock adjustments. The inventory manager email is defined in SystemParameters.php - leaving the email address blank will stop any emails from being created. Modified Paths: -------------- trunk/StockAdjustments.php trunk/SystemParameters.php trunk/includes/session.inc Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2011-09-03 16:07:41 UTC (rev 8061) +++ trunk/StockAdjustments.php 2011-09-03 16:07:55 UTC (rev 8062) @@ -290,8 +290,14 @@ $Result = DB_Txn_Commit($db); - prnMsg( _('A stock adjustment for'). ' ' . $_SESSION['Adjustment']->StockID . ' - ' . $_SESSION['Adjustment']->ItemDescription . ' '._('has been created from location').' ' . $_SESSION['Adjustment']->StockLocation .' '. _('for a quantity of') . ' ' . $_SESSION['Adjustment']->Quantity,'success'); + $ConfirmationText = _('A stock adjustment for'). ' ' . $_SESSION['Adjustment']->StockID . ' - ' . $_SESSION['Adjustment']->ItemDescription . ' '._('has been created from location').' ' . $_SESSION['Adjustment']->StockLocation .' '. _('for a quantity of') . ' ' . $_SESSION['Adjustment']->Quantity ; + prnMsg( $ConfirmationText,'success'); + if ($_SESSION['InventoryManagerEmail']!=''){ + $ConfirmationText = $ConfirmationText . ' ' . _('by user') . ' ' . $_SESSION['UserID'] . ' ' . _('at') . ' ' . Date('Y-m-d H:i:s'); + $EmailSubject = _('Stock adjustment for'). ' ' . $_SESSION['Adjustment']->StockID; + mail($_SESSION['InventoryManagerEmail'],$EmailSubject,$ConfirmationText); + } unset ($_SESSION['Adjustment']); } /* end if there was no input error */ Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2011-09-03 16:07:41 UTC (rev 8061) +++ trunk/SystemParameters.php 2011-09-03 16:07:55 UTC (rev 8062) @@ -83,6 +83,9 @@ }elseif (!IsEmailAddress($_POST['X_PurchasingManagerEmail'])){ $InputError = 1; prnMsg(_('The Purchasing Manager Email address does not appear to be valid'),'error'); + }elseif (!IsEmailAddress($_POST['X_InventoryManagerEmail']) AND $_POST['X_InventoryManagerEmail']!=''){ + $InputError = 1; + prnMsg(_('The Inventory Manager Email address does not appear to be valid'),'error'); }elseif (mb_strlen($_POST['X_FrequentlyOrderedItems']) > 2 or !is_numeric($_POST['X_FrequentlyOrderedItems'])) { $InputError = 1; prnMsg(_('The number of frequently ordered items to display must be numeric'),'error'); @@ -274,6 +277,9 @@ if ($_SESSION['PurchasingManagerEmail'] != $_POST['X_PurchasingManagerEmail']){ $sql[] = "UPDATE config SET confvalue='" . $_POST['X_PurchasingManagerEmail'] . "' WHERE confname='PurchasingManagerEmail'"; } + if ($_SESSION['InventoryManagerEmail'] != $_POST['X_InventoryManagerEmail']){ + $sql[] = "UPDATE config SET confvalue='" . $_POST['X_InventoryManagerEmail'] . "' WHERE confname='InventoryManagerEmail'"; + } if ($_SESSION['AutoCreateWOs'] != $_POST['X_AutoCreateWOs']){ $sql[] = "UPDATE config SET confvalue='" . $_POST['X_AutoCreateWOs'] . "' WHERE confname='AutoCreateWOs'"; } @@ -456,8 +462,8 @@ //Blind packing note echo '<tr style="outline: 1px solid"><td>' . _('Show company details on packing slips') . ':</td> <td><select name="X_DefaultBlindPackNote"> - <option '.($_SESSION['DefaultBlindPackNote']=="1"?'selected ':'').'value="1">'._('Show Company Details') . '</option> - <option '.($_SESSION['DefaultBlindPackNote']=="2"?'selected ':'').'value="2">'._('Hide Company Details') . '</option> + <option '.($_SESSION['DefaultBlindPackNote']=='1'?'selected ':'').'value="1">'._('Show Company Details') . '</option> + <option '.($_SESSION['DefaultBlindPackNote']=='2'?'selected ':'').'value="2">'._('Hide Company Details') . '</option> </select></td> <td>' . _('Customer branches can be set by default not to print packing slips with the company logo and address. This is useful for companies that ship to customers customers and to show the source of the shipment would be inappropriate. There is an option on the setup of customer branches to ship blind, this setting is the default applied to all new customer branches') . '</td> </tr>'; @@ -1016,6 +1022,9 @@ <td><input type="text" name="X_PurchasingManagerEmail" size="50" maxlength="50" value="' . $_SESSION['PurchasingManagerEmail'] . '" /></td> <td>' . _('The email address for the purchasing manager, used to receive notifications by the tendering system') .'</td></tr>'; +echo '<tr style="outline: 1px solid"><td>' . _('Inventory Manager Email Address') . ':</td> + <td><input type="text" name="X_InventoryManagerEmail" size=50 maxlength=50 value="' . $_SESSION['InventoryManagerEmail'] . '"></td> + <td>' . _('The email address for the inventory manager, where notifications of all manual stock adjustments created are sent by the system. Leave blank if no emails should be sent to the factory manager for manual stock adjustments') .'</td></tr>'; echo '</table> <br /><div class="centre"><input type="submit" name="submit" value="' . _('Update') . '" /></div> Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-09-03 16:07:41 UTC (rev 8061) +++ trunk/includes/session.inc 2011-09-03 16:07:55 UTC (rev 8062) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=91; +$DBVersion=93; 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-09-03 21:46:22
|
Revision: 8075 http://weberp.svn.sourceforge.net/weberp/?rev=8075&view=rev Author: tim_schofield Date: 2011-09-03 21:46:14 +0000 (Sat, 03 Sep 2011) Log Message: ----------- Correctly show the locale number formats Modified Paths: -------------- trunk/SupplierInquiry.php trunk/includes/footer.inc Modified: trunk/SupplierInquiry.php =================================================================== --- trunk/SupplierInquiry.php 2011-09-03 21:46:03 UTC (rev 8074) +++ trunk/SupplierInquiry.php 2011-09-03 21:46:14 UTC (rev 8075) @@ -144,11 +144,11 @@ <th>' . _('Over') . ' ' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th> </tr>'; -echo '<tr> <td class="number">' . number_format($SupplierRecord['balance'],2) . '</td> - <td class="number">' . number_format(($SupplierRecord['balance'] - $SupplierRecord['due']),2) . '</td> - <td class="number">' . number_format(($SupplierRecord['due']-$SupplierRecord['overdue1']),2) . '</td> - <td class="number">' . number_format(($SupplierRecord['overdue1']-$SupplierRecord['overdue2']) ,2) . '</td> - <td class="number">' . number_format($SupplierRecord['overdue2'],2) . '</td> +echo '<tr> <td class="number">' . currency_number_format($SupplierRecord['balance'],$SupplierRecord['currcode']) . '</td> + <td class="number">' . currency_number_format(($SupplierRecord['balance'] - $SupplierRecord['due']),$SupplierRecord['currcode']) . '</td> + <td class="number">' . currency_number_format(($SupplierRecord['due']-$SupplierRecord['overdue1']),$SupplierRecord['currcode']) . '</td> + <td class="number">' . currency_number_format(($SupplierRecord['overdue1']-$SupplierRecord['overdue2']) ,$SupplierRecord['currcode']) . '</td> + <td class="number">' . currency_number_format($SupplierRecord['overdue2'],$SupplierRecord['currcode']) . '</td> </tr></table>'; echo '<br /><div class="centre"><form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; @@ -168,16 +168,19 @@ supptrans.trandate, supptrans.suppreference, supptrans.rate, + suppliers.currcode, (supptrans.ovamount + supptrans.ovgst) AS totalamount, supptrans.alloc AS allocated, supptrans.hold, supptrans.settled, supptrans.transtext, supptrans.supplierno - FROM supptrans, - systypes - WHERE supptrans.type = systypes.typeid - AND supptrans.supplierno = '" . $SupplierID . "' + FROM supptrans + LEFT JOIN systypes + ON supptrans.type = systypes.typeid + LEFT JOIN suppliers + ON suppliers.supplierid=supptrans.supplierno + WHERE supptrans.supplierno = '" . $SupplierID . "' AND supptrans.trandate >= '" . $DateAfterCriteria . "' ORDER BY supptrans.trandate"; @@ -246,9 +249,9 @@ <td>' . $myrow['typename'] . '</td> <td>' . $myrow['suppreference'] . '</td> <td>' . ConvertSQLDate($myrow['trandate']) . '</td> - <td class="number">' . number_format($myrow['totalamount'],2) .'</td> - <td class="number">' . number_format($myrow['allocated'],2) . '</td> - <td class="number">' . number_format($myrow['totalamount']-$myrow['allocated'],2) . '</td> + <td class="number">' . currency_number_format($myrow['totalamount'],$myrow['currcode']) .'</td> + <td class="number">' . currency_number_format($myrow['allocated'],$myrow['currcode']) . '</td> + <td class="number">' . currency_number_format($myrow['totalamount']-$myrow['allocated'],$myrow['currcode']) . '</td> <td align="left">' . $myrow['transtext'] . '</td> <td><a target="_blank" href="' . $rootpath . '/GLTransInquiry.php?TypeID=' . $myrow['type'] . '&TransNo=' . $myrow['transno'] .'">' . _('View GL Postings') . '</a></td> <td><a href="' . $rootpath . '/PaymentAllocations.php?SuppID=' . $myrow['supplierno'] . '&InvID=' . $myrow['suppreference'] .'">' . _('View Payments') . '</a></td></tr>'; @@ -257,9 +260,9 @@ <td>' . $myrow['typename'] . '</td> <td>' . $myrow['suppreference'] . '</td> <td>' . ConvertSQLDate($myrow['trandate']) . '</td> - <td class="number">' . number_format($myrow['totalamount'],2) . '</td> - <td class="number">' .number_format($myrow['allocated'],2) . '</td> - <td class="number">' . number_format($myrow['totalamount'] - $myrow['allocated'],2) .'</td> + <td class="number">' . currency_number_format($myrow['totalamount'],$myrow['currcode']) . '</td> + <td class="number">' . currency_number_format($myrow['allocated'],$myrow['currcode']) . '</td> + <td class="number">' . currency_number_format($myrow['totalamount'] - $myrow['allocated'],$myrow['currcode']) .'</td> <td align="left">' . $myrow['transtext'] . '</td>'; $authsql="SELECT offhold FROM purchorderauth @@ -297,9 +300,9 @@ $myrow['typename'], $myrow['suppreference'], ConvertSQLDate($myrow['trandate']), - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount'] - $myrow['allocated'],2), + currency_number_format($myrow['totalamount'],$myrow['currcode']), + currency_number_format($myrow['allocated'],$myrow['currcode']), + currency_number_format($myrow['totalamount'] - $myrow['allocated'],$myrow['currcode']), $myrow['transtext']); } else { @@ -318,9 +321,9 @@ $myrow['typename'], $myrow['suppreference'], ConvertSQLDate($myrow['trandate']), - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2), + currency_number_format($myrow['totalamount'],$myrow['currcode']), + currency_number_format($myrow['allocated'],$myrow['currcode']), + currency_number_format($myrow['totalamount']-$myrow['allocated'],$myrow['currcode']), $myrow['transtext'], $_SERVER['PHP_SELF'], $myrow['type'], @@ -348,16 +351,16 @@ <td align=left>%s</td> <td><a href="%s/SupplierAllocations.php?AllocTrans=%s">' . _('View Allocations') . '</a></td> - <td><a TARGET="_blank" href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . + <td><a target="_blank" href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . _('View GL Postings') . '</a></td> </tr>', $myrow['transno'], $myrow['typename'], $myrow['suppreference'], ConvertSQLDate($myrow['trandate']), - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2), + currency_number_format($myrow['totalamount'],$myrow['currcode']), + currency_number_format($myrow['allocated'],$myrow['currcode']), + currency_number_format($myrow['totalamount']-$myrow['allocated'],$myrow['currcode']), $myrow['transtext'], $rootpath, $myrow['id'], @@ -381,9 +384,9 @@ $myrow['typename'], $myrow['suppreference'], ConvertSQLDate($myrow['trandate']), - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount'] - $myrow['allocated'],2), + currency_number_format($myrow['totalamount'],$myrow['currcode']), + currency_number_format($myrow['allocated'],$myrow['currcode']), + currency_number_format(($myrow['totalamount'] - $myrow['allocated']),$myrow['currcode']), $myrow['transtext'], $rootpath, $myrow['id']); Modified: trunk/includes/footer.inc =================================================================== --- trunk/includes/footer.inc 2011-09-03 21:46:03 UTC (rev 8074) +++ trunk/includes/footer.inc 2011-09-03 21:46:14 UTC (rev 8075) @@ -5,7 +5,7 @@ if (!isset($DefaultClock)) { include('config.php'); } - echo '<p class="number">'.(strftime('%A')).', '.(date($_SESSION['DefaultDateFormat']).' | '.(strftime(($DefaultClock==12) ? '%I:%M %p' : '%H:%M'))).'</p>'; + echo '<p style="text-align: right">'.(strftime('%A')).', '.(date($_SESSION['DefaultDateFormat']).' | '.(strftime(($DefaultClock==12) ? '%I:%M %p' : '%H:%M'))).'</p>'; echo '<table width="100%" id="footer">'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-09-04 22:09:26
|
Revision: 8078 http://weberp.svn.sourceforge.net/weberp/?rev=8078&view=rev Author: tim_schofield Date: 2011-09-04 22:09:19 +0000 (Sun, 04 Sep 2011) Log Message: ----------- Correctly show the locale number formats Modified Paths: -------------- trunk/SupplierAllocations.php trunk/includes/DefineSuppAllocsClass.php trunk/includes/LanguageSetup.php Modified: trunk/SupplierAllocations.php =================================================================== --- trunk/SupplierAllocations.php 2011-09-04 22:09:04 UTC (rev 8077) +++ trunk/SupplierAllocations.php 2011-09-04 22:09:19 UTC (rev 8078) @@ -51,37 +51,40 @@ for ($AllocCounter=0; $AllocCounter < $_POST['TotalNumberOfAllocs']; $AllocCounter++){ + $_POST['Amt' . $AllocCounter] = filter_currency_input($_POST['Amt' . $AllocCounter]); + $_POST['YetToAlloc' . $AllocCounter] = filter_currency_input($_POST['YetToAlloc' . $AllocCounter]); + if (!is_numeric($_POST['Amt' . $AllocCounter])){ $_POST['Amt' . $AllocCounter] = 0; } - if ($_POST['Amt' . $AllocCounter] < 0){ - prnMsg(_('The entry for the amount to allocate was negative') . '. ' . _('A positive allocation amount is expected'),'error'); + if ($_POST['Amt' . $AllocCounter] < 0){ + prnMsg(_('The entry for the amount to allocate was negative') . '. ' . _('A positive allocation amount is expected'),'error'); $_POST['Amt' . $AllocCounter] = 0; - } + } if (isset($_POST['All' . $AllocCounter]) and $_POST['All' . $AllocCounter] == True){ $_POST['Amt' . $AllocCounter] = $_POST['YetToAlloc' . $AllocCounter]; - } + } /*Now check to see that the AllocAmt is no greater than the amount left to be allocated against the transaction under review */ - if ($_POST['Amt' . $AllocCounter] > $_POST['YetToAlloc' . $AllocCounter]){ - $_POST['Amt' . $AllocCounter] = $_POST['YetToAlloc' . $AllocCounter]; - } + if ($_POST['Amt' . $AllocCounter] > $_POST['YetToAlloc' . $AllocCounter]){ + $_POST['Amt' . $AllocCounter] = $_POST['YetToAlloc' . $AllocCounter]; + } - $_SESSION['Alloc']->Allocs[$_POST['AllocID' . $AllocCounter]]->AllocAmt = $_POST['Amt' . $AllocCounter]; + $_SESSION['Alloc']->Allocs[$_POST['AllocID' . $AllocCounter]]->AllocAmt = $_POST['Amt' . $AllocCounter]; - /*recalcuate the new difference on exchange - (a +positive amount is a gain -ve a loss)*/ + /*recalcuate the new difference on exchange + (a +positive amount is a gain -ve a loss)*/ - $_SESSION['Alloc']->Allocs[$_POST['AllocID' . $AllocCounter]]->DiffOnExch = ($_POST['Amt' . $AllocCounter] / $_SESSION['Alloc']->TransExRate) - ($_POST['Amt' . $AllocCounter] / $_SESSION['Alloc']->Allocs[$_POST['AllocID' . $AllocCounter]]->ExRate); + $_SESSION['Alloc']->Allocs[$_POST['AllocID' . $AllocCounter]]->DiffOnExch = ($_POST['Amt' . $AllocCounter] / $_SESSION['Alloc']->TransExRate) - ($_POST['Amt' . $AllocCounter] / $_SESSION['Alloc']->Allocs[$_POST['AllocID' . $AllocCounter]]->ExRate); - $TotalDiffOnExch = $TotalDiffOnExch + $_SESSION['Alloc']->Allocs[$_POST['AllocID' . $AllocCounter]]->DiffOnExch; - $TotalAllocated = $TotalAllocated + $_POST['Amt' . $AllocCounter]; + $TotalDiffOnExch = $TotalDiffOnExch + $_SESSION['Alloc']->Allocs[$_POST['AllocID' . $AllocCounter]]->DiffOnExch; + $TotalAllocated = $TotalAllocated + $_POST['Amt' . $AllocCounter]; } /*end of the loop to set the new allocation amounts, recalc diff on exchange and add up total allocations */ @@ -306,21 +309,22 @@ $SQL= "SELECT systypes.typename, - supptrans.type, - supptrans.transno, - supptrans.trandate, - supptrans.supplierno, - suppliers.suppname, - rate, - (supptrans.ovamount+supptrans.ovgst) AS total, - supptrans.diffonexch, - supptrans.alloc - FROM supptrans, - systypes, - suppliers - WHERE supptrans.type = systypes.typeid - AND supptrans.supplierno = suppliers.supplierid - AND supptrans.id='" . $_SESSION['AllocTrans'] . "'"; + supptrans.type, + supptrans.transno, + supptrans.trandate, + supptrans.supplierno, + suppliers.suppname, + suppliers.currcode, + rate, + (supptrans.ovamount+supptrans.ovgst) AS total, + supptrans.diffonexch, + supptrans.alloc + FROM supptrans, + systypes, + suppliers + WHERE supptrans.type = systypes.typeid + AND supptrans.supplierno = suppliers.supplierid + AND supptrans.id='" . $_SESSION['AllocTrans'] . "'"; $Result = DB_query($SQL, $db); if (DB_num_rows($Result) != 1){ @@ -336,6 +340,7 @@ $_SESSION['Alloc']->AllocTrans = $_SESSION['AllocTrans']; $_SESSION['Alloc']->SupplierID = $myrow['supplierno']; $_SESSION['Alloc']->SuppName = $myrow['suppname'];; + $_SESSION['Alloc']->CurrCode = $myrow['currcode'];; $_SESSION['Alloc']->TransType = $myrow['type']; $_SESSION['Alloc']->TransTypeName = $myrow['typename']; $_SESSION['Alloc']->TransNo = $myrow['transno']; @@ -348,20 +353,20 @@ /*First get the transactions that have outstanding balances ie Total-Alloc >0 */ $SQL= "SELECT supptrans.id, - typename, - transno, - trandate, - suppreference, - rate, - ovamount+ovgst AS total, - diffonexch, - alloc - FROM supptrans, - systypes - WHERE supptrans.type = systypes.typeid - AND supptrans.settled=0 - AND abs(ovamount+ovgst-alloc)>0.009 - AND supplierno='" . $_SESSION['Alloc']->SupplierID . "'"; + typename, + transno, + trandate, + suppreference, + rate, + ovamount+ovgst AS total, + diffonexch, + alloc + FROM supptrans, + systypes + WHERE supptrans.type = systypes.typeid + AND supptrans.settled=0 + AND abs(ovamount+ovgst-alloc)>0.009 + AND supplierno='" . $_SESSION['Alloc']->SupplierID . "'"; $ErrMsg = _('There was a problem retrieving the transactions available to allocate to'); @@ -389,23 +394,23 @@ above logic will be overwritten with the prev alloc detail below */ $SQL = "SELECT supptrans.id, - typename, - transno, - trandate, - suppreference, - rate, - ovamount+ovgst AS total, - diffonexch, - supptrans.alloc-suppallocs.amt AS prevallocs, - amt, - suppallocs.id AS allocid - FROM supptrans, - systypes, - suppallocs - WHERE supptrans.type = systypes.typeid - AND supptrans.id=suppallocs.transid_allocto - AND suppallocs.transid_allocfrom='" . $_SESSION['AllocTrans'] . - "' AND supplierno='" . $_SESSION['Alloc']->SupplierID . "'"; + typename, + transno, + trandate, + suppreference, + rate, + ovamount+ovgst AS total, + diffonexch, + supptrans.alloc-suppallocs.amt AS prevallocs, + amt, + suppallocs.id AS allocid + FROM supptrans, + systypes, + suppallocs + WHERE supptrans.type = systypes.typeid + AND supptrans.id=suppallocs.transid_allocto + AND suppallocs.transid_allocfrom='" . $_SESSION['AllocTrans'] . + "' AND supplierno='" . $_SESSION['Alloc']->SupplierID . "'"; $ErrMsg = _('There was a problem retrieving the previously allocated transactions for modification'); @@ -435,7 +440,7 @@ /*Show the transaction being allocated and the potential trans it could be allocated to and those where there is already an existing allocation */ - echo '<div class="centre"><font color=BLUE>' . _('Allocation of supplier') . ' ' . + echo '<div class="centre"><font color="blue">' . _('Allocation of supplier') . ' ' . $_SESSION['Alloc']->TransTypeName . ' ' . _('number') . ' ' . $_SESSION['Alloc']->TransNo . ' ' . _('from') . ' ' . $_SESSION['Alloc']->SupplierID . ' - <b>' . @@ -444,13 +449,13 @@ if ($_SESSION['Alloc']->TransExRate != 1){ echo '<br />' . _('Amount in supplier currency'). ' <b>' . - number_format(-$_SESSION['Alloc']->TransAmt,2) . '</b><i> (' . + currency_number_format(-$_SESSION['Alloc']->TransAmt,$_SESSION['Alloc']->CurrCode) . '</b><i> (' . _('converted into local currency at an exchange rate of') . ' ' . - $_SESSION['Alloc']->TransExRate . ')</i><br />'; + $_SESSION['Alloc']->TransExRate . ')</i></font><br />'; } else { - echo '<br />' . _('Transaction total') . ': <b>' . -$_SESSION['Alloc']->TransAmt . '</b></div>'; + echo '<br />' . _('Transaction total') . ': <b>' . currency_number_format(-$_SESSION['Alloc']->TransAmt, $_SESSION['Alloc']->CurrCode) . '</b></div>'; } /*Now display the potential and existing allocations put into the array above */ @@ -497,16 +502,16 @@ <td>'.$AllocnItem->TypeNo.'</td> <td>'.$AllocnItem->TransDate.'</td> <td>'.$AllocnItem->SuppRef.'</td> - <td class="number">' . number_format($AllocnItem->TransAmount,2) . '</td> - <td class="number">' . number_format($YetToAlloc,2) . ' - <input type="hidden" name="YetToAlloc' . $Counter . '" value="' . $YetToAlloc . '" /></td>'; + <td class="number">' . currency_number_format($AllocnItem->TransAmount,$_SESSION['Alloc']->CurrCode) . '</td> + <td class="number">' . currency_number_format($YetToAlloc,$_SESSION['Alloc']->CurrCode) . ' + <input type="hidden" name="YetToAlloc' . $Counter . '" value="' . currency_number_format($YetToAlloc,$_SESSION['Alloc']->CurrCode) . '" /></td>'; if (ABS($AllocnItem->AllocAmt-$YetToAlloc) < 0.01){ echo '<td class="number"><input type="checkbox" name="All' . $Counter . '" value="' . True . '" />'; } else { echo '<td class="number"><input type="checkbox" name="All' . $Counter . '" />'; } - echo '<input type="text" class="number" name="Amt' . $Counter .'" maxlength="12" size="13" value="' . $AllocnItem->AllocAmt . '" /> + echo '<input type="text" class="number" name="Amt' . $Counter .'" maxlength="12" size="13" value="' . currency_number_format($AllocnItem->AllocAmt,$_SESSION['Alloc']->CurrCode) . '" /> <input type="hidden" name="AllocID' . $Counter . '" value="' . $AllocnItem->ID . '" /></td></tr>'; $TotalAllocated = $TotalAllocated + $AllocnItem->AllocAmt; @@ -516,10 +521,10 @@ } echo '<tr><td colspan="5" class="number"><b><u>' . _('Total Allocated') . ':</u></b></td> - <td class="number"><b><u>' . number_format($TotalAllocated,2) . '</u></b></td></tr>'; + <td class="number"><b><u>' . currency_number_format($TotalAllocated,$_SESSION['Alloc']->CurrCode) . '</u></b></td></tr>'; echo '<tr><td colspan="5" class="number"><b>' . _('Left to allocate') . '</b></td><td class="number"><b>' . - number_format(-$_SESSION['Alloc']->TransAmt - $TotalAllocated,2) . '</b></td></tr></table>'; + currency_number_format(-$_SESSION['Alloc']->TransAmt - $TotalAllocated,$_SESSION['Alloc']->CurrCode) . '</b></td></tr></table>'; echo '<div class="centre"><input type="hidden" name="TotalNumberOfAllocs" value="' . $Counter . '" />'; @@ -598,8 +603,8 @@ $myrow['suppname'], $myrow['transno'], ConvertSQLDate($myrow['trandate']), - $myrow['total'], - $myrow['total']-$myrow['alloc'], + currency_number_format($myrow['total'],$myrow['currcode']), + currency_number_format($myrow['total']-$myrow['alloc'],$myrow['currcode']), $_SERVER['PHP_SELF'] .'?', $myrow['id']); @@ -622,7 +627,8 @@ suppreference, rate, ovamount+ovgst AS total, - alloc + alloc, + currcode FROM supptrans, suppliers, systypes @@ -661,16 +667,16 @@ <td>%s</td> <td>%s</td> <td>%s</td> - <td class="number">%0.2f</td> - <td class="number">%0.2f</td> + <td class="number">%s</td> + <td class="number">%s</td> <td><a href="%sAllocTrans=%s">' . _('Allocate') . '</td> </tr>', $myrow['typename'], $myrow['suppname'], $myrow['transno'], ConvertSQLDate($myrow['trandate']), - $myrow['total'], - $myrow['total']-$myrow['alloc'], + currency_number_format($myrow['total'],$myrow['currcode']), + currency_number_format($myrow['total']-$myrow['alloc'],$myrow['currcode']), $_SERVER['PHP_SELF'] .'?', $myrow['id']); Modified: trunk/includes/DefineSuppAllocsClass.php =================================================================== --- trunk/includes/DefineSuppAllocsClass.php 2011-09-04 22:09:04 UTC (rev 8077) +++ trunk/includes/DefineSuppAllocsClass.php 2011-09-04 22:09:19 UTC (rev 8078) @@ -9,6 +9,7 @@ var $AllocTrans; /*The ID of the transaction being allocated */ var $SupplierID; var $SuppName; + var $CurrCode; var $TransType; var $TransTypeName; var $TransNo; Modified: trunk/includes/LanguageSetup.php =================================================================== --- trunk/includes/LanguageSetup.php 2011-09-04 22:09:04 UTC (rev 8077) +++ trunk/includes/LanguageSetup.php 2011-09-04 22:09:19 UTC (rev 8078) @@ -31,7 +31,7 @@ //$Locale = setlocale (LC_CTYPE, $_SESSION['Language']); //$Locale = setlocale (LC_MESSAGES, $_SESSION['Language']); - $Locale = setlocale (LC_NUMERIC, 'en_US'); //currently need all decimal points etc to be as expected on webserver +// $Locale = setlocale (LC_NUMERIC, 'en_US'); //currently need all decimal points etc to be as expected on webserver if ($_SESSION['Language']=='tr_TR.utf8') { $Locale = setlocale(LC_CTYPE, 'C'); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |