Solved

SO-Invoice/Order Types gl account exceptions for non-stock item

  • 1 October 2021
  • 3 replies
  • 157 views

Userlevel 3
Badge

Hello Everyone,

I was wondering if it is possible for an SO-Invoice to inherit the sales accounts from a non-stock item when the order type says use sales account from customer location. For instance , all the stock items would inherit gl accounts from the customer's sales account but the non-stock would inherit their gl accounts from the actual non-stock item itself.

I haven't found any settings to play with on order types, ar prefs, or so prefs. I am thinking this is probably just locked from what you put in order types and that you would have to manually change the gl account. 

Thanks

icon

Best answer by mvolshteyn 20 October 2021, 18:49

View original

3 replies

Userlevel 7
Badge +11

Hi @podonnell11 

Please use ‘Invoice’ on Sales order module ( Screen ID : SO303000 ), instead of Sales order of type IN (Screen ID : SO301000 ). The ‘Invoice’ screen should pull the Sales account from Non stock item for Non stock items and from customer location for Stock items in your above scenario. 

Let me  know if this works. 
Regards,

 

 

 

 

Userlevel 3
Badge

Hi @podonnell11 

Please use ‘Invoice’ on Sales order module ( Screen ID : SO303000 ), instead of Sales order of type IN (Screen ID : SO301000 ). The ‘Invoice’ screen should pull the Sales account from Non stock item for Non stock items and from customer location for Stock items in your above scenario. 

Let me  know if this works. 
Regards,

 

 

 

 

@vkumar , The process we go through is SO → Shipment → Prepare Invoice but it pulls the non-stock from the customer location rather than the non-stock code regardless. 

 This is the account we want to use for the non-stock item line but it pulls up the Sales GL account from the Customer’s GL Accounts which is this:

 

Userlevel 5
Badge +3

@podonnell11 , I confirm this is not possible through the out-of-the box functionality, but the defaulting of sales order account is implementing in a single event handler of the SOOrderEntry graph. This can be customized straightforward, e.g. like this:

public class SOOrderEntry_Extension6852 : PXGraphExtension<SOOrderEntry>
    {

    [PXOverride]
        public virtual void SOLine_SalesAcctID_FieldDefaulting(PXCache sender, PXFieldDefaultingEventArgs e, PXFieldDefaulting basemethod)
        {

            SOLine line = (SOLine)e.Row;
            if (line == null)
            {
                return;
            }

            string OrigSalesAcctDefault = Base.soordertype.Current.SalesAcctDefault;
            try
            {
                if (line.IsStockItem == false)
                {
                    Base.soordertype.Current.SalesAcctDefault = SOSalesAcctSubDefault.MaskItem;
                }
                basemethod(sender, e);
            }
            finally
            {
                Base.soordertype.Current.SalesAcctDefault = OrigSalesAcctDefault;
            }
        }

}

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved