mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-23 00:34:45 -04:00
Fix undefined offset error when using company_name with trailing
whitespace
This commit is contained in:
1 parent
b7751bde1a
commit
2e36b7e03b
1 file changed
+1
-1
@@ -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];
|
||||
|
||||
Reference in new issue
Block a user