diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py index 72b2764403..a9561a0f23 100755 --- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py +++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py @@ -207,6 +207,7 @@ def invoice_appointment(appointment_doc): sales_invoice.appointment = appointment_doc.name sales_invoice.due_date = getdate() sales_invoice.is_pos = '0' + sales_invoice.company = appointment_doc.company sales_invoice.debit_to = get_receivable_account(appointment_doc.company) fee_validity = get_fee_validity(appointment_doc.physician, appointment_doc.patient, appointment_doc.appointment_date) diff --git a/erpnext/projects/doctype/timesheet/test_timesheet.py b/erpnext/projects/doctype/timesheet/test_timesheet.py index d2017c5712..c26da92503 100644 --- a/erpnext/projects/doctype/timesheet/test_timesheet.py +++ b/erpnext/projects/doctype/timesheet/test_timesheet.py @@ -159,6 +159,7 @@ def make_timesheet(employee, simulate=False, billable = 0, activity_type="_Test update_activity_type(activity_type) timesheet = frappe.new_doc("Timesheet") timesheet.employee = employee + timesheet.company = company or '_Test Company' timesheet_detail = timesheet.append('time_logs', {}) timesheet_detail.billable = billable timesheet_detail.activity_type = activity_type @@ -167,7 +168,6 @@ def make_timesheet(employee, simulate=False, billable = 0, activity_type="_Test timesheet_detail.to_time = timesheet_detail.from_time + datetime.timedelta(hours= timesheet_detail.hours) timesheet_detail.project = project timesheet_detail.task = task - timesheet_detail.company = company or '_Test Company' for data in timesheet.get('time_logs'): if simulate: diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 7fe61c99e5..46303b550e 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -589,10 +589,6 @@ def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False): "Sales Team": { "doctype": "Sales Team", "add_if_empty": True - }, - "Payment Schedule": { - "doctype": "Payment Schedule", - "add_if_empty": True } }, target_doc, postprocess, ignore_permissions=ignore_permissions)