nileshsamsonite
22nd June 2009, 07:40
Hi,
I have written a AFS script to generate a Purchase Order . I am passing all the required fields . But the purchase price is not updated which is passed as argument. The generated PO contains the default purchase price. I want to generate a PO where PO price should be same to which I am passing as argument.
Here is the code:
f4102s000.put.Purchase_Order(rep.pur.order)
f4102s000.put.Position_Number(hold.pono)
hold.pono = hold.pono + 1
f4102s000.put.tdpur041.item(std.item) |IMP - Convert to STD item
f4102s000.put.Ordered_Quantity(tddps504.pqty) | domain should be tcqrd1
get.FOB.price(sspo.item,sspo.item)
stpapi.put.field( "tdpur4102s000", "tdpur041.pric", str$(hold.price) )
stpapi.handle.subproc("tdpur4102s000", "tdind0271s000", "add")
stpapi.put.field("tdind0271s000", "tdind020.bdat", str$(tddps503.sdat))
stpapi.put.field("tdind0271s000", "tdind020.exci", str$(hold.no)) | Excise applicable
stpapi.put.field("tdind0271s000", "sls.app", str$(hold.no)) | Sales tax applicable
stpapi.put.field("tdind0271s000", "octr.app", str$(hold.no)) | Octroi applicable
stpapi.put.field("tdind0271s000", "tdind020.srtx", str$(hold.no)) | Service Tax
stpapi.insert("tdind0271s000", true, seserr)
if not isspace(seserr) then
message ("Cannot update the Localised data - %s", seserr)
endif
stpapi.end.session("tdind0271s000")
f4102s000.insert(1,err)
Thanks
Nilesh Banait
I have written a AFS script to generate a Purchase Order . I am passing all the required fields . But the purchase price is not updated which is passed as argument. The generated PO contains the default purchase price. I want to generate a PO where PO price should be same to which I am passing as argument.
Here is the code:
f4102s000.put.Purchase_Order(rep.pur.order)
f4102s000.put.Position_Number(hold.pono)
hold.pono = hold.pono + 1
f4102s000.put.tdpur041.item(std.item) |IMP - Convert to STD item
f4102s000.put.Ordered_Quantity(tddps504.pqty) | domain should be tcqrd1
get.FOB.price(sspo.item,sspo.item)
stpapi.put.field( "tdpur4102s000", "tdpur041.pric", str$(hold.price) )
stpapi.handle.subproc("tdpur4102s000", "tdind0271s000", "add")
stpapi.put.field("tdind0271s000", "tdind020.bdat", str$(tddps503.sdat))
stpapi.put.field("tdind0271s000", "tdind020.exci", str$(hold.no)) | Excise applicable
stpapi.put.field("tdind0271s000", "sls.app", str$(hold.no)) | Sales tax applicable
stpapi.put.field("tdind0271s000", "octr.app", str$(hold.no)) | Octroi applicable
stpapi.put.field("tdind0271s000", "tdind020.srtx", str$(hold.no)) | Service Tax
stpapi.insert("tdind0271s000", true, seserr)
if not isspace(seserr) then
message ("Cannot update the Localised data - %s", seserr)
endif
stpapi.end.session("tdind0271s000")
f4102s000.insert(1,err)
Thanks
Nilesh Banait