mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-08 00:23:01 +08:00
Fix snapshot creation with stock consumption [SCI-6762]
This commit is contained in:
parent
159180d8b9
commit
4bd5df4e0e
1 changed files with 2 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue