Override Payment Entry Functions

I have created a new doctype and would want to create a payment entry from a custom button from the new doctype. How do i override existing payment enries to accomondate my customization?
def set_party_type(dt):
if dt in (“Sales Invoice”, “Sales Order”, “Dunning”):
party_type = “Customer”
elif dt in (“Purchase Invoice”, “Purchase Order”):
party_type = “Supplier”
elif dt in (“Expense Claim”, “Employee Advance”):
party_type = “Employee”
elif dt in (“Fees”):
party_type = “Student”
return party_type

To include my doctype…“Company Imprest”. What fields should i pass to payment entry?

I do not want to edit payment entry code directly.