As a new User in the Frappe Universe and of ERPnext if feel kind of lost with the following situation:
Our workflow is:
Timesheet creation > Timesheet_Detail(s) adding > Invoicing
Challenge A:
For timesheet_detail (sub table) I created a data field name custom_task_technician. Ideally, this field should reflect the list of all support personell (aka Support Team Members). custom_task_technician for us is a value the differs within timesheets and between single tasks in one timesheet, so using the standard “Employee”-Field of an timesheet is not an option.
So I suppose that I have to fetch for Employees and than filter for Support Teamers.
Where, in a Custom Field, in a Custom Skript?
How?
Once the entries are set. Even if it would be typed in manually, the timesheet is submitted.
Thereafter the existing function “Create Sales Invoice” is used to create a invoice with all the timesheet entries if tagged “Is Billable”.
All timesheet detail entries are automatically brought to the invoice and reflected in the invoice timesheet list.
Challenge B:
The list should contain the entry of “custom_task_technician” according to timesheet_detail List.
Challenge C:
The entries, among others, should be reflected in the printed invoice.
Here is the part of the timesheet in the invoice. As I understand it, I should fetch ts.custom_task_technician but the content of this filed has to be in a custom field within the within the child table sales_invoice_timesheet first.
How to bring it there?
{% for ts in doc.timesheets %}
{% set timesheet = frappe.get_doc(“Timesheet”, ts.time_sheet)%}
{% if ts.billing_hours > 0 %}
{{ loop.index }}
{{ ts.get_formatted(‘from_time’) }}
bis
{{ ts.get_formatted(‘to_time’) }}
{{ timesheet.employee_name }}
{{ ts.description }}
I would really appreciate any support!
Cheers, John