Packets Dashboard

The packets dashboard is one of the most complicated tables in the system, it is used for performing and recording a number of different operations on Batches and Seedlots. This was one of the first parts of the system to be created.

In hindsight, things likely would have been cleaner if each operation lied within its own table, but migrating all of the logic and data to do this would be time consuming with little to no functional benefit.

Records in this table are created and accessed via buttons under the new packets and adjustments section on home, buttons on the packing dashboard, and buttons on other packets dashboard records.

The table works by displaying/ hiding fields based the value of 2 choice fields

Additionally, the locked field is used throughout to restrict data entry/ modification once an operation has been completed (via the writable if option).

Operations performed through this table can be seen via the operations log option of the show view choice on batch/ seedlot records.

Below, the way in which each of the possible operations work is explained.

Batch creation

Batch creation accessed via the new packets button on other parts of the packets dashboard, and also on the packing dash, or through the set-up new packest and labels button on the homepage.

It consists of

As to make a batch, we also need to adjust the quantity remaining in a Seedlot. When inputing information to create the new batch, seedlot action is not set (in order to hide seedlot adj fields), once the batch has been created, the seedlot action is set and these fields become visible.

The process itself requires choosing the packet type (sm or bk), when a new batch creation is created, this option will automatically be set to its last value

The next step of the batch creation process is to select the saleable product which you would like to make up.

Once a saleable product is selected, the next step is for the user to select the seedlot which will be used to make the selected product.

Next, the user inputs the number of packets to create (defaults at 1).

Before completing the creation, the user can add any comments, these will show when users are assembling the packets.

Finally, the user can create the batch

Throughout this section, there are a number of additional formula fields which display ore information about the product being created, and expected usage figures. These formulae appear to the right of any input fields.

Batch adjustment/ disassembly

Batch adjustment and disassembly works by a very similar mechanism, with some of the fields being shared between the two.

When we are changing the size of a batch, we do not directly change the remaining size (as this is a formula field). Instead, the remaining size takes into account any completed adjustments.

Batch adjustment is

Batch disassembly is

We use the difference in batch action to differentiate between the two, allowing us to show slightly varied fields/ treat data slightly differently/ different complete buttons.

Both follow the same steps when completing the process.

First, select the batch.

Next, the user can input the number of packets they would like to adjust the batch by/ disassemble.

Before completing the adjustment/ disassembly the user can add a comment.

Finally, the user can complete the adjustment/ disassembly.

There are 2 different buttons depending on whether it is a batch/ disassembly.

Seedlot adjustment

Seedlot adjustments involve a change to the remaining size of a seedlot.

Unlike batch adjustments, the remaining size of a seedlot is not a formula calculated based on its child adjustments, it is instead a numerical field whos value is changed when the adjustment is completed. The seedlot adjustment packets dash record then just serves as a record of this.

Seedlot adjustments have seedlot action of 2

They are also part of batch creation/ batch disassembly.

They are created via the changes to seedlots button the homepage and the change seedlot button on the packets dash / packing dash

The form itself works in the following way

Once all of the data has been input validly, the user wil be able to complete the adjustment

The completion button will

Seedlot zeroing & batch creation

Seedlot zeroing and batch creation serves as a way of finishing off a seedlot, whilst making a given number of small packets.

Though this could be done via a seedlot adjustment/ batch creation, this was created to allow users to complete the task in a single, simple action.

Actions of this type have

They are created via the Tiny batches to empty seedlot button on other records of the packets dash and packing dash

Creating one of these actions on the packets dash via the buttons will autofill the comments with a message

Using the form just requires the user to select a seedlot, and give a number of packets they would like to create from the seedlot

Once this is done, they can complete via the zero seedlots and create packets button, this will do the following

Seedlot creation

This was originally created as a way of adding new seedlots to the system

It has never been used, as seedlots are intended to be added via some purchase order functionality, which is not yet implemented

Instead, seedlots are manually added by interacting with the table directly.

This action uses seedlot action 1

It is likely very little of this code will be used when the purchase order functionality is finally implemented