Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ codeunit 99001503 "Subcontracting Comp. Init."
ReqWkshTempNameLbl: Label 'SUBCONTR', MaxLength = 10;
ReqWkshDescLbl: Label 'Subcontracting', MaxLength = 100;
ReqWkshNameLbl: Label 'SUBCONTR', MaxLength = 10;
DefaultInboundWhseHandlingTimeLbl: Label '<1D>', Locked = true;
DefaultCompTransferLeadTimeLbl: Label '<1D>', Locked = true;

procedure CreateBasicSubcontractingMgtSetup()
begin
Expand All @@ -34,7 +34,7 @@ codeunit 99001503 "Subcontracting Comp. Init."
exit;

ManufacturingSetup."Create Prod. Order Info Line" := true;
Evaluate(ManufacturingSetup."Subc. Inb. Whse. Handling Time", GetDefaultInboundWhseHandlingTime());
Evaluate(ManufacturingSetup."Subc. Comp. Transfer Lead Time", GetDefaultCompTransferLeadTime());
ManufacturingSetup.Modify(true);
end;

Expand Down Expand Up @@ -81,8 +81,8 @@ codeunit 99001503 "Subcontracting Comp. Init."
RequisitionWkshName.Insert(true);
end;

local procedure GetDefaultInboundWhseHandlingTime(): Text
local procedure GetDefaultCompTransferLeadTime(): Text
begin
exit(DefaultInboundWhseHandlingTimeLbl);
exit(DefaultCompTransferLeadTimeLbl);
end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ codeunit 99001505 "Subcontracting Management"
PurchOrderExistErr: Label 'The currently selected component %1 is already used in Purchase Order %2. Therefore, it is not permitted to change the %3 field.', Comment = '%1=Item No, %2=Purchase Order No, %3=Field Caption';
HasManufacturingSetup: Boolean;

procedure CalcReceiptDateFromProdCompDueDateWithInbWhseHandlingTime(ProdOrderComponent: Record "Prod. Order Component") ReceiptDate: Date
procedure CalcReceiptDateFromProdCompDueDateWithCompTransferLeadTime(ProdOrderComponent: Record "Prod. Order Component") ReceiptDate: Date
begin
GetManufacturingSetup();
if not HasManufacturingSetup or (Format(ManufacturingSetup."Subc. Inb. Whse. Handling Time") = '') then
if not HasManufacturingSetup or (Format(ManufacturingSetup."Subc. Comp. Transfer Lead Time") = '') then
exit(ProdOrderComponent."Due Date");

ReceiptDate := CalcDate('-' + Format(ManufacturingSetup."Subc. Inb. Whse. Handling Time"), ProdOrderComponent."Due Date");
ReceiptDate := CalcDate('-' + Format(ManufacturingSetup."Subc. Comp. Transfer Lead Time"), ProdOrderComponent."Due Date");

exit(ReceiptDate);
end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ report 99001501 "Subc. Create Transf. Order"
TransferLine.Validate(Quantity, Round(QtyToPost / ProdOrderComponent."Qty. per Unit of Measure", Item."Rounding Precision", '>'));

if ProdOrderComponent."Due Date" <> 0D then
TransferLine.Validate("Receipt Date", SubcontractingManagement.CalcReceiptDateFromProdCompDueDateWithInbWhseHandlingTime(ProdOrderComponent));
TransferLine.Validate("Receipt Date", SubcontractingManagement.CalcReceiptDateFromProdCompDueDateWithCompTransferLeadTime(ProdOrderComponent));

TransferLine."Subc. Purch. Order No." := PurchaseLine."Document No.";
TransferLine."Subc. Purch. Order Line No." := PurchaseLine."Line No.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ pageextension 99001542 "Subc. Manufacturing Setup" extends "Manufacturing Setup"
ApplicationArea = Manufacturing;
ToolTip = 'Specifies whether an additional Information Line of the Production Order Line will be created in a Subcontracting Purchase Order.';
}
field("Subc. Inb. Whse. Handling Time"; Rec."Subc. Inb. Whse. Handling Time")
field("Subc. Comp. Transfer Lead Time"; Rec."Subc. Comp. Transfer Lead Time")
{
ApplicationArea = Manufacturing;
ToolTip = 'Specifies the time to calculate the Receipt Date in Transfer Line. The calculation will be Due Date from Prod. Order Component minus the entered date formula.';
ToolTip = 'Specifies the lead time for transferring components to the subcontractor. This time is subtracted from the production component due date to calculate the transfer order receipt date.';
}
field("Subcontracting Template Name"; Rec."Subcontracting Template Name")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ tableextension 99001501 "Subc. Manufacturing Setup" extends "Manufacturing Setup
OptionCaption = 'Standard,Prod. Order Component';
OptionMembers = Standard,"Prod. Order Component";
}
field(99001505; "Subc. Inb. Whse. Handling Time"; DateFormula)
field(99001505; "Subc. Comp. Transfer Lead Time"; DateFormula)
{
Caption = 'Subcontracting Inbound Whse. Handling Time';
Caption = 'Subcontracting Component Transfer Lead Time';
DataClassification = CustomerContent;
}
field(99001509; "Subc. Default Comp. Location"; Enum "Components at Location")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ codeunit 139989 "Subc. Subcontracting Test"

ManufacturingSetup.Get();

ExpectedDate := CalcDate(ManufacturingSetup."Subc. Inb. Whse. Handling Time", TransferLine."Receipt Date");
ExpectedDate := CalcDate(ManufacturingSetup."Subc. Comp. Transfer Lead Time", TransferLine."Receipt Date");

Assert.AreEqual(ExpectedDate, ProdOrderComp."Due Date", '');

Expand Down Expand Up @@ -3311,7 +3311,7 @@ codeunit 139989 "Subc. Subcontracting Test"
ManufacturingSetup: Record "Manufacturing Setup";
begin
ManufacturingSetup.Get();
Evaluate(ManufacturingSetup."Subc. Inb. Whse. Handling Time", '<1D>');
Evaluate(ManufacturingSetup."Subc. Comp. Transfer Lead Time", '<1D>');
ManufacturingSetup.Modify();
end;

Expand Down
Loading