Surely this is a bug (CU 5763)

I just came across this piece of code,

I had not batch posted shipments before, so never really noticed it.

The code was sort of correct in 3.10, but in 3.60 they added the Counter incorrectly, the error remains in 5.00. So is it possible that such an obvious bug as this has been there for this many years, or am I just blind.

In my opinion the code should read:

Cool. [:P]

I am not much of a warehouse guru but this seems weird.

The IF Codeunit piece during another posting transaction is dangerous because it ofthen needs commits, but then again, CU80 has several. [:S]

The original code from 3.10 (the last working version) was this

Its obvious that someone started to add the counter but then messed it all up. By the way the error is about 4 times in the same code unit in similar areas. And yes, once they removed the IF, they no longer needed the COMMIT, but then of course the whole function is meaning less.

IF A then do xyz but if Not A well just do xyz anyway.

Yes, definitely it’s a bug.
In current implemented way, it always stops on errors.

Submit that error in partnersource. Maybe some day they will solve that problem. [:P]

Well its been there about 5-6 years now, and no one complained, so I guess no one uses that function.

Most implementations post one document at the time, so users don’t notice this feature.

Good! I think you’re right. Although I had to read your post a few times before I could see the differences in the two options.

Sorry not a developer [;)] Any chance of a “translation” so I can throw my tuppence in!

Nuno - shipments are generally controlled individually, but invoicing is generally batch posted. The issue with just “shipping” everything is there is no control. If you have warehouse implemented you cannot batch ship anyway, but there are very few occassions where you would simply batch ship everything. That said I have two sites that do it based on the filters, but one the “shipment” is not the movement of goods, it is to create the posted shipment to track against and the invoice goes with the goods, the other batch ship sales orders based upon filtered drop shipment dates. However neither are using full warehousing (or even picks and putaways in these examples).

It really depends on the requirement at hand and what’s the best and most efficient way to resolve the client’s processing.

With that being said, I do have an installation site that does batch posting of shipping and invoicing and I’ve never noticed any problems with the counters at all. They’re on 3.7b. [^o)]

Translation[:)] : It always run in mode “Stop and show the first posting error”. If an error happens it stops execution.

Steve, when I said batch I was say one shipment ship several invoices. Sorry for explaining myself wrong.

Its hard to see the difference because both options are the same code [:|]. The worst thing is that the same fundamental mistake appears three times in the same CodeUnit. its as if someone started copying the code, then went to lunch, then forgot to modify the second bit to do something different.

Basically the developer has a CASE statement that says

IF condition A then

do XYZ, or

IF condition B then

also do XYZ.

So in other words, completely ignore the condition. In fact these two pieces of code:


Are exactly the same.

This only affects warehouse shipping, not normal Navision Inventory shipping. The issue is not with Counters, the problem is that if say you have a batch of 1,000 orders, and say the second one has a blocked item, then the process stops, and you would just have to keep filtering out all the orders that did not ship until it is all posted.

I am thinking that this probably happened just at the time of the Microsoft Takeover, so maybe the developers had other things on their mind at the time. [;)]

[:D] [:D] [:D]

I am thinking no one batch ships warehouse shipments [:D]

Thank you for the explanation!