Sales Orders

Can someone tell me what triggers need to be modified in the Purchase Order so that the Quantity to Receive & Quantity to Invoice fields always default to zero? Thanks! Diana Burton Beck Consulting, Inc. Edited by - Diana on 7/26/00 3:57:04 PM

In the Purchase Line table, change the functions InitQtyToReceive and InitQtyToInvoice to set the respective fields to 0.

I included a statement in both the InitQtytoReceive & InitQtytoInvoice triggers setting the fields to zero. Indeed when I create a new PO, both fields have a blank(zero) value, however, when I try to enter a quantity to receive as soon as I leave the field, it defaults back to zero. What else do I have to do to make this work. It seems like it should be so simple. Thanks again for your help! Diana Burton Beck Consulting, Inc.

Diana, You have to check all the validate calls in the quantity trigger, quantity to ship trigger and the quantity to invoice trigger. That is the best way to find out where the fields are being set to zero again. Roelof.

Diana In you InitQtyToReceive & Invoice Is there a new or existing field you can test for a Value IE: PurchHeader.GET(“Document Type”,“Document No.”); IF (PurchHeader.“On Hold” <> ‘’)OR (NOT PurchHeader.“Goods Received”) THEN BEGIN // Clear Values “Quantity to Receive”:=0; “Qty. to Receive (Base)”:=0; EXIT; END; Mr David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk

Try removing the call to InitQtyToReceive in the OnValidate trigger of “Purchase Line”.Quantity.

The InitQtyToReceive populates the Qty. to Receive (Base) which is the Quantity that is Received to the Item Ledgers. Removing the call to InitQtyToReceive would result in Zero Quantity being received to the Ledgers, even if the Qty. to Receive has a Value. Rememer the purchase Line is for Multi Documents Quote,Order,Credit Memo,Blanket Order and the Qty. to receive is only on the Order Sub Form. Jack Reynolds Wrote: Try removing the call to InitQtyToReceive in the OnValidate trigger of “Purchase Line”.Quantity. Mr David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk Edited by - David Cox on 7/28/00 12:05:53 PM

Removing the call to InitQtyToReceive will keep the Qty. to Receive field from defaulting to the Outstanding Quantity when changes are made to the Quantity. The user can always enter the desired quantity to receive directly into the Qty. to Receive field. The call to InitQtyToReceive can, of course, be made conditional based on the value of the Document Type field.

Thanks for all the information guys. I’ve tried removing the call to InitQty to Receive in the OnValidate trigger of “Purchase Line”.Quantity… 1. On a new Purchase Order, it now defaults the Qty to Receive & Invoice to Zero, but if you receive a partial quantity, the Qty to Receive & Invoice are then filled with the Remaining quantity to Receive/Invoice. 2. On a Purchase Invoice, it is also setting the Qty to Receive & Qty to Invoice to zero. Normally the user doesn’t see these fields on a Purchase Invoice, so does this mean they will have to handle the INvoice the same as a PO with Qty to Receive & Qty to Invoice? 3. Is there a way to have the Purchase Invoice use the normal code but a PO use the modified code??? Diana Burton Beck Consulting, Inc.

To check the document type just go if “Document Type”<>“Document Type”::Invoice then begin //set the fields you want to 0/make the call to a function here. end; Craig Bradney Project Manager - Technical Navision Solutions & Services Deloitte Growth Solutions Deloitte Touche Tohmatsu P:+61-2-9322-7796 F:+61-2-9322-7502 E:craig_bradney@deloitte.com.au