The user needs the ability to move topical bulk product into a retail lot. We are going to build out one command that can be used to move topical bulk product units and topical bulk product weight.
The command will be called Move Topical Bulk Product to Retail Lot.
Requirements
This command should appear within a Topical Bulk Lot when there is Topical Bulk Product in the lot.
This command should only be available when the topicals and edibles module and the processing module are enabled.
Command Info
Please select the retail lot you would like to transfer the topical bulk product to. retail lot dropdown (ideally only the retail lots for topicals)
If the topical bulk product is tracked by units, how many units were moved? integer
How much weight was moved? (If the topical bulk product is tracked by units that always divide equally into the total mass, you don't have to answer this) Weight
Where will this topical bulk product be located? Active location dropdown
Command Payload
type MoveTopicalBulkProductToRetailLot = {
batchOrLotKey: BatchOrLotKey;
destinationLotId: string;
destinationLocationId: string;
weightMoved: Weight // Let's cache this so it is always present
unitsMoved?: number
}
Command Validation
The batchOrLotKey should be a topical bulk lot
There should be topical bulk product within the source lot that matches the topical bulk product type specified in the retail product class of the destination retail lot
The destination location ID should exist and be active
The units moved must be specified if the source bulk product is tracked by units.
If units are being moved, then the number must be greater by zero and the weight is not required since we can calculate it easily.
If the product is just bulk, then weight is required that must be greater than 0.
If the weight moved is specified, the source lot should have sufficient topical bulk product tracked by bulk weight
If the units moved is specified, the source lot should have sufficient topical bulk product tracked by bulk units
The destination lot should not have already finished curing after packaging
Expected Behaviour
The topical bulk product is decreased from the source lots and appears in the destination retail lot
If units divided equally into mass are configured here, then specifying the units should also decrease the mass as appropriate (and the weight should be calculated by our system and put into the event record).
If the topical bulk product is all moved, the line disappears entirely from the source lot
If the retail lot already has topical bulk product, it increases the amount in the lot.
Lots where the user has already finished the packaging and curing process shouldn't be valid
Description
The user needs the ability to move topical bulk product into a retail lot. We are going to build out one command that can be used to move topical bulk product units and topical bulk product weight.
The command will be called
Move Topical Bulk Product to Retail Lot
.Requirements
This command should appear within a
Topical Bulk Lot
when there isTopical Bulk Product
in the lot. This command should only be available when the topicals and edibles module and the processing module are enabled.Command Info
Command Payload
Command Validation
Expected Behaviour