Skip to Content

When create purchase order from purchase request using script, how can create PriceCalculationItem?

Dec 07, 2017 at 12:20 AM


avatar image

Hi experts,
In Bydesign System, the business: create a sales order, the purchase request and purchase order will auto create.
The purchase request is created by system(system configuration), and the purchase order must be created by the program.
And the purchase Order's price copy from sales order's price.

About the program, now I create a purchase Order using CreateFromPurchaseRequest() script, but the purchase Order can't create the PriceCalculationItem.

var po_item = PurchaseOrder.CreateFromPurchaseRequest();

var po_item_price = po_item.PriceCalculationItem.Create();

var po_item_price_Price = po_item_price.ItemMainPrice.Create();
var po_item_price_Surcharge = po_item_price.ItemMainSurcharge.Create();
var po_item_price_Discount = po_item_price.ItemMainDiscount.Create();

the po_item_price and po_item_price_Price return null.
Any idea to create the PriceCalculationItem of the PurchaseOrder?

Thanks in advance.
Best Regards,
Benny Huang

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Michelle Boadas
Jan 03 at 12:31 PM

Dear Benny,

I checked some information and I recommend to you to open an incident to check it further.

With this action, we'll be able to help you with this process.

Any doubt, please, let me know.

10 |10000 characters needed characters left characters exceeded