Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e9e28dd2

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

  • ID e9e28dd26de569ab7b721560d84ea8ddb0c1dda1
  • Vorgänger 6a41eac6
  • Nachfolger c9ac7ebd

Partieller revert von 452974ed95bccca90fe3991d46c081e46413b643:

"Revert "Einkaufsrechnung -> Zahlung buchen: sinnlosen Quark gefixt.""

Die ursprüngliche Änderung bleibt erhalten, bis auf eine Zeile, die
Probleme mit der Darstellung von Kontenlisten im Dialogbuchen machte.

Unterschiede anzeigen:

SL/AP.pm
38 38
use SL::IO;
39 39
use SL::MoreCommon;
40 40

  
41
use Data::Dumper;
42

  
41 43
use strict;
42 44

  
43 45
sub post_transaction {
......
68 70
      (split(/--/, $form->{"AP_amount_$i"}))[0];
69 71
  }
70 72
  ($form->{AP_amounts}{payables}) = split(/--/, $form->{APselected});
71
  ($form->{AP}{payables})         = split(/--/, $form->{APselected});
73
  ($form->{AP_payables})          = split(/--/, $form->{APselected});
72 74

  
73 75
  # reverse and parse amounts
74 76
  for my $i (1 .. $form->{rowcount}) {
......
270 272

  
271 273
      # get paid account
272 274

  
273
      ($form->{AP}{"paid_$i"}) = split(/--/, $form->{"AP_paid_$i"});
275
      ($form->{"AP_paid_account_$i"}) = split(/--/, $form->{"AP_paid_$i"});
274 276
      $form->{"datepaid_$i"} = $form->{transdate}
275 277
        unless ($form->{"datepaid_$i"});
276 278

  
......
287 289
          qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, project_id, taxkey) | .
288 290
          qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, ?, | .
289 291
          qq|        (SELECT taxkey_id FROM chart WHERE accno = ?))|;
290
        @values = ($form->{id}, $form->{AP}{payables}, $amount,
292
        @values = ($form->{id}, $form->{AP_payables}, $amount,
291 293
                   conv_date($form->{"datepaid_$i"}), $project_id,
292
                   $form->{AP}{payables});
294
                   $form->{AP_payables});
293 295
        do_query($form, $dbh, $query, @values);
294 296
      }
295 297
      $form->{payables} = $amount;
......
299 301
        qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, source, memo, project_id, taxkey) | .
300 302
        qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, ?, ?, ?, | .
301 303
        qq|        (SELECT taxkey_id FROM chart WHERE accno = ?))|;
302
      @values = ($form->{id}, $form->{AP}{"paid_$i"}, $form->{"paid_$i"},
304
      @values = ($form->{id}, $form->{"AP_paid_account_$i"}, $form->{"paid_$i"},
303 305
                 conv_date($form->{"datepaid_$i"}), $form->{"source_$i"},
304
                 $form->{"memo_$i"}, $project_id, $form->{AP}{"paid_$i"});
306
                 $form->{"memo_$i"}, $project_id, $form->{"AP_paid_account_$i"});
305 307
      do_query($form, $dbh, $query, @values);
306 308

  
307 309
      # add exchange rate difference
......
313 315
          qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, fx_transaction, cleared, project_id, taxkey) | .
314 316
          qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, 't', 'f', ?, | .
315 317
          qq|        (SELECT taxkey_id FROM chart WHERE accno = ?))|;
316
        @values = ($form->{id}, $form->{AP}{"paid_$i"}, $amount,
318
        @values = ($form->{id}, $form->{"AP_paid_account_$i"}, $amount,
317 319
                   conv_date($form->{"datepaid_$i"}), $project_id,
318
                   $form->{AP}{"paid_$i"});
320
                   $form->{"AP_paid_account_$i"});
319 321
        do_query($form, $dbh, $query, @values);
320 322
      }
321 323

  
bin/mozilla/ap.pl
1070 1070
  my ($debitaccno,    $debittaxkey)    = split /--/, $form->{AP_amountselected};
1071 1071
  my ($taxkey,        $NULL)           = split /--/, $form->{taxchartselected};
1072 1072
  my ($payablesaccno, $payablestaxkey) = split /--/, $form->{APselected};
1073
  $form->{AP}{amount_1} = $debitaccno;
1074
  $form->{AP}{payables} = $payablesaccno;
1073
#  $form->{AP_amount_1}  = $debitaccno;
1074
  $form->{AP_payables}  = $payablesaccno;
1075 1075
  $form->{taxkey}       = $taxkey;
1076 1076
  $form->{storno}       = 0;
1077 1077

  

Auch abrufbar als: Unified diff