Change the code in the Data Item Number 1 Sections in the Stock Received not Invoiced report (10540) as follows:
Existing code 1...
SourceExpr=USERID;
DataSetFieldName=USERID }
// Delete the following lines.
{ 1040092;TextBox ;15000;1692 ;150 ;423 ;Name=Sum1;
Visible=No;
ForeColor=65535;
SourceExpr=Sum1;
DataSetFieldName=Sum1 }
{ 1040094;TextBox ;15600;1692 ;150 ;423 ;Name=Sum5;
Visible=No;
ForeColor=65535;
SourceExpr=Sum5;
DataSetFieldName=Sum5 }
{ 1040095;TextBox ;15450;1692 ;150 ;423 ;Name=Sum4;
Visible=No;
ForeColor=65535;
SourceExpr=Sum4;
DataSetFieldName=Sum4 }
{ 1040096;TextBox ;15150;1692 ;150 ;423 ;Name=Sum2;
Visible=No;
ForeColor=65535;
SourceExpr=Sum2;
DataSetFieldName=Sum2 }
{ 1040097;TextBox ;15300;1692 ;150 ;423 ;Name=Sum3;
Visible=No;
ForeColor=65535;
SourceExpr=Sum3;
DataSetFieldName=Sum3 }
// End of the deleted lines.
}
}
...
Replacement code 1...
SourceExpr=USERID;
DataSetFieldName=USERID }
// Add the following lines.
{ 1040092;TextBox ;15000;1692 ;150 ;423 ;Name=ItemReceivedQty;
Visible=No;
ForeColor=65535;
SourceExpr=ItemReceivedQty;
DataSetFieldName=ItemReceivedQty }
{ 1040094;TextBox ;15600;1692 ;150 ;423 ;Name=ValueInvoicedQty;
Visible=No;
ForeColor=65535;
SourceExpr=ValueInvoicedQty;
DataSetFieldName=ValueInvoicedQty }
{ 1040095;TextBox ;15450;1692 ;150 ;423 ;Name=ValueCostAmtActual;
Visible=No;
ForeColor=65535;
SourceExpr=ValueCostAmtActual;
DataSetFieldName=ValueCostAmtActual }
{ 1040096;TextBox ;15150;1692 ;150 ;423 ;Name=ItemInvoicedQty;
Visible=No;
ForeColor=65535;
SourceExpr=ItemInvoicedQty;
DataSetFieldName=ItemInvoicedQty }
{ 1040097;TextBox ;15300;1692 ;150 ;423 ;Name=ItemCostAmtExpected;
Visible=No;
ForeColor=65535;
SourceExpr=ItemCostAmtExpected;
DataSetFieldName=ItemCostAmtExpected }
// End of the added lines.
}
}
Existing code 2...
{ 1040046;TextBox ;5700 ;0 ;1550 ;423 ;FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Delete the following line.
SourceExpr="Item Ledger Entry".Quantity - "Item Ledger Entry"."Invoiced Quantity";
// End of the deleted line.
DataSetFieldName=Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity_ }
{ 1040033;TextBox ;9150 ;0 ;1800 ;423 ;FontBold=Yes;
Replacement code 2...
{ 1040046;TextBox ;5700 ;0 ;1550 ;423 ;FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Add the following line.
SourceExpr="Item Ledger Entry".Quantity - "Value Entry"."Invoiced Quantity";
// End of the added line.
DataSetFieldName=Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity_ }
{ 1040033;TextBox ;9150 ;0 ;1800 ;423 ;FontBold=Yes;
...
Existing code 3...
DataSetFieldName=Item_Ledger_Entry__Quantity }
{ 1040038;TextBox ;11100;0 ;1800 ;423 ;FontBold=Yes;
// Delete the following line.
SourceExpr="Item Ledger Entry"."Invoiced Quantity";
// End of the deleted line.
DataSetFieldName=Item_Ledger_Entry___Invoiced_Quantity_ }
{ 1040039;TextBox ;13050;0 ;1800 ;423 ;FontBold=Yes;
...
Replacement code 3...
DataSetFieldName=Item_Ledger_Entry__Quantity }
{ 1040038;TextBox ;11100;0 ;1800 ;423 ;FontBold=Yes;
// Add the following line.
SourceExpr="Value Entry"."Invoiced Quantity";
// End of the added line.
DataSetFieldName=Item_Ledger_Entry___Invoiced_Quantity_ }
{ 1040039;TextBox ;13050;0 ;1800 ;423 ;FontBold=Yes;
...
Existing code 4...
{ 1040059;TextBox ;7350 ;0 ;1550 ;423 ;FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Delete the following line.
SourceExpr="Item Ledger Entry"."Cost Amount (Expected)";
// End of the deleted line.
DataSetFieldName=Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual__ }
{ 1040064;TextBox ;15000;0 ;1500 ;423 ;FontBold=Yes;
...
Replacement code 4...
{ 1040059;TextBox ;7350 ;0 ;1550 ;423 ;FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Add the following line.
SourceExpr="Item Ledger Entry"."Cost Amount (Expected)" - "Value Entry"."Cost Amount (Actual)";
// End of the added line.
DataSetFieldName=Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual__ }
{ 1040064;TextBox ;15000;0 ;1500 ;423 ;FontBold=Yes;
...
Existing code 5...
FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Delete the following line.
SourceExpr="Item Ledger Entry".Quantity - "Item Ledger Entry"."Invoiced Quantity";
// End of the deleted line.
DataSetFieldName=Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity__Control1040065 }
{ 1040066;TextBox ;9150 ;423 ;1800 ;423 ;FontSize=7;
...
Replacement code 5...
FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Add the following line.
SourceExpr="Item Ledger Entry".Quantity - "Value Entry"."Invoiced Quantity";
// End of the added line.
DataSetFieldName=Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity__Control1040065 }
{ 1040066;TextBox ;9150 ;423 ;1800 ;423 ;FontSize=7;
...
Existing code 6...
{ 1040067;TextBox ;11100;423 ;1800 ;423 ;FontSize=7;
FontBold=Yes;
// Delete the following line.
SourceExpr="Item Ledger Entry"."Invoiced Quantity";
// End of the deleted line.
DataSetFieldName=Item_Ledger_Entry___Invoiced_Quantity__Control1040067 }
{ 1040068;TextBox ;13050;423 ;1800 ;423 ;FontSize=7;
...
Replacement code 6...
{ 1040067;TextBox ;11100;423 ;1800 ;423 ;FontSize=7;
FontBold=Yes;
// Add the following line.
SourceExpr="Value Entry"."Invoiced Quantity";
// End of the added line.
DataSetFieldName=Item_Ledger_Entry___Invoiced_Quantity__Control1040067 }
{ 1040068;TextBox ;13050;423 ;1800 ;423 ;FontSize=7;
...
Existing code 7...
FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Delete the following line.
SourceExpr="Item Ledger Entry"."Cost Amount (Expected)";
// End of the deleted line.
DataSetFieldName=Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual___Control1040069 }
{ 1040070;TextBox ;15000;423 ;1500 ;423 ;FontSize=7;
...
Replacement code 7...
FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Add the following line.
SourceExpr="Item Ledger Entry"."Cost Amount (Expected)" - "Value Entry"."Cost Amount (Actual)";
// End of the added line.
DataSetFieldName=Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual___Control1040069 }
{ 1040070;TextBox ;15000;423 ;1500 ;423 ;FontSize=7;
...
Existing code 8...
CaptionML=ENU=Total;
DataSetFieldName=TotalCaption }
// Delete the following lines.
{ 1040100;TextBox ;600 ;0 ;150 ;423 ;Name=TotalSum5;
Visible=No;
ForeColor=65535;
SourceExpr=TotalSum5;
DataSetFieldName=TotalSum5 }
{ 1040101;TextBox ;450 ;0 ;150 ;423 ;Name=TotalSum4;
Visible=No;
ForeColor=65535;
SourceExpr=TotalSum4;
DataSetFieldName=TotalSum4 }
{ 1040102;TextBox ;150 ;0 ;150 ;423 ;Name=TotalSum2;
Visible=No;
ForeColor=65535;
SourceExpr=TotalSum2;
DataSetFieldName=TotalSum2 }
{ 1040103;TextBox ;300 ;0 ;150 ;423 ;Name=TotalSum3;
Visible=No;
ForeColor=65535;
SourceExpr=TotalSum3;
DataSetFieldName=TotalSum3 }
{ 1040104;TextBox ;0 ;0 ;150 ;423 ;Name=TotalSum1;
Visible=No;
ForeColor=65535;
SourceExpr=TotalSum1;
DataSetFieldName=TotalSum1 }
// End of the deleted lines.
}
}
...
Replacement code 8...
CaptionML=ENU=Total;
DataSetFieldName=TotalCaption }
// Add the following lines.
{ 1040100;TextBox ;600 ;0 ;150 ;423 ;Name=ValueInvoicedQtyTotal;
Visible=No;
ForeColor=65535;
SourceExpr=ValueInvoicedQtyTotal;
DataSetFieldName=ValueInvoicedQtyTotal }
{ 1040101;TextBox ;450 ;0 ;150 ;423 ;Name=ValueCostAmtActualTotal;
Visible=No;
ForeColor=65535;
SourceExpr=ValueCostAmtActualTotal;
DataSetFieldName=ValueCostAmtActualTotal }
{ 1040102;TextBox ;150 ;0 ;150 ;423 ;Name=ItemInvoicedQtyTotal;
Visible=No;
ForeColor=65535;
SourceExpr=ItemInvoicedQtyTotal;
DataSetFieldName=ItemInvoicedQtyTotal }
{ 1040103;TextBox ;300 ;0 ;150 ;423 ;Name=ItemCostAmtExpectedTotal;
Visible=No;
ForeColor=65535;
SourceExpr=ItemCostAmtExpectedTotal;
DataSetFieldName=ItemCostAmtExpectedTotal }
{ 1040104;TextBox ;0 ;0 ;150 ;423 ;Name=ItemReceivedQtyTotal;
Visible=No;
ForeColor=65535;
SourceExpr=ItemReceivedQtyTotal;
DataSetFieldName=ItemReceivedQtyTotal }
// End of the added lines.
}
}
Change the code in the Data Item Number 2 in the Stock Received not Invoiced report (10540) as follows:
Existing code 1...
DataItemTable=Table32;
DataItemTableView=SORTING(Item No.,Positive,Completely Invoiced,Last Invoice Date,Location Code,Variant Code)
// Delete the following lines.
WHERE(Completely Invoiced=CONST(No),
Entry Type=CONST(Purchase));
// End of the deleted lines.
OnPreDataItem=BEGIN
IF EndDate <> 0D THEN
...
Replacement code 1...
DataItemTable=Table32;
DataItemTableView=SORTING(Item No.,Positive,Completely Invoiced,Last Invoice Date,Location Code,Variant Code)
// Add the following line.
WHERE(Entry Type=CONST(Purchase));
// End of the added line.
OnPreDataItem=BEGIN
IF EndDate <> 0D THEN
...
Existing code 2...
SETRANGE("Posting Date",0D,EndDate);
// GB1004.begin
// Delete the following lines.
Sum1 := 0;
Sum2 := 0;
Sum3 := 0;
Sum4 := 0;
Sum5 := 0;
// End of the deleted lines.
// GB1004.end
END;
...
Replacement code 2...
SETRANGE("Posting Date",0D,EndDate);
// GB1004.begin
// Add the following lines.
ItemReceivedQty := 0;
ItemInvoicedQty := 0;
ItemCostAmtExpected := 0;
ValueCostAmtActual := 0;
ValueInvoicedQty := 0;
// End of the added lines.
// GB1004.end
END;
...
Existing code 3...
CurrReport.CREATETOTALS("Value Entry"."Cost Amount (Actual)","Value Entry"."Invoiced Quantity");
// GB1004.begin
// Delete the following lines.
Sum1 += Quantity;
Sum2 += "Invoiced Quantity";
Sum3 += "Cost Amount (Expected)";
TotalSum1 += Quantity;
TotalSum2 += "Invoiced Quantity";
TotalSum3 += "Cost Amount (Expected)";
// End of the deleted lines.
// GB1004.end
END;
...
Replacement code 3...
CurrReport.CREATETOTALS("Value Entry"."Cost Amount (Actual)","Value Entry"."Invoiced Quantity");
// GB1004.begin
// Add the following lines.
ItemReceivedQty += Quantity;
ItemInvoicedQty += "Invoiced Quantity";
ItemCostAmtExpected += "Cost Amount (Expected)";
ItemReceivedQtyTotal += Quantity;
ItemInvoicedQtyTotal += "Invoiced Quantity";
ItemCostAmtExpectedTotal += "Cost Amount (Expected)";
// End of the added lines.
// GB1004.end
END;
...
Change the code in Global Variables in the Stock Received not Invoiced report (10540) as follows:
Existing code 1...
Text1040005@1040005 : TextConst 'ENU=Received not invoiced for item';
NoOfItems@1040006 : Integer;
// Delete the following lines.
Sum1@1040007 : Decimal;
Sum2@1040008 : Decimal;
Sum3@1040009 : Decimal;
Sum4@1040010 : Decimal;
Sum5@1040011 : Decimal;
TotalSum1@1040012 : Decimal;
TotalSum2@1040013 : Decimal;
TotalSum3@1040014 : Decimal;
TotalSum4@1040015 : Decimal;
TotalSum5@1040016 : Decimal;
// End of the deleted lines.
BEGIN
...
Replacement code 1...
Text1040005@1040005 : TextConst 'ENU=Received not invoiced for item';
NoOfItems@1040006 : Integer;
// Add the following lines.
ItemReceivedQty@1040007 : Decimal;
ItemInvoicedQty@1040008 : Decimal;
ItemCostAmtExpected@1040009 : Decimal;
ValueCostAmtActual@1040010 : Decimal;
ValueInvoicedQty@1040011 : Decimal;
ItemReceivedQtyTotal@1040012 : Decimal;
ItemInvoicedQtyTotal@1040013 : Decimal;
ItemCostAmtExpectedTotal@1040014 : Decimal;
ValueCostAmtActualTotal@1040015 : Decimal;
ValueInvoicedQtyTotal@1040016 : Decimal;
// End of the added lines.
BEGIN
...
Existing code 2...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!TotalSum1.Value) - Last(Fields!TotalSum2.Value)</Value>
// End of the deleted line.
<ZIndex>40</ZIndex>
</Textbox>
...
Replacement code 2...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemReceivedQtyTotal.Value) - Last(Fields!ValueInvoicedQtyTotal.Value)</Value>
// End of the added line.
<ZIndex>40</ZIndex>
</Textbox>
...
Existing code 3...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!TotalSum3.Value) - Last(Fields!TotalSum4.Value)</Value>
// End of the deleted line.
<ZIndex>39</ZIndex>
</Textbox>
...
Replacement code 3...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemCostAmtExpectedTotal.Value) - Last(Fields!ValueCostAmtActualTotal.Value)</Value>
// End of the added line.
<ZIndex>39</ZIndex>
</Textbox>
...
Existing code 4...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!TotalSum1.Value)</Value>
// End of the deleted line.
<ZIndex>38</ZIndex>
</Textbox>
...
Replacement code 4...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemReceivedQtyTotal.Value)</Value>
// End of the added line.
<ZIndex>38</ZIndex>
</Textbox>
...
Existing code 5...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!TotalSum2.Value)</Value>
// End of the deleted line.
<ZIndex>37</ZIndex>
</Textbox>
...
Replacement code 5...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ValueInvoicedQtyTotal.Value)</Value>
// End of the added line.
<ZIndex>37</ZIndex>
</Textbox>
...
Existing code 6...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!TotalSum3.Value)</Value>
// End of the deleted line.
<ZIndex>36</ZIndex>
</Textbox>
...
Replacement code 6...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemCostAmtExpectedTotal.Value)</Value>
// End of the added line.
<ZIndex>36</ZIndex>
</Textbox>
...
Existing code 7...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum1.Value) - Last(Fields!Sum2.Value)</Value>
// End of the deleted line.
<ZIndex>13</ZIndex>
</Textbox>
...
Replacement code 7...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemReceivedQty.Value) - Last(Fields!ValueInvoicedQty.Value)</Value>
// End of the added line.
<ZIndex>13</ZIndex>
</Textbox>
...
Existing code 8...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum3.Value) - Last(Fields!Sum4.Value)</Value>
// End of the deleted line.
<ZIndex>12</ZIndex>
</Textbox>
...
Replacement code 8...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemCostAmtExpected.Value) - Last(Fields!ValueCostAmtActual.Value)</Value>
// End of the added line.
<ZIndex>12</ZIndex>
</Textbox>
...
Existing code 9...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum1.Value)</Value>
// End of the deleted line.
<ZIndex>11</ZIndex>
</Textbox>
...
Replacement code 9...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemReceivedQty.Value)</Value>
// End of the added line.
<ZIndex>11</ZIndex>
</Textbox>
...
Existing code 10...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum2.Value)</Value>
// End of the deleted line.
<ZIndex>10</ZIndex>
</Textbox>
...
Replacement code 10...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ValueInvoicedQty.Value)</Value>
// End of the added line.
<ZIndex>10</ZIndex>
</Textbox>
...
Existing code 11...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum3.Value)</Value>
// End of the deleted line.
<ZIndex>9</ZIndex>
</Textbox>
...
Replacement code 11...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemCostAmtExpected.Value)</Value>
// End of the added line.
<ZIndex>9</ZIndex>
</Textbox>
...
Existing code 12...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum1.Value) - Last(Fields!Sum2.Value)</Value>
// End of the deleted line.
<ZIndex>21</ZIndex>
</Textbox>
...
Replacement code 12...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemReceivedQty.Value) - Last(Fields!ValueInvoicedQty.Value)</Value>
// End of the added line.
<ZIndex>21</ZIndex>
</Textbox>
...
Existing code 13...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum3.Value) - Last(Fields!Sum4.Value)</Value>
// End of the deleted line.
<ZIndex>20</ZIndex>
</Textbox>
...
Replacement code 13...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemCostAmtExpected.Value) - Last(Fields!ValueCostAmtActual.Value)</Value>
// End of the added line.
<ZIndex>20</ZIndex>
</Textbox>
...
Existing code 14...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum1.Value)</Value>
// End of the deleted line.
<ZIndex>19</ZIndex>
</Textbox>
...
Replacement code 14...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemReceivedQty.Value)</Value>
// End of the added line.
<ZIndex>19</ZIndex>
</Textbox>
...
Existing code 15...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum2.Value)</Value>
// End of the deleted line.
<ZIndex>18</ZIndex>
</Textbox>
...
Replacement code 15...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ValueInvoicedQty.Value)</Value>
// End of the added line.
<ZIndex>18</ZIndex>
</Textbox>
...
Existing code 16...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum3.Value)</Value>
// End of the deleted line.
<ZIndex>17</ZIndex>
</Textbox>
...
Replacement code 16...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemCostAmtExpected.Value)</Value>
// End of the added line.
<ZIndex>17</ZIndex>
</Textbox>
...
Existing code 17...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum1.Value) - Last(Fields!Sum2.Value)</Value>
// End of the deleted line.
<ZIndex>30</ZIndex>
</Textbox>
...
Replacement code 17...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemReceivedQty.Value) - Last(Fields!ValueInvoicedQty.Value)</Value>
// End of the added line.
<ZIndex>30</ZIndex>
</Textbox>
...
Existing code 18...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum3.Value) - Last(Fields!Sum4.Value)</Value>
// End of the deleted line.
<ZIndex>29</ZIndex>
</Textbox>
...
Replacement code 18...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemCostAmtExpected.Value) - Last(Fields!ValueCostAmtActual.Value)</Value>
// End of the added line.
<ZIndex>29</ZIndex>
</Textbox>
...
Existing code 19...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum1.Value)</Value>
// End of the deleted line.
<ZIndex>28</ZIndex>
</Textbox>
...
Replacement code 19...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemReceivedQty.Value)</Value>
// End of the added line.
<ZIndex>28</ZIndex>
</Textbox>
...
Existing code 20...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum2.Value)</Value>
// End of the deleted line.
<ZIndex>27</ZIndex>
</Textbox>
...
Replacement code 20...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ValueInvoicedQty.Value)</Value>
// End of the added line.
<ZIndex>27</ZIndex>
</Textbox>
...
Existing code 21...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=Last(Fields!Sum3.Value)</Value>
// End of the deleted line.
<ZIndex>26</ZIndex>
</Textbox>
...
Replacement code 21...
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=Last(Fields!ItemCostAmtExpected.Value)</Value>
// End of the added line.
<ZIndex>26</ZIndex>
</Textbox>
...
Existing code 22...
<DataField>USERID</DataField>
</Field>
// Delete the following lines.
<Field Name="Sum1">
<DataField>Sum1</DataField>
</Field>
<Field Name="Sum1Format">
<DataField>Sum1Format</DataField>
</Field>
<Field Name="Sum5">
<DataField>Sum5</DataField>
</Field>
<Field Name="Sum5Format">
<DataField>Sum5Format</DataField>
</Field>
<Field Name="Sum4">
<DataField>Sum4</DataField>
</Field>
<Field Name="Sum4Format">
<DataField>Sum4Format</DataField>
</Field>
<Field Name="Sum2">
<DataField>Sum2</DataField>
</Field>
<Field Name="Sum2Format">
<DataField>Sum2Format</DataField>
</Field>
<Field Name="Sum3">
<DataField>Sum3</DataField>
</Field>
<Field Name="Sum3Format">
<DataField>Sum3Format</DataField>
// End of the deleted lines.
</Field>
<Field Name="Totals__Rec__not_invoiced_Caption">
...
Replacement code 22...
<DataField>USERID</DataField>
</Field>
// Add the following lines.
<Field Name="ItemReceivedQty">
<DataField>ItemReceivedQty</DataField>
</Field>
<Field Name="ItemReceivedQtyFormat">
<DataField>ItemReceivedQtyFormat</DataField>
</Field>
<Field Name="ValueInvoicedQty">
<DataField>ValueInvoicedQty</DataField>
</Field>
<Field Name="ValueInvoicedQtyFormat">
<DataField>ValueInvoicedQtyFormat</DataField>
</Field>
<Field Name="ValueCostAmtActual">
<DataField>ValueCostAmtActual</DataField>
</Field>
<Field Name="ValueCostAmtActualFormat">
<DataField>ValueCostAmtActualFormat</DataField>
</Field>
<Field Name="ItemInvoicedQty">
<DataField>ItemInvoicedQty</DataField>
</Field>
<Field Name="ItemInvoicedQtyFormat">
<DataField>ItemInvoicedQtyFormat</DataField>
</Field>
<Field Name="ItemCostAmtExpected">
<DataField>ItemCostAmtExpected</DataField>
</Field>
<Field Name="ItemCostAmtExpectedFormat">
<DataField>ItemCostAmtExpectedFormat</DataField>
// End of the added lines.
</Field>
<Field Name="Totals__Rec__not_invoiced_Caption">
...
Existing code 23...
<DataField>TotalCaption</DataField>
</Field>
// Delete the following lines.
<Field Name="TotalSum5">
<DataField>TotalSum5</DataField>
</Field>
<Field Name="TotalSum5Format">
<DataField>TotalSum5Format</DataField>
</Field>
<Field Name="TotalSum4">
<DataField>TotalSum4</DataField>
</Field>
<Field Name="TotalSum4Format">
<DataField>TotalSum4Format</DataField>
</Field>
<Field Name="TotalSum2">
<DataField>TotalSum2</DataField>
</Field>
<Field Name="TotalSum2Format">
<DataField>TotalSum2Format</DataField>
</Field>
<Field Name="TotalSum3">
<DataField>TotalSum3</DataField>
</Field>
<Field Name="TotalSum3Format">
<DataField>TotalSum3Format</DataField>
</Field>
<Field Name="TotalSum1">
<DataField>TotalSum1</DataField>
</Field>
<Field Name="TotalSum1Format">
<DataField>TotalSum1Format</DataField>
// End of the deleted lines.
</Field>
<Field Name="Item_Ledger_Entry__Posting_Date_">
...
Replacement code 23...
<DataField>TotalCaption</DataField>
</Field>
// Add the following lines.
<Field Name="ValueInvoicedQtyTotal">
<DataField>ValueInvoicedQtyTotal</DataField>
</Field>
<Field Name="ValueInvoicedQtyTotalFormat">
<DataField>ValueInvoicedQtyTotalFormat</DataField>
</Field>
<Field Name="ValueCostAmtActualTotal">
<DataField>ValueCostAmtActualTotal</DataField>
</Field>
<Field Name="ValueCostAmtActualTotalFormat">
<DataField>ValueCostAmtActualTotalFormat</DataField>
</Field>
<Field Name="ItemInvoicedQtyTotal">
<DataField>ItemInvoicedQtyTotal</DataField>
</Field>
<Field Name="ItemInvoicedQtyTotalFormat">
<DataField>ItemInvoicedQtyTotalFormat</DataField>
</Field>
<Field Name="ItemCostAmtExpectedTotal">
<DataField>ItemCostAmtExpectedTotal</DataField>
</Field>
<Field Name="ItemCostAmtExpectedTotalFormat">
<DataField>ItemCostAmtExpectedTotalFormat</DataField>
</Field>
<Field Name="ItemReceivedQtyTotal">
<DataField>ItemReceivedQtyTotal</DataField>
</Field>
<Field Name="ItemReceivedQtyTotalFormat">
<DataField>ItemReceivedQtyTotalFormat</DataField>
// End of the added lines.
</Field>
<Field Name="Item_Ledger_Entry__Posting_Date_">
...
Change the code in Data Item Number 1 Sections in the Stock Shipped not Invoiced report (10541) as follows:
Existing code 1...
{ 1040046;TextBox ;5700 ;0 ;1550 ;423 ;FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Delete the following line.
SourceExpr=ItemQuantity;
// End of the deleted line.
DataSetFieldName=Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity_ }
{ 1040033;TextBox ;9150 ;0 ;1800 ;423 ;FontBold=Yes;
...
Replacement code 1...
{ 1040046;TextBox ;5700 ;0 ;1550 ;423 ;FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Add the following line.
SourceExpr=ItemShippedQty - ValueInvoicedQty;
// End of the added line.
DataSetFieldName=Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity_ }
{ 1040033;TextBox ;9150 ;0 ;1800 ;423 ;FontBold=Yes;
...
Existing code 2...
DataSetFieldName=Item_Ledger_Entry__Quantity }
{ 1040038;TextBox ;11100;0 ;1800 ;423 ;FontBold=Yes;
// Delete the following line.
SourceExpr=ItemInvoicedQty;
// End of the deleted line.
DataSetFieldName=Item_Ledger_Entry___Invoiced_Quantity_ }
{ 1040039;TextBox ;13050;0 ;1800 ;423 ;FontBold=Yes;
...
Replacement code 2...
DataSetFieldName=Item_Ledger_Entry__Quantity }
{ 1040038;TextBox ;11100;0 ;1800 ;423 ;FontBold=Yes;
// Add the following line.
SourceExpr=ValueInvoicedQty;
// End of the added line.
DataSetFieldName=Item_Ledger_Entry___Invoiced_Quantity_ }
{ 1040039;TextBox ;13050;0 ;1800 ;423 ;FontBold=Yes;
...
Existing code 3...
{ 1040059;TextBox ;7350 ;0 ;1550 ;423 ;FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Delete the following lines.
SourceExpr=ItemCostAmount;
DataSetFieldName=Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual__ }
{ 1040064;TextBox ;15000;0 ;1500 ;423 ;FontBold=Yes;
SourceExpr="Value Entry"."Invoiced Quantity";
// End of the deleted lines.
DataSetFieldName=Value_Entry___Invoiced_Quantity_ }
}
Replacement code 3...
{ 1040059;TextBox ;7350 ;0 ;1550 ;423 ;FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Add the following lines.
SourceExpr=ItemCostAmtExpected - ValueCostAmtActual;
DataSetFieldName=Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual__ }
{ 1040064;TextBox ;15000;0 ;1500 ;423 ;FontBold=Yes;
SourceExpr=-"Value Entry"."Invoiced Quantity";
// End of the added lines.
DataSetFieldName=Value_Entry___Invoiced_Quantity_ }
}
Existing code 4...
FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Delete the following line.
SourceExpr=ItemQuantityTotal;
// End of the deleted line.
DataSetFieldName=Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity__Control1040065 }
{ 1040066;TextBox ;9150 ;423 ;1800 ;423 ;FontSize=7;
...
Replacement code 4...
FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Add the following line.
SourceExpr=ItemShippedQtyTotal - ValueInvoicedQtyTotal;
// End of the added line.
DataSetFieldName=Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity__Control1040065 }
{ 1040066;TextBox ;9150 ;423 ;1800 ;423 ;FontSize=7;
...
Existing code 5...
{ 1040067;TextBox ;11100;423 ;1800 ;423 ;FontSize=7;
FontBold=Yes;
// Delete the following line.
SourceExpr=ItemInvoicedQtyTotal;
// End of the deleted line.
DataSetFieldName=Item_Ledger_Entry___Invoiced_Quantity__Control1040067 }
{ 1040068;TextBox ;13050;423 ;1800 ;423 ;FontSize=7;
...
Replacement code 5...
{ 1040067;TextBox ;11100;423 ;1800 ;423 ;FontSize=7;
FontBold=Yes;
// Add the following line.
SourceExpr=ValueInvoicedQtyTotal;
// End of the added line.
DataSetFieldName=Item_Ledger_Entry___Invoiced_Quantity__Control1040067 }
{ 1040068;TextBox ;13050;423 ;1800 ;423 ;FontSize=7;
...
Existing code 6...
FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Delete the following lines.
SourceExpr=ItemCostAmountTotal;
DataSetFieldName=Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual___Control1040069 }
{ 1040070;TextBox ;15000;423 ;1500 ;423 ;FontSize=7;
FontBold=Yes;
SourceExpr="Value Entry"."Invoiced Quantity";
// End of the deleted lines.
DataSetFieldName=Value_Entry___Invoiced_Quantity__Control1040070 }
{ 1040071;TextBox ;16650;423 ;1500 ;423 ;FontSize=7;
...
Replacement code 6...
FontBold=Yes;
CaptionML=ENU=Rec. not invoiced;
// Add the following lines.
SourceExpr=ItemCostAmtExpectedTotal - ValueCostAmtActualTotal;
DataSetFieldName=Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual___Control1040069 }
{ 1040070;TextBox ;15000;423 ;1500 ;423 ;FontSize=7;
FontBold=Yes;
SourceExpr=-"Value Entry"."Invoiced Quantity";
// End of the added lines.
DataSetFieldName=Value_Entry___Invoiced_Quantity__Control1040070 }
{ 1040071;TextBox ;16650;423 ;1500 ;423 ;FontSize=7;
...
Change the code in Data Item Number 2 in the Stock Shipped not Invoiced report (10541) as follows:
Existing code 1...
DataItemTable=Table32;
DataItemTableView=SORTING(Item No.,Positive,Completely Invoiced,Last Invoice Date,Location Code,Variant Code)
// Delete the following lines.
WHERE(Completely Invoiced=CONST(No),
Entry Type=CONST(Sale));
// End of the deleted lines.
OnPreDataItem=BEGIN
// GB0004.begin
...
Replacement code 1...
DataItemTable=Table32;
DataItemTableView=SORTING(Item No.,Positive,Completely Invoiced,Last Invoice Date,Location Code,Variant Code)
// Add the following line.
WHERE(Entry Type=CONST(Sale));
// End of the added line.
OnPreDataItem=BEGIN
// GB0004.begin
...
Existing code 2...
// GB0004.end
// Delete the following line.
ItemQuantity := 0;
// End of the deleted line.
ItemCostAmount := 0;
ItemShippedQty := 0;
...
Replacement code 2...
// GB0004.end
ItemCostAmount := 0;
ItemShippedQty := 0;
...
Existing code 3...
ItemInvoicedQty := 0;
ItemCostAmtExpected := 0;
END;
...
Replacement code 3...
ItemInvoicedQty := 0;
ItemCostAmtExpected := 0;
// Add the following lines.
ValueInvoicedQty := 0;
ValueCostAmtActual := 0;
// End of the added lines.
END;
...
Existing code 4...
CurrReport.CREATETOTALS("Value Entry"."Cost Amount (Actual)","Value Entry"."Invoiced Quantity");
// Delete the following lines.
ItemQuantity += Quantity - "Invoiced Quantity";
ItemCostAmount += "Cost Amount (Expected)";
ItemShippedQty += Quantity;
ItemInvoicedQty += "Invoiced Quantity";
ItemCostAmtExpected += "Cost Amount (Expected)";
ItemQuantityTotal += Quantity - "Invoiced Quantity";
ItemCostAmountTotal += "Cost Amount (Expected)";
ItemShippedQtyTotal += Quantity;
ItemInvoicedQtyTotal += "Invoiced Quantity";
// End of the deleted lines.
ItemCostAmtExpectedTotal += "Cost Amount (Expected)";
END;
...
Replacement code 4...
CurrReport.CREATETOTALS("Value Entry"."Cost Amount (Actual)","Value Entry"."Invoiced Quantity");
// Add the following lines.
ItemCostAmount += "Cost Amount (Expected)";
ItemShippedQty += -Quantity;
ItemInvoicedQty += -"Invoiced Quantity";
ItemCostAmtExpected += "Cost Amount (Expected)";
ItemCostAmountTotal += "Cost Amount (Expected)";
ItemShippedQtyTotal += -Quantity;
ItemInvoicedQtyTotal += -"Invoiced Quantity";
// End of the added lines.
ItemCostAmtExpectedTotal += "Cost Amount (Expected)";
END;
...