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
In this codeunit, for calculation of the availability to promise every sub-procedure etc. has events to customize the code.
For calculation of CalcEarliestAvailabilityDate this is not the case (or only for parts of the code).
CalculateAvailability and all its sub-parts have events
New event - UpdateAvailability
UpdateAvailabilityOnBeforeInsertModify(var AvailabilityAtDate: Record "Availability at Date"; Date: Date; var ScheduledReceipt: Decimal; var GrossRequirement: Decimal)
if RecordExists then
AvailabilityAtDate.Modify()
else
AvailabilityAtDate.Insert();
New event - CalculateAvailabilityByPeriod
CalculateAvailabilityByPeriodOnBeforeDeleteAvailabilityAtDate(var AvailabilityInPeriod: Record "Availability at Date";AvailabilityAtDate: Record "Availability at Date")
Parameters of this event are not sufficient to replace the code it should be used for.
New Parameters
ExcludeOnDate: Date
New Event - CalculateAvailabilityByPeriod
CalculateAvailabilityByPeriodOnBeforeNextTempAvailabilityAtDate(AvailabilityAtDate: Record "Availability at Date")
Call
repeat
if PeriodStart = 0D then
PeriodStart := TempAvailabilityAtDate."Period Start";
ScheduledReceipt += TempAvailabilityAtDate."Scheduled Receipt";
GrossRequirement += TempAvailabilityAtDate."Gross Requirement"; CalculateAvailabilityByPeriodOnBeforeNextTempAvailabilityAtDate(...)
until TempAvailabilityAtDate.Next() = 0;
New Event - CalculateAvailabilityByPeriod
CalculateAvailabilityByPeriodOnAfterCalculateAvailableQty(var AvailableQty: decimal;var Item: Record "Item"; ScheduledReceipt: decimal; GrossRequirement: decimal)
Call
AvailableQty := Item.Inventory - Item."Reserved Qty. on Inventory" + ScheduledReceipt - GrossRequirement; CalculateAvailabilityByPeriodOnAfterCalculateAvailableQty(...)
if AvailableQty >= NeededQty then begin
Existing Event - OnBeforeUpdateAsmCompAvail
Parameters of this event are not sufficient to replace the code it should be used for.
New Parameter is needed for function AreEqualAssemblyLines
New Parameters
ChangedAssemblyLine: Record "Assembly Line";
Additional context
In Steel Industry, one quantity is not enough for any process. Therefore our current Business Central is customized for using a second quantity. Every item has furthermore two inventories instead of one. An inventory measured by the base UOM (the standard) and a second one measure by its second UOM.
Example:
A customer orders approx. 2 tons of steel sheets, /.100 pieces.
Quantity: 2000
UOM: KG
Sec. Quantity: 100
Sec. UOM: PCE
The text was updated successfully, but these errors were encountered:
Describe the request
In this codeunit, for calculation of the availability to promise every sub-procedure etc. has events to customize the code.
For calculation of CalcEarliestAvailabilityDate this is not the case (or only for parts of the code).
CalculateAvailability and all its sub-parts have events
New event - UpdateAvailability
UpdateAvailabilityOnBeforeInsertModify(var AvailabilityAtDate: Record "Availability at Date"; Date: Date; var ScheduledReceipt: Decimal; var GrossRequirement: Decimal)
Call
AvailabilityAtDate."Scheduled Receipt" += ScheduledReceipt;
AvailabilityAtDate."Gross Requirement" += GrossRequirement;
UpdateAvailabilityOnBeforeInsertModify(...)
if RecordExists then
AvailabilityAtDate.Modify()
else
AvailabilityAtDate.Insert();
New event - CalculateAvailabilityByPeriod
CalculateAvailabilityByPeriodOnBeforeDeleteAvailabilityAtDate(var AvailabilityInPeriod: Record "Availability at Date";AvailabilityAtDate: Record "Availability at Date")
Call
repeat
AvailabilityInPeriod."Scheduled Receipt" += AvailabilityAtDate."Scheduled Receipt";
AvailabilityInPeriod."Gross Requirement" += AvailabilityAtDate."Gross Requirement";
CalculateAvailabilityByPeriodOnBeforeDeleteAvailabilityAtDate(...)
AvailabilityAtDate.Delete();
until AvailabilityAtDate.Next() = 0;
Existing event - OnCalcEarliestAvailabilityDateOnBeforeFilterDate
Parameters of this event are not sufficient to replace the code it should be used for.
New Parameters
ExcludeOnDate: Date
New Event - CalculateAvailabilityByPeriod
CalculateAvailabilityByPeriodOnBeforeNextTempAvailabilityAtDate(AvailabilityAtDate: Record "Availability at Date")
Call
repeat
if PeriodStart = 0D then
PeriodStart := TempAvailabilityAtDate."Period Start";
ScheduledReceipt += TempAvailabilityAtDate."Scheduled Receipt";
GrossRequirement += TempAvailabilityAtDate."Gross Requirement";
CalculateAvailabilityByPeriodOnBeforeNextTempAvailabilityAtDate(...)
until TempAvailabilityAtDate.Next() = 0;
New Event - CalculateAvailabilityByPeriod
CalculateAvailabilityByPeriodOnAfterCalculateAvailableQty(var AvailableQty: decimal;var Item: Record "Item"; ScheduledReceipt: decimal; GrossRequirement: decimal)
Call
AvailableQty := Item.Inventory - Item."Reserved Qty. on Inventory" + ScheduledReceipt - GrossRequirement;
CalculateAvailabilityByPeriodOnAfterCalculateAvailableQty(...)
if AvailableQty >= NeededQty then begin
Existing Event - OnBeforeUpdateAsmCompAvail
Parameters of this event are not sufficient to replace the code it should be used for.
New Parameter is needed for function AreEqualAssemblyLines
New Parameters
ChangedAssemblyLine: Record "Assembly Line";
Additional context
In Steel Industry, one quantity is not enough for any process. Therefore our current Business Central is customized for using a second quantity. Every item has furthermore two inventories instead of one. An inventory measured by the base UOM (the standard) and a second one measure by its second UOM.
Example:
A customer orders approx. 2 tons of steel sheets, /.100 pieces.
Quantity: 2000
UOM: KG
Sec. Quantity: 100
Sec. UOM: PCE
The text was updated successfully, but these errors were encountered: