debsamguru
Member
- Local time
- Today, 18:29
- Joined
- Oct 24, 2010
- Messages
- 82
This is more of a logic question than a programming question (potentially).
Status of an order and an order line can be:
1. Active
2. Part-shipped
3. Shipped
4. Invoiced
5, Paid
These are in a StatusT with a description of the status and just the StatusID is attached to the OrderHeaderT record and the OrderItemsT record.
An order can be made up of many order lines which may have a mixture of statuses i.e. Active, Part-shipped or Shipped. The status Part-shipped is allocated when the QuantityRequired - QuantityReceived.
The order lines are displayed in the subform OrderDetailsSubF whilst the main form (with the OrderHeader details) is OrderDetailsF.
What I want to do is when one of the order line status' changes to Part-shipped, I want the OrderHeaderT.StatusID to reflect that. I also want the OrderHeaderT.StatusID to reflect Shipped if all of the items have been shipped.
Can anyone think of the logic that would allow me to do that?
Thanks
Status of an order and an order line can be:
1. Active
2. Part-shipped
3. Shipped
4. Invoiced
5, Paid
These are in a StatusT with a description of the status and just the StatusID is attached to the OrderHeaderT record and the OrderItemsT record.
An order can be made up of many order lines which may have a mixture of statuses i.e. Active, Part-shipped or Shipped. The status Part-shipped is allocated when the QuantityRequired - QuantityReceived.
The order lines are displayed in the subform OrderDetailsSubF whilst the main form (with the OrderHeader details) is OrderDetailsF.
What I want to do is when one of the order line status' changes to Part-shipped, I want the OrderHeaderT.StatusID to reflect that. I also want the OrderHeaderT.StatusID to reflect Shipped if all of the items have been shipped.
Can anyone think of the logic that would allow me to do that?
Thanks