Skip to content

Commit

Permalink
Merge pull request #1353 from Bloomstack/hotfix
Browse files Browse the repository at this point in the history
Merge branch hotfix into pre-release
  • Loading branch information
sahil28297 authored Jun 3, 2021
2 parents c219146 + 0b338fc commit acedc42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions erpnext/crm/doctype/contract/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ def create_event_against_contract(self):

event.save()

def cancel_event_against_contract(contract, method):
event_name = frappe.db.exists('Event', {'subject': contract.name})
def cancel_event_against_contract(self):
event_name = frappe.db.exists('Event', {'subject': self.name})
if event_name:
frappe.delete_doc('Event', event_name)

Expand Down
5 changes: 3 additions & 2 deletions erpnext/shopping_cart/cart.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,10 @@ def _get_cart_quotation(party=None):
if customer_name:
# override contact person
primary_contact = frappe.session.data.order_for.get("customer_primary_contact_name")

contact_details = frappe.db.get_value("Contact", primary_contact, ["title", "email_id"], as_dict=True)
qdoc.contact_person = primary_contact
qdoc.contact_email = frappe.get_value("Contact", primary_contact, "email_id")
qdoc.contact_display = contact_details.title
qdoc.contact_email = contact_details.email_id

# override customer
qdoc.party_name = customer_name
Expand Down

0 comments on commit acedc42

Please sign in to comment.