Error while posting Purchase Order with Item charges

toshitaporitoshitapori Member Posts: 52
Hello,

I am using Nav 3.70 with sql. The problem i am having is as follows. If i create a purchase order and assign Item charges by amount for the lines entered i am unable to post the purchase order from the warehouse receipt created. It comes up with error message saying you cannot assign more than 0 units in Doc Type=xxx, Doc no=xxx, Line No.=xxx.

Can any body explain me why i am getting this error or if someone has see this kind of error. I tried to post a purchase order where location on purchase line is not warehouse location and it allows me to post the PO with item charges but not in the case where i have a warehouse managed location. Moreover i tried it in version 5 and it allows me to post the PO with item charges assignment by amount. So i tried to compare the codeunit 90 for both the version and could not figure out anything different.

In 3.70 it falls at the point in codeunit 90 in the function CopyAndCheckItemCharge


IF ABS(PurchLine2."Qty. to Assign" + PurchLine2."Qty. Assigned") >
ABS(PurchLine2."Qty. to Invoice" + PurchLine2."Quantity Invoiced")
THEN
ERROR(Text036,
PurchLine2."Qty. to Invoice" + PurchLine2."Quantity Invoiced" -
PurchLine2."Qty. Assigned",PurchLine2.FIELDCAPTION("Document Type"),
PurchLine2."Document Type",PurchLine2.FIELDCAPTION("Document No."),
PurchLine2."Document No.",PurchLine2.FIELDCAPTION("Line No."),
PurchLine2."Line No.");

Can someone please suggest me what is wrong ???? Is it a bug in 3.70 ???

rgds.
toshitapori

Comments

  • Saint-SageSaint-Sage Member Posts: 92
    At the point where the debugger stops, what are the current values for Qty To Assign, Qty Assigned, Qty to Invoice, and Quantity Invoiced?

    No one loves you like the one who created you...
  • toshitaporitoshitapori Member Posts: 52
    Hi Saint,
    The values are like this 1+0 > 0+0 for the corresponding fields. Now i am wondering why is Qty to Invoice = 0 as i have specified qty as 1 in the line of type Item(Charge). After i try to post the warehouse recipt it blanks the qty to invoice to zero so thats why i am getting the error message bcoz the if condition gets true but the imp question here is that i am doing it on standard 3.70 and the code is not modified so why it is falling over????

    rgds,
    toshitapori
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    I guess there might be a bug that it sets the qty to receive to 0 at warehousing locations not only for line type= item but also for item charge. And qty. to receive in turn sets qty. to invoice to 0.

    It's almost surely somewhere in table 39 - in 5.0 there is a function called UpdateWarehouseReceive in table 39, there must be something like that in 3.7 as well. Search the code in table 39 for Qty. to Receive and tell it to do it only if it's an Item.
Sign In or Register to comment.