{"title":"Codeunit 6196 E-Doc. PO Matching, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/6196-e-doc-po-matching/points/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"codeunit","id":6196,"name":"E-Doc. PO Matching","app":"E-Document Core","url":"https://jonas-paprotka.de/ref/codeunit/6196-e-doc-po-matching/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/6196-e-doc-po-matching/source/","path":"src/Apps/W1/EDocument/App/src/Processing/Import/Purchase/PurchaseOrderMatching/EDocPOMatching.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"table:39":{"name":"Purchase Line","url":"https://jonas-paprotka.de/ref/table/39-purchase-line/"},"table:6101":{"name":"E-Document Purchase Line","url":"https://jonas-paprotka.de/ref/table/6101-e-document-purchase-line/"},"table:38":{"name":"Purchase Header","url":"https://jonas-paprotka.de/ref/table/38-purchase-header/"},"table:121":{"name":"Purch. Rcpt. Line","url":"https://jonas-paprotka.de/ref/table/121-purch-rcpt-line/"},"table:120":{"name":"Purch. Rcpt. Header","url":"https://jonas-paprotka.de/ref/table/120-purch-rcpt-header/"},"table:6115":{"name":"E-Doc PO Match Warning","url":"https://jonas-paprotka.de/ref/table/6115-e-doc-po-match-warning/"},"codeunit:6109":{"name":"E-Document Import Helper","url":"https://jonas-paprotka.de/ref/codeunit/6109-e-document-import-helper/"},"table:6114":{"name":"E-Doc. Purchase Line PO Match","url":"https://jonas-paprotka.de/ref/table/6114-e-doc-purchase-line-po-match/"},"table:6100":{"name":"E-Document Purchase Header","url":"https://jonas-paprotka.de/ref/table/6100-e-document-purchase-header/"},"table:6116":{"name":"E-Doc. PO Matching Setup","url":"https://jonas-paprotka.de/ref/table/6116-e-doc-po-matching-setup/"},"codeunit:5829":{"name":"PO Matching Group","url":"https://jonas-paprotka.de/ref/codeunit/5829-po-matching-group/"},"codeunit:5831":{"name":"PO Matching","url":"https://jonas-paprotka.de/ref/codeunit/5831-po-matching/"}},"procs":[{"name":"LoadAvailablePOLinesForEDocumentLine","line":30,"kind":"procedure","params":2,"steps":[[39,"write",39,"DeleteAll"],[40,"ext","table",6101,"GetBCVendor",0],[61,"write",39,"Insert"]]},{"name":"LoadPOLinesMatchedToEDocumentLine","line":77,"kind":"procedure","params":2,"steps":[[84,"write",39,"DeleteAll"],[85,"call","CollectMatchesForEDocumentLine",2],[92,"write",39,"Insert"]]},{"name":"LoadPOsMatchedToEDocumentLine","line":102,"kind":"procedure","params":2,"steps":[[108,"write",38,"DeleteAll"],[109,"call","LoadPOLinesMatchedToEDocumentLine",2],[115,"write",38,"Insert"]]},{"name":"LoadAvailableReceiptLinesForEDocumentLine","line":125,"kind":"procedure","params":2,"steps":[[131,"write",121,"DeleteAll"],[132,"call","LoadPOLinesMatchedToEDocumentLine",2],[142,"write",121,"Insert"]]},{"name":"LoadReceiptsMatchedToEDocumentLine","line":153,"kind":"procedure","params":2,"steps":[[159,"write",120,"DeleteAll"],[160,"call","LoadReceiptLinesMatchedToEDocumentLine",2],[166,"write",120,"Insert"]]},{"name":"LoadReceiptLinesMatchedToEDocumentLine","line":171,"kind":"procedure","params":2,"steps":[[178,"write",121,"DeleteAll"],[179,"call","CollectMatchesForEDocumentLine",2],[186,"write",121,"Insert"]]},{"name":"CalculatePOMatchWarnings","line":196,"kind":"procedure","params":2,"steps":[[201,"write",6115,"DeleteAll"],[205,"call","AppendPOMatchWarnings",2]]},{"name":"AppendPOMatchWarnings","line":214,"kind":"procedure","access":"local","params":2,"steps":[[226,"call","LoadPOLinesMatchedToEDocumentLine",2],[237,"call","HasEDocumentLineQuantityInformation",1],[240,"write",6115,"Insert"],[253,"call","ShouldWarnIfNotYetReceived",1],[257,"write",6115,"Insert"],[265,"write",6115,"Insert"],[273,"write",6115,"Insert"],[275,"call","ShouldWarnAmountMismatch",6],[279,"write",6115,"Insert"]]},{"name":"ShouldWarnAmountMismatch","line":283,"kind":"procedure","access":"local","params":6,"steps":[[301,"call","NormalizeEmptyCurrencyCode",2],[303,"call","NormalizeEmptyCurrencyCode",2],[321,"ext","codeunit",6109,"GetCurrencyRoundingPrecision",1]]},{"name":"IsEDocumentLineMatchedToAnyPOLine","line":370,"kind":"procedure","params":1,"steps":[[374,"call","CollectMatchesForEDocumentLine",2]]},{"name":"IsEDocumentMatchedToAnyPOLine","line":383,"kind":"procedure","params":1,"steps":[[393,"call","IsEDocumentLineMatchedToAnyPOLine",1]]},{"name":"IsEDocumentLineMatchedToAnyReceiptLine","line":418,"kind":"procedure","params":1,"steps":[[423,"call","CollectMatchesForEDocumentLine",2]]},{"name":"RemoveAllReceiptMatchesForEDocumentLine","line":447,"kind":"procedure","params":1,"steps":[[454,"write",6114,"DeleteAll"]]},{"name":"RemoveAllMatchesForEDocumentLine","line":461,"kind":"procedure","params":1,"steps":[[466,"write",6114,"DeleteAll"]]},{"name":"RemoveAllMatchesForEDocument","line":473,"kind":"procedure","params":1,"steps":[[480,"call","RemoveAllMatchesForEDocumentLine",1]]},{"name":"CollectMatchesForEDocumentLine","line":484,"kind":"procedure","access":"local","params":2,"steps":[[491,"write",6114,"DeleteAll"],[494,"ext","table",6100,"IsFinalized",0],[502,"write",6114,"Insert"],[511,"write",6114,"Insert"]]},{"name":"PersistFinalizedMatches","line":516,"kind":"procedure","access":"local","params":1,"steps":[[522,"call","RemoveAllFinalizedMatchesForEDocument",1]]},{"name":"MatchPOLinesToEDocumentLine","line":559,"kind":"procedure","params":2,"steps":[[577,"call","RemoveAllMatchesForEDocumentLine",1],[589,"ext","table",6101,"GetBCVendor",0],[623,"write",6114,"Insert"],[632,"write",6101,"Modify"]]},{"name":"MatchReceiptLinesToEDocumentLine","line":648,"kind":"procedure","access":"local","params":3,"steps":[[663,"write",6114,"DeleteAll"],[666,"call","LoadPOLinesMatchedToEDocumentLine",2],[677,"write",6114,"Insert"]]},{"name":"ConfigureDefaultPOMatchingSettings","line":684,"kind":"procedure","params":0,"steps":[[693,"call","ConfigurePOMatchingSettings",3]]},{"name":"ConfigurePOMatchingSettings","line":702,"kind":"procedure","params":3,"steps":[[709,"write",6116,"DeleteAll"],[726,"write",6116,"Insert"],[740,"write",6116,"Insert"]]},{"name":"TransferPOMatchesFromEDocumentToInvoice","line":761,"kind":"procedure","params":1,"steps":[[776,"ext","table",6100,"GetFromEDocument",1],[780,"ext","table",6101,"GetLinkedPurchaseLine",0],[785,"call","HasEDocumentLineQuantityInformation",1],[792,"call","MinDecimal",2],[794,"ext","codeunit",5829,"AddMatch",1],[794,"ext","codeunit",5831,"InvoiceOrderEdge",3],[795,"call","AddExplicitReceiptMatches",5],[805,"ext","codeunit",5831,"SuggestCoveringReceipts",1],[806,"ext","codeunit",5829,"SaveMatchingGroups",0],[807,"call","PersistFinalizedMatches",1],[808,"call","RemoveAllMatchesForEDocument",1],[810,"ext","table",6100,"FeatureName",0]]},{"name":"AddExplicitReceiptMatches","line":817,"kind":"procedure","access":"local","params":5,"steps":[[837,"call","MinDecimal",2],[839,"ext","codeunit",5829,"AddMatch",1],[839,"ext","codeunit",5831,"InvoiceOrderReceiptEdge",4]]},{"name":"TransferPOMatchesFromInvoiceToEDocument","line":857,"kind":"procedure","params":1,"steps":[[874,"ext","table",6100,"GetFromEDocument",1],[875,"call","RemoveAllFinalizedMatchesForEDocument",1],[882,"ext","table",6101,"GetFromLinkedPurchaseLine",1],[886,"write",39,"DeleteAll"],[888,"write",121,"DeleteAll"],[893,"call","CollectPOLineToMatch",2],[896,"call","CollectReceiptLineToMatch",2],[901,"call","CollectPOLineToMatch",2],[902,"call","CollectReceiptLineToMatch",2],[905,"call","MatchPOLinesToEDocumentLine",2],[909,"call","MatchReceiptLinesToEDocumentLine",3],[913,"write",39,"ModifyAll"],[914,"write",39,"ModifyAll"],[916,"ext","table",6100,"FeatureName",0]]},{"name":"CollectPOLineToMatch","line":922,"kind":"procedure","access":"local","params":2,"steps":[[927,"write",39,"Insert"]]},{"name":"CollectReceiptLineToMatch","line":930,"kind":"procedure","access":"local","params":2,"steps":[[935,"write",121,"Insert"]]},{"name":"GetPOMatchingSettings","line":944,"kind":"procedure","params":3,"steps":[[948,"ext","table",6116,"GetSetup",0]]},{"name":"VerifyEDocumentMatchedLinesAreValidMatches","line":968,"kind":"procedure","params":1,"steps":[[974,"call","CalculatePOMatchWarnings",2],[980,"call","LoadPOLinesMatchedToEDocumentLine",2],[983,"call","CanMatchInvoiceLineToPOLineWithoutReceipt",2]]},{"name":"CanMatchInvoiceLineToPOLineWithoutReceipt","line":995,"kind":"procedure","access":"local","params":2,"steps":[[1001,"ext","table",6101,"GetBCVendor",0],[1005,"ext","table",6116,"GetSetup",1]]}]}