Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 14686a93

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

  • ID 14686a9317b8a7d18f1624c8c0cfa45e07293789
  • Vorgänger 9fbf7096
  • Nachfolger 0516b4cd

acctranscorrections strict

Unterschiede anzeigen:

bin/mozilla/acctranscorrections.pl
6 6

  
7 7
require "bin/mozilla/common.pl";
8 8

  
9
use strict;
10

  
9 11
sub analyze_filter {
10
  $lxdebug->enter_sub();
12
  $main::lxdebug->enter_sub();
13

  
14
  my $form     = $main::form;
15
  my $locale   = $main::locale;
11 16

  
12 17
  $form->{jsscript} = 1;
13 18
  $form->{title}    = $locale->text('General ledger corrections');
14 19
  $form->header();
15 20
  print $form->parse_html_template('acctranscorrections/analyze_filter');
16 21

  
17
  $lxdebug->leave_sub();
22
  $main::lxdebug->leave_sub();
18 23
}
19 24

  
20 25
sub analyze {
21
  $lxdebug->enter_sub();
26
  $main::lxdebug->enter_sub();
27

  
28
  my $form     = $main::form;
29
  my $locale   = $main::locale;
22 30

  
23 31
  $form->{title} = $locale->text('General ledger corrections');
24 32

  
......
36 44
  if (!scalar @problems) {
37 45
    $form->show_generic_information($locale->text('No problems were recognized.'));
38 46

  
39
    $lxdebug->leave_sub();
47
    $main::lxdebug->leave_sub();
40 48
    return;
41 49
  }
42 50

  
......
46 54
                                     'callback' => $callback,
47 55
                                   });
48 56

  
49
  $lxdebug->leave_sub();
57
  $main::lxdebug->leave_sub();
50 58
}
51 59

  
52 60
sub assistant {
53
  $lxdebug->enter_sub();
61
  $main::lxdebug->enter_sub();
62

  
63
  my $form     = $main::form;
64
  my $locale   = $main::locale;
54 65

  
55 66
  $form->{title} = $locale->text('Assistant for general ledger corrections');
56 67

  
......
68 79
    $form->show_generic_information($locale->text('The assistant could not find anything wrong with #1. Maybe the problem has been solved in the meantime.',
69 80
                                                  "$module $form->{trans_reference}"));
70 81

  
71
    $lxdebug->leave_sub();
82
    $main::lxdebug->leave_sub();
72 83
    return;
73 84
  }
74 85

  
......
83 94
    $form->show_generic_error($locale->text('Unknown problem type.'));
84 95
  }
85 96

  
86
  $lxdebug->leave_sub();
97
  $main::lxdebug->leave_sub();
87 98
}
88 99

  
89 100
sub assistant_for_ap_ar_wrong_taxkeys {
90
  $lxdebug->enter_sub();
101
  $main::lxdebug->enter_sub();
102

  
103
  my $form     = $main::form;
104
  my $locale   = $main::locale;
91 105

  
92 106
  $form->{title} = $locale->text('Assistant for general ledger corrections');
93 107

  
94 108
  $form->header();
95 109
  print $form->parse_html_template('acctranscorrections/assistant_for_ap_ar_wrong_taxkeys');
96 110

  
97
  $lxdebug->leave_sub();
111
  $main::lxdebug->leave_sub();
98 112
}
99 113

  
100 114
sub fix_ap_ar_wrong_taxkeys {
101
  $lxdebug->enter_sub();
115
  $main::lxdebug->enter_sub();
116

  
117
  my $form     = $main::form;
118
  my $locale   = $main::locale;
102 119

  
103 120
  my $analyzer = AccTransCorrections->new();
104 121
  $analyzer->fix_ap_ar_wrong_taxkeys();
......
107 124
  $form->header();
108 125
  print $form->parse_html_template('acctranscorrections/fix_ap_ar_wrong_taxkeys');
109 126

  
110
  $lxdebug->leave_sub();
127
  $main::lxdebug->leave_sub();
111 128
}
112 129

  
113 130
sub assistant_for_invoice_inventory_with_taxkeys {
114
  $lxdebug->enter_sub();
131
  $main::lxdebug->enter_sub();
132

  
133
  my $form     = $main::form;
134
  my $locale   = $main::locale;
115 135

  
116 136
  $form->{title} = $locale->text('Assistant for general ledger corrections');
117 137

  
118 138
  $form->header();
119 139
  print $form->parse_html_template('acctranscorrections/assistant_for_invoice_inventory_with_taxkeys');
120 140

  
121
  $lxdebug->leave_sub();
141
  $main::lxdebug->leave_sub();
122 142
}
123 143

  
124 144
sub fix_invoice_inventory_with_taxkeys {
125
  $lxdebug->enter_sub();
145
  $main::lxdebug->enter_sub();
146

  
147
  my $form     = $main::form;
148
  my $locale   = $main::locale;
126 149

  
127 150
  my $analyzer  = AccTransCorrections->new();
128 151
  $analyzer->fix_invoice_inventory_with_taxkeys();
......
131 154
  $form->header();
132 155
  print $form->parse_html_template('acctranscorrections/fix_invoice_inventory_with_taxkeys');
133 156

  
134
  $lxdebug->leave_sub();
157
  $main::lxdebug->leave_sub();
135 158
}
136 159

  
137 160
sub assistant_for_wrong_taxes {
138
  $lxdebug->enter_sub();
161
  $main::lxdebug->enter_sub();
162

  
163
  my $form     = $main::form;
164
  my $locale   = $main::locale;
139 165

  
140 166
  my $problem = shift;
141 167

  
......
144 170
  $form->header();
145 171
  print $form->parse_html_template('acctranscorrections/assistant_for_wrong_taxes', { 'problem' => $problem, });
146 172

  
147
  $lxdebug->leave_sub();
173
  $main::lxdebug->leave_sub();
148 174
}
149 175

  
150 176
sub assistant_for_wrong_taxkeys {
151
  $lxdebug->enter_sub();
177
  $main::lxdebug->enter_sub();
178

  
179
  my $form     = $main::form;
180
  my $locale   = $main::locale;
152 181

  
153 182
  my $problem = shift;
154 183

  
......
157 186
  $form->header();
158 187
  print $form->parse_html_template('acctranscorrections/assistant_for_wrong_taxkeys', { 'problem' => $problem, });
159 188

  
160
  $lxdebug->leave_sub();
189
  $main::lxdebug->leave_sub();
161 190
}
162 191

  
163 192
sub fix_wrong_taxkeys {
164
  $lxdebug->enter_sub();
193
  $main::lxdebug->enter_sub();
194

  
195
  my $form     = $main::form;
196
  my $locale   = $main::locale;
165 197

  
166 198
  my $fixes = ref $form->{fixes} eq 'ARRAY' ? $form->{fixes} : [];
167 199

  
......
172 204
  $form->header();
173 205
  print $form->parse_html_template('acctranscorrections/fix_wrong_taxkeys');
174 206

  
175
  $lxdebug->leave_sub();
207
  $main::lxdebug->leave_sub();
176 208
}
177 209

  
178 210
sub delete_transaction {
179
  $lxdebug->enter_sub();
211
  $main::lxdebug->enter_sub();
212

  
213
  my $form     = $main::form;
214
  my $locale   = $main::locale;
180 215

  
181 216
  $form->{title} = $locale->text('Delete transaction');
182 217
  $form->header();
......
190 225
    print $form->parse_html_template('acctranscorrections/delete_transaction');
191 226
  }
192 227

  
193
  $lxdebug->leave_sub();
228
  $main::lxdebug->leave_sub();
194 229
}
195 230

  
196 231
sub redirect {
197
  $lxdebug->enter_sub();
232
  $main::lxdebug->enter_sub();
233

  
234
  my $form     = $main::form;
198 235

  
199 236
  $form->redirect('Missing callbcak');
200 237

  
201
  $lxdebug->leave_sub();
238
  $main::lxdebug->leave_sub();
202 239
}
203 240

  
204 241
sub dispatcher {
242
  my $form     = $main::form;
243
  my $locale   = $main::locale;
244

  
205 245
  foreach my $action (qw(fix_wrong_taxkeys delete_transaction)) {
206 246
    if ($form->{"action_${action}"}) {
207 247
      call_sub($action);

Auch abrufbar als: Unified diff