Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9557707c

Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt

  • ID 9557707c3a18daeb9371f2366b8637a7e1f0fa3c
  • Vorgänger c1a8c632
  • Nachfolger ae27679f

Revert "Nutzung der Tabelle currencies"

This reverts commit be776964b83340e69fa2f02eae59b703c0c95b88.

Unterschiede anzeigen:

SL/CT.pm
68 68
  my $ref = $sth->fetchrow_hashref("NAME_lc");
69 69

  
70 70
  map { $form->{$_} = $ref->{$_} } keys %$ref;
71
  $sth->finish;
72 71

  
73
  #get name of currency instead of id:
74
  $query = qq|SELECT curr FROM currencies WHERE id=?|;
75
  ($form->{curr}) = selectrow_query($form, $dbh, $query, conv_i($form->{curr}));
72
  # remove any trailing whitespace
73
  $form->{curr} =~ s/\s*$//;
76 74

  
75
  $sth->finish;
77 76
  if ( $form->{salesman_id} ) {
78 77
    my $query =
79 78
      qq|SELECT ct.name AS salesman | .
......
320 319
    qq|user_password = ?, | .
321 320
    qq|c_vendor_id = ?, | .
322 321
    qq|klass = ?, | .
323
    qq|curr = (SELECT id FROM currencies WHERE curr = ?), | .
322
    qq|curr = ?, | .
324 323
    qq|taxincluded_checked = ? | .
325 324
    qq|WHERE id = ?|;
326 325
  my @values = (
......
363 362
    $form->{user_password},
364 363
    $form->{c_vendor_id},
365 364
    conv_i($form->{klass}),
366
    $form->{currency},
365
    substr($form->{currency}, 0, 3),
367 366
    $form->{taxincluded_checked} ne '' ? $form->{taxincluded_checked} : undef,
368 367
    $form->{id}
369 368
    );
......
472 471
    qq|  username = ?, | .
473 472
    qq|  user_password = ?, | .
474 473
    qq|  v_customer_id = ?, | .
475
    qq|  curr = (SELECT id FROM currencies WHERE curr = ?) | .
474
    qq|  curr = ? | .
476 475
    qq|WHERE id = ?|;
477 476
  my @values = (
478 477
    $form->{vendornumber},
......
512 511
    $form->{username},
513 512
    $form->{user_password},
514 513
    $form->{v_customer_id},
515
    $form->{currency},
514
    substr($form->{currency}, 0, 3),
516 515
    $form->{id}
517 516
    );
518 517
  do_query($form, $dbh, $query, @values);

Auch abrufbar als: Unified diff