Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b390c388

Von Sven Schöling vor etwa 13 Jahren hinzugefügt

  • ID b390c3884452b45898a4e8ff4624ac36e20fe943
  • Vorgänger 2d7159c4
  • Nachfolger f850e766

rc.pl: reconciliation in template ausgelagert

Unterschiede anzeigen:

bin/mozilla/rc.pl
42 42
# end of main
43 43

  
44 44
sub reconciliation {
45
  $main::lxdebug->enter_sub();
46

  
47
  my $form     = $main::form;
48
  my %myconfig = %main::myconfig;
49
  my $locale   = $main::locale;
50

  
51
  $main::auth->assert('cash');
52

  
53
  RC->paymentaccounts(\%myconfig, \%$form);
54

  
55
  my $selection = "";
56
  map { $selection .= "<option>$_->{accno}--$_->{description}\n" }
57
    @{ $form->{PR} };
58

  
59
  $form->{title} = $locale->text('Reconciliation');
60
  $form->{javascript} .= qq|<script type="text/javascript" src="js/common.js"></script>|;
61
  $form->{"jsscript"} = 1;
62
  $form->header;
63
  my $onload = qq|focus()|;
64
  $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
65

  
66
  print qq|
67
<body onLoad="$onload">
68

  
69
<form method=post action=$form->{script}>
70

  
71
<table width=100%>
72
  <tr>
73
    <th class=listtop>$form->{title}</th>
74
  </tr>
75
  <tr height="5"></tr>
76
  <tr>
77
    <td>
78
      <table>
79
        <tr>
80
          <th align=right nowrap>| . $locale->text('Account') . qq|</th>
81
          <td colspan=3><select name=accno>$selection</select>
82
          </td>
83
        </tr>
84
        <tr>
85
          <th align=right>| . $locale->text('From') . qq|</th>
86
          <td><input name=fromdate id=fromdate size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
87
         <input type="button" name="fromdate" id="trigger_fromdate" value="?"></td>
88
          <th align=right>| . $locale->text('Until') . qq|</th>
89
          <td><input name=todate id=todate size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
90
         <input type="button" name="todate" id="trigger_todate" value="?"></td>
91
        </tr>
92
      </table>
93
    </td>
94
  </tr>
95
  <tr>
96
    <td><hr size=3 noshade></td>
97
  </tr>
98
</table>
99

  
100
| . $form->write_trigger(\%myconfig, 2,
101
                         "fromdate", "BL", "trigger_fromdate",
102
                         "todate", "BL", "trigger_todate") . qq|
103

  
104
<br>
105
<input type=hidden name=nextsub value=get_payments>
45
  $::lxdebug->enter_sub;
46
  $::auth->assert('cash');
106 47

  
107
<input type=submit class=submit name=action value="|
108
    . $locale->text('Continue') . qq|">
48
  RC->paymentaccounts(\%::myconfig, $::form);
109 49

  
110
</form>
50
  $::form->header;
51
  print $::form->parse_html_template('rc/step1', {
52
    selection_sub => sub { ("$_[0]{accno}--$_[0]{description}")x2 },
53
  });
111 54

  
112
</body>
113
</html>
114
|;
115

  
116
  $main::lxdebug->leave_sub();
55
  $::lxdebug->leave_sub;
117 56
}
118 57

  
119 58
sub continue { call_sub($main::form->{"nextsub"}); }
templates/webpages/rc/step1.html
1
[%- USE T8 %]
2
[%- USE HTML %]
3
[%- USE L %]
4
[%- USE LxERP %]
5
<body onLoad="[% onload %]">
6

  
7
<h1>[% 'Reconciliation' | $T8 %]</h1>
8

  
9
<form method=post action="[% script %]">
10

  
11
<table>
12
  <tr>
13
    <th align=right nowrap>[% 'Account' | $T8 %]</th>
14
    <td colspan=3>[% L.select_tag('accno', L.options_for_select(PR, value_title_sub=\selection_sub)) %]</td>
15
  </tr>
16
  <tr>
17
    <th align=right>[% 'From' | $T8 %]</th>
18
    <td>[% L.date_tag('fromdate') %]</td>
19
    <th align=right>[% 'Until' | $T8 %]</th>
20
    <td>[% L.date_tag('todate') %]</td>
21
  </tr>
22
</table>
23

  
24
<hr size=3 noshade>
25
<br>
26

  
27
[% L.hidden_tag('nextsub', 'get_payments') %]
28
[% L.submit_tag('action', LxERP.t8('Continue')) %]
29

  
30
</form>
31

  
32
</body>
33
</html>

Auch abrufbar als: Unified diff