6. Mai 2015 13:06
SalesLine.RESET;
SalesLineArchive.RESET;
SalesLine.SETRANGE("Document Type", SalesLine."Document Type"::Order);
SalesLine.SETRANGE(Type, Type);
SalesLine.SETRANGE("No.", "No.");
IF SalesLine.FINDSET THEN BEGIN
ReqDeliveryDate := SalesLine."Requested Delivery Date";
END ELSE BEGIN
SalesLineArchive.SETRANGE("Document Type", SalesLineArchive."Document Type"::Order);
SalesLineArchive.SETRANGE(Type, Type);
SalesLineArchive.SETRANGE("No.", "No.");
SalesLineArchive.SETRANGE(SalesLineArchive."Version No.");
IF SalesLineArchive.FINDLAST THEN BEGIN
ReqDeliveryDate := SalesLineArchive."Requested Delivery Date";
END;
END;
6. Mai 2015 13:50
Boyrinho hat geschrieben:...Durch den FINDLAST müsste ich doch auf dem richtigen Dampfer sein, oder?
Oder kann mir bitte jemand Ratschläge geben?
...
7. Mai 2015 22:26
8. Mai 2015 10:06
11. Mai 2015 07:49
...
SalesLineArchive.SETRANGE("Document Type", SalesLineArchive."Document Type"::Order);
SalesLineArchive.SETRANGE(Type, Type);
SalesLineArchive.SETRANGE("No.", "No.");
SalesLineArchive.SETRANGE(SalesLineArchive."Version No.");
IF SalesLineArchive.FINDLAST THEN BEGIN
ReqDeliveryDate := SalesLineArchive."Requested Delivery Date";
...
11. Mai 2015 09:08
11. Mai 2015 09:46
11. Mai 2015 17:20
12. Mai 2015 07:27
SalesLine.RESET;
SalesLineArchive.RESET;
SalesLine.SETRANGE("Document Type", SalesLine."Document Type"::Order);
// >>> neu
SalesLine.setrange("Document No.","Order No.");
// <<< neu
SalesLine.SETRANGE(Type, Type);
SalesLine.SETRANGE("No.", "No.");
IF SalesLine.FINDSET THEN BEGIN
ReqDeliveryDate := SalesLine."Requested Delivery Date";
END ELSE BEGIN
SalesLineArchive.SETRANGE("Document Type", SalesLineArchive."Document Type"::Order);
// >>> neu
SalesLineArchive.SETRANGE("Document No.","Order No.");
// <<< neu
SalesLineArchive.SETRANGE(Type, Type);
SalesLineArchive.SETRANGE("No.", "No.");
SalesLineArchive.SETRANGE(SalesLineArchive."Version No.");
IF SalesLineArchive.FINDLAST THEN BEGIN
ReqDeliveryDate := SalesLineArchive."Requested Delivery Date";
END;
END;
12. Mai 2015 08:36
SalesLine.RESET;
SalesLineArchive.RESET;
SalesLine.SETRANGE("Document Type", SalesLine."Document Type"::Order);
SalesLine.SETRANGE("Document No.",SalesInvoiceLine."Order No.");
SalesLine.SETRANGE("Line No.", SalesInvoiceLine."Order Line No.");
SalesLine.SETRANGE(Type, Type);
SalesLine.SETRANGE("No.", "No.");
IF SalesLine.FINDSET THEN BEGIN
ReqDeliveryDate := SalesLine."Requested Delivery Date";
END ELSE BEGIN
SalesLineArchive.SETRANGE("Document Type", SalesLineArchive."Document Type"::Order);
SalesLineArchive.SETRANGE("Document No.",SalesInvoiceLine."Order No.");
SalesLineArchive.SETRANGE("Line No.", SalesInvoiceLine."Order Line No.");
SalesLineArchive.SETRANGE(Type, Type);
SalesLineArchive.SETRANGE("No.", "No.");
SalesLineArchive.SETRANGE(SalesLineArchive."Version No.");
IF SalesLineArchive.FINDLAST THEN BEGIN
ReqDeliveryDate := SalesLineArchive."Requested Delivery Date";
END;
END;
SalesLine.SETRANGE("Document Type", SalesLine."Document Type"::Order);
//SalesLine.SETRANGE("Document No.",SalesInvoiceLine."Order No.");
//SalesLine.SETRANGE("Line No.", SalesInvoiceLine."Order Line No.");
SalesLine.SETRANGE(Type, Type);
SalesLine.SETRANGE("No.", "No.");
12. Mai 2015 09:07
SalesLine.RESET;
SalesLineArchive.RESET;
SalesLine.SETRANGE("Document Type", SalesLine."Document Type"::Order);
SalesLine.SETRANGE("Document No.","Order No.");
SalesLine.SETRANGE("Line No.", "Order Line No.");
SalesLine.SETRANGE(Type, Type);
...
SalesLine.SETRANGE("Document No.",[b]SalesInvoiceLine."Order No."[/b]);
13. Mai 2015 07:50
..
SalesLineArchive.SETRANGE("Document Type", SalesLineArchive."Document Type"::Order);
SalesLineArchive.SETRANGE("Document No.","Order No.");
SalesLineArchive.SETRANGE("Line No.", "Order Line No.");
SalesLineArchive.SETRANGE(Type, Type);
SalesLineArchive.SETRANGE("No.", "No.");
// die folgende Zeile ist unnötig
// SalesLineArchive.SETRANGE(SalesLineArchive."Version No.");
IF SalesLineArchive.FINDLAST THEN BEGIN
ReqDeliveryDate := SalesLineArchive."Requested Delivery Date";
...
18. Mai 2015 09:24