Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Send POP line item to alternate GL account

(0) ShareShare
ReportReport
Posted on by 215

I'm trying to create a purchase invoice directly in GP through eConnect.  I accomplished this through the "taPopRcptHdrInsert" and it works.  I'm using non-inventory line items.  However, I can't seem to specify which GL account to affect.  I recently did the sales line items and there is a field called "SLSINDX", which does exactly what I want.  How can I accomplish this in purchasing?

I tried to go the route of using "taPopDistribution" and it integrates, but it seems to be a lot of work when you have terms involved and you need to split out a portion of the value into the special account they have for the discounts.

*This post is locked for comments

  • Verified answer
    sandipdjadhav Profile Picture
    18,302 on at
    RE: Send POP line item to alternate GL account

    Hello,

    Here is Distribution code for your reference.

    //

    public void PurchaseReceiptInvoice(POPReceiptHeader Header, List<POReceiptItem> POReceiptItems, List<taPopDistribution_ItemsTaPopDistribution> popDistributions)

           {

    foreach (taPopDistribution_ItemsTaPopDistribution Refdistri in popDistributions)

                   {

                       taPopDistribution_ItemsTaPopDistribution ActDistri = new taPopDistribution_ItemsTaPopDistribution();

                       ActDistri.POPTYPE = Refdistri.POPTYPE;

                       ActDistri.POPRCTNM = Refdistri.POPRCTNM;

                       ActDistri.ACTINDX = Refdistri.ACTINDX;

                       ActDistri.DEBITAMT = Refdistri.DEBITAMT;

                       ActDistri.CRDTAMNT = Refdistri.CRDTAMNT;

                       ActDistri.DISTTYPE = Refdistri.DISTTYPE;

                       ActDistri.VENDORID = Refdistri.VENDORID;

                       if (i == 0)

                       {

                           itemsDist[0] = ActDistri;

                       }

                       else

                       {

                           itemsDist[i] = ActDistri;

                       }

                       i++;

                   }

     PoShipmentInvioce.taPopRcptLineInsert_Items = LineItems;  // Ur Line Items

                   PoShipmentInvioce.taPopRcptHdrInsert = POHeader; // ur Header

                   PoShipmentInvioce.taPopDistribution_Items = itemsDist;

    }

    Let me know How it goes. I will be happy to assist you.

    Thanks

    Sandip

  • Suggested answer
    Frank Hamelly | MVP, MCP, CSA Profile Picture
    46,527 Super User 2025 Season 1 on at
    RE: Send POP line item to alternate GL account

    There are Default Account Settings in Posting Accounts Setup for Discounts Available (AVAIL) and Discounts Taken (TAKEN).  All you have to do is supply the amount for the AVAIL Distribution Type.  The terms details default from the Vendor ID.  You shouldn't have to supply values for Terms either, if they're setup on the Vendor Card.

  • LordSupafly Profile Picture
    215 on at
    RE: Send POP line item to alternate GL account

    Thanks for your comments Frank.  In my situation, I'm integrating from another system and each item on the invoice can theoretically go to a different account.  Unfortunately, my hands are tied there.

    I did get the distributions working to manually send each item to a different account.  It's just a lot of work to handle the 'AVAIL' and everything when you start introducing terms.

    If that's what I have to do, I guess it is what it is.  But I was just hoping for a better way.

    Thanks again for your help.

  • Frank Hamelly | MVP, MCP, CSA Profile Picture
    46,527 Super User 2025 Season 1 on at
    RE: Send POP line item to alternate GL account

    If posting accounts are setup properly in GP, you shouldn't have to direct anything to 'alternate' accounts.  The correct accounts will default from posting account settings.  Non-inventory purchase accounts come from the vendor card first, then from default Posting Accounts under Admin>>Setup>>Posting>>Posting Accounts. That's also where the default Discounts accounts are set.  If everything is setup properly, you should only need to supply the Purchases account (if different from the default account in the vendor card), item Unit Cost, Quantity, UOM, Site ID, and amounts for Miscellaneous and/or Freight.  All other values will default into the transaction.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Almas Mahfooz Profile Picture

Almas Mahfooz 3 User Group Leader

Featured topics

Product updates

Dynamics 365 release plans