fix: precision in asset tests
This commit is contained in:
parent
c460141f0d
commit
b5e5d3b3af
@ -230,9 +230,22 @@ class TestAsset(AssetSetup):
|
|||||||
self.assertTrue(asset.journal_entry_for_scrap)
|
self.assertTrue(asset.journal_entry_for_scrap)
|
||||||
|
|
||||||
expected_gle = (
|
expected_gle = (
|
||||||
("_Test Accumulated Depreciations - _TC", 18000.0 + pro_rata_amount, 0.0),
|
(
|
||||||
("_Test Fixed Asset - _TC", 0.0, 100000.0),
|
"_Test Accumulated Depreciations - _TC",
|
||||||
("_Test Gain/Loss on Asset Disposal - _TC", 82000.0 - pro_rata_amount, 0.0),
|
flt(18000.0 + pro_rata_amount, asset.precision("gross_purchase_amount")),
|
||||||
|
0.0
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"_Test Fixed Asset - _TC",
|
||||||
|
0.0,
|
||||||
|
100000.0
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"_Test Gain/Loss on Asset Disposal - _TC",
|
||||||
|
flt(82000.0 - pro_rata_amount, asset.precision("gross_purchase_amount")),
|
||||||
|
0.0
|
||||||
|
),
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
gle = frappe.db.sql(
|
gle = frappe.db.sql(
|
||||||
@ -288,10 +301,26 @@ class TestAsset(AssetSetup):
|
|||||||
pro_rata_amount = flt(pro_rata_amount, asset.precision("gross_purchase_amount"))
|
pro_rata_amount = flt(pro_rata_amount, asset.precision("gross_purchase_amount"))
|
||||||
|
|
||||||
expected_gle = (
|
expected_gle = (
|
||||||
("_Test Accumulated Depreciations - _TC", 18000.0 + pro_rata_amount, 0.0),
|
(
|
||||||
("_Test Fixed Asset - _TC", 0.0, 100000.0),
|
"_Test Accumulated Depreciations - _TC",
|
||||||
("_Test Gain/Loss on Asset Disposal - _TC", 57000.0 - pro_rata_amount, 0.0),
|
flt(18000.0 + pro_rata_amount, asset.precision("gross_purchase_amount"))
|
||||||
("Debtors - _TC", 25000.0, 0.0),
|
0.0
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"_Test Fixed Asset - _TC",
|
||||||
|
0.0,
|
||||||
|
100000.0
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"_Test Gain/Loss on Asset Disposal - _TC",
|
||||||
|
flt(57000.0 - pro_rata_amount, asset.precision("gross_purchase_amount"))
|
||||||
|
0.0
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"Debtors - _TC",
|
||||||
|
25000.0,
|
||||||
|
0.0
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
gle = frappe.db.sql(
|
gle = frappe.db.sql(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user