View Single Post
  #6  
Old 06-09-2007, 02:04 PM
 
Berto Berto is offline
 

Member
  
Join Date: Mar 2007
Posts: 19
 

Default Re: PO Numbers on Invoices, Searchable in Orders.

Ugh.

We've got to find how your system registers line breaks.

So, try this function at the bottom of x-cart_root/include/func/func.db.php instead:
Code:
function getPONum($o_details) { if (strpos($o_details, "PO Number") > -1) { $o_string = preg_replace("/\r\n|\n|\r/", " ", $o_details); $po_number_arr = explode(' ',$o_string); for ($int=0; $int<count($po_number_arr); $int++) { if ((strpos($po_number_arr[$int], "PO") > -1)&&(strpos($po_number_arr[$int + 1], "Number") > -1)) { $po_num = $po_number_arr[$int + 2]; break; } } return $po_num; } else { return ""; } }

Does that do it? I hope so!
__________________
Russell
X-cart Version 4.1.9 [linux]
Reply With Quote