Quantcast
Channel: Ariba Exchange: Message List
Viewing all articles
Browse latest Browse all 3363

Re: Receipt

$
0
0

Ravi - yes, you can leverage the OOTB CSV files ReceiptByPartNumber.csv and ReceiptByCommodityCode.csv, but you cannot control by amount,quantity,price. If you have a generic requirement by amount, set the parameter Application.Procure.AutoReceiveLineItemAmount or Application.Procure.AutoReceiveOrderAmount. But if you need to go by Quantity, Price or commodity specific Amount, then you'll need to extend the ReceivingTypeMethod. Overwrite the parameter ReceivingTypeMethod with your extension class to implement whatever logic is necessary.

 

Here's an example of where I overwrote the PCardReceivingTypeMethod

 

public class ReceivingTypeExtRule extends PCardReceivingTypeRule {

 

    public int findReceivingType(ReceivableLineItem lineItem) {

        // Default is receive by count

 

        if (lineItem instanceof POLineItem) {

            POLineItem poli = (POLineItem) lineItem;           

            if (RequisitionUtil.isExternalPurchase((Requisition) poli

                    .getRequisition())) {

                return systemReceived;

            }

       

            else if (ITSCRequisitionUtil.isITSCRequisition((Requisition) poli

                    .getRequisition())) {               

                return noReceipt;

            }

 

           

 

            else if (CRRequisitionUtil.isCRRequisition((Requisition) poli

                    .getRequisition())) {               

                return noReceipt;

            }

           

        }   

        return super.findReceivingType(lineItem);

 

    }

 

}


Viewing all articles
Browse latest Browse all 3363

Trending Articles