Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 430ff87e

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID 430ff87e66115e9890a8456a194cb9d77f8d92c4
  • Vorgänger 5dc8067b
  • Nachfolger 3dfe100d

SL::Presenter::BankTransaction: einfacher Presenter für Bankbuchungen

Unterschiede anzeigen:

SL/Presenter/BankTransaction.pm
1
package SL::Presenter::BankTransaction;
2

  
3
use strict;
4
use utf8;
5

  
6
use SL::Locale::String qw(t8);
7
use SL::Presenter::EscapedText qw(escape);
8

  
9
use Exporter qw(import);
10
our @EXPORT_OK = qw(show bank_transaction);
11

  
12
use Carp;
13

  
14
sub show {goto &bank_account};
15

  
16
sub bank_transaction {
17
  my ($bank_transaction) = @_;
18
  my $bank_account = $bank_transaction->local_bank_account;
19

  
20
  escape(join ' ', (
21
    t8('Bank transaction'),
22
    $bank_transaction->transdate . ":",
23
    $bank_account->bank_code,
24
    $bank_account->account_number,
25
    "→",
26
    $bank_transaction->remote_bank_code,
27
    $bank_transaction->remote_account_number,
28
    "-",
29
    $bank_transaction->amount . $bank_transaction->currency->name,
30
  ));
31
}
32

  
33
1;
34

  
35
__END__
36

  
37
=pod
38

  
39
=encoding utf8
40

  
41
=head1 NAME
42

  
43
SL::Presenter::BankTransaction - Presenter module for SL::DB::BankTransaction objects
44

  
45
=head1 SYNOPSIS
46

  
47
  my $object = SL::DB::Manager::BankTransaction->get_first();
48
  my $html   = SL::Presenter::BankTransaction::bank_transaction($object);
49

  
50
=head1 FUNCTIONS
51

  
52
=over 4
53

  
54
=item C<show $object>
55

  
56
Alias for C<bank_transaction $object>.
57

  
58
=item C<bank_transaction $object>
59

  
60
Returns a rendered version (actually an instance of
61
L<SL::Presenter::EscapedText>) of the bank transaction object
62
C<$object>.
63

  
64
=back
65

  
66
=head1 BUGS
67

  
68
Nothing here yet.
69

  
70
=head1 AUTHOR
71

  
72
Tamino Steinert E<lt>tamino.steinert@tamino.stE<gt>
73

  
74
=cut

Auch abrufbar als: Unified diff