edit export csv

This commit is contained in:
Sunandar
2017-01-25 17:35:30 +06:30
parent 0c4f797551
commit 3f35298e96
5 changed files with 18 additions and 11 deletions

View File

@@ -49,8 +49,12 @@ class Api::BatchesController < ApplicationController
check_member= Member.authenticate_session_token(session_token)
if !check_member.nil?
batch=Batch.find_by_id(batch_id)
batch_line_items=batch.batch_line_item.count
@out=true,batch_line_items
batch_line_count=0
batch_line_items= BatchLineItem.limit(1)
if !batch_line_items.empty?
batch_line_count=batch.batch_line_item.count
end
@out=true,batch_line_count
else
@out = false, "Sorry!Unauthorized user!"
end
@@ -59,6 +63,7 @@ class Api::BatchesController < ApplicationController
session_token=params[:session_token]
created_by=params[:created_by]
check_member= Member.authenticate_session_token(session_token)
if !check_member.nil?
if !created_by.nil?