Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0b23e37f

Von Moritz Bunkus vor etwa 3 Jahren hinzugefügt

  • ID 0b23e37f2f97ed8142a4beef66d7b6231dfa0899
  • Vorgänger 5a6857e5
  • Nachfolger d1215903

Zusätzliche Rechnungsadressen: beim Ausdruck als Variablen verfügbar machen

Unterschiede anzeigen:

SL/DB/Helper/FlattenToForm.pm
15 15
  _copy($self, $form, '', '', 0, qw(id type taxzone_id ordnumber quonumber invnumber donumber cusordnumber taxincluded shippingpoint shipvia notes intnotes cp_id
16 16
                                    employee_id salesman_id closed department_id language_id payment_id delivery_customer_id delivery_vendor_id shipto_id proforma
17 17
                                    globalproject_id delivered transaction_description container_type accepted_by_customer invoice storno storno_id dunning_config_id
18
                                    orddate quodate reqdate gldate duedate deliverydate datepaid transdate tax_point delivery_term_id));
18
                                    orddate quodate reqdate gldate duedate deliverydate datepaid transdate tax_point delivery_term_id billing_address_id));
19 19
  $form->{currency} = $form->{curr} = $self->currency_id ? $self->currency->name || '' : '';
20 20

  
21 21
  if ( $vc eq 'customer' ) {
SL/Form.pm
59 59
use SL::DB;
60 60
use SL::DBConnect;
61 61
use SL::DBUtils;
62
use SL::DB::AdditionalBillingAddress;
62 63
use SL::DB::Customer;
63 64
use SL::DB::Default;
64 65
use SL::DB::PaymentTerm;
......
3154 3155
    IS->invoice_details(\%::myconfig, $self, $::locale);
3155 3156
  }
3156 3157

  
3158
  $self->set_addition_billing_address_print_variables;
3159

  
3157 3160
  # Chose extension & set source file name
3158 3161
  my $extension = 'html';
3159 3162
  if ($self->{format} eq 'postscript') {
......
3221 3224
  return $self;
3222 3225
}
3223 3226

  
3227
sub set_addition_billing_address_print_variables {
3228
  my ($self) = @_;
3229

  
3230
  return if !$self->{billing_address_id};
3231

  
3232
  my $address = SL::DB::Manager::AdditionalBillingAddress->find_by(id => $self->{billing_address_id});
3233
  return if !$address;
3234

  
3235
  $self->{"billing_address_${_}"} = $address->$_ for map { $_->name } @{ $address->meta->columns };
3236
}
3237

  
3224 3238
sub substitute_placeholders_in_template_arrays {
3225 3239
  my ($self, @fields) = @_;
3226 3240

  
bin/mozilla/io.pl
1392 1392
    $form->get_shipto(\%myconfig);
1393 1393
  }
1394 1394

  
1395
  $form->set_addition_billing_address_print_variables;
1396

  
1395 1397
  $form->{notes} =~ s/^\s+//g;
1396 1398

  
1397 1399
  delete $form->{printer_command};

Auch abrufbar als: Unified diff