web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Creating manual invoices, item ledger not filled in.

(0) ShareShare
ReportReport
Posted on by 487

Greetings,

I am encoutering a big issue in our extension.

The flow: 

- We create sales shipping lines/headers from a custom document by inserting them manually, and using item jnl-post code unit.

- We create a new invoice, and import the shipping lines

- We post the invoice

Everything seem to work, except, when we try to correct an invoice, the lines do not exist in "Item Ledger Entry", so it gives an error.

Also, a lot of report, dont seem to see the invoices, as they seem to be based on item ledger entry and entry values.

Any idea on why item ledger entries are not filled in by business central when posting an invoice? Where should I look on whats happening please?

Regards

HD

I have the same question (0)
  • Daniel Rimmelzwaan Profile Picture
    3,485 on at
    RE: Creating manual invoices, item ledger not filled in.

    Lots of questions in a single post  I can't speak to your solution and why it doesn't work, you will need to get someone involved (i.e. hire someone) to look at that in detail. In general though, the design approach that I would take is quite different from a solution point of view:

    BC has its own process, where you have to create a sales order, and post the shipping from the order. By calling the Sales-Post routine with the sales order, the system will automatically take care of everything you need. It will post the proper item journals, which in turn will create the proper ILE's and Value Entries, and it will prepare the system to create the invoice.

    I would never program a process to create posted documents directly. I have, in fact, declined to work on jobs where that was the "requirement", only to be pulled back in when we had to fix all the issues that were created as a result. The BC posting routines are robust enough to rely on, and they will make sure that everything is posted at least consistently.

    Then, for the invoicing part, you have two choices: Either you post the invoice from the same sales order, or you create an unposted invoice and pull in the shipment lines to link to. There is a process in BC that does this for you, and you can extend that to customize the process.

    The standard approach is: YOU write the code to create the unposted document, and you then utilize the standard posting to get the posted transactions into the system. I would stay away from creating posted documents directly altogether.

    One more thing: the invoicing process does not create Item Ledger Entries, the shipping process does that. You could create an unposted invoice for items, and post that, but internally, the system will call the shipping process to take care of the proper item ledger entries. By default, you post the shipment first (which creates the ILEs) and then you post the invoice (which creates the Customer Ledger Entries). The standard posting routine will take care of the posted documents for you, no need to write any code for that.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 4,304

#2
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,045

#3
Sumit Singh Profile Picture

Sumit Singh 2,970

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans