Fix Against Voucher in GL Entry for return against purchase invoice
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
index 006470f..7e0ed7f 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -255,7 +255,7 @@
"against": self.against_expense_account,
"credit": self.total_amount_to_pay,
"remarks": self.remarks,
- "against_voucher": self.name,
+ "against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype,
})
)