Yes just charge to same GL code on the sales invoice line. Does mean you will have to leave main control account (accounts receivable) with direct posting swtched on.
I tried your solution but it’s not right. Here is the problem: This is AR, so you must link it to a Customer Code for Customer Balance’s reports. In your solution, the AR in Lines is not link to a Customer Code, so the customer’s balance is wrong.
I must say that I am not sure if I understand your question or what your problem is.
When you create an invoice with one line, then this results in 3 gl entries. Debit: Customer No. → Cust. Post. Group gl account no., Credit: The account no. from the sales invoice line (or deviated from the item/resource post group). Finally a VAT entry as well.
The gl entries are identified by the document type/no. and posting date (plus a transaction no.).
When posting the invoice NAV also creates a Customer Ledger Entry. This entry is linked to the customer G/L entry.
If you need to see the balance AR balance for a customer, then you lookup the sum of customer ledger entries, just like the balance flowfield on the customer does it. You don’t use G/L to see the balance of a single customer.
About this problem, i’d consulted my customer to use a temp account instead of using AR account in the Sales Lines. This is standard and no need customization at all.
Thank you a lot for replying.
@Mr. Fraser
Yes, my idea is to change the sales line to a customer account. But my technical team told me that this will take a lot of effort, so I’d consulted my customer to use temp account.
@Mr. Erik
The problem is that I want the account in lines is AR as well. As Mr. Fraser said: change sales line to a customer account. So when I post the invoice, both header and lines will go to Customer Ledger Entry.