Quantity Delivered on Purchase Order

liizzliizz Member Posts: 125
Hi all,

I am working on codes for a purchase order and I have created 3 fields: Quantity, Qty. To Deliver and Quantity Delivered.

Let's say Quantity=5, Quantity Delivered=0

Initially,

The field Qty. To Deliver:= Quantiy

But, I change the quantity for the field Qty. To Deliver to 3 and I want the Quantity Delivered to be from 0 to 3.

I have checked the standard codes but I am still unable 2 do so.

Please help.

Thanks

Comments

  • SogSog Member Posts: 1,023
    Even though modifying a field in a record after another field has been modified is quite easy, I fail to see logic and a business process that would benefit from your query.
    What situation are you trying to resolve and why did you choose this way of working?
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • liizzliizz Member Posts: 125
    Hi,

    I wish to get some clarifications on the field Qty. to Receive and Quantity Received after posting. The calculations made on these fields when doing only Receive option.

    These codes are present on the codeunit 90 but I am confused on how they made calculations on Qty. to Receive and Quantity Received fields.

    Thanks

    Liizz
  • SogSog Member Posts: 1,023
    The qty. to receive is a workfield. The end-user uses this field to define how much is actually received from 1 receipt of that order.
    When the user posts the order and chooses receive, the system will only receive the quantity defined in the "qty. to receive" field. During posting, the system copies the "qty. to receive" to the "quantity received" field (and modifies also some other fields) and puts either the outstanding quantity or 0 in "qty. to receive" after posting.
    This way the system maintains how much is received vs the actual ordered quantity on the document itself.

    The fact that you don't know this and are developing in NAV, I must ask. Is this for personal training or is this a request from a customer/boss?
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • liizzliizz Member Posts: 125
    It is personal training.

    But how do we check if the Purchase has been posted when not all the Quantity has been received.

    Lets say,

    Quantity=4, Qty to Receive=3[Before posting]

    Qty. to Receive=1, Quantity Received=3, Qty. to Invoice=4[After posting]

    I feel that there is a validation being done before transfer fields to posted tables.

    Please advise.

    Thanks

    Liizz
  • SogSog Member Posts: 1,023
    Not only a validation, you'll find a posted receipt in your historie. Containing the order number and the actual quantities received. The validation is a posting procedure, that checks the lines if they are correct, checks the posting setups, checks the balance, ...
    If anything is incorrect, an error will be shown and any modifications in the database are rolled back.
    A purchase however, cannot be posted (as in invoice + movements on the general ledger + movements on item ledger + ...)
    when the quantity to invoice exceeds the quantity received. (or received + to receive if receiving and posting)
    Which means that when you have received 3 pieces and want to invoice 4, you cannot do that until you receive the additional 1 piece also.

    NAV is built in a way that you cannot invoice more than you've received/shipped.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
Sign In or Register to comment.