- Display available quantity of item on Sales/Invoice

- 1.1. File “application/controllers/admin/Invoices.php”, below the line 365 add hook like this
Code:Image:// add hook display Available quantity of item //
$data['items'] = hooks()->apply_filters('before_admin_view_create_invoice', $data['items']);
/////////////////////////////////////////////////

1.2. File “application/controllers/admin/Invoice_items.php”, find function “search” and update like the image
Code:
Image:public function search()
{
if ($this->input->post() && $this->input->is_ajax_request()) {
$data = $this->invoice_items_model->search($this->input->post('q'));
/////////////////////////////////////////////////
// add hook display Available quantity of item //
$data = hooks()->apply_filters('admin_invoice_ajax_search_item', $data, $this->input->post('q'));
/////////////////////////////////////////////////
echo json_encode($data);
}
}

- Show item mark "Can be sold" when creating Invoice
File “app\Models\Invoice_items_model.php” and find function “get_item_suggestion” then add new code
Code:Image:// app_filter_item_search //
$where = app_hooks()->apply_filters(‘app_filter_item_search’, $where);
/////////////////////////////////////////////////