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.
IF Receive THEN BEGIN
PurchLine.“Quantity Received” := PurchLine.“Quantity Received” + PurchLine.“Qty. to Receive”;
PurchLine.“Qty. Received (Base)” := PurchLine.“Qty. Received (Base)” + PurchLine.“Qty. to Receive (Base)”;
END;
here it will check in CU90 whether there is any line with Qty to receive > 0 or not and uses Receive boolean for the same…
IF Receive THEN BEGIN
PurchLine.RESET;
PurchLine.SETRANGE(“Document Type”,“Document Type”);
PurchLine.SETRANGE(“Document No.”,“No.”);
PurchLine.SETFILTER(Quantity,’<>0’);
IF “Document Type” = “Document Type”::Order THEN
PurchLine.SETFILTER(“Qty. to Receive”,’<>0’);
PurchLine.SETRANGE(“Receipt No.”,’’);
IF Subcontracting THEN
PurchLine.SETRANGE(“Line No.”,SubConPostLine);
Receive := PurchLine.FINDFIRST;
**Mohana,**I have question similar to this : Would You like to tell me where I can find how Qty. to Receive are sent to some Location(after posting, and choosing Received). I guess is in a CodeUnit 90 too, but I am a bit confused.