refactor: cr notes will post for itself

(cherry picked from commit db76e8a277)
This commit is contained in:
ruthra kumar
2023-05-04 16:27:43 +05:30
committed by Mergify
parent 5be99295da
commit 0a6af795c4
2 changed files with 2 additions and 6 deletions

View File

@@ -671,9 +671,7 @@ class PurchaseInvoice(BuyingController):
"credit_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,
"project": self.project,
"cost_center": self.cost_center,

View File

@@ -1069,9 +1069,7 @@ class SalesInvoice(SellingController):
"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,