26. Februar 2008 12:57
26. Februar 2008 17:04
thommes hat geschrieben:Hat schon mal jemand diese Stornofunktion so erweitert, dass auch die Zu-/Abschläge mit storniert werden?
26. Februar 2008 17:06
26. Februar 2008 17:39
OnRun(VAR Rec : Record "Purch. Rcpt. Line")
....
SetHideDialog(NewHideDialog : Boolean)
....
Code()
WITH PurchRcptLine DO BEGIN
SETRANGE(Correction,FALSE);
REPEAT
IF NOT HideDialog THEN
Window.OPEN(Text007);
CheckPurchRcptLine(PurchRcptLine);
UNTIL NEXT = 0;
FIND('-');
REPEAT
IF NOT HideDialog THEN
Window.OPEN(Text001);
InsertNewReceiptLine(PurchRcptLine);
UpdateOrderLine(PurchRcptLine);
IF ("Blanket Order No." <> '') AND ("Blanket Order Line No." <> 0) THEN
UpdateBlanketOrder(PurchRcptLine);
"Qty. Rcd. Not Invoiced" := 0;
Correction := TRUE;
MODIFY;
UNTIL NEXT = 0;
END;
CheckPurchRcptLine(PurchRcptLine : Record "Purch. Rcpt. Line")
WITH PurchRcptLine DO BEGIN
TESTFIELD(Type);
TESTFIELD("Qty. Rcd. Not Invoiced",Quantity);
END;
InsertNewReceiptLine(OldPurchReceiptLine : Record "Purch. Rcpt. Line")
Code gleich wie standard ausser:
InsertItemEntryRelation..... (wegfallen)
UpdateOrderLine(PurchRcptLine : Record "Purch. Rcpt. Line")
WITH PurchRcptLine DO BEGIN
IF PurchLine.GET("Document Type"::Order,"Order No.","Order Line No.") THEN BEGIN
PurchLine."Quantity Received" := PurchLine."Quantity Received" - Quantity;
PurchLine."Qty. Received (Base)" := PurchLine."Qty. Received (Base)" - "Quantity (Base)";
PurchLine.InitOutstanding;
PurchLine.InitQtyToReceive;
PurchLine.MODIFY;
END;
END;
26. Februar 2008 17:52