Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision fd6900cc

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID fd6900cca59ac4a35d5fa4c20db91165f9310ea3
  • Vorgänger 770515d9
  • Nachfolger 564d8509

Große Teile des Mahncodes neu geschrieben bzw. umgeschrieben. Mehrere Fehler behoben:
1. Rechnungen, die bereits gemahnt wurden, wurden zu früh erneut zur Mahnung angeboten, weil der Mahnzeitraum auf das ursprüngliche Fälligkeitsdatum der Rechnung bezogen wurde und nicht auf das Fälligkeitsdatum der vorhergehenden Mahnstufe.
2. Wurden gleichzeitig Mahnungen für mehrere Mahnstufen generiert, so wurden die falschen Vorlagen benutzt.
3. Die kummulierten Mahnkosten und die Zinsen wurden in der Liste der neu zu erstellenden Mahnungen falsch angezeigt.
Weiterhin wurde die Dokumentation für die Vorlagenvariablen um eine Sektion über Mahnungen erweitert.

Unterschiede anzeigen:

SL/DN.pm
56 56

  
57 57
  foreach my $ref (@{ $form->{DUNNING} }) {
58 58
    $ref->{fee} = $form->format_amount($myconfig, $ref->{fee}, 2);
59
    $ref->{interest} = $form->format_amount($myconfig, ($ref->{interest} * 100));
59
    $ref->{interest_rate} = $form->format_amount($myconfig, ($ref->{interest_rate} * 100));
60 60
  }
61 61

  
62 62
  $dbh->disconnect();
......
76 76

  
77 77
  for my $i (1 .. $form->{rowcount}) {
78 78
    $form->{"fee_$i"} = $form->parse_amount($myconfig, $form->{"fee_$i"}) * 1;
79
    $form->{"interest_$i"} = $form->parse_amount($myconfig, $form->{"interest_$i"}) / 100;
79
    $form->{"interest_rate_$i"} = $form->parse_amount($myconfig, $form->{"interest_rate_$i"}) / 100;
80 80

  
81 81
    if (($form->{"dunning_level_$i"} ne "") &&
82 82
        ($form->{"dunning_description_$i"} ne "")) {
83 83
      @values = (conv_i($form->{"dunning_level_$i"}), $form->{"dunning_description_$i"},
84 84
                 $form->{"email_subject_$i"}, $form->{"email_body_$i"},
85
                 $form->{"template_$i"}, $form->{"fee_$i"}, $form->{"interest_$i"},
85
                 $form->{"template_$i"}, $form->{"fee_$i"}, $form->{"interest_rate_$i"},
86 86
                 $form->{"active_$i"} ? 't' : 'f', $form->{"auto_$i"} ? 't' : 'f', $form->{"email_$i"} ? 't' : 'f',
87 87
                 $form->{"email_attachment_$i"} ? 't' : 'f', conv_i($form->{"payment_terms_$i"}), conv_i($form->{"terms_$i"}));
88 88
      if ($form->{"id_$i"}) {
......
90 90
          qq|UPDATE dunning_config SET
91 91
               dunning_level = ?, dunning_description = ?,
92 92
               email_subject = ?, email_body = ?,
93
               template = ?, fee = ?, interest = ?,
93
               template = ?, fee = ?, interest_rate = ?,
94 94
               active = ?, auto = ?, email = ?,
95 95
               email_attachment = ?, payment_terms = ?, terms = ?
96 96
             WHERE id = ?|;
......
99 99
        $query =
100 100
          qq|INSERT INTO dunning_config
101 101
               (dunning_level, dunning_description, email_subject, email_body,
102
                template, fee, interest, active, auto, email,
102
                template, fee, interest_rate, active, auto, email,
103 103
                email_attachment, payment_terms, terms)
104 104
             VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|;
105 105
      }
......
129 129

  
130 130
  my ($dunning_id) = selectrow_query($form, $dbh, qq|SELECT nextval('id')|);
131 131

  
132
  my $q_update_ar = qq|UPDATE ar SET dunning_config_id = ? WHERE id = ?|;
133
  my $h_update_ar = prepare_query($form, $dbh, $q_update_ar);
134

  
135
  my $q_insert_dunning =
136
    qq|INSERT INTO dunning (dunning_id, dunning_config_id, dunning_level,
137
                            trans_id, fee, interest, transdate, duedate)
138
       VALUES (?, ?,
139
               (SELECT dunning_level FROM dunning_config WHERE id = ?),
140
               ?,
141
               (SELECT SUM(fee)
142
                FROM dunning_config
143
                WHERE dunning_level <= (SELECT dunning_level FROM dunning_config WHERE id = ?)),
144
               (SELECT (amount - paid) * (current_date - transdate) FROM ar WHERE id = ?)
145
                 * (SELECT interest_rate FROM dunning_config WHERE id = ?)
146
                 / 360,
147
               current_date,
148
               current_date + (SELECT payment_terms FROM dunning_config WHERE id = ?))|;
149
  my $h_insert_dunning = prepare_query($form, $dbh, $q_insert_dunning);
150

  
151
  my @invoice_ids;
152
  my ($next_dunning_config_id, $customer_id);
153
  my $send_email = 0;
154

  
132 155
  foreach my $row (@{ $rows }) {
156
    push @invoice_ids, $row->{invoice_id};
157
    $next_dunning_config_id = $row->{next_dunning_config_id};
158
    $customer_id            = $row->{customer_id};
159

  
160
    @values = ($row->{next_dunning_config_id}, $row->{invoice_id});
161
    do_statement($form, $h_update_ar, $q_update_ar, @values);
162

  
163
    $send_email |= $row->{email};
133 164

  
134
    $form->{"interest_$row"} = $form->parse_amount($myconfig,$form->{"interest_$row"});
135
    $form->{"fee_$row"} = $form->parse_amount($myconfig,$form->{"fee_$row"});
136
    $form->{send_email} = $form->{"email_$row"};
137

  
138
    $query = qq|UPDATE ar SET dunning_config_id = ? WHERE id = ?|;
139
    @values = ($form->{"next_dunning_config_id_$row"},
140
               $form->{"inv_id_$row"});
141
    do_query($form, $dbh, $query, @values);
142

  
143
    $query =
144
      qq|INSERT INTO dunning (dunning_id, dunning_config_id, dunning_level,
145
                              trans_id, fee, interest, transdate, duedate)
146
         VALUES (?, ?, (SELECT dunning_level FROM dunning_config WHERE id = ?),
147
                 ?, ?, ?, current_date, ?)|;
148
    @values = ($dunning_id,
149
               conv_i($form->{"next_dunning_config_id_$row"}),
150
               conv_i($form->{"next_dunning_config_id_$row"}),
151
               conv_i($form->{"inv_id_$row"}), $form->{"fee_$row"},
152
               $form->{"interest_$row"},
153
               conv_date($form->{"next_duedate_$row"}));
154
    do_query($form, $dbh, $query, @values);
165
    my $next_config_id = conv_i($row->{next_dunning_config_id});
166
    my $invoice_id     = conv_i($row->{invoice_id});
167

  
168
    @values = ($dunning_id,     $next_config_id, $next_config_id,
169
               $invoice_id,     $next_config_id, $invoice_id,
170
               $next_config_id, $next_config_id);
171
    do_statement($form, $h_insert_dunning, $q_insert_dunning, @values);
155 172
  }
156 173

  
174
  $h_update_ar->finish();
175
  $h_insert_dunning->finish();
176

  
157 177
  my $query =
158
    qq|SELECT invnumber, ordnumber, customer_id, amount, netamount,
159
         ar.transdate, ar.duedate, paid, amount - paid AS open_amount,
160
         template AS formname, email_subject, email_body, email_attachment,
161
         da.fee, da.interest, da.transdate AS dunning_date,
162
         da.duedate AS dunning_duedate,
163
         c.name, c.street, c.zipcode, c.city, c.country, c.department_1, c.department_2
178
    qq|SELECT
179
         ar.invnumber, ar.ordnumber, ar.amount, ar.netamount,
180
         ar.transdate, ar.duedate, ar.paid, ar.amount - ar.paid AS open_amount,
181
         da.fee, da.interest, da.transdate AS dunning_date, da.duedate AS dunning_duedate
164 182
       FROM ar
165
       LEFT JOIN dunning_config ON (dunning_config.id = ar.dunning_config_id)
166
       LEFT JOIN dunning da ON (ar.id = da.trans_id AND dunning_config.dunning_level = da.dunning_level)
167
       LEFT JOIN customer c ON (ar.customer_id = c.id)
183
       LEFT JOIN dunning_config cfg ON (cfg.id = ar.dunning_config_id)
184
       LEFT JOIN dunning da ON (ar.id = da.trans_id AND cfg.dunning_level = da.dunning_level)
168 185
       WHERE ar.id IN (|
169
       . join(", ", map("?", @{ $form->{"inv_ids"} })) . qq|)|;
186
       . join(", ", map { "?" } @invoice_ids) . qq|)|;
170 187

  
171
  my $sth = prepare_execute_query($form, $dbh, $query, @{ $form->{"inv_ids"} });
188
  my $sth = prepare_execute_query($form, $dbh, $query, @invoice_ids);
172 189
  my $first = 1;
173 190
  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
174 191
    if ($first) {
175 192
      map({ $form->{"dn_$_"} = []; } keys(%{$ref}));
176 193
      $first = 0;
177 194
    }
195

  
196
    $ref->{interest_rate} = $form->format_amount($myconfig, $ref->{interest_rate} * 100);
178 197
    map { $ref->{$_} = $form->format_amount($myconfig, $ref->{$_}, 2) } qw(amount netamount paid open_amount fee interest);
179
    map { $form->{$_} = $ref->{$_} } keys %$ref;
180
    #print(STDERR Dumper($ref));
181 198
    map { push(@{ $form->{"dn_$_"} }, $ref->{$_})} keys %$ref;
199
    map { $form->{$_} = $ref->{$_} } keys %{ $ref };
182 200
  }
183 201
  $sth->finish;
184 202

  
185
  IS->customer_details($myconfig,$form);
186
  #print(STDERR Dumper($form->{dn_invnumber}));
187
  $form->{templates} = "$myconfig->{templates}";
188

  
189

  
203
  $query =
204
    qq|SELECT id AS customer_id, name, street, zipcode, city, country, department_1, department_2, email
205
       FROM customer
206
       WHERE id = ?|;
207
  $ref = selectfirst_hashref_query($form, $dbh, $query, $customer_id);
208
  map { $form->{$_} = $ref->{$_} } keys %{ $ref };
190 209

  
191
  $form->{language} = $form->get_template_language(\%myconfig);
210
  $query =
211
    qq|SELECT
212
         cfg.interest_rate, cfg.template AS formname,
213
         cfg.email_subject, cfg.email_body, cfg.email_attachment,
214
         (SELECT fee
215
          FROM dunning
216
          WHERE dunning_id = ?
217
          LIMIT 1)
218
         AS fee,
219
         (SELECT SUM(interest)
220
          FROM dunning
221
          WHERE dunning_id = ?)
222
         AS total_interest,
223
         (SELECT SUM(amount) - SUM(paid)
224
          FROM ar
225
          WHERE id IN (| . join(", ", map { "?" } @invoice_ids) . qq|))
226
         AS total_open_amount
227
       FROM dunning_config cfg
228
       WHERE id = ?|;
229
  $ref = selectfirst_hashref_query($form, $dbh, $query, $dunning_id, $dunning_id, @invoice_ids, $next_dunning_config_id);
230
  map { $form->{$_} = $ref->{$_} } keys %{ $ref };
231

  
232
  $form->{interest_rate}     = $form->format_amount($myconfig, $ref->{interest_rate} * 100);
233
  $form->{fee}               = $form->format_amount($myconfig, $ref->{fee}, 2);
234
  $form->{total_interest}    = $form->format_amount($myconfig, $form->round_amount($ref->{total_interest}, 2), 2);
235
  $form->{total_open_amount} = $form->format_amount($myconfig, $form->round_amount($ref->{total_open_amount}, 2), 2);
236
  $form->{total_amount}      = $form->format_amount($myconfig, $form->round_amount($ref->{fee} + $ref->{total_interest} + $ref->{total_open_amount}, 2), 2);
237

  
238
  $form->{templates}    = "$myconfig->{templates}";
239
  $form->{language}     = $form->get_template_language(\%myconfig);
192 240
  $form->{printer_code} = $form->get_printer_code(\%myconfig);
193 241

  
194 242
  if ($form->{language} ne "") {
......
215 263
    $form->{"IN"} =~ s/html$/odt/;
216 264
  }
217 265

  
218
  if ($form->{"send_email"} && ($form->{email} ne "")) {
266
  if ($send_email && ($form->{email} ne "")) {
219 267
    $form->{media} = 'email';
220 268
  }
221 269

  
......
259 307
  # connect to database
260 308
  my $dbh = $form->dbconnect($myconfig);
261 309

  
262
  my $where =
263
    qq| WHERE (a.paid < a.amount)
264
          AND (a.duedate < current_date)
265
          AND (dnn.id =
266
            (SELECT id FROM dunning_config
267
             WHERE dunning_level >
268
               (SELECT
269
                  CASE
270
                    WHEN a.dunning_config_id IS NULL
271
                    THEN 0
272
                    ELSE (SELECT dunning_level
273
                          FROM dunning_config
274
                          WHERE id = a.dunning_config_id
275
                          ORDER BY dunning_level
276
                          LIMIT 1)
277
                  END
278
                FROM dunning_config LIMIT 1)
279
             LIMIT 1)) |;
310
  my $where;
280 311
  my @values;
281 312

  
282 313
  $form->{customer_id} = $1 if ($form->{customer} =~ /--(\d+)$/);
......
312 343
    push(@values, $form->{minamount});
313 344
  }
314 345

  
315
  $paymentdate = $form->{paymentuntil} ? $dbh->quote($form->{paymentuntil}) :
316
    "current_date";
317

  
318 346
  $query =
319
    qq|SELECT a.id, a.ordnumber, a.transdate, a.invnumber, a.amount,
347
    qq|SELECT
348
         a.id, a.ordnumber, a.transdate, a.invnumber, a.amount,
320 349
         ct.name AS customername, a.customer_id, a.duedate,
321
         da.fee AS old_fee, dnn.active, dnn.email, dnn.fee + da.fee AS fee,
322
         dn.dunning_description, da.transdate AS dunning_date, da.duedate AS dunning_duedate,
323
         a.duedate + dnn.terms - current_date AS nextlevel,
324
         $paymentdate - a.duedate AS pastdue, dn.dunning_level,
325
         current_date + dnn.payment_terms AS next_duedate,
326
         dnn.dunning_description AS next_dunning_description, dnn.id AS next_dunning_config_id,
327
         dnn.interest AS interest_rate, dnn.terms
328
       FROM dunning_config dnn, ar a
329
       JOIN customer ct ON (a.customer_id = ct.id)
330
       LEFT JOIN dunning_config dn ON (dn.id = a.dunning_config_id)
331
       LEFT JOIN dunning da ON ((da.trans_id = a.id) AND (dn.dunning_level = da.dunning_level))
350

  
351
         cfg.dunning_description, cfg.dunning_level,
352

  
353
         d.transdate AS dunning_date, d.duedate AS dunning_duedate,
354
         d.fee, d.interest,
355

  
356
         a.duedate + cfg.terms - current_date AS nextlevel,
357
         current_date - COALESCE(d.duedate, a.duedate) AS pastdue,
358
         current_date + cfg.payment_terms AS next_duedate,
359

  
360
         nextcfg.dunning_description AS next_dunning_description,
361
         nextcfg.id AS next_dunning_config_id,
362
         nextcfg.terms, nextcfg.active, nextcfg.email
363

  
364
       FROM ar a
365

  
366
       LEFT JOIN customer ct ON (a.customer_id = ct.id)
367
       LEFT JOIN dunning_config cfg ON (a.dunning_config_id = cfg.id)
368
       LEFT JOIN dunning_config nextcfg ON
369
         (nextcfg.id =
370
           (SELECT id
371
            FROM dunning_config
372
            WHERE dunning_level >
373
              COALESCE((SELECT dunning_level
374
                        FROM dunning_config
375
                        WHERE id = a.dunning_config_id
376
                        ORDER BY dunning_level DESC
377
                        LIMIT 1),
378
                       0)
379
            LIMIT 1))
380
       LEFT JOIN dunning d ON ((d.trans_id = a.id) AND (cfg.dunning_level = d.dunning_level))
381

  
382
       WHERE (a.paid < a.amount)
383
         AND (a.duedate < current_date)
384

  
332 385
       $where
333
       ORDER BY a.id, transdate, duedate, name|;
334 386

  
387
       ORDER BY a.id, transdate, duedate, name|;
335 388
  my $sth = prepare_execute_query($form, $dbh, $query, @values);
336 389

  
337 390
  $form->{DUNNINGS} = [];
338 391

  
339 392
  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
340
    $ref->{interest} = ($ref->{amount} * $ref->{pastdue} * $ref->{interest_rate}) / 360;
393
    next if !$ref->{terms} || ($ref->{pastdue} < $ref->{terms});
394

  
341 395
    $ref->{interest} = $form->round_amount($ref->{interest}, 2);
342
    map({ $ref->{$_} = $form->format_amount($myconfig, $ref->{$_}, 2)} qw(amount fee interest));
343
    if ($ref->{pastdue} >= $ref->{terms}) {
344
      push(@{ $form->{DUNNINGS} }, $ref);
345
    }
396
    push(@{ $form->{DUNNINGS} }, $ref);
346 397
  }
347 398

  
348 399
  $sth->finish;
......
555 606
sub print_dunning {
556 607
  $main::lxdebug->enter_sub();
557 608

  
558
  my ($self, $myconfig, $form, $dunning_id, $userspath,$spool, $sendmail) = @_;
609
  my ($self, $myconfig, $form, $dunning_id, $userspath, $spool, $sendmail) = @_;
559 610
  # connect to database
560 611
  my $dbh = $form->dbconnect_noauto($myconfig);
561 612

  
......
582 633
  }
583 634
  $sth->finish;
584 635

  
585
  IS->customer_details($myconfig,$form);
636
  $query =
637
    qq|SELECT id AS customer_id, name, street, zipcode, city, country, department_1, department_2, email
638
       FROM customer
639
       WHERE id =
640
         (SELECT customer_id
641
          FROM dunning d
642
          LEFT JOIN ar ON (d.trans_id = ar.id)
643
          WHERE d.id = ?)|;
644
  $ref = selectfirst_hashref_query($form, $dbh, $query, $dunning_id);
645
  map { $form->{$_} = $ref->{$_} } keys %{ $ref };
646

  
647
  $query =
648
    qq|SELECT
649
         cfg.interest_rate, cfg.template AS formname,
650
         cfg.email_subject, cfg.email_body, cfg.email_attachment,
651
         d.fee, d.dunning_date,
652
         (SELECT SUM(interest)
653
          FROM dunning
654
          WHERE dunning_id = ?)
655
         AS total_interest,
656
         (SELECT SUM(amount) - SUM(paid)
657
          FROM ar
658
          WHERE id IN
659
            (SELECT trans_id
660
             FROM dunning
661
             WHERE dunning_id = ?))
662
         AS total_open_amount
663
       FROM dunning d
664
       LEFT JOIN dunning_config cfg ON (d.dunning_config_id = cfg.id)
665
       WHERE d.dunning_id = ?
666
       LIMIT 1|;
667
  $ref = selectfirst_hashref_query($form, $dbh, $query, $dunning_id, $dunning_id, $dunning_id);
668
  map { $form->{$_} = $ref->{$_} } keys %{ $ref };
669

  
670
  $form->{interest_rate}     = $form->format_amount($myconfig, $ref->{interest_rate} * 100);
671
  $form->{fee}               = $form->format_amount($myconfig, $ref->{fee}, 2);
672
  $form->{total_interest}    = $form->format_amount($myconfig, $form->round_amount($ref->{total_interest}, 2), 2);
673
  $form->{total_open_amount} = $form->format_amount($myconfig, $form->round_amount($ref->{total_open_amount}, 2), 2);
674
  $form->{total_amount}      = $form->format_amount($myconfig, $form->round_amount($ref->{fee} + $ref->{total_interest} + $ref->{total_open_amount}, 2), 2);
675

  
676

  
586 677
  $form->{templates} = "$myconfig->{templates}";
587 678

  
588 679
  $form->{language} = $form->get_template_language(\%myconfig);
bin/mozilla/dn.pl
54 54
    "$form->{script}?action=edit_config&login=$form->{login}&password=$form->{password}"
55 55
    unless $form->{callback};
56 56

  
57
  @column_index = qw(dunning_level dunning_description active auto email payment_terms terms fee interest template);
57
  @column_index = qw(dunning_level dunning_description active auto email payment_terms terms fee interest_rate template);
58 58

  
59 59
  $column_header{dunning_level} =
60 60
      qq|<th class=listheading>|
......
88 88
      qq|<th class=listheading>|
89 89
    . $locale->text('Fee')
90 90
    . qq|</th>|;
91
  $column_header{interest} =
91
  $column_header{interest_rate} =
92 92
      qq|<th class=listheading>|
93 93
    . $locale->text('Interest Rate')
94 94
    . qq|</th>|;
......
141 141
    $column_data{payment_terms}           = qq|<td><input name=payment_terms_$i size=3 value="$ref->{payment_terms}"></td>|;
142 142
    $column_data{terms}           = qq|<td><input name=terms_$i size=3 value="$ref->{terms}"></td>|;
143 143
    $column_data{fee}           = qq|<td><input name=fee_$i size=5 value="$ref->{fee}"></td>|;
144
    $column_data{interest}           = qq|<td><input name=interest_$i size=4 value="$ref->{interest}">%</td>|;
144
    $column_data{interest_rate}           = qq|<td><input name=interest_rate_$i size=4 value="$ref->{interest}">%</td>|;
145 145
    $column_data{template}           = qq|<td><input name=template_$i value="$ref->{template}"></td>|;
146 146

  
147 147

  
......
174 174
  $column_data{payment_terms}           = qq|<td><input  size=3 name=payment_terms_$i></td>|;
175 175
  $column_data{terms}           = qq|<td><input  size=3 name=terms_$i></td>|;
176 176
  $column_data{fee}           = qq|<td><input  size=5 name=fee_$i></td>|;
177
  $column_data{interest}           = qq|<td><input  size=4 name=interest_$i>%</td>|;
177
  $column_data{interest_rate}           = qq|<td><input  size=4 name=interest_rate_$i>%</td>|;
178 178
  $column_data{template}           = qq|<td><input name=template_$i></td>|;
179 179

  
180 180

  
......
260 260
    <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
261 261
    </tr>
262 262
    | if $form->{selectdepartment};
263
  $form->{title}   = $locale->text('Start Dunning Process');
264
  $form->{nextsub} = "show_invoices";
265

  
266
  # use JavaScript Calendar or not
267
  $form->{jsscript} = $jscalendar;
268
  $jsscript = "";
269
  if ($form->{jsscript}) {
270

  
271
    # with JavaScript Calendar
272
    $button1 = qq|
273
      <td><input name=paymentuntil id=paymentuntil size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
274
      <input type=button name=paymentuntil id="trigger1" value=|
275
      . $locale->text('button') . qq|></td>
276
      |;
277 263

  
278
    #write Trigger
279
    $jsscript =
280
      Form->write_trigger(\%myconfig, "1", "paymentuntil", "BR", "trigger1");
281
  } else {
264
  $form->{title}       = $locale->text('Start Dunning Process');
265
  $form->{nextsub}     = "show_invoices";
282 266

  
283
    # without JavaScript Calendar
284
    $button1 =
285
      qq|<td><input name=paymentuntil id=paymentuntil size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\"></td>|;
286
  }
287
  $form->{fokus} = "search.customer";
267
  $form->{jsscript}    = 1;
268
  $form->{fokus}       = "search.customer";
288 269
  $form->{javascript} .= qq|<script type="text/javascript" src="js/common.js"></script>|;
289
  $form->header;
270
  $form->header();
271

  
290 272
  $onload = qq|focus()|;
291 273
  $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
292 274
  $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
275

  
293 276
  print qq|
294 277
<body onLoad="$onload">
295 278

  
......
319 302
          <th align=right nowrap>| . $locale->text('Notes') . qq|</th>
320 303
          <td colspan=3><input name=notes size=40></td>
321 304
        </tr>
322
        <tr>
323
          <th align=right nowrap>| . $locale->text('Payment until') . qq|</th>
324
          $button1
325
        </tr>
326 305
      </table>
327 306
    </td>
328 307
  </tr>
......
390 369
    "$form->{script}?action=show_invoices&login=$form->{login}&password=$form->{password}&customer=$form->{customer}&invnumber=$form->{invnumber}&ordnumber=$form->{ordnumber}&paymentuntil=$form->{paymentuntil}&groupinvoices=$form->{groupinvoices}&minamount=$form->{minamount}&dunning_level=$form->{dunning_level}&notes=$form->{notes}"
391 370
    unless $form->{callback};
392 371

  
393
  @column_index = qw(dunning_description active email customername invnumber invdate inv_duedate invamount next_duedate fee interest );
372
  @column_index = qw(dunning_description dunning_description_next active email customername invnumber invdate inv_duedate amount next_duedate fee interest );
394 373

  
395 374
  $column_header{dunning_description} =
396
      qq|<th class=listheading>|
375
      qq|<th class="listheading" colspan="2">|
397 376
    . $locale->text('Current / Next Level')
398 377
    . qq|</th>|;
399 378
  $column_header{active} =
400 379
      qq|<th class=listheading>|
401 380
    . NTI($cgi->checkbox('-name' => 'selectall_active',
402 381
                         '-label' => $locale->text('Active?'),
403
                         '-checked' => 1,
382
                         '-checked' => 0,
404 383
                         '-onclick' => "checkbox_check_all('selectall_active', 'active_', 1, " . scalar(@{ $form->{DUNNINGS} }) . ")"))
405 384
    . qq|</th>|;
406 385
  $column_header{email} =
......
430 409
      qq|<th class=listheading>|
431 410
    . $locale->text('Invdate')
432 411
    . qq|</th>|;
433
  $column_header{invamount} =
412
  $column_header{amount} =
434 413
      qq|<th class=listheading>|
435 414
    . $locale->text('Amount')
436 415
    . qq|</th>|;
......
440 419
    . qq|</th>|;
441 420
  $column_header{interest} =
442 421
      qq|<th class=listheading>|
443
    . $locale->text('Total Interest')
422
    . $locale->text('Interest')
444 423
    . qq|</th>|;
445 424

  
446 425
  $form->header;
......
455 434

  
456 435
<table width=100%>
457 436
  <tr>
458
    <th class=listtop colspan=11>$form->{title}</th>
437
    <th class=listtop colspan=12>$form->{title}</th>
459 438
  </tr>
460 439
  <tr height="5"></tr>
461 440
  <tr>|;
462
  map { print "$column_header{$_}\n" } @column_index;
441
  map { print "$column_header{$_}\n" if $column_header{$_}; } @column_index;
463 442

  
464 443
  print qq|
465 444
        </tr>
......
474 453
        <tr valign=top class=listrow$j>
475 454
|;
476 455

  
477
  $form->{selectdunning} =~ s/ selected//g;
478
  if ($ref->{next_dunning_config_id} ne "") {
479
     $form->{selectdunning} =~ s/value=$ref->{next_dunning_config_id}/value=$ref->{next_dunning_config_id} selected/;
480
  }
481
  
482

  
483
  $dunning = qq|<select name=next_dunning_config_id_$i>$form->{selectdunning}</select>|;
484

  
456
    $form->{selectdunning} =~ s/ selected//g;
457
    if ($ref->{next_dunning_config_id} ne "") {
458
      $form->{selectdunning} =~ s/value=$ref->{next_dunning_config_id}/value=$ref->{next_dunning_config_id} selected/;
459
    }
485 460

  
486
    $column_data{dunning_description}           = qq|<td><input type=hidden name=inv_id_$i size=2 value="$ref->{id}"><input type=hidden name=customer_id_$i size=2 value="$ref->{customer_id}">$ref->{dunning_level}:&nbsp;$dunning</td>|;
461
    $column_data{dunning_description} =
462
      qq|<td>|
463
      . qq|<input type=hidden name=inv_id_$i size=2 value="$ref->{id}">|
464
      . qq|<input type=hidden name=customer_id_$i size=2 value="$ref->{customer_id}">|
465
      . ($ref->{dunning_level} ? $ref->{dunning_level} : "&nbsp;")
466
      . qq|</td>|;
467
    $column_data{dunning_description_next} =
468
      qq|<td>|
469
      . qq|<select name=next_dunning_config_id_$i>$form->{selectdunning}</select>|
470
      . qq|</td>|;
487 471
    my $active = ($ref->{active}) ? "checked" : "";
488 472
    $column_data{active} =
489 473
      qq|<td><input type=checkbox name=active_$i value=1 $active></td>|;
490 474
    my $email = ($ref->{email}) ? "checked" : "";
491
  $column_data{email} =
492
    qq|<td><input type=checkbox name=email_$i value=1 $email></td>|;
493
    $column_data{next_duedate}           = qq|<td><input type=hidden name=next_duedate_$i size=6 value="$ref->{next_duedate}">$ref->{next_duedate}</td>|;
475
    $column_data{email} =
476
      qq|<td><input type=checkbox name=email_$i value=1 $email></td>|;
477
    $column_data{next_duedate}           = qq|<td>$ref->{next_duedate}</td>|;
494 478

  
495 479
    $column_data{inv_duedate}           = qq|<td><input type=hidden name=inv_duedate_$i size=6 value="$ref->{duedate}">$ref->{duedate}</td>|;
496 480
    $column_data{invdate}           = qq|<td><input type=hidden name=invdate_$i size=6 value="$ref->{transdate}">$ref->{transdate}</td>|;
497 481
    $column_data{invnumber}           = qq|<td><input type=hidden name=invnumber_$i size=6 value="$ref->{invnumber}">$ref->{invnumber}</td>|;
498 482
    $column_data{customername}           = qq|<td><input type=hidden name=customername_$i size=6 value="$ref->{customername}">$ref->{customername}</td>|;
499
    $column_data{invamount}           = qq|<td><input type=hidden name=invamount_$i size=6 value="$ref->{amount}">$ref->{amount}</td>|;
500
    $column_data{fee}           = qq|<td><input type=hidden name=fee_$i size=5 value="$ref->{fee}">$ref->{fee}</td>|;
501
    $column_data{interest}           = qq|<td><input type=hidden name=interest_$i size=4 value="$ref->{interest}">$ref->{interest}</td>|;
502

  
503 483

  
484
    map { $column_data{$_} =
485
            qq|<td align="right">|
486
            . H($form->format_amount(\%myconfig, $ref->{$_} * 1, -2))
487
            . qq|</td>|
488
    } qw(amount fee interest);
504 489

  
505 490
    map { print "$column_data{$_}\n" } @column_index;
506 491

  
......
578 563
  my $active=1;
579 564
  my @rows = ();
580 565
  undef($form->{DUNNING_PDFS});
566

  
581 567
  if ($form->{groupinvoices}) {
582
    while ($active) {
583
      $lastcustomer = 0;
584
      $form->{inv_ids} = [];
585
      $active = 0;
586
      @rows = ();
587
      for my $i (1 .. $form->{rowcount}) {
588
        $form->{"active_$i"} *= 1;
589
        $lastcustomer = $form->{"customer_id_$i"} unless ($lastcustomer);
590
        if ($form->{"active_$i"} && ($form->{"customer_id_$i"} == $lastcustomer)) {
591
          push(@{ $form->{inv_ids} }, $form->{"inv_id_$i"});
592
          $form->{"active_$i"} = 0;
593
          $form->{"customer_id_$i"} = 0;
594
          push(@rows, $i);
595
        } elsif ($form->{"active_$i"}) {
596
          $active = 1;
597
        } else {
598
          $form->{"customer_id_$i"} = 0;
599
        }
600
      }
601
      if (scalar(@{ $form->{inv_ids} }) != 0) {
602
        DN->save_dunning(\%myconfig, \%$form, \@rows, $userspath, $spool, $sendmail);
568
    my %dunnings_for;
569

  
570
    for my $i (1 .. $form->{rowcount}) {
571
      next unless ($form->{"active_$i"});
572

  
573
      $dunnings_for{$form->{"customer_id_$i"}} ||= {};
574
      my $dunning_levels = $dunnings_for{$form->{"customer_id_$i"}};
575

  
576
      $dunning_levels->{$form->{"next_dunning_config_id_$i"}} ||= [];
577
      my $level = $dunning_levels->{$form->{"next_dunning_config_id_$i"}};
578

  
579
      push @{ $level }, { "row"                    => $i,
580
                          "invoice_id"             => $form->{"inv_id_$i"},
581
                          "customer_id"            => $form->{"customer_id_$i"},
582
                          "next_dunning_config_id" => $form->{"next_dunning_config_id_$i"},
583
                          "email"                  => $form->{"email_$i"}, };
584
    }
585

  
586
    foreach my $levels (values %dunnings_for) {
587
      foreach my $level (values %{ $levels }) {
588
        next unless scalar @{ $level };
589

  
590
        DN->save_dunning(\%myconfig, \%$form, $level, $userspath, $spool, $sendmail);
603 591
      }
604 592
    }
593

  
605 594
  } else {
606 595
    for my $i (1 .. $form->{rowcount}) {
607
      if ($form->{"active_$i"}) {
608
        @rows = ();
609
        $form->{inv_ids} = [ $form->{"inv_id_$i"} ];
610
        push(@rows, $i);
611
        DN->save_dunning(\%myconfig, \%$form, \@rows, $userspath, $spool, $sendmail);
612
      }
596
      next unless $form->{"active_$i"};
597

  
598
      my $level = [ { "row"                    => $i,
599
                      "invoice_id"             => $form->{"inv_id_$i"},
600
                      "customer_id"            => $form->{"customer_id_$i"},
601
                      "next_dunning_config_id" => $form->{"next_dunning_config_id_$i"},
602
                      "email"                  => $form->{"email_$i"}, } ];
603
      DN->save_dunning(\%myconfig, \%$form, $level, $userspath, $spool, $sendmail);
613 604
    }
614 605
  }
606

  
615 607
  if($form->{DUNNING_PDFS}) {
616 608
    DN->melt_pdfs(\%myconfig, \%$form,$spool);
617 609
  }
610

  
618 611
  # saving the history
619 612
  if(!exists $form->{addition} && $form->{id} ne "") {
620 613
  	$form->{snumbers} = qq|dunning_id_| . $form->{"dunning_id"};
621 614
    $form->{addition} = "DUNNING STARTED";
622 615
  	$form->save_history($form->dbconnect(\%myconfig));
623 616
  }
624
  # /saving the history 
617
  # /saving the history
618

  
625 619
  $form->redirect($locale->text('Dunning Process started for selected invoices!'));
626 620

  
627 621
  $lxdebug->leave_sub();
628 622
}
629
  
623

  
630 624
sub set_email {
631 625
  $lxdebug->enter_sub();
632 626

  
......
878 872
    . qq|</th>|;
879 873
  $column_header{interest} =
880 874
      qq|<th class=listheading>|
881
    . $locale->text('Total Interest')
875
    . $locale->text('Interest')
882 876
    . qq|</th>|;
883 877

  
884 878
  $form->header;
......
931 925

  
932 926
  
933 927

  
934
    foreach (qw(dunning_date dunning_duedate duedate transdate customername
935
                amount fee interest)) {
928
    foreach (qw(dunning_date dunning_duedate duedate transdate customername amount fee interest)) {
936 929
      my $col = $columns{$_} ? $columns{$_} : $_;
937 930
      $column_data{$col} = "<td>" . H($ref->{$_}) . "</td>";
938 931
    }
doc/dokumentenvorlagen-und-variablen.html
81 81
   </ol>
82 82
  </li>
83 83

  
84
  <li><a href="dokumentenvorlagen-und-variablen.html#dunning">
85
    Variablen in Mahnungen</a>
86

  
87
   <ol>
88
    <li><a href="dokumentenvorlagen-und-variablen.html#dunning_allgemein">
89
      Allgemeine Variablen</a></li>
90

  
91
    <li><a href="dokumentenvorlagen-und-variablen.html#dunning_details">
92
      Variablen f&uuml;r jede gemahnte Rechnung</a></li>
93
   </ol>
94
  </li>
95

  
84 96
  <li><a href="dokumentenvorlagen-und-variablen.html#anderevorlagen">
85 97
    Variablen in anderen Vorlagen</a></li>
86 98

  
......
758 770
   zum Inhaltsverzeichnis</a></small><br>
759 771
 <hr>
760 772

  
773
 <h2><a name="dunning">Variablen in Mahnungen</a></h2>
774

  
775
 <h3><a name="dunning_allgemein">Allgemeine Variablen:</a></h3>
776

  
777
 <p>Die Variablen des Verk?ufers stehen wie gewohnt
778
  als <code>employee_...</code> zur Verf?gung. Die Adressdaten des
779
  Kunden stehen als Variablen <code>name</code>, <code>street</code>,
780
  <code>zipcode</code>, <code>city</code>, <code>country</code>,
781
  <code>department_1</code>, <code>department_2</code>, und
782
  <code>email</code> zur Verf?gung.
783
 </p>
784

  
785
 <p>Weitere Variablen beinhalten:</p>
786

  
787
 <p>
788
  <table border="1">
789
   <tr><th>Variablenname</th><th>Bedeutung</th></tr>
790
   <tr>
791
    <td><code>dunning_date</code></td>
792
    <td>Datum der Mahnung</td>
793
   </tr>
794
   <tr>
795
    <td><code>dunning_duedate</code></td>
796
    <td>F&auml;lligkeitsdatum f&uuml;r diese Mahhnung</td>
797
   </tr>
798
   <tr>
799
    <td><code>fee</code></td>
800
    <td>Kummulative Mahngeb?hren</td>
801
   </tr>
802
   <tr>
803
    <td><code>interest_rate</code></td>
804
    <td>Zinssatz per anno in Prozent</td>
805
   </tr>
806
   <tr>
807
    <td><code>total_amount</code></td>
808
    <td>Gesamter noch zu zahlender Betrag als <code>fee</code> + <code>total_interest</code> + <code>total_open_amount</code></td>
809
   </tr>
810
   <tr>
811
    <td><code>total_interest</code></td>
812
    <td>Zinsen per anno &uuml;ber alle Rechnungen</td>
813
   </tr>
814
   <tr>
815
    <td><code>total_open_amount</code></td>
816
    <td>Summe &uuml;ber alle offene Betr&auml;ge der Rechnungen</td>
817
   </tr>
818
  </table>
819
 </p>
820

  
821
 <h3><a name="dunning_details">
822
   Variablen f&uuml;r jede gemahnte Rechnung:</a></h3>
823

  
824
 <p>
825
  <table border="1">
826
   <tr><th>Variablenname</th><th>Bedeutung</th></tr>
827
   <tr>
828
    <td><code>dn_amount</code></td>
829
    <td>Rechnungssumme (brutto)</td>
830
   </tr>
831
   <tr>
832
    <td><code>dn_duedate</code></td>
833
    <td>Originales F&auml;lligkeitsdatum der Rechnung</td>
834
   </tr>
835
   <tr>
836
    <td><code>dn_dunning_date</code></td>
837
    <td>Datum der Mahnung</td>
838
   </tr>
839
   <tr>
840
    <td><code>dn_dunning_duedate</code></td>
841
    <td>F&auml;lligkeitsdatum der Mahnung</td>
842
   </tr>
843
   <tr>
844
    <td><code>dn_fee</code></td>
845
    <td>Kummulative Mahngeb&uuml;hr (ist die gleiche wie f&uuml;r die ganze Mahnung, da die Geb&uuml;hr nur einmal pro Mahnung erhoben wird)</td>
846
   </tr>
847
   <tr>
848
    <td><code>dn_interest</code></td>
849
    <td>Zinsen per anno f&uum;r diese Rechnung</td>
850
   </tr>
851
   <tr>
852
    <td><code>dn_invnumber</code></td>
853
    <td>Rechnungsnummer</td>
854
   </tr>
855
   <tr>
856
    <td><code>dn_netamount</code></td>
857
    <td>Rechnungssumme (netto)</td>
858
   </tr>
859
   <tr>
860
    <td><code>dn_open_amount</code></td>
861
    <td>Offener Rechnungsbetrag</td>
862
   </tr>
863
   <tr>
864
    <td><code>dn_ordnumber</code></td>
865
    <td>Bestellnummer</td>
866
   </tr>
867
   <tr>
868
    <td><code>dn_transdate</code></td>
869
    <td>Rechnungsdatum</td>
870
   </tr>
871
  </table>
872
 </p>
873

  
874
 <small><a href="dokumentenvorlagen-und-variablen.html#inhaltsverzeichnis">
875
   zum Inhaltsverzeichnis</a></small><br>
876
 <hr>
877

  
761 878
 <h2><a name="anderevorlagen">
762 879
   Variablen in anderen Vorlagen</a></h2>
763 880

  
locale/de/all
557 557
  'Increase'                    => 'Erh?hen',
558 558
  'Individual Items'            => 'Einzelteile',
559 559
  'Information'                 => 'Information',
560
  'Interest'                    => 'Zinsen',
560 561
  'Interest Rate'               => 'Zinssatz',
561 562
  'Internal Notes'              => 'interne Bemerkungen',
562 563
  'International'               => 'Ausland',
......
792 793
  'Payment date missing!'       => 'Tag der Zahlung fehlt!',
793 794
  'Payment posted!'             => 'Zahlung gebucht!',
794 795
  'Payment terms deleted!'      => 'Zahlungskonditionen gel?scht!',
795
  'Payment until'               => 'Zahlungseing?nge bis',
796 796
  'Payments'                    => 'Zahlungsausg?nge',
797 797
  'Pg Database Administration'  => 'Datenbankadministration',
798 798
  'Phone'                       => 'Telefon',
......
1018 1018
  'Tax number'                  => 'Steuernummer',
1019 1019
  'Tax paid'                    => 'Vorsteuer',
1020 1020
  'Tax-o-matic Account'         => 'Automatikbuchung auf Konto',
1021
  'Tax-o-matic Account: '       => '',
1022 1021
  'Taxaccount_coa'              => 'Automatikkonto',
1023 1022
  'Taxation'                    => 'Versteuerungs Verfahren',
1024 1023
  'Taxdescription_coa'          => 'Steuer',
......
1086 1085
  'Top Level'                   => 'Hauptartikelbezeichnung',
1087 1086
  'Total'                       => 'Summe',
1088 1087
  'Total Fees'                  => 'Kumulierte Geb?hren',
1089
  'Total Interest'              => 'Kumulierte Zinsen',
1090 1088
  'Trade Discount'              => 'Rabatt',
1091 1089
  'Transaction Date missing!'   => 'Buchungsdatum fehlt!',
1092 1090
  'Transaction deleted!'        => 'Buchung gel?scht!',
locale/de/am
11 11
  '&lt;%total%&gt; -- Amount payable' => '&lt;%total%&gt; -- Noch zu bezahlender Betrag',
12 12
  'A unit with this name does already exist.' => 'Eine Einheit mit diesem Namen existiert bereits.',
13 13
  'ADDED'                       => 'Hinzugef?gt',
14
  'AP'                          => 'Einkauf',
15
  'AR'                          => 'Verkauf',
16 14
  'Account'                     => 'Konto',
17 15
  'Account Category A'          => 'Aktiva/Mittelverwendung',
18 16
  'Account Category C'          => 'Kosten',
......
21 19
  'Account Category I'          => 'Erl?skonto',
22 20
  'Account Category L'          => 'Passiva/Mittelherkunft',
23 21
  'Account Category Q'          => 'Passiva',
22
  'Account Description missing!' => 'Beschreibung fehlt!',
24 23
  'Account Link AP'             => 'Einkauf',
25 24
  'Account Link AP_amount'      => 'Verbindlichkeiten Aufwand/Anlagen',
26 25
  'Account Link AP_paid'        => 'Verbindlichkeiten Zahlungsausgang',
......
37 36
  'Account Link IC_sale'        => 'Warenliste Erl?skonto',
38 37
  'Account Link IC_taxpart'     => 'Warenliste Steuer',
39 38
  'Account Link IC_taxservice'  => 'Dienstleistungen Steuer',
40
  'Account Number'              => 'Kontonummer',
41 39
  'Account Number missing!'     => 'Kontonummer fehlt!',
42
  'Account Type'                => 'Kontoart',
43 40
  'Account Type missing!'       => 'Kontoart fehlt!',
44 41
  'Account deleted!'            => 'Konto gel?scht!',
45 42
  'Account saved!'              => 'Konto gespeichert!',
......
64 61
  'Aufwand EU m. UStId'         => 'Aufwand EU m. UStId',
65 62
  'Aufwand EU o. UStId'         => 'Aufwand EU o. UStId',
66 63
  'Aufwand Inland'              => 'Aufwand Inland',
67
  'BWA'                         => 'BWA',
68 64
  'Bestandskonto'               => 'Bestandskonto',
69
  'Bilanz'                      => 'Bilanz',
70 65
  'Books are open'              => 'Die B?cher sind ge?ffnet.',
71 66
  'Buchungsgruppe'              => 'Buchungsgruppe',
72 67
  'Buchungsgruppe bearbeiten'   => 'Buchungsgruppe bearbeiten',
......
109 104
  'Dropdown Limit'              => 'Auswahllistenbegrenzung',
110 105
  'E-mail'                      => 'eMail',
111 106
  'ELSE'                        => 'Zusatz',
112
  'EUER'                        => 'Einnahmen-/?berschussrechnung',
113 107
  'Edit Account'                => 'Kontodaten bearbeiten',
114 108
  'Edit Buchungsgruppe'         => 'Buchungsgruppe bearbeiten',
115 109
  'Edit Business'               => 'Kunden-/Lieferantentyp bearbeiten',
......
130 124
  'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s',
131 125
  'Expense'                     => 'Aufwandskonto',
132 126
  'Expense Account'             => 'Aufwandskonto',
133
  'Expense/Asset'               => 'Aufwand/Anlagen',
134 127
  'Fax'                         => 'Fax',
135
  'Folgekonto'                  => 'Folgekonto',
136 128
  'Foreign Exchange Gain'       => 'Wechselkursertr?ge',
137 129
  'Foreign Exchange Loss'       => 'Wechselkursaufwendungen',
138 130
  'Form details (second row)'   => 'Formulardetails (zweite Positionszeile)',
139
  'G?ltig ab'                   => 'G?ltig ab',
140
  'Heading'                     => '?berschrift',
131
  'Header'                      => '?berschrift',
141 132
  'Hide by default'             => 'Standardm&auml;&szlig;ig verstecken',
142 133
  'History'                     => 'Historie',
143 134
  'History Search'              => 'Historien Suche',
144
  'Include in drop-down menus'  => 'In Aufklappmen? aufnehmen',
145 135
  'Inventory'                   => 'Inventar',
146 136
  'Inventory Account'           => 'Warenbestand',
147
  'Is this a summary account to record' => 'Buchungskonto in',
148 137
  'Language'                    => 'Sprache',
149 138
  'Language deleted!'           => 'Sprache gel?scht!',
150 139
  'Language missing!'           => 'Sprache fehlt!',
......
177 166
  'No employee was found matching the search parameters.' => 'Es wurde kein Angestellter gefunden, auf den die Suchparameter zutreffen.',
178 167
  'No part was found matching the search parameters.' => 'Es wurde kein Artikel gefunden, auf den die Suchparameter zutreffen.',
179 168
  'No project was found matching the search parameters.' => 'Es wurde kein Projekt gefunden, auf das die Suchparameter zutreffen.',
169
  'None'                        => 'Kein',
180 170
  'Number'                      => 'Nummer',
181 171
  'Number Format'               => 'Zahlenformat',
182 172
  'Number of copies'            => 'Anzahl Kopien',
173
  'Off'                         => 'Aus',
183 174
  'Old (on the side)'           => 'Alt (seitlich)',
184 175
  'On'                          => 'An',
185 176
  'OpenDocument/OASIS'          => 'OpenDocument/OASIS',
......
192 183
  'PRINTED'                     => 'Gedruckt',
193 184
  'Part Number'                 => 'Artikelnummer',
194 185
  'Part description'            => 'Artikelbeschreibung',
195
  'Parts Inventory'             => 'Warenliste',
196 186
  'Password'                    => 'Passwort',
197
  'Payables'                    => 'Verbindlichkeiten',
198
  'Payment'                     => 'Zahlungsausgang',
199 187
  'Payment Terms'               => 'Zahlungskonditionen',
200 188
  'Payment Terms saved!'        => 'Zahlungskonditionen gespeichert!',
201 189
  'Payment terms deleted!'      => 'Zahlungskonditionen gel?scht!',
......
215 203
  'Project description'         => 'Projektbeschreibung',
216 204
  'Queue'                       => 'Warteschlange',
217 205
  'Rate'                        => 'Rate',
218
  'Receipt'                     => 'Zahlungseingang',
219
  'Receivables'                 => 'Forderungen',
220 206
  'Revenue'                     => 'Erl?skonto',
221 207
  'Revenue Account'             => 'Erl?skonto',
222 208
  'SAVED'                       => 'Gespeichert',
......
228 214
  'Select a part'               => 'Artikel ausw&auml;hlen',
229 215
  'Select a project'            => 'Projekt ausw&auml;hlen',
230 216
  'Select an employee'          => 'Angestellten ausw&auml;hlen',
231
  'Service Items'               => 'Dienstleistungen',
232 217
  'Setup Menu'                  => 'Men?setup',
233 218
  'Show by default'             => 'Standardm&auml;&szlig;ig anzeigen',
234 219
  'Signature'                   => 'Unterschrift',
235 220
  'Skonto'                      => 'Skonto',
236 221
  'Skonto Terms'                => 'Zahlungsziel Skonto',
237
  'Steuersatz'                  => 'Steuersatz',
238 222
  'Stylesheet'                  => 'Stilvorlage',
239
  'Tax'                         => 'Steuer',
240 223
  'Tax Accounts'                => 'Steuerkonto',
224
  'Tax-o-matic Account'         => 'Automatikbuchung auf Konto',
241 225
  'Template Code'               => 'Vorlagenk?rzel',
242 226
  'Template Code missing!'      => 'Vorlagenk?rzel fehlt!',
243 227
  'The \'tag\' field must only consist of alphanumeric characters or the carachters - _ ( )' => 'Das Feld \'tag\' darf nur aus alphanumerischen Zeichen und den Zeichen - _ ( ) bestehen.',
......
260 244
  'Translation (%s)'            => '&Uuml;bersetzung (%s)',
261 245
  'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
262 246
  'Type of Business'            => 'Kunden-/Lieferantentyp',
263
  'UStVA-Nr. 35'                => 'Kz. 35',
264
  'UStVA-Nr. 36'                => 'Kz. 36',
265
  'UStVA-Nr. 39'                => 'Kz. 37',
266
  'UStVA-Nr. 41'                => 'Kz. 41',
267
  'UStVA-Nr. 42'                => 'Kz. 42',
268
  'UStVA-Nr. 43'                => 'Kz. 43',
269
  'UStVA-Nr. 44'                => 'Kz. 44',
270
  'UStVA-Nr. 45'                => 'Kz. 45',
271
  'UStVA-Nr. 48'                => 'Kz. 48',
272
  'UStVA-Nr. 49'                => 'Kz. 49',
273
  'UStVA-Nr. 51 left'           => 'Kz. 51 links',
274
  'UStVA-Nr. 51 right'          => 'Kz. 51 rechts',
275
  'UStVA-Nr. 52'                => 'Kz. 52',
276
  'UStVA-Nr. 53'                => 'Kz. 53',
277
  'UStVA-Nr. 59'                => 'Kz. 59',
278
  'UStVA-Nr. 60'                => 'Kz. 60',
279
  'UStVA-Nr. 61'                => 'Kz. 61',
280
  'UStVA-Nr. 62'                => 'Kz. 62',
281
  'UStVA-Nr. 63'                => 'Kz. 63',
282
  'UStVA-Nr. 64'                => 'Kz. 64',
283
  'UStVA-Nr. 65'                => 'Kz. 65',
284
  'UStVA-Nr. 66'                => 'Kz. 66',
285
  'UStVA-Nr. 67'                => 'Kz. 67',
286
  'UStVA-Nr. 69'                => 'Kz. 69',
287
  'UStVA-Nr. 73'                => 'Kz. 73',
288
  'UStVA-Nr. 74'                => 'Kz. 74',
289
  'UStVA-Nr. 76'                => 'Kz. 76',
290
  'UStVA-Nr. 77'                => 'Kz. 77',
291
  'UStVA-Nr. 80'                => 'Kz. 80',
292
  'UStVA-Nr. 81 left'           => 'UStVA-Nr. 81 left',
293
  'UStVA-Nr. 81 right'          => 'UStVA-Nr. 81 right',
294
  'UStVA-Nr. 84'                => 'Kz. 84',
295
  'UStVA-Nr. 85'                => 'Kz. 85',
296
  'UStVA-Nr. 86 left'           => 'Kz. 86 links',
297
  'UStVA-Nr. 86 right'          => 'Kz. 86 rechts',
298
  'UStVA-Nr. 89 left'           => 'UStVA-Nr. 89 left',
299
  'UStVA-Nr. 89 right'          => 'UStVA-Nr. 89 right',
300
  'UStVA-Nr. 91'                => 'Kz. 91',
301
  'UStVA-Nr. 93 left'           => 'Kz. 93 left',
302
  'UStVA-Nr. 93 right'          => 'Kz. 93 right',
303
  'UStVA-Nr. 94'                => 'Kz. 94',
304
  'UStVA-Nr. 95'                => 'Kz. 95',
305
  'UStVA-Nr. 96'                => 'Kz. 96',
306
  'UStVA-Nr. 97 links'          => 'Kz. 97 links',
307
  'UStVA-Nr. 97 rechts'         => 'Kz. 97 rechts',
308
  'UStVA-Nr. 98'                => 'Kz. 98',
309
  'Umsatzsteuervoranmeldung'    => 'Umsatzsteuervoranmeldung',
310 247
  'Unit'                        => 'Einheit',
311 248
  'Unknown Category'            => 'Unbekannte Kategorie',
312 249
  'Unknown Link'                => 'Unbekannte Verkn?pfung',
......
387 324
  'language_header'             => 'language_header',
388 325
  'lead_header'                 => 'lead_header',
389 326
  'list_account'                => 'list_account',
327
  'list_account_details'        => 'list_account_details',
390 328
  'list_buchungsgruppe'         => 'list_buchungsgruppe',
391 329
  'list_business'               => 'list_business',
392 330
  'list_department'             => 'list_department',
locale/de/dn
73 73
  'Group Invoices'              => 'Rechnungen zusammenfassen',
74 74
  'History'                     => 'Historie',
75 75
  'In-line'                     => 'im Text',
76
  'Interest'                    => 'Zinsen',
76 77
  'Interest Rate'               => 'Zinssatz',
77 78
  'Inv. Duedate'                => 'Rg. F?lligkeit',
78 79
  'Invdate'                     => 'Rechnungsdatum',
......
135 136
  'Part Number'                 => 'Artikelnummer',
136 137
  'Part description'            => 'Artikelbeschreibung',
137 138
  'Payment Terms missing in row ' => 'Zahlungsfrist fehlt in Zeile ',
138
  'Payment until'               => 'Zahlungseing?nge bis',
139 139
  'Phone'                       => 'Telefon',
140 140
  'Pick List'                   => 'Sammelliste',
141 141
  'Please enter values'         => 'Bitte Werte eingeben',
......
194 194
  'The dunning process started' => 'Der Mahnprozess ist gestartet.',
195 195
  'To'                          => 'An',
196 196
  'Total Fees'                  => 'Kumulierte Geb?hren',
197
  'Total Interest'              => 'Kumulierte Zinsen',
198 197
  'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
199 198
  'Unit'                        => 'Einheit',
200 199
  'Unknown dependency \'%s\'.'  => 'Unbekannte Abh&auml;ngigkeit \'%s\'.',
locale/de/ir
61 61
  'E-mail address missing!'     => 'E-Mail-Adresse fehlt!',
62 62
  'ELSE'                        => 'Zusatz',
63 63
  'Edit Vendor Invoice'         => 'Einkaufsrechnung bearbeiten',
64
  'Employee'                    => 'Bearbeiter',
64 65
  'Enter longdescription'       => 'Langtext eingeben',
65 66
  'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s',
66 67
  'Exch'                        => 'Wechselkurs.',
sql/Pg-upgrade2/dunning_config_interest_rate.sql
1
-- @tag: dunning_config_interest_rate
2
-- @description: In der Tabelle dunning_config ist interest falsch benannt.
3
-- @depends: release_2_4_2
4
ALTER TABLE dunning_config RENAME interest TO interest_rate;

Auch abrufbar als: Unified diff