2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 11:05:41 +00:00

Order start dates (#8966)

* Add 'start_date' field to orders

- PurchaseOrder
- SalesOrder
- ReturnOrder

* Add serializer field

* Add API filters

* Add table columns

* Add fields to forms

* Table filters

* Add validation check

* Refactor BuildOrderTable

* Update detail page

* Bump API version

* Allow sorting by start_date

* Fix for purchase order field

* Update detail pages

* Update playwright tests

* Updated playwright tests

* Documentation updates

* Updated playwright tests
This commit is contained in:
Oliver
2025-01-29 22:45:39 +11:00
committed by GitHub
parent 0c56a3132b
commit eee4916350
24 changed files with 317 additions and 45 deletions

View File

@ -96,7 +96,7 @@ When a *Build Order* is created, we then have the ability to *allocate* stock it
!!! info "Example - Stock Allocation"
Let's say that to assembly a single "Widget", we require 2 "flanges". So, to complete a build of 10 "Widgets", 20 "flanges" will be required. We *allocate* 20 flanged against this build order.
Allocating stock to a build does not actually subtrack the stock from the database. Allocations signal an *intent* to take that stock for the purpose of this build. Stock allocations are actioned at the completion of a build.
Allocating stock to a build does not actually subtract the stock from the database. Allocations signal an *intent* to take that stock for the purpose of this build. Stock allocations are subtracted from stock at the completion of a build.
!!! info "Part Allocation Information"
Any part which has stock allocated to a build order will indicate this on the part information page.
@ -243,7 +243,7 @@ The form will validate the build order is ready to be completed, and will preven
If you wish to complete the build despite the missing parts, toggle the `Accept Unallocated` option to true to override the warning and allow completion with unallocated parts.
!!! info "Overallocated Stock Items"
If the warning message `Some stock items have been overallocated` is shown, you have more stock than required by the BOM for the part being built allocated to the build order. By default the `Not permissted` option is selected and you will need to return to the allocation screen and remove the extra items before the build can be completed.
If the warning message `Some stock items have been overallocated` is shown, you have more stock than required by the BOM for the part being built allocated to the build order. By default the `Not permitted` option is selected and you will need to return to the allocation screen and remove the extra items before the build can be completed.
Alternatively, you can select `Accept as consumed by this build order` to continue with the allocation and remove the extra items from stock (e.g. if they were destroyed during build), or select `Deallocate before completing this build order` if you would like the extra items to be returned to stock for use in future builds.
@ -265,17 +265,22 @@ The `Cancel Build` form will be displayed, click on the confirmation switch then
## Build Scheduling
Build orders can be scheduled for a future date, to allow for planning of production schedules.
### Start Date
Build orders can be optionally scheduled to *start* at a specified date. This may be useful for planning production schedules.
Build orders can be optionally scheduled to *start* at a specified date, by setting the *Start Date* field. This field can be left blank if the build is to start immediately.
### Target Date
Build orders can be optionally scheduled to be completed by a certain date, by setting the *Target Date* field. This field can be left blank if the build has no specific deadline.
### Overdue Builds
Build orders may (optionally) have a target completion date specified. If this date is reached but the build order remains incomplete, then the build is considered *overdue*.
If the *Target Date* is reached but the build order remains incomplete, then the build is considered *overdue*.
This can be useful for tracking production delays, and can be used to generate reports on build order performance.
## Build Order Settings
The following [global settings](../settings/global.md) are available for adjusting the behavior of build orders:

View File

@ -107,19 +107,19 @@ Each item marked as "received" is automatically converted into a stock item.
To see the list of stock items created from the purchase order, click on the <span class="badge inventree nav side"><span class='fas fa-sign-in-alt'></span> Received Items</span> tab.
### Complete Order
## Complete Order
Once the quantity of all __received__ items is equal or above the quantity of all line items, the order will be automatically marked as __complete__.
It is also possible to complete the order before all items were received (or if there were missing items).
To do so, click on the <span class='fas fa-check-circle'></span> button on the main purchase order detail panel and confirm the order was completed.
### Cancel Order
## Cancel Order
In the event that the order won't be processed, user has the option of cancelling the order instead.
To do so, simply click on the <span class='fas fa-times-circle'></span> button on the main purchase order detail panel and confirm the purchase order has been cancelled.
### Duplicate Purchase Order
## Duplicate Purchase Order
Duplicating a Purchase Order allows the user to quickly create a new *copy* of an existing order, using the same supplier and line item information.
@ -141,7 +141,23 @@ A new purchase order is then created based on the currently selected order:
{% include "img.html" %}
{% endwith %}
### Calendar view
## Order Scheduling
Purchase orders can be scheduled for a future date, to allow for planning of future orders.
### Start Date
The *Start Date* of the purchase order is the date on which the order is scheduled to be issued to the supplier.
### Target Date
The *Target Date* of the purchase order is the date on which the order is expected to be completed / received from the supplier.
### Overdue Orders
If the *Target Date* of the purchase order is reached but the order has not been completed, the order will be marked as *overdue*.
## Calendar view
Using the button to the top right of the list of Purchase Orders, the view can be switched to a calendar view using the button <span class='fas fa-calendar-alt'></span>. This view shows orders with a defined target date only.

View File

@ -115,7 +115,23 @@ While [line items](#line-items) must reference a particular stock item, extra li
Custom [reports](../report/templates.md) can be generated against each Return Order.
### Calendar view
## Order Scheduling
Return Orders can be scheduled to be completed on a specific date. This can be useful for planning and tracking the return of items.
### Start Date
The *Start Date* of the return order is the date on which the order is scheduled to be issued to the customer.
### Target Date
The *Target Date* of the return order is the date on which the order is scheduled to be completed.
### Overdue Orders
If the *Target Date* of a return order has passed, the order will be marked as *Overdue*. This can be useful for tracking orders which are behind schedule.
## Calendar view
Using the button to the top right of the list of Return Orders, the view can be switched to a calendar view using the button <span class='fas fa-calendar-alt'></span>. This view shows orders with a defined target date only.

View File

@ -60,7 +60,7 @@ Fill out the rest of the form with the sales order information then click on <sp
Each Sales Order is uniquely identified by its *Reference* field. Read more about [reference fields](../settings/reference.md).
#### Add Line Items
### Add Line Items
On the sales order detail page, user can link parts to the sales order selecting the <span class="badge inventree nav side"><span class='fas fa-list-ol'></span> Line Items</span> tab then clicking on the <span class="badge inventree add"><span class='fas fa-plus-circle'></span> Add Line Item</span> button.
@ -71,7 +71,7 @@ Once the "Add Line Item" form opens, select a part in the list.
Fill out the rest of the form then click on <span class="badge inventree confirm">Submit</span>
#### Shipments
## Shipments
After all line items were added to the sales order, user needs to create one or more [shipments](#sales-order-shipments) in order to allocate stock for those parts.
@ -82,7 +82,7 @@ In order to create a new shipment:
Repeat the two steps above to create more shipments.
#### Allocate Stock Items
### Allocate Stock Items
After shipments were created, user can either:
@ -91,7 +91,7 @@ After shipments were created, user can either:
During the allocation process, user is required to select the desired shipment that will contain the stock items.
#### Complete Shipment
### Complete Shipment
To complete a shipment, click on the <span class="badge inventree nav side"><span class='fas fa-truck-loading'></span> Pending Shipments</span> tab then click on <span class='fas fa-truck'></span> button shown in the shipment table.
@ -99,16 +99,31 @@ Fill out the "Complete Shipment" form then click on <span class="badge inventree
To view all the completed shipment, click on the <span class="badge inventree nav side"><span class='fas fa-truck'></span> Completed Shipments</span> tab. In the completed shipments table, click on the <span class='fas fa-plus'></span> icon next to each shipment reference to see the items and quantities which were shipped.
### Complete Order
## Complete Order
Once all items in the sales order have been shipped, click on <span class="badge inventree add"><span class='fas fa-check-circle'></span> Complete Order</span> to mark the sales order as shipped. Confirm then click on <span class="badge inventree confirm">Submit</span> to complete the order.
### Cancel Order
## Cancel Order
To cancel the order, click on the <span class='fas fa-tools'></span> menu button next to the <span class="badge inventree add"><span class='fas fa-check-circle'></span> Complete Order</span> button, then click on the "<span class='fas fa-tools'></span> Cancel Order" menu option. Confirm then click on the <span class="badge inventree confirm">Submit</span> to cancel the order.
## Order Scheduling
### Calendar view
Sales orders can be scheduled for a future date, to allow for order scheduling.
### Start Date
The *Start Date* of the sales order is the date on which the order is scheduled to be issued, allowing work to begin on the order.
### Target Date
The *Target Date* of the sales order is the date on which the order is scheduled to be completed and shipped.
### Overdue Orders
If the *Target Date* of the sales order has passed, the order will be marked as *overdue*.
## Calendar view
Using the button to the top right of the list of Sales Orders, the view can be switched to a calendar view using the button <span class='fas fa-calendar-alt'></span>. This view shows orders with a defined target date only.