From: <dai...@us...> - 2011-11-16 07:04:31
|
Revision: 4746 http://web-erp.svn.sourceforge.net/web-erp/?rev=4746&view=rev Author: daintree Date: 2011-11-16 07:04:20 +0000 (Wed, 16 Nov 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/AgedDebtors.php trunk/Customers.php trunk/Prices_Customer.php trunk/StockAdjustments.php trunk/StockSerialItems.php trunk/doc/Change.log trunk/doc/Manual/ManualContributors.html trunk/doc/README.txt trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/LanguageSetup.php trunk/includes/session.inc trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/ReportCreator.php Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/AgedDebtors.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -46,7 +46,7 @@ THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END ) AS due, - Sum( + SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") @@ -57,7 +57,7 @@ ELSE 0 END END ) AS overdue1, - Sum( + SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays2'] . ") @@ -92,7 +92,7 @@ holdreasons.dissallowinvoices, holdreasons.reasondescription HAVING - Sum(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc) <>0"; + ABS(SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)) >0.005"; } elseif ($_POST['All_Or_Overdues']=='OverduesOnly') { @@ -165,7 +165,7 @@ debtorsmaster.creditlimit, holdreasons.dissallowinvoices, holdreasons.reasondescription - HAVING Sum( + HAVING SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") @@ -176,7 +176,7 @@ THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END - ) > 0"; + ) > 0.01"; } elseif ($_POST['All_Or_Overdues']=='HeldOnly'){ @@ -254,13 +254,12 @@ debtorsmaster.creditlimit, holdreasons.dissallowinvoices, holdreasons.reasondescription - HAVING Sum( + HAVING ABS(SUM( debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - - debtortrans.alloc - ) <>0"; + debtortrans.alloc)) >0.005"; } $CustomerResult = DB_query($SQL,$db,'','',False,False); /*dont trap errors handled below*/ Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/Customers.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -501,18 +501,27 @@ <td><input tabindex=10 type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" value="' . $DateString . '" size=12 maxlength=10></td></tr>'; echo '</table></td> - <td><table class="selection">'; - - echo '<tr><td>' . _('Discount Percent') . ':</td> - <td><input tabindex=11 type="textbox" class="number" name="Discount" value=0 size=5 maxlength=4></td></tr>'; - echo '<tr><td>' . _('Discount Code') . ':</td> - <td><input tabindex=12 type="text" name="DiscountCode" size=3 maxlength=2></td></tr>'; - echo '<tr><td>' . _('Payment Discount Percent') . ':</td> - <td><input tabindex=13 type="textbox" class ="number" name="PymtDiscount" value=0 size=5 maxlength=4></td></tr>'; - echo '<tr><td>' . _('Credit Limit') . ':</td> - <td><input tabindex=14 type="text" class="number" name="CreditLimit" value=' . $_SESSION['DefaultCreditLimit'] . ' size=16 maxlength=14></td></tr>'; - echo '<tr><td>' . _('Tax Reference') . ':</td> - <td><input tabindex=15 type="text" name="TaxRef" size=22 maxlength=20></td></tr>'; + <td><table class="selection"> + <tr> + <td>' . _('Discount Percent') . ':</td> + <td><input tabindex="11" type="textbox" class="number" name="Discount" value=0 size="5" maxlength="4" /></td> + </tr> + <tr> + <td>' . _('Discount Code') . ':</td> + <td><input tabindex="12" type="text" name="DiscountCode" size="3" maxlength="2" /></td> + </tr> + <tr> + <td>' . _('Payment Discount Percent') . ':</td> + <td><input tabindex="13" type="textbox" class ="number" name="PymtDiscount" value="0" size="5" maxlength="4" /></td> + </tr> + <tr> + <td>' . _('Credit Limit') . ':</td> + <td><input tabindex="14" type="text" class="number" name="CreditLimit" value="' . locale_number_format($_SESSION['DefaultCreditLimit'],0) . '" size="16" maxlength="14" /></td> + </tr> + <tr> + <td>' . _('Tax Reference') . ':</td> + <td><input tabindex=15 type="text" name="TaxRef" size="22" maxlength="20" /></td> + </tr>'; $result=DB_query("SELECT terms, termsindicator FROM paymentterms",$db); if (DB_num_rows($result)==0){ @@ -520,8 +529,9 @@ echo '<tr><td colspan=2>' . prnMsg(_('There are no payment terms currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; } else { - echo '<tr><td>' . _('Payment Terms') . ':</td> - <td><select tabindex=15 name="PaymentTerms">'; + echo '<tr> + <td>' . _('Payment Terms') . ':</td> + <td><select tabindex=15 name="PaymentTerms">'; while ($myrow = DB_fetch_array($result)) { echo '<option value="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; @@ -530,12 +540,16 @@ echo '</select></td></tr>'; } - echo '<tr><td>' . _('Credit Status') . ':</td><td><select tabindex=16 name="HoldReason">'; + echo '<tr> + <td>' . _('Credit Status') . ':</td> + <td><select tabindex="16" name="HoldReason">'; $result=DB_query("SELECT reasoncode, reasondescription FROM holdreasons",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<tr><td colspan=2>' . prnMsg(_('There are no credit statuses currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; + echo '<tr> + <td colspan="2">' . prnMsg(_('There are no credit statuses currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td> + </tr>'; } else { while ($myrow = DB_fetch_array($result)) { echo '<option value="'. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; @@ -547,7 +561,9 @@ $result=DB_query("SELECT currency, currabrev FROM currencies",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<tr><td colspan=2>' . prnMsg(_('There are no currencies currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; + echo '<tr> + <td colspan="2">' . prnMsg(_('There are no currencies currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td> + </tr>'; } else { if (!isset($_POST['CurrCode'])){ $CurrResult = DB_query("SELECT currencydefault FROM companies WHERE coycode=1",$db); @@ -573,8 +589,8 @@ echo '<tr> <td>' . _('Customer PO Line on SO') . ':</td> <td><select tabindex="18" name="CustomerPOLine"> - <option selected value=0>' . _('No') . '</option> - <option value=1>' . _('Yes') . '</option> + <option selected value="0">' . _('No') . '</option> + <option value="1">' . _('Yes') . '</option> </select> </td> </tr> @@ -957,11 +973,11 @@ <td>' . _('Invoice Addressing') . ':</td> <td><select name="AddrInvBranch">'; if ($_POST['InvAddrBranch']==0){ - echo '<option selected value=0>' . _('Address to HO') . '</option>'; - echo '<option value=1>' . _('Address to Branch') . '</option>'; + echo '<option selected value="0">' . _('Address to HO') . '</option>'; + echo '<option value="1">' . _('Address to Branch') . '</option>'; } else { - echo '<option value=0>' . _('Address to HO') . '</option>'; - echo '<option selected value=1>' . _('Address to Branch') . '</option>'; + echo '<option value="0">' . _('Address to HO') . '</option>'; + echo '<option selected value="1">' . _('Address to Branch') . '</option>'; } } @@ -1009,7 +1025,7 @@ <th>' . _('Email') . '</th> <th>' . _('Notes') . '</th> <th>' . _('Edit') . '</th> - <th colspan="2"><input type="Submit" name="AddContact" value="' . _('Add Contact') . '" /></th> + <th colspan="2"><input type="submit" name="AddContact" value="' . _('Add Contact') . '" /></th> </tr>'; } $k=0; //row colour counter Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/Prices_Customer.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -7,7 +7,8 @@ debtorsmaster.currcode, debtorsmaster.salestype, currencies.decimalplaces AS currdecimalplaces - FROM debtorsmaster + FROM debtorsmaster INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev WHERE debtorsmaster.debtorno='" . $_SESSION['CustomerID'] . "'",$db); $myrow = DB_fetch_array($result); @@ -267,15 +268,16 @@ $EndDateDisplay = ConvertSQLDate($myrow['enddate']); } echo '<tr bgcolor="#CCCCCC"> - <td class="number">'.locale_number_format($myrow['price'],$CurrDecimalPlaces).'</td> - <td>' . $Branch.'</td> - <td>'.$myrow['units'].'</td> - <td class="number">'.$myrow['conversionfactor'].'</td> - <td>'.ConvertSQLDate($myrow['startdate']).'</td> - <td>'.$EndDateDisplay.'</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. - '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td></tr>'; + <td class="number">'.locale_number_format($myrow['price'],$CurrDecimalPlaces).'</td> + <td>' . $Branch.'</td> + <td>'.$myrow['units'].'</td> + <td class="number">'.$myrow['conversionfactor'].'</td> + <td>'.ConvertSQLDate($myrow['startdate']).'</td> + <td>'.$EndDateDisplay.'</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. + '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td> + </tr>'; } //END WHILE LIST LOOP Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/StockAdjustments.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -27,7 +27,8 @@ $result = DB_query("SELECT description, controlled, serialised, - decimalplaces + decimalplaces, + perishable FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db); $myrow = DB_fetch_array($result); @@ -213,13 +214,14 @@ loccode, serialno, qualitytext, - quantity) + quantity, + expirationdate) VALUES ('" . $_SESSION['Adjustment']->StockID . "', '" . $_SESSION['Adjustment']->StockLocation . "', '" . $Item->BundleRef . "', '', - '" . $Item->BundleQty . "' - )"; + '" . $Item->BundleQty . "', + '" . FormatDateForSQL($Item->ExpiryDate) ."')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); $DbgMsg = _('The following SQL to update the serial stock item record was used'); @@ -471,4 +473,4 @@ echo '</div></form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/StockSerialItems.php =================================================================== --- trunk/StockSerialItems.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/StockSerialItems.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -85,7 +85,7 @@ <th colspan="11"><font color="navy" size="2">' . $StockID .'-'. $Description .'</b> (' . _('In units of') . ' ' . $UOM . ')</font></th> </tr>'; -if ($Serialised == 1){ +if ($Serialised == 1 and $Perishable==0){ $tableheader = '<tr> <th>' . _('Serial Number') . '</th> <th></th> @@ -93,6 +93,15 @@ <th></th> <th>' . _('Serial Number') . '</th> </tr>'; +} else if ($Serialised == 1 and $Perishable==1){ + $tableheader = '<tr> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + </tr>'; } else if ($Serialised == 0 and $Perishable==0){ $tableheader = '<tr> <th>' . _('Batch/Bundle Ref') . '</th> @@ -136,9 +145,12 @@ $TotalQuantity += $myrow['quantity']; - if ($Serialised == 1){ + if ($Serialised == 1 and $Perishable==0){ echo '<td>'.$myrow['serialno'].'</td>'; echo '<th></th>'; + } else if ($Serialised == 1 and $Perishable==1) { + echo '<td>'.$myrow['serialno'].'</td> + echo '<td>' . ConvertSQLDate($myrow['expirationdate']). '</td>'; } else if ($Serialised == 0 and $Perishable==0) { echo '<td>'.$myrow['serialno'].'</td> <td class="number">'.locale_number_format($myrow['quantity'],$DecimalPlaces).'</td>'; @@ -168,4 +180,4 @@ echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/Change.log 2011-11-16 07:04:20 UTC (rev 4746) @@ -1,5 +1,11 @@ webERP Change Log +16/11/11 Phil: Prices_Customer.php sql error had neglected to include currencies table to get the number of decimalplaces to show +16/11/11 Phil: reportwriter/WriteReport.inc modified to use OutputD function in class.pdf.inc +15/11/11 Phil: includes/LanguageSetup.php was not including LanguagesArray.php in reportwriter as PathPrefix was not prepended +14/11/11 Don Grames: AgedDebtors.php now ignores balances with an absolute value of < 0.005 +14/11/11 Dafydd Crosby: Allow serialised perishible items to have expiration dates. + 13/11/11 Release 4.06RC2 12/11/11 Phil: Purchase order Order_Value in includes/DefinePOClass.php now only looks at the value of lines left on the order after deleted lines Modified: trunk/doc/Manual/ManualContributors.html =================================================================== --- trunk/doc/Manual/ManualContributors.html 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/Manual/ManualContributors.html 2011-11-16 07:04:20 UTC (rev 4746) @@ -17,6 +17,8 @@ <br /><br /> Danie Brink <br /><br /> +Daffyd Crosby +<br /><br /> Phil Daintree <br /><br /> Murray Dancey Modified: trunk/doc/README.txt =================================================================== --- trunk/doc/README.txt 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/README.txt 2011-11-16 07:04:20 UTC (rev 4746) @@ -4,7 +4,7 @@ Version 4.x of webERP -Now fully utf-8 compatible. Now reports can be created in any language using the utf-8 character set, the resultant pdf reports use Adobe CID fonts and the fonts that come with the Adobe Acrobat reader on client computers. This avoids the problem of large pdf downloads on the creation of reports as the alternative is to bundle the enormous utf-8 fonts with the reports. +Now fully utf-8 compatible. Now reports can be created in any language using the utf-8 character set, the resultant pdf reports use Adobe CID fonts and the fonts that come with the Adobe Acrobat reader on client computers. This avoids the problem of large pdf downloads on the creation of reports as the alternative is to bundle the enormous utf-8 fonts with the reports. Also, this release comes with an automated database upgrade system, so that database changes in later versions will be applied automatically on upgrade of the scripts. @@ -38,7 +38,7 @@ DEVELOPING -Contributions of code are documents including HOW-TOs with screen-shots etc are encouraged. Contributions in the form of bug reports or other feedback through the mainling lists above are also encouraged. +Contributions of code are documents including HOW-TOs with screen-shots etc are encouraged. This can be done directly on the wiki at http://www.weberp.org by any registered user of the wiki. Contributions in the form of bug reports or other feedback through the mainling lists above are also encouraged. Guidelines for contributing code are in the document at http://www.weberp.org/wikidocs/ContributingtowebERP developers should read this document carefully and follow the guidelines therein. Standards and conventions used in the code are rigorously applied in the interests of consistency and readability. Code submitted that does not conform to these standards will be changed so it does where possible. If the job to make the code conform to webERP standards is too large then the code will not be included. TRANSLATIONS Modified: trunk/includes/InputSerialItems.php =================================================================== --- trunk/includes/InputSerialItems.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/InputSerialItems.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -95,9 +95,16 @@ $myrow=DB_fetch_array($result); $Perishable=$myrow['perishable']; if ($LineItem->Serialised==1){ - $tableheader .= '<tr> - <th>'. _('Serial No').'</th> - </tr>'; + if ($Perishable==0) { + $tableheader .= '<tr> + <th>'. _('Serial No'). '</th> + </tr>'; + } else { + $tableheader .= '<tr> + <th>'. _('Serial No'). '</th> + <th>'. _('Expiry Date'). '<th> + </tr>'; + } } else if ($LineItem->Serialised==0 AND $Perishable==1){ $tableheader = '<tr> <th>'. _('Batch/Roll/Bundle'). ' #</th> @@ -119,4 +126,4 @@ } else { /*KEYED or BARCODE */ include('includes/InputSerialItemsKeyed.php'); } -?> \ No newline at end of file +?> Modified: trunk/includes/InputSerialItemsKeyed.php =================================================================== --- trunk/includes/InputSerialItemsKeyed.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/InputSerialItemsKeyed.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -49,10 +49,10 @@ echo '<td>' . $Bundle->BundleRef . '</td>'; - if ($LineItem->Serialised==0 and $Perishable==0){ + if ($LineItem->Serialised==0){ echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; - } else if ($LineItem->Serialised==0 and $Perishable==1){ - echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; + } + if ($Perishable==1){ echo '<td class="number">' . $Bundle->ExpiryDate . '</td>'; } echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'&identifier='.$identifier.'">'. _('Delete'). '</a></td> @@ -129,7 +129,12 @@ into the form for entry of quantities manually */ if ($LineItem->Serialised==1){ - echo '<input type=hidden name="Qty' . ($StartAddingAt+$i) .'" value=1></td></tr>'; + if ($Perishable==0) { + echo '<input type="hidden" name="Qty' . ($StartAddingAt+$i) .'" value="1" /></tr>'; + } else { + echo '<td><input type="hidden" name="Qty' . ($StartAddingAt+$i) .'" value="1" /><input type="text" class="date" name="ExpiryDate' . ($StartAddingAt+$i) .'" size="11" + value="" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" /></td></tr>'; + } } else if ($LineItem->Serialised==0 and $Perishable==1) { echo '<td><input type="text" class="number" name="Qty' . ($StartAddingAt+$i) .'" size=11 maxlength="10" /></td>'; echo '<td><input type="text" class="date" name="ExpiryDate' . ($StartAddingAt+$i) .'" size=11 @@ -159,4 +164,4 @@ document.Ga6uF5Wa.SerialNo0.focus(); //]]> </script>'; /*end of nested table */ -?> \ No newline at end of file +?> Modified: trunk/includes/LanguageSetup.php =================================================================== --- trunk/includes/LanguageSetup.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/LanguageSetup.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -60,9 +60,9 @@ return $text; } } - include('includes/LanguagesArray.php'); + include($PathPrefix . 'includes/LanguagesArray.php'); } else { - include('includes/LanguagesArray.php'); + include($PathPrefix . 'includes/LanguagesArray.php'); $LocaleSet = setlocale (LC_ALL, $_SESSION['Language'],$LanguagesArray[$_SESSION['Language']]['WindowsLocale']); $LocaleSet = setlocale (LC_NUMERIC, 'C','en_GB.utf8','en_GB','en_US','english-us'); Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/session.inc 2011-11-16 07:04:20 UTC (rev 4746) @@ -73,6 +73,7 @@ include($PathPrefix . 'includes/LanguageSetup.php'); + if (!isset($AllowAnyone)){ /* only do security checks if AllowAnyone is not true */ include $PathPrefix . 'includes/UserLogin.php'; /* Login checking and setup */ Modified: trunk/reportwriter/WriteReport.inc =================================================================== --- trunk/reportwriter/WriteReport.inc 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/reportwriter/WriteReport.inc 2011-11-16 07:04:20 UTC (rev 4746) @@ -583,18 +583,8 @@ function GeneratePDFFile($Data, $Prefs) { $pdf=new PDF(); $pdf->ReportTable($Data); - $pdfcode = $pdf->output(); - $len = mb_strlen($pdfcode); $ReportName = ReplaceNonAllowedCharacters($Prefs['reportname']) .'.pdf'; - - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename="' . $ReportName . '"'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Stream($ReportName); + $pdf->OutputD($ReportName); exit(); // needs to be here to properly render the pdf file. } Modified: trunk/reportwriter/admin/ReportCreator.php =================================================================== --- trunk/reportwriter/admin/ReportCreator.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/reportwriter/admin/ReportCreator.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -1,5 +1,4 @@ <?php -/* $Revision: 1.6 $ */ /* This script has the responsibility to gather basic information necessary to retrieve data for reports. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |