check duplicate record
This commit is contained in:
@@ -142,8 +142,10 @@ class Api::BatchLineItemsController < ApplicationController
|
|||||||
# account_no = params[:account_no]
|
# account_no = params[:account_no]
|
||||||
barcode = params[:barcode]
|
barcode = params[:barcode]
|
||||||
manufacture_uid = params[:manufacture_uid]
|
manufacture_uid = params[:manufacture_uid]
|
||||||
|
session_token = params[:session_token]
|
||||||
batch_line_item = BatchLineItem.find_by_barcode(barcode)
|
batch_line_item = BatchLineItem.find_by_barcode(barcode)
|
||||||
|
find_user = Member.find_by_session_token(session_token)
|
||||||
|
if !find_user.nil?
|
||||||
if !batch_line_item.nil?
|
if !batch_line_item.nil?
|
||||||
if batch_line_item.manufacture_uid.nil?
|
if batch_line_item.manufacture_uid.nil?
|
||||||
batch_line_item.manufacture_uid = manufacture_uid
|
batch_line_item.manufacture_uid = manufacture_uid
|
||||||
@@ -165,6 +167,9 @@ class Api::BatchLineItemsController < ApplicationController
|
|||||||
else
|
else
|
||||||
@out = false,"error"
|
@out = false,"error"
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
@out = false,"Not Authorized"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_item_by_batch
|
def get_item_by_batch
|
||||||
|
|||||||
Reference in New Issue
Block a user