If you really want to do what you've described, you probably want to modify the class InventJournalFormTrans_Movement, in the fieldModifiedItemIdPost() method. I would add the code just after the this.setCostAmountEnabled() line, before the this.updateDesign(..) call. Here's an example of what you could do. inventJournalTrans.LedgerDimension = InventPosting::itemLedgerDimension( InventAccountType::PurchExpense, inventJournalTrans.ItemId, inventJournalTrans.inventTable().itemGroupId()); Note that there could not be a main account setup at all for your condition. This is provided for education purposes only. Test your solution thoroughly before implementing it into a production environment.
↧