- $this->line_items[] = new po_line_details($stock_id, $item_descr, $qty, $price,
- $req_del_date, $qty_inv, $qty_recd, $qty_ordered, $grn_item_id, $po_item_id);
+ $line = new po_line_details($stock_id, $item_descr, $qty, $price,
+ $req_del_date, $qty_inv, $qty_recd, $qty_ordered, $grn_item_id, $po_item_id, $unit_cost);
+
+ $this->line_items[] = $line;
+ $line->cart = $this;