edit batch line registe
This commit is contained in:
@@ -4,7 +4,7 @@ class Api::BatchLineItemsController < ApplicationController
|
||||
batch_id=params[:batch_id]
|
||||
session_token=params[:session_token]
|
||||
manufacture_uid = params[:card_manufacture]
|
||||
card_type = params[:card_type]
|
||||
# card_type = params[:card_type]
|
||||
user_id=""
|
||||
|
||||
check_member= Member.authenticate_session_token(session_token)
|
||||
@@ -26,13 +26,17 @@ class Api::BatchLineItemsController < ApplicationController
|
||||
|
||||
check_manufacture = BatchLineItem.find_by_manufacture_uid_and_wristband_code(manufacture_uid,wristband_code)
|
||||
if check_manufacture.nil?
|
||||
|
||||
card_type=""
|
||||
find_batch= Batch.find_by_id(batch_id)
|
||||
if !find_batch.nil?
|
||||
card_type=find_batch.adult_or_child.upcase
|
||||
end
|
||||
batchLineItem=BatchLineItem.new
|
||||
batchLineItem.wristband_code=wristband_code
|
||||
batchLineItem.serial_no=serial_no
|
||||
batchLineItem.batch_id=batch_id
|
||||
batchLineItem.manufacture_uid = manufacture_uid
|
||||
batchLineItem.card_type = card_type.upcase
|
||||
batchLineItem.card_type = card_type
|
||||
|
||||
if batchLineItem.save
|
||||
lookup=Lookup.find_by_name('generate_serial_no')
|
||||
|
||||
Reference in New Issue
Block a user