Fix bugs and improvements

fix payment outstanding with amount <= 0
fix payment outstanding with other payments
This commit is contained in:
Thein Lin Kyaw
2019-12-18 15:41:18 +06:30
parent e6392c3bd4
commit 92e467d512
11 changed files with 122 additions and 217 deletions

View File

@@ -3,6 +3,7 @@ class Employee < ApplicationRecord
has_many :commissioners
has_many :shit_sales
has_one :current_shift, -> { where.not(shift_started_at: nil).where(shift_closed_at: nil) },class_name: "ShiftSale"
has_one :cashier_terminal, through: :current_shift
belongs_to :order_queue_station
validates_presence_of :name, :role