We would like to have the possibility to access the first period of the fiscal year to which the current period belongs. This would be very similar to accessing the last period of the fiscal year by using the existing year_end functionality on a period:
year_end: The period at the end of the fiscal year this period is in.
Combining the functionalities of year_end with minus_1y might seem to offer a solution, but it does not guarantee to yield the actual first period of the fiscal year, since the fiscal years might be shortened or extended (âverlengde/verkorte boekjarenâ)
Is there another possibility to access the first period of the fiscal year a period is in?
Iâll ask internally why year_end exists and year_start doesnât though. We might have it in the future but this will help you out in the mean while.
Hi @SamVanEenoo, thanks for the quick response.
When I use the code you provided, I just get âYâ as a result.
Which makes sense, since Y is not a known time format element for strftime.
â%Yâ is a known time format element, but yields the year of the date, not the period.
Hello @SamVanEenoo,
I was already able to get the integer representing the year of the first period of the fiscal year using a date format on period.year_start_date.
What I want to be able to do is get the actual Period drop, not the date.
I actually encountered the lack of this functionality while working around another issue in our custom template that corresponds to Silverfinâs Loans & Leasings (42).
TLDR: we need to access the opening value of an account for a period that does not yet have any bookings.
Long story:
We need to access the opening value of a period, in order to fill it in as the default value of an input field.
This period is determined by a date the user provides in another input field.
We can determine the end period of the fiscal year in which the user-provided date lies.
We then simply get the opening_value of that period for an account.
However, if this end period does not yet have any bookings (in the accountancy software), the period does not yet exist in Silverfin yet, and Silverfin does not seem to be able to return the correct opening_value. Yet the opening value is known by Silverfin, just not on that (âunexistingâ) periodâŚ
So we thought we could circumvent this restriction by accessing the year_start date, which does exist, and get the opening_value from that period, but that seems to be a no-go as wellâŚ
If you donât have any data in period Q1 2019 for instance, youâll never be able to even go to that period through the date picker of the working papers (so you wonât be able to reach the working papers of that period - itâs not an option even). Thatâs just standard Silverfin for nowâŚ
May I ask, from an accounting standpoint, why you want to be able to do such thing? Is it to make budgets f.i.?
We understand that one cannot navigate to a period that does not have any data, and therefore does not exist in Silverfin yet; that makes sense That is not what we try to do either.
We tried to access a known opening value for an account, but on a period that does not yet have data.
Since Silverfin knows what fiscal year the period is in, it knows the first period of that fiscal year (which does have data), and knows the opening value.
Since this did not work, we tried to access the first period of a fiscal year with the unexisting .year_start on a period.
We would like to achieve this to populate the amortization tables for future years.
We fill in defaults for the starting balance based on the opening value from the accountancy data, if present.
My experiences are that the period needs to exist in order to be able to call the opening value on it correctly, so I donât think that matches with
I am also not sure with what is happening when calling âopen_valueâ on a period drop?
period.plus_1y.opening_value
I was under the impression that one needs to call the opening_value on an account for a period, not the period itself?
And my experience is that the accounts do not exist for unexisting periods, and therefore do not allow to get the opening valueâŚ
So when there is not yet data in the last period of the fiscal year to which the current period belongs, then the following code will result in 0.0 instead of the correct opening value:
I was actually already using .include_zeros_with_details but then I only got the name of the account, not the opening value.
Using .include_zeros does indeed yield the desired result when calling the opening value on an account for a not yet existing period