View Single Post
  #4  
Old 06-08-2007, 03:28 PM
 
Berto Berto is offline
 

Member
  
Join Date: Mar 2007
Posts: 19
 

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

Oh, yes...

We removed the Company name and Name of purchaser from our po orders, so, no wonder this didn't come up! My function finds spaces, but not line returns. So here's a possible fix:

Try this function instead in your file x-cart_root/include/func/func.db.php:
Code:
function getPONum($o_details) { if (strpos($o_details, "PO Number") > -1) { $po_number_arr = explode(' ',$o_details); 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_arr = explode('\n', $po_number_arr[$int + 2]); $po_num = $po_arr[0]; break; } } return $po_num; } else { return ""; } }

Let me know if that one works!
__________________
Russell
X-cart Version 4.1.9 [linux]
Reply With Quote