You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear Support,
Could You please modify publisher in codeunit 5774 "Whse.-Production Release"?
<<<<< Original >>>>>
local procedure ProdOrderCompletelyPicked(LocationCode: Code[10]; ProdOrderNo: Code[20]; ProdOrderStatus: Enum "Production Order Status"; CompLineNo: Integer): Boolean
var
ProdOrderComp2: Record "Prod. Order Component";
begin
ProdOrderComp2.SetCurrentKey(Status, "Prod. Order No.", "Location Code");
ProdOrderComp2.SetRange(Status, ProdOrderStatus);
ProdOrderComp2.SetRange("Prod. Order No.", ProdOrderNo);
ProdOrderComp2.SetRange("Location Code", LocationCode);
ProdOrderComp2.SetFilter("Line No.", '<>%1', CompLineNo);
ProdOrderComp2.SetRange("Flushing Method", ProdOrderComp."Flushing Method"::Manual);
ProdOrderComp2.SetRange("Planning Level Code", 0);
ProdOrderComp2.SetRange("Completely Picked", false);
exit(ProdOrderComp2.IsEmpty());
end;
<<<<< Modified >>>>>
local procedure ProdOrderCompletelyPicked(LocationCode: Code[10]; ProdOrderNo: Code[20]; ProdOrderStatus: Enum "Production Order Status"; CompLineNo: Integer): Boolean
var
ProdOrderComp2: Record "Prod. Order Component";
begin
OnBeforeProdOrderCompletelyPicked(LocationCode, ProdOrderNo, ProdOrderStatus, CompLineNo, ProdOrderComp);
ProdOrderComp2.SetCurrentKey(Status, "Prod. Order No.", "Location Code");
ProdOrderComp2.SetRange(Status, ProdOrderStatus);
ProdOrderComp2.SetRange("Prod. Order No.", ProdOrderNo);
ProdOrderComp2.SetRange("Location Code", LocationCode);
ProdOrderComp2.SetFilter("Line No.", '<>%1', CompLineNo);
ProdOrderComp2.SetRange("Flushing Method", ProdOrderComp."Flushing Method"::Manual);
ProdOrderComp2.SetRange("Planning Level Code", 0);
ProdOrderComp2.SetRange("Completely Picked", false);
exit(ProdOrderComp2.IsEmpty());
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeProdOrderCompletelyPicked(ar LocationCode: Code[10]; var ProdOrderNo: Code[20]; var ProdOrderStatus: Option; var CompLineNo: Integer; var ProdOrderComp: Record "Prod. Order Component");
begin
end;
<<<<< Original >>>>>
procedure DeleteLine(ProdOrderComp: Record "Prod. Order Component")
var
ProdOrderComp2: Record "Prod. Order Component";
KeepWhseRqst: Boolean;
begin
KeepWhseRqst := false;
GetLocation(ProdOrderComp."Location Code");
ProdOrderComp2.SetCurrentKey(Status, "Prod. Order No.", "Location Code");
ProdOrderComp2.SetRange(Status, ProdOrderComp.Status);
ProdOrderComp2.SetRange("Prod. Order No.", ProdOrderComp."Prod. Order No.");
ProdOrderComp2.SetRange("Location Code", ProdOrderComp."Location Code");
ProdOrderComp2.SetFilter(
"Flushing Method", '%1|%2|%3',
ProdOrderComp2."Flushing Method"::Manual,
ProdOrderComp2."Flushing Method"::"Pick + Forward",
ProdOrderComp2."Flushing Method"::"Pick + Backward");
ProdOrderComp2.SetRange("Planning Level Code", 0);
ProdOrderComp2.SetFilter("Remaining Quantity", '<>0');
if ProdOrderComp2.Find('-') then
repeat
if ((ProdOrderComp2.Status <> ProdOrderComp.Status) or
(ProdOrderComp2."Prod. Order No." <> ProdOrderComp."Prod. Order No.") or
(ProdOrderComp2."Prod. Order Line No." <> ProdOrderComp."Prod. Order Line No.") or
(ProdOrderComp2."Line No." <> ProdOrderComp."Line No.")) and
((not ProdOrderComp2."Completely Picked") or
(not (Location."Require Pick" and Location."Require Shipment")))
then
KeepWhseRqst := true;
until (ProdOrderComp2.Next() = 0) or KeepWhseRqst;
if not KeepWhseRqst then
if Location."Require Shipment" then
DeleteWhsePickRqst(ProdOrderComp, false)
else
DeleteWhseRqst(ProdOrderComp, false);
OnAfterDeleteLine(ProdOrderComp);
end;
<<<<< Modified >>>>>
procedure DeleteLine(ProdOrderComp: Record "Prod. Order Component")
var
ProdOrderComp2: Record "Prod. Order Component";
KeepWhseRqst: Boolean;
begin
KeepWhseRqst := false;
GetLocation(ProdOrderComp."Location Code");
ProdOrderComp2.SetCurrentKey(Status, "Prod. Order No.", "Location Code");
ProdOrderComp2.SetRange(Status, ProdOrderComp.Status);
ProdOrderComp2.SetRange("Prod. Order No.", ProdOrderComp."Prod. Order No.");
ProdOrderComp2.SetRange("Location Code", ProdOrderComp."Location Code");
ProdOrderComp2.SetFilter(
"Flushing Method", '%1|%2|%3',
ProdOrderComp2."Flushing Method"::Manual,
ProdOrderComp2."Flushing Method"::"Pick + Forward",
ProdOrderComp2."Flushing Method"::"Pick + Backward");
ProdOrderComp2.SetRange("Planning Level Code", 0);
ProdOrderComp2.SetFilter("Remaining Quantity", '<>0');
OnBeforeFindProdOrderComp(ProdOrderComp, ProdOrderComp2);
if ProdOrderComp2.Find('-') then
repeat
if ((ProdOrderComp2.Status <> ProdOrderComp.Status) or
(ProdOrderComp2."Prod. Order No." <> ProdOrderComp."Prod. Order No.") or
(ProdOrderComp2."Prod. Order Line No." <> ProdOrderComp."Prod. Order Line No.") or
(ProdOrderComp2."Line No." <> ProdOrderComp."Line No.")) and
((not ProdOrderComp2."Completely Picked") or
(not (Location."Require Pick" and Location."Require Shipment")))
then
KeepWhseRqst := true;
until (ProdOrderComp2.Next() = 0) or KeepWhseRqst;
if not KeepWhseRqst then
if Location."Require Shipment" then
DeleteWhsePickRqst(ProdOrderComp, false)
else
DeleteWhseRqst(ProdOrderComp, false);
OnAfterDeleteLine(ProdOrderComp);
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeFindProdOrderComp(var ProdOrderComp: Record "Prod. Order Component"; var ProdOrderComp2: Record "Prod. Order Component")
begin
end;
<<<<< Original >>>>>
procedure Release(ProdOrder: Record "Production Order")
var
LocationCode2: Code[10];
CurrentSignFactor: Integer;
OldSignFactor: Integer;
begin
if ProdOrder.Status <> ProdOrder.Status::Released then
exit;
OnBeforeReleaseWhseProdOrder(ProdOrder);
LocationCode2 := '';
OldSignFactor := 0;
ProdOrderComp.SetCurrentKey(Status, "Prod. Order No.", "Location Code");
ProdOrderComp.SetRange(Status, ProdOrder.Status);
ProdOrderComp.SetRange("Prod. Order No.", ProdOrder."No.");
ProdOrderComp.SetFilter(
"Flushing Method",
'%1|%2|%3',
ProdOrderComp."Flushing Method"::Manual,
ProdOrderComp."Flushing Method"::"Pick + Forward",
ProdOrderComp."Flushing Method"::"Pick + Backward");
ProdOrderComp.SetRange("Planning Level Code", 0);
ProdOrderComp.SetFilter("Remaining Quantity", '<>0');
if ProdOrderComp.Find('-') then
CreateWhseRqst(ProdOrderComp, ProdOrder);
repeat
CurrentSignFactor := SignFactor(ProdOrderComp.Quantity);
if (ProdOrderComp."Location Code" <> LocationCode2) or
(CurrentSignFactor <> OldSignFactor)
then
CreateWhseRqst(ProdOrderComp, ProdOrder);
LocationCode2 := ProdOrderComp."Location Code";
OldSignFactor := CurrentSignFactor;
until ProdOrderComp.Next() = 0;
OnAfterRelease(ProdOrder);
end;
<<<<< Modified >>>>>
procedure Release(ProdOrder: Record "Production Order")
var
LocationCode2: Code[10];
CurrentSignFactor: Integer;
OldSignFactor: Integer;
begin
if ProdOrder.Status <> ProdOrder.Status::Released then
exit;
OnBeforeReleaseWhseProdOrder(ProdOrder);
LocationCode2 := '';
OldSignFactor := 0;
ProdOrderComp.SetCurrentKey(Status, "Prod. Order No.", "Location Code");
ProdOrderComp.SetRange(Status, ProdOrder.Status);
ProdOrderComp.SetRange("Prod. Order No.", ProdOrder."No.");
ProdOrderComp.SetFilter(
"Flushing Method",
'%1|%2|%3',
ProdOrderComp."Flushing Method"::Manual,
ProdOrderComp."Flushing Method"::"Pick + Forward",
ProdOrderComp."Flushing Method"::"Pick + Backward");
ProdOrderComp.SetRange("Planning Level Code", 0);
ProdOrderComp.SetFilter("Remaining Quantity", '<>0');
OnBeforeFindProdOrderComp2(ProdOrder, ProdOrderComp);
if ProdOrderComp.Find('-') then
CreateWhseRqst(ProdOrderComp, ProdOrder);
repeat
CurrentSignFactor := SignFactor(ProdOrderComp.Quantity);
if (ProdOrderComp."Location Code" <> LocationCode2) or
(CurrentSignFactor <> OldSignFactor)
then
CreateWhseRqst(ProdOrderComp, ProdOrder);
LocationCode2 := ProdOrderComp."Location Code";
OldSignFactor := CurrentSignFactor;
until ProdOrderComp.Next() = 0;
OnAfterRelease(ProdOrder);
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeFindProdOrderComp2(var ProdOrder: Record "Production Order"; var ProdOrderComp: Record "Prod. Order Component")
begin
end;
Additional context
due to customer modification
Thank you in advance!
The text was updated successfully, but these errors were encountered:
Describe the request
Dear Support,
Could You please modify publisher in codeunit 5774 "Whse.-Production Release"?
<<<<< Original >>>>>
<<<<< Modified >>>>>
<<<<< Original >>>>>
<<<<< Modified >>>>>
<<<<< Original >>>>>
<<<<< Modified >>>>>
Additional context
due to customer modification
Thank you in advance!
The text was updated successfully, but these errors were encountered: