class Oqs::EditController < BaseOqsController
  def index
  	assigned_item_id = params[:id]
    assigned_item = AssignedOrderItem.find(assigned_item_id)
    @order_item = OrderItem.where("order_id='#{ assigned_item.order_id }' AND item_code='#{ assigned_item.item_code }'");    
  end

  def update
    order_items_id = params[:order_items_id]
    qty_weight = params[:qty_weight]
    remarks = params[:remarks]

    order_item = OrderItem.find(order_items_id);
    order_item.qty = qty_weight
    order_item.remark = remarks
    order_item.save
  end
end
