From 3494d4824cefb9c2a149cf787214d859e1754ab7 Mon Sep 17 00:00:00 2001 From: phyusin Date: Tue, 16 Oct 2018 15:46:54 +0630 Subject: [PATCH] add shift data --- app/views/api/shifts/create.json.jbuilder | 50 +++++++++++------------ 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/app/views/api/shifts/create.json.jbuilder b/app/views/api/shifts/create.json.jbuilder index 88c5d5ce..c5b02c92 100644 --- a/app/views/api/shifts/create.json.jbuilder +++ b/app/views/api/shifts/create.json.jbuilder @@ -2,32 +2,30 @@ if @status == true json.status true json.message @message - # json.shift_sale @shift_sale do |shift| - # json.id shift.id - # json.cashier_terminal_id shift.cashier_terminal_id - # json.shift_started_at shift.shift_started_at.strftime("%Y-%m-%d %H:%m:%s") - # json.shift_closed_at shift.shift_closed_at.strftime("%Y-%m-%d %H:%m:%s") - # json.employee_id shift.employee_id - # json.opening_balance shift.opening_balance - # json.closing_balance shift.closing_balance - # json.total_revenue shift.total_revenue - # json.total_discounts shift.total_discounts - # json.total_taxes shift.total_taxes - # json.grand_total shift.grand_total - # json.nett_sales shift.nett_sales - # json.cash_sales shift.cash_sales - # json.credit_sales shift.credit_sales - # json.other_sales shift.other_sales - # json.commercial_taxes shift.commercial_taxes - # json.cash_in shift.cash_in - # json.cash_out shift.cash_out - # json.dining_count shift.dining_count - # json.takeaway_count shift.takeaway_count - # json.member_count shift.member_count - # json.total_rounding shift.total_rounding - # json.total_receipt shift.total_receipt - # json.total_void shift.total_void - # end + json.shift_id @shift_sale.id + json.cashier_terminal_id @shift_sale.cashier_terminal_id + json.shift_started_at @shift_sale.shift_started_at + json.shift_closed_at @shift_sale.shift_closed_at + json.employee_id @shift_sale.employee_id + json.opening_balance @shift_sale.opening_balance + json.closing_balance @shift_sale.closing_balance + json.total_revenue @shift_sale.total_revenue + json.total_discounts @shift_sale.total_discounts + json.total_taxes @shift_sale.total_taxes + json.grand_total @shift_sale.grand_total + json.nett_sales @shift_sale.nett_sales + json.cash_sales @shift_sale.cash_sales + json.credit_sales @shift_sale.credit_sales + json.other_sales @shift_sale.other_sales + json.commercial_taxes @shift_sale.commercial_taxes + json.cash_in @shift_sale.cash_in + json.cash_out @shift_sale.cash_out + json.dining_count @shift_sale.dining_count + json.takeaway_count @shift_sale.takeaway_count + json.member_count @shift_sale.member_count + json.total_rounding @shift_sale.total_rounding + json.total_receipt @shift_sale.total_receipt + json.total_void @shift_sale.total_void else json.status false json.error_message @error_message