You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RelatedDocumentLineExistErr: Label'The %1 %2 already exists for the Subscription Line. Please post or delete this %1 first.', Comment = '%1=Document Type, %2=Document No.';
14
16
CopyingErr: Label'Copying documents with a link to a contract is not allowed. To create contract invoices, please use the "Recurring Billing" page. For cancelling a contract invoice, please use the "Create Corrective Credit Memo" function in the posted invoice.';
localprocedure TrasnferContractFieldsBeforeUpdateSalesLine(var ToSalesLine: Record "Sales Line"; var FromSalesLine: Record "Sales Line"; FromSalesDocType: Option; var FromSalesHeader: Record "Sales Header")
18
-
begin
19
-
ifnot FromSalesHeader."Recurring Billing" then
20
-
exit;
21
-
if FromSalesDocType <> Enum::"Sales Document Type From"::"Posted Invoice".AsInteger() then
22
-
Error(CopyingErr);
23
-
if ToSalesLine."Document Type" <> Enum::"Sales Document Type"::"Credit Memo" then
localprocedure TrasnferContractFieldsBeforeUpdatePurchaseLine(var ToPurchLine: Record "Purchase Line"; var FromPurchLine: Record "Purchase Line"; var FromPurchHeader: Record "Purchase Header"; FromPurchDocType: Option)
131
+
localprocedure GetAndCheckServiceCommitmentIfNewerInvoiceExists(var ServiceCommitment: Record "Subscription Line"; SubscriptionLineEntryNo: Integer; RecurringBillingToDate: Date)
181
132
begin
182
-
ifnot FromPurchHeader."Recurring Billing" then
183
-
exit;
184
-
if FromPurchDocType <> Enum::"Purchase Document Type From"::"Posted Invoice".AsInteger() then
185
-
Error(CopyingErr);
186
-
if ToPurchLine."Document Type" <> Enum::"Purchase Document Type"::"Credit Memo" then
localprocedure FindSubscriptionLineFromBillingLineArchiveForPurchase(var FromPurchaseLine: Record "Purchase Line"; var FromPurchInvLine: Record "Purch. Inv. Line")
201
+
var
202
+
BillingLineArchive: Record "Billing Line Archive";
203
+
SubscriptionLine: Record "Subscription Line";
204
+
begin
205
+
if FromPurchInvLine."Subscription Contract No." = ''then
206
+
exit;
207
+
if FromPurchInvLine."Subscription Contract Line No." = 0then
localprocedure FindSubscriptionLineFromBillingLineArchiveForSales(var FromSalesLine: Record "Sales Line"; var FromSalesInvLine: Record "Sales Invoice Line")
219
+
var
220
+
BillingLineArchive: Record "Billing Line Archive";
221
+
SubscriptionLine: Record "Subscription Line";
222
+
begin
223
+
if FromSalesInvLine."Subscription Contract No." = ''then
224
+
exit;
225
+
if FromSalesInvLine."Subscription Contract Line No." = 0then
localprocedure TransferContractFieldsBeforeUpdatePurchaseLine(var ToPurchLine: Record "Purchase Line"; var FromPurchHeader: Record "Purchase Header"; FromPurchDocType: Option)
238
+
begin
239
+
ifnot FromPurchHeader."Recurring Billing" then
240
+
exit;
241
+
if FromPurchDocType <> Enum::"Purchase Document Type From"::"Posted Invoice".AsInteger() then
242
+
Error(CopyingErr);
243
+
if ToPurchLine."Document Type" <> Enum::"Purchase Document Type"::"Credit Memo" then
localprocedure TransferContractFieldsBeforeUpdateSalesLine(var ToSalesLine: Record "Sales Line"; FromSalesDocType: Option; var FromSalesHeader: Record "Sales Header")
249
+
begin
250
+
ifnot FromSalesHeader."Recurring Billing" then
251
+
exit;
252
+
if FromSalesDocType <> Enum::"Sales Document Type From"::"Posted Invoice".AsInteger() then
253
+
Error(CopyingErr);
254
+
if ToSalesLine."Document Type" <> Enum::"Sales Document Type"::"Credit Memo" then
255
+
Error(CopyingErr);
256
+
end;
257
+
221
258
[IntegrationEvent(false, false)]
222
259
localprocedure OnAfterCreateBillingLineFromBillingLineArchive(var RRef: RecordRef; BillingLineArchive: Record "Billing Line Archive")
0 commit comments