Skip to content

Commit

Permalink
Merge pull request #33099 from frappe/mergify/bp/version-14-hotfix/pr…
Browse files Browse the repository at this point in the history
…-33097

fix: precision in asset test_scrap_asset (backport #33097)
  • Loading branch information
deepeshgarg007 authored Nov 24, 2022
2 parents 82e41a2 + 0fe5e9a commit 517e40e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion erpnext/assets/doctype/asset/test_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ def test_scrap_asset(self):
asset.finance_books[0], 9000, get_last_day(add_months(purchase_date, 1)), date
)
pro_rata_amount = flt(pro_rata_amount, asset.precision("gross_purchase_amount"))
self.assertEquals(accumulated_depr_amount, 18000.00 + pro_rata_amount)
self.assertEquals(
accumulated_depr_amount,
flt(18000.0 + pro_rata_amount, asset.precision("gross_purchase_amount")),
)

self.assertEqual(asset.status, "Scrapped")
self.assertTrue(asset.journal_entry_for_scrap)
Expand Down

0 comments on commit 517e40e

Please sign in to comment.