If a purchase order has invoiced lines and 2 or more open lines, when an open line is cancelled the order reverts to requisition.
This is by design as any order change should require re-authorisation. However, we need to review the logic around POrder::save() in the model. If the owner is also able to authorise, then no change to the order status should be necessary,
See:
|
if (!is_null($this->authorised_by) && EGS_USERNAME == $this->authorised_by && $this->base_net_value>0 && $porderlines_summary->count()>0) |