Question

Update the quantity required in shop order

  • 23 August 2023
  • 0 replies
  • 35 views

Userlevel 2
Badge +9

Hello.

I’m working on a custom page which updates the quantity required on a material line, on a shop order.

I have this code :

client_sys.Clear_attr(v_attr);

client_sys.Clear_attr(v_info);

v_new_quantity:=5;

v_qty_assembly:=v_new_quantity/IFSAPP.Shop_Order_Operation_API.Get_Op_Revised_Qty_Due(v_order_no , v_release_no , v_sequence_no , v_operation_no);

Client_SYS.Add_To_Attr('QTY_REQUIRED', v_new_quantity, v_attr);    

Client_SYS.Add_To_Attr('QTY_PER_ASSEMBLY', v_qty_assembly, v_attr);

Client_SYS.Add_To_Attr('REC_EDIT_FROM_CLIENT', 'TRUE', v_attr);

Client_SYS.Add_To_Attr('QTY_REQUIRED_CHANGED', 'TRUE', v_attr);

Client_SYS.Add_To_Attr('MANUAL_ENTRY', 'YES', v_attr);

Shop_Material_Alloc_API.Modify__(v_info, v_objid, v_objversion, v_attr, 'DO');

 

But with this code, I cannot close the shop order, and it seems that it’s because IFS needs to check for for each material line, I have QTY_REQUIRED = QTY_ISSUED, but QTY_ISSUED is a read only field.

Am I missing something to make that work?

Thanks


0 replies

Be the first to reply!

Reply