Skip to main content

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

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,

 

 

 

 


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:

 


@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