From: <tim...@us...> - 2010-07-17 20:19:33
|
Revision: 3631 http://web-erp.svn.sourceforge.net/web-erp/?rev=3631&view=rev Author: tim_schofield Date: 2010-07-17 20:19:27 +0000 (Sat, 17 Jul 2010) Log Message: ----------- SQL quoting and layout changes Modified Paths: -------------- trunk/OutstandingGRNs.php trunk/doc/Change.log.html trunk/includes/PDFOstdgGRNsPageHeader.inc Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2010-07-17 19:26:07 UTC (rev 3630) +++ trunk/OutstandingGRNs.php 2010-07-17 20:19:27 UTC (rev 3631) @@ -16,12 +16,12 @@ include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Outstanding GRNs Report')); $pdf->addInfo('Subject',_('Outstanding GRNs Valuation')); - $FontSize=10; + $FontSize=10; $PageNumber=1; $line_height=12; $Left_Margin=30; - /*Now figure out the data to report for the criteria under review */ + /*Now figure out the data to report for the criteria under review */ $SQL = "SELECT grnno, orderno, @@ -42,7 +42,7 @@ AND qtyrecd-quantityinv <>0 AND grns.supplierid >='" . $_POST['FromCriteria'] . "' AND grns.supplierid <='" . $_POST['ToCriteria'] . "' - ORDER BY supplierid, + ORDER BY supplierid, grnno"; $GRNsResult = DB_query($SQL,$db,'','',false,false); @@ -53,7 +53,7 @@ prnMsg(_('The outstanding GRNs valuation details could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); echo "<br><a href='" .$rootpath ."/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$SQL"; + echo "<br>".$SQL; } include('includes/footer.inc'); exit; @@ -65,7 +65,7 @@ prnMsg(_('No outstanding GRNs valuation details retrieved'), 'warn'); echo "<br><a href='" .$rootpath ."/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$SQL"; + echo "<br>$SQL"; } include('includes/footer.inc'); exit; @@ -97,7 +97,7 @@ } $YPos -=$line_height; - $LeftOvers = $pdf->addTextWrap(30,$YPos,40,$FontSize,$GRNs['grnno']); + $LeftOvers = $pdf->addTextWrap(32,$YPos,40,$FontSize,$GRNs['grnno']); $LeftOvers = $pdf->addTextWrap(70,$YPos,40,$FontSize,$GRNs['orderno']); $LeftOvers = $pdf->addTextWrap(110,$YPos,200,$FontSize,$GRNs['itemcode'] . ' - ' . $GRNs['itemdescription']); $DisplayStdCost = number_format($GRNs['stdcostunit'],2); @@ -146,14 +146,14 @@ $pdfcode = $pdf->output(); $len = strlen($pdfcode); - if ($len<=20){ + if ($len<=20){ $title = _('Outstanding GRNs Valuation Error'); include('includes/header.inc'); prnMsg(_('There were no GRNs with any value to print out for the specified supplier range'),'info'); echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; - } else { + } else { header('Content-type: application/pdf'); header('Content-Length: ' . $len); header('Content-Disposition: inline; filename=OSGRNsValuation.pdf'); @@ -162,26 +162,29 @@ header('Pragma: public'); $pdf->Output('OutstandingGRNs.pdf','I'); - } + } */ - $pdf->OutputD($_SESSION['DatabaseName'] . '_OSGRNsValuation_' . date('Y-m-d').'.pdf');//UldisN - $pdf->__destruct(); //UldisN + $pdf->OutputD($_SESSION['DatabaseName'] . '_OSGRNsValuation_' . date('Y-m-d').'.pdf');//UldisN + $pdf->__destruct(); //UldisN } else { /*The option to print PDF was not hit */ $title=_('Outstanding GRNs Report'); include('includes/header.inc'); - echo '<form action=' . $_SERVER['PHP_SELF'] . " method='POST'><table>"; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . + '" alt="">' . ' ' . $title . '</p>'; + echo '<form action=' . $_SERVER['PHP_SELF'] . " method='POST'><table class=selection>"; + echo '<tr><td>' . _('From Supplier Code') . ":</td> - <td><input type=TEXT name='FromCriteria' VALUE='0'></td></tr>"; + <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>"; + <td><input type=text name='ToCriteria' value='zzzzzzz'></td></tr>"; - echo "</table><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 */ -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-07-17 19:26:07 UTC (rev 3630) +++ trunk/doc/Change.log.html 2010-07-17 20:19:27 UTC (rev 3631) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>17/07/10 Tim: OutstandingGRNs.php - SQL quoting and layout changes</p> <p>17/07/10 Tim: SelectCompletedOrder.php - SQL quoting and layout changes</p> <p>17/07/10 Tim: OrderDetails.php - SQL quoting and layout changes</p> <p>17/07/10 Tim: OffersReceived.php - SQL quoting and provide confirmation message at the end</p> Modified: trunk/includes/PDFOstdgGRNsPageHeader.inc =================================================================== --- trunk/includes/PDFOstdgGRNsPageHeader.inc 2010-07-17 19:26:07 UTC (rev 3630) +++ trunk/includes/PDFOstdgGRNsPageHeader.inc 2010-07-17 20:19:27 UTC (rev 3631) @@ -24,10 +24,16 @@ $pdf->line($Left_Margin, $YPos+10,$Page_Width-$Right_Margin, $YPos+10); $pdf->line($Page_Width-$Right_Margin, $YPos-$line_height,$Page_Width-$Right_Margin, $YPos+10); +/*Draw a rectangle to put the details in */ + +$pdf->line($Left_Margin, $Page_Height-$YPos-$line_height,$Page_Width-$Right_Margin, $Page_Height-$YPos-$line_height); +$pdf->line($Left_Margin, $Page_Height-$YPos-$line_height,$Left_Margin, $YPos+10); +$pdf->line($Page_Width-$Right_Margin, $Page_Height-$YPos-$line_height,$Page_Width-$Right_Margin, $YPos+10); + /*set up the headings */ $Xpos = $Left_Margin+1; -$LeftOvers = $pdf->addTextWrap(30,$YPos,40,$FontSize,_('GRN'), 'centre'); +$LeftOvers = $pdf->addTextWrap(32,$YPos,40,$FontSize,_('GRN'), 'centre'); $LeftOvers = $pdf->addTextWrap(70,$YPos,40,$FontSize,_('Order') . ' #', 'centre'); $LeftOvers = $pdf->addTextWrap(110,$YPos,200,$FontSize,_('Item') . ' / ' . _('Description'), 'centre'); $LeftOvers = $pdf->addTextWrap(310,$YPos,50,$FontSize,_('Qty Recd'), 'centre'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |