Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5eb836e4

Von G. Richardson vor mehr als 5 Jahren hinzugefügt

  • ID 5eb836e4c3a624438acea1984639bfafb0d03d94
  • Vorgänger 5d179028
  • Nachfolger da2f5aa8

balance_startdate_method_options nach AccountingPeriod Helper

verlagert, wird auch für YearEndTransactions benötigt.

Unterschiede anzeigen:

SL/Controller/ClientConfig.pm
18 18
use SL::PriceSource::ALL;
19 19
use SL::Template;
20 20
use SL::Controller::TopQuickSearch;
21
use SL::DB::Helper::AccountingPeriod qw(get_balance_startdate_method_options);
21 22
use SL::Helper::ShippedQty;
22 23

  
23 24
__PACKAGE__->run_before('check_auth');
......
188 189
}
189 190

  
190 191
sub init_balance_startdate_method_options {
191
  [ { title => t8("After closed period"),                       value => "closed_to"                   },
192
    { title => t8("Start of year"),                             value => "start_of_year"               },
193
    { title => t8("All transactions"),                          value => "all_transactions"            },
194
    { title => t8("Last opening balance or all transactions"),  value => "last_ob_or_all_transactions" },
195
    { title => t8("Last opening balance or start of year"),     value => "last_ob_or_start_of_year"    }, ]
192
  return SL::DB::Helper::AccountingPeriod::get_balance_startdate_method_options;
196 193
}
197 194

  
198 195
sub init_all_price_sources {
SL/DB/Helper/AccountingPeriod.pm
1 1
package SL::DB::Helper::AccountingPeriod;
2 2

  
3 3
use strict;
4
use SL::Locale::String qw(t8);
4 5

  
5 6
use parent qw(Exporter);
6 7
use SL::DBUtils;
7
our @EXPORT = qw(get_balance_starting_date);
8
our @EXPORT = qw(get_balance_starting_date get_balance_startdate_method_options);
8 9

  
9 10
use Carp;
10 11

  
12
sub get_balance_startdate_method_options {
13
  [
14
    { title => t8("After closed period"),                       value => "closed_to"                   },
15
    { title => t8("Start of year"),                             value => "start_of_year"               },
16
    { title => t8("All transactions"),                          value => "all_transactions"            },
17
    { title => t8("Last opening balance or all transactions"),  value => "last_ob_or_all_transactions" },
18
    { title => t8("Last opening balance or start of year"),     value => "last_ob_or_start_of_year"    },
19
  ]
20
}
21

  
11 22
sub get_balance_starting_date {
12 23
  my ($self,$asofdate) = @_;
13 24

  
......
106 117

  
107 118
=over 4
108 119

  
120
=item C<get_balance_startdate_method_options>
121

  
122
Returns an arrayref of translated options for determining the startdate of a
123
balance period or the yearend period. To be used as the options for a dropdown.
124

  
109 125
=item C<get_balance_starting_date $date>
110 126

  
111 127
Given a date this method calculates and returns the starting date of the

Auch abrufbar als: Unified diff