-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input VAT Books #31
Comments
Hi Bojan,
I added additional filters on the matrix setup cell, within formula.
You can use these filters to get summaries with defined filters below.
[cid:image008.png@01D4443B.6E870A50]
[cid:image009.png@01D4443B.6E870A50]
[cid:image010.png@01D4443B.6E870A50]
[cid:image011.png@01D4443B.6E870A50]
Srdačan pozdrav,
Milorad Grković
NAV Developer
GoPro d.o.o. | Solutions, not software.
Prve pruge 27c | 11000 Belgrade | Serbia
Phone +381 11 31 90 439
Mobile +381 63 269 171
Web www.gopro.rs<http://www.gopro.rs/>
[cid:image006.jpg@01D3BF9D.0063FD80]
From: Bojan Ličen <notifications@github.com>
Sent: Tuesday, September 4, 2018 10:00 AM
To: AdriaticOrg/code <code@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: [AdriaticOrg/code] Input VAT Books (#31)
Hi,
I would like to setup calculation on a same column which include group of different "VAT Identificators" by Type:Sales and another group of "VAT Identificators" by Type::Purchase with "ReverseSign" grouped by "Document No.".
Current function for calculations only takes datefilter:
(codeunit 13062591) - VATBookCalc.EvaluateExpression(VATBookGroup, 0, '', DateFilter);
In case of "Input VAT Book" calculations we will need additional parameter to set "VAT Entry" with right filters. I would add whole "VAT Entry" as parameter.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#31>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Aoeb_c1jgMGY977vtCtHEjsONQYFscyvks5uXjL_gaJpZM4WYepy>.
|
I know that these filters exist and they can be set up. Let say that I need to calculate values grouped by "Document No.". This can not be done through page condition filters. I need to pass What would be the difference if I use below function for calculations? BR, |
Hi Bojan,
Sorry for late response, yesterday I had meetings all day.
Yes, I think that you can use function CalculateValue, but you must set filters first, before you call that function.
I use similar code in "VAT Book-Adl" report, where I filter Value Entry on PreDataItem trigger, and then use function CalculateValue OnAfterGetRecord filter
trigger OnAfterGetRecord();
begin
ColumnAmt := 0;
GetCustVendInfo;
if "VAT Book View Line".Operator1 <> "VAT Book View Line".Operator1::" " then
VATBookCalc.CalculateValue(true, ColumnAmt, "VAT Book View Line", "VAT Entry");
if "VAT Book View Line".Operator2 <> "VAT Book View Line".Operator2::" " then
VATBookCalc.CalculateValue(false, ColumnAmt, "VAT Book View Line", "VAT Entry");
end;
trigger OnPreDataItem();
begin
"VAT Book View Line".SetVATEntryFilters("VAT Entry");
if VATEntry.GetFilter("Posting Date") <> '' then
"VAT Entry".Setfilter("Posting Date", VATEntry.GetFilter("Posting Date"));
if VATEntry.GetFilter("Document No.") <> '' then
"VAT Entry".Setfilter("Document No.", VATEntry.GetFilter("Document No."));
if VATEntry.GetFilter("VAT Bus. Posting Group") <> '' then
"VAT Entry".Setfilter("VAT Bus. Posting Group", VATEntry.GetFilter("VAT Bus. Posting Group"));
if not FindSet then
NotFoundDetails := true;
end;
Srdačan pozdrav,
Milorad Grković
NAV Developer
GoPro d.o.o. | Solutions, not software.
Prve pruge 27c | 11000 Belgrade | Serbia
Phone +381 11 31 90 439
Mobile +381 63 269 171
Web www.gopro.rs<http://www.gopro.rs/>
[cid:image006.jpg@01D3BF9D.0063FD80]
From: Bojan Ličen <notifications@github.com>
Sent: Tuesday, September 4, 2018 12:16 PM
To: AdriaticOrg/code <code@noreply.github.com>
Cc: Milorad Grković <milorad.grkovic@gopro.rs>; Comment <comment@noreply.github.com>
Subject: Re: [AdriaticOrg/code] Input VAT Books (#31)
I know that these filters exist and they can be set up.
Last time we sad that for calculations we will use:
procedure EvaluateExpression(VATBookGroup: Record "VAT Book Group-Adl"; ColumnNo: Integer; DateFilter: Text) Result: Decimal;
Let say that I need to calculate values grouped by "Document No.". This can not be done through page condition filters. I need to pass Document No. as filter of Value Entry
What would be the difference if I use below function for calculations?
procedure CalculateValue(IsFirstValue: Boolean; var TempAmount: Decimal; VATBookViewFormula: Record "VAT Book View Formula-Adl"; VatEntry: Record "VAT Entry");
BR,
Bojan
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#31 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Aoeb_UCIH5uV0WTgnBJccSdn_DRX0tfsks5uXlLUgaJpZM4WYepy>.
|
Hi, tnx for answer. BR, |
Yes, but, you can do filtering before you call function CalculateValue.
Conditional filters are included in this line of code (yellow mark), and you then use calculation only for filtered records.
trigger OnAfterGetRecord();
begin
ColumnAmt := 0;
GetCustVendInfo;
if "VAT Book View Line".Operator1 <> "VAT Book View Line".Operator1::" " then
VATBookCalc.CalculateValue(true, ColumnAmt, "VAT Book View Line", "VAT Entry");
if "VAT Book View Line".Operator2 <> "VAT Book View Line".Operator2::" " then
VATBookCalc.CalculateValue(false, ColumnAmt, "VAT Book View Line", "VAT Entry");
end;
trigger OnPreDataItem();
begin
"VAT Book View Line".SetVATEntryFilters("VAT Entry");
if VATEntry.GetFilter("Posting Date") <> '' then
"VAT Entry".Setfilter("Posting Date", VATEntry.GetFilter("Posting Date"));
if VATEntry.GetFilter("Document No.") <> '' then
"VAT Entry".Setfilter("Document No.", VATEntry.GetFilter("Document No."));
if VATEntry.GetFilter("VAT Bus. Posting Group") <> '' then
"VAT Entry".Setfilter("VAT Bus. Posting Group", VATEntry.GetFilter("VAT Bus. Posting Group"));
if not FindSet then
NotFoundDetails := true;
end;
Srdačan pozdrav,
Milorad Grković
NAV Developer
GoPro d.o.o. | Solutions, not software.
Prve pruge 27c | 11000 Belgrade | Serbia
Phone +381 11 31 90 439
Mobile +381 63 269 171
Web www.gopro.rs<http://www.gopro.rs/>
[cid:image006.jpg@01D3BF9D.0063FD80]
From: Bojan Ličen <notifications@github.com>
Sent: Wednesday, September 5, 2018 11:56 AM
To: AdriaticOrg/code <code@noreply.github.com>
Cc: Milorad Grković <milorad.grkovic@gopro.rs>; Comment <comment@noreply.github.com>
Subject: Re: [AdriaticOrg/code] Input VAT Books (#31)
Hi,
tnx for answer.
Working that way only values are calculated without condition filters?
BR,
Bojan
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#31 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Aoeb_cf5EMI9GPMoPv8YT3_-T3e4JLlbks5uX5_IgaJpZM4WYepy>.
|
Hi,
I would like to setup calculation on a same column which include group of different "VAT Identificators" by Type:Sales and another group of "VAT Identificators" by Type::Purchase with "ReverseSign" grouped by "Document No.".
Current function for calculations only takes datefilter:
(codeunit 13062591) - VATBookCalc.EvaluateExpression(VATBookGroup, 0, '', DateFilter);
In case of "Input VAT Book" calculations we will need additional parameter to set "VAT Entry" with right filters. I would add whole "VAT Entry" as parameter.
The text was updated successfully, but these errors were encountered: