ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Table 39 "Purchase Line" - OnBeforeValidatePrepmtLineAmount
Analog to #14860, just for Purchase line
Thank you.
field(110; "Prepmt. Line Amount"; Decimal)
{
AutoFormatExpression = "Currency Code";
AutoFormatType = 1;
CaptionClass = GetCaptionClass(FieldNo("Prepmt. Line Amount"));
Caption = 'Prepmt. Line Amount';
MinValue = 0;
trigger OnValidate()
var
IsHandled: Boolean;
begin
// New Event begin
IsHandled := FALSE;
OnBeforeValidatePrepmtLineAmount(Rec,PrePaymentLineAmountEntered,IsHandled);
if IsHandled then
exit;
// New Event end
TestStatusOpen();
PrePaymentLineAmountEntered := true;
TestField("Line Amount");
if "Prepmt. Line Amount" < "Prepmt. Amt. Inv." then
FieldError("Prepmt. Line Amount", StrSubstNo(Text044, "Prepmt. Amt. Inv."));
if "Prepmt. Line Amount" > "Line Amount" then
FieldError("Prepmt. Line Amount", StrSubstNo(Text045, "Line Amount"));
if "System-Created Entry" and not IsServiceChargeLine() then
FieldError("Prepmt. Line Amount", StrSubstNo(Text045, 0));
Validate("Prepayment %", Round("Prepmt. Line Amount" * 100 / "Line Amount", 0.00001));
end;
}
[IntegrationEvent(false, false)]
local procedure OnBeforeValidatePrepmtLineAmount(var PurchLine: Record "Purchase Line"; PrePaymentLineAmountEntered: Boolean; var IsHandled: Boolean)
begin
end;
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 40749.