diff --git a/application/controllers/receivings.php b/application/controllers/receivings.php index 1f958150d..e710edc9d 100644 --- a/application/controllers/receivings.php +++ b/application/controllers/receivings.php @@ -141,6 +141,8 @@ class Receivings extends Secure_area $data['receipt_title']=$this->lang->line('recvs_receipt'); $data['transaction_time']= date('m/d/Y h:i:s a'); $data['mode']=$this->receiving_lib->get_mode(); + $stock_locations = $this->Stock_locations->get_undeleted_all()->result_array(); + $data['show_stock_locations'] = count($stock_locations) > 1; $supplier_id=$this->receiving_lib->get_supplier(); $employee_id=$this->Employee->get_logged_in_employee_info()->person_id; $comment = $this->input->post('comment'); @@ -203,6 +205,8 @@ class Receivings extends Secure_area $data['mode']=$this->receiving_lib->get_mode(); $data['receipt_title']=$this->lang->line('recvs_receipt'); $data['transaction_time']= date('m/d/Y h:i:s a', strtotime($receiving_info['receiving_time'])); + $stock_locations = $this->Stock_locations->get_undeleted_all()->result_array(); + $data['show_stock_locations'] = count($stock_locations) > 1; $supplier_id=$this->receiving_lib->get_supplier(); $emp_info=$this->Employee->get_info($receiving_info['employee_id']); $data['payment_type']=$receiving_info['payment_type']; diff --git a/application/controllers/sales.php b/application/controllers/sales.php index d60e83da1..ac079d5d9 100644 --- a/application/controllers/sales.php +++ b/application/controllers/sales.php @@ -197,6 +197,8 @@ class Sales extends Secure_area $data['total']=$this->sale_lib->get_total(); $data['receipt_title']=$this->lang->line('sales_receipt'); $data['transaction_time']= date('m/d/Y h:i:s a'); + $stock_locations = $this->Stock_locations->get_undeleted_all()->result_array(); + $data['show_stock_locations'] = count($stock_locations) > 1; $customer_id=$this->sale_lib->get_customer(); $employee_id=$this->Employee->get_logged_in_employee_info()->person_id; $comment = $this->sale_lib->get_comment(); @@ -240,6 +242,8 @@ class Sales extends Secure_area { $sale_info = $this->Sale->get_info($sale_id)->row_array(); $this->sale_lib->copy_entire_sale($sale_id); + $stock_locations = $this->Stock_locations->get_undeleted_all()->result_array(); + $data['show_stock_locations'] = count($stock_locations) > 1; $data['cart']=$this->sale_lib->get_cart(); $data['payments']=$this->sale_lib->get_payments(); $data['subtotal']=$this->sale_lib->get_subtotal(); diff --git a/application/views/receivings/receipt.php b/application/views/receivings/receipt.php index ebc6673d6..004f21ef1 100644 --- a/application/views/receivings/receipt.php +++ b/application/views/receivings/receipt.php @@ -41,9 +41,8 @@ if (isset($error_message))