fix: Add separate function to validate payment entry taxes
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index a507159..1cd0f5f 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -1211,21 +1211,20 @@
 	def _on_previous_row_error(row_range):
 		throw(_("To include tax in row {0} in Item rate, taxes in rows {1} must also be included").format(tax.idx, row_range))
 
-	for fieldname in ['included_in_print_rate', 'included_in_paid_amount']:
-		if cint(getattr(tax, fieldname, None)):
-			if tax.charge_type == "Actual":
-				# inclusive tax cannot be of type Actual
-				throw(_("Charge of type 'Actual' in row {0} cannot be included in Item Rate or Paid Amount").format(tax.idx))
-			elif tax.charge_type == "On Previous Row Amount" and \
-					not cint(doc.get("taxes")[cint(tax.row_id) - 1].get(fieldname)):
-				# referred row should also be inclusive
-				_on_previous_row_error(tax.row_id)
-			elif tax.charge_type == "On Previous Row Total" and \
-					not all([cint(t.get(fieldname) for t in doc.get("taxes")[:cint(tax.row_id) - 1])]):
-				# all rows about the referred tax should be inclusive
-				_on_previous_row_error("1 - %d" % (cint(tax.row_id),))
-			elif tax.get("category") == "Valuation":
-				frappe.throw(_("Valuation type charges can not be marked as Inclusive"))
+	if cint(getattr(tax, "included_in_print_rate", None)):
+		if tax.charge_type == "Actual":
+			# inclusive tax cannot be of type Actual
+			throw(_("Charge of type 'Actual' in row {0} cannot be included in Item Rate or Paid Amount").format(tax.idx))
+		elif tax.charge_type == "On Previous Row Amount" and \
+				not cint(doc.get("taxes")[cint(tax.row_id) - 1].included_in_print_rate):
+			# referred row should also be inclusive
+			_on_previous_row_error(tax.row_id)
+		elif tax.charge_type == "On Previous Row Total" and \
+				not all([cint(t.included_in_print_rate for t in doc.get("taxes")[:cint(tax.row_id) - 1])]):
+			# all rows about the referred tax should be inclusive
+			_on_previous_row_error("1 - %d" % (cint(tax.row_id),))
+		elif tax.get("category") == "Valuation":
+			frappe.throw(_("Valuation type charges can not be marked as Inclusive"))
 
 
 def set_balance_in_account_currency(gl_dict, account_currency=None, conversion_rate=None, company_currency=None):