mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 09:13:05 +08:00
Strip insignificant zero for ledger records in consumption export [SCI-9646] (#6693)
* Strip insignificant zero for ledger records when stock precision is zero [SCI-9646] * Stip insignicant zeros for all stock ledger records in consumption exports [SCI-9646]
This commit is contained in:
parent
6c11c6641b
commit
2009d01532
1 changed files with 5 additions and 3 deletions
|
@ -37,6 +37,8 @@ module RepositoryStockLedgerZipExport
|
|||
end
|
||||
|
||||
class << self
|
||||
include ActionView::Helpers::NumberHelper
|
||||
|
||||
private
|
||||
|
||||
def load_records(repository_row_ids)
|
||||
|
@ -64,13 +66,13 @@ module RepositoryStockLedgerZipExport
|
|||
consumption_type,
|
||||
record.repository_row.name,
|
||||
record.repository_row.code,
|
||||
consumed_amount,
|
||||
number_with_precision(consumed_amount, strip_insignificant_zeros: true),
|
||||
consumed_amount_unit,
|
||||
added_amount,
|
||||
number_with_precision(added_amount, strip_insignificant_zeros: true),
|
||||
added_amount_unit,
|
||||
record.user.full_name,
|
||||
I18n.l(record.created_at, format: :full),
|
||||
record.balance,
|
||||
number_with_precision(record.balance, strip_insignificant_zeros: true),
|
||||
record.unit
|
||||
]
|
||||
breadcrumbs_data =
|
||||
|
|
Loading…
Reference in a new issue