Skip to content

Commit

Permalink
refactor: cr notes will post for itself
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed May 16, 2023
1 parent 59f9d41 commit 351c987
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Expand Up @@ -6,7 +6,6 @@
from frappe import _, msgprint, qb
from frappe.model.document import Document
from frappe.query_builder.custom import ConstantColumn
from frappe.query_builder.functions import IfNull
from frappe.utils import flt, get_link_to_form, getdate, nowdate, today

import erpnext
Expand Down Expand Up @@ -149,7 +148,7 @@ def get_dr_or_cr_notes(self):
(doc.docstatus == 1)
& (doc[frappe.scrub(self.party_type)] == self.party)
& (doc.is_return == 1)
& (IfNull(doc.return_against, "") == "")
# & (IfNull(doc.return_against, "") == "")
)
.run(as_dict=True)
)
Expand Down
4 changes: 1 addition & 3 deletions erpnext/accounts/doctype/sales_invoice/sales_invoice.py
Expand Up @@ -1110,9 +1110,7 @@ def make_customer_gl_entry(self, gl_entries):
"debit_in_account_currency": base_grand_total
if self.party_account_currency == self.company_currency
else grand_total,
"against_voucher": self.return_against
if cint(self.is_return) and self.return_against
else self.name,
"against_voucher": self.name,
"against_voucher_type": self.doctype,
"cost_center": self.cost_center,
"project": self.project,
Expand Down

0 comments on commit 351c987

Please sign in to comment.