update waste and spoilage

This commit is contained in:
Aung Myo
2018-03-30 14:20:47 +06:30
parent 15f0abac21
commit 5588f40753
16 changed files with 380 additions and 39 deletions

View File

@@ -418,7 +418,7 @@ class SalePayment < ApplicationRecord
bookings.each do |tablebooking|
if tablebooking.booking_status != 'moved'
if tablebooking.sale_id
if tablebooking.sale.sale_status != 'completed' && tablebooking.sale.sale_status != 'void'
if tablebooking.sale.sale_status != 'completed' && tablebooking.sale.sale_status != 'void' && tablebooking.sale.sale_status != 'spoile' && tablebooking.sale.sale_status != 'waste'
status = false
sale_count += 1
else