This commit is contained in:
Sunandar
2017-02-10 17:25:12 +06:30
parent 9931152796
commit 723ad7462a
8 changed files with 39 additions and 29 deletions

View File

@@ -1,9 +1,9 @@
class Batch < ApplicationRecord
has_many :batch_line_item
def self.create_batch(date,order_ref,user_id,created_by,adult_or_child,client_id,product_category_id)
def self.create_batch(date,order_ref,user_id,adult_or_child,client_id,product_category_id)
batch = Batch.new
batch.created_by=created_by
batch.exported_by=""
batch.order_ref = order_ref
batch.date = date
batch.batch_start = true

View File

@@ -120,7 +120,7 @@ class BatchLineItem < ApplicationRecord
end
def self.get_array
arr=Array.new
(1..1000).each do |i|
(1..100).each do |i|
str= SecureRandom.hex
uid=str[0..13]
arr.push(uid)