Hi,

I am not sure what you mean.  Looking at the purchLine table there are 
two methods 'registered' and 'registeredInPurchUnit', both of which 
seem to only retrieve data not update.  

Looking at the WMSArrival overview form may offer another way.  There 
doesn't seem to be a simple function to just set a single line as 
arrived with the data being committed, so setting a line as arrived in 
the WMSArrival form leaves the PurchLine table alone so status of the 
line is set to open - how do I then get an updated list as to 
progress???

Has anyone dealt with an issue like this before.  

Thanks in advance

--- In [email protected], "James Flavell" 
<[EMAIL PROTECTED]> wrote:
>
> Sorry not stopped to read your code but can't you use the status
> 'Registered' (PO line / Functions / Register) and then just do 
Delivery note
> posting based on Registered?
>  
>  
> 
> 
>   _____  
> 
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of Shabbir 
Ahsan
> Sent: 25 November 2008 23:58
> To: [email protected]
> Subject: [development-axapta] Receiving items from purchase order in 
x++
> 
> 
> 
> Hi,
> 
> I want to be able to receive items on a PO, but process one by one, 
> rather than one go as is the option within AX. I want to be able to 
> update the status of the line to received and then when all items 
are 
> received run a function to post the entire PO. 
> 
> The current code I am using to process each line is: 
> 
> PurchTable purchTable; 
> PurchLine purchLine; 
> TransDate transDate; 
> ; 
> 
> transDate = SystemDateGet(); 
> 
> try 
> { 
> ttsbegin; 
> 
> purchTable = PurchTable::find(myPOId); 
> 
> select forupdate purchLine where purchLine.PurchId == myPOId && 
> purchLine.ItemId == myItem && purchLine.LineNum == mynum; 
> 
> purchLine.PurchReceivedNow = RecQty; 
> purchLine.RemainPurchPhysical = (purchLine.RemainPurchPhysical - 
> RecQty); 
> purchLine.setInventReceivedNow(); 
> if (purchLine.RemainPurchPhysical == 0) 
> { 
> purchLine.setPurchStatus(); 
> } 
> 
> purchLine.update(true); 
> 
> ttscommit; 
> } 
> catch (Exception::Error) 
> { 
> return "got an error"; 
> } 
> return "processed"; 
> 
> } 
> 
> With the above code, it sets the status as cancelled. Do I have to 
> calculate and set the REmainPurchFinancial value as well in order 
for 
> it to give the correct status. Is there not a function that can 
> receive an item and calculate this automatically? 
> 
> After all the status of items is set to received (ie all items have 
> matching quantity to that ordered) I will post the PO using the 
> following code - I don't think there will be a problem here: 
> 
> purchformletter = 
> purchformletter::construct(DocumentStatus::PackingSlip,true); 
> purchtable.clear(); 
> purchtable = purchtable::find(myPOId); 
> 
> 
purchformletter.update(purchtable,myDelNo,systemDateGet(),purchUpdate:
> :All,AccountOrder::None, 
> NoYes::No, 
> NoYes::Yes); 
> 
> Some help on this would be much appreciated.
> 
> 
> 
>  
> 
> 
> [Non-text portions of this message have been removed]
>



Reply via email to