fix: do not set payment terms for return invoices

(cherry picked from commit 8b700eadc7)
This commit is contained in:
ljain112
2024-10-25 18:09:01 +05:30
committed by Mergify
parent 9a5604c5bb
commit a826a894f4
4 changed files with 13 additions and 3 deletions

View File

@@ -2438,7 +2438,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
payment_terms_template() {
var me = this;
const doc = this.frm.doc;
if(doc.payment_terms_template && doc.doctype !== 'Delivery Note') {
if(doc.payment_terms_template && doc.doctype !== 'Delivery Note' && doc.is_return == 0) {
var posting_date = doc.posting_date || doc.transaction_date;
frappe.call({
method: "erpnext.controllers.accounts_controller.get_payment_terms",