From: <dai...@us...> - 2011-10-25 07:55:01
|
Revision: 4732 http://web-erp.svn.sourceforge.net/web-erp/?rev=4732&view=rev Author: daintree Date: 2011-10-25 07:54:55 +0000 (Tue, 25 Oct 2011) Log Message: ----------- number_formats Modified Paths: -------------- trunk/MRPReschedules.php trunk/MRPShortages.php trunk/OffersReceived.php trunk/OutstandingGRNs.php Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2011-10-25 07:38:22 UTC (rev 4731) +++ trunk/MRPReschedules.php 2011-10-25 07:54:55 UTC (rev 4732) @@ -121,23 +121,36 @@ $title=_('MRP Reschedule Reporting'); include('includes/header.inc'); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' - . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; + echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' + . _('Stock') . '" alt="" />' . ' ' . $title . ' + </p>'; - echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"> - <table class=selection>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; - echo '<option selected value="yes">' . _('Print With Alternating Highlighted Lines'); - echo '<option value="no">' . _('Plain Print'); - echo '</select></td></tr>'; - echo '<tr><td>' . _('Selection') . ':</td><td><select name="Selection">'; - echo '<option selected value="All">' . _('All').'</option>'; - echo '<option value="WO">' . _('Work Orders Only').'</option>'; - echo '<option value="PO">' . _('Purchase Orders Only').'</option>'; - echo '</select></td></tr>'; - echo '</table><br />'; - echo '<div class="centre"><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; + echo '<br /> + <br /> + <form action="' . $_SERVER['PHP_SELF'] . '" method="post"> + <table class="selection"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <tr> + <td>' . _('Print Option') . ':</td> + <td><select name="Fill"> + <option selected value="yes">' . _('Print With Alternating Highlighted Lines') . '</option> + <option value="no">' . _('Plain Print') . '</option> + </select></td> + </tr> + <tr> + <td>' . _('Selection') . ':</td> + <td><select name="Selection"> + <option selected value="All">' . _('All').'</option> + <option value="WO">' . _('Work Orders Only').'</option> + <option value="PO">' . _('Purchase Orders Only').'</option> + </select></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type=submit name="PrintPDF" value="' . _('Print PDF') . '"> + </div>'; include('includes/footer.inc'); Modified: trunk/MRPShortages.php =================================================================== --- trunk/MRPShortages.php 2011-10-25 07:38:22 UTC (rev 4731) +++ trunk/MRPShortages.php 2011-10-25 07:54:55 UTC (rev 4732) @@ -323,7 +323,7 @@ $YPos -=$line_height; if ($_POST['ReportType'] == 'Shortage'){ -$pdf->addTextWrap($Left_Margin,$YPos,300,$FontSize,_('MRP Shortages Report')); + $pdf->addTextWrap($Left_Margin,$YPos,300,$FontSize,_('MRP Shortages Report')); }else{ $pdf->addTextWrap($Left_Margin,$YPos,300,$FontSize,_('MRP Excess Report')); } @@ -350,8 +350,8 @@ $pdf->addTextWrap(360,$YPos,50,$FontSize,_('Supply'), 'right'); $pdf->addTextWrap(410,$YPos,50,$FontSize,_('Demand'), 'right'); if ($_POST['ReportType'] == 'Shortage'){ -$pdf->addTextWrap(460,$YPos,50,$FontSize,_('Shortage'), 'right'); -$pdf->addTextWrap(510,$YPos,60,$FontSize,_('Ext. Shortage'), 'right'); + $pdf->addTextWrap(460,$YPos,50,$FontSize,_('Shortage'), 'right'); + $pdf->addTextWrap(510,$YPos,60,$FontSize,_('Ext. Shortage'), 'right'); }else{ $pdf->addTextWrap(460,$YPos,50,$FontSize,_('Excess'), 'right'); $pdf->addTextWrap(510,$YPos,60,$FontSize,_('Ext. Excess'), 'right'); Modified: trunk/OffersReceived.php =================================================================== --- trunk/OffersReceived.php 2011-10-25 07:38:22 UTC (rev 4731) +++ trunk/OffersReceived.php 2011-10-25 07:54:55 UTC (rev 4732) @@ -42,52 +42,62 @@ _('Select Supplier') . '" alt="" />' . ' ' . _('Select Supplier') . '</p>'; echo '<form method="post" action="' . $_SERVER['PHP_SELF'] .'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection>'; - echo '<tr><td>'._('Select Supplier').'</td>'; - echo '<td><select name=supplierid>'; + echo '<table class="selection"> + <tr> + <td>'._('Select Supplier').'</td> + <td><select name=supplierid>'; while ($myrow=DB_fetch_array($result)) { echo '<option value="'.$myrow['supplierid'].'">'.$myrow['suppname'].'</option>'; } - echo '</select></td></tr>'; - echo '<tr><td colspan=12><div class="centre"><input type=submit name=select value=' . _('Enter Information') . '></div></td></tr>'; - echo '</table>'; - echo '</form>'; + echo '</select></td> + </tr> + <tr><td colspan="12"> + <div class="centre"> + <input type=submit name=select value=' . _('Enter Information') . '> + </div> + </td> + </tr> + </table> + </form>'; } } if (!isset($_POST['submit']) and isset($_POST['supplierid'])) { $sql = "SELECT offers.offerid, - offers.tenderid, - offers.supplierid, - suppliers.suppname, - offers.stockid, - stockmaster.description, - offers.quantity, - offers.uom, - offers.price, - offers.expirydate, - offers.currcode, - stockmaster.decimalplaces - FROM offers - LEFT JOIN purchorderauth - ON offers.currcode=purchorderauth.currabrev - LEFT JOIN suppliers - ON suppliers.supplierid=offers.supplierid - LEFT JOIN stockmaster - ON stockmaster.stockid=offers.stockid - WHERE purchorderauth.userid='".$_SESSION['UserID']."' - AND offers.expirydate>'".date('Y-m-d')."' - AND offers.supplierid='".$_POST['supplierid']."' - ORDER BY offerid"; + offers.tenderid, + offers.supplierid, + suppliers.suppname, + offers.stockid, + stockmaster.description, + offers.quantity, + offers.uom, + offers.price, + offers.expirydate, + offers.currcode, + stockmaster.decimalplaces, + currencies.decimalplaces AS currdecimalplaces + FROM offers INNER JOIN purchorderauth + ON offers.currcode=purchorderauth.currabrev + INNER JOIN suppliers + ON suppliers.supplierid=offers.supplierid + INNER JOIN currencies + ON suppliers.currcode=currencies.currabrev + LEFT JOIN stockmaster + ON stockmaster.stockid=offers.stockid + WHERE purchorderauth.userid='" . $_SESSION['UserID'] . "' + AND offers.expirydate>'" . date('Y-m-d') . "' + AND offers.supplierid='" . $_POST['supplierid'] . "' + ORDER BY offerid"; $result=DB_query($sql, $db); echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . - _('Supplier Offers') . '" alt="" />' . ' ' . _('Supplier Offers') . '</p>'; + echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Supplier Offers') . '" alt="" />' . ' ' . _('Supplier Offers') . ' + </p>'; - echo '<table class=selection> + echo '<table class="selection"> <tr> <th>'._('Offer ID').'</th> <th>'._('Supplier').'</th> @@ -100,7 +110,8 @@ <th>'._('Offer Expires').'</th> <th>'._('Accept').'</th> <th>'._('Reject').'</th> - <th>'._('Defer').'</th></tr>'; + <th>'._('Defer').'</th> + </tr>'; $k=0; while ($myrow=DB_fetch_array($result)) { @@ -114,20 +125,27 @@ echo '<td>'.$myrow['offerid'].'</td> <td>'.$myrow['suppname'].'</td> <td>'.$myrow['description'].'</td> - <td class=number>'.locale_number_format($myrow['quantity'],$myrow['decimalplaces']).'</td> + <td class="number">'.locale_number_format($myrow['quantity'],$myrow['decimalplaces']).'</td> <td>'.$myrow['uom'].'</td> - <td class=number>'.locale_number_format($myrow['price'],2).'</td> - <td class=number>'.locale_number_format($myrow['price']*$myrow['quantity'],2).'</td> + <td class="number">'.locale_number_format($myrow['price'],$myrow['currdecimalplaces']).'</td> + <td class="number">'.locale_number_format($myrow['price']*$myrow['quantity'],$myrow['currdecimalplaces']).'</td> <td>'.$myrow['currcode'].'</td> <td>'.$myrow['expirydate'].'</td> - <td><input type="radio" name="action'.$myrow['offerid'].'" value="1"></td> - <td><input type="radio" name="action'.$myrow['offerid'].'" value="2"></td> - <td><input type="radio" checked name="action'.$myrow['offerid'].'" value="3"></td> - <td><input type="hidden" name="supplierid" value="'.$myrow['supplierid'].'"></td> + <td><input type="radio" name="action'.$myrow['offerid'].'" value="1" /></td> + <td><input type="radio" name="action'.$myrow['offerid'].'" value="2" /></td> + <td><input type="radio" checked name="action'.$myrow['offerid'].'" value="3" /></td> + <td><input type="hidden" name="supplierid" value="'.$myrow['supplierid'].'" /></td> </tr>'; } - echo '<tr><td colspan=12><div class="centre"><input type="submit" name="submit" value=' . _('Enter Information') . '></div></td></tr>'; - echo '</form></table>'; + echo '<tr> + <td colspan="12"> + <div class="centre"> + <input type="submit" name="submit" value=' . _('Enter Information') . '> + </div> + </td> + </tr> + </form> + </table>'; } else if(isset($_POST['submit']) and isset($_POST['supplierid'])) { include ('includes/htmlMimeMail.php'); $accepts=array(); @@ -196,24 +214,22 @@ $myrow=DB_fetch_array($result); $MailText.=$myrow['description']."\t"._('Quantity').' '.$myrow['quantity']."\t"._('Price').' '. locale_number_format($myrow['price'])."\n"; - $sql="INSERT INTO purchorderdetails ( - orderno, - itemcode, - deliverydate, - itemdescription, - unitprice, - actprice, - quantityord, - suppliersunit) - VALUES ( - '".$OrderNo."', - '".$myrow['stockid']."', - '".date('Y-m-d')."', - '".$myrow['description']."', - '".$myrow['price']."', - '".$myrow['price']."', - '".$myrow['quantity']."', - '".$myrow['uom']."')"; + $sql="INSERT INTO purchorderdetails (orderno, + itemcode, + deliverydate, + itemdescription, + unitprice, + actprice, + quantityord, + suppliersunit) + VALUES ('".$OrderNo."', + '".$myrow['stockid']."', + '".date('Y-m-d')."', + '".$myrow['description']."', + '".$myrow['price']."', + '".$myrow['price']."', + '".$myrow['quantity']."', + '".$myrow['uom']."')"; $result=DB_query($sql, $db); $sql="DELETE FROM offers WHERE offerid='".$AcceptID."'"; $result=DB_query($sql, $db); Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2011-10-25 07:38:22 UTC (rev 4731) +++ trunk/OutstandingGRNs.php 2011-10-25 07:54:55 UTC (rev 4732) @@ -164,13 +164,20 @@ <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('From Supplier Code') . ':</td> - <td><input type="text" name="FromCriteria" value="0"></td></tr>'; - echo '<tr><td>' . _('To Supplier Code'). ':</td> - <td><input type="text" name="ToCriteria" value="zzzzzzz"></td></tr>'; + echo '<tr> + <td>' . _('From Supplier Code') . ':</td> + <td><input type="text" name="FromCriteria" value="0"></td> + </tr> + <tr> + <td>' . _('To Supplier Code'). ':</td> + <td><input type="text" name="ToCriteria" value="zzzzzzz"></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type=Submit Name="PrintPDF" value="' . _('Print PDF') . '"> + </div>'; - echo '</table><br /><div class="centre"><input type=Submit Name="PrintPDF" value="' . _('Print PDF') . '"></div>'; - include('includes/footer.inc'); } /*end of else not PrintPDF */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |