[Fix] Purchase receipt test cases

This commit is contained in:
Rohit Waghchaure
2018-06-12 13:54:40 +05:30
parent a6b346f827
commit b6381c66d8
3 changed files with 6 additions and 4 deletions

View File

@@ -33,7 +33,7 @@ class StockController(AccountsController):
items, warehouses = self.get_items_and_warehouses()
update_gl_entries_after(self.posting_date, self.posting_time, warehouses, items,
warehouse_account)
elif self.doctype in ['Purchase Receipt', 'Purchase Invoice']:
elif self.doctype in ['Purchase Receipt', 'Purchase Invoice'] and self.docstatus == 1:
gl_entries = []
gl_entries = self.get_asset_gl_entry(gl_entries)
make_gl_entries(gl_entries, from_repost=from_repost)