prefix encoded times to manufacture_uid
This commit is contained in:
@@ -52,7 +52,7 @@ class Api::BatchLineItemsController < ApplicationController
|
||||
end
|
||||
end
|
||||
else
|
||||
if check_manufacture.asset_identity !=card_account_no
|
||||
if check_manufacture.asset_identity != card_account_no
|
||||
@out=true,check_manufacture.serial_no,check_manufacture.asset_identity
|
||||
else
|
||||
@out=false,'Manufacture UID is already registered!'
|
||||
@@ -154,7 +154,8 @@ class Api::BatchLineItemsController < ApplicationController
|
||||
|
||||
if !batch_line_item.nil?
|
||||
if batch_line_item.manufacture_uid.empty?
|
||||
batch_line_item.manufacture_uid = manufacture_uid
|
||||
issue_count = BatchLineItem.where("manufacture_uid LIKE ?", "#{manufacture_uid}%").count
|
||||
batch_line_item.manufacture_uid = "#{manufacture_uid}#{issue_count > 0 ? "-#{issue_count}" : ""}"
|
||||
batch_line_item.save
|
||||
|
||||
# update batch
|
||||
|
||||
Reference in New Issue
Block a user