{"title":"Page 403 Purchase Order Statistics, extension points 29","url":"https://jonas-paprotka.de/ref/page/403-purchase-order-statistics/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":"page","id":403,"name":"Purchase Order Statistics","app":"Base Application","url":"https://jonas-paprotka.de/ref/page/403-purchase-order-statistics/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/page/403-purchase-order-statistics/source/","path":"src/Layers/W1/BaseApp/Purchases/Document/PurchaseOrderStatistics.Page.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:290":{"name":"VAT Amount Line","url":"https://jonas-paprotka.de/ref/table/290-vat-amount-line/"},"table:38":{"name":"Purchase Header","url":"https://jonas-paprotka.de/ref/table/38-purchase-header/"},"codeunit:66":{"name":"Purch - Calc Disc. By Type","url":"https://jonas-paprotka.de/ref/codeunit/66-purch-calc-disc-by-type/"},"codeunit:415":{"name":"Release Purchase Document","url":"https://jonas-paprotka.de/ref/codeunit/415-release-purchase-document/"},"table:39":{"name":"Purchase Line","url":"https://jonas-paprotka.de/ref/table/39-purchase-line/"},"codeunit:90":{"name":"Purch.-Post","url":"https://jonas-paprotka.de/ref/codeunit/90-purch-post/"},"codeunit:444":{"name":"Purchase-Post Prepayments","url":"https://jonas-paprotka.de/ref/codeunit/444-purchase-post-prepayments/"},"table:330":{"name":"Currency Exchange Rate","url":"https://jonas-paprotka.de/ref/table/330-currency-exchange-rate/"},"page:9401":{"name":"VAT Amount Lines","url":"https://jonas-paprotka.de/ref/page/9401-vat-amount-lines/"},"codeunit:27":{"name":"Confirm Management","url":"https://jonas-paprotka.de/ref/codeunit/27-confirm-management/"}},"procs":[{"name":"InvDiscountAmount_General.OnValidate","line":48,"kind":"trigger","steps":[[51,"call","UpdateInvDiscAmount",1]]},{"name":"Total_General.OnValidate","line":63,"kind":"trigger","steps":[[66,"call","UpdateTotalAmount",1]]},{"name":"NoOfVATLines_General.OnDrillDown","line":152,"kind":"trigger","steps":[[154,"call","VATLinesDrillDown",2],[155,"call","UpdateHeaderInfo",2]]},{"name":"InvDiscountAmount_Invoicing.OnValidate","line":182,"kind":"trigger","steps":[[185,"call","UpdateInvDiscAmount",1]]},{"name":"Total_Invoicing.OnValidate","line":197,"kind":"trigger","steps":[[200,"call","UpdateTotalAmount",1]]},{"name":"NoOfVATLines_Invoicing.OnDrillDown","line":286,"kind":"trigger","steps":[[289,"call","VATLinesDrillDown",2],[290,"call","UpdateHeaderInfo",2],[292,"ext","table",290,"GetAnyLineModified",0],[293,"call","UpdateVATOnPurchLines",0],[294,"call","RefreshOnAfterGetRecord",0]]},{"name":"TempVATAmountLine3.COUNT.OnDrillDown","line":418,"kind":"trigger","steps":[[420,"call","VATLinesDrillDown",2]]},{"name":"PrepmtTotalAmount.OnValidate","line":434,"kind":"trigger","steps":[[437,"call","UpdatePrepmtAmount",0]]},{"name":"PrepmtTotalAmount2.OnValidate","line":460,"kind":"trigger","steps":[[462,"event","OnBeforeValidatePrepmtTotalAmount2",0],[463,"call","UpdatePrepmtAmount",0]]},{"name":"TempVATAmountLine4.COUNT.OnDrillDown","line":519,"kind":"trigger","steps":[[521,"call","VATLinesDrillDown",2]]},{"name":"Vend..OnAfterGetRecord","line":546,"kind":"trigger","steps":[[548,"call","RefreshOnAfterGetRecord",0]]},{"name":"OnOpenPage","line":551,"kind":"trigger","steps":[[553,"ext","table",38,"PrepareOpeningDocumentStatistics",0],[556,"call","VendInvDiscRecExists",1],[560,"event","OnOpenPageOnBeforeSetEditable",0]]},{"name":"OnClosePage","line":565,"kind":"trigger","steps":[[569,"ext","codeunit",66,"ResetRecalculateInvoiceDisc",1]]},{"name":"OnQueryClosePage","line":572,"kind":"trigger","steps":[[577,"call","GetVATSpecification",1],[578,"ext","codeunit",415,"CalcAndUpdateVATOnLines",2]]},{"name":"RefreshOnAfterGetRecord","line":632,"kind":"procedure","access":"local","params":0,"steps":[[654,"event","OnRefreshOnAfterGetRecordOnBeforeTempPurchLineDeleteAll",0],[655,"write",39,"DeleteAll"],[658,"ext","codeunit",90,"GetPurchLines",3],[659,"event","OnRefreshOnAfterGetRecordOnAfterGetPurchLines",0],[661,"event","OnRefreshOnAfterGetRecordOnBeforePurchLineCalcVATAmountLines",0],[664,"ext","table",39,"CalcVATAmountLines",4],[666,"ext","table",39,"CalcVATAmountLines",4],[668,"ext","table",39,"CalcVATAmountLines",4],[671,"ext","codeunit",90,"SumPurchLinesTemp",7],[676,"event","OnRefreshOnAfterGetRecordAfterSumPurchLinesTemp",1],[687,"event","OnRefreshOnAfterGetRecordOnAfterCalcTotal",0],[689,"write",39,"DeleteAll"],[691,"ext","codeunit",444,"GetPurchLines",3],[692,"ext","codeunit",444,"SumPrepmt",6],[693,"call","Pct",2],[694,"call","Pct",2],[706,"write",290,"ModifyAll"],[707,"write",290,"ModifyAll"],[708,"write",290,"ModifyAll"],[709,"write",290,"ModifyAll"],[713,"call","UpdateHeaderInfo",2],[715,"event","OnAfterRefreshOnAfterGetRecord",0]]},{"name":"UpdateHeaderInfo","line":718,"kind":"procedure","access":"local","params":2,"steps":[[723,"ext","table",290,"GetTotalInvDiscAmount",0],[725,"ext","table",290,"GetTotalVATAmount",0],[727,"ext","table",290,"GetTotalAmountInclVAT",0],[733,"event","OnUpdateHeaderInfoAfterCalcTotalAmount",0],[746,"ext","table",330,"ExchangeAmtFCYToLCY",4]]},{"name":"GetVATSpecification","line":751,"kind":"procedure","access":"local","params":1,"steps":[[756,"ext","page",9401,"GetTempVATAmountLine",1],[757,"ext","table",290,"GetAnyLineModified",0],[758,"call","UpdateHeaderInfo",2],[762,"ext","page",9401,"GetTempVATAmountLine",1],[763,"ext","table",290,"GetAnyLineModified",0],[764,"call","UpdateHeaderInfo",2],[767,"ext","page",9401,"GetTempVATAmountLine",1]]},{"name":"UpdateTotalAmount","line":771,"kind":"procedure","access":"protected","params":1,"steps":[[775,"call","CheckAllowInvDisc",0],[778,"call","UpdateInvDiscAmount",1],[782,"call","UpdateInvDiscAmount",1]]},{"name":"UpdateInvDiscAmount","line":785,"kind":"procedure","access":"protected","params":1,"steps":[[794,"call","CheckAllowInvDisc",0],[798,"ext","table",38,"InvoicedLineExists",0],[799,"ext","codeunit",27,"GetResponseOrDefault",2],[803,"ext","table",290,"GetTotalInvDiscBaseAmount",2],[805,"ext","table",290,"GetTotalInvDiscBaseAmount",2],[834,"ext","table",290,"SetInvoiceDiscountAmount",4],[837,"ext","table",290,"SetInvoiceDiscountAmount",4],[842,"ext","table",290,"GetTotalInvDiscBaseAmount",2],[844,"ext","table",290,"SetInvoiceDiscountPercent",5],[847,"ext","table",290,"SetInvoiceDiscountPercent",5],[848,"ext","table",290,"GetTotalInvDiscAmount",0],[851,"ext","table",290,"GetTotalInvDiscBaseAmount",2],[853,"ext","table",290,"SetInvoiceDiscountPercent",5],[856,"ext","table",290,"SetInvoiceDiscountPercent",5],[857,"ext","table",290,"GetTotalInvDiscAmount",0],[862,"call","UpdateHeaderInfo",2],[863,"call","UpdateHeaderInfo",2],[866,"ext","page",9401,"SetTempVATAmountLine",1],[868,"ext","page",9401,"SetTempVATAmountLine",1],[872,"write",38,"Modify"],[873,"call","UpdateVATOnPurchLines",0]]},{"name":"UpdatePrepmtAmount","line":876,"kind":"procedure","access":"local","params":0,"steps":[[881,"ext","codeunit",444,"UpdatePrepmtAmountOnPurchLines",2],[882,"ext","codeunit",444,"GetPurchLines",3],[883,"ext","codeunit",444,"SumPrepmt",6],[884,"call","Pct",2],[885,"call","Pct",2],[891,"write",38,"Modify"]]},{"name":"UpdateVATOnPurchLines","line":902,"kind":"procedure","params":0,"steps":[[906,"call","GetVATSpecification",1],[907,"ext","table",290,"GetAnyLineModified",0],[908,"ext","table",39,"UpdateVATOnLines",4],[909,"ext","table",290,"GetAnyLineModified",0],[910,"ext","table",39,"UpdateVATOnLines",4]]},{"name":"VATLinesDrillDown","line":939,"kind":"procedure","params":2,"steps":[[942,"ext","page",9401,"SetTempVATAmountLine",1],[943,"ext","page",9401,"InitGlobals",6],[947,"ext","page",9401,"GetTempVATAmountLine",1]]}]}