/
WhseReceiptSubformToItemLedgerEntries.al
96 lines (88 loc) · 2.78 KB
/
WhseReceiptSubformToItemLedgerEntries.al
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
codeunit 50122 EventHandler
{
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Whse.-Post Receipt", OnBeforeValidateQtyToReceiveOnPurchaseLine, '', false, false)]
local procedure OnBeforeValidateQtyToReceiveOnPurchaseLine(var PurchaseLine: Record "Purchase Line"; WarehouseReceiptLine: Record "Warehouse Receipt Line"; var IsHandled: Boolean);
begin
PurchaseLine."ZY Test" := WarehouseReceiptLine."ZY Test";
end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch.-Post", OnPostItemJnlLineOnAfterCopyDocumentFields, '', false, false)]
local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchRcptHeader: Record "Purch. Rcpt. Header");
begin
ItemJournalLine."ZY Test" := PurchaseLine."ZY Test";
end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Item Jnl.-Post Line", OnAfterInitItemLedgEntry, '', false, false)]
local procedure OnAfterInitItemLedgEntry(var NewItemLedgEntry: Record "Item Ledger Entry"; var ItemJournalLine: Record "Item Journal Line"; var ItemLedgEntryNo: Integer);
begin
NewItemLedgEntry."ZY Test" := ItemJournalLine."ZY Test";
end;
}
tableextension 50115 WarehouseReceiptLineExt extends "Warehouse Receipt Line"
{
fields
{
field(50000; "ZY Test"; Text[100])
{
Caption = 'ZY Test';
DataClassification = CustomerContent;
}
}
}
pageextension 50115 WhseReceiptSubformExt extends "Whse. Receipt Subform"
{
layout
{
addafter(Description)
{
field("ZY Test"; Rec."ZY Test")
{
ApplicationArea = All;
}
}
}
}
tableextension 50114 PurchaseLineExt extends "Purchase Line"
{
fields
{
field(50000; "ZY Test"; Text[100])
{
Caption = 'ZY Test';
DataClassification = CustomerContent;
}
}
}
tableextension 50112 ItemJournalLineExt extends "Item Journal Line"
{
fields
{
field(50000; "ZY Test"; Text[100])
{
Caption = 'ZY Test';
DataClassification = CustomerContent;
}
}
}
tableextension 50113 ItemLedgerEntryExt extends "Item Ledger Entry"
{
fields
{
field(50000; "ZY Test"; Text[100])
{
Caption = 'ZY Test';
DataClassification = CustomerContent;
}
}
}
pageextension 50113 ItemLedgerEntriesExt extends "Item Ledger Entries"
{
layout
{
addafter("Document No.")
{
field("ZY Test"; Rec."ZY Test")
{
ApplicationArea = All;
}
}
}
}