Sales Invoice from Timesheet - Function

Hallo, i have to learn how to use this part of erpnext.

  1. i have a timesheet
  2. i want to make an invoice - i click on this button “make invoice” (the alternative is, to have a project and click the button “sales invoice” to have the same vie as:
  3. i have the view like this:

On top there is the red lined area, where the items or things i want to bill should be inside. Ste standard is like you see, it is clear. Nothing inside.

Below there is the timesheet with the number, the hours and the calculated amount.

Now my question - do i really have to fill the fields in the red rounded area manually?

I Tried the following:
If i click on “add row” in the red rounded area, i can drag the timesheet inside the read rounded area and have the information there. but there is no calculation, no VAT … it is not working.

Again my question: Is there a function i need to know how?
Are there any buttons, i have to klick to get the working hours inside the invoice?
Or do i really have manually to type something inside the fields in the red rounded area, to prepare the invoice.

Thanks for help.
Best regards

I have started using this just a week ago and to me it seems that you really have to choose the item and fill in the quantities manually and the linked timesheets only serves as a ‘note’, so to say.

It has a logic to it in so far, that the Activity type from the timesheet is not connected to any item.

In order to automate that I guess you’d need to allow linking an Activity Type to an Item and then grab the quantities of that (then linked Item from the related timesheet). No idea how easy, or dificult it might be to add this functionality. If it is essential for you I guess you could find allies here and post a bounty on it in order to sponsor or accelerate development.

I personally would say that grabbing a related item and the quantities from a timesheet automatically would be the ideal functionality (how far up in a list of priorities this should be might be open for discussion I guess though)

2 Likes

if you are interested in this, but don’t know how to approach this practically I might be able to assist with the procedure

Hallo, thanks a lot for your idea and your help
Yes, it is important, because often we dont have a project or sales order - too many clicks to do for such a small issue.
sometimes a customer has a samll problem, we fix it and need to make the invoice.

What do you think about, that my opinion would be, to use the “fetch” functionality?

You mean to link the activity types and selling items (they are used also in a quotation, right?) They should be the same - e.g.

  1. Activitiy Type: Singing

  2. Activity Type: dancing

  3. Item: Singing, 5.- Euro /h

  4. Item: dancing, 10 Euro/h

And if i have a timesheet of dancing, i need to setup a button inside the “make invoice” window, to switch the activity type and the amount into the invoice area (like the red rounded in my screenshot), the system calculates and thats it.
The timesheet gets the status “billed” and all is fine.
right?

I think about, because sometimes i have more than one timesheet. and they are sometime different activity types.

Example.:
Timesheet 1: singing, 1,5h
Timesheet 2: dancing 2h
Timesheet 3: singing 1,5h

After using the fuctionality we dont have yet, i have two positions in the invoice, 3h singing ( 15.- Euro) and 2h dancing (20 Euro) with the total of 35 Euro) + VAT
right?

Now the question, how to realize that.
Thanks a lot for your assistance.

I’d like to join this topic and at the same time pull together some topics on this subject. They all have more or less to do with this:

Some things to start:
We bill time towards our customers for the work we do helping them with all sorts of it-related problems. Where possible we have started to use the given ERPNExt workflow Quotations>Sales Order>Project>Sales Invoice. Though we still do small jobs <30 mins where it’s to much work to follow this workflow. In that case we user Issues from the Support. We have implemented a custom field in our Timesheet Detail in which we can choose the according Issue.
More on this: Timesheets/Timetracking

We have no trouble with the fact, that timesheets are not calculated and added to the item list automatically, as this is a good place to have a last check on the correctness of the work and the billing towards it. Also it is good to be able to seperate billable work if done on weekends with a different rate.
An issue to us right now starts at the point of actually printing or sending the invoice.

Here is how the invoice looks when creating:

Now, in an ideal world we are trying to build with ERPNext :wink: we would like to have the green box on the first page of our invoice with a short text saying “for closer reference see page X”.
Then on page X we’d like to have the orange box listed. The orange box as it is right now is no good to us or our customers at the moment, as they would call me up right away wanting to now what the hell TS-00353 is and why they should pay for it.
The list on that page should look a little like this:
2017-11-17 20_38_55-Unbenannt 1 - LibreOffice Writer

It’d be important that the detailed description in the picture above is always on a seperate page.

We are working on the subject with newmatik.io at the moment and are hoping to have this implemented for our erpnext instance for 2018. If anyone is interested in supporting this endevour please get in touch with me.

@quintact thank you for your call earlier this week. correct me if I’m wrong, but I think this is pretty much what you need, right?

1 Like

To achieve this, we added a checkbox “Print Timesheets” to the sales invoice and included this HTML snippet in the print format:

<br>
<div style="page-break-after: always"></div>
{% if doc.timesheets and doc.print_timesheets -%}
<h4>{{ _("Timesheets") }}</h4>
<table class="table table-bordered table-condensed">
    <thead>
        <tr>
            <th style="width: 40px" class="table-sr">{{ _("Sr"} }}</th>
            <th style="width: 150px;">
                {{ _("Date") }}</th>
            <th style="width: 300px;">
                {{ _("Note") }}</th>
            <th style="width: 80px;" class="text-right">
                {{ _("Hours") }}</th>
        </tr>
    </thead>
    <tbody>
        {% for ts in doc.timesheets %}
        <tr>
            <td class="table-sr">{{ loop.index }}</td>
            <td>
                <div class="value">
                    {{ frappe.utils.formatdate(ts.start_date) }}
                </div>
            </td>
            <td>
                <div class="value">
                    {{ ts.note }}
                </div>
            </td>
            <td class="text-right">
                <div class="value">
                    {{ ts.billing_hours | round(2, 'ceil') }}
                </div>
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% endif %}
1 Like

Hi wojosc,

have you done this already?