X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/5d1790289c565ace01143d524538bd505859a57c..5eb836e4c3a624438acea1984639bfafb0d03d94:/SL/DB/Helper/AccountingPeriod.pm diff --git a/SL/DB/Helper/AccountingPeriod.pm b/SL/DB/Helper/AccountingPeriod.pm index 1bd0806f7..e29d0e5ed 100644 --- a/SL/DB/Helper/AccountingPeriod.pm +++ b/SL/DB/Helper/AccountingPeriod.pm @@ -1,13 +1,24 @@ package SL::DB::Helper::AccountingPeriod; use strict; +use SL::Locale::String qw(t8); use parent qw(Exporter); use SL::DBUtils; -our @EXPORT = qw(get_balance_starting_date); +our @EXPORT = qw(get_balance_starting_date get_balance_startdate_method_options); use Carp; +sub get_balance_startdate_method_options { + [ + { title => t8("After closed period"), value => "closed_to" }, + { title => t8("Start of year"), value => "start_of_year" }, + { title => t8("All transactions"), value => "all_transactions" }, + { title => t8("Last opening balance or all transactions"), value => "last_ob_or_all_transactions" }, + { title => t8("Last opening balance or start of year"), value => "last_ob_or_start_of_year" }, + ] +} + sub get_balance_starting_date { my ($self,$asofdate) = @_; @@ -106,6 +117,11 @@ SL::DB::Helper::AccountingPeriod - Helper functions for calculating dates relati =over 4 +=item C + +Returns an arrayref of translated options for determining the startdate of a +balance period or the yearend period. To be used as the options for a dropdown. + =item C Given a date this method calculates and returns the starting date of the