Fix snapshot creation with stock consumption [SCI-6762]

This commit is contained in:
Martin Artnik 2022-04-22 10:49:42 +02:00
parent 159180d8b9
commit 4bd5df4e0e

View file

@ -16,6 +16,8 @@ class RepositoryStockValue < ApplicationRecord
validates :repository_cell, presence: true
after_create do
next if is_a?(RepositoryStockConsumptionValue)
repository_ledger_records.create!(user: created_by,
amount: amount,
balance: amount,