publicvoidNewCancelPO(AutoCount.Authentication.UserSessionuserSession){AutoCount.Invoicing.Purchase.CancelPO.CancelPOCommandcmd=AutoCount.Invoicing.Purchase.CancelPO.CancelPOCommand.Create(userSession,userSession.DBSetting);AutoCount.Invoicing.Purchase.CancelPO.CancelPOdoc=cmd.AddNew();//Transfer one line of item from PO, if more than one line, write a loopstringpoDocNo="PO-00001";stringitemCode="ItemA";stringuom="UNIT";decimalqtyToTransfer=1;decimalfocQtyToTrasnfer=0;//Using Partial Transferdoc.PartialTransfer(AutoCount.Invoicing.Purchase.TransferFrom.PurchaseOrder,poDocNo,itemCode,uom,qtyToTransfer,focQtyToTrasnfer);try{doc.Save();//log save successful}catch(AutoCount.AppExceptionex){//log exception}}