Calculate Stock on Order Values

Hi Everyone

I have been struggling with creating a server side method for the following scenario I have 2 Item Types and a Relationship between. I would like the value of the Relationship property _order_qty added to the value of the Child relationship property _stock_on_order when creating a  POR.

ItemType 1 - POR

Relationship - POR_Part (Property = _order_qty)

ItemType 2 - Part (Property = _stock_on_order)

So basically get the current _stock_on_order then _stock_on_order + _order_qty and then rewrite the _stock_on_order value on the Part ItemType. 

I have a separate script that will subtract the received stock quantity from _stock_on_order. 

Thanks!