mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-03 19:24:48 +08:00
Fix display of repository snapshot with stock consumption [SCI-6824]
This commit is contained in:
parent
b48d0710a4
commit
dfc68b997c
1 changed files with 2 additions and 3 deletions
|
@ -178,15 +178,14 @@ module RepositoryDatatableHelper
|
|||
end
|
||||
|
||||
if options[:include_stock_consumption] && repository_snapshot.has_stock_management?
|
||||
stock_present = record.repository_stock_cell.present?
|
||||
row['stock'] = if stock_present
|
||||
row['stock'] = if record.repository_stock_cell.present?
|
||||
display_cell_value(record.repository_stock_cell, team, repository_snapshot)
|
||||
else
|
||||
{ value_type: 'RepositoryStockValue' }
|
||||
end
|
||||
|
||||
row['consumedStock'] =
|
||||
if stock_present
|
||||
if record.repository_stock_consumption_cell.present?
|
||||
display_cell_value(record.repository_stock_consumption_cell, team, repository_snapshot)
|
||||
else
|
||||
{}
|
||||
|
|
Loading…
Reference in a new issue