When an obligation is set to post at the Invoice Stage for a certain amount, it is posted to the General Ledger. It debits the expense account and credits the Accounts Payable summary account.
If it is in Marked for pay and you want to change the amount of the Invoice, you must unmark the Invoice for pay, then change the amount on the invoice. When the edited invoice is posted, the journal entry will equal the difference of the first amount minus the second amount and that difference posts to the Accounts Payable summary account and the expense or offsetting account. The entry is dependent on whether the amount on the obligation was increased or decreased.
For Example: You originally post an invoice for $20,000
Dr: expense account for $20,000
Cr. Accounts Payable Summary account for $20,000
You unmark for pay, change the invoice amount to $3000 and repost:
Dr: Accounts Payable Summary account for $17,000
Cr. expense account for $17,000
Thus the net effect in the General Ledger is a Dr to the expense account for $3000 and a matching credit to the Accounts Payable summary account for $3000, which is the correct entry.