Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 94802c79

Von Bernd Blessmann vor fast 13 Jahren hinzugefügt

Fix für Bug 1759: (Verbesserung) Währung bei Kunden / Lieferanten vorbelegen

Für Kunden und Lieferanten kann jetzt in den Stammdaten eine Währung
eingestellt werden, die als Voreinstellung in den Ver- und Einkaufs-
Masken dient.

Unterschiede anzeigen:

SL/IS.pm
450 450
  # get rest for the customer
451 451
  my $query =
452 452
    qq|SELECT ct.*, cp.*, ct.notes as customernotes,
453
         ct.phone AS customerphone, ct.fax AS customerfax, ct.email AS customeremail
453
         ct.phone AS customerphone, ct.fax AS customerfax, ct.email AS customeremail,
454
         ct.curr AS currency
454 455
       FROM customer ct
455 456
       LEFT JOIN contacts cp on ct.id = cp.cp_cv_id
456 457
       WHERE (ct.id = ?) $where
......
470 471

  
471 472
  map { $form->{$_} = $ref->{$_} } keys %$ref;
472 473

  
474
  # remove any trailing whitespace
475
  $form->{currency} =~ s/\s*$// if ($form->{currency});
476

  
473 477
  if ($form->{delivery_customer_id}) {
474 478
    $query =
475 479
      qq|SELECT *, notes as customernotes
......
1647 1651
         c.id AS customer_id, c.name AS customer, c.discount as customer_discount, c.creditlimit, c.terms,
1648 1652
         c.email, c.cc, c.bcc, c.language_id, c.payment_id,
1649 1653
         c.street, c.zipcode, c.city, c.country,
1650
         c.notes AS intnotes, c.klass as customer_klass, c.taxzone_id, c.salesman_id,
1654
         c.notes AS intnotes, c.klass as customer_klass, c.taxzone_id, c.salesman_id, c.curr,
1651 1655
         $duedate + COALESCE(pt.terms_netto, 0) AS duedate,
1652 1656
         b.discount AS tradediscount, b.description AS business
1653 1657
       FROM customer c
......
1661 1665

  
1662 1666
  map { $form->{$_} = $ref->{$_} } keys %$ref;
1663 1667

  
1668
  # remove any trailing whitespace
1669
  $form->{curr} =~ s/\s*$//;
1670

  
1671
  # use customer currency if not empty
1672
  $form->{currency} = $form->{curr} if $form->{curr};
1673

  
1664 1674
  $query =
1665 1675
    qq|SELECT sum(amount - paid) AS dunning_amount
1666 1676
       FROM ar

Auch abrufbar als: Unified diff