Change the code in Controls in the Show Computed Withh. Contrib. form (12111) as follows:
Existing code 1...
GenJnlLine2.SETRANGE("Line No.","Line No.");
IF GenJnlLine2.FIND('-') THEN BEGIN
// Delete the following lines.
GenJnlLine2.VALIDATE(Amount,GenJnlLine2.Amount - "Withholding Tax Amount" + "Old Withholding Amount" -
"Free-Lance Amount" + "Old Free-Lance Amount" -
"INAIL Free-Lance Amount" + "Old INAIL Free-Lance Amount");
// End of the lines.
GenJnlLine2.MODIFY;
GenJnlLine2.SETRANGE("Line No.");
TmpGenJnlLine.COPY(GenJnlLine2);
...
Replacement code 1...
GenJnlLine2.SETRANGE("Line No.","Line No.");
IF GenJnlLine2.FIND('-') THEN BEGIN
// Add the following lines.
IF GenJnlLine2."Document Type" = GenJnlLine2."Document Type"::Payment THEN
GenJnlLine2.VALIDATE(Amount,GenJnlLine2.Amount - "Withholding Tax Amount" + "Old Withholding Amount" -
"Free-Lance Amount" + "Old Free-Lance Amount" -
"INAIL Free-Lance Amount" + "Old INAIL Free-Lance Amount")
ELSE
GenJnlLine2.VALIDATE(Amount,GenJnlLine2.Amount + "Withholding Tax Amount" - "Old Withholding Amount" +
"Free-Lance Amount" - "Old Free-Lance Amount" +
"INAIL Free-Lance Amount" - "Old INAIL Free-Lance Amount");
// End of the lines.
GenJnlLine2.MODIFY;
GenJnlLine2.SETRANGE("Line No.");
TmpGenJnlLine.COPY(GenJnlLine2);
...
Existing code 2...
GenJnlLine.SETRANGE("Line No.");
END;
GenJnlLine.VALIDATE("Account No.");
// Delete the following line.
GenJnlLine.VALIDATE(Amount,"Withholding Tax Amount");
// End of the line.
GenJnlLine."Bal. Account Type" := GenJnlLine."Bal. Account Type"::"G/L Account";
GenJnlLine."Bal. Account No." := "Withholding Account";
GenJnlLine.VALIDATE("Bal. Account No.","Withholding Account"); // IT006
...
Replacement code 2...
GenJnlLine.SETRANGE("Line No.");
END;
GenJnlLine.VALIDATE("Account No.");
// Add the following lines.
IF GenJnlLine."Document Type" = GenJnlLine."Document Type"::Payment THEN
GenJnlLine.VALIDATE(Amount,"Withholding Tax Amount")
ELSE
GenJnlLine.VALIDATE(Amount,-"Withholding Tax Amount");
// End of the lines.
GenJnlLine."Bal. Account Type" := GenJnlLine."Bal. Account Type"::"G/L Account";
GenJnlLine."Bal. Account No." := "Withholding Account";
GenJnlLine.VALIDATE("Bal. Account No.","Withholding Account"); // IT006
...
Change the code in Data Item Number 2 Sections in the Certifications report (12106) as follows:
Existing code 1...
VertAlign=Bottom;
FontBold=Yes;
MultiLine=Yes;
DataSetFieldName=Withholding_Tax__Withholding_Tax___Caption }
{ 1130154;Label ;21600;846 ;1800 ;846 ;ParentControl=1130260;
HorzAlign=Right;
...
Replacement code 1...
VertAlign=Bottom;
FontBold=Yes;
MultiLine=Yes;
// Add the following line.
CaptionML=ENU=Withholding Tax %;
// End of the line.
DataSetFieldName=Withholding_Tax__Withholding_Tax___Caption }
{ 1130154;Label ;21600;846 ;1800 ;846 ;ParentControl=1130260;
HorzAlign=Right;
...
Existing code 2...
OnPreSection=BEGIN
Descr :='';
GroupType := '';
CASE CurrReport.TOTALSCAUSEDBY OF
FIELDNO("Withholding Tax Code"):
CurrReport.SHOWOUTPUT(FALSE);
...
Replacement code 2...
OnPreSection=BEGIN
Descr :='';
GroupType := '';
// Add the following line.
WithholdTaxPercent := "Withholding Tax %";
// End of the line.
CASE CurrReport.TOTALSCAUSEDBY OF
FIELDNO("Withholding Tax Code"):
CurrReport.SHOWOUTPUT(FALSE);
...
Existing code 3...
FIELDNO("Withholding Tax Code"):
CurrReport.SHOWOUTPUT(FALSE);
FIELDNO("Source-Withholding Tax"):
// Delete the following lines.
IF NOT "Source-Withholding Tax" THEN
Descr:= Text1047
ELSE
// End of the lines.
CurrReport.SHOWOUTPUT(FALSE);
FIELDNO("Withholding Tax %"):
Descr:= ' ' + FORMAT("Withholding Tax %") + '% ' + WithholdTaxCode.Description;
...
Replacement code 3...
FIELDNO("Withholding Tax Code"):
CurrReport.SHOWOUTPUT(FALSE);
FIELDNO("Source-Withholding Tax"):
// Add the following lines.
IF NOT "Source-Withholding Tax" THEN BEGIN
Descr:= Text1047;
WithholdTaxPercent := 0;
END ELSE
// End of the lines.
CurrReport.SHOWOUTPUT(FALSE);
FIELDNO("Withholding Tax %"):
Descr:= ' ' + FORMAT("Withholding Tax %") + '% ' + WithholdTaxCode.Description;
...
Existing code 4...
FIELDNO("Withholding Tax %"):
Descr:= ' ' + FORMAT("Withholding Tax %") + '% ' + WithholdTaxCode.Description;
FIELDNO("Recipient May Report Income"):
// Delete the following line.
IF "Source-Withholding Tax" THEN
// End of the line.
IF "Recipient May Report Income" THEN
Descr:= Text1048
ELSE
...
Replacement code 4...
FIELDNO("Withholding Tax %"):
Descr:= ' ' + FORMAT("Withholding Tax %") + '% ' + WithholdTaxCode.Description;
FIELDNO("Recipient May Report Income"):
// Add the following line.
IF "Source-Withholding Tax" THEN BEGIN
// End of the line.
IF "Recipient May Report Income" THEN
Descr:= Text1048
ELSE
...
Existing code 5...
IF "Recipient May Report Income" THEN
Descr:= Text1048
ELSE
// Delete the following lines.
Descr:= Text1049
ELSE
// End of the lines.
CurrReport.SHOWOUTPUT(FALSE);
END;
END;
...
Replacement code 5...
IF "Recipient May Report Income" THEN
Descr:= Text1048
ELSE
// Add the following lines.
Descr:= Text1049;
WithholdTaxPercent := 0;
END ELSE
// End of the lines.
CurrReport.SHOWOUTPUT(FALSE);
END;
END;
...
Existing code 6...
{ 1130250;TextBox ;0 ;0 ;8400 ;423 ;MultiLine=Yes;
SourceExpr=Descr;
DataSetFieldName=Descr_Control1130250 }
// Delete the following line.
{ 1130207;TextBox ;19650;0 ;1800 ;423 ;SourceExpr="Withholding Tax %";
// End of the line.
DataSetFieldName=Withholding_Tax__Withholding_Tax___ }
{ 1130117;TextBox ;8400 ;0 ;150 ;423 ;Name=DescrWithHoldTax4;
Visible=No;
...
Replacement code 6...
{ 1130250;TextBox ;0 ;0 ;8400 ;423 ;MultiLine=Yes;
SourceExpr=Descr;
DataSetFieldName=Descr_Control1130250 }
// Add the following lines.
{ 1130207;TextBox ;19650;0 ;1800 ;423 ;BlankZero=Yes;
SourceExpr=WithholdTaxPercent;
// End of the lines.
DataSetFieldName=Withholding_Tax__Withholding_Tax___ }
{ 1130117;TextBox ;8400 ;0 ;150 ;423 ;Name=DescrWithHoldTax4;
Visible=No;
...
Existing code 7...
SourceExpr="Withholding Tax Amount";
AutoFormatType=1;
DataSetFieldName=Withholding_Tax__Withholding_Tax_Amount__Control5 }
// Delete the following lines.
{ 8 ;TextBox ;19650;423 ;1800 ;423 ;FontSize=8;
FontBold=Yes;
SourceExpr="Withholding Tax %";
DataSetFieldName=Withholding_Tax__Withholding_Tax____Control8 }
// End of the lines.
{ 11 ;TextBox ;17700;423 ;1800 ;423 ;FontSize=8;
FontBold=Yes;
SourceExpr="Taxable Base";
...
Replacement code 7...
SourceExpr="Withholding Tax Amount";
AutoFormatType=1;
DataSetFieldName=Withholding_Tax__Withholding_Tax_Amount__Control5 }
{ 11 ;TextBox ;17700;423 ;1800 ;423 ;FontSize=8;
FontBold=Yes;
SourceExpr="Taxable Base";
...
Change the code in Documentation in the Certifications report (12106) as follows:
Existing code 1...
<TextAlign>Right</TextAlign>
</Style>
<Value>=Last(Fields!Withholding_Tax__Withholding_Tax___.Value)</Value>
<ZIndex>40</ZIndex>
</Textbox>
</ReportItems>
...
Replacement code 1...
<TextAlign>Right</TextAlign>
</Style>
<Value>=Last(Fields!Withholding_Tax__Withholding_Tax___.Value)</Value>
// Add the following lines.
<Visibility>
<Hidden>true</Hidden>
</Visibility>
// End of the lines.
<ZIndex>40</ZIndex>
</Textbox>
</ReportItems>
...
Existing code 2...
<VerticalAlign>Middle</VerticalAlign>
</Style>
<Value>=Last(Fields!Withholding_Tax__Withholding_Tax___.Value)</Value>
<ZIndex>11</ZIndex>
</Textbox>
</ReportItems>
...
Replacement code 2...
<VerticalAlign>Middle</VerticalAlign>
</Style>
<Value>=Last(Fields!Withholding_Tax__Withholding_Tax___.Value)</Value>
// Add the following lines.
<Visibility>
<Hidden>true</Hidden>
</Visibility>
// End of the lines.
<ZIndex>11</ZIndex>
</Textbox>
</ReportItems>
...
Existing code 3...
<VerticalAlign>Middle</VerticalAlign>
</Style>
<Value>=Last(Fields!Withholding_Tax__Withholding_Tax___.Value)</Value>
<ZIndex>20</ZIndex>
</Textbox>
</ReportItems>
...
Replacement code 3...
<VerticalAlign>Middle</VerticalAlign>
</Style>
<Value>=Last(Fields!Withholding_Tax__Withholding_Tax___.Value)</Value>
// Add the following lines.
<Visibility>
<Hidden>true</Hidden>
</Visibility>
// End of the lines.
<ZIndex>20</ZIndex>
</Textbox>
</ReportItems>
...
Existing code 4...
<VerticalAlign>Middle</VerticalAlign>
</Style>
<Value>=Last(Fields!Withholding_Tax__Withholding_Tax___.Value)</Value>
<ZIndex>29</ZIndex>
</Textbox>
</ReportItems>
...
Replacement code 4...
<VerticalAlign>Middle</VerticalAlign>
</Style>
<Value>=Last(Fields!Withholding_Tax__Withholding_Tax___.Value)</Value>
// Add the following lines.
<Visibility>
<Hidden>true</Hidden>
</Visibility>
// End of the lines.
<ZIndex>29</ZIndex>
</Textbox>
</ReportItems>
...
Existing code 5...
</Footer>
<Grouping Name="table4_Group1">
<GroupExpressions>
// Delete the following line.
<GroupExpression>=Fields!Withholding_Tax__Withholding_Tax___.Value</GroupExpression>
// End of the line.
</GroupExpressions>
</Grouping>
</TableGroup>
...
Replacement code 5...
</Footer>
<Grouping Name="table4_Group1">
<GroupExpressions>
// Add the following lines.
<GroupExpression>=Fields!Withholding_Tax_Withholding_Tax_Code.Value</GroupExpression>
<GroupExpression>=Fields!WithholdTaxCodeDescription.Value</GroupExpression>
// End of the lines.
</GroupExpressions>
</Grouping>
</TableGroup>
...
Existing code 6...
</Footer>
<Grouping Name="table4_Group2">
<GroupExpressions>
// Delete the following lines.
<GroupExpression>=Fields!Withholding_Tax_Withholding_Tax_Code.Value</GroupExpression>
<GroupExpression>=Fields!WithholdTaxCodeDescription.Value</GroupExpression>
// End of the lines.
</GroupExpressions>
</Grouping>
</TableGroup>
...
Replacement code 6...
</Footer>
<Grouping Name="table4_Group2">
<GroupExpressions>
// Add the following line.
<GroupExpression>=Fields!Withholding_Tax__Withholding_Tax___.Value</GroupExpression>
// End of the line.
</GroupExpressions>
</Grouping>
</TableGroup>
...
Existing code 7...
</Code>
<DataSets>
<DataSet Name="DataSet_Result">
// Delete the following lines.
<Query>
<CommandText />
<DataSourceName>DummyDataSource</DataSourceName>
</Query>
// End of the lines.
<Fields>
<Field Name="SubstituteData_NNC">
<DataField>SubstituteData_NNC</DataField>
...
Replacement code 7...
</Code>
<DataSets>
<DataSet Name="DataSet_Result">
<Fields>
<Field Name="SubstituteData_NNC">
<DataField>SubstituteData_NNC</DataField>
...
Existing code 8...
<Field Name="Withholding_Tax__Withholding_Tax_Amount__Control5Format">
<DataField>Withholding_Tax__Withholding_Tax_Amount__Control5Format</DataField>
</Field>
// Delete the following lines.
<Field Name="Withholding_Tax__Withholding_Tax____Control8Format">
<DataField>Withholding_Tax__Withholding_Tax____Control8Format</DataField>
</Field>
// End of the lines.
<Field Name="Withholding_Tax__Taxable_Base__Control11Format">
<DataField>Withholding_Tax__Taxable_Base__Control11Format</DataField>
</Field>
...
Replacement code 8...
<Field Name="Withholding_Tax__Withholding_Tax_Amount__Control5Format">
<DataField>Withholding_Tax__Withholding_Tax_Amount__Control5Format</DataField>
</Field>
<Field Name="Withholding_Tax__Taxable_Base__Control11Format">
<DataField>Withholding_Tax__Taxable_Base__Control11Format</DataField>
</Field>
...
Existing code 9...
<Field Name="Withholding_Tax_Withholding_Tax_Code">
<DataField>Withholding_Tax_Withholding_Tax_Code</DataField>
</Field>
<Field Name="Withholding_Tax_Vendor_No_">
<DataField>Withholding_Tax_Vendor_No_</DataField>
</Field>
...
Replacement code 9...
<Field Name="Withholding_Tax_Withholding_Tax_Code">
<DataField>Withholding_Tax_Withholding_Tax_Code</DataField>
</Field>
// Add the following lines.
<Field Name="Withholding_Tax_Withholding_Tax__">
<DataField>Withholding_Tax_Withholding_Tax__</DataField>
</Field>
<Field Name="Withholding_Tax_Withholding_Tax__Format">
<DataField>Withholding_Tax_Withholding_Tax__Format</DataField>
</Field>
// End of the lines.
<Field Name="Withholding_Tax_Vendor_No_">
<DataField>Withholding_Tax_Vendor_No_</DataField>
</Field>
...
Existing code 10...
<DataField>INAIL_Vendor_No_</DataField>
</Field>
</Fields>
<rd:DataSetInfo>
<rd:DataSetName>DataSet</rd:DataSetName>
<rd:TableName>Result</rd:TableName>
...
Replacement code 10...
<DataField>INAIL_Vendor_No_</DataField>
</Field>
</Fields>
// Add the following lines.
<Query>
<CommandText />
<DataSourceName>DummyDataSource</DataSourceName>
</Query>
// End of the lines.
<rd:DataSetInfo>
<rd:DataSetName>DataSet</rd:DataSetName>
<rd:TableName>Result</rd:TableName>
...