[fix] [minor] make debit note from purchase return
diff --git a/docs/user/stock/docs.user.stock.accounting_for_stock.md b/docs/user/stock/docs.user.stock.accounting_for_stock.md
index bf91fe5..8348c80 100644
--- a/docs/user/stock/docs.user.stock.accounting_for_stock.md
+++ b/docs/user/stock/docs.user.stock.accounting_for_stock.md
@@ -39,4 +39,4 @@
This complete process is called Periodic Inventory.
-If you are an existing user using Periodic Inventory and want to use Perpetual Inventory, you have to follow some steps to migrate. For details, check [**Migration From Periodic Inventory**](docs.user.stock.perpetual_inventory.html)
+If you are an existing user using Periodic Inventory and want to use Perpetual Inventory, you have to follow some steps to migrate. For details, check [**Migration From Periodic Inventory**](docs.user.stock.periodic_to_perpetual.html)
diff --git a/stock/doctype/stock_entry/stock_entry.py b/stock/doctype/stock_entry/stock_entry.py
index 6a61461..1bb09db 100644
--- a/stock/doctype/stock_entry/stock_entry.py
+++ b/stock/doctype/stock_entry/stock_entry.py
@@ -886,7 +886,8 @@
"account": r.get("account"),
"against_invoice": r.get("against_invoice"),
"against_voucher": r.get("against_voucher"),
- "balance": get_balance_on(r.get("account"), se.doc.posting_date)
+ "balance": get_balance_on(r.get("account"), se.doc.posting_date) \
+ if r.get("account") else 0
})
return jv_list