Instant of Stock cannot be written because a pointer of Quantity struct is used inside it.
type Quantity struct {
InCarton float64 `json:"InCarton" bson:"InCarton"`
InPallet float64 `json:"InPallet" bson:"InPallet"`
InKg float64 `json:"InKg" bson:"InKg"`
InCBM float64 `json:"InCBM" bson:"InCBM"`
type Stock struct {
Batch `json:",inline" bson:",inline"`
Quantity *Quantity `json:",inline" bson:",inline"`
MovementHistory Movements `json:"MovementHistory" bson:"MovementHistory"`
CostPerKg `json:"" bson:""`
Error message is described as below:
panic: cannot transform type *simcel.TransportOrderLine to a BSON Document: (struct simcel.Stock) inline fields must be either a struct or a map