Fix undefined offset error when using company_name with trailing

whitespace
This commit is contained in:
jekkos-t520 committed 2015-02-11 13:14:33 +01:00
1 parent b7751bde1a
commit 2e36b7e03b
1 file changed
+1 -1
+1 -1
View File
@@ -239,7 +239,7 @@ class Receivings extends Secure_area
if($supplier_id!=-1)
{
$invoice_number=str_replace('$SU',$supplier_info->company_name,$invoice_number);
$words = preg_split("/\s+/", $supplier_info->company_name);
$words = preg_split("/\s+/", trim($supplier_info->company_name));
$acronym = "";
foreach ($words as $w) {
$acronym .= $w[0];