From 04074b59f06e3be5c89827a3f30114b91382ec4b Mon Sep 17 00:00:00 2001 From: Sunandar Date: Tue, 7 Mar 2017 15:33:49 +0630 Subject: [PATCH] edit for lock --- app/controllers/api/batch_line_items_controller.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/api/batch_line_items_controller.rb b/app/controllers/api/batch_line_items_controller.rb index d9a619c..11a70d1 100644 --- a/app/controllers/api/batch_line_items_controller.rb +++ b/app/controllers/api/batch_line_items_controller.rb @@ -48,24 +48,24 @@ class Api::BatchLineItemsController < ApplicationController if check_asset.nil? @out=BatchLineItem.create_product(asset_identity,serial_no,batch_id,manufacture_uid,card_type) else - @out=false,'Asset Identity is already registered!',nil + @out=false,'Asset Identity is already registered!' end end else if check_manufacture.asset_identity !=card_account_no - @out=false,"Error",check_manufacture + @out=true,check_manufacture.serial_no,check_manufacture.account_no else - @out=false,'Manufacture UID is already registered!',nil + @out=false,'Manufacture UID is already registered!' end end else - @out=false,'Invalid User!',nil + @out=false,'Invalid User!' end else - @out=false,"Client doesn't exist!",nil + @out=false,"Client doesn't exist!" end else - @out=false,"Product Category doesn't exist!",nil + @out=false,"Product Category doesn't exist!" end else @out=false,"Batch doesn't exist!"