Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0a382648

Von Moritz Bunkus vor fast 14 Jahren hinzugefügt

  • ID 0a382648a783af65ddf69cc02124379bf0c24844
  • Vorgänger 79cc78ca
  • Nachfolger eaaf40cf

Kunden-/Lieferantenfelder richtig zur Verfügung stellen

Unterschiede anzeigen:

SL/DB/Helper/FlattenToForm.pm
28 28

  
29 29
  $self->{vc} = $vc if ref($self) =~ /^SL::DB::.*Invoice/;
30 30

  
31
  _copy($self,                          $form, '',              '', 1, qw(amount netamount marge_total marge_percent container_remaining_weight container_remaining_volume
32
                                                                          paid));
33
  _copy($self->$vc,                     $form, "${vc}_",        '', 0, map { $_->name } ref($self->$vc)->meta->columns);
31
  my @vc_fields          = (qw(account_number bank bank_code bic business city contact country creditlimit discount
32
                               email fax homepage iban language name payment_terms phone street taxnumber zipcode),
33
                            "${vc}number");
34
  my @vc_prefixed_fields = qw(email fax notes number phone);
35

  
36
  _copy($self,                          $form, '',              '', 1, qw(amount netamount marge_total marge_percent container_remaining_weight container_remaining_volume paid));
37
  _copy($self->$vc,                     $form, '',              '', 0, @vc_fields);
38
  _copy($self->$vc,                     $form, $vc,             '', 0, @vc_prefixed_fields);
34 39
  _copy($self->contact,                 $form, '',              '', 0, grep { /^cp_/    } map { $_->name } SL::DB::Contact->meta->columns) if _has($self, 'cp_id');
35 40
  _copy($self->shipto,                  $form, '',              '', 0, grep { /^shipto/ } map { $_->name } SL::DB::Shipto->meta->columns)  if _has($self, 'shipto_id');
36 41
  _copy($self->globalproject,           $form, 'globalproject', '', 0, qw(number description))                                             if _has($self, 'globalproject_id');

Auch abrufbar als: Unified diff