mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-27 18:48:50 -04:00
Fix error message when searching for nonexistant supplier in receivings
(#430)
This commit is contained in:
1 parent
51b776354a
commit
4d04cdd65f
2 files changed
+5
-2
No files matched your search
@@ -30,7 +30,10 @@ class Receivings extends Secure_area
|
||||
function select_supplier()
|
||||
{
|
||||
$supplier_id = $this->input->post('supplier');
|
||||
$this->receiving_lib->set_supplier($supplier_id);
|
||||
if ($this->Supplier->exists($supplier_id))
|
||||
{
|
||||
$this->receiving_lib->set_supplier($supplier_id);
|
||||
}
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
|
||||
@@ -516,7 +516,7 @@ class Sales extends Secure_area
|
||||
{
|
||||
// substitute customer info
|
||||
$customer_id = $this->sale_lib->get_customer();
|
||||
if($customer_id != -1 && $cust_info != '' && $cust_info->last_name != '' && $cust_info->first_name != '')
|
||||
if($customer_id != -1 && $cust_info != '')
|
||||
{
|
||||
$text = str_replace('$CU',$cust_info->first_name . ' ' . $cust_info->last_name,$text);
|
||||
$words = preg_split("/\s+/", trim($cust_info->first_name . ' ' . $cust_info->last_name));
|
||||
|
||||
Reference in new issue
Block a user