Skip to content

Commit

Permalink
fix: precision in asset test_scrap_asset
Browse files Browse the repository at this point in the history
(cherry picked from commit 0e72660)
  • Loading branch information
anandbaburajan authored and mergify[bot] committed Nov 24, 2022
1 parent 82e41a2 commit 0fe5e9a
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 0fe5e9a

Please sign in to comment.