ActionBar: nicht mehr benötigte Lieferadressenmaske entfernt
authorMoritz Bunkus <m.bunkus@linet-services.de>
Fri, 6 Jan 2017 09:30:25 +0000 (10:30 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 28 Feb 2017 09:43:58 +0000 (10:43 +0100)
bin/mozilla/io.pl
locale/de/all
templates/webpages/io/ship_to.html [deleted file]

index 86813c9..a716f16 100644 (file)
@@ -1702,45 +1702,6 @@ sub post_as_new {
   $main::lxdebug->leave_sub();
 }
 
-sub ship_to {
-  $main::lxdebug->enter_sub();
-
-  _check_io_auth();
-
-  $::form->{print_and_post} = 0 if $::form->{second_run};
-
-  map { $::form->{$_} = $::form->parse_amount(\%::myconfig, $::form->{$_}) } qw(exchangerate creditlimit creditremaining);
-
-  # get details for customer/vendor
-  call_sub($::form->{vc} . "_details", qw(name department_1 department_2 street zipcode city country gln contact email phone fax), $::form->{vc} . "number");
-  $::form->{rowcount}--;
-
-  my $cvars         = SL::DB::Shipto->new->cvars_by_config;
-  my @shipto_vars   = qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptogln
-                         shiptocontact shiptocp_gender shiptophone shiptofax shiptoemail
-                         shiptodepartment_1 shiptodepartment_2);
-  my $previous_form = $::auth->save_form_in_session(skip_keys => [ @shipto_vars, qw(header shipto_id), map { "shiptocvar_" . $_->config->name } @{ $cvars } ]);
-  $::form->{title}  = $::locale->text('Ship to');
-  $::form->header;
-
-  my $vc_obj = ($::form->{vc} eq 'customer' ? "SL::DB::Customer" : "SL::DB::Vendor")->new(id => $::form->{$::form->{vc} . "_id"})->load;
-
-  $_->value($::form->{"shiptocvar_" . $_->config->name}) for @{ $cvars };
-
-  print $::form->parse_html_template('io/ship_to', { previousform => $previous_form,
-                                                     nextsub      => $::form->{display_form} || 'display_form',
-                                                     vc_obj       => $vc_obj,
-                                                     cvars        => $cvars,
-                                                   });
-
-  $main::lxdebug->leave_sub();
-}
-
-sub ship_to_entered {
-  $::auth->restore_form_from_session(delete $::form->{previousform});
-  call_sub($::form->{nextsub});
-}
-
 sub relink_accounts {
   $main::lxdebug->enter_sub();
 
index 9c90418..49c08b9 100755 (executable)
@@ -2615,7 +2615,6 @@ $self->{texts} = {
   'Set to paid missing'         => 'Fehlbetrag setzen',
   'Settings'                    => 'Einstellungen',
   'Setup Menu'                  => 'Menü-Variante',
-  'Ship to'                     => 'Lieferadresse',
   'Ship to (database ID)'       => 'Lieferadresse (Datenbank-ID)',
   'Ship via'                    => 'Transportmittel',
   'Shipping Address'            => 'Lieferadresse',
diff --git a/templates/webpages/io/ship_to.html b/templates/webpages/io/ship_to.html
deleted file mode 100644 (file)
index e3e6500..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-[% USE HTML %][% USE L %][% USE LxERP %][%- USE JavaScript -%]
-
-<script type="text/javascript">
-  var addresses = [
-    { shiptoname:         "[% JavaScript.escape(vc_obj.name) %]",
-      shiptodepartment_1: "[% JavaScript.escape(vc_obj.department_1) %]",
-      shiptodepartment_2: "[% JavaScript.escape(vc_obj.department_2) %]",
-      shiptostreet:       "[% JavaScript.escape(vc_obj.street) %]",
-      shiptozipcode:      "[% JavaScript.escape(vc_obj.zipcode) %]",
-      shiptocity:         "[% JavaScript.escape(vc_obj.city) %]",
-      shiptocountry:      "[% JavaScript.escape(vc_obj.country) %]",
-      shiptogln:          "[% JavaScript.escape(vc_obj.gln) %]",
-      shiptocontact:      "[% JavaScript.escape(vc_obj.contact) %]",
-      shiptocp_gender:    "[% JavaScript.escape(vc_obj.cp_gender) %]",
-      shiptophone:        "[% JavaScript.escape(vc_obj.phone) %]",
-      shiptofax:          "[% JavaScript.escape(vc_obj.fax) %]",
-      shiptoemail:        "[% JavaScript.escape(vc_obj.email) %]"
-[% FOREACH var = cvars %]
-      , "shiptocvar_[% JavaScript.escape(var.config.name) %]": ""
-[% END %]
-    }
-
-  [% FOREACH shipto = vc_obj.shipto %]
-    ,
-    { shiptoname:         "[% JavaScript.escape(shipto.shiptoname) %]",
-      shiptodepartment_1: "[% JavaScript.escape(shipto.shiptodepartment_1) %]",
-      shiptodepartment_2: "[% JavaScript.escape(shipto.shiptodepartment_2) %]",
-      shiptostreet:       "[% JavaScript.escape(shipto.shiptostreet) %]",
-      shiptozipcode:      "[% JavaScript.escape(shipto.shiptozipcode) %]",
-      shiptocity:         "[% JavaScript.escape(shipto.shiptocity) %]",
-      shiptocountry:      "[% JavaScript.escape(shipto.shiptocountry) %]",
-      shiptogln:          "[% JavaScript.escape(shipto.shiptogln) %]",
-      shiptocontact:      "[% JavaScript.escape(shipto.shiptocontact) %]",
-      shiptocp_gender:    "[% JavaScript.escape(shipto.shiptocp_gender) %]",
-      shiptophone:        "[% JavaScript.escape(shipto.shiptophone) %]",
-      shiptofax:          "[% JavaScript.escape(shipto.shiptofax) %]",
-      shiptoemail:        "[% JavaScript.escape(shipto.shiptoemail) %]"
-    [% FOREACH var = shipto.cvars_by_config %]
-      , "shiptocvar_[% JavaScript.escape(var.config.name) %]": "[% JavaScript.escape(var.value_as_text) %]"
-    [% END %]
-    }
-  [% END %]
-  ];
-
-  function copy_address() {
-    var shipto = addresses[ $('#shipto_to_copy').val() ];
-    for (key in shipto)
-      $('#' + key).val(shipto[key]);
-  }
-
-  function clear_fields() {
-    var shipto = addresses[0];
-    for (key in shipto)
-      $('#' + key).val('');
-    $('#shiptocp_gender').val('m');
-  }
-
-  function clear_shipto_id_before_submit() {
-    var shipto = addresses[0];
-    for (key in shipto)
-      if ((key != 'shiptocp_gender') && ($('#' + key).val() != '')) {
-        $('#shipto_id').val('');
-        break;
-      }
-
-    $('form').submit();
-  }
-</script>
-
-[% select_options = [ [ 0, LxERP.t8("Billing Address") ] ] ;
-   FOREACH shipto = vc_obj.shipto ;
-     tmpcity  = shipto.shiptozipcode _ ' ' _ shipto.shiptocity ;
-     tmptitle = [ shipto.shiptoname, shipto.shiptostreet, tmpcity ] ;
-     CALL select_options.import([ [ loop.count, tmptitle.grep('\S').join("; ") ] ]) ;
-   END ;
-   '' %]
-
- <form method="post" action="[% HTML.escape(script) %]">
-  [% L.hidden_tag("shipto_id", shipto_id) %]
-
-  <p>
-   [% LxERP.t8("Copy address from master data") %]:
-   [% L.select_tag("", select_options, id="shipto_to_copy", style="width: 400px") %]
-   [% L.button_tag("copy_address()", LxERP.t8("Copy")) %]
-   [% L.button_tag("clear_fields()", LxERP.t8("Clear fields")) %]
-  </p>
-
-  <table>
-   <tr class="listheading">
-    <th colspan="2" width="50%">[% LxERP.t8('Billing Address') %]</th>
-    <th width="50%">[% LxERP.t8('Shipping Address') %]</th>
-   </tr>
-   <tr height="5"></tr>
-   <tr>
-    <th align="right" nowrap>[%- IF vc == "customer" %][%- LxERP.t8('Customer Number') %][%- ELSE %][%- LxERP.t8('Vendor Number') %][%- END %]</th>
-    <td>[%- IF vc == "customer" %][%- HTML.escape(customernumber) %][%- ELSE %][%- HTML.escape(vendornumber) %][%- END %]</td>
-   </tr>
-   <tr>
-    <th align="right" nowrap>[% LxERP.t8('Company Name') %]</th>
-    <td>[% HTML.escape(name) %]</td>
-    <td>[% L.input_tag("shiptoname", shiptoname, "size", "35") %]</td>
-   </tr>
-   <tr>
-    <th align="right" nowrap>[% LxERP.t8('Department') %]</th>
-    <td>[% HTML.escape(department_1) %]</td>
-    <td>[% L.input_tag("shiptodepartment_1", shiptodepartment_1, "size", "35") %]</td>
-   </tr>
-   <tr>
-    <th align="right" nowrap>&nbsp;</th>
-    <td>[% HTML.escape(department_2) %]</td>
-    <td>[% L.input_tag("shiptodepartment_2", shiptodepartment_2, "size", "35") %]</td>
-   </tr>
-   <tr>
-    <th align="right" nowrap>[% LxERP.t8('Street') %]</th>
-    <td>[% HTML.escape(street) %]</td>
-    <td>[% L.input_tag("shiptostreet", shiptostreet, "size", "35") %]</td>
-   </tr>
-   <tr>
-    <th align="right" nowrap>[% LxERP.t8('Zipcode') %]</th>
-    <td>[% HTML.escape(zipcode) %]</td>
-    <td>[% L.input_tag("shiptozipcode", shiptozipcode, "size", "35") %]</td>
-   </tr>
-   <tr>
-    <th align="right" nowrap>[% LxERP.t8('City') %]</th>
-    <td>[% HTML.escape(city) %]</td>
-    <td>[% L.input_tag("shiptocity", shiptocity, "size", "35") %]</td>
-   </tr>
-   <tr>
-    <th align="right" nowrap>[% LxERP.t8('Country') %]</th>
-    <td>[% HTML.escape(country) %]</td>
-    <td>[% L.input_tag("shiptocountry", shiptocountry, "size", "35") %]</td>
-   </tr>
-   <tr>
-    <th align="right" nowrap>[% LxERP.t8('GLN') %]</th>
-    <td>[% HTML.escape(gln) %]</td>
-    <td>[% L.input_tag("shiptogln", shiptogln, "size", "35") %]</td>
-   </tr>
-   <tr>
-    <th align="right" nowrap>[% LxERP.t8('Contact') %]</th>
-    <td>[% HTML.escape(contact) %]</td>
-    <td>[% L.input_tag("shiptocontact", shiptocontact, "size", "35") %]</td>
-   </tr>
-   <tr>
-    <th align="right" nowrap>[% LxERP.t8('Gender') %]</th>
-    <td></td>
-    <td>
-     [% L.select_tag('shiptocp_gender', [ [ 'm', LxERP.t8('male') ], [ 'f', LxERP.t8('female') ] ], 'default' = shiptocp_gender) %]
-    </td>
-   </tr>
-   <tr>
-    <th align="right" nowrap>[% LxERP.t8('Phone') %]</th>
-    <td>[% HTML.escape(phone) %]</td>
-    <td>[% L.input_tag("shiptophone", shiptophone, "size", "35") %]</td>
-   </tr>
-   <tr>
-    <th align="right" nowrap>[% LxERP.t8('Fax') %]</th>
-    <td>[% HTML.escape(fax) %]</td>
-    <td>[% L.input_tag("shiptofax", shiptofax, "size", "35") %]</td>
-   </tr>
-   <tr>
-    <th align="right" nowrap>[% LxERP.t8('E-mail') %]</th>
-    <td>[% HTML.escape(email) %]</td>
-    <td>[% L.input_tag("shiptoemail", shiptoemail, "size", "35") %]</td>
-   </tr>
-[% FOREACH var = cvars %]
-   <tr valign="top">
-    <th align="right" nowrap>[% HTML.escape(var.config.description) %]</th>
-    <td></td>
-    <td>[% INCLUDE 'common/render_cvar_input.html' cvar_name_prefix='shiptocvar_' %]</td>
-   </tr>
-[% END %]
-  </table>
-
-  <hr size="3" noshade>
-
-  [% L.hidden_tag("action", "ship_to_entered") %]
-  [% L.hidden_tag("nextsub", nextsub) %]
-  [% L.hidden_tag("previousform", previousform) %]
-
-  [% L.button_tag("clear_shipto_id_before_submit()", LxERP.t8("Continue")) %]
- </form>