Skip to content

Commit

Permalink
Merge pull request #48 from fluxxus-nl/Different_Entries_Posting
Browse files Browse the repository at this point in the history
Different entries posting
  • Loading branch information
lvanvugt authored Sep 27, 2024
2 parents 9af7981 + 9de1eb8 commit 7b08ff5
Show file tree
Hide file tree
Showing 25 changed files with 884 additions and 107 deletions.
Binary file added app/Layouts/Conference.docx
Binary file not shown.
262 changes: 262 additions & 0 deletions app/Layouts/Conference.rdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSource">
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString />
</ConnectionProperties>
<rd:SecurityType>None</rd:SecurityType>
</DataSource>
</DataSources>
<ReportSections>
<ReportSection>
<Body>
<Height>2in</Height>
<Style />
</Body>
<Width>6.5in</Width>
<Page>
<Style />
</Page>
</ReportSection>
</ReportSections>
<ReportParameters>
<ReportParameter Name="Conference">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>Conference</Value>
</Values>
</DefaultValue>
<Prompt>Conference</Prompt>
</ReportParameter>
<ReportParameter Name="Conference_noCaption">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>Conference_noCaption</Value>
</Values>
</DefaultValue>
<Prompt>Conference_noCaption</Prompt>
</ReportParameter>
<ReportParameter Name="Conference_LocationCaption">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>Conference_LocationCaption</Value>
</Values>
</DefaultValue>
<Prompt>Conference_LocationCaption</Prompt>
</ReportParameter>
<ReportParameter Name="Starting_DateCaption">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>Starting_DateCaption</Value>
</Values>
</DefaultValue>
<Prompt>Starting_DateCaption</Prompt>
</ReportParameter>
<ReportParameter Name="StartingTimeCaption">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>StartingTimeCaption</Value>
</Values>
</DefaultValue>
<Prompt>StartingTimeCaption</Prompt>
</ReportParameter>
<ReportParameter Name="DurationCaption">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>DurationCaption</Value>
</Values>
</DefaultValue>
<Prompt>DurationCaption</Prompt>
</ReportParameter>
<ReportParameter Name="EndingTimeCaption">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>EndingTimeCaption</Value>
</Values>
</DefaultValue>
<Prompt>EndingTimeCaption</Prompt>
</ReportParameter>
<ReportParameter Name="NoAttendeesCaption">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>NoAttendeesCaption</Value>
</Values>
</DefaultValue>
<Prompt>NoAttendeesCaption</Prompt>
</ReportParameter>
<ReportParameter Name="typeCaption">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>typeCaption</Value>
</Values>
</DefaultValue>
<Prompt>typeCaption</Prompt>
</ReportParameter>
<ReportParameter Name="Document_No_Caption">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>Document_No_Caption</Value>
</Values>
</DefaultValue>
<Prompt>Document_No_Caption</Prompt>
</ReportParameter>
<ReportParameter Name="No_Caption">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>No_Caption</Value>
</Values>
</DefaultValue>
<Prompt>No_Caption</Prompt>
</ReportParameter>
<ReportParameter Name="DescriptionCaption">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>DescriptionCaption</Value>
</Values>
</DefaultValue>
<Prompt>DescriptionCaption</Prompt>
</ReportParameter>
<ReportParameter Name="Unit_of_Measure_CodeCaption">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>Unit_of_Measure_CodeCaption</Value>
</Values>
</DefaultValue>
<Prompt>Unit_of_Measure_CodeCaption</Prompt>
</ReportParameter>
<ReportParameter Name="Unit_PriceCaption">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>Unit_PriceCaption</Value>
</Values>
</DefaultValue>
<Prompt>Unit_PriceCaption</Prompt>
</ReportParameter>
<ReportParameter Name="AmountCaption">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>AmountCaption</Value>
</Values>
</DefaultValue>
<Prompt>AmountCaption</Prompt>
</ReportParameter>
</ReportParameters>
<Code>Public Function BlankZero(ByVal Value As Decimal)
if Value = 0 then
Return ""
end if
Return Value
End Function

Public Function BlankPos(ByVal Value As Decimal)
if Value &gt; 0 then
Return ""
end if
Return Value
End Function

Public Function BlankZeroAndPos(ByVal Value As Decimal)
if Value &gt;= 0 then
Return ""
end if
Return Value
End Function

Public Function BlankNeg(ByVal Value As Decimal)
if Value &lt; 0 then
Return ""
end if
Return Value
End Function

Public Function BlankNegAndZero(ByVal Value As Decimal)
if Value &lt;= 0 then
Return ""
end if
Return Value
End Function
</Code>
<Language>=User!Language</Language>
<ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
<rd:ReportID>0eeb6585-38ae-40f1-885b-8d50088d51b4</rd:ReportID>
<DataSets>
<DataSet Name="DataSet_Result">
<Fields>
<Field Name="Conference_no">
<DataField>Conference_no</DataField>
</Field>
<Field Name="Conference_Location">
<DataField>Conference_Location</DataField>
</Field>
<Field Name="Starting_Date">
<DataField>Starting_Date</DataField>
</Field>
<Field Name="StartingTime">
<DataField>StartingTime</DataField>
</Field>
<Field Name="Duration">
<DataField>Duration</DataField>
</Field>
<Field Name="EndingTime">
<DataField>EndingTime</DataField>
</Field>
<Field Name="NoAttendees">
<DataField>NoAttendees</DataField>
</Field>
<Field Name="type">
<DataField>type</DataField>
</Field>
<Field Name="Document_No_">
<DataField>Document_No_</DataField>
</Field>
<Field Name="No_">
<DataField>No_</DataField>
</Field>
<Field Name="Description">
<DataField>Description</DataField>
</Field>
<Field Name="Unit_of_Measure_Code">
<DataField>Unit_of_Measure_Code</DataField>
</Field>
<Field Name="Unit_Price">
<DataField>Unit_Price</DataField>
</Field>
<Field Name="Unit_PriceFormat">
<DataField>Unit_PriceFormat</DataField>
</Field>
<Field Name="Amount">
<DataField>Amount</DataField>
</Field>
<Field Name="AmountFormat">
<DataField>AmountFormat</DataField>
</Field>
<Field Name="CompanyInformation_Name">
<DataField>CompanyInformation_Name</DataField>
</Field>
</Fields>
<Query>
<DataSourceName>DataSource</DataSourceName>
<CommandText />
</Query>
</DataSet>
</DataSets>
</Report>
27 changes: 21 additions & 6 deletions app/src/codeunit/ConferenceJnlCheckLine.Codeunit.al
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
codeunit 50000 "Conference Jnl.-Check Line ASD"
{
internal procedure DoCheck(ConferenceASD: Record "Conference ASD"; ConferenceLineASD: Record "Conference Line ASD")
TableNo = "Conference ASD";
internal procedure DoCheckConferenceDoc(ConferenceASD: Record "Conference ASD"; ConferenceLineASD: Record "Conference Line ASD")
begin
ConferenceASD.TestField(Customer);
ConferenceASD.TestField(ConferenceLocation);
ConferenceASD.TestField(DocumentDate);
ConferenceASD.TestField(PostingDate);
ConferenceASD.TestField(StartingDate);
ConferenceASD.TestField(StartingTime);
ConferenceASD.TestField(Duration);
CheckPostingDate(ConferenceASD.PostingDate);
CheckDocumentDate(ConferenceASD.DocumentDate);
case ConferenceLineASD.type of
ConferenceLineASD.type::Item:
ConferenceLineASD.TestField("No.");
Expand All @@ -20,13 +20,28 @@ codeunit 50000 "Conference Jnl.-Check Line ASD"
ConferenceLineASD.TestField(Quantity);
ConferenceLineASD.TestField("Unit Price");
ConferenceLineASD.TestField(Amount);

if ConferenceASD."Gen. Bus. Posting Group" <> '' then
ConferenceLineASD."Gen. Bus. Posting Group" := ConferenceASD."Gen. Bus. Posting Group";

ConferenceLineASD.TestField("Gen. Bus. Posting Group");
ConferenceLineASD.TestField("Gen. Prod. Posting Group");
ConferenceLineASD.TestField("VAT Prod. Posting Group");

CheckPostingDate(ConferenceASD.PostingDate);
CheckDocumentDate(ConferenceASD.DocumentDate);
CheckQty(ConferenceLineASD.Quantity);

ConferenceASD.TestField(StartingDate);
ConferenceASD.TestField(StartingTime);
ConferenceASD.TestField(Duration);
ConferenceASD.TestField(NoAttendees);
end;

internal procedure DoCheckConferenceLocation(ConferenceLocationASD: Record "Conference Location ASD")
begin
ConferenceLocationASD.TestField("No.");
ConferenceLocationASD.TestField("Base Unit of Measure");
ConferenceLocationASD.TestField("Unit Price");
ConferenceLocationASD.TestField("Gen. Prod. Posting Group");
end;

local procedure CheckPostingDate(LocalPostingDate: Date)
Expand Down
Loading

0 comments on commit 7b08ff5

Please sign in to comment.