Topic: Display quantity on hand on purchase order

Hello team,

How can the subject be arrived at?

It is a control for our firm to avoid overstocking.

Thanks in advance

Re: Display quantity on hand on purchase order

this will work for you. you need to open your po_ui.inc

and paste you need to update this code inside display_po_items

     $th = array(_("Item Code"), _("Item Description"), _("Qty in Hand"),_("Quantity"), _("Received"),
           _("Unit"), _("Required Delivery Date"), $order->tax_included ? _("Price after Tax") : _("Price before Tax"), _("Line Total"), "");

    if ($order->trans_type != ST_PURCHORDER)
        array_remove($th, 6);
    if ($new)
        array_remove($th, 4);

and then you need to update this code

 $dec2 = $_POST['qty_hand'] = 0; 

and few  more lines to be updated.

$_POST['qty_hand'] = get_qoh_on_date($_POST['stock_id']);
        if (list_updated('stock_id')) {

                $Ajax->activate('price');
                $Ajax->activate('units');
                $Ajax->activate('qty');
                $Ajax->activate('req_del_date');
                $Ajax->activate('line_total');
                $Ajax->activate('items_table');
        }

and then you need to add the display function to see them in results.

}
    label_cell(price_format($_POST['qty_hand']));
    if ($order->fixed_asset) {

if you update this code you can see them in po, grn, direct invoices pages with quantity in hand

Subscription service based on FA
HRM CRM POS batch Themes

3 (edited by mureithi.lm 11/07/2020 08:02:54 am)

Re: Display quantity on hand on purchase order

I got above to work, now what's missing is to make quantity on hand appear on the printed copy.

What file am I meant to update?

Thanks

Re: Display quantity on hand on purchase order

I am weak in language, I would be grateful if you could tell me the line number of po_ui.inc,  in which these codes have to be updated or added .

Re: Display quantity on hand on purchase order

kvvaradha wrote:

this will work for you. you need to open your po_ui.inc

and paste you need to update this code inside display_po_items

     $th = array(_("Item Code"), _("Item Description"), _("Qty in Hand"),_("Quantity"), _("Received"),
           _("Unit"), _("Required Delivery Date"), $order->tax_included ? _("Price after Tax") : _("Price before Tax"), _("Line Total"), "");

    if ($order->trans_type != ST_PURCHORDER)
        array_remove($th, 6);
    if ($new)
        array_remove($th, 4);

and then you need to update this code

 $dec2 = $_POST['qty_hand'] = 0; 

and few  more lines to be updated.

$_POST['qty_hand'] = get_qoh_on_date($_POST['stock_id']);
        if (list_updated('stock_id')) {

                $Ajax->activate('price');
                $Ajax->activate('units');
                $Ajax->activate('qty');
                $Ajax->activate('req_del_date');
                $Ajax->activate('line_total');
                $Ajax->activate('items_table');
        }

and then you need to add the display function to see them in results.

}
    label_cell(price_format($_POST['qty_hand']));
    if ($order->fixed_asset) {

if you update this code you can see them in po, grn, direct invoices pages with quantity in hand

Please reply me, I have also contacted you by forum email.

Re: Display quantity on hand on purchase order

Yes dude I have got your email and replied you back.

Subscription service based on FA
HRM CRM POS batch Themes