From: <tim...@us...> - 2010-03-19 07:53:25
|
Revision: 3394 http://web-erp.svn.sourceforge.net/web-erp/?rev=3394&view=rev Author: tim_schofield Date: 2010-03-19 07:53:18 +0000 (Fri, 19 Mar 2010) Log Message: ----------- Correct error messages when no transactions are available Modified Paths: -------------- trunk/PDFCustTransListing.php trunk/PDFSuppTransListing.php Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2010-03-19 06:40:49 UTC (rev 3393) +++ trunk/PDFCustTransListing.php 2010-03-19 07:53:18 UTC (rev 3394) @@ -70,16 +70,17 @@ if (DB_error_no($db)!=0){ $title = _('Payment Listing'); include('includes/header.inc'); - prnMsg(_('An error occurred getting the payments'),'error'); + prnMsg(_('An error occurred getting the transactions'),'error'); if ($Debug==1){ - prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br>' . $SQL,'error'); + prnMsg(_('The SQL used to get the transaction information that failed was') . ':<br>' . $SQL,'error'); } include('includes/footer.inc'); exit; } elseif (DB_num_rows($result) == 0){ $title = _('Payment Listing'); include('includes/header.inc'); - prnMsg (_('There were no bank transactions found in the database within the period from') . ' ' . $_POST['Date'] ._('Please try again selecting a different date range or account'), 'error'); + echo '<br>'; + prnMsg (_('There were no transactions found in the database for the date') . ' ' . $_POST['Date'] .'. '._('Please try again selecting a different date'), 'info'); include('includes/footer.inc'); exit; } Modified: trunk/PDFSuppTransListing.php =================================================================== --- trunk/PDFSuppTransListing.php 2010-03-19 06:40:49 UTC (rev 3393) +++ trunk/PDFSuppTransListing.php 2010-03-19 07:53:18 UTC (rev 3394) @@ -79,7 +79,8 @@ } elseif (DB_num_rows($result) == 0){ $title = _('Payment Listing'); include('includes/header.inc'); - prnMsg (_('There were no bank transactions found in the database within the period from') . ' ' . $_POST['Date'] ._('Please try again selecting a different date range or account'), 'error'); + echo '<br>'; + prnMsg (_('There were no transactions found in the database for the date') . ' ' . $_POST['Date'] .'. '._('Please try again selecting a different date'), 'info'); include('includes/footer.inc'); exit; } @@ -136,27 +137,8 @@ $pdf->stream(); */ -$ReportFileName = $_SESSION['DatabaseName'] . '_ChequeListing_' . date('Y-m-d').'.pdf'; +$ReportFileName = $_SESSION['DatabaseName'] . '_SuppTransListing_' . date('Y-m-d').'.pdf'; $pdf->OutputD($ReportFileName);//UldisN $pdf->__destruct(); //UldisN -if ($_POST['Email']=='Yes'){ - if (file_exists($_SESSION['reports_dir'] . '/'.$ReportFileName)){ - unlink($_SESSION['reports_dir'] . '/'.$ReportFileName); - } - $fp = fopen( $_SESSION['reports_dir'] . '/'.$ReportFileName,'wb'); - fwrite ($fp, $pdfcode); - fclose ($fp); - include('includes/htmlMimeMail.php'); - - $mail = new htmlMimeMail(); - $attachment = $mail->getFile($_SESSION['reports_dir'] . '/'.$ReportFileName); - $mail->setText(_('Please find herewith payments listing from') . ' ' . $_POST['Date'] . ' ' . _('to') . ' ' . $_POST['ToDate']); - $mail->addAttachment($attachment, 'PaymentListing.pdf', 'application/pdf'); - $mail->setFrom(array('"' . $_SESSION['CompanyRecord']['coyname'] . '" <' . $_SESSION['CompanyRecord']['email'] . '>')); - - /* $ChkListingRecipients defined in config.php */ - $result = $mail->send($ChkListingRecipients); -} - ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |