Merge pull request #49639 from aerele/credit-limit-jv

fix(Credit-limit): consider current voucher for credit limit validation
This commit is contained in:
PRASATHRAJA
2025-09-30 06:38:03 -04:00
committed by GitHub
parent 3057a47994
commit 4a01c53cca
3 changed files with 22 additions and 1 deletions

View File

@@ -433,3 +433,14 @@ def create_internal_customer(customer_name=None, represents_company=None, allowe
customer_name = frappe.db.get_value("Customer", customer_name)
return customer_name
def make_customer(customer_name):
if not frappe.db.exists("Customer", customer_name):
customer = frappe.new_doc("Customer")
customer.customer_name = customer_name
customer.customer_type = "Individual"
customer.insert()
return customer.name
else:
return customer_name