[IT][Event Request][Codeunit][12173] "Vendor Bill List - Post" - Function PostVendorBillLine() & Function PostBalanceAccount()
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 66/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend
Hướng nghiên cứu
Mở Codeunit 12173 "Vendor Bill List - Post" và định vị các procedure PostVendorBillLine() và PostBalanceAccount(). Thêm hai khai báo [IntegrationEvent(false, false)] đúng như trong issue, giới thiệu biến IsHandled và bọc khối khởi tạo của Gen. Journal Line trong if not IsHandled then begin ... end; đồng thời giữ các sự kiện OnBefore* hiện có và các lệnh gọi GenJnlPostLine.RunWithCheck bên ngoài guard. Xong khi gói AL biên dịch được và các sự kiện mới có thể được gọi từ một extension; lưu ý đây là repo thuộc sở hữu của Microsoft nơi các yêu cầu mở rộng được phân loại (triage), vì vậy hãy xác nhận các maintainer chấp nhận thay đổi trước khi đầu tư.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Why do you need this change?
Hello,
We would need new events in the "PostVendorBillLine" and "PostBalanceAccount" procedures of Codeunit 12173 "Vendor Bill List - Post", in order to manage custom fields.
New Events and Code:
procedure PostVendorBillLine(var GenJnlLine: Record "Gen. Journal Line"; VendorBillHeader: Record "Vendor Bill Header"; VendorBillLine: Record "Vendor Bill Line"; VendLedgEntry: Record "Vendor Ledger Entry"; Bill: Record Bill; var AmountLCY: Decimal)
var
Tax: Option " ",Withhold,"Free Lance",Company;
//New Variable
IsHandled: Boolean;
begin
GenJnlLine.Init();
//New Code
IsHandled:=False;
OnAfterInitGenJnlLineOnPostVendorBillLine(GenJnlLine,VendorBillHeader,VendorBillLine,VendLedgEntry,Bill,AmountLCY,IsHandled);
if not IsHandled then begin
//
GenJnlLine.Validate("Posting Date", VendorBillHeader."Posting Date");
GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment;
GenJnlLine."Document No." := VendorBillHeader."Vendor Bill List No.";
GenJnlLine."Document Date" := VendorBillHeader."List Date";
GenJnlLine."Account Type" := GenJnlLine."Account Type"::Vendor;
GenJnlLine.Validate("Account No.", VendorBillLine."Vendor No.");
GenJnlLine."Due Date" := VendorBillLine."Due Date";
GenJnlLine."External Document No." := VendorBillLine."Vendor Bill List No.";
GenJnlLine.Validate(Amount, VendorBillLine."Amount to Pay");
GenJnlLine.Validate("Currency Code", VendorBillHeader."Currency Code");
if not VendorBillLine."Manual Line" then begin
GenJnlLine.Validate("Salespers./Purch. Code", VendLedgEntry."Purchaser Code");
ApplyInvAndUpdateLedgEntry(GenJnlLine, VendorBillLine, Tax::" ");
end else
GenJnlLine."Applies-to Occurrence No." := VendorBillLine."Document Occurrence";
GenJnlLine.Description := Bill.Description;
GenJnlLine."Source Code" := Bill."Vend. Bill Source Code";
GenJnlLine."System-Created Entry" := true;
GenJnlLine."Reason Code" := VendorBillHeader."Reason Code";
GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code";
GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code";
if not VendorBillLine."Manual Line" then
GenJnlLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"
else
GenJnlLine."Dimension Set ID" := VendorBillLine."Dimension Set ID";
GenJnlLine."Payment Method Code" := VendorBillHeader."Payment Method Code";
AmountLCY := GenJnlLine."Amount (LCY)";
//New Code
end;
//
OnBeforePostVendorBillLine(GenJnlLine, VendorBillHeader, VendorBillLine, VendLedgEntry);
GenJnlPostLine.RunWithCheck(GenJnlLine);
end;
procedure PostBalanceAccount(GenJnlLine: Record "Gen. Journal Line"; VendorBillHeader: Record "Vendor Bill Header"; VendorBillLine: Record "Vendor Bill Line"; VendLedgEntry: Record "Vendor Ledger Entry"; Bill: Record Bill)
var
IsHandled:Boolean;
begin
GenJnlLine.Init();
//New Code
IsHandled:=False; OnAfterInitGenJnlLineOnPostBalanceAccount(GenJnlLine,VendorBillHeader,VendorBillLine,VendLedgEntry,Bill,IsHandled);
if not IsHandled then begin
//
GenJnlLine.Validate("Posting Date", VendorBillHeader."Posting Date");
GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment;
GenJnlLine."Document No." := VendorBillHeader."Vendor Bill List No.";
GenJnlLine."Document Date" := VendorBillHeader."List Date";
GenJnlLine."Account Type" := GenJnlLine."Account Type"::"Bank Account";
GenJnlLine.Validate("Account No.", VendorBillHeader."Bank Account No.");
GenJnlLine."Currency Code" := VendorBillHeader."Currency Code";
GenJnlLine.Validate(Amount, -BalanceAmount);
GenJnlLine.Validate("Amount (LCY)", -BalanceAmountLCY);
GenJnlLine.Description := Bill.Description;
GenJnlLine."Source Code" := Bill."Vend. Bill Source Code";
GenJnlLine."System-Created Entry" := true;
GenJnlLine."Reason Code" := VendorBillHeader."Reason Code";
if not VendorBillLine."Manual Line" then
GenJnlLine.Validate("Salespers./Purch. Code", VendLedgEntry."Purchaser Code");
GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code";
GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code";
if not VendorBillLine."Manual Line" then
GenJnlLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"
else
GenJnlLine."Dimension Set ID" := VendorBillLine."Dimension Set ID";
//New Code
end;
//
GenJnlLine.CreateDimFromDefaultDim(GenJnlLine.FieldNo("Account No."));
OnBeforePostBalanceAccount(GenJnlLine, VendorBillHeader, VendorBillLine, VendLedgEntry);
GenJnlPostLine.RunWithCheck(GenJnlLine);
end;
Signature:
[IntegrationEvent(false, false)]
OnAfterInitGenJnlLineOnPostVendorBillLine(var GenJnlLine: Record "Gen. Journal Line"; VendorBillHeader: Record "Vendor Bill Header"; VendorBillLine: Record "Vendor Bill Line"; VendLedgEntry: Record "Vendor Ledger Entry"; Bill: Record Bill; var AmountLCY: Decimal;var IsHandled:Boolean)
begin
end;
[IntegrationEvent(false, false)]
OnAfterInitGenJnlLineOnPostBalanceAccount(GenJnlLine: Record "Gen. Journal Line"; VendorBillHeader: Record "Vendor Bill Header"; VendorBillLine: Record "Vendor Bill Line"; VendLedgEntry: Record "Vendor Ledger Entry"; Bill: Record Bill;var IsHandled:Boolean)
begin
end;
Thank You,
Luca
Describe the request
We need this events to be able to manage custom fields on the Line Insert procedures, and we need to manage the validate triggers of the fields.
This request is a follow-up to an issue opened about a year ago. The requested change has not yet been implemented in the Business Central Base Application.
For reference, please see the previous discussion: https://github.com/microsoft/ALAppExtensions/issues/29093#issuecomment-3883244614
Provide an implementation (optional)
- I will provide the implementation for this extensibility request
- Ngôn ngữ chính
- AL
- Star
- 697
- Fork
- 473
- Merge trung bình
- 2 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 493
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/BCApps
-
missing-info Team: Finance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
microsoft/BCApps#12900 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
missing-info Team: Finance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
microsoft/BCApps#12893 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[W1][Extensibility Request][Subscription Billing] Remove local access from InitTempTable() procedure on page 8025 "Contract Price Update"Có thể đã có người làm @business-central-extensibility-bot đã nhận 1 ngày trước. Đang mởApproved ext-ready-to-implement request-for-external Team: Finance
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
microsoft/BCApps#12775 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[W1][MultiObjects] Output journal lines: event after CheckWhse in codeunits 5406 "Output Jnl.-Expl. Route" and 5510 "Production Journal Mgt"Có thể đã có người làm @PredragMaricic đã nhận 2 ngày trước. Đang mởApproved Team: SCM
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
microsoft/BCApps#12652 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
"Warehouse Request" has wrong Table Relation for "Shipping Agent Service Code"Có thể đã có người làm @PredragMaricic đã nhận 2 ngày trước. Đang mởApproved Team: SCM
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
microsoft/BCApps#12623 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/BCApps
Issue tương tự
-
run_all sleeps after the final job despite documenting delays between jobsCó thể đã có người làm @Gambit-Checkmate đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commitCó thể đã có người làm @myOmikron đã nhận hôm nay. Đang mởbug ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
BUG
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Mai-with-u/MaiBot#2187 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
AG-UI bug pkg:core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pydantic/pydantic-ai#10538 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
nicolettas-muggelbude/RechnungsFee#448 ·
Maintainer thường phản hồi trong vòng 1 ngày