From f4effe8ddef3233fd29e65dcd3bfce134dfc26a8 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Sat, 27 Jan 2018 13:16:42 +0630 Subject: [PATCH] update rom and table show --- app/models/customer.rb | 2 +- app/views/origami/home/show.html.erb | 7 ++++--- app/views/origami/rooms/show.html.erb | 7 ++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/models/customer.rb b/app/models/customer.rb index 949093ea..fcdd7f31 100755 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -143,7 +143,7 @@ class Customer < ApplicationRecord def self.update_rebate sales = Sale.where("rebate_status = 'false'") sales.each do |sale| - if sale.customer.membership_id + if sale.customer.membership_id response = self.rebat(Sale.find(sale.sale_id)) #record an payment in sale-audit if !response.nil? diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 1f387be9..8440f354 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -407,8 +407,9 @@ <% end %> <% if @status_sale == 'sale' %> - - + - - +