How to display available quantity of item on Sales/Invoice

  • Last Created On Dec 13, 2023
  • 768
0 0
  1. 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:

            // add hook display Available quantity of item //

            $data['items']        = hooks()->apply_filters('before_admin_view_create_invoice', $data['items']);

            /////////////////////////////////////////////////

    Image: 


    1.2. 
    File “application/controllers/admin/Invoice_items.php”, find function “search” and update like the image
    Code: 

        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);

            }

        }

    Image: 


Views: 768

Recent Articles

  • Auto-Fulfillment & Omnichannel Order-to-...
    12
  • SDR AI Agent - Guide 5: Governance Setti...
    13
  • SDR AI Agent - Guide 4: Activity Audit,...
    15
  • SDR AI Agent - Guide 3: Autonomous Lead...
    16
  • SDR AI Agent - Guide 2: Real-Time Kanban...
    14

Popular Articles

  • Connect your X (Twitter) account and Syn...
    3409
  • Warehouse
    2795
  • Item Settings
    2368
  • X (Twitter) Analytics
    2219
  • Plaid environment & Setup Your Bank Acco...
    2118