@Moh'd - Is it going to assing GL by itself or user has to change manually.
@Tricia- Recently I created utility for Sales transaction to post/ create GL Account base on SITE. Each Site has different Sales, COGS and Invenotry account. User requirement is to assign GL account by itself. - Solution is create transaction with default General Entry-post it and recreate another reversal entry for Original Transactions with correct GL account by site. You may use same logic for your transaction types.
Let me know if you need any help on this.
Thanks
Sandip