'Fehlbetrag setzen' mit Schweizer Zahlenformat kompatibel machen
[kivitendo-erp.git] / SL / Presenter / ALL.pm
1 package SL::Presenter::ALL;
2
3 use strict;
4
5 use SL::Presenter::Chart;
6 use SL::Presenter::CustomerVendor;
7 use SL::Presenter::DeliveryOrder;
8 use SL::Presenter::Dunning;
9 use SL::Presenter::EscapedText;
10 use SL::Presenter::FileObject;
11 use SL::Presenter::Invoice;
12 use SL::Presenter::GL;
13 use SL::Presenter::Letter;
14 use SL::Presenter::Order;
15 use SL::Presenter::Part;
16 use SL::Presenter::Project;
17 use SL::Presenter::Record;
18 use SL::Presenter::RequirementSpec;
19 use SL::Presenter::RequirementSpecItem;
20 use SL::Presenter::RequirementSpecTextBlock;
21 use SL::Presenter::SepaExport;
22 use SL::Presenter::ShopOrder;
23 use SL::Presenter::Text;
24 use SL::Presenter::Tag;
25 use SL::Presenter::BankAccount;
26 use SL::Presenter::MaterialComponents;
27
28 our %presenters = (
29   chart                       => 'SL::Presenter::Chart',
30   customer_vendor             => 'SL::Presenter::CustomerVendor',
31   delivery_order              => 'SL::Presenter::DeliveryOrder',
32   dunning                     => 'SL::Presenter::Dunning',
33   escaped_text                => 'SL::Presenter::EscapedText',
34   file_object                 => 'SL::Presenter::FileObject',
35   invoice                     => 'SL::Presenter::Invoice',
36   gl                          => 'SL::Presenter::GL',
37   letter                      => 'SL::Presenter::Letter',
38   order                       => 'SL::Presenter::Order',
39   part                        => 'SL::Presenter::Part',
40   project                     => 'SL::Presenter::Project',
41   record                      => 'SL::Presenter::Record',
42   requirement_spec            => 'SL::Presenter::RequirementSpec',
43   requirement_spec_item       => 'SL::Presenter::RequirementSpecItem',
44   requirement_spec_text_block => 'SL::Presenter::RequirementSpecTextBlock',
45   sepa_export                 => 'SL::Presenter::SepaExport',
46   shop_order                  => 'SL::Presenter::ShopOrder',
47   text                        => 'SL::Presenter::Text',
48   tag                         => 'SL::Presenter::Tag',
49   bank_account                => 'SL::Presenter::BankAccount',
50   M                           => 'SL::Presenter::MaterialComponents',
51 );
52
53 sub wrap {
54   bless [ $_[0] ], 'SL::Presenter::ALL::Wrapper';
55 }
56
57 package SL::Presenter::ALL::Wrapper;
58
59 sub AUTOLOAD {
60   our $AUTOLOAD;
61
62   my ($self, @args) = @_;
63
64   my $method = $AUTOLOAD;
65   $method    =~ s/.*:://;
66
67   return if $method eq 'DESTROY';
68
69   splice @args, -1, 1, %{ $args[-1] } if @args && (ref($args[-1]) eq 'HASH');
70
71   if (my $sub = $self->[0]->can($method)) {
72     return $sub->(@args);
73   }
74 }
75
76 1;