Merge pull request #32454 from AnandBaburajan/fix_test_scrap_asset

fix: test_scrap_asset not working on end of month
This commit is contained in:
Deepesh Garg 2022-10-02 17:44:46 +05:30 committed by GitHub
commit 601880f1ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,7 +253,9 @@ class TestAsset(AssetSetup):
asset.gross_purchase_amount - asset.finance_books[0].value_after_depreciation,
asset.precision("gross_purchase_amount"),
)
self.assertEquals(accumulated_depr_amount, 18000.0)
this_month_depr_amount = 9000.0 if get_last_day(date) == date else 0
self.assertEquals(accumulated_depr_amount, 18000.0 + this_month_depr_amount)
def test_gle_made_by_asset_sale(self):
date = nowdate()