{"title":"Codeunit 8060 Create Billing Documents, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/8060-create-billing-documents/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-28","object":{"type":"codeunit","id":8060,"name":"Create Billing Documents","app":"Subscription Billing","url":"https://jonas-paprotka.de/ref/codeunit/8060-create-billing-documents/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/8060-create-billing-documents/source/","path":"src/Apps/W1/Subscription Billing/App/Billing/Codeunits/CreateBillingDocuments.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:8061":{"name":"Billing Line","url":"https://jonas-paprotka.de/ref/table/8061-billing-line/"},"table:36":{"name":"Sales Header","url":"https://jonas-paprotka.de/ref/table/36-sales-header/"},"codeunit:53":{"name":"Translation Helper","url":"https://jonas-paprotka.de/ref/codeunit/53-translation-helper/"},"table:38":{"name":"Purchase Header","url":"https://jonas-paprotka.de/ref/table/38-purchase-header/"},"table:37":{"name":"Sales Line","url":"https://jonas-paprotka.de/ref/table/37-sales-line/"},"codeunit:8055":{"name":"Sub. Contracts Item Management","url":"https://jonas-paprotka.de/ref/codeunit/8055-sub-contracts-item-management/"},"table:8057":{"name":"Subscription Header","url":"https://jonas-paprotka.de/ref/table/8057-subscription-header/"},"table:27":{"name":"Item","url":"https://jonas-paprotka.de/ref/table/27-item/"},"codeunit:378":{"name":"Transfer Extended Text","url":"https://jonas-paprotka.de/ref/codeunit/378-transfer-extended-text/"},"table:8006":{"name":"Usage Data Billing","url":"https://jonas-paprotka.de/ref/table/8006-usage-data-billing/"},"codeunit:8024":{"name":"Usage Based Doc. Type Conv.","url":"https://jonas-paprotka.de/ref/codeunit/8024-usage-based-doc-type-conv/"},"table:4":{"name":"Currency","url":"https://jonas-paprotka.de/ref/table/4-currency/"},"table:8059":{"name":"Subscription Line","url":"https://jonas-paprotka.de/ref/table/8059-subscription-line/"},"table:39":{"name":"Purchase Line","url":"https://jonas-paprotka.de/ref/table/39-purchase-line/"},"codeunit:43":{"name":"Language","url":"https://jonas-paprotka.de/ref/codeunit/43-language/"},"table:8000":{"name":"Field Translation","url":"https://jonas-paprotka.de/ref/table/8000-field-translation/"},"codeunit:8074":{"name":"Document Change Management","url":"https://jonas-paprotka.de/ref/codeunit/8074-document-change-management/"},"page:8072":{"name":"Create Customer Billing Docs","url":"https://jonas-paprotka.de/ref/page/8072-create-customer-billing-docs/"},"page:8077":{"name":"Create Vendor Billing Docs","url":"https://jonas-paprotka.de/ref/page/8077-create-vendor-billing-docs/"},"table:8022":{"name":"Contract Billing Err. Log","url":"https://jonas-paprotka.de/ref/table/8022-contract-billing-err-log/"},"codeunit:28":{"name":"Error Message Management","url":"https://jonas-paprotka.de/ref/codeunit/28-error-message-management/"},"codeunit:1371":{"name":"Sales Batch Post Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/1371-sales-batch-post-mgt/"},"codeunit:29":{"name":"Error Message Handler","url":"https://jonas-paprotka.de/ref/codeunit/29-error-message-handler/"},"table:8051":{"name":"Subscription Contract Setup","url":"https://jonas-paprotka.de/ref/table/8051-subscription-contract-setup/"}},"procs":[{"name":"OnRun","line":17,"kind":"trigger","steps":[[25,"call","CreateBillingDocuments",1]]},{"name":"CreateBillingDocuments","line":28,"kind":"procedure","access":"local","params":1,"steps":[[30,"event","OnBeforeCreateBillingDocuments",0],[31,"call","CheckBillingLines",1],[35,"call","RequestPageSelectionConfirmed",0],[41,"write",8061,"ModifyAll"],[43,"call","ProcessBillingLines",1],[45,"call","PostCreatedDocuments",0],[47,"call","ProcessingFinishedMessage",0]]},{"name":"ProcessBillingLines","line":50,"kind":"procedure","access":"local","params":1,"steps":[[52,"event","OnBeforeProcessBillingLines",0],[53,"call","CreateTempBillingLines",1],[61,"call","CreateSalesDocumentsPerContract",0],[64,"call","CreateSalesDocumentsPerCustomer",0],[69,"call","CreatePurchaseDocumentsPerContract",0],[72,"call","CreatePurchaseDocumentsPerVendor",0],[76,"event","OnAfterProcessBillingLines",0]]},{"name":"CreateSalesDocumentsPerContract","line":79,"kind":"procedure","access":"local","params":0,"steps":[[88,"call","SetDiscountLineExists",2],[89,"event","OnCreateSalesDocumentsPerContractBeforeTempBillingLineFindSet",0],[92,"call","IsNewHeaderNeededPerContract",1],[93,"call","TestPreviousDocumentTotalInvoiceAmount",3],[94,"call","CommitCreatedDocumentCheckpoint",0],[95,"call","TrimTempBillingLinesForContract",1],[97,"call","CreateSalesHeaderFromContract",1],[98,"call","InsertContractDescriptionSalesLines",1],[101,"call","SetProgressPartner",1],[102,"call","SetProgressContract",1],[104,"call","InsertSalesLineFromTempBillingLine",0],[105,"call","UpdateBillingProgress",0],[107,"call","TestPreviousDocumentTotalInvoiceAmount",3],[108,"call","CommitCreatedDocumentCheckpoint",0]]},{"name":"CreatePurchaseDocumentsPerContract","line":111,"kind":"procedure","access":"local","params":0,"steps":[[120,"call","SetDiscountLineExists",2],[121,"event","OnCreatePurchaseDocumentsPerContractBeforeTempBillingLineFindSet",0],[124,"call","IsNewHeaderNeededPerContract",1],[125,"call","TestPreviousDocumentTotalInvoiceAmount",3],[126,"call","CommitCreatedDocumentCheckpoint",0],[127,"call","TrimTempBillingLinesForContract",1],[129,"call","CreatePurchaseHeaderFromContract",1],[130,"call","InsertContractDescriptionPurchaseLines",1],[133,"call","SetProgressPartner",1],[134,"call","SetProgressContract",1],[136,"call","InsertPurchaseLineFromTempBillingLine",0],[137,"call","UpdateBillingProgress",0],[139,"call","TestPreviousDocumentTotalInvoiceAmount",3],[140,"call","CommitCreatedDocumentCheckpoint",0]]},{"name":"CreateSalesDocumentsPerCustomer","line":143,"kind":"procedure","access":"local","params":0,"steps":[[156,"call","SetDiscountLineExists",2],[157,"event","OnCreateSalesDocumentsPerCustomerBeforeTempBillingLineFindSet",0],[160,"call","IsNewSalesHeaderNeeded",4],[161,"call","TestPreviousDocumentTotalInvoiceAmount",3],[162,"call","CommitCreatedDocumentCheckpoint",0],[163,"call","CreateSalesHeaderForCustomerNo",1],[165,"write",36,"Modify"],[169,"call","SetProgressPartner",1],[173,"call","InsertContractDescriptionSalesLines",1],[175,"ext","codeunit",53,"SetGlobalLanguageByCode",1],[177,"ext","codeunit",53,"RestoreGlobalLanguage",0],[178,"write",36,"Modify"],[180,"call","TrimTempBillingLinesForContract",1],[183,"call","SetProgressContract",1],[185,"call","InsertSalesLineFromTempBillingLine",0],[186,"call","UpdateBillingProgress",0],[188,"call","TestPreviousDocumentTotalInvoiceAmount",3],[189,"call","CommitCreatedDocumentCheckpoint",0]]},{"name":"CreatePurchaseDocumentsPerVendor","line":192,"kind":"procedure","access":"local","params":0,"steps":[[204,"call","SetDiscountLineExists",2],[205,"event","OnCreatePurchaseDocumentsPerVendorBeforeTempBillingLineFindSet",0],[211,"call","TestPreviousDocumentTotalInvoiceAmount",3],[212,"call","CommitCreatedDocumentCheckpoint",0],[213,"call","CreatePurchaseHeaderForVendorNo",1],[216,"call","SetProgressPartner",1],[220,"call","InsertContractDescriptionPurchaseLines",1],[222,"ext","codeunit",53,"SetGlobalLanguageByCode",1],[224,"ext","codeunit",53,"RestoreGlobalLanguage",0],[225,"write",38,"Modify"],[227,"call","TrimTempBillingLinesForContract",1],[230,"call","SetProgressContract",1],[232,"call","InsertPurchaseLineFromTempBillingLine",0],[233,"call","UpdateBillingProgress",0],[235,"call","TestPreviousDocumentTotalInvoiceAmount",3],[236,"call","CommitCreatedDocumentCheckpoint",0]]},{"name":"InsertSalesLineFromTempBillingLine","line":239,"kind":"procedure","access":"local","params":0,"steps":[[257,"event","OnAfterCustomerContractLineGetInInsertSalesLineFromTempBillingLine",0],[259,"ext","table",37,"InitFromSalesHeader",1],[260,"ext","codeunit",8055,"SetAllowInsertOfInvoicingItem",1],[265,"validate",37,"No."],[267,"validate",37,"Type"],[267,"ext","table",8057,"GetSalesLineType",0],[268,"validate",37,"No."],[270,"ext","table",27,"IsVariantMandatory",0],[273,"validate",37,"Variant Code"],[275,"ext","codeunit",8055,"SetAllowInsertOfInvoicingItem",1],[277,"validate",37,"Unit of Measure Code"],[278,"validate",37,"Quantity"],[278,"ext","table",8061,"GetSign",0],[279,"ext","table",37,"GetSalesDocumentSign",0],[281,"call","ToVATInclusiveUnitPrice",4],[284,"validate",37,"Line Discount %"],[285,"validate",37,"Unit Cost (LCY)"],[289,"ext","table",37,"GetCombinedDimensionSetID",2],[290,"ext","codeunit",53,"SetGlobalLanguageByCode",1],[293,"call","GetAdditionalLineText",4],[296,"ext","codeunit",53,"RestoreGlobalLanguage",0],[299,"call","SetInvoicePriceFromUsageDataBilling",2],[300,"event","OnBeforeInsertSalesLineFromContractLine",0],[301,"write",37,"Insert"],[303,"ext","codeunit",378,"SalesCheckIfAnyExtText",2],[304,"ext","codeunit",378,"InsertSalesExtText",1],[306,"ext","codeunit",53,"SetGlobalLanguageByCode",1],[307,"call","CreateAdditionalInvoiceLine",5],[308,"call","CreateAdditionalInvoiceLine",5],[309,"call","CreateAdditionalInvoiceLine",5],[310,"call","CreateAdditionalInvoiceLine",5],[311,"call","CreateAdditionalInvoiceLine",5],[312,"event","OnAfterCreateAdditionalInvoiceLines",0],[313,"ext","codeunit",53,"RestoreGlobalLanguage",0],[320,"write",8061,"ModifyAll"],[320,"ext","table",8061,"GetBillingDocumentTypeFromSalesDocumentType",1],[321,"write",8061,"ModifyAll"],[322,"write",8061,"ModifyAll"],[333,"ext","table",8006,"SaveDocumentValues",4],[333,"ext","codeunit",8024,"ConvertSalesDocTypeToUsageBasedBillingDocType",1],[339,"event","OnAfterInsertSalesLineFromBillingLine",0]]},{"name":"ToVATInclusiveUnitPrice","line":342,"kind":"procedure","access":"local","params":4,"steps":[[353,"ext","table",4,"InitRoundingPrecision",0]]},{"name":"SetInvoicePriceFromUsageDataBilling","line":359,"kind":"procedure","access":"local","params":2,"steps":[[367,"ext","table",8059,"IsUsageBasedBillingValid",0],[370,"ext","table",8059,"IsUsageDataBillingFound",3],[375,"validate",37,"Quantity"],[379,"validate",37,"Quantity"],[385,"ext","table",37,"GetSalesDocumentSign",0],[389,"call","ToVATInclusiveUnitPrice",4],[390,"validate",37,"Unit Price"],[391,"validate",37,"Line Discount %"]]},{"name":"InsertPurchaseLineFromTempBillingLine","line":394,"kind":"procedure","access":"local","params":0,"steps":[[410,"call","InitPurchaseLine",1],[411,"ext","codeunit",8055,"SetAllowInsertOfInvoicingItem",1],[416,"validate",39,"No."],[418,"validate",39,"Type"],[418,"ext","table",8057,"GetPurchaseLineType",0],[419,"validate",39,"No."],[421,"validate",39,"Variant Code"],[423,"ext","codeunit",8055,"SetAllowInsertOfInvoicingItem",1],[425,"validate",39,"Unit of Measure Code"],[426,"validate",39,"Quantity"],[426,"ext","table",8061,"GetSign",0],[427,"ext","table",39,"GetPurchaseDocumentSign",0],[429,"call","ToVATInclusiveUnitPrice",4],[432,"validate",39,"Line Discount %"],[436,"ext","table",39,"GetCombinedDimensionSetID",2],[439,"call","SetInvoicePriceFromUsageDataBilling",2],[441,"event","OnBeforeInsertPurchaseLineFromContractLine",0],[442,"write",39,"Insert"],[444,"ext","codeunit",378,"PurchCheckIfAnyExtText",2],[445,"ext","codeunit",378,"InsertPurchExtText",1],[447,"ext","codeunit",43,"SetOverrideFormatRegion",2],[447,"ext","codeunit",43,"GetFormatRegionOrDefault",1],[448,"call","InsertDescriptionPurchaseLine",2],[449,"call","GetBillingPeriodDescriptionTxt",1],[450,"ext","codeunit",43,"SetOverrideFormatRegion",2],[458,"write",8061,"ModifyAll"],[458,"ext","table",8061,"GetBillingDocumentTypeFromSalesDocumentType",1],[459,"write",8061,"ModifyAll"],[460,"write",8061,"ModifyAll"],[470,"ext","table",8006,"SaveDocumentValues",4],[470,"ext","codeunit",8024,"ConvertPurchaseDocTypeToUsageBasedBillingDocType",1],[475,"event","OnAfterInsertPurchaseLineFromBillingLine",0]]},{"name":"SetInvoicePriceFromUsageDataBilling","line":478,"kind":"procedure","access":"local","params":2,"steps":[[486,"ext","table",8059,"IsUsageBasedBillingValid",0],[489,"ext","table",8059,"IsUsageDataBillingFound",3],[494,"validate",39,"Quantity"],[498,"validate",39,"Quantity"],[504,"ext","table",39,"GetPurchaseDocumentSign",0],[508,"call","ToVATInclusiveUnitPrice",4],[509,"validate",39,"Direct Unit Cost"],[510,"validate",39,"Line Discount %"]]},{"name":"InitPurchaseLine","line":513,"kind":"procedure","access":"local","params":1,"steps":[[518,"ext","table",38,"GetNextLineNo",0]]},{"name":"InsertDescriptionPurchaseLine","line":521,"kind":"procedure","access":"local","params":2,"steps":[[525,"call","InitPurchaseLine",1],[528,"write",39,"Insert"]]},{"name":"InsertContractDescriptionSalesLines","line":531,"kind":"procedure","access":"local","params":1,"steps":[[538,"event","OnBeforeInsertContractDescriptionSalesLines",1],[540,"ext","codeunit",53,"SetGlobalLanguageByCode",1],[542,"ext","table",37,"InsertDescriptionSalesLine",3],[543,"ext","table",37,"InsertDescriptionSalesLine",3],[544,"call","InsertAddressInfoForCollectiveInvoice",1],[545,"call","GetContractTypeDescription",3],[547,"ext","table",37,"InsertDescriptionSalesLine",3],[550,"ext","codeunit",53,"RestoreGlobalLanguage",0],[552,"event","OnAfterInsertContractDescriptionSalesLines",0]]},{"name":"InsertAddressInfoForCollectiveInvoice","line":555,"kind":"procedure","access":"local","params":1,"steps":[[562,"event","OnBeforeInsertAddressInfoForCollectiveInvoice",1],[571,"ext","table",37,"InsertDescriptionSalesLine",3],[573,"ext","table",37,"InsertDescriptionSalesLine",3],[577,"ext","table",37,"InsertDescriptionSalesLine",3],[579,"ext","table",37,"InsertDescriptionSalesLine",3],[582,"event","OnAfterInsertAddressInfoForCollectiveInvoice",0]]},{"name":"InsertContractDescriptionPurchaseLines","line":585,"kind":"procedure","access":"local","params":1,"steps":[[589,"ext","codeunit",53,"SetGlobalLanguageByCode",1],[591,"call","InsertDescriptionPurchaseLine",2],[592,"call","InsertDescriptionPurchaseLine",2],[593,"call","GetContractTypeDescription",3],[595,"call","InsertDescriptionPurchaseLine",2],[598,"ext","codeunit",53,"RestoreGlobalLanguage",0]]},{"name":"GetContractTypeDescription","line":601,"kind":"procedure","access":"internal","params":3,"steps":[[620,"ext","table",8000,"FindTranslation",3]]},{"name":"CreateSalesHeaderFromContract","line":627,"kind":"procedure","access":"local","params":1,"steps":[[632,"ext","table",8061,"GetSalesDocumentTypeForContractNo",0],[635,"write",36,"Insert",1],[636,"ext","table",36,"SetHideValidationDialog",1],[638,"validate",36,"Sell-to Customer No."],[640,"validate",36,"Bill-to Customer No."],[650,"validate",36,"Posting Date"],[651,"validate",36,"Document Date"],[652,"validate",36,"Currency Code"],[654,"ext","codeunit",53,"SetGlobalLanguageByCode",1],[656,"ext","codeunit",53,"RestoreGlobalLanguage",0],[657,"ext","codeunit",8074,"SetSkipContractSalesHeaderModifyCheck",1],[659,"event","OnAfterCreateSalesHeaderFromContract",0],[660,"write",36,"Modify"],[663,"write",36,"Insert"],[665,"ext","codeunit",8074,"SetSkipContractSalesHeaderModifyCheck",1]]},{"name":"CreatePurchaseHeaderFromContract","line":668,"kind":"procedure","access":"local","params":1,"steps":[[675,"ext","table",8061,"GetPurchaseDocumentTypeForContractNo",0],[678,"write",38,"Insert",1],[679,"ext","table",38,"SetHideValidationDialog",1],[681,"validate",38,"Pay-to Vendor No."],[682,"validate",38,"Buy-from Vendor No."],[684,"validate",38,"Pay-to Vendor No."],[694,"ext","codeunit",8074,"SetSkipContractPurchaseHeaderModifyCheck",1],[695,"validate",38,"Posting Date"],[696,"ext","codeunit",8074,"SetSkipContractPurchaseHeaderModifyCheck",1],[697,"validate",38,"Document Date"],[698,"validate",38,"Currency Code"],[700,"ext","codeunit",53,"SetGlobalLanguageByCode",1],[702,"ext","codeunit",53,"RestoreGlobalLanguage",0],[703,"ext","codeunit",8074,"SetSkipContractPurchaseHeaderModifyCheck",1],[704,"write",38,"Modify"],[705,"ext","codeunit",8074,"SetSkipContractPurchaseHeaderModifyCheck",1]]},{"name":"CreateSalesHeaderForCustomerNo","line":708,"kind":"procedure","access":"local","params":1,"steps":[[711,"ext","table",8061,"GetSalesDocumentTypeForCustomerNo",0],[714,"write",36,"Insert",1],[716,"validate",36,"Sell-to Customer No."],[717,"validate",36,"Posting Date"],[718,"validate",36,"Document Date"],[719,"validate",36,"Currency Code"],[721,"ext","codeunit",53,"SetGlobalLanguageByCode",1],[723,"ext","codeunit",53,"RestoreGlobalLanguage",0],[724,"ext","codeunit",8074,"SetSkipContractSalesHeaderModifyCheck",1],[725,"event","OnAfterCreateSalesHeaderForCustomerNo",0],[726,"write",36,"Modify"],[729,"write",36,"Insert"],[731,"ext","codeunit",8074,"SetSkipContractSalesHeaderModifyCheck",1]]},{"name":"CreatePurchaseHeaderForVendorNo","line":734,"kind":"procedure","access":"local","params":1,"steps":[[737,"ext","table",8061,"GetPurchaseDocumentTypeForVendorNo",0],[740,"write",38,"Insert",1],[742,"ext","codeunit",8074,"SetSkipContractPurchaseHeaderModifyCheck",1],[743,"validate",38,"Pay-to Vendor No."],[744,"validate",38,"Buy-from Vendor No."],[745,"validate",38,"Posting Date"],[746,"ext","codeunit",8074,"SetSkipContractPurchaseHeaderModifyCheck",1],[747,"validate",38,"Document Date"],[748,"validate",38,"Currency Code"],[750,"ext","codeunit",53,"SetGlobalLanguageByCode",1],[752,"ext","codeunit",53,"RestoreGlobalLanguage",0],[753,"ext","codeunit",8074,"SetSkipContractPurchaseHeaderModifyCheck",1],[754,"write",38,"Modify"],[755,"ext","codeunit",8074,"SetSkipContractPurchaseHeaderModifyCheck",1]]},{"name":"SetPurchaseHeaderFromExistingPurchaseDocument","line":758,"kind":"procedure","access":"internal","params":2,"steps":[[760,"ext","codeunit",8074,"SetSkipContractPurchaseHeaderModifyCheck",1],[762,"ext","table",38,"SetRecurringBilling",0],[763,"ext","codeunit",8074,"SetSkipContractPurchaseHeaderModifyCheck",1]]},{"name":"CreateTempBillingLines","line":767,"kind":"procedure","access":"local","params":1,"steps":[[829,"event","OnBeforeInsertTempBillingLine",0],[830,"write",8061,"Insert"],[837,"call","InitRecurringBillingDocumentType",2],[842,"event","OnCreateTempBillingLinesBeforeSaveTempBillingLine",0],[846,"write",8061,"Modify"]]},{"name":"RequestPageSelectionConfirmed","line":864,"kind":"procedure","access":"local","params":0,"steps":[[870,"ext","page",8072,"SetData",4],[872,"ext","page",8072,"GetData",4],[877,"ext","page",8077,"SetData",3],[879,"ext","page",8077,"GetData",3]]},{"name":"CheckBillingLines","line":885,"kind":"procedure","access":"local","params":1,"steps":[[890,"call","CheckOnlyOneServicePartnerType",1],[892,"call","CheckNoUpdateRequired",1],[896,"event","OnCheckBillingLinesOnBeforeDataChecks",0],[899,"call","CheckBillingLineData",3]]},{"name":"CheckOnlyOneServicePartnerType","line":905,"kind":"procedure","access":"local","params":1,"steps":[[919,"call","DisplayOrLogUnspecificError",1]]},{"name":"CheckNoUpdateRequired","line":926,"kind":"procedure","access":"local","params":1,"steps":[[930,"call","DisplayOrLogErrorFromBillingTemplate",2]]},{"name":"CheckBillingLineData","line":937,"kind":"procedure","access":"local","params":3,"steps":[[960,"call","ValidateFilteredVsTotalBillingLineCount",1],[973,"call","ErrorIfItemUnitOfMeasureCodeDoesNotExist",3],[978,"event","OnCheckBillingLineDataOnBeforeNextBillingLine",0]]},{"name":"ValidateFilteredVsTotalBillingLineCount","line":982,"kind":"procedure","access":"local","params":1,"steps":[[987,"call","GetFilteredBillingLineCount",1],[988,"call","GetTotalBillingLineCount",1],[991,"call","ThrowSubscriptionLineConsistencyError",3]]},{"name":"ThrowSubscriptionLineConsistencyError","line":1016,"kind":"procedure","access":"local","params":3,"steps":[[1020,"call","DisplayOrLogErrorFromBillingLine",2]]},{"name":"ErrorIfItemUnitOfMeasureCodeDoesNotExist","line":1023,"kind":"procedure","access":"internal","params":3,"steps":[[1031,"call","DisplayOrLogErrorFromBillingLine",2]]},{"name":"DisplayOrLogUnspecificError","line":1034,"kind":"procedure","access":"local","params":1,"steps":[[1040,"ext","table",8022,"InsertUnspecificLog",1]]},{"name":"DisplayOrLogErrorFromBillingTemplate","line":1049,"kind":"procedure","access":"local","params":2,"steps":[[1056,"ext","table",8022,"InsertLogFromBillingTemplate",2]]},{"name":"DisplayOrLogErrorFromBillingLine","line":1072,"kind":"procedure","access":"local","params":2,"steps":[[1080,"ext","table",8061,"GetServiceCommitment",1],[1081,"ext","table",8022,"InsertLogFromSubscriptionLine",3],[1087,"write",8061,"ModifyAll"]]},{"name":"PostCreatedDocuments","line":1110,"kind":"procedure","access":"local","params":0,"steps":[[1114,"call","PostSalesDocuments",0],[1115,"write",36,"DeleteAll"]]},{"name":"PostSalesDocuments","line":1119,"kind":"procedure","access":"local","params":0,"steps":[[1128,"ext","table",36,"SendToPosting",1],[1139,"ext","codeunit",28,"Activate",1],[1140,"ext","codeunit",28,"PushContext",4],[1142,"run","codeunit",1371],[1144,"ext","codeunit",28,"GetLastErrorID",0],[1145,"ext","codeunit",29,"ShowErrors",0]]},{"name":"TestPreviousDocumentTotalInvoiceAmount","line":1149,"kind":"procedure","access":"local","params":3,"steps":[[1153,"event","OnBeforeTestPreviousDocumentTotalInvoiceAmount",0]]},{"name":"SetAutomatedBilling","line":1183,"kind":"procedure","access":"internal","params":1,"steps":[[1186,"call","SetHideProcessingFinishedMessage",0],[1187,"call","SetSkipRequestPageSelection",1]]},{"name":"GetBillingPeriodDescriptionTxt","line":1208,"kind":"procedure","params":1,"steps":[[1210,"ext","codeunit",53,"SetGlobalLanguageByCode",1],[1212,"ext","codeunit",53,"RestoreGlobalLanguage",0]]},{"name":"CreateAdditionalInvoiceLine","line":1215,"kind":"procedure","access":"local","params":5,"steps":[[1220,"call","GetAdditionalLineText",4],[1223,"ext","table",37,"CreateAttachedSalesLine",3],[1224,"event","OnAfterCreateAdditionalInvoiceLine",0]]},{"name":"GetAdditionalLineText","line":1227,"kind":"procedure","access":"local","params":4,"steps":[[1236,"call","GetServiceContractSetup",0],[1254,"ext","table",8057,"GetSerialNoDescription",0],[1257,"ext","codeunit",43,"SetOverrideFormatRegion",2],[1257,"ext","codeunit",43,"GetFormatRegionOrDefault",1],[1259,"call","GetBillingPeriodDescriptionTxt",0],[1262,"ext","codeunit",43,"SetOverrideFormatRegion",2],[1265,"ext","table",8057,"GetPrimaryAttributeValue",0],[1269,"event","OnGetAdditionalLineTextElseCase",1],[1278,"event","OnAfterGetAdditionalLineText",0]]},{"name":"GetServiceContractSetup","line":1281,"kind":"procedure","access":"local","params":0,"steps":[[1286,"ext","table",8051,"VerifyContractTextsSetup",0]]},{"name":"IsNewSalesHeaderNeeded","line":1302,"kind":"procedure","access":"local","params":4,"steps":[[1309,"event","OnAfterIsNewSalesHeaderNeeded",0]]},{"name":"IsNewHeaderNeededPerContract","line":1312,"kind":"procedure","access":"local","params":1,"steps":[[1316,"event","OnAfterIsNewHeaderNeededPerContract",0]]},{"name":"SetProgressPartner","line":1325,"kind":"procedure","access":"local","params":1,"steps":[[1328,"call","RefreshProgressDetail",0]]},{"name":"SetProgressContract","line":1331,"kind":"procedure","access":"local","params":1,"steps":[[1334,"call","RefreshProgressDetail",0]]},{"name":"TrimTempBillingLinesForContract","line":1352,"kind":"procedure","access":"local","params":1,"steps":[[1365,"write",8061,"DeleteAll"]]}]}