Postings:AP Invoice
AP INVOICE
| Post AP Invoice | Pre Post | Post | Delete | Create | Unpost |
| If - AP sub total doesn't equal the invoice total | X | X | X | X | X |
| *Update - AP sub total to invoice total | X | X | X | X | X |
| Validate - AP date past the closing date | X | ||||
| Validate - AP date within the GL Edit Days limitations for the user | X | ||||
| Update - Current Payment Totals | X | X | X | X | |
| * Total all Payments attached to this invoice | X | X | X | X | |
| * Update the Amount Paid and Amount Credited on the Invoice to those payment totals | X | X | X | X | |
| Validate - Make sure payments do not exist before deleting. | X | ||||
| Delete - Journal Entry - Delete all journal entries attached to this invoice. GL.Delete | X | X | X | ||
| If - Invoice is related to an inventory recipt | X | X | X | ||
| *Delete - Relationship - Remove Relationship between invoice and inentory transaction | X | X | X | ||
| *Delete - Relationship - Remove Relationship between invoice and inventory reciept | X | X | X | ||
| Else | X | X | X | ||
| *Delete - Inventory Transactions - Delete any inventory transactions attached to this invoice. PostInventory | X | X | X | ||
| If - Invoice is related to an inventory recipt | X | ||||
| *Update - Qty recieved - When a invoice is deleted it also deletes the inventory transaction so we need to put the original received amount back in PostInvTranHeader | X | ||||
| Create - Journal Entry GL.NewJournalEntry | X | X | |||
| *Create - Ledger line related to the default GL account - Accounts Payable is a credit in the ammount of the invoice total GL.AddLedgerLine | X | X | |||
| *Create - Ledger line related to the default GL account - Shipping Expense is a debit in the amount of the invoice shipping GL.AddLedgerLine | X | X | |||
| *Create - Ledger line related to the default GL account - Sales Tax Expense is a debit in the amount of the invoice tax total GL.AddLedgerLine | X | X | |||
| For Each - Invoice Line | X | X | |||
| *Create - Inventory Transactions - PostInventory | X | X | |||
| Update - Balance - Update the Balance on the Chart accounts related to the ledger lines GL.Post | X | X | X | X |