20. April 2012 08:59
20. April 2012 09:39
21. April 2012 13:51
21. April 2012 16:11
24. April 2012 10:10
24. April 2012 10:24
24. April 2012 10:54
IF OrderCounter <> 0 THEN
IF NOT ReqTemplate.Recurring THEN BEGIN
// Not a recurring journal
ReqLine2.COPY(ReqLine);
ReqLine2.SETFILTER("Vendor No.",'<>%1','');
IF ReqLine2.FIND('-') THEN; // Remember the last line
IF FIND('-') THEN
REPEAT
TempFailedReqLine := ReqLine;
// IF NOT TempFailedReqLine.FIND THEN <---
// DELETE(TRUE); <---
UNTIL NEXT = 0;
TempJnlLineDim.DELETEALL;
// Not a recurring journal
OrderLineCounter := OrderLineCounter + LineCount;
IF NOT PlanningResiliency THEN
Window.UPDATE(5,OrderLineCounter);
ReqLine2.COPY(ReqLine);
ReqLine2.SETRANGE("Vendor No.",PurchOrderHeader."Buy-from Vendor No.");
ReqLine2.SETRANGE("Sell-to Customer No.",PurchOrderHeader."Sell-to Customer No.");
ReqLine2.SETRANGE("Ship-to Code",PurchOrderHeader."Ship-to Code");
ReqLine2.SETRANGE("Order Address Code",PurchOrderHeader."Order Address Code");
ReqLine2.SETRANGE("Currency Code",PurchOrderHeader."Currency Code");
IF ReqLine2.FIND('-') THEN BEGIN
ReqLine2.BlockDynamicTracking(TRUE);
ReservEntry.SETCURRENTKEY(
"Source ID","Source Ref. No.","Source Type","Source Subtype",
"Source Batch Name","Source Prod. Order Line");
REPEAT
TempFailedReqLine := ReqLine2;
IF NOT TempFailedReqLine.FIND THEN BEGIN
ReserveReqLine.FilterReservFor(ReservEntry,ReqLine2);
ReservEntry.DELETEALL(TRUE);
// ReqLine2.DELETE(TRUE); <---
24. April 2012 19:20