Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b66801e2

Von Tamino Steinert vor 11 Monaten hinzugefügt

  • ID b66801e2ac8aab53073b1b4e96e43a1d7a67f15f
  • Vorgänger a304b407
  • Nachfolger fefc824c

S:Presenter:Record: Alias Funktion "show" in verwendeten Objekten

Verknüpfte Belege nutzt folgende Objekte:
DeliveryOrder, Dunning, EmailJournal, GL, Invoice, Letter, Order,
Reclamation, RequirementSpec, ShopOrder

Unterschiede anzeigen:

SL/Presenter/Dunning.pm
6 6
use SL::Presenter::Tag         qw(link_tag);
7 7

  
8 8
use Exporter qw(import);
9
our @EXPORT_OK = qw(dunning);
9
our @EXPORT_OK = qw(show dunning);
10 10

  
11 11
use Carp;
12 12

  
13
sub show {goto &dunning};
14

  
13 15
sub dunning {
14 16
  my ($dunning, %params) = @_;
15 17

  
......
19 21

  
20 22
  my $text = escape($dunning->dunning_config->dunning_description);
21 23
  if (! delete $params{no_link}) {
22
    my @flags;
24
    my @flags = ();
23 25
    push @flags, 'showold=1';
24 26
    push @flags, 'l_mails=1'      if $::instance_conf->get_email_journal;
25 27
    push @flags, 'l_webdav=1'     if $::instance_conf->get_webdav;
......
34 36
}
35 37

  
36 38
1;
39

  
40
__END__
41

  
42
=pod
43

  
44
=encoding utf8
45

  
46
=head1 NAME
47

  
48
SL::Presenter::Dunning - Presenter module for SL::DB::Dunning objects
49

  
50
=head1 SYNOPSIS
51

  
52
  my $object = SL::DB::Manager::Dunning->get_first();
53
  my $html   = SL::Presenter::Dunning::dunning($object);
54
  # or
55
  my $html   = $object->presenter->show();
56

  
57
=head1 FUNCTIONS
58

  
59
=over 4
60

  
61
=item C<show $object>
62

  
63
Alias for C<dunning $object %params>.
64

  
65
=item C<dunning $object %params>
66

  
67
Returns a rendered version (actually an instance of
68
L<SL::Presenter::EscapedText>) of the dunning object
69
C<$object>.
70

  
71
Remaining C<%params> are passed to the function
72
C<SL::Presenter::Tag::link_tag>. It can include:
73

  
74
=over 2
75

  
76
=item * no_link
77

  
78
If falsish (the default) then the  dunning will be linked to the "show" dialog.
79

  
80
=back
81

  
82
=back
83

  
84
=head1 BUGS
85

  
86
Nothing here yet.
87

  
88
=head1 AUTHOR
89

  
90
Tamino Steinert E<lt>tamino.steinert@tamino.stE<gt>
91

  
92
=cut

Auch abrufbar als: Unified diff