summaryrefslogtreecommitdiff
path: root/doc/sandbox
diff options
context:
space:
mode:
Diffstat (limited to 'doc/sandbox')
0 files changed, 0 insertions, 0 deletions
="n_28" class="hl">#
  • #
  • # This program is free software; you can redistribute it and/or modify
  • # it under the terms of the GNU General Public License as published by
  • # the Free Software Foundation; either version 2 of the License, or
  • # (at your option) any later version.
  • #
  • # This program is distributed in the hope that it will be useful,
  • # but WITHOUT ANY WARRANTY; without even the implied warranty of
  • # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • # GNU General Public License for more details.
  • # You should have received a copy of the GNU General Public License
  • # along with this program; if not, write to the Free Software
  • # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  • =head1 METHODS
  • =cut
  • package LedgerSMB::Scripts::payment;
  • use LedgerSMB::Template;
  • use LedgerSMB::Sysconfig;
  • use LedgerSMB::DBObject::Payment;
  • use LedgerSMB::DBObject::Date;
  • use Error::Simple;
  • use strict;
  • # CT: A few notes for future refactoring of this code:
  • # 1: I don't think it is a good idea to make the UI too dependant on internal
  • # code structures but I don't see a good alternative at the moment.
  • # 2: CamelCasing: -1
  • =pod
  • =item payment
  • This method is used to set the filter screen and prints it, using the
  • TT2 system.
  • =back
  • =cut
  • sub payments {
  • my ($request) = @_;
  • my $payment = LedgerSMB::DBObject::Payment->new({'base' => $request});
  • $payment->get_metadata();
  • if (!defined $payment->{batch_date}){
  • $payment->error("No Batch Date!");
  • }
  • my $template = LedgerSMB::Template->new(
  • user => $request->{_user},
  • locale => $request->{_locale},
  • path => 'UI/payments',
  • template => 'payments_filter',
  • format => 'HTML',
  • );
  • $template->render($payment);
  • }
  • sub get_search_criteria {
  • my ($request) = @_;
  • my $payment = LedgerSMB::DBObject::Payment->new({'base' => $request});
  • $payment->get_metadata();