Sales Order

Icon:

<i class="fa fa-shopping-cart"></i>

Introduction

Find a way to get visibility of work done by partners and how to charge customers…

Work done by partners

  1. A partner will record all of their chargeable time as Billable. Chargeable time is defined as work they expect to be paid for.

  2. The Time Analysis by User / Ticket (last 3 months) report (TimeAnalysisByUserTicketReport) will display Chargeable time (in minutes) for each partner.

  3. The time on this report should be reconciled to the partner’s monthly invoice (03/12/2020, email from Paul: Yes that report was what I needed, so I was able to confirm my times).

How to charge customers

Every ticket with chargeable time should have a sales order. The sales order will control the customer invoicing.

  1. To identify tickets with chargeable time, but no sales order, run the Tickets with Chargeable Time but No Sales Order report (TicketChargeableTimeNoSalesOrder). (This report only checks chargeable time recorded since 01/02/2022).

  2. Make sure all the tickets listed by Tickets with Chargeable Time but No Sales Order report are included on a sales order.

Warning

Why do we need the Funded Tickets with No Sales Order report?

Methods

check_tickets

Tickets with chargeable time, but no sales order.

current_with_ticket_count

  • Annotate sales orders with ticket counts and completed ticket counts.

  • Does NOT count tickets where exclude_from_ticket_count is set to True on the Ticket.ticket_type.

The idea here is decide if sales orders are accepted or completed.

  1. Sales orders are created from Sage quotes.

  2. When the Sage quote is accepted, we create tickets on the sales order. The tickets are copies of the lines on the Sage quote.

  3. Default tickets are also created when the Sage quote is accepted.

  4. We know when a sales order is accepted because it has tickets.

  5. We know when a sales order is complete because all of the tickets are complete.

This worked perfectly until the client asked us to create follow up tickets where quotes are not accepted within x days.

  • They don’t want the sales order to show as accepted even though it has a ticket.

  • To solve this issue, we create the follow-up tickets using a TicketType where exclude_from_ticket_count is set to True.

  • These tickets will not be included (counted) in the ticket_count or completed_ticket_count fields.

funded

The funded field on the Ticket model uses the Funded model to determine how the ticket will be funded e.g. Free of Charge or Sales Order

needs_sales_order (Ticket)

Is this a funded ticket? Should it have a sales order?

sales_order

A SalesOrder is linked to a Ticket using the SalesOrderTicket model.

tickets_without_sales_order (SalesOrderTicket)

Tickets with chargeable time, but no sales order.