mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 11:09:17 +00:00
committed by
mergify-bot
parent
5776881f34
commit
3dcef9352e
@@ -1449,7 +1449,8 @@ class TestPurchaseInvoice(unittest.TestCase):
|
|||||||
self.assertEqual(payment_entry.taxes[0].allocated_amount, 0)
|
self.assertEqual(payment_entry.taxes[0].allocated_amount, 0)
|
||||||
|
|
||||||
def test_provisional_accounting_entry(self):
|
def test_provisional_accounting_entry(self):
|
||||||
item = create_item("_Test Non Stock Item", is_stock_item=0)
|
create_item("_Test Non Stock Item", is_stock_item=0)
|
||||||
|
|
||||||
provisional_account = create_account(
|
provisional_account = create_account(
|
||||||
account_name="Provision Account",
|
account_name="Provision Account",
|
||||||
parent_account="Current Liabilities - _TC",
|
parent_account="Current Liabilities - _TC",
|
||||||
@@ -1472,6 +1473,8 @@ class TestPurchaseInvoice(unittest.TestCase):
|
|||||||
pi.save()
|
pi.save()
|
||||||
pi.submit()
|
pi.submit()
|
||||||
|
|
||||||
|
self.assertEquals(pr.items[0].provisional_expense_account, "Provision Account - _TC")
|
||||||
|
|
||||||
# Check GLE for Purchase Invoice
|
# Check GLE for Purchase Invoice
|
||||||
expected_gle = [
|
expected_gle = [
|
||||||
["Cost of Goods Sold - _TC", 250, 0, add_days(pr.posting_date, -1)],
|
["Cost of Goods Sold - _TC", 250, 0, add_days(pr.posting_date, -1)],
|
||||||
|
|||||||
@@ -385,8 +385,8 @@ $.extend(erpnext.item, {
|
|||||||
"root_type": ["in", ["Liability", "Asset"]],
|
"root_type": ["in", ["Liability", "Asset"]],
|
||||||
"is_group": 0
|
"is_group": 0
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -469,7 +469,9 @@ class PurchaseReceipt(BuyingController):
|
|||||||
and flt(d.qty)
|
and flt(d.qty)
|
||||||
and provisional_accounting_for_non_stock_items
|
and provisional_accounting_for_non_stock_items
|
||||||
):
|
):
|
||||||
self.add_provisional_gl_entry(d, gl_entries, self.posting_date)
|
self.add_provisional_gl_entry(
|
||||||
|
d, gl_entries, self.posting_date, d.get("provisional_expense_account")
|
||||||
|
)
|
||||||
|
|
||||||
if warehouse_with_no_account:
|
if warehouse_with_no_account:
|
||||||
frappe.msgprint(
|
frappe.msgprint(
|
||||||
|
|||||||
Reference in New Issue
Block a user