Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp
authorJan Büren <jan@lx-office-hosting.de>
Thu, 4 Mar 2010 15:51:06 +0000 (16:51 +0100)
committerJan Büren <jan@lx-office-hosting.de>
Thu, 4 Mar 2010 15:51:06 +0000 (16:51 +0100)
22 files changed:
SL/AM.pm
SL/ARAP.pm
SL/CVar.pm
SL/Form.pm
SL/IC.pm
SL/IS.pm
bin/mozilla/am.pl
bin/mozilla/ct.pl
bin/mozilla/do.pl
bin/mozilla/ic.pl
bin/mozilla/oe.pl
doc/changelog
locale/de/all
locale/de/am
locale/de/ic
menu.ini
templates/webpages/ct/form_header_de.html
templates/webpages/ct/form_header_master.html
templates/webpages/dbupgrade/warehouse_form_de.html
templates/webpages/dbupgrade/warehouse_form_master.html
templates/webpages/ic/search_de.html
templates/webpages/ic/search_master.html

index 11b32ca..1dbf9d8 100644 (file)
--- a/SL/AM.pm
+++ b/SL/AM.pm
@@ -647,7 +647,7 @@ sub business {
   # connect to database
   my $dbh = $form->dbconnect($myconfig);
 
-  my $query = qq|SELECT id, description, discount, customernumberinit
+  my $query = qq|SELECT id, description, discount, customernumberinit, salesman
                  FROM business
                  ORDER BY 2|;
 
@@ -673,7 +673,7 @@ sub get_business {
   my $dbh = $form->dbconnect($myconfig);
 
   my $query =
-    qq|SELECT b.description, b.discount, b.customernumberinit
+    qq|SELECT b.description, b.discount, b.customernumberinit, b.salesman
        FROM business b
        WHERE b.id = ?|;
   my $sth = $dbh->prepare($query);
@@ -699,20 +699,20 @@ sub save_business {
   # connect to database
   my $dbh = $form->dbconnect($myconfig);
 
-  my @values = ($form->{description}, $form->{discount},
-                $form->{customernumberinit});
+  my @values = ($form->{description}, $form->{discount}, $form->{customernumberinit}, $form->{salesman} ? 't' : 'f');
   # id is the old record
   if ($form->{id}) {
     $query = qq|UPDATE business SET
                 description = ?,
                 discount = ?,
-                customernumberinit = ?
+                customernumberinit = ?,
+                salesman = ?
                 WHERE id = ?|;
     push(@values, $form->{id});
   } else {
     $query = qq|INSERT INTO business
-                (description, discount, customernumberinit)
-                VALUES (?, ?, ?)|;
+                (description, discount, customernumberinit, salesman)
+                VALUES (?, ?, ?, ?)|;
   }
   do_query($form, $dbh, $query, @values);
 
index 6b75114..dd2bd8e 100644 (file)
@@ -51,12 +51,10 @@ sub close_orders_if_billed {
 
   my @oe_ids = keys %oe_id_map;
 
-#   $main::lxdebug->dump(0, "oe_ids", \@oe_ids);
-
   # No orders found? Nothing to do then, so let's return.
-  return $main::lxdebug->leave_sub() if (!scalar @oe_ids);
+  return $main::lxdebug->leave_sub unless @oe_ids;
 
-  my $all_units = AM->retrieve_all_units();
+  my $all_units = AM->retrieve_all_units;
 
   my $qtyfactor = $params{table} eq 'ap' ? '* -1' : '';
   my $q_billed  = qq|SELECT i.parts_id, i.qty ${qtyfactor} AS qty, i.unit, p.unit AS partunit
@@ -101,8 +99,6 @@ sub close_orders_if_billed {
 
     my @arap_ids = keys %arap_id_map;
 
-#     $main::lxdebug->dump(0, "for $oe_id arap_ids", \@arap_ids);
-
     next if (!scalar @arap_ids);
 
     # Retrieve all positions for this order. Calculate the ordered quantity for each position.
@@ -111,7 +107,7 @@ sub close_orders_if_billed {
     do_statement($form, $h_ordered, $q_ordered, $oe_id);
 
     while (my $ref = $h_ordered->fetchrow_hashref()) {
-      $ref->{baseqty} = $ref->{qty} * $all_units->{$ref->{unit}}->{factor} / $all_units->{$ref->{partunit}}->{factor};
+      $ref->{baseqty} = $ref->{qty} * AM->convert_unit($ref->{unit}, $ref->{partunit}, $all_units);
 
       if ($ordered{$ref->{parts_id}}) {
         $ordered{$ref->{parts_id}}->{baseqty} += $ref->{baseqty};
@@ -127,7 +123,7 @@ sub close_orders_if_billed {
       do_statement($form, $h_billed, $q_billed, $arap_id);
 
       while (my $ref = $h_billed->fetchrow_hashref()) {
-        $ref->{baseqty} = $ref->{qty} * $all_units->{$ref->{unit}}->{factor} / $all_units->{$ref->{partunit}}->{factor};
+        $ref->{baseqty} = $ref->{qty} * AM->convert_unit($ref->{unit}, $ref->{partunit}, $all_units);
 
         if ($billed{$ref->{parts_id}}) {
           $billed{$ref->{parts_id}}->{baseqty} += $ref->{baseqty};
@@ -146,22 +142,18 @@ sub close_orders_if_billed {
       }
     }
 
-#     $main::lxdebug->message(0, "all_billed $all_billed");
-#     $main::lxdebug->dump(0, "ordered", \%ordered);
-#     $main::lxdebug->dump(0, "billed", \%billed);
-
     push @close_oe_ids, $oe_id if ($all_billed);
   }
 
-  $h_billed->finish();
-  $h_ordered->finish();
+  $h_billed->finish;
+  $h_ordered->finish;
 
   # Close orders that have been billed fully.
   if (scalar @close_oe_ids) {
     my $query = qq|UPDATE oe SET closed = TRUE WHERE id IN (| . join(', ', ('?') x scalar @close_oe_ids) . qq|)|;
     do_query($form, $dbh, $query, @close_oe_ids);
 
-    $dbh->commit() unless ($params{dbh});
+    $dbh->commit unless $params{dbh};
   }
 
   $main::lxdebug->leave_sub();
index 4d9b6a7..cdc05b5 100644 (file)
@@ -490,8 +490,7 @@ sub build_filter_query {
     }
 
     if (@sub_where) {
-      push @sub_where,  qq|cvar.sub_module = ?|;
-      push @sub_values, "$params{sub_module}";
+      add_token(\@sub_where, \@sub_values, col => 'cvar.sub_module', val => $params{sub_module} || '');
 
       push @where,
         qq|$not EXISTS(
index e020724..8d17720 100644 (file)
@@ -203,7 +203,10 @@ sub _recode_recursively {
   if (any { ref $param eq $_ } qw(Form HASH)) {
     foreach my $key (keys %{ $param }) {
       if (!ref $param->{$key}) {
-        $param->{$key} = $iconv->convert($param->{$key});
+        # Workaround for a bug: converting $param->{$key} directly
+        # leads to 'undef'. I don't know why. Converting a copy works,
+        # though.
+        $param->{$key} = $iconv->convert("" . $param->{$key});
       } else {
         _recode_recursively($iconv, $param->{$key});
       }
@@ -212,7 +215,10 @@ sub _recode_recursively {
   } elsif (ref $param eq 'ARRAY') {
     foreach my $idx (0 .. scalar(@{ $param }) - 1) {
       if (!ref $param->[$idx]) {
-        $param->[$idx] = $iconv->convert($param->[$idx]);
+        # Workaround for a bug: converting $param->[$idx] directly
+        # leads to 'undef'. I don't know why. Converting a copy works,
+        # though.
+        $param->[$idx] = $iconv->convert("" . $param->[$idx]);
       } else {
         _recode_recursively($iconv, $param->[$idx]);
       }
@@ -1120,13 +1126,13 @@ sub round_amount {
   my ($self, $amount, $places) = @_;
   my $round_amount;
 
-  # Rounding like "Kaufmannsrunden"
-  # Descr. http://de.wikipedia.org/wiki/Rundung
-  # Inspired by
-  # http://www.perl.com/doc/FAQs/FAQ/oldfaq-html/Q4.13.html
-  # Solves Bug: 189
-  # Udo Spallek
-  $amount = $amount * (10**($places));
+  # Rounding like "Kaufmannsrunden" (see http://de.wikipedia.org/wiki/Rundung )
+
+  # Round amounts to eight places before rounding to the requested
+  # number of places. This gets rid of errors due to internal floating
+  # point representation.
+  $amount       = $self->round_amount($amount, 8) if $places < 8;
+  $amount       = $amount * (10**($places));
   $round_amount = int($amount + .5 * ($amount <=> 0)) / (10**($places));
 
   $main::lxdebug->leave_sub(2);
@@ -2293,14 +2299,15 @@ $main::lxdebug->enter_sub();
 sub _get_customers {
   $main::lxdebug->enter_sub();
 
-  my ($self, $dbh, $key, $limit) = @_;
-
-  $key = "all_customers" unless ($key);
-  my $limit_clause = "LIMIT $limit" if $limit;
+  my ($self, $dbh, $key) = @_;
 
-  my $query = qq|SELECT * FROM customer WHERE NOT obsolete ORDER BY name $limit_clause|;
+  my $options        = ref $key eq 'HASH' ? $key : { key => $key };
+  $options->{key}  ||= "all_customers";
+  my $limit_clause   = "LIMIT $options->{limit}" if $options->{limit};
+  my $where          = $options->{business_is_salesman} ? qq| AND business_id IN (SELECT id FROM business WHERE salesman)| : '';
 
-  $self->{$key} = selectall_hashref_query($self, $dbh, $query);
+  my $query = qq|SELECT * FROM customer WHERE NOT obsolete $where ORDER BY name $limit_clause|;
+  $self->{ $options->{key} } = selectall_hashref_query($self, $dbh, $query);
 
   $main::lxdebug->leave_sub();
 }
@@ -2467,11 +2474,7 @@ sub get_lists {
   }
 
   if($params{"customers"}) {
-    if (ref $params{"customers"} eq 'HASH') {
-      $self->_get_customers($dbh, $params{"customers"}{key}, $params{"customers"}{limit});
-    } else {
-      $self->_get_customers($dbh, $params{"customers"});
-    }
+    $self->_get_customers($dbh, $params{"customers"});
   }
 
   if($params{"vendors"}) {
index 080aedf..30aa8cf 100644 (file)
--- a/SL/IC.pm
+++ b/SL/IC.pm
@@ -35,7 +35,7 @@
 package IC;
 
 use Data::Dumper;
-use List::MoreUtils qw(all any);
+use List::MoreUtils qw(all any uniq);
 use YAML;
 
 use SL::CVar;
@@ -985,7 +985,7 @@ sub all_parts {
 
   # now the master trick: soldtotal.
   if ($form->{l_soldtotal}) {
-    push @where_tokens, 'ioi.qty >= 0';
+    push @where_tokens, 'NOT ioi.qty = 0';
     push @group_tokens, @select_tokens;
      map { s/.*\sAS\s+//si } @group_tokens;
     push @select_tokens, 'SUM(ioi.qty)';
@@ -1005,9 +1005,23 @@ sub all_parts {
   my $where_clause  = join ' AND ', map { "($_)" } @where_tokens;
   my $group_clause  = ' GROUP BY ' . join ', ',    map { $token_builder->($_) } @group_tokens if scalar @group_tokens;
 
-  my ($cvar_where, @cvar_values) = CVar->build_filter_query('module'         => 'IC',
-                                                            'trans_id_field' => 'p.id',
-                                                            'filter'         => $form);
+  my %oe_flag_to_cvar = (
+    bought   => 'invoice',
+    sold     => 'invoice',
+    onorder  => 'orderitems',
+    ordered  => 'orderitems',
+    rfq      => 'orderitems',
+    quoted   => 'orderitems',
+  );
+
+  my ($cvar_where, @cvar_values) = CVar->build_filter_query(
+    module         => 'IC',
+    trans_id_field => $bsooqr ? 'ioi.id': 'p.id',
+    filter         => $form,
+    sub_module     => $bsooqr ? [ uniq grep { $oe_flag_to_cvar{$form->{$_}} } @oe_flags ] : undef,
+  );
+
+  $::lxdebug->dump(0,  "\@cvar_val", \@cvar_values);
 
   if ($cvar_where) {
     $where_clause .= qq| AND ($cvar_where)|;
index 6bf6aaf..7f49201 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -198,7 +198,7 @@ sub invoice_details {
       push @{ $form->{TEMPLATE_ARRAYS}->{longdescription} },   $form->{"longdescription_$i"};
       push @{ $form->{TEMPLATE_ARRAYS}->{qty} },               $form->format_amount($myconfig, $form->{"qty_$i"});
       push @{ $form->{TEMPLATE_ARRAYS}->{unit} },              $form->{"unit_$i"};
-      push @{ $form->{TEMPLATE_ARRAYS}->{deliverydate_oe} },   $form->{"deliverydate_$i"};
+      push @{ $form->{TEMPLATE_ARRAYS}->{deliverydate_oe} },   $form->{"reqdate_$i"};
       push @{ $form->{TEMPLATE_ARRAYS}->{sellprice} },         $form->{"sellprice_$i"};
       push @{ $form->{TEMPLATE_ARRAYS}->{ordnumber_oe} },      $form->{"ordnumber_$i"};
       push @{ $form->{TEMPLATE_ARRAYS}->{transdate_oe} },      $form->{"transdate_$i"};
index 3cb5ac3..fe9199e 100644 (file)
@@ -1107,6 +1107,7 @@ sub list_business {
   $form->{title} = $locale->text('Type of Business');
 
   my @column_index = qw(description discount customernumberinit);
+  push @column_index, 'salesman' if $::vertreter;
   my %column_header;
   $column_header{description} =
       qq|<th class=listheading width=60%>|
@@ -1120,6 +1121,10 @@ sub list_business {
       qq|<th class=listheading>|
     . $locale->text('Customernumberinit')
     . qq|</th>|;
+  $column_header{salesman} =
+      qq|<th class=listheading>|
+    . $locale->text('Representative')
+    . qq|</th>|;
 
   $form->header;
 
@@ -1159,6 +1164,7 @@ sub list_business {
     $column_data{discount}           = qq|<td align=right>$discount</td>|;
     $column_data{customernumberinit} =
       qq|<td align=right>$ref->{customernumberinit}</td>|;
+    $column_data{salesman} = '<td>' . ($ref->{salesman} ? $::locale->text('Yes') : $::locale->text('No')) . '</td>';
 
     map { print "$column_data{$_}\n" } @column_index;
 
@@ -1213,6 +1219,18 @@ sub business_header {
   $form->{discount} =
     $form->format_amount(\%myconfig, $form->{discount} * 100);
 
+  my $salesman_code;
+  if ($::vertreter) {
+    $salesman_code = qq|
+  <tr>
+    <th align="right">| . $locale->text('Representative') . qq|</th>
+    <td>| . $::cgi->checkbox(-name => "salesman", -value => 1, -label => '', 'checked' => $form->{salesman} ? 1 : 0) . qq|</td>
+  </tr>
+|;
+  } else {
+    $salesman_code = $::cgi->hidden(-name => 'salesman', -value => $form->{salesman} ? 1 : 0);
+  }
+
   $form->header;
 
   print qq|
@@ -1240,6 +1258,7 @@ sub business_header {
     <th align=right>| . $locale->text('Customernumberinit') . qq|</th>
     <td><input name=customernumberinit size=10 value=$form->{customernumberinit}></td>
   </tr>
+$salesman_code
   <td colspan=2><hr size=3 noshade></td>
   </tr>
 </table>
index c2d3b90..7fe6afa 100644 (file)
@@ -285,11 +285,12 @@ sub form_header {
   my %myconfig = %main::myconfig;
   my $locale   = $main::locale;
 
-  $form->get_lists(employees      => "ALL_EMPLOYEES",
-                   taxzones       => "ALL_TAXZONES",
-                   business_types => { key => 'ALL_SALESMAN_BUSINESSES', salesman => 1 });
+  $form->get_lists(employees => "ALL_EMPLOYEES",
+                   taxzones  => "ALL_TAXZONES");
   $form->get_pricegroup(\%myconfig, { all => 1 });
 
+  $form->get_lists(customers => { key => "ALL_SALESMAN_CUSTOMERS", business_is_salesman => 1 }) if $::vertreter;
+
   $form->{ALL_SALESMEN}   = $form->{ALL_EMPLOYEES};
   $form->{taxincluded}    = ($form->{taxincluded}) ? "checked" : "";
   $form->{is_admin}       = $myconfig{role} eq 'admin';
index fa3be49..63ee667 100644 (file)
@@ -872,6 +872,7 @@ sub save_as_new {
   $form->{closed}    = 0;
   $form->{delivered} = 0;
   map { delete $form->{$_} } qw(printed emailed queued);
+  delete @{ $form }{ grep { m/^stock_(?:in|out)_\d+/ } keys %{ $form } };
 
   # Let Lx-Office assign a new order number if the user hasn't changed the
   # previous one. If it has been changed manually then use it as-is.
index add1895..b29daa6 100644 (file)
@@ -1124,12 +1124,7 @@ sub generate_report {
   if ($form->{l_linetotal}) {
     $form->{l_onhand} = "Y";
     $form->{l_linetotalsellprice} = "Y" if $form->{l_sellprice};
-    if ($form->{l_lastcost}) {
-      $form->{l_linetotallastcost} = "Y";
-      if (($form->{searchitems} eq 'assembly') && !$form->{bom}) {
-        $form->{l_linetotallastcost} = "";
-      }
-    }
+    $form->{l_linetotallastcost}  = $form->{searchitems} eq 'assembly' && !$form->{bom} ? "" : 'Y' if  $form->{l_lastcost};
     $form->{l_linetotallistprice} = "Y" if $form->{l_listprice};
   }
 
@@ -1156,9 +1151,12 @@ sub generate_report {
 
   IC->all_parts(\%myconfig, \%$form);
 
-  my @columns =
-    qw(partnumber description partsgroup bin onhand rop unit listprice linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost
-       priceupdate weight image drawing microfiche invnumber ordnumber quonumber name serialnumber soldtotal deliverydate);
+  my @columns = qw(
+    partnumber description partsgroup bin onhand rop unit listprice
+    linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost
+    priceupdate weight image drawing microfiche invnumber ordnumber quonumber
+    transdate name serialnumber soldtotal deliverydate
+  );
 
   my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs };
   my @searchable_custom_variables  = grep { $_->{searchable} }  @{ $cvar_configs };
@@ -1190,6 +1188,7 @@ sub generate_report {
     'sellprice'          => { 'text' => $locale->text('Sell Price'), },
     'serialnumber'       => { 'text' => $locale->text('Serial Number'), },
     'soldtotal'          => { 'text' => $locale->text('soldtotal'), },
+    'transdate'          => { 'text' => $locale->text('Transdate'), },
     'unit'               => { 'text' => $locale->text('Unit'), },
     'weight'             => { 'text' => $locale->text('Weight'), },
     %column_defs_cvars,
index 8883096..cdc8ac2 100644 (file)
@@ -518,12 +518,8 @@ sub update {
   map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate) unless $recursive_call;
   $form->{update} = 1;
 
-  my $payment_id = $form->{payment_id} if $form->{payment_id};
-
   &check_name($form->{vc});
 
-  $form->{payment_id} = $payment_id if $form->{payment_id} eq "";
-
   my $buysell           = 'buy';
   $buysell              = 'sell' if ($form->{vc} eq 'vendor');
   $form->{forex}        = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{transdate}, $buysell);
index 1b43c31..6c72981 100644 (file)
     Verkauf gibt es jetzt einen Haken, um die Eigenschaft: "Nur die eigenen Verkaufs-
     dokumente (exklusive Mahnungen) bearbeiten/einzusehen" entsprechend
     zu setzen.
+ - Wird ein Kunde in einem Auftrag geändert, so werden jetzt die dem Kunden
+   zugeordneten Zahlungskonditionen korrekt geladen, wenn der Kunde keine
+   Zahlungsonditionen zugeordnet hatte, wird auch auf keine Zahlungskondition
+   gewechselt.
 
 
 
 
   Liste gefixter Bugs aus dem Bugtracker:
 
-  922 940 1017 1024 1025 1028 1030 1031 1034 1035 1036 1037 1040 1043
-  1044 1046 1051 1055 1057 1058 1072 1073 1077 1079 1081 1082 1095 1098
-  1100 1101 1108 1110 1118 1125 1127 1130 1133 1135 1136 1138 1144
-  1146 1147 1150 1151 1155 1164 1173 1177 1186 1188 1190 1191 1195
-  1197 1198 1199 1200 1201 1250 1289
+  922 940 1017 1024 1025 1028 1030 1031 1034 1035 1036 1037 1040 1043 1044 1046
+  1051 1055 1057 1058 1072 1073 1077 1079 1081 1082 1095 1098 1100 1101 1108
+  1110 1118 1125 1127 1130 1133 1135 1136 1138 1144 1146 1147 1150 1151 1155
+  1164 1173 1177 1186 1188 1190 1191 1195 1197 1198 1199 1200 1201 1209 1213
+  1243 1248 1250 1262 1286 1287 1289
 
 
 2009-06-02 - Version 2.6.0
index 78cd726..dcbea15 100644 (file)
@@ -1705,6 +1705,7 @@ $self->{texts} = {
   'Transaction has been split on both the credit and the debit side' => 'Sowohl auf der Soll- als auch auf der Haben-Seite gesplittete Buchung',
   'Transaction posted!'         => 'Buchung verbucht!',
   'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
+  'Transdate'                   => 'Belegdatum',
   'Transfer'                    => 'Umlagern',
   'Transfer Quantity'           => 'Umlagermenge',
   'Transfer To Stock'           => 'Lagereingang',
@@ -1797,7 +1798,7 @@ $self->{texts} = {
   'WHJournal'                   => 'Lagerbuchungen',
   'Warehouse'                   => 'Lager',
   'Warehouse From'              => 'Quelllager',
-  'Warehouse MIgration'         => 'Lagermigration',
+  'Warehouse Migration'         => 'Lagermigration',
   'Warehouse To'                => 'Ziellager',
   'Warehouse content'           => 'Lagerbestand',
   'Warehouse deleted.'          => 'Lager gel&ouml;scht.',
index 179517e..b395a0c 100644 (file)
@@ -250,6 +250,7 @@ $self->{texts} = {
   'Ranges of numbers and default accounts' => 'Nummernkreise und Standardkonten',
   'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich',
   'Reports'                     => 'Berichte',
+  'Representative'              => 'Vertreter',
   'Revenue'                     => 'Erlöskonto',
   'Revenues EU with UStId'      => 'Erl&ouml;se EU m. UStId',
   'Revenues EU without UStId'   => 'Erl&ouml;se EU o. UStId',
index 4bfb78a..7fa3437 100644 (file)
@@ -287,6 +287,7 @@ $self->{texts} = {
   'Top 100'                     => 'Top 100',
   'Top 100 hinzufuegen'         => 'Top 100 hinzufügen',
   'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
+  'Transdate'                   => 'Belegdatum',
   'Transfer To Stock'           => 'Lagereingang',
   'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
   'Unit'                        => 'Einheit',
index da02702..e1feedf 100644 (file)
--- a/menu.ini
+++ b/menu.ini
@@ -255,7 +255,7 @@ target=acc_menu
 submenu=1
 
 [Warehouse--Reports--Warehouse content]
-ACCESS=warehouse_content | warehouse_management
+ACCESS=warehouse_contents | warehouse_management
 module=wh.pl
 action=report
 
index 4113f0d..2cf95ad 100644 (file)
        <th align="right">Vertreter</th>
        <td>
         [%- INCLUDE generic/multibox.html
-              name       = 'salesman_id',
-              DATA       = ALL_SALESMAN_BUSINESSES,
-              show_empty = 1,
-              id_key     = 'id',
-              label_key  = 'description',
+              name      = 'salesman_id',
+              DATA      = ALL_SALESMAN_CUSTOMERS,
+              id_key    = 'id',
+              label_key = 'name',
         -%]
        </td>
       </tr>
              label_key  = 'description',
        -%]
       </td>
-      [%- IF is_customer && !use_vertreter %]
+      [%- IF is_customer && !conf_vertreter %]
       <th align="right">Verkäufer/in</th>
       <td>
        [%- INCLUDE generic/multibox.html
index 33ecfef..4c2db99 100644 (file)
        <th align="right"><translate>Representative</translate></th>
        <td>
         [%- INCLUDE generic/multibox.html
-              name       = 'salesman_id',
-              DATA       = ALL_SALESMAN_BUSINESSES,
-              show_empty = 1,
-              id_key     = 'id',
-              label_key  = 'description',
+              name      = 'salesman_id',
+              DATA      = ALL_SALESMAN_CUSTOMERS,
+              id_key    = 'id',
+              label_key = 'name',
         -%]
        </td>
       </tr>
              label_key  = 'description',
        -%]
       </td>
-      [%- IF is_customer && !use_vertreter %]
+      [%- IF is_customer && !conf_vertreter %]
       <th align="right"><translate>Salesman</translate></th>
       <td>
        [%- INCLUDE generic/multibox.html
index 8bd75b0..77972fc 100644 (file)
@@ -1,19 +1,24 @@
-[% USE HTML %]<div class="listtop">Lagermigration</div>
+[% USE HTML %]
+<div class="listtop">Lagermigration</div>
 
 <form action="[% script %]" method="POST">
+ <p>
+  Lx-Office enth&auml;lt jetzt auch echte Lagerverwaultung anstatt reiner Mengenz&auml;hlung.
+  Dieses update &auml;ndert die Art und Weise wie Lagermengen gez&auml;lt werden.
+  Als Konsequenz k&ouml;nnen die gespeicherten Mengen entweder in ein Lager &uuml;berf&uuml;hrt werden, oder f&uuml;r eine frische Lagerverwaltung resettet werden.
+ </p>
 
-<p>Lx-Office enth&auml;lt jetzt auch echte Lagerverwaultung anstatt reiner Mengenz&auml;hlung. 
-Dieses update &auml;ndert die Art und Weise wie Lagermengen gez&auml;lt werden. 
-Als Konsequenz k&ouml;nnen die gespeicherten Mengen entweder in ein Lager &uuml;berf&uuml;hrt werden, oder f&uuml;r eine frische Lagerverwaltung resettet werden.</p>
+ <p>M&ouml;chten Sie die vorhandenen Mengendaten in ein Lager &uuml;bertragen?</p>
 
-<p>M&ouml;chten Sie die vorhandenen Mengendaten in ein Lager &uuml;bertragen?</p>
-<input id=do_migrate_Y name=do_migrate type=radio value=Y>&nbsp;<label for=do_migrate_Y>Ja</label>
-<input id=do_migrate_N name=do_migrate type=radio value=N checked>&nbsp;<label for=do_migrate_N>Nein</label>
+ <input id="do_migrate_Y" name="do_migrate" type="radio" value="Y">&nbsp;<label for="do_migrate_Y">Ja</label>
+ <input id="do_migrate_N" name="do_migrate" type="radio" value="N" checked>&nbsp;<label for="do_migrate_N">Nein</label>
 
-<p>Bitte geben Sie den Namen des Ziellagers f&uuml;r die &uuml;bernommenen Daten ein.</p>
-<input name=import_warehouse size=50>
+ <p>Bitte geben Sie den Namen des Ziellagers f&uuml;r die &uuml;bernommenen Daten ein.</p>
+ <input name="import_warehouse" size="50">
 
-<p>Da Lagerpl&auml;tze kein Pflichtfeld sind, geben Sie bitte einen Lagerplatz an, in dem Waren ohne spezifizierten Lagerplatz eingelagert werden sollen.<p>
-<input name=bin_default size=50>
+ <p>Da Lagerpl&auml;tze kein Pflichtfeld sind, geben Sie bitte einen Lagerplatz an, in dem Waren ohne spezifizierten Lagerplatz eingelagert werden sollen.<p>
 
-<p><input type=submit value="Weiter"></p>
+  <input name="bin_default" size="50">
+
+ <p><input type="submit" value="Weiter"></p>
+</form>
index 6e6b312..3ad1adb 100644 (file)
@@ -1,19 +1,24 @@
-[% USE HTML %]<div class="listtop"><translate>Warehouse MIgration</translate></div>
+[% USE HTML %]
+<div class="listtop"><translate>Warehouse Migration</translate></div>
 
 <form action="[% script %]" method="POST">
+ <p>
+  <translate>Lx-Office is now able to manage warehouses instead of just tracking the amount of goods in your system.</translate>
+  <translate>This update will change the nature the onhand of goods is tracked.</translate>
+  <translate>As a result, the saved onhand values of the present goods can be stored into a warehouse designated by you, or will be reset for a proper warehouse tracking</translate>
+ </p>
 
-<p><translate>Lx-Office is now able to manage warehouses instead of just tracking the amount of goods in your system.</translate> 
-<translate>This update will change the nature the onhand of goods is tracked.</translate> 
-<translate>As a result, the saved onhand values of the present goods can be stored into a warehouse designated by you, or will be reset for a proper warehouse tracking</translate></p>
+ <p><translate>Do you want to store the existing onhand values into a new warehouse?</translate></p>
 
-<p><translate>Do you want to store the existing onhand values into a new warehouse?</translate></p>
-<input id=do_migrate_Y name=do_migrate type=radio value=Y>&nbsp;<label for=do_migrate_Y><translate>Yes</translate></label>
-<input id=do_migrate_N name=do_migrate type=radio value=N checked>&nbsp;<label for=do_migrate_N><translate>No</translate></label>
+ <input id="do_migrate_Y" name="do_migrate" type="radio" value="Y">&nbsp;<label for="do_migrate_Y"><translate>Yes</translate></label>
+ <input id="do_migrate_N" name="do_migrate" type="radio" value="N" checked>&nbsp;<label for="do_migrate_N"><translate>No</translate></label>
 
-<p><translate>Please specify a description for the warehouse designated for these goods.</translate></p>
-<input name=import_warehouse size=50>
+ <p><translate>Please specify a description for the warehouse designated for these goods.</translate></p>
+ <input name="import_warehouse" size="50">
 
-<p><translate>Since bin is not enforced in the parts data, please specify a bin where goods without a specified bin will be put.</translate><p>
-<input name=bin_default size=50>
+ <p><translate>Since bin is not enforced in the parts data, please specify a bin where goods without a specified bin will be put.</translate><p>
 
-<p><input type=submit value="<translate>Continue</translate>"></p>
+  <input name="bin_default" size="50">
+
+ <p><input type="submit" value="<translate>Continue</translate>"></p>
+</form>
index 3b1da96..5439934 100644 (file)
          </tr>
 
          <tr>
+          <td>
+           <input name="l_transdate" id="l_transdate" class="checkbox" type="checkbox" value="Y">
+           <label for="l_transdate">Belegdatum</label>
+          </td>
           <td>
            <input name="l_subtotal" id="l_subtotal" class="checkbox" type="checkbox" value="Y">
            <label for="l_subtotal">Zwischensumme</label>
index cdd6660..1aa7cca 100644 (file)
          </tr>
 
          <tr>
+          <td>
+           <input name="l_transdate" id="l_transdate" class="checkbox" type="checkbox" value="Y">
+           <label for="l_transdate"><translate>Transdate</translate></label>
+          </td>
           <td>
            <input name="l_subtotal" id="l_subtotal" class="checkbox" type="checkbox" value="Y">
            <label for="l_subtotal"><translate>Subtotal</translate></label>