From 3ad26e4dd1e64f0c14fb4d191044a6767067af87 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 29 Jul 2015 13:15:57 +0530 Subject: [PATCH] Fix Against Voucher in GL Entry for return against purchase invoice --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 006470f860..7e0ed7f390 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -255,7 +255,7 @@ class PurchaseInvoice(BuyingController): "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, }) )