Hi Experts,
I am using below code to post partial purchase invoice. But the system is posting packing slip for all the lines of the PO.
Actually, I want to post packing slip only for the lines which matches below 'while select' statement.
while select purchaseLinePartial
where purchaseLinePartial.PurchId == purchaseTable.PurchId
&& purchaseLinePartial.XP_POLineStatus == XP_POLineStatus::Processed
{
ttsbegin;
purchaseLinePartial.selectForUpdate(true);
purchaseLinePartial.setInventReceivedNow();
purchaseLinePartial.update();
ttscommit;
}
// Post packing slip
purchFormLetter = PurchFormLetter::construct(DocumentStatus::PackingSlip);
purchFormLetter.update(purchaseTable,strFmt("Inv_%1", purchaseTable.PurchId,systemdateget(),PurchUpdate::ReceiveNow,
AccountOrder::None,false,false));
Kindly provide some input.
Thanks,
N.Sridhar
*This post is locked for comments
I have the same question (0)