Error while posting Non-Inventoriable Cost, from Purchase Invoice

Hi All,

I am getting an error while posting Purchase Invoice …

error message - Applies to Enty must not be 0 in Item Journal Template=’’, Item Journal Batchname=’’, Line no = 0

Details
Purchase Invoice - Charge Item - “Non-inventoraible” - Assignment - Function → “Get Shipment line”… (completely assigned.)

What could be the reason. please help.

Regards

M. Ramanath

The error suggests that the charge is not being applied to an item ledgger entry. More information is needed. What type of Shipment are you applying to? Has there been any mods made to the system?

Are there other lines on the invoice, or just the one?

Hi David,

Sales Side - Order posted - Shipped and Invoiced .

Purchase side - Trying post Item charge assignment - After assignment - Rem. Assign = 0 (Qty,Amount)

Regards

M. Ramanath

What version?

Any modifications?

Version 4.0 - SP1.

One interesting observation.

In the same database, I have a cronus company and when I am trying to post the same kind of Purchase Invoice, there is no error and its gettng posted. I feel, this is more like a setup issue.

what could be issue?

Comparing the assignment lines between Cronus and your company are there any obvious differences in the state of the shipment line?

Can you apply it to another shipment in a test environment?

If you go to the posted shipment and navigate to the item ledger entries and focus on the item concerned does it have an applies-to entry number?

I have created, new Purchase Invoice as well I have created few new Shipments.

Irrespective of the shipmentlines, I am facing the same problem.

I have checked all the shipment lines. For all lines"Applies to entry" is 0.

Comparing the assignment lines between Cronus and your company are there any obvious differences in the state of the shipment line? — I couldn’t find much. Any tips?

Ask your reseller for some assistance, they can look at the detail of the issue, and use debugger etc.

I presume you have the stock you are shipping? So you are not going negative?

Hi All,

When we debug, I found out one probelm. When there is no “Lot tracking”, then there is no problem in assigning. If we assigned “lot no.”, then this error appear.

Looks like Navision Standard error in APAC database. Need to report now.

Thanks a lot for your support

Dear All,

Please find the solution for the above problem

In Codeunit 90 (Purch.-Post) - PostItemChargePerSalesShpt:

OLD CODE:

IF SalesShptLine.“Item Shpt. Entry No.” <> 0 THEN DistributeCharge := CostCalcMgt.SplitItemLedgerEntriesExist(

TempItemLedgEntry,-SalesShptLine.“Quantity (Base)”,SalesShptLine.“Item Shpt. Entry No.”) ELSE BEGIN ItemTrackingMgt.CollectItemEntryRelation(TempItemLedgEntry,

DATABASE::“Sales Shipment Line”,0,SalesShptLine.“Document No.”, ‘’,0,SalesShptLine.“Line No.”,SalesShptLine.“Quantity (Base)”); END;

IF DistributeCharge THEN

NEW CODE:

IF SalesShptLine.“Item Shpt. Entry No.” <> 0 THEN DistributeCharge := CostCalcMgt.SplitItemLedgerEntriesExist(

TempItemLedgEntry,-SalesShptLine.“Quantity (Base)”,SalesShptLine.“Item Shpt. Entry No.”) ELSE BEGIN DistributeCharge := TRUE; // ADDED ItemTrackingMgt.CollectItemEntryRelation(TempItemLedgEntry,

DATABASE::“Sales Shipment Line”,0,SalesShptLine.“Document No.”, ‘’,0,SalesShptLine.“Line No.”,SalesShptLine.“Quantity (Base)”); END;

IF DistributeCharge THEN