qr code generate

This commit is contained in:
nandar
2018-03-05 11:08:09 +06:30
parent b81a6dbc96
commit d428c8a03f
16 changed files with 22162 additions and 0 deletions

BIN
app/views/batch_line_items/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,22 @@
<div class="row">
<nav class="breadcrumb">
<a class="breadcrumb-item" href="<%= dashboard_path %>">Home</a>
<a class="breadcrumb-item active" href="<%= clients_path %>">Clients</a>
<a class="breadcrumb-item active" href="#">Show</a>
</nav>
</div>
<div class="row content">
<div class="col-lg-6 show">
<%= form_tag generate_card_account_items_path,:method => :post do %>
<%= hidden_field_tag 'id', params[:id] %>
<%= label_tag(:qty, "Qty:") %>
<%= text_field_tag(:qty) %>
<%= submit_tag("Generate") %>
<% end %>
</div>
</div>
<div class="row">
<div class="col-lg-8">
<div class="col-lg-3"></div>
</div>
</div>

BIN
app/views/batches/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,2 @@
json.extract! batch, :id,:date,:user_id, :client_id, :order_ref,:batch_start,:batch_end,:exported_by,:qty_processing,:qty_success,:qty_fail,:batch_start_time,:batch_end_time,:export_count,:remark,:adult_or_child,:product_category_id
json.url batch_url(batch, format: :json)

View File

@@ -0,0 +1,29 @@
<%= simple_form_for(@batch) do |f| %>
<nav class="breadcrumb">
<a class="breadcrumb-item" href="<%= dashboard_path %>">Home</a>
<a class="breadcrumb-item active" href="<%= batches_path %>">Batch</a>
<a class="breadcrumb-item active" href="#">
<% if !@batch.id.nil? %>
Edit
<% else %>
New
<% end %>
</a>
</nav>
<div class="row">
<div class="col-md-6" id="textbox_group">
<div class ="form-group" >
<label for="name" class="string optional control-label">Name:</label>
<%= f.input :order_ref ,:label =>false,:error => false,:placeholder =>'Please enter name',input_html: { class: "form-control" } %>
<%= f.error :order_ref ,style: 'color: red' %>
</div>
<div class ="form-group" >
<label></label>
<div class="actions">
<%= f.button :submit, :class => 'btn btn-primary',:id =>'btn_submit' %>
<%= link_to 'Cancel', batches_path ,:class => 'btn btn-primary',:id => 'btnback' %>
</div>
</div>
</div>
</div>
<% end %>

View File

@@ -0,0 +1 @@
<%= render 'form', batch: @batch %>

View File

@@ -0,0 +1 @@
<%= render 'form', batch: @batch %>

View File

@@ -0,0 +1,92 @@
<div class="row">
<nav class="breadcrumb">
<a class="breadcrumb-item" href="<%= dashboard_path %>">Home</a>
<a class="breadcrumb-item active" href="<%= clients_path %>">Batches</a>
<a class="breadcrumb-item active" href="#">Show</a>
<span style="float:right">
<%= link_to 'Generate QR Code', generate_cards_path(@batch.id),:class => 'btn btn-primary' %>
</span>
</nav>
</div>
<div class="row content">
<div class="col-lg-6 show">
<div class="row">
<div class="col-lg-4"><strong>Order Ref:</strong></div>
<div class="col-lg-8 uppercase"><%= @batch.order_ref %></div>
</div>
<div class="row">
<div class="col-lg-4"><strong>Exported By:</strong></div>
<div class="col-lg-8"><%= @batch.exported_by %></div>
</div>
<div class="row">
<div class="col-lg-4"><strong>User Name:</strong></div>
<div class="col-lg-8"><%= @batch.user.name %></div>
</div>
<div class="row">
<div class="col-lg-4"><strong>Client:</strong></div>
<div class="col-lg-8"><%= @batch.client.name %></div>
</div>
<div class="row">
<div class="col-lg-4"><strong>Date:</strong></div>
<div class="col-lg-8"><%= @batch.date.strftime("%e,%b %Y %I:%M %p") rescue '' %></div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-8">
<div class="col-lg-3"></div>
<div class="col-lg-4 btn-show-action">
<%= link_to 'Edit', edit_batch_path(@batch),:class => 'btn btn-primary' %>
<%= link_to 'Back', batches_path ,:class => 'btn btn-primary'%>
</div>
</div>
</div>
<div class="row content">
<div class="card">
<div class="card-header">
<strong>Batch Line Item List( <%= @result_count %> )</strong>
</div>
<div class="card-block">
<% flash.each do |key, value| %>
<% if key =='message' %>
<div class="alert alert-danger center">
<a class="close" data-dismiss="alert">×</a>
<%= value %>
<% end %>
</div>
<% end %>
<div id ="filterrific_results">
<table class="table" style="border-top:none">
<thead>
<tr>
<th>Serial No</th>
<th>Asset Identity</th>
<th>Manufacture UID</th>
<th>Batch No</th>
<th>Asset Type</th>
<th>Created At </th>
<th>Updated At </th>
</tr>
</thead>
<tbody>
<% @batchLineItems.each do |item| %>
<tr>
<td><%= item.serial_no rescue '' %></td>
<td><%= item.asset_identity rescue '' %></td>
<td><%= item.manufacture_uid rescue '' %></td>
<td><%= item.batch_name rescue '' %></td>
<td><%= item.asset_type rescue '' %></td>
<td><%= item.created_at.strftime("%e,%b %Y %I:%M %p") rescue '' %></td>
<td><%= item.updated_at.strftime("%e,%b %Y %I:%M %p") rescue '' %></td>
</tr>
<% end %>
</tbody>
</table>
<%=paginate @batchLineItems %>
<div>
</div>
</div>

View File

@@ -0,0 +1 @@
json.partial! "batches/batch", batch: @batch

BIN
app/views/clients/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,5 @@
class AddSecurityCodeInItems < ActiveRecord::Migration[5.0]
def change
add_column :batch_line_items, :security_code, :string
end
end

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B