Skip to content

KVSPSAInvoice Ledger Entry#

Fields#

Name Type Note
Line No. Integer
Job No. Code[20]
Posting Date Date
Document No. Code[20]
Type Enum Job Journal Line Type
No. Code[20]
Description Text[100]
Quantity Decimal
Direct Unit Cost (LCY) Decimal
Unit Cost (LCY) Decimal
Total Cost (LCY) Decimal
Unit Price Decimal
Total Price Decimal
Resource Group No. Code[20]
Unit of Measure Code Code[10]
Location Code Code[10]
Chargeable Boolean
Job Posting Group Code[20]
Work Type Code Code[10]
Customer Price Group Code[10]
Phase Code Code[20]
Task Code Code[20]
Step Code Code[20]
Entry Type Enum Job Journal Line Entry Type
Source Code Code[10]
Profit % Decimal
Applies-to Entry Integer
Applies-to ID Code[20]
Transaction Type Code[10]
Transport Method Code[10]
Country/Region Code Code[10]
Entry/Exit Point Code[10]
Document Date Date
External Document No. Code[35]
KVSPSAArea Code[10]
Transaction Specification Code[10]
Posting No. Series Code[20]
Source Currency Code Code[10]
Source Currency Total Cost Decimal
Source Currency Total Price Decimal
Entry No. Time Ledger Decimal
Quatity unproductive Decimal
Posted Time Quantity Decimal
Employee No. Code[20]
KVSPSAInvoicing Type Enum (KVSPSAPspInvoicingType)
Person Responsible Code[20]
Job Account No. Code[20]
Invoicing Quantity Decimal
Correction Boolean
Correction of Entry No. Integer
Work Package Code Code[20]
Assigned Res.-No. Code[20]
Assigned Job Ledger Entry Integer
Budget Line No. Integer
Sales Document Type Enum Sales Document Type
Sales Document No. Code[20]
Sales Document Line No. Integer
Sales Job Ledger Entry Integer
KVSPSAInvoicUnitOfMeasureCode Code[10]
Invoicing Qty. per UOM Decimal
Invoicing Quantity (Base) Decimal
Line Discount Amount Decimal
Line Discount Amount (LCY) Decimal
Invoice Currency Code Code[10]
Invoice Currency Factor Decimal
Description 2 Text[50]
Line Discount % Decimal
Variant Code Code[10]
Bin Code Code[20]
Qty. per Unit of Measure Decimal
Quantity (Base) Decimal
Service Order No. Code[20]
To-Do No. Code[20]
Dummy IC Transaction No. Integer
Dummy IC Partner Code Code[20]
Dummy IC Transaction Source Option OptionMembers: Rejected by Current Company,Created by Current Company
Dummy IC Line No. Integer
Source IC Partner Job No. Code[20]
Source IC Partner Bud.Line No. Integer
Source IC Partner Work Package Code[20]
Source IC Partner Phase Code Code[20]
Source IC Partner Task Code Code[20]
Source IC Partner Step Code Code[20]
Comments (Job Ledger Entry) Boolean FlowField
Efficiency Date Date
Efficiency Resource No. Code[20]
Efficiency Unit of Meas. Code Code[10]
Efficiency Resource Name Text[100]

Events#

OnAfterCopyFromJobLedgerEntry(Record KVSPSAInvoice Ledger Entry, Record Job Ledger Entry) :#

Summary: Event raised after common fields have been copied from Job Ledger Entry to Invoice Ledger Entry. This event allows extensions to transfer additional custom fields or implement custom logic when creating invoice ledger entries from job ledger entries. The event is triggered from the CopyFromJobLedgerEntry procedure which contains the intersection of fields copied in all three scenarios: AddJobLedgerEntries (manual assignment), CreateInvoiceFromInvSug (invoice suggestion), and SalesPost (posting).

[IntegrationEvent(false, false)]
local procedure OnAfterCopyFromJobLedgerEntry(var InvoiceLedgerEntry: Record "KVSPSAInvoice Ledger Entry"; JobLedgerEntry: Record "Job Ledger Entry"): 
[EventSubscriber(ObjectType::Table, Table::"KVSPSAInvoice Ledger Entry", 'OnAfterCopyFromJobLedgerEntry', '', false, false)]
local procedure DoSomethingOnAfterCopyFromJobLedgerEntry(var InvoiceLedgerEntry: Record "KVSPSAInvoice Ledger Entry"; JobLedgerEntry: Record "Job Ledger Entry")
begin
end;

Parameters:

  • InvoiceLedgerEntry: The Invoice Ledger Entry record that receives the copied data. Can be modified to add additional field values.
  • JobLedgerEntry: The source Job Ledger Entry record from which data is being copied. Read-only source data.

OnBeforeInsertInvoiceLedgerEntry(Record KVSPSAInvoice Ledger Entry, Record Job Ledger Entry, Record Sales Line) :#

Summary: Event raised after manually adding job ledger entries to a sales line via the AddJobLedgerEntries function. This event is triggered after CopyFromJobLedgerEntry and after setting the specific fields for manual assignment (Work Type Code, Resource Group No., Person Responsible). Use this event to add custom logic or transfer additional fields when users manually assign job ledger entries to sales invoice/order lines.

[IntegrationEvent(false, false)]
local procedure OnBeforeInsertInvoiceLedgerEntry(var InvoiceLedgerEntry: Record "KVSPSAInvoice Ledger Entry"; JobLedgerEntry: Record "Job Ledger Entry"; SalesLine: Record "Sales Line"): 
[EventSubscriber(ObjectType::Table, Table::"KVSPSAInvoice Ledger Entry", 'OnBeforeInsertInvoiceLedgerEntry', '', false, false)]
local procedure DoSomethingOnBeforeInsertInvoiceLedgerEntry(var InvoiceLedgerEntry: Record "KVSPSAInvoice Ledger Entry"; JobLedgerEntry: Record "Job Ledger Entry"; SalesLine: Record "Sales Line")
begin
end;

Parameters:

  • InvoiceLedgerEntry: The Invoice Ledger Entry record being created. Can be modified before insertion.
  • JobLedgerEntry: The source Job Ledger Entry being assigned. Read-only source data.
  • SalesLine: The sales line to which the job ledger entry is being assigned. Provides context about the target document.