From: <ex...@us...> - 2015-03-27 09:37:00
|
Revision: 7236 http://sourceforge.net/p/web-erp/reponame/7236 Author: exsonqu Date: 2015-03-27 09:36:57 +0000 (Fri, 27 Mar 2015) Log Message: ----------- 27/03/15 Exson: Make credit not for freight only is printable in PrintCustTrans.php. Modified Paths: -------------- trunk/PrintCustTrans.php Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2015-03-26 08:47:47 UTC (rev 7235) +++ trunk/PrintCustTrans.php 2015-03-27 09:36:57 UTC (rev 7236) @@ -273,8 +273,8 @@ } // end else $result=DB_query($sql); - if (DB_error_no()!=0 OR DB_num_rows($result)==0) { - + if (DB_error_no()!=0 OR (DB_num_rows($result)==0 AND $InvOrCredit == 'Invoice')) { + $Title = _('Transaction Print Error Report'); include ('includes/header.inc'); echo '<br />' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database'); @@ -698,7 +698,7 @@ } $result=DB_query($sql); - if (DB_num_rows($result)==0 OR DB_error_no()!=0) { + if ((DB_num_rows($result)==0 AND $InvOrCredit == 'Invoice') OR (DB_error_no()!=0)) { echo '<p>' . _('There was a problem retrieving the invoice or credit note details for note number') . ' ' . $FromTransNo . ' ' . _('from the database') . '. ' . _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available'); if ($debug==1) { echo _('The SQL used to get this information that failed was') . '<br />' . $sql; |