I know his is old now but I still do not have a solution.
To update the scenario because I was not clear before:
We have a Special Order with:
item # 1 quantity 10
item # 2 quantity 20
then we create a purchase order, bring in the Special order Lines from the Special order.... later we receive and invoice the vendor.
Now the customer wants only:
item # 1 quantity 7
item # 2 quantity 12
We ship and invoice the customer... No problem.
However, the sales order is still there with an un-shipped quanty of:
item # 1 quantity 3
item # 2 quantity 8
We cannot delete this order because we receive the message "You cannot delete the order line because it is associated with purchase order xxxx line 10000".
So in this scenario, how do you get rid of the purchase order?