Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

I'm trying to Restrict the updating Receipt after payment on posted Purchase Order ..

$
0
0
If the Invoice is already paid or Partially paid For the Purchase order,again same PO should not allow to post to receive.for this requirement I wrote below code
IF PurchaseHeader.Receive THEN BEGIN
PurInvHdrRec.SETRANGE("Order No.", PurchaseHeader."No.");
IF PurInvHdrRec.FINDSET THEN BEGIN
LineAmt := 0;
RemAmt := 0;
REPEAT
;
LineAmt += PurInvHdrRec.Amount;
RemAmt += PurInvHdrRec."Remaining Amount";

UNTIL (PurInvHdrRec.NEXT = 0);

PurInvHdrRec."Buy-from Vendor Name", PurInvHdrRec."Posting Description");
IF LineAmt <> RemAmt THEN
ERROR('You cannot receive more Items in this Purchase Order');
END;
END;
now my issue is the amount and remaining amount showing 0 for brief clarification pls find the attachment .and kindly help me out

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>