OnGetBatchGroup
OnBatchGroups will be triggered after the regular calculations for batchgroups have been executed, but before batch number is calculated. If required, the script may change the batch group of the salesline, and thereby also the batch number
Example and syntax
function OnGetBatchgroup(aWrapper:TSalesLineWrapper; aNewBatchGroup:Integer):Integer;
begin
if aWrapper.HasCornerCuts then // Check if there are corner cuts
Result := aNewBatchgroup + 10 // Return calculated batch group plus 10
else
Result := aNewBatchgroup; // Otherwise return the default batch group
end;
Last updated
Was this helpful?