|
From: <ex...@us...> - 2013-05-12 14:42:44
|
Revision: 5963
http://sourceforge.net/p/web-erp/reponame/5963
Author: exsonqu
Date: 2013-05-12 14:42:40 +0000 (Sun, 12 May 2013)
Log Message:
-----------
12/5/2013 Tim: Add patch for the email groups are set situation in PDFChequeListing.php, MailSalesReport.php, MailSalesReport_csv.php, OffersReceived.php.
Modified Paths:
--------------
trunk/MailSalesReport.php
trunk/MailSalesReport_csv.php
trunk/OffersReceived.php
trunk/PDFChequeListing.php
Modified: trunk/MailSalesReport.php
===================================================================
--- trunk/MailSalesReport.php 2013-05-12 14:14:57 UTC (rev 5962)
+++ trunk/MailSalesReport.php 2013-05-12 14:42:40 UTC (rev 5963)
@@ -19,7 +19,13 @@
$DatabaseName = $_SESSION['DatabaseName'];
/*The people to receive the emailed report */
$Recipients = GetMailList('SalesAnalysisReportRecipients');
-
+if (sizeOf($Recipients) == 0) {
+ $Title = _('Inventory Valuation') . ' - ' . _('Problem Report');
+ include('includes/header.inc');
+ prnMsg( _('There are no members of the Sales Analysis Report Recipients email group'), 'warn');
+ include('includes/footer.inc');
+ exit;
+}
include ('includes/ConstructSQLForUserDefinedSalesReport.inc');
include ('includes/PDFSalesAnalysis.inc');
Modified: trunk/MailSalesReport_csv.php
===================================================================
--- trunk/MailSalesReport_csv.php 2013-05-12 14:14:57 UTC (rev 5962)
+++ trunk/MailSalesReport_csv.php 2013-05-12 14:42:40 UTC (rev 5963)
@@ -26,6 +26,13 @@
/*The people to receive the emailed report, This mail list now can be maintained in Mailing List Maintenance of Set Up */
$Recipients = GetMailList('SalesAnalysisReportRecipients');
+if (sizeOf($Recipients) == 0) {
+ $Title = _('Inventory Valuation') . ' - ' . _('Problem Report');
+ include('includes/header.inc');
+ prnMsg( _('There are no members of the Sales Analysis Report Recipients email group'), 'warn');
+ include('includes/footer.inc');
+ exit;
+}
include('includes/ConstructSQLForUserDefinedSalesReport.inc');
include('includes/CSVSalesAnalysis.inc');
Modified: trunk/OffersReceived.php
===================================================================
--- trunk/OffersReceived.php 2013-05-12 14:14:57 UTC (rev 5962)
+++ trunk/OffersReceived.php 2013-05-12 14:42:40 UTC (rev 5963)
@@ -242,6 +242,11 @@
$mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been accepted'));
$mail->setText($MailText);
$Recipients = GetMailList('OffersReceivedResultRecipients');
+ if (sizeOf($Recipients) == 0) {
+ prnMsg( _('There are no members of the Offers Received Result Recipients email group'), 'warn');
+ include('includes/footer.inc');
+ exit;
+ }
array_push($Recipients,$Email);
if($_SESSION['SmtpSetting']==0){
$mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>');
@@ -281,6 +286,11 @@
$mail->setText($MailText);
$mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>');
$Recipients = GetMailList('OffersReceivedResultRecipients');
+ if (sizeOf($Recipients) == 0) {
+ prnMsg( _('There are no members of the Offers Received Result Recipients email group'), 'warn');
+ include('includes/footer.inc');
+ exit;
+ }
array_push($Recipients,$Email);
if($_SESSION['SmtpSetting']==0){
$mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>');
Modified: trunk/PDFChequeListing.php
===================================================================
--- trunk/PDFChequeListing.php 2013-05-12 14:14:57 UTC (rev 5962)
+++ trunk/PDFChequeListing.php 2013-05-12 14:42:40 UTC (rev 5963)
@@ -192,19 +192,16 @@
include('includes/htmlMimeMail.php');
$mail = new htmlMimeMail();
$attachment = $mail->getFile($_SESSION['reports_dir'] . '/'.$ReportFileName);
+ $mail->setSubject(_('Payments check list'));
$mail->setText(_('Please find herewith payments listing from') . ' ' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate']);
$mail->addAttachment($attachment, 'PaymentListing.pdf', 'application/pdf');
$ChkListingRecipients = GetMailList('ChkListingRecipients');
- if($ChkListingRecipients == ''){
- prnMsg(_('The email address has not been set correctly, no mail will be sent. please ask administrator for help'),'error');
+ if(sizeOf($ChkListingRecipients) == 0){
+ prnMsg(_('There are no member in Check Listing Recipients email group, no mail will be sent'),'error');
include('includes/footer.inc');
exit;
}
- if($ChkListingRecipients == ''){
- prnMsg(_('The mail address is not set correctly, no mail send'),'errort');
- include('includes/footer.inc');
- exit;
- }
+
if($_SESSION['SmtpSetting']==0){
$mail->setFrom(array('"' . $_SESSION['CompanyRecord']['coyname'] . '" <' . $_SESSION['CompanyRecord']['email'] . '>'));
$result = $mail->send($ChkListingRecipients);
|