How to change the Default General Ledger Account in the Release Screen (Purchase Order)

Can some please give some ideas in how to change the default General Ledger account that appears in the Release Tab of the purchase order ?
epicor\Material Management\Purchase Management\General Operations*Purcharse Order Entry*\ (Release Tab)

You can only change the default G/L account if you are purchasing to Other . If you have selected Inventory , Job Material or Subcontract Operation as the Buy For option, the G/L account is supplied for you automatically and cannot be changed.

1 Like

I know the default account will be there when “Other” is there. But my question was about about how I can prevent users no to take the default account given when “Other”. so I wrote this little BPM but somehow something is not right … Could you please guide me about it !. The request is to prevent users to take the default account given by “other” and force the user to choose the correct GL account base on each Purchase. Thanks MAO

/// ------------------------------------------------------------------------------------------------------------
/// NOTES: This BPM will notify users that default account could not be used when Purcharse order is “Other” type
/// LOGIC:
/// IMPORTANT:
/// NOTES:
/// DEVELOPER: MTOLOZA
/// Created On: 06/18/2019
/// ------------------------------------------------------------------------------------------------------------
/// Upated On:
/// Upated By:
/// Upate Comments:
/// ------------------------------------------------------------------------------------------------------------

foreach (var POHeader_Iterator in (from ttPOHeader_Row in ttPOHeader                                                          
                    select ttPOHeader_Row ))

{
var POHeaderXRow = POHeader_Iterator;
if ( POHeaderXRow != null)
{

  // - ::: LINK Header To Detail  
   foreach (var OrderHeaderDetail_Iterator in (from ttTranGLC_Row in Db.TranGLC
                        where 
                          string.Compare(POHeaderXRow.Company, ttTranGLC_Row.Company, true) == 0 &&
                          POHeaderXRow.Approve == true &&
                          POHeaderXRow.PONum == Erp.ErpEFFunctions.ConvertToInt(ttTranGLC_Row.Key1)   &&
                          ttTranGLC_Row.RelatedToFile == "PORel" 
                    select ttTranGLC_Row ))
  {
      
    var OrderHeaderDetailXRow = OrderHeaderDetail_Iterator;                 
    if (OrderHeaderDetailXRow != null)
      {
      if ( OrderHeaderDetailXRow.SegValue1 == "9680" )
        {
       // this.PublishInfoMessage("ERROR" , Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "9680", "Please Change Values");
       throw new Ice.BLException("ERROR: Do not use GLAccount 9680 as the default in the Release Screen");
        break;
       }
       
       
     }
    }
  
 
  }// END ::: if ( ttPOHeader_Row != null)
}  // END ::: foreach (var POHeader_Iterator i

Force them to use the part class and make sure that each part class has an expense account associated with it. Any “Other” PO Lines/Releases will have the proper account associated with it.

Create a BPM to have the Part Class required.

Charlie

2 Likes

I found trying to set (or even validate) the GL account on the PO Release to be very problematic.

We did what @CTCharlie suggested and use the PartClass to set it. And it’s quite simple to make a BPM to enforce the PartClass setting on the PO Line.

Also, we had a special need for Buy To Order purchases. So we created a part class of “BTO” (with GL controls), and a BPM that automatically sets the PartClass when the OrderNum field of a buy for “Other” line is created.

Preventing the user from using the default account will not guarantee selection of the right account. How about setting up the item(s) as non-stock and using the part class or part (and the GL controls) to attach the correct account?