Merge pull request #4045 from artoscinote/ma_SCI_6762

Fix snapshot creation with stock consumption [SCI-6762]
This commit is contained in:
Alex Kriuchykhin 2022-04-22 10:58:01 +02:00 committed by GitHub
commit 42f79255df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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,