Skip to content

Commit 9a8ac4d

Browse files
mynjjJoshua Martínez Pineda
andauthored
Vendor information was never sent in the G/L accounts' LLM call (#6614)
#### Summary See CreateUserMessage in EDocGLAccountMatching.Codeunit.al, it attempts to get the vendor from the header of the line. However, at this point that line is empty, it only has the filters set, it comes all the way from PreparePurchaseEDocDraft.Codeunit.al, where the record is never loaded. So the header is not found, and the vendor is not found, and it's not added. This results in the vendor info not being sent for G/L account assignment, which was the original intention #### Work Item(s) Fixes [AB#621525](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/621525) Co-authored-by: Joshua Martínez Pineda <diegojoshuam@microsoft.com>
1 parent f8a4c71 commit 9a8ac4d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/Apps/W1/EDocument/App/src/Processing/AI/Tools/EDocGLAccountMatching.Codeunit.al

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ codeunit 6126 "E-Doc. GL Account Matching" implements "AOAI Function", IEDocAISy
112112
UserMessage: JsonArray;
113113
UserMessageTxt: Text;
114114
begin
115+
if EDocumentPurchaseLine.FindFirst() then;
115116
EDocumentPurchaseHeader.SetRange("E-Document Entry No.", EDocumentPurchaseLine."E-Document Entry No.");
116117
if EDocumentPurchaseHeader.FindFirst() then
117118
if Vendor.Get(EDocumentPurchaseHeader."[BC] Vendor No.") then;

0 commit comments

Comments
 (0)