Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision aacd6696

Von Bernd Bleßmann vor etwa 6 Jahren hinzugefügt

  • ID aacd66960ed7b1f4430c7e623e516e26cad9752d
  • Vorgänger 639066d1
  • Nachfolger b92bc207

Auftrags-Controller: Kunden-/Lieferantendetails ("D")

Hier sollte die alte Makse auch umgestellt werden, erstens auf Dialog und
zweitens damit via Rose zugegriffen wird.

Unterschiede anzeigen:

SL/Controller/Order.pm
619 619
  $self->js->render();
620 620
}
621 621

  
622
# open the dialog for customer/vendor details
623
sub action_show_customer_vendor_details_dialog {
624
  my ($self) = @_;
625

  
626
  my $is_customer = 'customer' eq $::form->{vc};
627
  my $cv;
628
  if ($is_customer) {
629
    $cv = SL::DB::Customer->new(id => $::form->{vc_id})->load;
630
  } else {
631
    $cv = SL::DB::Vendor->new(id => $::form->{vc_id})->load;
632
  }
633

  
634
  my %details = map { $_ => $cv->$_ } @{$cv->meta->columns};
635
  $details{discount_as_percent} = $cv->discount_as_percent;
636
  $details{creditlimt}          = $cv->creditlimit_as_number;
637
  $details{business}            = $cv->business->description      if $cv->business;
638
  $details{language}            = $cv->language_obj->description  if $cv->language_obj;
639
  $details{delivery_terms}      = $cv->delivery_term->description if $cv->delivery_term;
640
  $details{payment_terms}       = $cv->payment->description       if $cv->payment;
641
  $details{pricegroup}          = $cv->pricegroup->pricegroup     if $cv->pricegroup;
642

  
643
  foreach my $entry (@{ $cv->shipto }) {
644
    push @{ $details{SHIPTO} },   { map { $_ => $entry->$_ } @{$entry->meta->columns} };
645
  }
646
  foreach my $entry (@{ $cv->contacts }) {
647
    push @{ $details{CONTACTS} }, { map { $_ => $entry->$_ } @{$entry->meta->columns} };
648
  }
649

  
650
  $_[0]->render('common/show_vc_details', { layout => 0 },
651
                is_customer => $is_customer,
652
                %details);
653

  
654
}
655

  
622 656
# called if a unit in an existing item row is changed
623 657
sub action_unit_changed {
624 658
  my ($self) = @_;
......
1761 1795

  
1762 1796
=item * currency
1763 1797

  
1764
=item * customer/vendor details ('D'-button)
1765

  
1766 1798
=item * credit limit
1767 1799

  
1768 1800
=item * more workflows (save as new, quotation, purchase order)

Auch abrufbar als: Unified diff