Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1fba275d

Von Moritz Bunkus vor etwa 11 Jahren hinzugefügt

  • ID 1fba275de673c27cc787f6555f2f06ec18b3a5db
  • Vorgänger b832f344
  • Nachfolger a581d5bd

Mahnungsrechnungen: tax_id und chart_link in acc_trans befüllen

Unterschiede anzeigen:

SL/DN.pm
248 248
  do_query($form, $dbh, $query, @values);
249 249

  
250 250
  $query =
251
    qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, gldate, taxkey)
252
       VALUES (?, ?, ?, current_date, current_date, 0)|;
251
    qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, gldate, taxkey, tax_id, chart_link)
252
       VALUES (?, ?, ?, current_date, current_date, 0,
253
               (SELECT id   FROM tax   WHERE (taxkey = 0) AND (rate = 0)),
254
               (SELECT link FROM chart WHERE id = ?))|;
253 255
  $sth = prepare_query($form, $dbh, $query);
254 256

  
255
  @values = ($ar_id, conv_i($form->{AR_amount_fee}), $fee_remaining);
257
  @values = ($ar_id, conv_i($form->{AR_amount_fee}), $fee_remaining, conv_i($form->{AR_amount_fee}));
256 258
  do_statement($form, $sth, $query, @values);
257 259

  
258 260
  if ($interest_remaining) {
259
    @values = ($ar_id, conv_i($form->{AR_amount_interest}), $interest_remaining);
261
    @values = ($ar_id, conv_i($form->{AR_amount_interest}), $interest_remaining, conv_i($form->{AR_amount_interest}));
260 262
    do_statement($form, $sth, $query, @values);
261 263
  }
262 264

  
263
  @values = ($ar_id, conv_i($form->{AR}), -1 * $amount);
265
  @values = ($ar_id, conv_i($form->{AR}), -1 * $amount, conv_i($form->{AR}));
264 266
  do_statement($form, $sth, $query, @values);
265 267

  
266 268
  $sth->finish();

Auch abrufbar als: Unified diff