Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 844a541e

Von Moritz Bunkus vor etwa 3 Jahren hinzugefügt

  • ID 844a541e0d8f59644540413f675e8f07cd154cf6
  • Vorgänger ce73964f
  • Nachfolger 00177fae

Zusätzliche Rechnungsadressen: in Verkaufsbelegmasken auswählbar

Unterschiede anzeigen:

SL/Common.pm
342 342
  $query = qq|SELECT * FROM shipto WHERE (trans_id = ?)|;
343 343
  $form->{SHIPTO} = selectall_hashref_query($form, $dbh, $query, $vc_id);
344 344

  
345
  if ($vc eq 'customer') {
346
    $query = qq|SELECT * FROM additional_billing_addresses WHERE (customer_id = ?)|;
347
    $form->{ADDITIONAL_BILLING_ADDRESSES} = selectall_hashref_query($form, $dbh, $query, $vc_id);
348
  }
349

  
345 350
  $query = qq|SELECT * FROM contacts WHERE (cp_cv_id = ?)|;
346 351
  $form->{CONTACTS} = selectall_hashref_query($form, $dbh, $query, $vc_id);
347 352

  
SL/Controller/Order.pm
13 13
use SL::MIME;
14 14
use SL::Util qw(trim);
15 15
use SL::YAML;
16
use SL::DB::AdditionalBillingAddress;
16 17
use SL::DB::History;
17 18
use SL::DB::Order;
18 19
use SL::DB::Default;
......
699 700
    $self->js->hide('#shipto_selection');
700 701
  }
701 702

  
703
  if ($cv_method eq 'customer') {
704
    my $show_hide = scalar @{ $self->order->customer->additional_billing_addresses } > 0 ? 'show' : 'hide';
705
    $self->js->$show_hide('#billing_address_row');
706
  }
707

  
702 708
  $self->js->val( '#order_salesman_id',      $self->order->salesman_id)        if $self->order->is_sales;
703 709

  
704 710
  $self->js
705
    ->replaceWith('#order_cp_id',            $self->build_contact_select)
706
    ->replaceWith('#order_shipto_id',        $self->build_shipto_select)
707
    ->replaceWith('#shipto_inputs  ',        $self->build_shipto_inputs)
708
    ->replaceWith('#business_info_row',      $self->build_business_info_row)
709
    ->val(        '#order_taxzone_id',       $self->order->taxzone_id)
710
    ->val(        '#order_taxincluded',      $self->order->taxincluded)
711
    ->val(        '#order_currency_id',      $self->order->currency_id)
712
    ->val(        '#order_payment_id',       $self->order->payment_id)
713
    ->val(        '#order_delivery_term_id', $self->order->delivery_term_id)
714
    ->val(        '#order_intnotes',         $self->order->intnotes)
715
    ->val(        '#order_language_id',      $self->order->$cv_method->language_id)
711
    ->replaceWith('#order_cp_id',              $self->build_contact_select)
712
    ->replaceWith('#order_shipto_id',          $self->build_shipto_select)
713
    ->replaceWith('#shipto_inputs  ',          $self->build_shipto_inputs)
714
    ->replaceWith('#order_billing_address_id', $self->build_billing_address_select)
715
    ->replaceWith('#business_info_row',        $self->build_business_info_row)
716
    ->val(        '#order_taxzone_id',         $self->order->taxzone_id)
717
    ->val(        '#order_taxincluded',        $self->order->taxincluded)
718
    ->val(        '#order_currency_id',        $self->order->currency_id)
719
    ->val(        '#order_payment_id',         $self->order->payment_id)
720
    ->val(        '#order_delivery_term_id',   $self->order->delivery_term_id)
721
    ->val(        '#order_intnotes',           $self->order->intnotes)
722
    ->val(        '#order_language_id',        $self->order->$cv_method->language_id)
716 723
    ->focus(      '#order_' . $self->cv . '_id')
717 724
    ->run('kivi.Order.update_exchangerate');
718 725

  
......
742 749
  $details{payment_terms}       = $cv->payment->description       if $cv->payment;
743 750
  $details{pricegroup}          = $cv->pricegroup->pricegroup     if $is_customer && $cv->pricegroup;
744 751

  
752
  foreach my $entry (@{ $cv->additional_billing_addresses }) {
753
    push @{ $details{ADDITIONAL_BILLING_ADDRESSES} },   { map { $_ => $entry->$_ } @{$entry->meta->columns} };
754
  }
745 755
  foreach my $entry (@{ $cv->shipto }) {
746 756
    push @{ $details{SHIPTO} },   { map { $_ => $entry->$_ } @{$entry->meta->columns} };
747 757
  }
......
1308 1318
  );
1309 1319
}
1310 1320

  
1321
# build the selection box for the additional billing address
1322
#
1323
# Needed, if customer/vendor changed.
1324
sub build_billing_address_select {
1325
  my ($self) = @_;
1326

  
1327
  select_tag('order.billing_address_id',
1328
             [ {displayable_id => '', id => ''}, $self->order->{$self->cv}->additional_billing_addresses ],
1329
             value_key  => 'id',
1330
             title_key  => 'displayable_id',
1331
             default    => $self->order->billing_address_id,
1332
             with_empty => 0,
1333
             style      => 'width: 300px',
1334
  );
1335
}
1336

  
1311 1337
# build the selection box for shiptos
1312 1338
#
1313 1339
# Needed, if customer/vendor changed.
......
1565 1591

  
1566 1592
  $order->intnotes($order->customervendor->notes);
1567 1593

  
1568
  if ($order->is_sales) {
1569
    $order->salesman_id($order->customer->salesman_id || SL::DB::Manager::Employee->current->id);
1570
    $order->taxincluded(defined($order->customer->taxincluded_checked)
1571
                        ? $order->customer->taxincluded_checked
1572
                        : $::myconfig{taxincluded_checked});
1573
  }
1594
  return if !$order->is_sales;
1595

  
1596
  $order->salesman_id($order->customer->salesman_id || SL::DB::Manager::Employee->current->id);
1597
  $order->taxincluded(defined($order->customer->taxincluded_checked)
1598
                      ? $order->customer->taxincluded_checked
1599
                      : $::myconfig{taxincluded_checked});
1574 1600

  
1601
  my $address = $order->customer->default_billing_address;;
1602
  $order->billing_address_id($address ? $address->id : undef);
1575 1603
}
1576 1604

  
1577 1605
# setup custom shipto from form
SL/DB/Customer.pm
2 2

  
3 3
use strict;
4 4

  
5
use List::Util qw(first);
5 6
use Rose::DB::Object::Helpers qw(as_tree);
6 7

  
7 8
use SL::Locale::String qw(t8);
......
114 115
  return $self->create_zugferd_invoices;
115 116
}
116 117

  
118
sub default_billing_address {
119
  my $self = shift;
120

  
121
  die 'not an accessor' if @_ > 1;
122
  return first { $_->default_address } @{ $self->additional_billing_addresses };
123
}
124

  
117 125
1;
SL/DB/DeliveryOrder.pm
127 127
  }
128 128

  
129 129
  my %args = ( map({ ( $_ => $source->$_ ) } qw(cp_id currency_id customer_id cusordnumber delivery_term_id department_id employee_id globalproject_id intnotes language_id notes
130
                                                ordnumber payment_id reqdate salesman_id shippingpoint shipvia taxincluded taxzone_id transaction_description vendor_id
130
                                                ordnumber payment_id reqdate salesman_id shippingpoint shipvia taxincluded taxzone_id transaction_description vendor_id billing_address_id
131 131
                                             )),
132 132
               closed    => 0,
133 133
               is_sales  => !!$source->customer_id,
SL/DB/Invoice.pm
173 173
  $terms = $source->customer->payment_terms if !defined $terms && $source->customer;
174 174

  
175 175
  my %args = ( map({ ( $_ => $source->$_ ) } qw(customer_id taxincluded shippingpoint shipvia notes intnotes salesman_id cusordnumber ordnumber department_id
176
                                                cp_id language_id taxzone_id tax_point globalproject_id transaction_description currency_id delivery_term_id), @columns),
176
                                                cp_id language_id taxzone_id tax_point globalproject_id transaction_description currency_id delivery_term_id
177
                                                billing_address_id), @columns),
177 178
               transdate   => $params{transdate} // DateTime->today_local,
178 179
               gldate      => DateTime->today_local,
179 180
               duedate     => $terms ? $terms->calc_date(reference_date => DateTime->today_local) : DateTime->today_local,
SL/DB/Order.pm
345 345
  my %args = ( map({ ( $_ => $source->$_ ) } qw(amount cp_id currency_id cusordnumber customer_id delivery_customer_id delivery_term_id delivery_vendor_id
346 346
                                                department_id exchangerate globalproject_id intnotes marge_percent marge_total language_id netamount notes
347 347
                                                ordnumber payment_id quonumber reqdate salesman_id shippingpoint shipvia taxincluded tax_point taxzone_id
348
                                                transaction_description vendor_id
348
                                                transaction_description vendor_id billing_address_id
349 349
                                             )),
350 350
               quotation => !!($destination_type =~ m{quotation$}),
351 351
               closed    => 0,
SL/DO.pm
513 513
         donumber = ?, ordnumber = ?, cusordnumber = ?, transdate = ?, vendor_id = ?,
514 514
         customer_id = ?, reqdate = ?, tax_point = ?,
515 515
         shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, closed = ?,
516
         delivered = ?, department_id = ?, language_id = ?, shipto_id = ?,
516
         delivered = ?, department_id = ?, language_id = ?, shipto_id = ?, billing_address_id = ?,
517 517
         globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ?,
518 518
         is_sales = ?, taxzone_id = ?, taxincluded = ?, payment_id = ?, currency_id = (SELECT id FROM currencies WHERE name = ?),
519 519
         delivery_term_id = ?
......
525 525
             conv_date($form->{reqdate}), conv_date($form->{tax_point}), $form->{shippingpoint}, $form->{shipvia},
526 526
             $restricter->process($form->{notes}), $form->{intnotes},
527 527
             $form->{closed} ? 't' : 'f', $form->{delivered} ? "t" : "f",
528
             conv_i($form->{department_id}), conv_i($form->{language_id}), conv_i($form->{shipto_id}),
528
             conv_i($form->{department_id}), conv_i($form->{language_id}), conv_i($form->{shipto_id}), conv_i($form->{billing_address_id}),
529 529
             conv_i($form->{globalproject_id}), conv_i($form->{employee_id}),
530 530
             conv_i($form->{salesman_id}), conv_i($form->{cp_id}),
531 531
             $form->{transaction_description},
......
731 731
         dord.${vc}_id, cv.name AS ${vc},
732 732
         dord.closed, dord.reqdate, dord.department_id, dord.cusordnumber,
733 733
         d.description AS department, dord.language_id,
734
         dord.shipto_id,
734
         dord.shipto_id, dord.billing_address_id,
735 735
         dord.itime, dord.mtime,
736 736
         dord.globalproject_id, dord.delivered, dord.transaction_description,
737 737
         dord.taxzone_id, dord.taxincluded, dord.payment_id, (SELECT cu.name FROM currencies cu WHERE cu.id=dord.currency_id) AS currency,
SL/IS.pm
1318 1318
                shipvia     = ?,                    notes         = ?, intnotes      = ?,
1319 1319
                currency_id = (SELECT id FROM currencies WHERE name = ?),
1320 1320
                department_id = ?, payment_id    = ?, taxincluded   = ?,
1321
                type        = ?, language_id   = ?, taxzone_id    = ?, shipto_id     = ?,
1321
                type        = ?, language_id   = ?, taxzone_id    = ?, shipto_id     = ?, billing_address_id = ?,
1322 1322
                employee_id = ?, salesman_id   = ?, storno_id     = ?, storno        = ?,
1323 1323
                cp_id       = ?, marge_total   = ?, marge_percent = ?,
1324 1324
                globalproject_id               = ?, delivery_customer_id             = ?,
......
1332 1332
             conv_date($form->{"duedate"}),  conv_date($form->{"deliverydate"}),    '1',                                $form->{"shippingpoint"},
1333 1333
                       $form->{"shipvia"},                                $restricter->process($form->{"notes"}),       $form->{"intnotes"},
1334 1334
                       $form->{"currency"},     conv_i($form->{"department_id"}), conv_i($form->{"payment_id"}),        $form->{"taxincluded"} ? 't' : 'f',
1335
                       $form->{"type"},         conv_i($form->{"language_id"}),   conv_i($form->{"taxzone_id"}), conv_i($form->{"shipto_id"}),
1335
                       $form->{"type"},         conv_i($form->{"language_id"}),   conv_i($form->{"taxzone_id"}), conv_i($form->{"shipto_id"}), conv_i($form->{billing_address_id}),
1336 1336
                conv_i($form->{"employee_id"}), conv_i($form->{"salesman_id"}),   conv_i($form->{storno_id}),           $form->{"storno"} ? 't' : 'f',
1337 1337
                conv_i($form->{"cp_id"}),            1 * $form->{marge_total} ,      1 * $form->{marge_percent},
1338 1338
                conv_i($form->{"globalproject_id"}),                              conv_i($form->{"delivery_customer_id"}),
......
2030 2030
           a.transdate AS invdate, a.deliverydate, a.tax_point, a.paid, a.storno, a.storno_id, a.gldate,
2031 2031
           a.shippingpoint, a.shipvia, a.notes, a.intnotes, a.taxzone_id,
2032 2032
           a.duedate, a.taxincluded, (SELECT cu.name FROM currencies cu WHERE cu.id=a.currency_id) AS currency, a.shipto_id, a.cp_id,
2033
           a.billing_address_id,
2033 2034
           a.employee_id, a.salesman_id, a.payment_id,
2034 2035
           a.mtime, a.itime,
2035 2036
           a.language_id, a.delivery_customer_id, a.delivery_vendor_id, a.type,
......
2218 2219
         c.street, c.zipcode, c.city, c.country,
2219 2220
         c.notes AS intnotes, c.pricegroup_id as customer_pricegroup_id, c.taxzone_id, c.salesman_id, cu.name AS curr,
2220 2221
         c.taxincluded_checked, c.direct_debit,
2222
         (SELECT aba.id
2223
          FROM additional_billing_addresses aba
2224
          WHERE aba.default_address
2225
          LIMIT 1) AS default_billing_address_id,
2221 2226
         b.discount AS tradediscount, b.description AS business
2222 2227
       FROM customer c
2223 2228
       LEFT JOIN business b ON (b.id = c.business_id)
SL/OE.pm
755 755
         customer_id = ?, amount = ?, netamount = ?, reqdate = ?, tax_point = ?, taxincluded = ?,
756 756
         shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, currency_id = (SELECT id FROM currencies WHERE name=?), closed = ?,
757 757
         delivered = ?, proforma = ?, quotation = ?, department_id = ?, language_id = ?,
758
         taxzone_id = ?, shipto_id = ?, payment_id = ?, delivery_vendor_id = ?, delivery_customer_id = ?,delivery_term_id = ?,
758
         taxzone_id = ?, shipto_id = ?, billing_address_id = ?, payment_id = ?, delivery_vendor_id = ?, delivery_customer_id = ?,delivery_term_id = ?,
759 759
         globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ?, marge_total = ?, marge_percent = ?
760 760
         , order_probability = ?, expected_billing_date = ?
761 761
       WHERE id = ?|;
......
770 770
             $form->{delivered} ? "t" : "f", $form->{proforma} ? 't' : 'f',
771 771
             $quotation, conv_i($form->{department_id}),
772 772
             conv_i($form->{language_id}), conv_i($form->{taxzone_id}),
773
             conv_i($form->{shipto_id}), conv_i($form->{payment_id}),
773
             conv_i($form->{shipto_id}), conv_i($form->{billing_address_id}), conv_i($form->{payment_id}),
774 774
             conv_i($form->{delivery_vendor_id}),
775 775
             conv_i($form->{delivery_customer_id}),
776 776
             conv_i($form->{delivery_term_id}),
......
1100 1100
           o.closed, o.reqdate, o.tax_point, o.quonumber, o.department_id, o.cusordnumber,
1101 1101
           o.mtime, o.itime,
1102 1102
           d.description AS department, o.payment_id, o.language_id, o.taxzone_id,
1103
           o.delivery_customer_id, o.delivery_vendor_id, o.proforma, o.shipto_id,
1103
           o.delivery_customer_id, o.delivery_vendor_id, o.proforma, o.shipto_id, o.billing_address_id,
1104 1104
           o.globalproject_id, o.delivered, o.transaction_description, o.delivery_term_id,
1105 1105
           o.itime::DATE AS insertdate, o.order_probability, o.expected_billing_date
1106 1106
         FROM oe o
bin/mozilla/do.pl
98 98
  $form->{show_details} = $::myconfig{show_form_details};
99 99
  $form->{callback} = build_std_url('action=add', 'type', 'vc') unless ($form->{callback});
100 100

  
101
  order_links();
101
  order_links(is_new => 1);
102 102
  prepare_order();
103 103
  display_form();
104 104

  
......
168 168

  
169 169
  check_do_access();
170 170

  
171
  my %params   = @_;
171 172
  my $form     = $main::form;
172 173
  my %myconfig = %main::myconfig;
173 174

  
......
186 187
  } else {
187 188
    IS->get_customer(\%myconfig, \%$form);
188 189
    $form->{discount} = $form->{customer_discount};
190
    $form->{billing_address_id} = $form->{default_billing_address_id} if $params{is_new};
189 191
  }
190 192

  
191 193
  $form->restore_vars(qw(payment_id language_id taxzone_id intnotes cp_id delivery_term_id));
......
548 550
  if (($form->{"previous_${vc}_id"} || $form->{"${vc}_id"}) != $form->{"${vc}_id"}) {
549 551
    $::form->{salesman_id} = SL::DB::Manager::Employee->current->id if exists $::form->{salesman_id};
550 552

  
551
    IS->get_customer(\%myconfig, $form) if $vc eq 'customer';
552
    IR->get_vendor(\%myconfig, $form)   if $vc eq 'vendor';
553
    if ($vc eq 'customer') {
554
      IS->get_customer(\%myconfig, $form);
555
      $::form->{billing_address_id} = $::form->{default_billing_address_id};
556
    } else {
557
      IR->get_vendor(\%myconfig, $form);
558
    }
553 559
  }
554 560

  
555 561
  $form->{discount} =  $form->{"$form->{vc}_discount"} if defined $form->{"$form->{vc}_discount"};
......
935 941
  if (($form->{"previous_${vc}_id"} || $form->{"${vc}_id"}) != $form->{"${vc}_id"}) {
936 942
    $::form->{salesman_id} = SL::DB::Manager::Employee->current->id if exists $::form->{salesman_id};
937 943

  
938
    IS->get_customer(\%myconfig, $form) if $vc eq 'customer';
939
    IR->get_vendor(\%myconfig, $form)   if $vc eq 'vendor';
944
    if ($vc eq 'customer') {
945
      IS->get_customer(\%myconfig, $form);
946
      $::form->{billing_address_id} = $::form->{default_billing_address_id};
947
    } else {
948
      IR->get_vendor(\%myconfig, $form);
949
    }
940 950

  
941 951
    update();
942 952
    $::dispatcher->end_request;
bin/mozilla/is.pl
97 97

  
98 98
  $form->{callback} = "$form->{script}?action=add&type=$form->{type}" unless $form->{callback};
99 99

  
100
  &invoice_links;
100
  invoice_links(is_new => 1);
101 101
  &prepare_invoice;
102 102
  &display_form;
103 103

  
......
154 154
  # Delay access check to after the invoice's been loaded so that
155 155
  # project-specific invoice rights can be evaluated.
156 156

  
157
  my %params   = @_;
157 158
  my $form     = $main::form;
158 159
  my %myconfig = %main::myconfig;
159 160

  
......
172 173

  
173 174
  IS->get_customer(\%myconfig, \%$form);
174 175

  
176
  $form->{billing_address_id} = $form->{default_billing_address_id} if $params{is_new};
177

  
175 178
  $form->restore_vars(qw(id));
176 179

  
177 180
  IS->retrieve_invoice(\%myconfig, \%$form);
......
731 734
    $::form->{salesman_id} = SL::DB::Manager::Employee->current->id if exists $::form->{salesman_id};
732 735

  
733 736
    IS->get_customer(\%myconfig, $form);
737
    $::form->{billing_address_id} = $::form->{default_billing_address_id};
734 738
  }
735 739

  
736 740
  $form->{taxincluded} ||= $taxincluded;
bin/mozilla/oe.pl
160 160

  
161 161
  $form->{show_details} = $::myconfig{show_form_details};
162 162

  
163
  &order_links;
163
  order_links(is_new => 1);
164 164
  &prepare_order;
165 165
  &display_form;
166 166

  
......
245 245
sub order_links {
246 246
  $main::lxdebug->enter_sub();
247 247

  
248
  my (%params) = @_;
249

  
248 250
  my $form     = $main::form;
249 251
  my %myconfig = %main::myconfig;
250 252
  my $locale   = $main::locale;
......
266 268
  $form->backup_vars(qw(payment_id language_id taxzone_id salesman_id taxincluded cp_id intnotes shipto_id delivery_term_id currency));
267 269

  
268 270
  # get customer / vendor
269
  IR->get_vendor(\%myconfig, \%$form)   if $form->{type} =~ /(purchase_order|request_quotation)/;
270
  IS->get_customer(\%myconfig, \%$form) if $form->{type} =~ /sales_(order|quotation)/;
271
  if ($form->{type} =~ /(purchase_order|request_quotation)/) {
272
    IR->get_vendor(\%myconfig, \%$form);
273
  } else {
274
    IS->get_customer(\%myconfig, \%$form);
275
    $form->{billing_address_id} = $form->{default_billing_address_id} if $params{is_new};
276
  }
271 277

  
272 278
  $form->restore_vars(qw(payment_id language_id taxzone_id intnotes cp_id shipto_id delivery_term_id));
273 279
  $form->restore_vars(qw(currency))    if $form->{id};
......
775 781
  if (($form->{"previous_${vc}_id"} || $form->{"${vc}_id"}) != $form->{"${vc}_id"}) {
776 782
    $::form->{salesman_id} = SL::DB::Manager::Employee->current->id if exists $::form->{salesman_id};
777 783

  
778
    IS->get_customer(\%myconfig, $form) if $vc eq 'customer';
779
    IR->get_vendor(\%myconfig, $form)   if $vc eq 'vendor';
784
    if ($vc eq 'customer') {
785
      IS->get_customer(\%myconfig, $form);
786
      $::form->{billing_address_id} = $::form->{default_billing_address_id};
787
    } else {
788
      IR->get_vendor(\%myconfig, $form);
789
    }
780 790
  }
781 791

  
782 792
  if (!$form->{forex}) {        # read exchangerate from input field (not hidden)
......
1378 1388
    IS->get_customer(\%myconfig, $form) if $vc eq 'customer';
1379 1389
    IR->get_vendor(\%myconfig, $form)   if $vc eq 'vendor';
1380 1390

  
1391
    $::form->{billing_address_id} = $::form->{default_billing_address_id};
1392

  
1381 1393
    update();
1382 1394
    $::dispatcher->end_request;
1383 1395
  }
......
1480 1492
  if (($form->{"previous_${vc}_id"} || $form->{"${vc}_id"}) != $form->{"${vc}_id"}) {
1481 1493
    $::form->{salesman_id} = SL::DB::Manager::Employee->current->id if exists $::form->{salesman_id};
1482 1494

  
1483
    IS->get_customer(\%myconfig, $form) if $vc eq 'customer';
1484
    IR->get_vendor(\%myconfig, $form)   if $vc eq 'vendor';
1495
    if ($vc eq 'customer') {
1496
      IS->get_customer(\%myconfig, $form);
1497
      $::form->{billing_address_id} = $::form->{default_billing_address_id};
1498

  
1499
    } else {
1500
      IR->get_vendor(\%myconfig, $form);
1501
    }
1485 1502

  
1486 1503
    update();
1487 1504
    $::dispatcher->end_request;
locale/de/all
254 254
  'Added sections and function blocks: #1' => 'Hinzugefügte Abschnitte und Funktionsblöcke: #1',
255 255
  'Added text blocks: #1'       => 'Hinzugefügte Textblöcke: #1',
256 256
  'Addition'                    => 'Zusatz',
257
  'Additional Billing Address'  => 'Zusätzliche Rechnungsadresse',
257 258
  'Additional Billing Addresses' => 'Zusätzliche Rechnungsadressen',
258 259
  'Additional articles'         => 'Zusätzliche Artikel',
259 260
  'Additional articles actions' => 'Aktionen zu zusätzlichen Artikeln',
......
861 862
  'Current version'             => 'Aktuelle Version',
862 863
  'Current year'                => 'Aktuelles Jahr',
863 864
  'Currently #1 delivery orders can be converted into invoices and printed.' => 'Momentan können #1 Lieferscheine in Rechnungen umgewandelt werden.',
865
  'Custom Billing Address'      => 'Abweichende Rechnungsadresse',
864 866
  'Custom CSV format'           => 'Eigenes CSV-Format',
865 867
  'Custom Variables'            => 'Benutzerdefinierte Variablen',
866 868
  'Custom data export'          => 'Benutzerdefinierter Datenexport',
templates/webpages/common/show_vc_details.html
1 1
[%- USE T8 %]
2
[% USE HTML %]
2
[% USE HTML %][%- USE LxERP -%]
3 3
<h1>[% IF is_customer %][% 'Customer details' | $T8 %][% ELSE %][% 'Vendor details' | $T8 %][% END %] &quot;[% HTML.escape(name) %]&quot;</h1>
4 4

  
5 5
[% BLOCK jump_block %]
6 6
[%- IF SHIPTO.size || CONTACTS.size %]
7 7
 <p>
8 8
  [% 'Jump to' | $T8 %] <a href="#billing">[% 'Billing Address' | $T8 %]</a>
9
  [%- FOREACH additional_billing_addresses = ADDITIONAL_BILLING_ADDRESSES %]
10
   ,
11
   <a href="#additional_billing_address[% loop.count %]">
12
    [% 'Additional Billing Address' | $T8 %]
13
    "[% HTML.escape(additional_billing_addresses.name) %]"
14
   </a>
15
  [%- END %]
9 16
  [%- FOREACH shipto = SHIPTO %]
10 17
   ,
11 18
   <a href="#shipping[% loop.count %]">
......
26 33
[%- END %]
27 34
[% END %]
28 35

  
29
 [%- INCLUDE jump_block CONTACTS = CONTACTS, SHIPTO = SHIPTO %]
36
 [%- INCLUDE jump_block CONTACTS = CONTACTS, SHIPTO = SHIPTO, ADDITIONAL_BILLING_ADDRESSES = ADDITIONAL_BILLING_ADDRESSES %]
30 37

  
31 38
 <a name="billing"><h1>[% 'Billing Address' | $T8 %]</h1></a>
32 39

  
......
182 189
 </table>
183 190

  
184 191

  
192
 [% FOREACH row = ADDITIONAL_BILLING_ADDRESSES %]
193

  
194
  <hr>
195

  
196
  [%- INCLUDE jump_block CONTACTS = CONTACTS, SHIPTO = SHIPTO, ADDITIONAL_BILLING_ADDRESSES = ADDITIONAL_BILLING_ADDRESSES %]
197

  
198
  <a name="additional_billing_address[% loop.count %]"><h1>[% 'Additional Billing Address' | $T8 %] "[% HTML.escape(row.name) %]"</h1></a>
199

  
200
  <table>
201
   <tr>
202
    <td align="right">[% 'Default Billing Address' | $T8 %]</td>
203
    <td>[% row.default_address ? LxERP.t8('yes') : LxERP.t8('no') %]</td>
204
   </tr>
205

  
206
   <tr>
207
    <td align="right">[% 'Name' | $T8 %]</td>
208
    <td>[% HTML.escape(row.name) %]</td>
209
   </tr>
210

  
211
   <tr>
212
    <td align="right">[% 'Department' | $T8 %]</td>
213
    <td>[% HTML.escape(row.department_1) %][% IF row.department_2 %][% IF row.department_1 %]; [% END %][% HTML.escape(row.department_2) %][% END %]</td>
214
   </tr>
215

  
216
   <tr>
217
    <td align="right">[% 'Street' | $T8 %]</td>
218
    <td>[% HTML.escape(row.street) %]</td>
219
   </tr>
220

  
221
   <tr>
222
    <td align="right">[% 'Zip, City' | $T8 %]</td>
223
    <td>[% HTML.escape(row.zipcode) %] [% HTML.escape(row.city) %]</td>
224
   </tr>
225

  
226
   <tr>
227
    <td align="right">[% 'Country' | $T8 %]</td>
228
    <td>[% HTML.escape(row.country) %]</td>
229
   </tr>
230

  
231
   <tr>
232
    <td align="right">[% 'GLN' | $T8 %]</td>
233
    <td>[% HTML.escape(row.gln) %]</td>
234
   </tr>
235

  
236
   <tr>
237
    <td align="right">[% 'Contact' | $T8 %]</td>
238
    <td>[% HTML.escape(row.contact) %]</td>
239
   </tr>
240

  
241
   <tr>
242
    <td align="right">[% 'Phone' | $T8 %]</td>
243
    <td>[% HTML.escape(row.phone) %]</td>
244
   </tr>
245

  
246
   <tr>
247
    <td align="right">[% 'Fax' | $T8 %]</td>
248
    <td>[% HTML.escape(row.fax) %]</td>
249
   </tr>
250

  
251
   <tr>
252
    <td align="right">[% 'E-mail' | $T8 %]</td>
253
    <td>[% HTML.escape(row.email) %]</td>
254
   </tr>
255

  
256
  </table>
257
 [% END %]
185 258

  
186 259

  
187 260
 [% FOREACH row = SHIPTO %]
188 261

  
189 262
  <hr>
190 263

  
191
  [%- INCLUDE jump_block CONTACTS = CONTACTS, SHIPTO = SHIPTO %]
264
  [%- INCLUDE jump_block CONTACTS = CONTACTS, SHIPTO = SHIPTO, ADDITIONAL_BILLING_ADDRESSES = ADDITIONAL_BILLING_ADDRESSES %]
192 265

  
193 266
  <a name="shipping[% loop.count %]"><h1>[% 'Shipping Address' | $T8 %] &quot;[% HTML.escape(row.shiptoname) %]&quot;</h1></a>
194 267

  
......
259 332

  
260 333
  <hr>
261 334

  
262
  [%- INCLUDE jump_block CONTACTS = CONTACTS, SHIPTO = SHIPTO %]
335
  [%- INCLUDE jump_block CONTACTS = CONTACTS, SHIPTO = SHIPTO, ADDITIONAL_BILLING_ADDRESSES = ADDITIONAL_BILLING_ADDRESSES %]
263 336

  
264 337
  <a name="contact[% loop.count %]"><h1>[% 'Contact Person' | $T8 %] &quot;[% HTML.escape(row.cp_name) %]&quot;</h1></a>
265 338

  
templates/webpages/do/form_header.html
169 169
         </td>
170 170
        </tr>
171 171

  
172
        [%- IF (vc == 'customer') && VC_OBJ.additional_billing_addresses.as_list.size %]
173
        <tr>
174
          <th align="right">[% 'Custom Billing Address' | $T8 %]</th>
175
          <td>
176
            [% L.select_tag('billing_address_id', VC_OBJ.additional_billing_addresses,
177
                            with_empty=1, default=billing_address_id, value_key='id', title_key='displayable_id', style='width: 250px') %]
178
          </td>
179
        </tr>
180
        [%- END %]
181

  
172 182
        [%- IF business %]
173 183
        <tr>
174 184
         <th align="right">[% IF is_customer %][% 'Customer type' | $T8 %][% ELSE %][% 'Vendor type' | $T8 %][% END %]</th>
templates/webpages/is/form_header.html
79 79
           [% L.button_tag("kivi.SalesPurchase.edit_custom_shipto()", LxERP.t8("Custom shipto")) %]
80 80
          </td>
81 81
        </tr>
82

  
83
[%- IF customer_obj.additional_billing_addresses.as_list.size %]
84
        <tr>
85
          <th align="right">[% 'Custom Billing Address' | $T8 %]</th>
86
          <td>
87
            [% L.select_tag('billing_address_id', customer_obj.additional_billing_addresses,
88
                            with_empty=1, default=billing_address_id, value_key='id', title_key='displayable_id', style='width: 250px') %]
89
          </td>
90
        </tr>
91
[%- END %]
92

  
82 93
        <tr>
83 94
          <td align="right">[% 'Credit Limit' | $T8 %]</td>
84 95
          <td>
templates/webpages/oe/form_header.html
83 83
                      [% L.button_tag("kivi.SalesPurchase.edit_custom_shipto()", LxERP.t8("Custom shipto")) %]
84 84
                    </td>
85 85
                  </tr>
86

  
87
[%- IF is_sales && vc_obj.additional_billing_addresses.as_list.size %]
88
                  <tr>
89
                    <th align="right">[% 'Custom Billing Address' | $T8 %]</th>
90
                    <td>
91
                      [% L.select_tag('billing_address_id', vc_obj.additional_billing_addresses,
92
                                      with_empty=1, default=billing_address_id, value_key='id', title_key='displayable_id', style='width: 250px') %]
93
                    </td>
94
                  </tr>
95
[%- END %]
96

  
86 97
[%- IF is_order %]
87 98
                  <tr>
88 99
                    <td align="right">[% 'Credit Limit' | $T8 %]</td>
templates/webpages/order/tabs/basic_data.html
51 51
            </td>
52 52
          </tr>
53 53

  
54
          [%- IF SELF.cv == "customer" %]
55
          <tr id="billing_address_row"[% IF !SELF.order.customer.additional_billing_addresses.as_list.size %] style="display:none"[% END %]>
56
            <th align="right">[% 'Custom Billing Address' | $T8 %]</th>
57
            <td>
58
              [% L.select_tag('order.billing_address_id',
59
                               SELF.order.customer.additional_billing_addresses,
60
                               default=SELF.order.billing_address_id,
61
                               title_key='displayable_id',
62
                               value_key='id',
63
                               with_empty=1,
64
                               style='width: 300px') %]
65
            </td>
66
          </tr>
67
          [%- END %]
68

  
54 69
          [%- PROCESS order/tabs/_business_info_row.html SELF=SELF %]
55 70

  
56 71
          <tr>

Auch abrufbar als: Unified diff