batch create

This commit is contained in:
nandar
2018-03-05 11:43:32 +06:30
parent b5b2b829c6
commit 57d210f6ed
3 changed files with 3 additions and 5 deletions

View File

@@ -35,7 +35,7 @@ class BatchesController < ApplicationController
adult_or_child=params[:adult_or_child]
client_id=params[:client_id]
product_category_id=params[:product_category_id]
@batch = Batch.create_batch(date,order_ref,2,"adult_or_child",6,3)
@batch = Batch.create_batch(date,order_ref,2,"adult_or_child",client_id,product_category_id)
respond_to do |format|
if @batch.save

View File

@@ -80,8 +80,6 @@ class BatchLineItem < ApplicationRecord
security_code = encoder.security_code
digest = Digest::MD5.hexdigest(security_code)
puts 'digest............'
puts digest
encryptd_data=BatchLineItem.encrypted(str,encrypt_key)
encoder.secret_token=encryptd_data

View File

@@ -19,11 +19,11 @@
</div>
<div class="form-group">
<label for="client" class="string optional control-label">Select Client:</label>
<%= select_tag "client", options_from_collection_for_select(@clients, "id", "name"), :class => 'form-control'%>
<%= select_tag "client_id", options_from_collection_for_select(@clients, "id", "name"), :class => 'form-control'%>
</div>
<div class="form-group">
<label for="product" class="string optional control-label">Select Product:</label>
<%= select_tag "product", options_from_collection_for_select(@product, "id", "name"), :class => 'form-control'%>
<%= select_tag "product_category_id", options_from_collection_for_select(@product, "id", "name"), :class => 'form-control'%>
</div>
<div class ="form-group" >
<label></label>