From: <dai...@us...> - 2013-05-02 10:38:01
|
Revision: 5887 http://sourceforge.net/p/web-erp/reponame/5887 Author: daintree Date: 2013-05-02 10:37:58 +0000 (Thu, 02 May 2013) Log Message: ----------- fix Credit_Invoice.php not selecting location to credit into correctly Modified Paths: -------------- trunk/Credit_Invoice.php trunk/doc/Change.log trunk/includes/MiscFunctions.php Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2013-05-02 09:40:15 UTC (rev 5886) +++ trunk/Credit_Invoice.php 2013-05-02 10:37:58 UTC (rev 5887) @@ -206,7 +206,7 @@ } -if (isset($_POST['Location']) AND !isset($_POST['ProcessCredit'])){ +if (isset($_POST['Location'])){ $_SESSION['CreditItems' . $identifier]->Location = $_POST['Location']; $NewDispatchTaxProvResult = DB_query("SELECT taxprovinceid FROM locations WHERE loccode='" . $_POST['Location'] . "'",$db); @@ -486,7 +486,7 @@ $OKToProcess = true; -if ((isset($_POST['CreditType']) and$_POST['CreditType']=='WriteOff') AND !isset($_POST['WriteOffGLCode'])){ +if ((isset($_POST['CreditType']) AND $_POST['CreditType']=='WriteOff') AND !isset($_POST['WriteOffGLCode'])){ prnMsg (_('The GL code to write off the credit value to must be specified. Please select the appropriate GL code for the selection box'),'info'); $OKToProcess = false; } Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2013-05-02 09:40:15 UTC (rev 5886) +++ trunk/doc/Change.log 2013-05-02 10:37:58 UTC (rev 5887) @@ -1,10 +1,12 @@ OwebERP Change Log -2/5/2013 Exson: Revise the account code to 20 reported by Tim in GLAccounts.php. -2/5/2013 Exson: Make correction for removing those functions not related with webERP committed last time in MiscFunctions.php. Thanks for Tim's review. -2/5/2013 Exson: Make smtp available for PDFDeliveryDifferences.php. -2/5/2013 Exson: Make smtp mail available for PDFDIFOT.php and fixed the bug that the result should be data within acceptable days instead of out of the range. -02/05/2013 Exson: Make the smtp mail available for PrintCustTransPortrait.php -02/05/2013 Exson: Add SendmailBySmtp function to MiscFunctions.php and make smtp mail workable for PrintCustTrans.php. + +2/5/13 Phil: Credit_Invoice.php was not setting the selected location to credit into as reported by Ricard +2/5/13 Exson: Revise the account code to 20 reported by Tim in GLAccounts.php. +2/5/13 Exson: Make correction for removing those functions not related with webERP committed last time in MiscFunctions.php. Thanks for Tim's review. +2/5/13 Exson: Make smtp available for PDFDeliveryDifferences.php. +2/5/13 Exson: Make smtp mail available for PDFDIFOT.php and fixed the bug that the result should be data within acceptable days instead of out of the range. +02/05/13 Exson: Make the smtp mail available for PrintCustTransPortrait.php +02/05/13 Exson: Add SendmailBySmtp function to MiscFunctions.php and make smtp mail workable for PrintCustTrans.php. 1/5/13 Ricard: GLAccounts.php change error trap that only allows numeric GL accounts as now the chart of accounts can contain text accounts 1/5/13 Phil: Fix purchase order lead time calculation as reported by MacPhotoBiker on forum 1/5/13 Phil: Add link to print purchase order after placement as suggested by MacPhotoBiker on forum Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2013-05-02 09:40:15 UTC (rev 5886) +++ trunk/includes/MiscFunctions.php 2013-05-02 10:37:58 UTC (rev 5887) @@ -401,22 +401,22 @@ return $IntegerNumber. $DecimalValue; } } + function SendMailBySmtp(&$mail,$To) { - if(strpos('@',$_SESSION['SMTPSettings']['username'])){//user has set the fully mail address as user name - $mail->setFrom($_SESSION['SMTPSettings']['username']); - }else{//user only set it's name instead of fully mail address - if(strpos('smtp',$_SESSION['SMTPSettings']['host'])){ - $HostDomain = substr($_SESSION['SMTPSettings']['host'],4); - } - if(!strpos('@',$_SESSION['SMTPSettings']['username'])){ - $SendFrom = $_SESSION['SMTPSettings']['username'].$HostDomain; - } - } - $mail->setFrom($SendFrom); - $result = $mail->send($To,'smtp'); - return $result; + if(IsEmailAddress($_SESSION['SMTPSettings']['username'])){//user has set the fully mail address as user name + $SendFrom = $_SESSION['SMTPSettings']['username']; + } else {//user only set it's name instead of fully mail address + if(strpos('smtp',$_SESSION['SMTPSettings']['host'])){ + $HostDomain = substr($_SESSION['SMTPSettings']['host'],4); + } + if(!strpos('@',$_SESSION['SMTPSettings']['username'])){ + $SendFrom = $_SESSION['SMTPSettings']['username'] . $HostDomain; + } + } + $mail->setFrom($SendFrom); + $result = $mail->send($To,'smtp'); + return $result; } - ?> |