From: <tim...@us...> - 2010-10-26 19:22:55
|
Revision: 4110 http://web-erp.svn.sourceforge.net/web-erp/?rev=4110&view=rev Author: tim_schofield Date: 2010-10-26 18:43:32 +0000 (Tue, 26 Oct 2010) Log Message: ----------- Check there is sufficient stock for the transfer Modified Paths: -------------- trunk/StockLocTransfer.php trunk/doc/Change.log.html Modified: trunk/StockLocTransfer.php =================================================================== --- trunk/StockLocTransfer.php 2010-10-26 08:09:34 UTC (rev 4109) +++ trunk/StockLocTransfer.php 2010-10-26 18:43:32 UTC (rev 4110) @@ -50,9 +50,9 @@ // Only if stock exist at this location $result = DB_query("SELECT quantity FROM locstock WHERE stockid='" . $_POST['StockID' . $i] . "' and loccode='".$_POST['FromStockLocation']."'",$db); $myrow = DB_fetch_row($result); - if ($myrow[0] <= 0){ + if ($myrow[0] <= $_POST['StockQTY' . $i]){ $InputError = True; - $ErrorMessage .= _('The part code entered of'). ' ' . $_POST['StockID' . $i] . ' '. _('does not have stock available for transfer.') . '.<br>'; + $ErrorMessage .= _('The part code entered of'). ' ' . $_POST['StockID' . $i] . ' '. _('does not have enough stock available for transfer.') . '.<br>'; $_POST['LinesCounter'] -= 10; } DB_free_result( $result ); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-26 08:09:34 UTC (rev 4109) +++ trunk/doc/Change.log.html 2010-10-26 18:43:32 UTC (rev 4110) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>26/10/10 Tim: StockLocTransfer.php - Check there is sufficient stock for the transfer</p> <p>25/10/10 Marcos Garcia Trejo: New labelprinting functionality </p> <p>25/10/10 ChenJohn: class.pdf.php - correctly display some html encoded special characters, to make them human readeable in pdf file.</p> <p>23/10/10 Phil: PurchData.php - search by name failed concatenation of SQL stuffed now repaired.</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-26 21:02:35
|
Revision: 4111 http://web-erp.svn.sourceforge.net/web-erp/?rev=4111&view=rev Author: tim_schofield Date: 2010-10-26 21:02:29 +0000 (Tue, 26 Oct 2010) Log Message: ----------- ncrease the number of decimal places that can be entered Modified Paths: -------------- trunk/DiscountMatrix.php trunk/doc/Change.log.html Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2010-10-26 18:43:32 UTC (rev 4110) +++ trunk/DiscountMatrix.php 2010-10-26 21:02:29 UTC (rev 4111) @@ -133,7 +133,7 @@ echo '<tr><td>' . _('Discount Rate') . " (%):</td><td><input class='number' tabindex=4 " . (in_array('DiscountRate',$Errors) ? "class='inputerror'" : "") . - "type='text' name='DiscountRate' size=4 maxlength=4></td></tr>"; + "type='text' name='DiscountRate' size=11 maxlength=14></td></tr>"; echo '</table><br>'; echo "<div class='centre'><input tabindex=5 type='submit' name='submit' value='" . _('Enter Information') . "'></div><br>"; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-26 18:43:32 UTC (rev 4110) +++ trunk/doc/Change.log.html 2010-10-26 21:02:29 UTC (rev 4111) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>26/10/10 Tim: Discountmatrix.php - Increase the number of decimal places that can be entered</p> <p>26/10/10 Tim: StockLocTransfer.php - Check there is sufficient stock for the transfer</p> <p>25/10/10 Marcos Garcia Trejo: New labelprinting functionality </p> <p>25/10/10 ChenJohn: class.pdf.php - correctly display some html encoded special characters, to make them human readeable in pdf file.</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-27 01:28:56
|
Revision: 4112 http://web-erp.svn.sourceforge.net/web-erp/?rev=4112&view=rev Author: tim_schofield Date: 2010-10-27 01:28:50 +0000 (Wed, 27 Oct 2010) Log Message: ----------- Fix discount category bug Modified Paths: -------------- trunk/DiscountMatrix.php trunk/doc/Change.log.html Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2010-10-26 21:02:29 UTC (rev 4111) +++ trunk/DiscountMatrix.php 2010-10-27 01:28:50 UTC (rev 4112) @@ -125,6 +125,8 @@ echo '</option>'; } echo '</select></td>'; +} else { + echo '<input type="hidden" name="DiscountCategory" value="">'; } echo '<tr><td>' . _('Quantity Break') . ":</td><td><input class='number' tabindex=3 " @@ -178,7 +180,7 @@ $myrow['sales_type'], $myrow['discountcategory'], $myrow['quantitybreak'], - number_format($myrow['discountrate']*100,2) , + $myrow['discountrate']*100 , $DeleteURL); } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-26 21:02:29 UTC (rev 4111) +++ trunk/doc/Change.log.html 2010-10-27 01:28:50 UTC (rev 4112) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>26/10/10 Tim: Discountmatrix.php - Fix discount category bug</p> <p>26/10/10 Tim: Discountmatrix.php - Increase the number of decimal places that can be entered</p> <p>26/10/10 Tim: StockLocTransfer.php - Check there is sufficient stock for the transfer</p> <p>25/10/10 Marcos Garcia Trejo: New labelprinting functionality </p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-27 13:12:27
|
Revision: 4113 http://web-erp.svn.sourceforge.net/web-erp/?rev=4113&view=rev Author: tim_schofield Date: 2010-10-27 13:12:20 +0000 (Wed, 27 Oct 2010) Log Message: ----------- Corrections to display multi line invoice narratives correctly~ Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/doc/Change.log.html trunk/includes/MiscFunctions.php Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2010-10-27 01:28:50 UTC (rev 4112) +++ trunk/ConfirmDispatch_Invoice.php 2010-10-27 13:12:20 UTC (rev 4113) @@ -1497,7 +1497,7 @@ $j++; echo '<tr> <td>' ._('Invoice Text'). ':</td> - <td><textarea tabindex="'.$j.'" name="InvoiceText" COLS="31" ROWS="5">' . $_POST['InvoiceText'] . '</textarea></td> + <td><textarea tabindex="'.$j.'" name="InvoiceText" COLS="31" ROWS="5">' . reverse_escape($_POST['InvoiceText']) . '</textarea></td> </tr>'; $j++; Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2010-10-27 01:28:50 UTC (rev 4112) +++ trunk/PrintCustTrans.php 2010-10-27 13:12:20 UTC (rev 4113) @@ -325,13 +325,9 @@ $pdf->addTextWrap($FormDesign->PaymentTerms->x, $Page_Height - $FormDesign->PaymentTerms->y, $FormDesign->PaymentTerms->Length, $FormDesign->PaymentTerms->FontSize, _('Payment Terms') . ': ' . $myrow['terms']); // $pdf->addText($Page_Width-$Right_Margin-392, $YPos - ($line_height*3)+22,$FontSize, _('Bank Code:***** Bank Account:*****')); // $FontSize=10; - $LeftOvers = $pdf->addTextWrap($FormDesign->InvoiceText->x, $Page_Height - $FormDesign->InvoiceText->y, $FormDesign->InvoiceText->Length, $FormDesign->InvoiceText->FontSize, $myrow['invtext']); - if (strlen($LeftOvers) > 0) { - $LeftOvers = $pdf->addTextWrap($FormDesign->InvoiceText->x, $Page_Height - $FormDesign->InvoiceText->y-10, $FormDesign->InvoiceText->Length, $FormDesign->InvoiceText->FontSize, $LeftOvers); - if (strlen($LeftOvers) > 0) { - $LeftOvers = $pdf->addTextWrap($FormDesign->InvoiceText->x, $Page_Height - $FormDesign->InvoiceText->y-20, $FormDesign->InvoiceText->Length, $FormDesign->InvoiceText->FontSize, $LeftOvers); - /*If there is some of the InvText leftover after 3 lines 200 wide then it is not printed :( */ - } + $LeftOvers=explode('\r\n',DB_escape_string($myrow['invtext'])); + for ($i=0;$i<sizeOf($LeftOvers);$i++) { + $pdf->addText($FormDesign->InvoiceText->x, $Page_Height - $FormDesign->InvoiceText->y-($i*10), $FormDesign->InvoiceText->FontSize, $LeftOvers[$i]); } $pdf->addText($FormDesign->SubTotalCaption->x, $Page_Height - $FormDesign->SubTotalCaption->y, $FormDesign->SubTotalCaption->FontSize, _('Sub Total')); $LeftOvers = $pdf->addTextWrap($FormDesign->SubTotal->x, $Page_Height - $FormDesign->SubTotal->y, $FormDesign->SubTotal->Length, $FormDesign->SubTotal->FontSize, $DisplaySubTot, 'right'); Modified: trunk/PrintCustTransPortrait.php =================================================================== --- trunk/PrintCustTransPortrait.php 2010-10-27 01:28:50 UTC (rev 4112) +++ trunk/PrintCustTransPortrait.php 2010-10-27 13:12:20 UTC (rev 4113) @@ -441,13 +441,9 @@ $pdf->addTextWrap($Left_Margin+5,$YPos+3,280,$FontSize,_('Payment Terms') . ': ' . $myrow['terms']); $FontSize =8; - $LeftOvers = $pdf->addTextWrap($Left_Margin+5,$YPos-5,280,$FontSize,$myrow['invtext']); - if (strlen($LeftOvers)>0){ - $LeftOvers = $pdf->addTextWrap($Left_Margin+5,$YPos-24,280,$FontSize,$LeftOvers); - if (strlen($LeftOvers)>0){ - $LeftOvers = $pdf->addTextWrap($Left_Margin+5,$YPos-36,280,$FontSize,$LeftOvers); - /*If there is some of the InvText leftover after 3 lines 200 wide then it is not printed :( */ - } + $LeftOvers=explode('\r\n',DB_escape_string($myrow['invtext'])); + for ($i=0;$i<sizeOf($LeftOvers);$i++) { + $pdf->addText($Left_Margin+5, $YPos-8-($i*8), $FontSize, $LeftOvers[$i]); } $FontSize = 10; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-27 01:28:50 UTC (rev 4112) +++ trunk/doc/Change.log.html 2010-10-27 13:12:20 UTC (rev 4113) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>27/10/10 Tim: Corrections to display multi line invoice narratives correctly</p> <p>26/10/10 Tim: Discountmatrix.php - Fix discount category bug</p> <p>26/10/10 Tim: Discountmatrix.php - Increase the number of decimal places that can be entered</p> <p>26/10/10 Tim: StockLocTransfer.php - Check there is sufficient stock for the transfer</p> Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2010-10-27 01:28:50 UTC (rev 4112) +++ trunk/includes/MiscFunctions.php 2010-10-27 13:12:20 UTC (rev 4113) @@ -12,6 +12,13 @@ }//prnMsg +function reverse_escape($str) +{ + $search=array("\\\\","\\0","\\n","\\r","\Z","\'",'\"'); + $replace=array("\\","\0","\n","\r","\x1a","'",'"'); + return str_replace($search,$replace,$str); +} + function getMsg($Msg,$Type='info',$Prefix=''){ $Colour=''; if ($_SESSION['LogSeverity']>0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-27 15:34:17
|
Revision: 4114 http://web-erp.svn.sourceforge.net/web-erp/?rev=4114&view=rev Author: tim_schofield Date: 2010-10-27 15:34:11 +0000 (Wed, 27 Oct 2010) Log Message: ----------- Correct for non ascii characters Modified Paths: -------------- trunk/doc/Change.log.html trunk/includes/header.inc Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-27 13:12:20 UTC (rev 4113) +++ trunk/doc/Change.log.html 2010-10-27 15:34:11 UTC (rev 4114) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>27/10/10 Tim: header.inc - Correct for non ascii characters</p> <p>27/10/10 Tim: Corrections to display multi line invoice narratives correctly</p> <p>26/10/10 Tim: Discountmatrix.php - Fix discount category bug</p> <p>26/10/10 Tim: Discountmatrix.php - Increase the number of decimal places that can be entered</p> Modified: trunk/includes/header.inc =================================================================== --- trunk/includes/header.inc 2010-10-27 13:12:20 UTC (rev 4113) +++ trunk/includes/header.inc 2010-10-27 15:34:11 UTC (rev 4114) @@ -10,9 +10,9 @@ if (!headers_sent()){ if ($StrictXHTML) { - header('Content-type: application/xhtml+xml; charset=utf8'); + header('Content-type: application/xhtml+xml; charset=utf-8'); } else { - header('Content-type: text/html; charset=utf8'); + header('Content-type: text/html; charset=utf-8'); } } echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" @@ -23,9 +23,9 @@ echo '<link rel="shortcut icon" href="'. $rootpath.'/favicon.ico" />'; echo '<link rel="icon" href="' . $rootpath.'/favicon.ico" />'; if ($StrictXHTML) { - echo '<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf8" />'; + echo '<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />'; } else { - echo '<meta http-equiv="Content-Type" content="application/html; charset=utf8" />'; + echo '<meta http-equiv="Content-Type" content="application/html; charset=utf-8" />'; } echo '<link href="' . $rootpath . '/css/'. $_SESSION['Theme'] .'/default.css" rel="stylesheet" type="text/css" />'; echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/MiscFunctions.js"></script>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-27 16:00:08
|
Revision: 4115 http://web-erp.svn.sourceforge.net/web-erp/?rev=4115&view=rev Author: tim_schofield Date: 2010-10-27 16:00:02 +0000 (Wed, 27 Oct 2010) Log Message: ----------- When the quantities are changed, then the correct quantities are updated, and the date picker chooses the correct date Modified Paths: -------------- trunk/WorkOrderEntry.php trunk/doc/Change.log.html trunk/javascripts/MiscFunctions.js Modified: trunk/WorkOrderEntry.php =================================================================== --- trunk/WorkOrderEntry.php 2010-10-27 15:34:11 UTC (rev 4114) +++ trunk/WorkOrderEntry.php 2010-10-27 16:00:02 UTC (rev 4115) @@ -295,35 +295,35 @@ if (!isset($_POST['NextLotSNRef'.$i])) { $_POST['NextLotSNRef'.$i]=''; } - if (isset($_POST['QtyRecd'.$i]) and $_POST['QtyRecd'.$i]>$_POST['OutputQty'.$i]){ - $_POST['OutputQty'.$i]=$_POST['QtyRecd'.$i]; //OutputQty must be >= Qty already reced - } - if ($_POST['RecdQty'.$i]==0 AND (isset($_POST['HasWOSerialNos'.$i]) and $_POST['HasWOSerialNos'.$i]==false)){ - /* can only change location cost if QtyRecd=0 */ - $CostResult = DB_query("SELECT SUM((materialcost+labourcost+overheadcost)*bom.quantity) AS cost + if (isset($_POST['QtyRecd'.$i]) and $_POST['QtyRecd'.$i]>$_POST['OutputQty'.$i]){ + $_POST['OutputQty'.$i]=$_POST['QtyRecd'.$i]; //OutputQty must be >= Qty already reced + } + if ($_POST['RecdQty'.$i]==0 AND (!isset($_POST['HasWOSerialNos'.$i]) or $_POST['HasWOSerialNos'.$i]==false)){ + /* can only change location cost if QtyRecd=0 */ + $CostResult = DB_query("SELECT SUM((materialcost+labourcost+overheadcost)*bom.quantity) AS cost FROM stockmaster INNER JOIN bom ON stockmaster.stockid=bom.component WHERE bom.parent='" . $_POST['OutputItem'.$i] . "' AND bom.loccode='" . $_POST['StockLocation'] . "'", $db); - $CostRow = DB_fetch_row($CostResult); - if (is_null($CostRow[0])){ - $Cost =0; - prnMsg(_('The cost of this item as accumulated from the sum of the component costs is nil. This could be because there is no bill of material set up ... you may wish to double check this'),'warn'); - } else { - $Cost = $CostRow[0]; - } - $sql[] = "UPDATE woitems SET qtyreqd = '". $_POST['OutputQty' . $i] . "', + $CostRow = DB_fetch_row($CostResult); + if (is_null($CostRow[0])){ + $Cost =0; + prnMsg(_('The cost of this item as accumulated from the sum of the component costs is nil. This could be because there is no bill of material set up ... you may wish to double check this'),'warn'); + } else { + $Cost = $CostRow[0]; + } + $sql[] = "UPDATE woitems SET qtyreqd = '". $_POST['OutputQty' . $i] . "', nextlotsnref = '". $_POST['NextLotSNRef'.$i] ."', stdcost ='" . $Cost . "' WHERE wo='" . $_POST['WO'] . "' AND stockid='" . $_POST['OutputItem'.$i] . "'"; - } elseif (isset($_POST['HasWOSerialNos'.$i]) and $_POST['HasWOSerialNos'.$i]==false) { - $sql[] = "UPDATE woitems SET qtyreqd = '". $_POST['OutputQty' . $i] . "', + } elseif (isset($_POST['HasWOSerialNos'.$i]) and $_POST['HasWOSerialNos'.$i]==false) { + $sql[] = "UPDATE woitems SET qtyreqd = '". $_POST['OutputQty' . $i] . "', nextlotsnref = '". $_POST['NextLotSNRef'.$i] ."' WHERE wo='" . $_POST['WO'] . "' AND stockid='" . $_POST['OutputItem'.$i] . "'"; - } + } } //run the SQL from either of the above possibilites @@ -479,7 +479,7 @@ } echo '<tr><td class="label">' . _('Required By') . ':</td> - <td><input type="textbox" name="RequiredBy" size=12 maxlength=12 value="' . $_POST['RequiredBy'] . + <td><input type="text" name="RequiredBy" size=12 maxlength=12 value="' . $_POST['RequiredBy'] . '" class="date" alt="'.$_SESSION['DefaultDateFormat'].'"></td></tr>'; if (isset($WOResult)){ Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-27 15:34:11 UTC (rev 4114) +++ trunk/doc/Change.log.html 2010-10-27 16:00:02 UTC (rev 4115) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>27/10/10 Tim: WorkOrderEntry.php - When the quantities are changed, then the correct quantities are updated, and the date picker chooses the correct date.</p> <p>27/10/10 Tim: header.inc - Correct for non ascii characters</p> <p>27/10/10 Tim: Corrections to display multi line invoice narratives correctly</p> <p>26/10/10 Tim: Discountmatrix.php - Fix discount category bug</p> Modified: trunk/javascripts/MiscFunctions.js =================================================================== --- trunk/javascripts/MiscFunctions.js 2010-10-27 15:34:11 UTC (rev 4114) +++ trunk/javascripts/MiscFunctions.js 2010-10-27 16:00:02 UTC (rev 4115) @@ -153,11 +153,16 @@ else dA=dS.split("/"); switch (dF){ -case "d/m/Y","d.m.Y": +case "d/m/Y": d=parseInt(dA[0],10); m=parseInt(dA[1],10)-1; y=parseInt(dA[2],10); break; +case "d.m.Y": +d=parseInt(dA[0],10); +m=parseInt(dA[1],10)-1; +y=parseInt(dA[2],10); +break; case "Y/m/d": d=parseInt(dA[2],10); m=parseInt(dA[1],10)-1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-27 19:21:20
|
Revision: 4117 http://web-erp.svn.sourceforge.net/web-erp/?rev=4117&view=rev Author: tim_schofield Date: 2010-10-27 19:21:14 +0000 (Wed, 27 Oct 2010) Log Message: ----------- Tim: class.pdf.php - Fix bug in html_entity_decode() function call Modified Paths: -------------- trunk/doc/Change.log.html trunk/includes/class.pdf.php Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-27 18:22:59 UTC (rev 4116) +++ trunk/doc/Change.log.html 2010-10-27 19:21:14 UTC (rev 4117) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>27/10/10 Tim: class.pdf.php - Fix bug in html_entity_decode() function call</p> <p>27/10/10 d.k shukla: ManualPurchaseOrdering.html - Improvements to purchase ordering manual</p> <p>27/10/10 Tim: WorkOrderEntry.php - When the quantities are changed, then the correct quantities are updated, and the date picker chooses the correct date.</p> <p>27/10/10 Tim: header.inc - Correct for non ascii characters</p> Modified: trunk/includes/class.pdf.php =================================================================== --- trunk/includes/class.pdf.php 2010-10-27 18:22:59 UTC (rev 4116) +++ trunk/includes/class.pdf.php 2010-10-27 19:21:14 UTC (rev 4117) @@ -247,7 +247,7 @@ //some special characters are html encoded //this code serves to make them appear human readable in pdf file - $txt = html_entity_decode($txt, ENT_QUOTES, UTF-8); + $txt = html_entity_decode($txt, ENT_QUOTES, 'UTF-8'); $this->x = $xb; $this->y = $this->h - $yb - $h; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-27 20:52:13
|
Revision: 4118 http://web-erp.svn.sourceforge.net/web-erp/?rev=4118&view=rev Author: tim_schofield Date: 2010-10-27 20:52:06 +0000 (Wed, 27 Oct 2010) Log Message: ----------- SQL quoting corrections and layout changes and improvements Modified Paths: -------------- trunk/PcClaimExpensesFromTab.php trunk/doc/Change.log.html Modified: trunk/PcClaimExpensesFromTab.php =================================================================== --- trunk/PcClaimExpensesFromTab.php 2010-10-27 19:21:14 UTC (rev 4117) +++ trunk/PcClaimExpensesFromTab.php 2010-10-27 20:52:06 UTC (rev 4118) @@ -56,7 +56,7 @@ amount = '" .- $_POST['amount'] . "', notes = '" . $_POST['Notes'] . "', receipt = '" . $_POST['Receipt'] . "' - WHERE counterindex = '$SelectedIndex'"; + WHERE counterindex = '".$SelectedIndex."'"; $msg = _('The Expense Claim on Tab') . ' ' . $SelectedTabs . ' ' . _('has been updated'); @@ -103,7 +103,7 @@ } elseif ( isset($_GET['delete']) ) { $sql="DELETE FROM pcashdetails - WHERE counterindex='$SelectedIndex'"; + WHERE counterindex='".$SelectedIndex."'"; $ErrMsg = _('Petty Cash Expense record could not be deleted because'); $result = DB_query($sql,$db,$ErrMsg); prnMsg(_('Petty cash Expense record') . ' ' . $SelectedTabs . ' ' . _('has been deleted') ,'success'); @@ -118,11 +118,12 @@ then none of the above are true and the list of sales types will be displayed with links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') + . '" alt="">' . ' ' . $title . '</p>'; echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><table border=1>'; //Main table - echo '<td><table>'; // First column + echo '<p><table class=selection>'; //Main table echo '<tr><td>' . _('Petty Cash Tabs for User ') . $_SESSION['UserID'] . ":</td><td><select name='SelectedTabs'>"; @@ -144,7 +145,6 @@ } //end while loop echo '</select></td></tr>'; - echo '</table>'; // close table in first column echo '</td></tr></table>'; // close main table echo '<p><div class="centre"><input type=submit name=process VALUE="' . _('Accept') . '"><input type=submit name=Cancel VALUE="' . _('Cancel') . '"></div>'; @@ -180,7 +180,7 @@ } $sql = "SELECT * FROM pcashdetails - WHERE tabcode='$SelectedTabs' + WHERE tabcode='".$SelectedTabs."' AND date >=DATE_SUB(CURDATE(), INTERVAL ".$Days." DAY) ORDER BY date, counterindex ASC"; @@ -259,7 +259,7 @@ $sqlamount="SELECT sum(amount) FROM pcashdetails - WHERE tabcode='$SelectedTabs'"; + WHERE tabcode='".$SelectedTabs."'"; $ResultAmount = DB_query($sqlamount,$db); $Amount=DB_fetch_array($ResultAmount); @@ -286,7 +286,7 @@ if ( isset($_GET['edit'])) { $sql = "SELECT * FROM pcashdetails - WHERE counterindex='$SelectedIndex'"; + WHERE counterindex='".$SelectedIndex."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); @@ -318,7 +318,7 @@ FROM pctabexpenses, pcexpenses, pctabs WHERE pctabexpenses.codeexpense = pcexpenses.codeexpense AND pctabexpenses.typetabcode = pctabs.typetabcode - AND pctabs.tabcode = '$SelectedTabs' + AND pctabs.tabcode = '".$SelectedTabs."' ORDER BY pcexpenses.codeexpense ASC"; $result = DB_query($SQL,$db); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-27 19:21:14 UTC (rev 4117) +++ trunk/doc/Change.log.html 2010-10-27 20:52:06 UTC (rev 4118) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>27/10/10 Tim: PcClaimExpensesFromTab.php - SQL quoting corrections and layout changes and improvements</p> <p>27/10/10 Tim: class.pdf.php - Fix bug in html_entity_decode() function call</p> <p>27/10/10 d.k shukla: ManualPurchaseOrdering.html - Improvements to purchase ordering manual</p> <p>27/10/10 Tim: WorkOrderEntry.php - When the quantities are changed, then the correct quantities are updated, and the date picker chooses the correct date.</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-27 21:00:34
|
Revision: 4119 http://web-erp.svn.sourceforge.net/web-erp/?rev=4119&view=rev Author: tim_schofield Date: 2010-10-27 21:00:28 +0000 (Wed, 27 Oct 2010) Log Message: ----------- SQL quoting corrections and layout changes and improvements Modified Paths: -------------- trunk/PcReportTab.php trunk/doc/Change.log.html Modified: trunk/PcReportTab.php =================================================================== --- trunk/PcReportTab.php 2010-10-27 20:52:06 UTC (rev 4118) +++ trunk/PcReportTab.php 2010-10-27 21:00:28 UTC (rev 4119) @@ -18,6 +18,10 @@ if ((! isset($_POST['FromDate']) AND ! isset($_POST['ToDate'])) OR isset($_POST['SelectDifferentDate'])){ include ('includes/header.inc'); + + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') + . '" alt="">' . ' ' . $title . '</p>'; + echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -30,7 +34,7 @@ } /*Show a form to allow input of criteria for Tabs to show */ - echo '<table>'; + echo '<table class=selection>'; echo '<tr><td>' . _('Code Of Petty Cash Tab') . ":</td><td><select name='SelectedTabs'>"; if ($_SESSION['AccessLevel'] >= 15){ // superuser can supervise the supervisors @@ -82,7 +86,7 @@ $SQL_ToDate = FormatDateForSQL($_POST['ToDate']); $SQL = "SELECT * FROM pcashdetails - WHERE tabcode='$SelectedTabs' + WHERE tabcode='".$SelectedTabs."' AND date >='" . $SQL_FromDate . "' AND date <= '" . $SQL_ToDate . "' ORDER BY date, counterindex ASC"; @@ -109,14 +113,14 @@ include('includes/PDFTabReportHeader.inc'); $SqlTabs = "SELECT * FROM pctabs - WHERE tabcode='$SelectedTabs'"; + WHERE tabcode='".$SelectedTabs."'"; $TabResult = DB_query($SqlTabs, $db, _('No Petty Cash tabs were returned by the SQL because'), _('The SQL that failed was:')); $Tabs=DB_fetch_array($TabResult); $SqlBalance = "SELECT SUM(amount) FROM pcashdetails - WHERE tabcode='$SelectedTabs' + WHERE tabcode='".$SelectedTabs."' AND date<'".$SQL_FromDate."'"; $TabBalance = DB_query($SqlBalance, @@ -200,7 +204,7 @@ $sqlamount="SELECT sum(amount) FROM pcashdetails - WHERE tabcode='$SelectedTabs' + WHERE tabcode='".$SelectedTabs."' AND date<='".$SQL_ToDate."'"; $ResultAmount = DB_query($sqlamount,$db); @@ -248,6 +252,8 @@ include('includes/header.inc'); + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') + . '" alt="">' . ' ' . $title . '</p>'; $SQL_FromDate = FormatDateForSQL($_POST['FromDate']); $SQL_ToDate = FormatDateForSQL($_POST['ToDate']); @@ -257,7 +263,7 @@ echo '<input type=hidden name="FromDate" VALUE="' . $_POST['FromDate'] . '"><input type=hidden name="ToDate" VALUE="' . $_POST['ToDate'] . '">'; $SqlTabs = "SELECT * FROM pctabs - WHERE tabcode='$SelectedTabs'"; + WHERE tabcode='".$SelectedTabs."'"; $TabResult = DB_query($SqlTabs, $db, @@ -266,7 +272,7 @@ $Tabs=DB_fetch_array($TabResult); - echo "<br><table >"; + echo "<br><table class=selection>"; echo '<tr><td>' . _('Tab Code') . '</td> <td>:</td> @@ -287,7 +293,7 @@ $SqlBalance = "SELECT SUM(amount) FROM pcashdetails - WHERE tabcode='$SelectedTabs' + WHERE tabcode='".$SelectedTabs."' AND date<'".$SQL_FromDate."'"; $TabBalance = DB_query($SqlBalance, $db); @@ -302,7 +308,7 @@ $SqlBalanceNotAut = "SELECT SUM(amount) FROM pcashdetails - WHERE tabcode= '$SelectedTabs' + WHERE tabcode= '".$SelectedTabs."' AND authorized = '0000-00-00' AND date<'".$SQL_FromDate."'"; @@ -324,7 +330,7 @@ $SQL = "SELECT * FROM pcashdetails - WHERE tabcode='$SelectedTabs' + WHERE tabcode='".$SelectedTabs."' AND date >='" . $SQL_FromDate . "' AND date <= '" . $SQL_ToDate . "' ORDER BY date, counterindex Asc"; @@ -334,7 +340,7 @@ _('No Petty Cash movements for this tab were returned by the SQL because'), _('The SQL that failed was:')); - echo '<br><table BORDER=1>'; + echo '<br><table class=selection>'; echo "<tr> <th>" . _('Date Of Expense') . "</th> <th>" . _('Expense Description') . "</th> @@ -401,7 +407,7 @@ $sqlamount="SELECT sum(amount) FROM pcashdetails - WHERE tabcode='$SelectedTabs' + WHERE tabcode='".$SelectedTabs."' AND date<='".$SQL_ToDate."'"; $ResultAmount = DB_query($sqlamount,$db); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-27 20:52:06 UTC (rev 4118) +++ trunk/doc/Change.log.html 2010-10-27 21:00:28 UTC (rev 4119) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>27/10/10 Tim: PcReportTab.php - SQL quoting corrections and layout changes and improvements</p> <p>27/10/10 Tim: PcClaimExpensesFromTab.php - SQL quoting corrections and layout changes and improvements</p> <p>27/10/10 Tim: class.pdf.php - Fix bug in html_entity_decode() function call</p> <p>27/10/10 d.k shukla: ManualPurchaseOrdering.html - Improvements to purchase ordering manual</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-28 08:46:13
|
Revision: 4120 http://web-erp.svn.sourceforge.net/web-erp/?rev=4120&view=rev Author: tim_schofield Date: 2010-10-28 08:46:07 +0000 (Thu, 28 Oct 2010) Log Message: ----------- SQL quoting corrections and layout changes and improvements Modified Paths: -------------- trunk/PcTypeTabs.php trunk/doc/Change.log.html Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2010-10-27 21:00:28 UTC (rev 4119) +++ trunk/PcTypeTabs.php 2010-10-28 08:46:07 UTC (rev 4120) @@ -7,6 +7,9 @@ $title = _('Maintenance Of Petty Cash Type of Tabs'); include('includes/header.inc'); +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') + . '" alt="">' . ' ' . $title . '</p>'; + if (isset($_POST['SelectedTab'])){ $SelectedTab = strtoupper($_POST['SelectedTab']); } elseif (isset($_GET['SelectedTab'])){ @@ -51,7 +54,7 @@ $sql = "UPDATE pctypetabs SET typetabdescription = '" . $_POST['typetabdescription'] . "' - WHERE typetabcode = '$SelectedTab'"; + WHERE typetabcode = '".$SelectedTab."'"; $msg = _('The Tabs type') . ' ' . $SelectedTab . ' ' . _('has been updated'); } elseif ( $InputError !=1 ) { @@ -99,7 +102,7 @@ $sqlpctabexpenses= "SELECT COUNT(*) FROM pctabexpenses - WHERE typetabcode='$SelectedTab'"; + WHERE typetabcode='".$SelectedTab."'"; $ErrMsg = _('The number of tabs using this Tab type could not be retrieved'); $resultpctabexpenses = DB_query($sqlpctabexpenses,$db,$ErrMsg); @@ -108,14 +111,13 @@ $sqlpctabs= "SELECT COUNT(*) FROM pctabs - WHERE typetabcode='$SelectedTab'"; + WHERE typetabcode='".$SelectedTab."'"; $ErrMsg = _('The number of tabs using this Tab type could not be retrieved'); $resultpctabs = DB_query($sqlpctabs,$db,$ErrMsg); $myrowpctabs = DB_fetch_row($resultpctabs); if ($myrowpctabexpenses[0]>0 or $myrowpctabs[0]>0) { - echo '<br>'; prnMsg(_('Cannot delete this tab type because tabs have been created using this tab type'),'error'); echo '<br>'; echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; @@ -126,7 +128,7 @@ exit; } else { - $sql="DELETE FROM pctypetabs WHERE typetabcode='$SelectedTab'"; + $sql="DELETE FROM pctypetabs WHERE typetabcode='".$SelectedTab."'"; $ErrMsg = _('The Tab Type record could not be deleted because'); $result = DB_query($sql,$db,$ErrMsg); prnMsg(_('Tab type') . ' ' . $SelectedTab . ' ' . _('has been deleted') ,'success'); @@ -147,7 +149,7 @@ $sql = 'SELECT * FROM pctypetabs'; $result = DB_query($sql,$db); - echo '<br><table BORDER=1>'; + echo '<table class=selection>'; echo "<tr> <th>" . _('Type Of Tab') . "</th> <th>" . _('Description') . "</th> @@ -187,17 +189,15 @@ echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><table border=1>'; //Main table - echo '<td><table>'; // First column + echo '<p><table class=selection>'; //Main table - if ( isset($SelectedTab) AND $SelectedTab!='' ) { $sql = "SELECT typetabcode, typetabdescription FROM pctypetabs - WHERE typetabcode='$SelectedTab'"; + WHERE typetabcode='".$SelectedTab."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); @@ -217,7 +217,7 @@ // This is a new type so the user may volunteer a type code - echo "<table><tr><td>" . _('Code Of Type Of Tab') . ":</td><td><input type='Text' + echo "<table class=selection><tr><td>" . _('Code Of Type Of Tab') . ":</td><td><input type='Text' " . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) ." name='typetabcode'></td></tr>"; } @@ -227,7 +227,6 @@ } echo "<tr><td>" . _('Description Of Type of Tab') . ":</td><td><input type='Text' name='typetabdescription' size=50 maxlength=49 value='" . $_POST['typetabdescription'] . "'></td></tr>"; - echo '</table>'; // close table in first column echo '</td></tr></table>'; // close main table echo '<p><div class="centre"><input type=submit name=submit VALUE="' . _('Accept') . '"><input type=submit name=Cancel VALUE="' . _('Cancel') . '"></div>'; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-27 21:00:28 UTC (rev 4119) +++ trunk/doc/Change.log.html 2010-10-28 08:46:07 UTC (rev 4120) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>28/10/10 Tim: PcTypeTabs.php - SQL quoting corrections and layout changes and improvements</p> <p>27/10/10 Tim: PcReportTab.php - SQL quoting corrections and layout changes and improvements</p> <p>27/10/10 Tim: PcClaimExpensesFromTab.php - SQL quoting corrections and layout changes and improvements</p> <p>27/10/10 Tim: class.pdf.php - Fix bug in html_entity_decode() function call</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-28 09:09:06
|
Revision: 4121 http://web-erp.svn.sourceforge.net/web-erp/?rev=4121&view=rev Author: tim_schofield Date: 2010-10-28 09:08:59 +0000 (Thu, 28 Oct 2010) Log Message: ----------- SQL quoting corrections and layout changes and improvements Modified Paths: -------------- trunk/PcTabs.php trunk/doc/Change.log.html Modified: trunk/PcTabs.php =================================================================== --- trunk/PcTabs.php 2010-10-28 08:46:07 UTC (rev 4120) +++ trunk/PcTabs.php 2010-10-28 09:08:59 UTC (rev 4121) @@ -7,6 +7,9 @@ $title = _('Maintenance Of Petty Cash Tabs'); include('includes/header.inc'); +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') + . '" alt="">' . ' ' . $title . '</p>'; + if (isset($_POST['SelectedTab'])){ $SelectedTab = strtoupper($_POST['SelectedTab']); } elseif (isset($_GET['SelectedTab'])){ @@ -52,7 +55,7 @@ authorizer = '" . $_POST['SelectAuthorizer'] . "', glaccountassignment = '" . $_POST['glaccountcash'] . "', glaccountpcash = '" . $_POST['glaccountpcashtab'] . "' - WHERE tabcode = '$SelectedTab'"; + WHERE tabcode = '".$SelectedTab."'"; $msg = _('The Tabs Of Code') . ' ' . $SelectedTab . ' ' . _('has been updated'); } elseif ( $InputError !=1 ) { @@ -115,7 +118,7 @@ } elseif ( isset($_GET['delete']) ) { - $sql="DELETE FROM pctabs WHERE tabcode='$SelectedTab'"; + $sql="DELETE FROM pctabs WHERE tabcode='".$SelectedTab."'"; $ErrMsg = _('The Tab record could not be deleted because'); $result = DB_query($sql,$db,$ErrMsg); prnMsg(_('Tab type') . ' ' . $SelectedTab . ' ' . _('has been deleted') ,'success'); @@ -136,7 +139,7 @@ ORDER BY tabcode'; $result = DB_query($sql,$db); - echo '<br><table BORDER=1>'; + echo '<br><table class=selection>'; echo "<tr> <th>" . _('Tab Code') . "</th> <th>" . _('User Name') . "</th> @@ -209,14 +212,13 @@ echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><table border=1>'; //Main table - echo '<td><table>'; // First column + echo '<p><table class=selection>'; //Main table if ( isset($SelectedTab) AND $SelectedTab!='' ) { $sql = "SELECT * FROM pctabs - WHERE tabcode='$SelectedTab'"; + WHERE tabcode='".$SelectedTab."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); @@ -233,7 +235,7 @@ echo "<input type=hidden name='SelectedTab' VALUE=" . $SelectedTab . ">"; echo "<input type=hidden name='tabcode' VALUE=" . $_POST['tabcode']. ">"; - echo "<table> <tr><td>" . _('Tabcode') . ":</td><td>"; + echo "<table class=selection> <tr><td>" . _('Tabcode') . ":</td><td>"; // We dont allow the user to change an existing type code @@ -242,7 +244,7 @@ } else { // This is a new type so the user may volunteer a type code - echo "<table><tr><td>" . _('Tabcode') . ":</td><td><input type='Text' + echo "<table class=selection><tr><td>" . _('Tabcode') . ":</td><td><input type='Text' " . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) ." name='tabcode'></td></tr>"; } @@ -379,8 +381,6 @@ } //end while loop echo '</select></td></tr>'; - - echo '</table>'; // close table in first column echo '</td></tr></table>'; // close main table echo '<p><div class="centre"><input type=submit name=submit VALUE="' . _('Accept') . '"><input type=submit name=Cancel VALUE="' . _('Cancel') . '"></div>'; @@ -391,4 +391,4 @@ include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-28 08:46:07 UTC (rev 4120) +++ trunk/doc/Change.log.html 2010-10-28 09:08:59 UTC (rev 4121) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>28/10/10 Tim: PcTabs.php - SQL quoting corrections and layout changes and improvements</p> <p>28/10/10 Tim: PcTypeTabs.php - SQL quoting corrections and layout changes and improvements</p> <p>27/10/10 Tim: PcReportTab.php - SQL quoting corrections and layout changes and improvements</p> <p>27/10/10 Tim: PcClaimExpensesFromTab.php - SQL quoting corrections and layout changes and improvements</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-28 09:18:32
|
Revision: 4122 http://web-erp.svn.sourceforge.net/web-erp/?rev=4122&view=rev Author: tim_schofield Date: 2010-10-28 09:18:26 +0000 (Thu, 28 Oct 2010) Log Message: ----------- SQL quoting corrections and layout changes and improvements Modified Paths: -------------- trunk/PcExpenses.php trunk/doc/Change.log.html Modified: trunk/PcExpenses.php =================================================================== --- trunk/PcExpenses.php 2010-10-28 09:08:59 UTC (rev 4121) +++ trunk/PcExpenses.php 2010-10-28 09:18:26 UTC (rev 4122) @@ -7,6 +7,9 @@ $title = _('Maintenance Of Petty Cash Of Expenses'); include('includes/header.inc'); +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') + . '" alt="">' . ' ' . $title . '</p>'; + if (isset($_POST['SelectedExpense'])){ $SelectedExpense = strtoupper($_POST['SelectedExpense']); } elseif (isset($_GET['SelectedExpense'])){ @@ -140,7 +143,7 @@ FROM pcexpenses'; $result = DB_query($sql,$db); - echo '<br><table BORDER=1>'; + echo '<table class=selection>'; echo "<tr> <th>" . _('Code Of Expense') . "</th> <th>" . _('Description') . "</th> @@ -193,10 +196,8 @@ echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><table border=1>'; //Main table - echo '<td><table>'; // First column + echo '<p><table class=selection>'; //Main table - // The user wish to EDIT an existing type if ( isset($SelectedExpense) AND $SelectedExpense!='' ) { @@ -216,7 +217,7 @@ echo "<input type=hidden name='SelectedExpense' VALUE=" . $SelectedExpense . ">"; echo "<input type=hidden name='codeexpense' VALUE=" . $_POST['codeexpense']. ">"; - echo "<table> <tr><td>" . _('Code Of Expense') . ":</td><td>"; + echo "<table class=selection> <tr><td>" . _('Code Of Expense') . ":</td><td>"; // We dont allow the user to change an existing type code @@ -226,7 +227,7 @@ // This is a new type so the user may volunteer a type code - echo "<table><tr><td>" . _('Code Of Expense') . ":</td><td><input type='Text' + echo "<table class=selection><tr><td>" . _('Code Of Expense') . ":</td><td><input type='Text' " . (in_array('SalesType',$Errors) ? 'class="inputerror"' : '' ) ." name='codeexpense'></td></tr>"; } @@ -257,7 +258,6 @@ echo '</select></td></tr>'; - echo '</table>'; // close table in first column echo '</td></tr></table>'; // close main table echo '<p><div class="centre"><input type=submit name=submit VALUE="' . _('Accept') . '"><input type=submit name=Cancel VALUE="' . _('Cancel') . '"></div>'; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-28 09:08:59 UTC (rev 4121) +++ trunk/doc/Change.log.html 2010-10-28 09:18:26 UTC (rev 4122) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>28/10/10 Tim: PcExpenses.php - SQL quoting corrections and layout changes and improvements</p> <p>28/10/10 Tim: PcTabs.php - SQL quoting corrections and layout changes and improvements</p> <p>28/10/10 Tim: PcTypeTabs.php - SQL quoting corrections and layout changes and improvements</p> <p>27/10/10 Tim: PcReportTab.php - SQL quoting corrections and layout changes and improvements</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-28 09:27:40
|
Revision: 4123 http://web-erp.svn.sourceforge.net/web-erp/?rev=4123&view=rev Author: tim_schofield Date: 2010-10-28 09:27:33 +0000 (Thu, 28 Oct 2010) Log Message: ----------- SQL quoting corrections and layout changes and improvements Modified Paths: -------------- trunk/PcExpensesTypeTab.php trunk/doc/Change.log.html Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2010-10-28 09:18:26 UTC (rev 4122) +++ trunk/PcExpensesTypeTab.php 2010-10-28 09:27:33 UTC (rev 4123) @@ -7,6 +7,9 @@ $title = _('Maintenance Of Petty Cash Expenses For a Type Tab'); include('includes/header.inc'); +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') + . '" alt="">' . ' ' . $title . '</p>'; + if (isset($_POST['SelectedType'])){ $SelectedType = strtoupper($_POST['SelectedType']); } elseif (isset($_GET['SelectedType'])){ @@ -73,8 +76,8 @@ $sql="DELETE FROM pctabexpenses - WHERE typetabcode='$SelectedTabs' - AND codeexpense='$SelectedType'"; + WHERE typetabcode='".$SelectedTabs."' + AND codeexpense='".$SelectedType."'"; $ErrMsg = _('The Tab Type record could not be deleted because'); $result = DB_query($sql,$db,$ErrMsg); prnMsg(_('Expense code').' '. $SelectedType .' '. _('for type of tab').' '. $SelectedTabs .' '. _('has been deleted') ,'success'); @@ -92,8 +95,7 @@ or deletion of the records*/ echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<p><table border=1>'; //Main table -echo '<td><table>'; // First column +echo '<table class=selection>'; //Main table echo '<tr><td>' . _('Select Type of Tab') . ":</td><td><select name='SelectedTabs'>"; @@ -132,12 +134,12 @@ $sql = "SELECT pctabexpenses.codeexpense, pcexpenses.description FROM pctabexpenses,pcexpenses WHERE pctabexpenses.codeexpense=pcexpenses.codeexpense - AND pctabexpenses.typetabcode='$SelectedTabs' + AND pctabexpenses.typetabcode='".$SelectedTabs."' ORDER BY pctabexpenses.codeexpense ASC"; $result = DB_query($sql,$db); - echo '<br><table BORDER=1>'; + echo '<table class=selection>'; echo "<tr> <th>" . _('Expense Code') . "</th> <th>" . _('Description') . "</th> @@ -173,8 +175,7 @@ echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><table border=1>'; //Main table - echo '<td><table>'; // First column + echo '<br /><table class=selection>'; //Main table @@ -201,7 +202,6 @@ echo "<input type=hidden name='SelectedTabs' VALUE=" . $SelectedTabs . ">"; - echo '</table>'; // close table in first column echo '</td></tr></table>'; // close main table echo '<p><div class="centre"><input type=submit name=submit VALUE="' . _('Accept') . '"><input type=submit name=Cancel VALUE="' . _('Cancel') . '"></div>'; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-28 09:18:26 UTC (rev 4122) +++ trunk/doc/Change.log.html 2010-10-28 09:27:33 UTC (rev 4123) @@ -1,6 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> -<p>28/10/10 Tim: PcExpenses.php - SQL quoting corrections and layout changes and improvements</p> +<p>28/10/10 Tim: PcExpensesTypeTab.php - SQL quoting corrections and layout changes and improvements</p> <p>28/10/10 Tim: PcTabs.php - SQL quoting corrections and layout changes and improvements</p> <p>28/10/10 Tim: PcTypeTabs.php - SQL quoting corrections and layout changes and improvements</p> <p>27/10/10 Tim: PcReportTab.php - SQL quoting corrections and layout changes and improvements</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-28 20:19:15
|
Revision: 4124 http://web-erp.svn.sourceforge.net/web-erp/?rev=4124&view=rev Author: tim_schofield Date: 2010-10-28 20:19:08 +0000 (Thu, 28 Oct 2010) Log Message: ----------- Fix bug # 3017709. When bulk transfers are received for controlled items serial numbers are required Modified Paths: -------------- trunk/StockLocTransferReceive.php trunk/StockTransferControlled.php trunk/doc/Change.log.html trunk/includes/Add_SerialItems.php trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsExisting.php trunk/includes/InputSerialItemsKeyed.php Modified: trunk/StockLocTransferReceive.php =================================================================== --- trunk/StockLocTransferReceive.php 2010-10-28 09:27:33 UTC (rev 4123) +++ trunk/StockLocTransferReceive.php 2010-10-28 20:19:08 UTC (rev 4124) @@ -44,11 +44,11 @@ prnMsg( _('The Quantity entered plus the Quantity Previously Received can not be greater than the Total Quantity shipped for').' '. $TrfLine->StockID , 'error'); $InputError = True; } - if (isset($_POST['CancelBalance' . $i]) and $_POST['CancelBalance' . $i]==1){ - $_SESSION['Transfer']->TransferItem[$i]->CancelBalance=1; - } else { - $_SESSION['Transfer']->TransferItem[$i]->CancelBalance=0; - } + if (isset($_POST['CancelBalance' . $i]) and $_POST['CancelBalance' . $i]==1){ + $_SESSION['Transfer']->TransferItem[$i]->CancelBalance=1; + } else { + $_SESSION['Transfer']->TransferItem[$i]->CancelBalance=0; + } $TotalQuantity += $TrfLine->Quantity; $i++; } /*end loop to validate and update the SESSION['Transfer'] data */ @@ -454,20 +454,26 @@ if (isset($_POST['Qty' . $i]) and is_numeric($_POST['Qty' . $i])){ $_SESSION['Transfer']->TransferItem[$i]->Quantity= $_POST['Qty' . $i]; $Qty = $_POST['Qty' . $i]; + } else if ($TrfLine->Controlled==1) { + if (sizeOf($TrfLine->SerialItems)==0) { + $Qty = 0; + } else { + $Qty = $TrfLine->Quantity; + } } else { $Qty = $TrfLine->Quantity; } - echo '<td class=number>' . number_format($TrfLine->PrevRecvQty, $TrfLine->DecimalPlaces) . '</td>'; + echo '<td class=number>' . number_format($TrfLine->PrevRecvQty, $TrfLine->DecimalPlaces) . '</td>'; if ($TrfLine->Controlled==1){ - echo '<td><input type=hidden name="Qty' . $i . '" VALUE="' . $Qty . '"><a href="' . $rootpath .'/StockTransferControlled.php?' . SID . '&TransferItem=' . $i . '">' . $Qty . '</a></td>'; + echo '<td class=number><input type=hidden name="Qty' . $i . '" VALUE="' . $Qty . '"><a href="' . $rootpath .'/StockTransferControlled.php?' . SID . '&TransferItem=' . $i . '">' . $Qty . '</a></td>'; } else { - echo '<td><input type=TEXT class="number" name="Qty' . $i . '" maxlength=10 class="number" size=10 VALUE="' . $Qty . '"></td>'; + echo '<td><input type=text class="number" name="Qty' . $i . '" maxlength=10 class="number" size=auto VALUE="' . $Qty . '"></td>'; } echo '<td>' . $TrfLine->PartUnit . '</td>'; - echo '<td><input type="checkbox" name="CancelBalance' . $i . '" value=1></td>'; + echo '<td><input type="checkbox" name="CancelBalance' . $i . '" value=1></td>'; if ($TrfLine->Controlled==1){ Modified: trunk/StockTransferControlled.php =================================================================== --- trunk/StockTransferControlled.php 2010-10-28 09:27:33 UTC (rev 4123) +++ trunk/StockTransferControlled.php 2010-10-28 20:19:08 UTC (rev 4124) @@ -13,6 +13,8 @@ include('includes/header.inc'); +echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . + '" alt=""><b>' . $title . '</p>'; if (!isset($_SESSION['Transfer'])) { /* This page can only be called when a stock Transfer is pending */ @@ -56,7 +58,7 @@ if (isset($TransferItem)){ echo _('Transfer Items is set equal to') . ' ' . $TransferItem; - + echo '<br><a href="'.$rootpath.'/StockLocTransferReceive.php?' . SID . '&StockID='.$LineItem->StockID.'">'._('Back To Transfer Screen').'</a>'; } else { echo '<br><a href="'.$rootpath.'/StockTransfers.php?' . SID. '&StockID='.$LineItem->StockID. '">'._('Back To Transfer Screen').'</a>'; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-28 09:27:33 UTC (rev 4123) +++ trunk/doc/Change.log.html 2010-10-28 20:19:08 UTC (rev 4124) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>28/10/10 Tim: Fix bug # 3017709. When bulk transfers are received for controlled items serial numbers are required</p> <p>28/10/10 Tim: PcExpensesTypeTab.php - SQL quoting corrections and layout changes and improvements</p> <p>28/10/10 Tim: PcTabs.php - SQL quoting corrections and layout changes and improvements</p> <p>28/10/10 Tim: PcTypeTabs.php - SQL quoting corrections and layout changes and improvements</p> Modified: trunk/includes/Add_SerialItems.php =================================================================== --- trunk/includes/Add_SerialItems.php 2010-10-28 09:27:33 UTC (rev 4123) +++ trunk/includes/Add_SerialItems.php 2010-10-28 20:19:08 UTC (rev 4124) @@ -9,7 +9,7 @@ if ( isset($_POST['AddBatches']) && $_POST['AddBatches']!='') { for ($i=0;$i < 10;$i++){ - if(strlen($_POST['SerialNo' . $i])>0){ + if(isset($_POST['SerialNo' . $i]) and strlen($_POST['SerialNo' . $i])>0){ if ($ItemMustExist){ $ExistingBundleQty = ValidBundleRef($StockID, $LocationOut, $_POST['SerialNo' . $i]); if ($ExistingBundleQty >0 or ($ExistingBundleQty==1 and $IsCredit=true)){ Modified: trunk/includes/InputSerialItems.php =================================================================== --- trunk/includes/InputSerialItems.php 2010-10-28 09:27:33 UTC (rev 4123) +++ trunk/includes/InputSerialItems.php 2010-10-28 20:19:08 UTC (rev 4124) @@ -49,10 +49,10 @@ $valid = true; echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" enctype="multipart/form-data" >'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type=hidden name="LineNo" value="' . $LineNo . '">'; echo '<input type=hidden name="StockID" value="'. $StockID. '">'; -echo '<table border=1><tr><td>'; +echo '<table class=selection><tr><td>'; echo '<input type=radio name=EntryType onClick="submit();" '; if ($_POST['EntryType']=='KEYED') { echo ' checked '; @@ -100,7 +100,6 @@ } echo $EditLink . $RemoveLink; -echo '<table><tr><td>'; if ($_POST['EntryType'] == 'FILE'){ include('includes/InputSerialItemsFile.php'); } elseif ($_POST['EntryType'] == 'SEQUENCE'){ @@ -108,5 +107,4 @@ } else { /*KEYED or BARCODE */ include('includes/InputSerialItemsKeyed.php'); } -echo '</td></tr></table>'; -?> +?> \ No newline at end of file Modified: trunk/includes/InputSerialItemsExisting.php =================================================================== --- trunk/includes/InputSerialItemsExisting.php 2010-10-28 09:27:33 UTC (rev 4123) +++ trunk/includes/InputSerialItemsExisting.php 2010-10-28 20:19:08 UTC (rev 4124) @@ -5,61 +5,62 @@ /** If the User has selected Keyed Entry, show them this special select list... it is just in the way if they are doing file imports -it also would not be applicable in a PO and possible other situations... +it also would not be applicable in a PO and possible other situations... **/ if ($_POST['EntryType'] == 'KEYED'){ /*Also a multi select box for adding bundles to the dispatch without keying */ - $sql = "SELECT serialno, quantity - FROM stockserialitems + $sql = "SELECT serialno, quantity + FROM stockserialitems WHERE stockid='" . $StockID . "' AND loccode ='" . $LocationOut."' AND quantity > 0"; //echo $sql; - $ErrMsg = '<BR>'. _('Could not retrieve the items for'). ' ' . $StockID; + $ErrMsg = '<br />'. _('Could not retrieve the items for'). ' ' . $StockID; $Bundles = DB_query($sql,$db, $ErrMsg ); - echo '<TABLE><TR>'; + echo '<table class=selection><tr>'; if (DB_num_rows($Bundles)>0){ $AllSerials=array(); - - foreach ($LineItem->SerialItems as $Itm){ - $AllSerials[$Itm->BundleRef] = $Itm->BundleQty; + + foreach ($LineItem->SerialItems as $Itm){ + $AllSerials[$Itm->BundleRef] = $Itm->BundleQty; } - - echo '<TD VALIGN=TOP><B>'. _('Select Existing Items'). '</B><BR>'; - - echo '<FORM ACTION="' . $_SERVER['PHP_SELF'] . '?=' . $SID . '" METHOD="POST"> - <input type=hidden name=LineNo value="' . $LineNo . '"> + + echo '<td valign="top"><b>'. _('Select Existing Items'). '</b><br />'; + + echo '<form action="' . $_SERVER['PHP_SELF'] . '?=' . SID . '" method="POST">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<input type=hidden name=LineNo value="' . $LineNo . '"> <input type=hidden name=StockID value="' . $StockID . '"> <input type=hidden name=EntryType value="KEYED"> <input type=hidden name=EditControlled value="true"> - <SELECT Name=Bundles[] multiple>'; + <select Name=Bundles[] multiple>'; $id=0; $ItemsAvailable=0; while ($myrow=DB_fetch_array($Bundles,$db)){ if ($LineItem->Serialised==1){ if ( !array_key_exists($myrow['serialno'], $AllSerials) ){ - echo '<OPTION VALUE="' . $myrow['serialno'] . '">' . $myrow['serialno'].'</OPTION>'; + echo '<option value="' . $myrow['serialno'] . '">' . $myrow['serialno'].'</option>'; $ItemsAvailable++; } } else { if ( !array_key_exists($myrow['serialno'], $AllSerials) || ($myrow['quantity'] - $AllSerials[$myrow['serialno']] >= 0) ) { $RecvQty = $myrow['quantity'] - $AllSerials[$myrow['serialno']]; - echo '<OPTION VALUE="' . $myrow['serialno'] . '/|/'. $RecvQty .'">' . + echo '<OPTION VALUE="' . $myrow['serialno'] . '/|/'. $RecvQty .'">' . $myrow['serialno'].' - ' . _('Qty left'). ': ' . $RecvQty . '</OPTION>'; $ItemsAvailable += $RecvQty; } } } - echo '</SELECT><br>'; - echo '<br><center><INPUT TYPE=SUBMIT NAME="AddBatches" VALUE="'. _('Enter'). '"></center><BR>'; - echo '</FORM>'; + echo '</select><br>'; + echo '<br><div class=centre><input type=submit name="AddBatches" value="'. _('Enter'). '"></div><br />'; + echo '</form>'; echo $ItemsAvailable . ' ' . _('items available'); - echo '</TD>'; + echo '</td>'; } else { - echo '<TD>'. prnMsg( _('There does not appear to be any of') . ' ' . $StockID . ' ' . _('left in'). ' '. $LocationOut , 'warn') . '</TD>'; + echo '<td>'. prnMsg( _('There does not appear to be any of') . ' ' . $StockID . ' ' . _('left in'). ' '. $LocationOut , 'warn') . '</td>'; } - echo '</TR></TABLE>'; + echo '</tr></table>'; } \ No newline at end of file Modified: trunk/includes/InputSerialItemsKeyed.php =================================================================== --- trunk/includes/InputSerialItemsKeyed.php 2010-10-28 09:27:33 UTC (rev 4123) +++ trunk/includes/InputSerialItemsKeyed.php 2010-10-28 20:19:08 UTC (rev 4124) @@ -21,7 +21,7 @@ /*Display the batches already entered with quantities if not serialised */ -echo '<table><tr><td valign=top><table>'; +echo '<table class=selection><tr><td valign=top><table class=selection>'; echo $tableheader; $TotalQuantity = 0; /*Variable to accumulate total quantity received */ @@ -72,7 +72,7 @@ //echo '<TABLE><TR><TD valign=TOP>'; /*in the first column add a table for the input of newies */ -echo '<table>'; +echo '<table class=selection>'; echo $tableheader; @@ -125,7 +125,7 @@ } echo '</table>'; -echo '<br><input type=submit name="AddBatches" value="'. _('Enter'). '"><br>'; +echo '<br><div class=centre><input type=submit name="AddBatches" value="'. _('Enter'). '"></div>'; echo '</form></td><td valign=top>'; if ($ShowExisting){ include('includes/InputSerialItemsExisting.php'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-29 10:50:59
|
Revision: 4125 http://web-erp.svn.sourceforge.net/web-erp/?rev=4125&view=rev Author: tim_schofield Date: 2010-10-29 10:50:52 +0000 (Fri, 29 Oct 2010) Log Message: ----------- GLJournal.php. Force the user to select a GL account code instaed of defaulting to first on the list Modified Paths: -------------- trunk/GLJournal.php trunk/doc/Change.log.html Modified: trunk/GLJournal.php =================================================================== --- trunk/GLJournal.php 2010-10-28 20:19:08 UTC (rev 4124) +++ trunk/GLJournal.php 2010-10-29 10:50:52 UTC (rev 4125) @@ -147,7 +147,7 @@ } if ($_POST['GLManualCode'] != '' AND is_numeric($_POST['GLManualCode'])){ // If a manual code was entered need to check it exists and isnt a bank account - $AllowThisPosting = true; //by default + $AllowThisPosting = true; //by default if ($_SESSION['ProhibitJournalsToControlAccounts'] == 1){ if ($_SESSION['CompanyRecord']['gllink_debtors'] == '1' AND $_POST['GLManualCode'] == $_SESSION['CompanyRecord']['debtorsact']){ prnMsg(_('GL Journals involving the debtors control account cannot be entered. The general ledger debtors ledger (AR) integration is enabled so control accounts are automatically maintained by webERP. This setting can be disabled in System Configuration'),'warn'); @@ -189,6 +189,10 @@ $AllowThisPosting = false; } } + if ($_POST['GLCode'] == '' and $_POST['GLManualCode'] == '') { + prnMsg(_('You must select a GL account code'),'info'); + $AllowThisPosting = false; + } if (in_array($_POST['GLCode'], $_SESSION['JournalDetail']->BankAccounts)) { prnMsg(_('GL Journals involving a bank account cannot be entered') . '. ' . _('Bank account general ledger entries must be entered by either a bank account receipt or a bank account payment'),'warn'); @@ -312,6 +316,7 @@ $result=DB_query($sql, $db); echo '<td><select name="GLCode" onChange="return assignComboToInput(this,'.'GLManualCode'.')">'; + echo '<option value="">' . _('Select a general ledger account code') . '</option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['tag']) and $_POST['tag']==$myrow['accountcode']){ echo '<option selected value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'].' - ' .$myrow['accountname']; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-28 20:19:08 UTC (rev 4124) +++ trunk/doc/Change.log.html 2010-10-29 10:50:52 UTC (rev 4125) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>28/10/10 Tim: GLJournal.php. Force the user to select a GL account code instaed of defaulting to first on the list</p> <p>28/10/10 Tim: Fix bug # 3017709. When bulk transfers are received for controlled items serial numbers are required</p> <p>28/10/10 Tim: PcExpensesTypeTab.php - SQL quoting corrections and layout changes and improvements</p> <p>28/10/10 Tim: PcTabs.php - SQL quoting corrections and layout changes and improvements</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-30 16:32:55
|
Revision: 4127 http://web-erp.svn.sourceforge.net/web-erp/?rev=4127&view=rev Author: tim_schofield Date: 2010-10-30 16:32:49 +0000 (Sat, 30 Oct 2010) Log Message: ----------- Force the user to select a GL account code and a Bank Account instaed of defaulting to first on the list Modified Paths: -------------- trunk/Payments.php trunk/doc/Change.log.html Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2010-10-29 11:09:58 UTC (rev 4126) +++ trunk/Payments.php 2010-10-30 16:32:49 UTC (rev 4127) @@ -30,6 +30,13 @@ $_SESSION['PaymentDetail']->GLItemCounter = 1; } +if ((isset($_POST['UpdateHeader']) and $_POST['BankAccount']=='') or (isset($_POST['Process']) and $_POST['BankAccount']=='')) { + prnMsg(_('A bank account must be selected to make this payment from'), 'warn'); + $BankAccountEmpty=TRUE; +} else { + $BankAccountEmpty=FALSE; +} + //note this is already linked from this page //echo "<a href='" . $rootpath . '/SelectSupplier.php?' . SID . "'>" . _('Back to Suppliers') . '</a><br>'; @@ -218,6 +225,12 @@ exit; } + if ($_POST['BankAccount']=='') { + prnMsg( _('No bank account has been selected so this payment cannot be processed'),'warn'); + include('includes/footer.inc'); + exit; + } + /*Make an array of the defined bank accounts */ $SQL = 'SELECT bankaccounts.accountcode FROM bankaccounts, @@ -246,9 +259,9 @@ echo '<form method=post action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo _('Has the cheque been printed') . '?<br><br>'; - echo '<input type="hidden" name="CommitBatch" VALUE="' . $_POST['CommitBatch'] . '">'; - echo '<input type="submit" name="ChequePrinted" VALUE="' . _('Yes / Continue') . '"> '; - echo '<input type="submit" name="PaymentCancelled" VALUE="' . _('No / Cancel Payment') . '">'; + echo '<input type="hidden" name="CommitBatch" value="' . $_POST['CommitBatch'] . '">'; + echo '<input type="submit" name="ChequePrinted" value="' . _('Yes / Continue') . '"> '; + echo '<input type="submit" name="PaymentCancelled" value="' . _('No / Cancel Payment') . '">'; } else { //Start a transaction to do the whole lot inside @@ -280,7 +293,7 @@ amount, chequeno, tag) '; - $SQL= $SQL . "VALUES (1, + $SQL= $SQL . "valueS (1, '" . $TransNo . "', '" . FormatDateForSQL($_SESSION['PaymentDetail']->DatePaid) . "', '" . $PeriodNo . "', @@ -360,7 +373,7 @@ banktranstype, amount, currcode) - VALUES ('" . $ReceiptTransNo . "', + valueS ('" . $ReceiptTransNo . "', 2, '" . $PaymentItem->GLCode . "', '" . _('Act Transfer From ') . $_SESSION['PaymentDetail']->Account . ' - ' . $PaymentItem->Narrative . "', @@ -394,7 +407,7 @@ rate, ovamount, transtext) "; - $SQL = $SQL . "VALUES ('" . $TransNo . "', + $SQL = $SQL . "valueS ('" . $TransNo . "', 22, '" . $_SESSION['PaymentDetail']->SupplierID . "', '" . FormatDateForSQL($_SESSION['PaymentDetail']->DatePaid) . "', @@ -433,7 +446,7 @@ account, narrative, amount) "; - $SQL=$SQL . "VALUES ( + $SQL=$SQL . "valueS ( 22, '" . $TransNo . "', '" . FormatDateForSQL($_SESSION['PaymentDetail']->DatePaid) . "', @@ -455,7 +468,7 @@ account, narrative, amount) "; - $SQL=$SQL . "VALUES (22, + $SQL=$SQL . "valueS (22, '" . $TransNo . "', '" . FormatDateForSQL($_SESSION['PaymentDetail']->DatePaid) . "', '" . $PeriodNo . "', @@ -481,7 +494,7 @@ account, narrative, amount) "; - $SQL = $SQL . "VALUES ('" . $Transtype . "', + $SQL = $SQL . "valueS ('" . $Transtype . "', '" . $TransNo . "', '" . FormatDateForSQL($_SESSION['PaymentDetail']->DatePaid) . "', '" . $PeriodNo . "', @@ -509,7 +522,7 @@ banktranstype, amount, currcode) "; - $SQL= $SQL . "VALUES ('" . $TransNo . "', + $SQL= $SQL . "valueS ('" . $TransNo . "', '" . $Transtype . "', '" . $_SESSION['PaymentDetail']->Account . "', '" . $_SESSION['PaymentDetail']->Narrative . "', @@ -536,7 +549,7 @@ banktranstype, amount, currcode) "; - $SQL= $SQL . "VALUES ('" . $TransNo . "', + $SQL= $SQL . "valueS ('" . $TransNo . "', '" . $Transtype . "', '" . $_SESSION['PaymentDetail']->Account . "', '" . $_SESSION['PaymentDetail']->Narrative . "', @@ -592,12 +605,12 @@ } elseif (isset($_GET['Delete'])){ /* User hit delete the receipt entry from the batch */ $_SESSION['PaymentDetail']->Remove_GLItem($_GET['Delete']); -} elseif (isset($_POST['Process'])){ //user hit submit a new GL Analysis line into the payment +} elseif (isset($_POST['Process']) and !$BankAccountEmpty){ //user hit submit a new GL Analysis line into the payment $ChequeNoSQL='select account from gltrans where chequeno="'.$_POST['cheque'].'"'; $ChequeNoResult=DB_query($ChequeNoSQL, $db); - if ($_POST['GLManualCode']!="" AND is_numeric($_POST['GLManualCode'])){ + if (is_numeric($_POST['GLManualCode'])){ $SQL = "select accountname FROM chartmaster @@ -618,9 +631,12 @@ $myrow['accountname'], $_POST['tag'], $_POST['cheque']); + unset($_POST['GLManualCode']); } } else if (DB_num_rows($ChequeNoResult)!=0 and $_POST['cheque']!=''){ prnMsg( _('The cheque number has already been used') . ' - ' . _('This GL analysis item could not be added'),'error'); + } else if ($_POST['GLCode'] == '') { + prnMsg( _('No General Ledger code has been chosen') . ' - ' . _('so this GL analysis item could not be added'),'warn'); } else { $SQL = "select accountname FROM chartmaster WHERE accountcode='" . $_POST['GLCode'] . "'"; $Result=DB_query($SQL,$db); @@ -721,15 +737,13 @@ include('includes/footer.inc'); exit; } else { + echo '<option value=""></option>'; while ($myrow=DB_fetch_array($AccountsResults)){ /*list the bank account names */ - if (!isset($_POST['BankAccount']) AND $myrow['currcode']==$_SESSION['CompanyRecord']['currencydefault']){ - $_POST['BankAccount']=$myrow['accountcode']; - } - if ($_POST['BankAccount']==$myrow['accountcode']){ - echo '<option selectED VALUE="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode']; + if (isset($_POST['BankAccount']) and $_POST['BankAccount']==$myrow['accountcode']){ + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode']; } else { - echo '<option VALUE="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode']; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode']; } } echo '</select></td></tr>'; @@ -751,12 +765,12 @@ prnMsg( _('No currencies are defined yet. Payments cannot be entered until a currency is defined'),'error'); } else { while ($myrow=DB_fetch_array($result)){ - if ($_SESSION['PaymentDetail']->Currency==$myrow['currabrev']){ - echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['currency']; - } else { - echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['currency']; + if ($_SESSION['PaymentDetail']->Currency==$myrow['currabrev']){ + echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['currency']; + } else { + echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['currency']; + } } - } echo '</select></td><td><i>' . _('The transaction currency does not need to be the same as the bank account currency') . '</i></td></tr>'; } } else { /*its a supplier payment so it must be in the suppliers currency */ @@ -856,7 +870,7 @@ ORDER BY tagref'; $result=DB_query($SQL,$db); - echo '<option value=0>0 - None'; + echo '<option value=0></option'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['tag']) and $_POST['tag']==$myrow["tagref"]){ echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; @@ -872,7 +886,7 @@ echo '<tr><td>' . _('Enter GL Account Manually') . ':</td> <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="return inArray(this, this.value, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"' . - ' VALUE='. $_POST['GLManualCode'] .' ></td></tr>'; + ' value='. $_POST['GLManualCode'] .' ></td></tr>'; } else { echo '<tr><td>' . _('Enter GL Account Manually') . ':</td> <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="return inArray(this, this.value, GLCode.options,'. @@ -891,9 +905,10 @@ echo '</select></td></tr>'; prnMsg(_('No General ledger accounts have been set up yet') . ' - ' . _('payments cannot be analysed against GL accounts until the GL accounts are set up'),'error'); } else { + echo '<option value=""></option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['GLCode']) and $_POST['GLCode']==$myrow["accountcode"]){ - echo '<option selectED value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' - ' . $myrow['accountname']; + echo '<option selected value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' - ' . $myrow['accountname']; } else { echo '<option value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' - ' . $myrow['accountname']; } @@ -910,7 +925,7 @@ } if (isset($_POST['GLAmount'])) { - echo '<tr><td>' . _('Amount') . ' (' . $_SESSION['PaymentDetail']->Currency . '):</td><td><input type=Text Name="GLAmount" Maxlength=12 size=12 class=number VALUE=' . $_POST['GLAmount'] . '></td></tr>'; + echo '<tr><td>' . _('Amount') . ' (' . $_SESSION['PaymentDetail']->Currency . '):</td><td><input type=Text Name="GLAmount" Maxlength=12 size=12 class=number value=' . $_POST['GLAmount'] . '></td></tr>'; } else { echo '<tr><td>' . _('Amount') . ' (' . $_SESSION['PaymentDetail']->Currency . '):</td><td><input type=Text Name="GLAmount" Maxlength=12 size=12 class=number></td></tr>'; } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-29 11:09:58 UTC (rev 4126) +++ trunk/doc/Change.log.html 2010-10-30 16:32:49 UTC (rev 4127) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>29/10/10 Tim: Payments.php. Force the user to select a GL account code and a Bank Account instaed of defaulting to first on the list</p> <p>29/10/10 Tim: GLJournal.php. Force the user to select a GL account code instaed of defaulting to first on the list</p> <p>28/10/10 Tim: Fix bug # 3017709. When bulk transfers are received for controlled items serial numbers are required</p> <p>28/10/10 Tim: PcExpensesTypeTab.php - SQL quoting corrections and layout changes and improvements</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-30 16:43:25
|
Revision: 4128 http://web-erp.svn.sourceforge.net/web-erp/?rev=4128&view=rev Author: tim_schofield Date: 2010-10-30 16:43:18 +0000 (Sat, 30 Oct 2010) Log Message: ----------- If CustomerReceipt selected from the GL menu then go to GL receipts else customer receipts Modified Paths: -------------- trunk/CustomerReceipt.php trunk/doc/Change.log.html trunk/index.php Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2010-10-30 16:32:49 UTC (rev 4127) +++ trunk/CustomerReceipt.php 2010-10-30 16:43:18 UTC (rev 4128) @@ -26,6 +26,10 @@ $Cancel=1; } +if ($_GET['Type']=='GL') { + $_POST['GLEntry']=1; +} + if (!isset($_GET['Delete']) AND isset($_SESSION['ReceiptBatch'])){ //always process a header update unless deleting an item Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-30 16:32:49 UTC (rev 4127) +++ trunk/doc/Change.log.html 2010-10-30 16:43:18 UTC (rev 4128) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>29/10/10 Tim: index.php. If CustomerReceipt selected from the GL menu then go to GL receipts else customer receipts</p> <p>29/10/10 Tim: Payments.php. Force the user to select a GL account code and a Bank Account instaed of defaulting to first on the list</p> <p>29/10/10 Tim: GLJournal.php. Force the user to select a GL account code instaed of defaulting to first on the list</p> <p>28/10/10 Tim: Fix bug # 3017709. When bulk transfers are received for controlled items serial numbers are required</p> Modified: trunk/index.php =================================================================== --- trunk/index.php 2010-10-30 16:32:49 UTC (rev 4127) +++ trunk/index.php 2010-10-30 16:43:18 UTC (rev 4128) @@ -278,7 +278,7 @@ </tr> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/CustomerReceipt.php?' . SID . '&NewReceipt=Yes">' . _('Enter Receipts') . '</a></p>'; ?> + <?php echo '<p>• <a href="' . $rootpath . '/CustomerReceipt.php?' . SID . '&NewReceipt=Yes&Type=Customer">' . _('Enter Receipts') . '</a></p>'; ?> </td> </tr> <tr> @@ -1171,7 +1171,7 @@ </tr> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/CustomerReceipt.php?' . SID . '&NewReceipt=Yes">' . _('Bank Account Receipts Entry') . '</a></p>'; ?> + <?php echo '<p>• <a href="' . $rootpath . '/CustomerReceipt.php?' . SID . '&NewReceipt=Yes&Type=GL">' . _('Bank Account Receipts Entry') . '</a></p>'; ?> </td> </tr> <tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-31 18:31:23
|
Revision: 4130 http://web-erp.svn.sourceforge.net/web-erp/?rev=4130&view=rev Author: tim_schofield Date: 2010-10-31 18:31:16 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Force the user to select a GL account code and a Bank Account instaed of defaulting to first on the list Modified Paths: -------------- trunk/CustomerReceipt.php trunk/doc/Change.log.html Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2010-10-31 03:56:31 UTC (rev 4129) +++ trunk/CustomerReceipt.php 2010-10-31 18:31:16 UTC (rev 4130) @@ -26,10 +26,20 @@ $Cancel=1; } -if ($_GET['Type']=='GL') { +if (isset($_GET['Type']) and $_GET['Type']=='GL') { $_POST['GLEntry']=1; } +if ((isset($_POST['BatchInput']) and $_POST['BankAccount']=='') or (isset($_POST['Process']) and $_POST['BankAccount']=='')) { + echo '<br />'; + prnMsg(_('A bank account must be selected for this receipt'), 'warn'); + $BankAccountEmpty=TRUE; +} else if(isset($_GET['NewReceipt'])) { + $BankAccountEmpty=TRUE; +} else { + $BankAccountEmpty=FALSE; +} + if (!isset($_GET['Delete']) AND isset($_SESSION['ReceiptBatch'])){ //always process a header update unless deleting an item @@ -45,7 +55,7 @@ $_SESSION['ReceiptBatch']->BankAccountName = $myrow[0]; $_SESSION['ReceiptBatch']->AccountCurrency=$myrow[1]; unset($result); - } elseif (DB_num_rows($result)==0){ + } elseif (DB_num_rows($result)==0 and !$BankAccountEmpty){ prnMsg( _('The bank account number') . ' ' . $_POST['BankAccount'] . ' ' . _('is not set up as a bank account'),'error'); include ('includes/footer.inc'); exit; @@ -101,7 +111,7 @@ $SuggestedFunctionalExRate =1; $SuggestedExRate = $tableExRate; - } else { + } else if (!$BankAccountEmpty) { /*To illustrate the rates required Take an example functional currency NZD receipt in USD from an AUD bank account 1 NZD = 0.80 USD @@ -149,7 +159,10 @@ $_POST['CustomerName']=''; } - $_SESSION['ReceiptBatch']->add_to_batch($_POST['Amount'], + if ($_POST['GLCode'] == '' and $_GET['Type']=='GL') { + prnMsg( _('No General Ledger code has been chosen') . ' - ' . _('so this GL analysis item could not be added'),'warn'); + } else { + $_SESSION['ReceiptBatch']->add_to_batch($_POST['Amount'], $_POST['CustomerID'], $_POST['Discount'], $_POST['Narrative'], @@ -158,8 +171,9 @@ $_POST['CustomerName'], $_POST['tag']); - /*Make sure the same receipt is not double processed by a page refresh */ - $Cancel = 1; + /*Make sure the same receipt is not double processed by a page refresh */ + $Cancel = 1; + } } if (isset($Cancel)){ @@ -235,10 +249,14 @@ $k=1; } + $SQL = "select accountname FROM chartmaster WHERE accountcode='" . $ReceiptItem->GLCode . "'"; + $Result=DB_query($SQL,$db); + $myrow=DB_fetch_array($Result); + echo '<td>'.$_SESSION['ReceiptBatch']->BatchNo.'</td> <td>'.$_SESSION['ReceiptBatch']->DateBanked.'</td> <td>'.$ReceiptItem->CustomerName.'</td> - <td>'.$ReceiptItem->GLCode.'</td> + <td>'.$ReceiptItem->GLCode.' - '.$myrow['accountname'].'</td> <td class=number>'.number_format($ReceiptItem->Amount/$_SESSION['ReceiptBatch']->ExRate/$_SESSION['ReceiptBatch']->FunctionalExRate,2) .'</td>'; if ($ReceiptItem->GLCode ==''){ @@ -508,8 +526,6 @@ $DbgMsg = _('The SQL that failed was'); $result = DB_Txn_Commit($db); - echo '<p>'; - prnMsg( _('Receipt batch') . ' ' . $_SESSION['ReceiptBatch']->BatchNo . ' ' . _('has been successfully entered into the database'),'success'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . '<a href="' . $rootpath . '/PDFBankingSummary.php?BatchNo=' . $_SESSION['ReceiptBatch']->BatchNo . '">' . _('Print PDF Batch Summary') . '</a></p>'; @@ -687,7 +703,7 @@ /*set up the form whatever */ -echo '<form action=' . $_SERVER['PHP_SELF'] . ' method=post name=form1>'; +echo '<form action=' . $_SERVER['PHP_SELF'] . '?Type='.$_GET['Type'] . ' method=post name=form1>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*show the batch header details and the entries in the batch so far */ @@ -704,8 +720,12 @@ $DbgMsg = _('The SQL used to retrieve the bank accounts was'); $AccountsResults = DB_query($SQL,$db,$ErrMsg,$DbgMsg); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Enter Receipt') . '" alt="">' . ' ' . _('Enter Customer Receipt') . '</p>'; -echo '<div class="page_help_text">' . _('To enter a payment TO a customer (ie. to pay out a credit note), enter a negative payment amount.') . '</div>'; +if (isset($_POST['GLEntry'])) { + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Enter Receipt') . '" alt="">' . ' ' . _('General Ledger Receipt Entry') . '</p>'; +} else { + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Enter Receipt') . '" alt="">' . ' ' . _('Enter Customer Receipt') . '</p>'; + echo '<div class="page_help_text">' . _('To enter a payment TO a customer (ie. to pay out a credit note), enter a negative payment amount.') . '</div>'; +} echo '<br><table class=selection><tr><td>' . _('Bank Account') . ':</td> <td><select tabindex=1 name="BankAccount" onChange="ReloadForm(form1.BatchInput)">'; @@ -715,12 +735,9 @@ include('includes/footer.inc'); exit; } else { + echo '<option value=""></option>'; while ($myrow=DB_fetch_array($AccountsResults)){ /*list the bank account names */ - if (!isset($_SESSION['ReceiptBatch']->Account) AND $myrow['currcode']==$_SESSION['CompanyRecord']['currencydefault']){ - //default to the first account in the functional currency of the business in the list of accounts returned - $_SESSION['ReceiptBatch']->Account=$myrow['accountcode']; - } if ($_SESSION['ReceiptBatch']->Account==$myrow['accountcode']){ echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode'] . '</option>'; } else { @@ -814,31 +831,39 @@ } echo '<tr><td>' . _('Narrative') . ':</td><td><input tabindex=7 type="text" name="BatchNarrative" maxlength=50 size=52 value="' . $_SESSION['ReceiptBatch']->Narrative . '"></td></tr>'; echo '<tr><td colspan=3><div class="centre"><input tabindex=8 type=submit name="BatchInput" Value="' . _('Accept') . '"></div></td></tr>'; -echo '</table> - <hr>'; +echo '</table><br />'; if (isset($_SESSION['ReceiptBatch'])){ /* Now show the entries made so far */ + if (!$BankAccountEmpty) { + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Banked') . + '" alt="">' . ' ' . $_SESSION['ReceiptBatch']->ReceiptType . ' - ' . _('Banked into the') . " " . + $_SESSION['ReceiptBatch']->BankAccountName . ' ' . _('on') . ' ' . $_SESSION['ReceiptBatch']->DateBanked . '</p>'; + } - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Banked') . '" alt="">' . ' ' . $_SESSION['ReceiptBatch']->ReceiptType . ' - ' . _('Banked into the') . " " . $_SESSION['ReceiptBatch']->BankAccountName . ' ' . _('on') . ' ' . $_SESSION['ReceiptBatch']->DateBanked . '</p>'; - echo '<table width="90%" class=selection><tr> <th>' . _('Amount') . ' ' . _('Received') . '</th> <th>' . _('Discount') . '</th> <th>' . _('Customer') . '</th> <th>' . _('GL Code') . '</th> + <th>' . _('Narrative') . '</th> </tr>'; $BatchTotal = 0; foreach ($_SESSION['ReceiptBatch']->Items as $ReceiptItem) { + $SQL = "select accountname FROM chartmaster WHERE accountcode='" . $ReceiptItem->GLCode . "'"; + $Result=DB_query($SQL,$db); + $myrow=DB_fetch_array($Result); + echo '<tr> <td class=number>' . number_format($ReceiptItem->Amount,2) . '</td> <td class=number>' . number_format($ReceiptItem->Discount,2) . '</td> <td>' . stripslashes($ReceiptItem->CustomerName) . '</td> - <td>' . $ReceiptItem->GLCode . "</td> - <td><a href='" . $_SERVER['PHP_SELF'] . '?' . SID . '&Delete=' . $ReceiptItem->ID . "'>" . _('Delete') . '</a></td> + <td>'.$ReceiptItem->GLCode.' - '.$myrow['accountname'].'</td> + <td>'.$ReceiptItem->Narrative . "</td> + <td><a href='" . $_SERVER['PHP_SELF'] . '?' . SID . '&Delete=' . $ReceiptItem->ID . "&Type=".$_GET['Type']."'>" . _('Delete') . '</a></td> </tr>'; $BatchTotal= $BatchTotal + $ReceiptItem->Amount; @@ -907,9 +932,9 @@ if (isset($_POST['GLEntry']) AND isset($_SESSION['ReceiptBatch'])){ /* Set up a heading for the transaction entry for a GL Receipt */ + echo '<br /><table class=selection>'; + echo '<th colspan=2><font size=2 color=navy>' . _('General Ledger Receipt Entry') . '</font></th>'; - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Banked') . '" alt=""> ' . _('General Ledger Receipt Entry') . '</font><table class=selection>'; - //Select the tag echo '<tr><td>' . _('Select Tag') . ':</td><td><select name="tag">'; @@ -919,7 +944,7 @@ ORDER BY tagref'; $result=DB_query($SQL,$db); - echo '<option value=0>0 - None'; + echo '<option value=0></option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['tag']) and $_POST['tag']==$myrow["tagref"]){ echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; @@ -937,6 +962,7 @@ if (DB_num_rows($result)==0){ echo '</select>' . _('No General ledger accounts have been set up yet') . ' - ' . _('receipts cannot be entered against GL accounts until the GL accounts are set up') . '</td></tr>'; } else { + echo '<option value=""></option>'; while ($myrow=DB_fetch_array($result)){ if ($_POST['GLCode']==$myrow['accountcode']){ echo '<option selected value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; @@ -994,9 +1020,9 @@ } elseif (isset($_SESSION['ReceiptBatch']) && !isset($_POST['GLEntry'])){ /*Show the form to select a customer */ - echo '<b>'; + echo '<br />'; - echo $msg; + echo prnMsg($msg, 'warn'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Select a Customer') . '</b>'; echo '<table cellpadding=3 colspan=4 class=selection>'; echo '<tr><td>' . _('Text in the Customer') . ' ' . '<b>' . _('name') . '</b>:</td>'; @@ -1010,7 +1036,7 @@ echo '</tr></table>'; echo '<div class="centre"><br>'; echo '<input tabindex=11 type=submit name="Search" value="' . _('Search Now') . '">'; - echo '<br/><br/><input tabindex=12 type=submit name="GLEntry" value="' . _('Enter A GL Receipt') . '">'; + echo '<br/><br/><input tabindex=12 type=submit name="GLEntry" value="' . _('Enter A GL Receipt') . '"><br />'; if (count($_SESSION['ReceiptBatch']->Items) > 0){ echo '<br/><br/><input tabindex=13 type=submit name="CommitBatch" VALUE="' . _('Accept and Process Batch') . '"></div>'; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-31 03:56:31 UTC (rev 4129) +++ trunk/doc/Change.log.html 2010-10-31 18:31:16 UTC (rev 4130) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>29/10/10 Tim: CustomerReceipt.php. Force the user to select a GL account code and a Bank Account instaed of defaulting to first on the list</p> <p>29/10/10 Tim: index.php. If CustomerReceipt selected from the GL menu then go to GL receipts else customer receipts</p> <p>29/10/10 Tim: Payments.php. Force the user to select a GL account code and a Bank Account instaed of defaulting to first on the list</p> <p>29/10/10 Tim: GLJournal.php. Force the user to select a GL account code instaed of defaulting to first on the list</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-31 19:01:45
|
Revision: 4131 http://web-erp.svn.sourceforge.net/web-erp/?rev=4131&view=rev Author: tim_schofield Date: 2010-10-31 19:01:39 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Force the user to select a GL account code instaed of defaulting to first on the list Modified Paths: -------------- trunk/SuppTransGLAnalysis.php trunk/doc/Change.log.html Modified: trunk/SuppTransGLAnalysis.php =================================================================== --- trunk/SuppTransGLAnalysis.php 2010-10-31 18:31:16 UTC (rev 4130) +++ trunk/SuppTransGLAnalysis.php 2010-10-31 19:01:39 UTC (rev 4131) @@ -32,15 +32,20 @@ $_POST['GLCode'] = $_POST['AcctSelection']; } + if ($_POST['GLCode'] == ''){ + prnMsg( _('You must select a general ledger code from the list below') ,'warn'); + $InputError = True; + } + $sql = "SELECT accountcode, accountname FROM chartmaster WHERE accountcode='" . $_POST['GLCode'] . "'"; $result = DB_query($sql, $db); - if (DB_num_rows($result) == 0){ + if (DB_num_rows($result) == 0 and $_POST['GLCode'] != ''){ prnMsg(_('The account code entered is not a valid code') . '. ' . _('This line cannot be added to the transaction') . '.<br>' . _('You can use the selection box to select the account you want'),'error'); $InputError = True; - } else { + } else if ($_POST['GLCode'] != '') { $myrow = DB_fetch_row($result); $GLActName = $myrow[1]; if (!is_numeric($_POST['Amount'])){ @@ -146,7 +151,7 @@ $sql = 'SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode'; $result = DB_query($sql, $db); - +echo '<option value=""></option>'; while ($myrow = DB_fetch_array($result)) { if ($myrow['accountcode'] == $_POST['AcctSelection']) { echo '<option selected VALUE='; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-31 18:31:16 UTC (rev 4130) +++ trunk/doc/Change.log.html 2010-10-31 19:01:39 UTC (rev 4131) @@ -1,6 +1,7 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> -<p>29/10/10 Tim: CustomerReceipt.php. Force the user to select a GL account code and a Bank Account instaed of defaulting to first on the list</p> +<p>31/10/10 Tim: SuppTransGLAnalysis.php. Force the user to select a GL account code instaed of defaulting to first on the list</p> +<p>31/10/10 Tim: CustomerReceipt.php. Force the user to select a GL account code and a Bank Account instaed of defaulting to first on the list</p> <p>29/10/10 Tim: index.php. If CustomerReceipt selected from the GL menu then go to GL receipts else customer receipts</p> <p>29/10/10 Tim: Payments.php. Force the user to select a GL account code and a Bank Account instaed of defaulting to first on the list</p> <p>29/10/10 Tim: GLJournal.php. Force the user to select a GL account code instaed of defaulting to first on the list</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-31 20:23:40
|
Revision: 4132 http://web-erp.svn.sourceforge.net/web-erp/?rev=4132&view=rev Author: tim_schofield Date: 2010-10-31 20:23:34 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Minor bug fixes Modified Paths: -------------- trunk/SuppTransGLAnalysis.php trunk/doc/Change.log.html Modified: trunk/SuppTransGLAnalysis.php =================================================================== --- trunk/SuppTransGLAnalysis.php 2010-10-31 19:01:39 UTC (rev 4131) +++ trunk/SuppTransGLAnalysis.php 2010-10-31 20:23:34 UTC (rev 4132) @@ -99,6 +99,7 @@ </tr>'; echo $TableHeader; $TotalGLValue=0; +$i=0; foreach ( $_SESSION['SuppTrans']->GLCodes as $EnteredGLCode){ @@ -143,6 +144,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=""> </tr>'; echo '<tr> <td>' . _('Account Selection') . ':<br>(' . _('If you know the code enter it above') . '<br>' . _('otherwise select the account from the list') . ')</td> Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-31 19:01:39 UTC (rev 4131) +++ trunk/doc/Change.log.html 2010-10-31 20:23:34 UTC (rev 4132) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>31/10/10 Tim: SuppTransGLAnalysis.php. Minor bug fixes</p> <p>31/10/10 Tim: SuppTransGLAnalysis.php. Force the user to select a GL account code instaed of defaulting to first on the list</p> <p>31/10/10 Tim: CustomerReceipt.php. Force the user to select a GL account code and a Bank Account instaed of defaulting to first on the list</p> <p>29/10/10 Tim: index.php. If CustomerReceipt selected from the GL menu then go to GL receipts else customer receipts</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-11-02 12:54:25
|
Revision: 4136 http://web-erp.svn.sourceforge.net/web-erp/?rev=4136&view=rev Author: tim_schofield Date: 2010-11-02 12:54:19 +0000 (Tue, 02 Nov 2010) Log Message: ----------- Correction to work with debtors that have a - in the code Modified Paths: -------------- trunk/SelectCustomer.php trunk/doc/Change.log.html Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2010-11-02 02:59:35 UTC (rev 4135) +++ trunk/SelectCustomer.php 2010-11-02 12:54:19 UTC (rev 4136) @@ -253,7 +253,7 @@ if (!isset($_POST['Select'])) { $_POST['Select'] = ""; } -$Debtor=explode('-', $_POST['Select']); +$Debtor=explode(' ', $_POST['Select']); if ($_POST['Select'] != "" or ($_SESSION['CustomerID'] != "" and !isset($_POST['Keywords']) and !isset($_POST['CustCode']) and !isset($_POST['CustType']) and !isset($_POST['CustPhone']))) { if ($_POST['Select'] != "") { $SQL = "SELECT brname, phoneno FROM custbranch WHERE debtorno='" . $Debtor[0] . "'"; @@ -487,7 +487,7 @@ echo '<tr class="OddTableRows">'; $k = 1; } - echo "<td><font size=1><input type=submit name='Select' value='" . $myrow['debtorno'].'-'.$myrow['branchcode'] . "'></font></td> + echo "<td><font size=1><input type=submit name='Select' value='" . $myrow['debtorno'].' '.$myrow['branchcode'] . "'></font></td> <td><font size=1>" . $myrow['name'] . "</font></td> <td><font size=1>" . $myrow['brname'] . "</font></td> <td><font size=1>" . $myrow['contactname'] . "</font></td> Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-11-02 02:59:35 UTC (rev 4135) +++ trunk/doc/Change.log.html 2010-11-02 12:54:19 UTC (rev 4136) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>02/11/10 Tim: SelectCustomer.php. Correction to work with debtors that have a - in the code</p> <p>31/10/10 Tim: SuppTransGLAnalysis.php. Minor bug fixes</p> <p>31/10/10 Tim: SuppTransGLAnalysis.php. Force the user to select a GL account code instaed of defaulting to first on the list</p> <p>31/10/10 Tim: CustomerReceipt.php. Force the user to select a GL account code and a Bank Account instaed of defaulting to first on the list</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2010-11-04 06:18:02
|
Revision: 4138 http://web-erp.svn.sourceforge.net/web-erp/?rev=4138&view=rev Author: daintree Date: 2010-11-04 06:17:56 +0000 (Thu, 04 Nov 2010) Log Message: ----------- Poul PurchData find supplier name Modified Paths: -------------- trunk/PurchData.php trunk/api/api_branches.php trunk/api/api_customers.php Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2010-11-02 13:40:16 UTC (rev 4137) +++ trunk/PurchData.php 2010-11-04 06:17:56 UTC (rev 4138) @@ -257,7 +257,7 @@ suppliers.address1, suppliers.address2, suppliers.address3 - FROM suppliers WHERE suppliers.suppname " . LIKE ."'" . $SearchString . "'"; + FROM suppliers WHERE suppliers.suppname " . LIKE ."'%" . $SearchString . "%'"; } elseif (strlen($_POST['SupplierCode']) > 0) { $SQL = "SELECT suppliers.supplierid, suppliers.suppname, Modified: trunk/api/api_branches.php =================================================================== --- trunk/api/api_branches.php 2010-11-02 13:40:16 UTC (rev 4137) +++ trunk/api/api_branches.php 2010-11-04 06:17:56 UTC (rev 4138) @@ -499,14 +499,12 @@ $DebtorNumber . '";'; $result = api_DB_query($sql, $db); if (DB_error_no($db) != 0) - $Errors[0] = DatabaseUpdateFailed; - else - { - $Errors[0] = 0; // Signal data may follow. - while ($myrow = DB_fetch_row($result)) - { - $Errors[] = $myrow[0]; - } + $Errors[0] = DatabaseUpdateFailed; + else { + $Errors[0] = 0; // Signal data may follow. + while ($myrow = DB_fetch_row($result)) { + $Errors[] = $myrow[0]; + } } return $Errors; @@ -528,15 +526,13 @@ } $sql='SELECT * FROM custbranch WHERE debtorno="'.$DebtorNumber.'" and branchcode="'.$BranchCode.'"'; $result = api_DB_Query($sql, $db); - if (DB_error_no($db) != 0 ) + if (DB_error_no($db) != 0 ) { $Errors[0] = DatabaseUpdateFailed; - else - { + } else { $Errors[0] = 0; if (DB_num_rows($result) > 0) $Errors += DB_fetch_array($result); } - return $Errors; } Modified: trunk/api/api_customers.php =================================================================== --- trunk/api/api_customers.php 2010-11-02 13:40:16 UTC (rev 4137) +++ trunk/api/api_customers.php 2010-11-04 06:17:56 UTC (rev 4138) @@ -514,7 +514,7 @@ } $sql='SELECT * FROM debtorsmaster WHERE debtorno="'.$DebtorNumber.'"'; $result = DB_Query($sql, $db); - $Errors[0] = 0; // None found. + $Errors[0] = 0; // None found. $Errors[1] = DB_fetch_array($result); return $Errors; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-11-05 10:45:51
|
Revision: 4139 http://web-erp.svn.sourceforge.net/web-erp/?rev=4139&view=rev Author: tim_schofield Date: 2010-11-05 10:45:43 +0000 (Fri, 05 Nov 2010) Log Message: ----------- Poul Bjerre-Jensen: SelectProduct.php,PurchData.php. Add in Minimum order quantity to Purchasing data Modified Paths: -------------- trunk/PurchData.php trunk/SelectProduct.php trunk/doc/Change.log.html Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2010-11-04 06:17:56 UTC (rev 4138) +++ trunk/PurchData.php 2010-11-05 10:45:43 UTC (rev 4139) @@ -1,6 +1,13 @@ <?php +/************************************************************/ +/*To deploy this revised version take the following steps: */ +/*1. Add field called MinOrderQty as Int to purchdata */ +/*2. Copy this code on top of the standard PurchData.php */ +/*3. Copy the revised SelectProduct.php over the existing */ +/* pbj 11/3/2010 */ +/************************************************************/ -/* $Id$*/ +/* $Id: PurchData.php 3952 2010-09-30 15:22:14Z tim_schofield $*/ $PageSecurity = 4; @@ -53,6 +60,11 @@ unset($_POST['LeadTime']); prnMsg(_('The lead time entered was not numeric') . ' (' . _('a number is expected') . ') - ' . _('no changes have been made to the database'), 'error'); } + if (!is_numeric($_POST['MinOrderQty'])) { + $InputError = 1; + unset($_POST['LeadTime']); + prnMsg(_('The lead time entered was not numeric') . ' (' . _('a number is expected') . ') - ' . _('no changes have been made to the database'), 'error'); + } if (!is_numeric($_POST['ConversionFactor'])) { $InputError = 1; unset($_POST['ConversionFactor']); @@ -68,6 +80,7 @@ supplierdescription, suppliers_partno, leadtime, + MinOrderQty, preferred) VALUES ('" . $SupplierID . "', '" . $StockID . "', @@ -78,6 +91,7 @@ '" . $_POST['SupplierDescription'] . "', '" . $_POST['SupplierCode'] . "', '" . $_POST['LeadTime'] . "', + '" . $_POST['MinOrderQty'] . "', '" . $_POST['Preferred'] . "')"; $ErrMsg = _('The supplier purchasing details could not be added to the database because'); $DbgMsg = _('The SQL that failed was'); @@ -93,6 +107,7 @@ supplierdescription='" . $_POST['SupplierDescription'] . "', suppliers_partno='" . $_POST['SupplierCode'] . "', leadtime='" . $_POST['LeadTime'] . "', + MinOrderQty='" . $_POST['MinOrderQty'] . "', preferred='" . $_POST['Preferred'] . "' WHERE purchdata.stockid='".$StockID."' AND purchdata.supplierno='".$SupplierID."' @@ -114,6 +129,7 @@ unset($_POST['LeadTime']); unset($_POST['Preferred']); unset($_POST['SupplierCode']); + unset($_POST['MinOrderQty']); unset($SuppName); } } @@ -140,6 +156,7 @@ purchdata.supplierdescription, purchdata.leadtime, purchdata.suppliers_partno, + purchdata.MinOrderQty, purchdata.preferred FROM purchdata INNER JOIN suppliers ON purchdata.supplierno=suppliers.supplierid @@ -159,6 +176,7 @@ <th>' . _('Currency') . '</th> <th>' . _('Effective From') . '</th> <th>' . _('Supplier Unit') . '</th> + <th>' . _('Min Order Qty') . '</th> <th>' . _('Lead Time') . '</th> <th>' . _('Preferred') . '</th> </tr>'; @@ -186,11 +204,12 @@ <td>%s</td> <td>%s</td> <td>%s</td> + <td>%s</td> <td class=number>%s " . _('days') . "</td> <td>%s</td> <td><a href='%s?%s&StockID=%s&SupplierID=%s&Edit=1&EffectiveFrom=%s'>" . _('Edit') . "</a></td> <td><a href='%s?%s&StockID=%s&SupplierID=%s&Delete=1&EffectiveFrom=%s' onclick=\"return confirm('" . _('Are you sure you wish to delete this suppliers price?') . "');\">" . _('Delete') . "</a></td> - </tr>", $myrow['suppname'], number_format($myrow['price'], 3), $myrow['currcode'], ConvertSQLDate($myrow['effectivefrom']), $myrow['unitname'], $myrow['leadtime'], $DisplayPreferred, $_SERVER['PHP_SELF'], SID, $StockID, $myrow['supplierno'], $myrow['effectivefrom'], $_SERVER['PHP_SELF'], SID, $StockID, $myrow['supplierno'], $myrow['effectivefrom']); + </tr>", $myrow['suppname'], number_format($myrow['price'], 3), $myrow['currcode'], ConvertSQLDate($myrow['effectivefrom']), $myrow['unitname'],$myrow['MinOrderQty'], $myrow['leadtime'], $DisplayPreferred, $_SERVER['PHP_SELF'], SID, $StockID, $myrow['supplierno'], $myrow['effectivefrom'], $_SERVER['PHP_SELF'], SID, $StockID, $myrow['supplierno'], $myrow['effectivefrom']); } //end of while loop echo '</table><br/>'; if ($CountPreferreds > 1) { @@ -257,7 +276,7 @@ suppliers.address1, suppliers.address2, suppliers.address3 - FROM suppliers WHERE suppliers.suppname " . LIKE ."'%" . $SearchString . "%'"; + FROM suppliers WHERE suppliers.suppname LIKE " ."'".$SearchString."'"; } elseif (strlen($_POST['SupplierCode']) > 0) { $SQL = "SELECT suppliers.supplierid, suppliers.suppname, @@ -345,6 +364,7 @@ purchdata.leadtime, purchdata.conversionfactor, purchdata.suppliers_partno, + purchdata.MinOrderQty, purchdata.preferred, stockmaster.units FROM purchdata INNER JOIN suppliers @@ -366,6 +386,7 @@ $_POST['LeadTime'] = $myrow['leadtime']; $_POST['ConversionFactor'] = $myrow['conversionfactor']; $_POST['Preferred'] = $myrow['preferred']; + $_POST['MinOrderQty'] = $myrow['MinOrderQty']; $_POST['SupplierCode'] = $myrow['suppliers_partno']; $stockuom=$myrow['units']; } @@ -409,6 +430,9 @@ if (!isset($_POST['SupplierCode'])) { $_POST['SupplierCode'] = ''; } + if (!isset($_POST['MinOrderQty'])) { + $_POST['MinOrderQty'] = ''; + } echo '<tr><td>' . _('Currency') . ':</td> <td><input type=hidden name="CurrCode" . VALUE="' . $CurrCode . '">' . $CurrCode . '</td></tr>'; echo '<tr><td>' . _('Price') . ' (' . _('in Supplier Currency') . '):</td> @@ -438,6 +462,8 @@ <td><input type=text class=number name="ConversionFactor" maxlength=12 size=12 VALUE=' . $_POST['ConversionFactor'] . '></td></tr>'; echo '<tr><td>' . _('Supplier Stock Code') . ':</td> <td><input type=text name="SupplierCode" maxlength=15 size=15 VALUE="' . $_POST['SupplierCode'] . '"></td></tr>'; + echo '<tr><td>' . _('MinOrderQty') . ':</td> + <td><input type=text name="MinOrderQty" maxlength=15 size=15 VALUE="' . $_POST['MinOrderQty'] . '"></td></tr>'; echo '<tr><td>' . _('Supplier Stock Description') . ':</td> <td><input type=text name="SupplierDescription" maxlength=50 size=51 VALUE="' . $_POST['SupplierDescription'] . '"></td></tr>'; if (!isset($_POST['LeadTime']) OR $_POST['LeadTime'] == "") { Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2010-11-04 06:17:56 UTC (rev 4138) +++ trunk/SelectProduct.php 2010-11-05 10:45:43 UTC (rev 4139) @@ -1,5 +1,5 @@ <?php -/* $Id$*/ +/* $Id: SelectProduct.php 3971 2010-09-30 15:27:57Z tim_schofield $*/ $PageSecurity = 2; $PricesSecurity = 12; include ('includes/session.inc'); @@ -321,6 +321,7 @@ <th width="5%">' . _('Curr') . '</th> <th width="15%">' . _('Eff Date') . '</th> <th width="10%">' . _('Lead Time') . '</th> + <th width="10%">' . _('Min Order Qty') . '</th> <th width="5%">' . _('Prefer') . '</th></tr>'; $SuppResult = DB_query("SELECT suppliers.suppname, suppliers.currcode, @@ -329,6 +330,7 @@ purchdata.effectivefrom, purchdata.leadtime, purchdata.conversionfactor, + purchdata.MinOrderQty, purchdata.preferred FROM purchdata INNER JOIN suppliers ON purchdata.supplierno=suppliers.supplierid @@ -339,7 +341,9 @@ <td class=select>' . number_format($SuppRow['price'] / $SuppRow['conversionfactor'], 2) . '</td> <td class=select>' . $SuppRow['currcode'] . '</td> <td class=select>' . ConvertSQLDate($SuppRow['effectivefrom']) . '</td> - <td class=select>' . $SuppRow['leadtime'] . '</td>'; + <td class=select>' . $SuppRow['leadtime'] . '</td> + <td class=select>' . $SuppRow['MinOrderQty'] . '</td>'; + switch ($SuppRow['preferred']) { /* 2008-08-19 ToPu */ case 1: Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-11-04 06:17:56 UTC (rev 4138) +++ trunk/doc/Change.log.html 2010-11-05 10:45:43 UTC (rev 4139) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>02/11/10 Poul Bjerre-Jensen: SelectProduct.php,PurchData.php. Add in Minimum order quantity to Purchasing data</p> <p>02/11/10 Tim: SelectCustomer.php. Correction to work with debtors that have a - in the code</p> <p>31/10/10 Tim: SuppTransGLAnalysis.php. Minor bug fixes</p> <p>31/10/10 Tim: SuppTransGLAnalysis.php. Force the user to select a GL account code instaed of defaulting to first on the list</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-11-05 10:48:21
|
Revision: 4140 http://web-erp.svn.sourceforge.net/web-erp/?rev=4140&view=rev Author: tim_schofield Date: 2010-11-05 10:48:14 +0000 (Fri, 05 Nov 2010) Log Message: ----------- Make the Minimum order quantity field numeric only Modified Paths: -------------- trunk/PurchData.php trunk/doc/Change.log.html Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2010-11-05 10:45:43 UTC (rev 4139) +++ trunk/PurchData.php 2010-11-05 10:48:14 UTC (rev 4140) @@ -463,7 +463,7 @@ echo '<tr><td>' . _('Supplier Stock Code') . ':</td> <td><input type=text name="SupplierCode" maxlength=15 size=15 VALUE="' . $_POST['SupplierCode'] . '"></td></tr>'; echo '<tr><td>' . _('MinOrderQty') . ':</td> - <td><input type=text name="MinOrderQty" maxlength=15 size=15 VALUE="' . $_POST['MinOrderQty'] . '"></td></tr>'; + <td><input type=text class=number name="MinOrderQty" maxlength=15 size=15 VALUE="' . $_POST['MinOrderQty'] . '"></td></tr>'; echo '<tr><td>' . _('Supplier Stock Description') . ':</td> <td><input type=text name="SupplierDescription" maxlength=50 size=51 VALUE="' . $_POST['SupplierDescription'] . '"></td></tr>'; if (!isset($_POST['LeadTime']) OR $_POST['LeadTime'] == "") { Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-11-05 10:45:43 UTC (rev 4139) +++ trunk/doc/Change.log.html 2010-11-05 10:48:14 UTC (rev 4140) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>02/11/10 Tim: PurchData.php. Make the Minimum order quantity field numeric only</p> <p>02/11/10 Poul Bjerre-Jensen: SelectProduct.php,PurchData.php. Add in Minimum order quantity to Purchasing data</p> <p>02/11/10 Tim: SelectCustomer.php. Correction to work with debtors that have a - in the code</p> <p>31/10/10 Tim: SuppTransGLAnalysis.php. Minor bug fixes</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-11-05 11:03:11
|
Revision: 4141 http://web-erp.svn.sourceforge.net/web-erp/?rev=4141&view=rev Author: tim_schofield Date: 2010-11-05 11:03:04 +0000 (Fri, 05 Nov 2010) Log Message: ----------- Change the standard order quantities to agree with Minimum order qty Modified Paths: -------------- trunk/SelectProduct.php trunk/doc/Change.log.html trunk/sql/mysql/upgrade3.11.1-4.00.sql Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2010-11-05 10:48:14 UTC (rev 4140) +++ trunk/SelectProduct.php 2010-11-05 11:03:04 UTC (rev 4141) @@ -330,7 +330,7 @@ purchdata.effectivefrom, purchdata.leadtime, purchdata.conversionfactor, - purchdata.MinOrderQty, + purchdata.minorderqty, purchdata.preferred FROM purchdata INNER JOIN suppliers ON purchdata.supplierno=suppliers.supplierid @@ -342,7 +342,7 @@ <td class=select>' . $SuppRow['currcode'] . '</td> <td class=select>' . ConvertSQLDate($SuppRow['effectivefrom']) . '</td> <td class=select>' . $SuppRow['leadtime'] . '</td> - <td class=select>' . $SuppRow['MinOrderQty'] . '</td>'; + <td class=select>' . $SuppRow['minorderqty'] . '</td>'; switch ($SuppRow['preferred']) { /* 2008-08-19 ToPu */ @@ -353,7 +353,8 @@ echo '<td class=select>' . _('No') . '</td>'; break; } - echo '<td class=select><a href="' . $rootpath . '/PO_Header.php?' . SID . '&NewOrder=Yes' . '&SelectedSupplier=' . $SuppRow['supplierid'] . '&StockID=' . $StockID . '&Quantity=1">' . _('Order') . ' </a></td>'; + echo '<td class=select><a href="' . $rootpath . '/PO_Header.php?' . SID . '&NewOrder=Yes' . '&SelectedSupplier=' . + $SuppRow['supplierid'] . '&StockID=' . $StockID . '&Quantity='.$SuppRow['minorderqty'].'">' . _('Order') . ' </a></td>'; echo '</tr>'; } echo '</tr></table></td>'; @@ -402,7 +403,8 @@ echo '<br>'; $SuppResult = DB_query("SELECT suppliers.suppname, suppliers.supplierid, - purchdata.preferred + purchdata.preferred, + purchdata.minorderqty FROM purchdata INNER JOIN suppliers ON purchdata.supplierno=suppliers.supplierid WHERE purchdata.stockid = '" . $StockID . "'", $db); @@ -410,11 +412,12 @@ /**/ // if ($myrow['eoq'] == 0) { - $EOQ = 1; + $EOQ = $SuppRow['minorderqty']; } else { $EOQ = $myrow['eoq']; } - echo '<a href="' . $rootpath . '/PO_Header.php?' . SID . '&NewOrder=Yes' . '&SelectedSupplier=' . $SuppRow['supplierid'] . '&StockID=' . $StockID . '&Quantity=' . $EOQ . '">' . _('Purchase this Item from') . ' ' . $SuppRow['suppname'] . ' (default)</a><br>'; + echo '<a href="' . $rootpath . '/PO_Header.php?' . SID . '&NewOrder=Yes' . '&SelectedSupplier=' . $SuppRow['supplierid'] . + '&StockID=' . $StockID . '&Quantity=' . $EOQ . '">' . _('Purchase this Item from') . ' ' . $SuppRow['suppname'] . ' (default)</a><br>'; /**/ } /* end of while */ } /* end of $myrow['mbflag'] == 'B' */ Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-11-05 10:48:14 UTC (rev 4140) +++ trunk/doc/Change.log.html 2010-11-05 11:03:04 UTC (rev 4141) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>02/11/10 Tim: SelectProduct.php. Change the standard order quantities to agree with Minimum order qty</p> <p>02/11/10 Tim: PurchData.php. Make the Minimum order quantity field numeric only</p> <p>02/11/10 Poul Bjerre-Jensen: SelectProduct.php,PurchData.php. Add in Minimum order quantity to Purchasing data</p> <p>02/11/10 Tim: SelectCustomer.php. Correction to work with debtors that have a - in the code</p> Modified: trunk/sql/mysql/upgrade3.11.1-4.00.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-4.00.sql 2010-11-05 10:48:14 UTC (rev 4140) +++ trunk/sql/mysql/upgrade3.11.1-4.00.sql 2010-11-05 11:03:04 UTC (rev 4141) @@ -263,7 +263,7 @@ ALTER TABLE `prices` ADD `startdate` DATE NOT NULL DEFAULT '0000-00-00' , ADD `enddate` DATE NOT NULL DEFAULT '9999-12-31'; ALTER TABLE prices DROP PRIMARY KEY , ADD PRIMARY KEY ( `stockid` , `typeabbrev` , `currabrev` , `debtorno` , `branchcode`, `startdate` , `enddate` ) ; - +ALTER TABLE purchdata ADD column minorderqty int(11) NOT NULL default 1; UPDATE prices SET startdate='1999-01-01', enddate=''; ALTER TABLE stockcheckfreeze ADD COLUMN stockcheckdate date NOT NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |