Merge branch 'master' of ssh://lx-office/~/lx-office-erp
authorHolger Lindemann <hli@lx-system.de>
Wed, 27 Oct 2010 05:30:12 +0000 (07:30 +0200)
committerHolger Lindemann <hli@lx-system.de>
Wed, 27 Oct 2010 05:30:12 +0000 (07:30 +0200)
41 files changed:
SL/DB/Buchungsgruppe.pm
SL/DB/Helpers/Metadata.pm
SL/DB/Part.pm
SL/Form.pm
SL/Mailer.pm
SL/Template/LaTeX.pm
SL/Template/Plugin/L.pm
bin/mozilla/io.pl
bin/mozilla/oe.pl
config/lx-erp.conf
css/Mobile.css
css/Win2000.css
css/lx-office-erp.css
doc/changelog
image/calendar.png [new file with mode: 0644]
locale/de/all
locale/de_DE/all
locale/en/all
locale/fr/all
menu.ini
sql/Pg-upgrade2/auth_enable_sales_all_edit.pl
sql/Pg-upgrade2/customer_long_entries.sql [new file with mode: 0644]
sql/Pg-upgrade2/shipto_add_cp_gender.sql [new file with mode: 0644]
templates/webpages/admin/adminlogin.html
templates/webpages/admin/delete_group_confirm.html
templates/webpages/admin/edit_group.html
templates/webpages/admin/edit_group_membership.html
templates/webpages/admin/edit_groups.html
templates/webpages/admin/list_users.html
templates/webpages/admin/test_db_connection.html
templates/webpages/admin_printer/list.html
templates/webpages/bankaccounts/bank_account_display_form.html
templates/webpages/dbupgrade/warning.html
templates/webpages/do/form_header.html
templates/webpages/generic/multibox.html
templates/webpages/login/login_screen.html
templates/webpages/oe/form_footer.html
templates/webpages/oe/form_header.html
templates/webpages/report_generator/html_report.html
templates/webpages/rp/html_report_susa.html
templates/webpages/sepa/bank_transfer_create.html

index 2dffaa5..26f446b 100644 (file)
@@ -10,4 +10,20 @@ use SL::DB::MetaSetup::Buchungsgruppe;
 # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
 __PACKAGE__->meta->make_manager_class;
 
+sub income_accno_id {
+  my ($self, $taxzone) = @_;
+  my $taxzone_id = ref $taxzone && $taxzone->isa('SL::DB::TaxZone') ? $taxzone->id : $taxzone;
+  my $method = 'income_accno_id_' . $taxzone_id;
+
+  return $self->$method;
+}
+
+sub expense_accno_id {
+  my ($self, $taxzone) = @_;
+  my $taxzone_id = ref $taxzone && $taxzone->isa('SL::DB::TaxZone') ? $taxzone->id : $taxzone;
+  my $method = 'expense_accno_id_' . $taxzone_id;
+
+  return $self->$method;
+}
+
 1;
index 30c59f4..e6020a2 100644 (file)
@@ -17,7 +17,7 @@ sub default_manager_base_class {
 
 sub initialize {
   my $self = shift;
-  $self->make_attr_auto_helpers;
+  $self->make_attr_auto_helpers unless $self->is_initialized;
   $self->SUPER::initialize(@_);
 }
 
index 52b7520..ce9738f 100644 (file)
@@ -18,6 +18,11 @@ __PACKAGE__->meta->add_relationships(
     class        => 'SL::DB::Assembly',
     column_map   => { id => 'id' },
   },
+  partsgroup                     => {
+    type         => 'one to one',
+    class        => 'SL::DB::PartsGroup',
+    column_map   => { partsgroup_id => 'id' },
+  },
 );
 
 __PACKAGE__->meta->initialize;
@@ -25,19 +30,59 @@ __PACKAGE__->meta->initialize;
 sub is_type {
   my $self = shift;
   my $type  = lc(shift || '');
+  die 'invalid type' unless $type =~ /^(?:part|service|assembly)$/;
 
-  if ($type =~ m/^part/) {
-    return !$self->assembly && $self->inventory_accno_id  ? 1 : 0;
-
-  } elsif ($type =~ m/^service/) {
-    return !$self->inventory_accno_id && !$self->assembly ? 1 : 0;
+  return $self->type eq $type ? 1 : 0;
+}
 
-  } elsif ($type =~ m/^assembl/) {
-    return $self->assembly                                ? 1 : 0;
+sub is_part     { $_[0]->is_type('part') }
+sub is_assembly { $_[0]->is_type('assembly') }
+sub is_service  { $_[0]->is_type('service') }
 
+sub type {
+  my ($self, $type) = @_;
+  if (@_ > 1) {
+    die 'invalid type' unless $type =~ /^(?:part|service|assembly)$/;
+    $self->assembly(          $type eq 'assembly' ? 1 : 0);
+    $self->inventory_accno_id($type ne 'service'  ? 1 : undef);
   }
 
-  confess "Unknown type parameter '$type'";
+  return 'assembly' if $self->assembly;
+  return 'part'     if $self->inventory_accno_id;
+  return 'service';
+}
+
+sub new_part {
+  my ($class, %params) = @_;
+  $class->new(%params, type => 'part');
+}
+
+sub new_assembly {
+  my ($class, %params) = @_;
+  $class->new(%params, type => 'assembly');
+}
+
+sub new_service {
+  my ($class, %params) = @_;
+  $class->new(%params, type => 'service');
+}
+
+sub orphaned {
+  my ($self) = @_;
+  die 'not an accessor' if @_ > 1;
+
+  my @relations = qw(
+    SL::DB::InvoiceItem
+    SL::DB::OrderItem
+    SL::DB::Inventory
+    SL::DB::RMAItem
+  );
+
+  for my $class (@relations) {
+    eval "require $class";
+    return 0 if $class->_get_manager_class->get_all_count(query => [ parts_id => $self->id ]);
+  }
+  return 1;
 }
 
 sub get_sellprice_info {
@@ -63,6 +108,11 @@ sub available_units {
   shift->unit_obj->convertible_units;
 }
 
+# autogenerated accessor is slightly off...
+sub buchungsgruppe {
+  shift->buchungsgruppen(@_);
+}
+
 1;
 
 __END__
@@ -77,11 +127,47 @@ SL::DB::Part: Model for the 'parts' table
 
 This is a standard Rose::DB::Object based model and can be used as one.
 
-=head1 FUNCTIONS
+=head1 TYPES
+
+Although the base class is called C<Part> we usually talk about C<Articles> if
+we mean instances of this class. This is because articles come in three
+flavours called:
 
 =over 4
 
-=item is_type $type
+=item Part     - a single part
+
+=item Service  - a part without onhand, and without inventory accounting
+
+=item Assembly - a collection of both parts and services
+
+=back
+
+These types are sadly represented by data inside the class and cannot be
+migrated into a flag. To work around this, each C<Part> object knows what type
+it currently is. Since the type ist data driven, there ist no explicit setting
+method for it, but you can construct them explicitly with C<new_part>,
+C<new_service>, and C<new_assembly>. A Buchungsgruppe should be supplied in this
+case, but it will use the default Buchungsgruppe if you don't.
+
+Matching these there are assorted helper methods dealing with type:
+
+=head2 new_part PARAMS
+
+=head2 new_service PARAMS
+
+=head2 new_assembly PARAMS
+
+Will set the appropriate data fields so that the resulting instance will be of
+tthe requested type. Since part of the distinction are accounting targets,
+providing a C<Buchungsgruppe> is recommended. If none is given the constructor
+will load a default one and set the accounting targets from it.
+
+=head2 type
+
+Returns the type as a string. Can be one of C<part>, C<service>, C<assembly>.
+
+=head2 is_type TYPE
 
 Tests if the current object is a part, a service or an
 assembly. C<$type> must be one of the words 'part', 'service' or
@@ -90,7 +176,17 @@ assembly. C<$type> must be one of the words 'part', 'service' or
 Returns 1 if the requested type matches, 0 if it doesn't and
 C<confess>es if an unknown C<$type> parameter is encountered.
 
-=item get_sellprice_info %params
+=head2 is_part
+
+=head2 is_service
+
+=head2 is_assembly
+
+Shorthand for is_type('part') etc.
+
+=head1 FUNCTIONS
+
+=head2 get_sellprice_info %params
 
 Retrieves the C<sellprice> and C<price_factor_id> for a part under
 different conditions and returns a hash reference with those two keys.
@@ -104,17 +200,21 @@ entry without a country set will be used.
 If none of the above conditions is met then the information from
 C<$self> is used.
 
-=item get_ordered_qty %params
+=head2 get_ordered_qty %params
 
 Retrieves the quantity that has been ordered from a vendor but that
 has not been delivered yet. Only open purchase orders are considered.
 
-=item get_uncommissioned_qty %params
+=head2 orphaned
 
-Retrieves the quantity that has been ordered by a customer but that
-has not been commissioned yet. Only open sales orders are considered.
+Checks if this articke is used in orders, invoices, delivery orders or
+assemblies.
 
-=back
+=head2 buchungsgruppe BUCHUNGSGRUPPE
+
+Used to set the accounting informations from a L<SL:DB::Buchungsgruppe> object.
+Please note, that this is a write only accessor, the original Buchungsgruppe can
+not be retrieved from an article once set.
 
 =head1 AUTHOR
 
index 56e46f7..f3fe6e5 100644 (file)
@@ -56,7 +56,7 @@ use SL::User;
 use Template;
 use URI;
 use List::Util qw(first max min sum);
-use List::MoreUtils qw(any);
+use List::MoreUtils qw(any apply);
 
 use strict;
 
@@ -828,13 +828,13 @@ sub _prepare_html_template {
   }
 
   if (%main::myconfig) {
-    map({ $additional_params->{"myconfig_${_}"} = $main::myconfig{$_}; } keys(%main::myconfig));
-    my $jsc_dateformat = $main::myconfig{"dateformat"};
-    $jsc_dateformat =~ s/d+/\%d/gi;
-    $jsc_dateformat =~ s/m+/\%m/gi;
-    $jsc_dateformat =~ s/y+/\%Y/gi;
-    $additional_params->{"myconfig_jsc_dateformat"} = $jsc_dateformat;
+    $::myconfig{jsc_dateformat} = apply {
+      s/d+/\%d/gi;
+      s/m+/\%m/gi;
+      s/y+/\%Y/gi;
+    } $::myconfig{"dateformat"};
     $additional_params->{"myconfig"} ||= \%::myconfig;
+    map { $additional_params->{"myconfig_${_}"} = $main::myconfig{$_}; } keys %::myconfig;
   }
 
   $additional_params->{"conf_dbcharset"}              = $main::dbcharset;
@@ -2018,7 +2018,7 @@ sub add_shipto {
   my @values;
 
   foreach my $item (qw(name department_1 department_2 street zipcode city country
-                       contact phone fax email)) {
+                       contact cp_gender phone fax email)) {
     if ($self->{"shipto$item"}) {
       $shipto = 1 if ($self->{$item} ne $self->{"shipto$item"});
     }
@@ -2036,6 +2036,7 @@ sub add_shipto {
                        shiptocity = ?,
                        shiptocountry = ?,
                        shiptocontact = ?,
+                       shiptocp_gender = ?,
                        shiptophone = ?,
                        shiptofax = ?,
                        shiptoemail = ?
@@ -2051,6 +2052,7 @@ sub add_shipto {
                        shiptocity = ? AND
                        shiptocountry = ? AND
                        shiptocontact = ? AND
+                       shiptocp_gender = ? AND
                        shiptophone = ? AND
                        shiptofax = ? AND
                        shiptoemail = ? AND
@@ -2061,8 +2063,8 @@ sub add_shipto {
         $query =
           qq|INSERT INTO shipto (trans_id, shiptoname, shiptodepartment_1, shiptodepartment_2,
                                  shiptostreet, shiptozipcode, shiptocity, shiptocountry,
-                                 shiptocontact, shiptophone, shiptofax, shiptoemail, module)
-             VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|;
+                                 shiptocontact, shiptocp_gender, shiptophone, shiptofax, shiptoemail, module)
+             VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|;
         do_query($self, $dbh, $query, $id, @values, $module);
       }
     }
index 9ef0b08..1798133 100644 (file)
@@ -31,6 +31,7 @@
 package Mailer;
 
 use Email::Address;
+use Encode;
 
 use SL::Common;
 use SL::MIME;
@@ -103,14 +104,14 @@ sub send {
   $num_sent++;
   my $boundary    = time() . "-$$-${num_sent}";
   $boundary       =  "LxOffice-$self->{version}-$boundary";
-  my $domain      =  $self->{from};
+  my $domain      =  $self->recode($self->{from});
   $domain         =~ s/(.*?\@|>)//g;
   my $msgid       =  "$boundary\@$domain";
 
   my $form        =  $main::form;
   my $myconfig    =  \%main::myconfig;
 
-  my $email       =  $myconfig->{email};
+  my $email       =  $self->recode($myconfig->{email});
   $email          =~ s/[^\w\.\-\+=@]//ig;
 
   my %temp_form   = ( %{ $form }, 'myconfig_email' => $email );
@@ -127,12 +128,15 @@ sub send {
 
   foreach my $item (qw(to cc bcc)) {
     next unless ($self->{$item});
+    $self->{$item} =  $self->recode($self->{$item});
     $self->{$item} =~ s/\&lt;/</g;
     $self->{$item} =~ s/\$<\$/</g;
     $self->{$item} =~ s/\&gt;/>/g;
     $self->{$item} =~ s/\$>\$/>/g;
   }
 
+  $self->{from} = $self->recode($self->{from});
+
   my $headers = '';
   foreach my $item (qw(from to cc bcc)) {
     next unless ($self->{$item});
@@ -151,7 +155,7 @@ sub send {
     }
   }
 
-  $headers .= sprintf("Subject: %s\n", $self->mime_quote_text($self->{subject}, 60));
+  $headers .= sprintf("Subject: %s\n", $self->mime_quote_text($self->recode($self->{subject}), 60));
 
   print OUT qq|${headers}Message-ID: <$msgid>
 X-Mailer: Lx-Office $self->{version}
@@ -166,7 +170,7 @@ MIME-Version: 1.0
       print OUT qq|--${boundary}
 Content-Type: $self->{contenttype}; charset="$self->{charset}"
 
-$self->{message}
+| . $self->recode($self->{message}) . qq|
 
 |;
     }
@@ -223,7 +227,7 @@ Content-Disposition: attachment; filename="$filename"\n\n|;
   } else {
     print OUT qq|Content-Type: $self->{contenttype}; charset="$self->{charset}"
 
-$self->{message}
+| . $self->recode($self->{message}) . qq|
 |;
   }
 
@@ -262,5 +266,12 @@ sub encode_base64 ($;$) {
   return $res;
 }
 
+sub recode {
+  my $self = shift;
+  my $text = shift;
+
+  return $::locale->is_utf8 ? Encode::encode('utf-8-strict', $text) : $text;
+}
+
 1;
 
index c515187..8aac39d 100644 (file)
@@ -55,7 +55,7 @@ sub parse_foreach {
 
   for (my $i = 0; $i < scalar(@{$ary}); $i++) {
     # do magic markers
-    $form->{"__first__"}   = $i == 1;
+    $form->{"__first__"}   = $i == 0;
     $form->{"__last__"}    = ($i + 1) == scalar(@{$ary});
     $form->{"__odd__"}     = (($i + 1) % 2) == 1;
     $form->{"__counter__"} = $i + 1;
index 692c396..d1ecdbd 100644 (file)
@@ -5,6 +5,15 @@ use Template::Plugin;
 
 use strict;
 
+{ # This will give you an id for identifying html tags and such.
+  # It's guaranteed to be unique unless you exceed 10 mio calls per request.
+  # Do not use these id's to store information across requests.
+my $_id_sequence = int rand 1e7;
+sub _tag_id {
+  return $_id_sequence = ($_id_sequence + 1) % 1e7;
+}
+}
+
 sub _H {
   my $string = shift;
   return $::locale->quote_special_chars('HTML', $string);
@@ -132,6 +141,36 @@ sub options_for_select {
   return $code;
 }
 
+sub javascript {
+  my ($self, $data) = @_;
+  return $self->html_tag('script', $data, type => 'text/javascript');
+}
+
+sub date_tag {
+  my ($self, $name, $value, @slurp) = @_;
+  my %params   = _hashify(@slurp);
+  my $name_e   = _H($name);
+  my $seq      = _tag_id();
+
+  $params{cal_align} ||= 'BR';
+
+  $self->input_tag($name, $value,
+    size   => 11,
+    title  => _H($::myconfig{dateformat}),
+    onBlur => 'check_right_date_format(this)',
+    %params,
+  ) . ((!$params{no_cal}) ?
+  $self->html_tag('img', undef,
+    src    => 'image/calendar.png',
+    id     => "trigger$seq",
+    title  => _H($::myconfig{dateformat}),
+    %params,
+  ) .
+  $self->javascript(
+    "Calendar.setup({ inputField: '$name_e', ifFormat: '$::myconfig{jsc_dateformat}', align: '$params{cal_align}', button: 'trigger$seq'  });"
+  ) : '');
+}
+
 1;
 
 __END__
@@ -213,6 +252,16 @@ If C<%attributes> contains a key C<label> then a HTML 'label' tag is
 created with said C<label>. No attribute named C<label> is created in
 that case.
 
+=item C<date_tag $name, $value, %attributes>
+
+=item C<date_tag $name, $value, cal_align =E<gt> $align_code, %attributes>
+
+Creates a date input field, with an attached javascript that will open a
+calendar on click. The javascript ist by default anchoered at the bottom right
+sight. This can be overridden with C<cal_align>, see Calendar documentation for
+the details, usually you'll want a two letter abbreviation of the alignment.
+Right + Bottom becomes C<BL>.
+
 =back
 
 =head2 CONVERSION FUNCTIONS
index 83da8b5..fed2ff7 100644 (file)
@@ -1780,7 +1780,7 @@ sub ship_to {
 
   my @shipto_vars =
     qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry
-       shiptocontact shiptophone shiptofax shiptoemail
+       shiptocontact shiptocp_gender shiptophone shiptofax shiptoemail
        shiptodepartment_1 shiptodepartment_2);
 
   my @addr_vars =
@@ -1795,6 +1795,19 @@ sub ship_to {
     ? $locale->text('Customer Number')
     : $locale->text('Vendor Number');
 
+  # sieht nicht nett aus, funktioniert aber
+  # das vorausgewählte select-feld wird Ã¼ber shiptocp_gender
+  # entsprechend vorbelegt
+  my $selected_m='';
+  my $selected_f='';
+  if ($form->{shiptocp_gender} eq 'm') {
+    $selected_m='selected';
+    $selected_f='';
+  } elsif ($form->{shiptocp_gender} eq 'f') {
+    $selected_m='';
+    $selected_f='selected';
+  }
+
   # get pricegroups for parts
   IS->get_pricegroups_for_parts(\%myconfig, \%$form);
 
@@ -1867,6 +1880,15 @@ sub ship_to {
           <td>$form->{contact}</td>
           <td><input name="shiptocontact" size="35" value="$form->{shiptocontact}"></td>
         </tr>
+        <tr>
+          <th align="right" nowrap>| . $locale->text('Gender') . qq|</th>
+          <td></td>
+          <td><select id="shiptocp_gender" name="shiptocp_gender">
+              <option value="m"| .  $selected_m . qq|>| . $locale->text('male') . qq|</option>
+              <option value="f"| .  $selected_f . qq|>| . $locale->text('female') . qq|</option>
+              </select>
+          </td>
+        </tr>
         <tr>
           <th align="right" nowrap>| . $locale->text('Phone') . qq|</th>
           <td>$form->{phone}</td>
index 20bb0fd..3867c1b 100644 (file)
@@ -1935,3 +1935,17 @@ sub report_for_todo_list {
   return $content;
 }
 
+sub dispatcher {
+  my $form     = $main::form;
+  my $locale   = $main::locale;
+
+  foreach my $action (qw(delete delivery_order e_mail invoice print purchase_order purchase_order quotation
+                         request_for_quotation sales_order sales_order save save_and_close save_as_new ship_to update)) {
+    if ($form->{"action_${action}"}) {
+      call_sub($action);
+      return;
+    }
+  }
+
+  $form->error($locale->text('No action defined.'));
+}
index 225098a..2bd50a7 100644 (file)
@@ -20,13 +20,15 @@ $templates = "templates";
 # member file
 $memberfile = "users/members";
 
-# Wenn nicht Bilanzierung dann auf 1 setzen
+# Wenn Einnahmen-Ãœberschussrechnung, dann auf 1 setzen
+# Wenn Bilanzierung (z.B. GmbH), dann auf 0 setzen
 $eur = 1;
 
 # location of sendmail
 $sendmail = '| /usr/sbin/sendmail -t<%if myconfig_email%> -f <%myconfig_email%><%end%>';
 
 # set language for login and admin
+# currently "de" (German), "de_DE" (new German) and "en" (English, not perfect) are available
 $language = "de";
 
 # Oracle
index 1fa35b4..adba4fb 100644 (file)
@@ -1,7 +1,7 @@
-/* stylesheet for LX-Office ERP
-Getestet mit W3C CSS-Validator:
-Keine Fehler oder Warnungen gefunden
-*/
+/* Stylesheet for Lx-Office
+ * Name: Mobile.css*/
+
+/* The look of links */
 A      { font-size: 8pt; }
 A:link { color: black; text-decoration: none; }
 A:visited { color: black; text-decoration: none; }
@@ -20,7 +20,7 @@ A:hover {
 }
 
 input:focus, textarea:focus, select:focus {
-  background-color:yellow;
+  background-color: yellow;
 }
 
 body {
@@ -72,6 +72,43 @@ body.menu {
   font-size:8pt;
   color: black;
 }
+
+.message_error_login {
+    color: #000000;
+    border: 1px solid #8b0000;
+    background-color: #ffcccc;
+    padding: 3px;
+}
+.message_ok {
+    font-size: 12pt;
+    padding:5px;
+    background-color: #ADFFB6;
+    color: black;
+    font-weight: bolder;
+    text-align:center;
+    border-style:solid;
+    border-width:thin;
+}
+.message_error {
+    font-size: 12pt;
+    padding:5px;
+    background-color: #FFAAAA;
+    color: black;
+    font-weight: bolder;
+    text-align:center;
+    border-style:solid;
+    border-width:thin;
+}
+.message_hint {
+    font-size: 12pt;
+    padding:5px;
+    background-color: #FFFE47;
+    color: black;
+    font-weight: bolder;
+    text-align:center;
+    border-style:solid;
+    border-width:thin;
+}
 .listtop {
   background-color: #b8d1f3;
   text-align:left;
@@ -100,27 +137,6 @@ body.menu {
   background:#D4D0C8;
 }
 
-.message_ok {
-    font-size: 10pt;
-    padding:3px;
-    background-color: lightgreen;
-    color: black;
-    font-weight: bolder;
-    text-align:center;
-    border-style:solid;
-    border-width:thin;
-}
-
-.message_error {
-    font-size: 10pt;
-    padding:5px;
-    background-color: #FFAAAA;
-    color: white;
-    font-weight: bolder;
-    text-align:center;
-    border-style:solid;
-    border-width:thin;
-}
 
 /* Bei Listen den Farbwechsel zur besseren Lesbarkeit: */
 .listrow1 { background-color: #C8D4C6; color: black; vertical-align: top; }
index d9dc7b2..f2b681a 100644 (file)
@@ -1,8 +1,7 @@
-/* stylesheet for LX-Office ERP
-Getestet mit W3C CSS-Validator:
-Keine Fehler oder Warnungen gefunden
-*/
+/* Stylesheet for Lx-Office
+ * Name: Win2000.css*/
 
+/* The look of links */
 A:link { color: black; text-decoration: none; }
 A:visited { color: black; text-decoration: none; }
 A:active { color: black; text-decoration: underline; }
@@ -15,12 +14,12 @@ A.nohover:hover {
 A:hover {
   color:white;
   background-color: #093280;
-  font-size: 10pt;
+  /*font-size: 10pt;*/
   text-decoration: none;
 }
 
 input:focus, textarea:focus, select:focus {
-  background-color:yellow;
+  background-color: yellow;
 }
 
 body {
@@ -72,6 +71,44 @@ body.menu {
   font-size:10pt;
   color: black;
 }
+
+.message_error_login {
+    color: #000000;
+    border: 1px solid #8b0000;
+    background-color: #ffcccc;
+    padding: 3px;
+}
+.message_ok {
+    font-size: 12pt;
+    padding:5px;
+    background-color: #ADFFB6;
+    color: black;
+    font-weight: bolder;
+    text-align:center;
+    border-style:solid;
+    border-width:thin;
+}
+.message_error {
+    font-size: 12pt;
+    padding:5px;
+    background-color: #FFAAAA;
+    color: black;
+    font-weight: bolder;
+    text-align:center;
+    border-style:solid;
+    border-width:thin;
+}
+.message_hint {
+    font-size: 12pt;
+    padding:5px;
+    background-color: #FFFE47;
+    color: black;
+    font-weight: bolder;
+    text-align:center;
+    border-style:solid;
+    border-width:thin;
+}
+
 .listtop {
   background-color: #b8d1f3;
   text-align:left;
index bf6d86d..404c767 100644 (file)
@@ -1,4 +1,5 @@
-/* stylesheet for LX-Office ERP */
+/* Stylesheet for Lx-Office
+ * Name: lx-office-erp.css*/
 
 /* The look of links */
 A:link { color: mediumblue; text-decoration: none; }
@@ -10,7 +11,7 @@ A:hover { color: black;
          }
 
 input:focus, textarea:focus, select:focus {
-  background-color:yellow;
+  background-color: yellow;
 }
 
 body {
@@ -84,17 +85,22 @@ body.menu {
   color: black;
 }
 
+.message_error_login {
+    color: #000000;
+    border: 1px solid #8b0000;
+    background-color: #ffcccc;
+    padding: 3px;
+}
 .message_ok {
     font-size: 12pt;
     padding:5px;
-    background-color: lightgreen;
+    background-color: #ADFFB6;
     color: black;
     font-weight: bolder;
     text-align:center;
     border-style:solid;
     border-width:thin;
 }
-
 .message_error {
     font-size: 12pt;
     padding:5px;
@@ -105,6 +111,16 @@ body.menu {
     border-style:solid;
     border-width:thin;
 }
+.message_hint {
+    font-size: 12pt;
+    padding:5px;
+    background-color: #FFFE66;
+    color: black;
+    font-weight: bolder;
+    text-align:center;
+    border-style:solid;
+    border-width:thin;
+}
 
 /*
     Ãœberschriftsbalken
@@ -255,11 +271,3 @@ label {
 .unbalanced_ledger {
   background-color: #ffa0a0;
 }
-
-.error_message {
-  color: #000000;
-  border: 1px solid #8b0000;
-  background-color: #ffcccc;
-  padding: 3px;
-}
-
index 55bda92..3cc0c25 100644 (file)
@@ -18,7 +18,7 @@
   - Druckvorlage optional auf Excel erweitert, um Variablen die sich nicht in foreach-Schleifen
     befinden anzuzeigen (s.a.: doc/excel_templates.txt).
   - FiBu -> Bericht um Suchfeld Kontonummer erweitert
-
+  - Ansprechpartner für abweichende Lieferadresse, um das Attribut Geschlecht erweitert
 
   API Ã„nderungen:
 
diff --git a/image/calendar.png b/image/calendar.png
new file mode 100644 (file)
index 0000000..106a592
Binary files /dev/null and b/image/calendar.png differ
index 25d7887..2cb2705 100644 (file)
@@ -177,6 +177,7 @@ $self->{texts} = {
   'Amended Advance Turnover Tax Return (Nr. 10)' => 'Ist dies eine berichtigte Anmeldung? (Nr. 10/Zeile 15 Steuererklärung)',
   'Amount'                      => 'Betrag',
   'Amount Due'                  => 'Betrag fällig',
+  'Amount has to be greater then zero! Wrong row number: ' => 'Leere Eingabe oder Werte kleiner, gleich null eingegeben. Fehler in Reihe Nummer: ',
   'Annotations'                 => 'Anmerkungen',
   'Another user with the login #1 does already exist.' => 'Es existiert bereits ein anderer Benutzer mit diesem Login.',
   'Ap aging on %s'              => 'Offene Verbindlichkeiten zum %s',
@@ -970,7 +971,7 @@ $self->{texts} = {
   'Lx-Office can fix these problems automatically.' => 'Lx-Office kann solche Probleme automatisch beheben.',
   'Lx-Office has been switched to group-based access restrictions.' => 'Lx-Office wurde auf eine gruppenbasierte Benutzerzugriffsverwaltung umgestellt.',
   'Lx-Office has found one or more problems in the general ledger.' => 'Lx-Office hat ein oder mehrere Probleme im Hauptbuch gefunden.',
-  'Lx-Office is about to update the database <b>#1</b>.' => 'Lx-Office wird gleich die Datenbank <b>#1</b> aktualisieren.',
+  'Lx-Office is about to update the database [ #1 ].' => 'Lx-Office wird gleich die Datenbank [ #1 ] aktualisieren.',
   'Lx-Office is now able to manage warehouses instead of just tracking the amount of goods in your system.' => 'Lx-Office enth&auml;lt jetzt auch echte Lagerverwaultung anstatt reiner Mengenz&auml;hlung.',
   'MAILED'                      => 'Gesendet',
   'MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES' => 'Ihr Browser kann leider keine eingebetteten Frames anzeigen. Bitte w&auml;hlen Sie ein anderes Men&uuml; in der Benutzerkonfiguration im Administrationsmen&uuml; aus.',
@@ -994,6 +995,8 @@ $self->{texts} = {
   'May '                        => 'Mai',
   'May set the BCC field when sending emails' => 'Beim Verschicken von Emails das Feld \'BCC\' setzen',
   'Medium Number'               => 'Datentr&auml;gernummer',
+  'Members not of'              => 'Benutzer nicht in Gruppe',
+  'Members of'                  => 'Benutzer in Gruppe',
   'Memo'                        => 'Memo',
   'Menu'                        => 'Men&uuml;',
   'Message'                     => 'Nachricht',
@@ -1075,7 +1078,6 @@ $self->{texts} = {
   'No valid number entered for pricegroup "#1".' => 'Für Preisgruppe "#1" wurde keine gültige Nummer eingegeben.',
   'No vendor has been selected yet.' => 'Es wurde noch kein Lieferant ausgewählt.',
   'No warehouse has been created yet or the quantity of the bins is not configured yet.' => 'Es wurde noch kein Lager angelegt, bzw. die dazugehörigen Lagerplätze sind noch nicht konfiguriert.',
-  'Amount has to be greater then zero! Wrong row number: ' => 'Leere Eingabe oder Werte kleiner, gleich null eingegeben. Fehler in Reihe Nummer: ',
   'No.'                         => 'Position',
   'Non-taxable Purchases'       => 'Nicht zu versteuernde Einkäufe',
   'Non-taxable Sales'           => 'Nicht zu versteuernde Verkäufe',
@@ -1303,6 +1305,7 @@ $self->{texts} = {
   'Quote chararacter'           => 'Anf&uuml;hrungszeichen',
   'Quoted'                      => 'Angeboten',
   'RFQ'                         => 'Anfrage',
+  'RFQ Date'                    => 'Anfragedatum',
   'RFQ Number'                  => 'Anfragenummer',
   'RFQs'                        => 'Preisanfragen',
   'ROP'                         => 'Mindestlagerbestand',
@@ -1802,8 +1805,6 @@ $self->{texts} = {
   'User name'                   => 'Benutzername',
   'User saved!'                 => 'Benutzer gespeichert!',
   'Username'                    => 'Benutzername',
-  'Users in<br>this group'      => 'Benutzer in<br>dieser Gruppe',
-  'Users not in this group'     => 'Benutzer nicht in dieser Gruppe',
   'Ust-IDNr'                    => 'USt-IdNr.',
   'Valid from'                  => 'Gültig ab',
   'Valid until'                 => 'gültig bis',
index 04eae03..127d0bf 100644 (file)
@@ -177,6 +177,7 @@ $self->{texts} = {
   'Amended Advance Turnover Tax Return (Nr. 10)' => 'Ist dies eine berichtigte Anmeldung? (Nr. 10/Zeile 15 Steuererklärung)',
   'Amount'                      => 'Betrag',
   'Amount Due'                  => 'Betrag fällig',
+  'Amount has to be greater then zero! Wrong row number: ' => '"Betrag" muss größer Null sein. Fehlerhafte Zeile: ',
   'Annotations'                 => 'Hilfe',
   'Another user with the login #1 does already exist.' => 'Es existiert bereits ein anderer Benutzer mit diesem Login.',
   'Ap aging on %s'              => 'Offene Verbindlichkeiten zum %s',
@@ -970,7 +971,7 @@ $self->{texts} = {
   'Lx-Office can fix these problems automatically.' => 'Lx-Office kann solche Probleme automatisch beheben.',
   'Lx-Office has been switched to group-based access restrictions.' => 'Lx-Office wurde auf eine gruppenbasierte Benutzerzugriffsverwaltung umgestellt.',
   'Lx-Office has found one or more problems in the general ledger.' => 'Lx-Office hat ein oder mehrere Probleme im Hauptbuch gefunden.',
-  'Lx-Office is about to update the database <b>#1</b>.' => 'Lx-Office wird gleich die Datenbank <b>#1</b> aktualisieren.',
+  'Lx-Office is about to update the database [ #1 ].' => '',
   'Lx-Office is now able to manage warehouses instead of just tracking the amount of goods in your system.' => 'Lx-Office enth&auml;lt jetzt auch echte Lagerverwaultung anstatt reiner Mengenz&auml;hlung.',
   'MAILED'                      => 'Gesendet',
   'MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES' => 'Ihr Browser kann leider keine eingebetteten Frames anzeigen. Bitte w&auml;hlen Sie ein anderes Men&uuml; in der Benutzerkonfiguration im Administrationsmen&uuml; aus.',
@@ -994,6 +995,8 @@ $self->{texts} = {
   'May '                        => 'Mai',
   'May set the BCC field when sending emails' => 'Beim Verschicken von Emails das Feld \'BCC\' setzen',
   'Medium Number'               => 'Datentr&auml;gernummer',
+  'Members not of'              => 'Nicht Mitglied in',
+  'Members of'                  => 'Mitglied in',
   'Memo'                        => 'Memo',
   'Menu'                        => 'Men&uuml;',
   'Message'                     => 'Nachricht',
@@ -1075,7 +1078,6 @@ $self->{texts} = {
   'No valid number entered for pricegroup "#1".' => 'Für Preisgruppe "#1" wurde keine gültige Nummer eingegeben.',
   'No vendor has been selected yet.' => 'Es wurde noch kein Lieferant ausgewählt.',
   'No warehouse has been created yet or the quantity of the bins is not configured yet.' => 'Es wurde noch kein Lager angelegt, bzw. die dazugehörigen Lagerplätze sind noch nicht konfiguriert.',
-  'Amount has to be greater then zero! Wrong row number: ' => '"Betrag" muss größer Null sein. Fehlerhafte Zeile: ',
   'No.'                         => 'Position',
   'Non-taxable Purchases'       => 'Nicht zu versteuernde Einkäufe',
   'Non-taxable Sales'           => 'Nicht zu versteuernde Verkäufe',
@@ -1615,7 +1617,7 @@ $self->{texts} = {
   'The following warnings occured during an upgrade to the document templates:' => 'Die folgenden Warnungen traten w&auml;hrend einer Aktualisierung der Dokumentenvorlagen auf:',
   'The formula needs the following syntax:<br>For regular article:<br>Variablename= Variable Unit;<br>Variablename2= Variable2 Unit2;<br>...<br>###<br>Variable + ( Variable2 / Variable )<br><b>Please be beware of the spaces in the formula</b><br>' => 'Die Formeln m&uuml;ssen in der folgenden Syntax eingegeben werden:<br>Bei normalen Artikeln:<br>Variablenname = Variable Einheit;<br>Variablenname2 = Variable2 Einheit2;<br>...<br>###<br>Variable + Variable2 * ( Variable - Variable2 )<br>Variablennamen und Einheiten dürfen nur aus alphanumerischen Zeichen bestehen.<br>Es muss jeweils die Gesamte Zeile eingegeben werden',
   'The greetings have been saved.' => 'Die Anreden wurden gespeichert',
-  'The group has been added.'   => 'Die Gruppe wurde erfasst.',
+  'The group has been added.'   => 'Die neue Gruppe wurde angelegt.',
   'The group has been deleted.' => 'Die Gruppe wurde gel&ouml;scht.',
   'The group has been saved.'   => 'Die Gruppe wurde gespeichert.',
   'The group memberships have been saved.' => 'Die Gruppenmitgliedschaften wurden gespeichert.',
@@ -1639,7 +1641,7 @@ $self->{texts} = {
   'The pg_restore process could not be started.' => 'Der pg_restore-Prozess konnte nicht gestartet werden.',
   'The preferred one is to install packages provided by your operating system distribution (e.g. Debian or RPM packages).' => 'Die bevorzugte Art, ein Perl-Modul zu installieren, ist durch Installation eines von Ihrem Betriebssystem zur Verf&uuml;gung gestellten Paketes (z.B. Debian-Pakete oder RPM).',
   'The program\'s exit code was #1 (&quot;0&quot; usually means that everything went OK).' => 'Der Exitcode des Programms war #1 (&quot;0&quot; bedeutet normalerweise, dass die Wiederherstellung erfolgreich war).',
-  'The project has been added.' => 'Das Projekt wurde erfasst.',
+  'The project has been added.' => 'Das neue Projekt wurde angelegt.',
   'The project has been saved.' => 'Das Projekt wurde gespeichert.',
   'The restoration process has started. Here\'s the output of the &quot;pg_restore&quot; command:' => 'Der Wiederherstellungsprozess wurde gestartet. Hier ist die Ausgabe des &quot;pg_restore&quot;-Programmes:',
   'The restoration process is complete. Please review &quot;pg_restore&quot;\'s output to find out if the restoration was successful.' => 'Die Wiederherstellung ist abgeschlossen. Bitte sehen Sie sich die Ausgabe von &quot;pg_restore&quot; an, um festzustellen, ob die Wiederherstellung erfolgreich war.',
@@ -1802,8 +1804,6 @@ $self->{texts} = {
   'User name'                   => 'Benutzername',
   'User saved!'                 => 'Benutzer gespeichert!',
   'Username'                    => 'Benutzername',
-  'Users in<br>this group'      => 'Benutzer in<br>dieser Gruppe',
-  'Users not in this group'     => 'Benutzer nicht in dieser Gruppe',
   'Ust-IDNr'                    => 'USt-IdNr.',
   'Valid from'                  => 'Gültig ab',
   'Valid until'                 => 'gültig bis',
index a4b95b2..2224c7b 100644 (file)
@@ -971,7 +971,7 @@ $self->{texts} = {
   'Lx-Office can fix these problems automatically.' => '',
   'Lx-Office has been switched to group-based access restrictions.' => '',
   'Lx-Office has found one or more problems in the general ledger.' => '',
-  'Lx-Office is about to update the database <b>#1</b>.' => '',
+  'Lx-Office is about to update the database [ #1 ].' => '',
   'Lx-Office is now able to manage warehouses instead of just tracking the amount of goods in your system.' => '',
   'MAILED'                      => '',
   'MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES' => '',
@@ -995,6 +995,8 @@ $self->{texts} = {
   'May '                        => '',
   'May set the BCC field when sending emails' => '',
   'Medium Number'               => '',
+  'Members not of'              => 'Not members of',
+  'Members of'                  => 'Members of',
   'Memo'                        => '',
   'Menu'                        => '',
   'Message'                     => '',
@@ -1800,8 +1802,6 @@ $self->{texts} = {
   'User name'                   => '',
   'User saved!'                 => '',
   'Username'                    => '',
-  'Users in<br>this group'      => '',
-  'Users not in this group'     => '',
   'Ust-IDNr'                    => '',
   'Valid from'                  => '',
   'Valid until'                 => '',
index 2ab00b6..1d6cc54 100644 (file)
@@ -1785,8 +1785,8 @@ $self->{texts} = {
   'User name'                   => '',
   'User saved!'                 => '',
   'Username'                    => '',
-  'Users in<br>this group'      => '',
-  'Users not in this group'     => '',
+  'Members of'                  => '',
+  'Members not of'              => '',
   'Ust-IDNr'                    => '',
   'Valid from'                  => '',
   'Valid until'                 => '',
index 6a77fa8..1ed60a7 100644 (file)
--- a/menu.ini
+++ b/menu.ini
@@ -931,10 +931,6 @@ action=audit_control
 module=am.pl
 action=show_history_search
 
-[System--Administration area]
-module=admin.pl
-action=login
-
 
 [Program]
 
index e223cd8..e77fbee 100644 (file)
@@ -13,38 +13,35 @@ sub mydberror {
       "<br>$msg<br>" . $DBI::errstr);
 }
 
-sub do_query {
-  my ($query, $may_fail) = @_;
+sub do_update {
+  my $dbh   = $main::auth->dbconnect();
+  my $query = <<SQL;
+    SELECT id
+    FROM auth."group"
+    WHERE NOT EXISTS(
+      SELECT group_id
+      FROM auth.group_rights
+      WHERE (auth.group_rights.group_id = auth."group".id)
+        AND (auth.group_rights."right"  = 'sales_all_edit')
+    )
+SQL
+
+  my @group_ids = selectall_array_query($form, $dbh, $query);
+  if (@group_ids) {
+    $query = <<SQL;
+      INSERT INTO auth.group_rights (group_id, "right",          granted)
+      VALUES                        (?,        'sales_all_edit', TRUE)
+SQL
+    my $sth = prepare_query($form, $dbh, $query);
+
+    foreach my $id (@group_ids) {
+      do_statement($form, $sth, $query, $id);
+    }
 
-  if (!$dbh->do($query)) {
-    mydberror($query) unless ($may_fail);
-    $dbh->rollback();
-    $dbh->begin_work();
+    $sth->finish();
+    $dbh->commit();
   }
-}
 
-sub do_update {
-  my @queries;
-
-#  do_query("ALTER TABLE project ADD PRIMARY KEY (id);", 1);
-#  map({ do_query($_, 0); } @queries);
-#  print "hieryy";
-#  print (Dumper($main::form));
-  my $dbh = $main::auth->dbconnect();
-  my $query = qq|SELECT distinct group_id from auth.user_group|;
-  my $sth_all_groups = prepare_execute_query($form, $dbh, $query);
-  while (my $hash_ref = $sth_all_groups->fetchrow_hashref()) {  # Schleife
-    push @queries, "INSERT INTO auth.group_rights (group_id, \"right\", granted) VALUES (" . $hash_ref->{group_id} . ", 'sales_all_edit', 't')";
-}
-# if in doubt use brute force ;-) jb
-  foreach my $query (@queries){
-#    print "hier:" . $query;
-    my $dbh = $main::auth->dbconnect();
-    my $sth   = prepare_query($form, $dbh, $query);
-    do_statement($form,$sth,$query);
-    $sth->finish();
-    $dbh ->commit();
-}
   return 1;
 }
 
diff --git a/sql/Pg-upgrade2/customer_long_entries.sql b/sql/Pg-upgrade2/customer_long_entries.sql
new file mode 100644 (file)
index 0000000..2412449
--- /dev/null
@@ -0,0 +1,10 @@
+-- @tag: customer_long_entries
+-- @description: Lange Spalten für Kundentabelle
+-- @depends: release_2_6_1
+
+ALTER TABLE customer ALTER COLUMN account_number TYPE text;
+ALTER TABLE customer ALTER COLUMN bank_code TYPE text;
+ALTER TABLE customer ALTER COLUMN ustid TYPE text;
+ALTER TABLE customer ALTER COLUMN name TYPE text;
+ALTER TABLE customer ALTER COLUMN contact TYPE text;
+
diff --git a/sql/Pg-upgrade2/shipto_add_cp_gender.sql b/sql/Pg-upgrade2/shipto_add_cp_gender.sql
new file mode 100644 (file)
index 0000000..8991c44
--- /dev/null
@@ -0,0 +1,5 @@
+-- @tag: shipto_add_cp_gender
+-- @description: Geschlecht fuer Ansprechpartner bei abweichender Lieferadresse
+-- @depends: release_2_6_1
+
+ALTER TABLE shipto add column shiptocp_gender text;
index 803d984..614b33f 100644 (file)
@@ -10,7 +10,7 @@
   <h2>[% 'Administration' | $T8 %]</h2>
 
   [% IF error_message %]
-  <p><span class="error_message">[% error_message %]</span></p>
+  <p><span class="message_error_login">[% error_message %]</span></p>
   [% END %]
 
   <form method="post" action="admin.pl">
index 2f684a5..e74911e 100644 (file)
@@ -8,11 +8,11 @@
 
   <div class="listtop">[% 'Delete group' | $T8 %]</div>
 
-  <p>[% 'Do you really want to delete this group:' | $T8 %] [% name %] ?</p>
+  <p class="message_hint">[% 'Do you really want to delete this group:' | $T8 %] [% name %] ?</p>
 
   <input type="hidden" name="delete_nextsub" value="delete_group">
-  <input type="submit" class="submit" name="action" value="[% 'Delete' | $T8 %]">
   <button type="button" onclick="history.back()">[% 'Back' | $T8 %]</button>
+  <input type="submit" class="submit" name="action" value="[% 'Delete' | $T8 %]">
 
  </form>
 
index 177fbc9..195efbc 100644 (file)
@@ -3,23 +3,35 @@
  <form name="Form" method="post" action="admin.pl">
 
   <input type="hidden" name="group_id" value="[% HTML.escape(group_id) %]">
-
   <input type="hidden" name="back_nextsub" value="edit_groups">
 
   [% IF message %]
-  <p>[% message %]</p>
+  <p class="message_ok">[% message %]</p>
   [% END %]
 
-  <div class="listtop">[% 'Edit group ' | $T8 %] [% HTML.escape(name) %]</div>
+  <div class="listtop">[% 'Edit group ' | $T8 %]:  [% HTML.escape(name) %]</div>
+
+  <p><input type="submit" class="submit" name="action" value="[% 'Back' | $T8 %]"></p>
+
+   <hr>
 
-  <table width="100%">
-   <tr>
-    <td>
+   <p class="listheading">[% 'Rename the group' | $T8 %]</p>
+   <table>
+     <tr><td><div style="">[% 'Name' | $T8 %]</th><td><input name="name" maxlength="50" value="[% HTML.escape(name) %]"></td></tr>
+        <tr><th>[% 'Description' | $T8 %]</th><td><input name="description" value="[% HTML.escape(description) %]"></td></tr>
+   </table>
+   <br>
+     <input type="hidden" name="save_nextsub" value="save_group">
+     <input type="submit" class="submit" name="action" value="[% 'Save' | $T8 %]">
+
+ <hr>
+ <br>
+ <div class="listtop">[% 'Group membership' | $T8 %]</div>
      <table>
-      <tr class="listheading">
-       <td><b>[% 'Users in<br>this group' | $T8 %]</b></td>
-       <td>&nbsp;</td>
-       <td><b>[% 'Users not in this group' | $T8 %]</b></td>
+      <tr>
+       <td><p class="listheading">[% 'Members of' | $T8 %]<br>[% HTML.escape(name) %]</p></td>
+       <td> </td>
+       <td><p class="listheading">[% 'Members not of' | $T8 %]<br>[% HTML.escape(name) %]</p></td>
       </tr>
 
       <tr>
         </select>
        </td>
       </tr>
-
-      <tr>
-       <td>
-        <input type="submit" class="submit" name="action" value="[% 'Back' | $T8 %]">
-       </td>
-      </tr>
      </table>
-
-     <hr>
-
-     <table>
-      <tr class="listheading">
-       <td colspan="2">[% 'Edit rights' | $T8 %]</td>
-      </tr>
+ <hr>
+ <br>
+    <div class="listtop">[% 'Edit rights' | $T8 %]</div>
 
       [% FOREACH right = RIGHTS %]
-      <tr>
-       <td>
+
         [% IF right.is_section %]
-        <i>[% right.description %]</i>
+        <br>
+        <h4 style="border-bottom: solid; border-bottom-width: 1px; border-bottom-color: #ddd;">[% right.description %]</h4>
         [% ELSE %]
+        <p style="/*font-size: 11px;*/ margin: 0;">
         <input type="checkbox" name="[% HTML.escape(right.right) %]_granted" id="[% HTML.escape(right.right) %]_granted" [% IF right.granted %]checked[% END %]>
         <label for="[% HTML.escape(right.right) %]_granted">[% IF right.description %][% right.description %][% ELSE %]<i>[% HTML.escape(right.right) %]</i>[% END %]</label>
+         </p>
         [% END %]
-       </td>
-      </tr>
-      [% END %]
 
-      <tr>
-       <td>
-        <input type="hidden" name="save_nextsub" value="save_group">
-        <input type="submit" class="submit" name="action" value="[% 'Save' | $T8 %]">
-        &nbsp;
-        <input type="submit" class="submit" name="action" value="[% 'Back' | $T8 %]">
-       </td>
-      </tr>
-     </table>
-
-     <hr>
-
-     <table>
-      <tr class="listheading">
-       <td colspan="2">[% 'Rename the group' | $T8 %]</td>
-      </tr>
-
-      <tr>
-       <td>[% 'Name' | $T8 %]:</td>
-       <td><input name="name" maxlength="50" value="[% HTML.escape(name) %]"></td>
-      </tr>
-
-      <tr>
-       <td>[% 'Description' | $T8 %]:</td>
-       <td><input name="description" value="[% HTML.escape(description) %]"></td>
-      </tr>
+      [% END %]
 
-      <tr>
-       <td>
-        <input type="hidden" name="save_nextsub" value="save_group">
-        <input type="submit" class="submit" name="action" value="[% 'Save' | $T8 %]">
-        &nbsp;
-        <input type="submit" class="submit" name="action" value="[% 'Back' | $T8 %]">
-       </td>
-      </tr>
-     </table>
-    </td>
-   </tr>
-  </table>
+   <hr>
+    <input type="hidden" name="save_nextsub" value="save_group">
+    <input type="submit" class="submit" name="action" value="[% 'Save' | $T8 %]">
+    &nbsp;
+    <input type="submit" class="submit" name="action" value="[% 'Back' | $T8 %]">
  </form>
-
 </body>
 </html>
index 59047a3..103c066 100644 (file)
@@ -3,6 +3,7 @@
 
  <div class="listtop">[% 'Edit group membership' | $T8 %]</div>
 
+ <p><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
  <p>[% 'Select the checkboxes that match users to the groups they should belong to.' | $T8 %]</p>
 
  <form action="admin.pl">
@@ -38,7 +39,6 @@
 
   <p>
    <input type="submit" class="submit" name="action" value="[% 'Save' | $T8 %]">
-   <input type="submit" class="submit" name="action" value="[% 'Back' | $T8 %]">
   </p>
 
  </form>
index fc55609..41cbf72 100644 (file)
@@ -1,15 +1,31 @@
 [%- USE T8 %]
 [% USE HTML %]<body>
- <form name="Form" method="post" action="admin.pl">
-
 
+  <div class="listtop">[% 'Edit groups' | $T8 %]</div>
   [% IF message %]
-  <p>[% message %]</p>
+  <p class="message_ok">[% message %]</p>
   [% END %]
 
-  <div class="listtop">[% 'Edit groups' | $T8 %]</div>
+  <form method="post" action="admin.pl">
+     <input type="hidden" name="back_nextsub" value="list_users">
+    <p><input type="submit" class="submit" name="action" value="[% 'Back' | $T8 %]"></p>
+  </form>
+
+ <div class="listheading">[% 'Add a new group' | $T8 %]</div>
+ <form method="post" action="admin.pl">
+ <br>
+  <table border="0">
+   <tr><td>[% 'Name' | $T8 %] </td><td><input name="name" maxlength="50"></td></tr>
+   <tr><td>[% 'Description' | $T8 %] </td><td><input name="description"></td></tr>
+  </table>
+   <input type="hidden" name="add_nextsub" value="add_group">
+   <p><input type="submit" class="submit" name="action" value="[% 'Add' | $T8 %]"></p>
+  <hr>
+ </form>
+
+
+ <form name="Form" method="post" action="admin.pl">
 
-  <p><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
 
   <div class="listheading">[% 'Edit and delete a group' | $T8 %]</div>
 
@@ -33,7 +49,6 @@
    <input type="submit" class="submit" name="action" value="[% 'Delete' | $T8 %]">
    [% END %]
    <input type="hidden" name="back_nextsub" value="list_users">
-   <input type="submit" class="submit" name="action" value="[% 'Back' | $T8 %]">
   </p>
  </form>
 
 
  <hr size="2" noshade>
 
- <div class="listheading">[% 'Add a new group' | $T8 %]</div>
-
- <form method="post" action="admin.pl">
-  <p>
-   <table border="0">
-    <tr>
-     <td>[% 'Name' | $T8 %]:</td>
-     <td><input name="name" maxlength="50"></td>
-    </tr>
-
-    <tr>
-     <td>[% 'Description' | $T8 %]:</td>
-     <td><input name="description"></td>
-    </tr>
-   </table>
-  </p>
-
-  <p>
-   <input type="hidden" name="add_nextsub" value="add_group">
-   <input type="submit" class="submit" name="action" value="[% 'Add' | $T8 %]">
-  </p>
-
- </form>
-
 </body>
 </html>
index e201190..0828b00 100644 (file)
      <th class="listtop">[% 'Login Name' | $T8 %]</th>
      <th class="listtop">[% 'Name' | $T8 %]</th>
      <th class="listtop">[% 'Company' | $T8 %]</th>
-     <th class="listtop">[% 'Driver' | $T8 %]</th>
-     <th class="listtop">[% 'Host' | $T8 %]</th>
-     <th class="listtop">[% 'Dataset' | $T8 %]</th>
      <th class="listtop">[% 'Templates' | $T8 %]</th>
+     <th class="listtop">[% 'Print' | $T8 %]</th>
+     <th class="listtop">[% 'Language' | $T8 %]</th>
+     <th class="listtop">[% 'Dataset' | $T8 %]</th>
+     <th class="listtop">[% 'Host' | $T8 %]</th>
+<!-- <th class="listtop">[% 'Driver' | $T8 %]</th> -->
     </tr>
 
     [% FOREACH row = MEMBERS %]
      <tr class="listrow[% loop.count % 2 %]">
-      <td><a href="admin.pl?action=edit&login=[% HTML.url(row.login) %]">[% HTML.escape(row.login) %]</a></td>
-      <td>[% HTML.escape(row.name) %]</td>
-      <td>[% HTML.escape(row.company) %]</td>
-      <td>[% HTML.escape(row.dbdriver) %]</td>
-      <td>[% IF row.dbhost %][% HTML.escape(row.dbhost) %][% ELSE %]localhost[% END %]</td>
-      <td>[% HTML.escape(row.dbname) %]</td>
-      <td>[% HTML.escape(row.templates) %]</td>
+      <td>&nbsp;<a href="admin.pl?action=edit&login=[% HTML.url(row.login) %]">[% HTML.escape(row.login) %]</a></td>
+      <td>&nbsp;[% HTML.escape(row.name) %]</td>
+      <td>&nbsp;[% HTML.escape(row.company) %]</td>
+      <td>&nbsp;[% HTML.escape(row.templates) %]</td>
+      <td>&nbsp;[% HTML.escape(row.template_format) %]</td>
+      <td>&nbsp;[% HTML.escape(row.countrycode) %]</td>
+      <td>&nbsp;[% HTML.escape(row.dbname) %]</td>
+      <td>&nbsp;[% IF row.dbhost %][% HTML.escape(row.dbhost) %][% ELSE %]localhost[% END %]</td>
+<!--  <td>&nbsp;[% HTML.escape(row.dbdriver) %]</td> -->
      </tr>
     [% END %]
 
-    <td colspan="7"><hr size="3" noshade></td>
    </table>
+  <hr size="3" noshade>
   </p>
 
 
   [% END %]
   <input type="submit" class="submit" name="action" value="[% 'Logout' | $T8 %]">
 
+  <div style="background-color: #FFFFDA; font-size: 12px; padding: 0.5em; max-width: 720px; margin: 1em;">
   <p>[% 'Click on login name to edit!' | $T8 %]</p>
-
   <p>[% 'To add a user to a group edit a name, change the login name and save.  A new user with the same variables will then be saved under the new login name.' | $T8 %]</p>
+  </div>
  </form>
 
  <form method="post" action="login.pl">
index 865efea..fc0b283 100644 (file)
@@ -5,11 +5,11 @@
 
  [%- IF connection_ok %]
 
- <p>[% 'The connection was established successfully.' | $T8 %]</p>
+ <p class="message_ok">[% 'The connection was established successfully.' | $T8 %]</p>
 
  [%- ELSE %]
 
- <p>
+ <p class="message_error">
   [% 'The connection to the database could not be established.' | $T8 %]
   [% 'Error message from the database driver:' | $T8 %]
  </p>
index 92a7095..cd9b784 100644 (file)
@@ -25,7 +25,7 @@
         </tr>
 [%- END %]
 [%- ELSE %]
-        <tr><td colspan='3'>[% 'No data was found.' | $T8 %]</td></tr>
+        <tr><td colspan='3'><p class="message_hint">[% 'No data was found.' | $T8 %]</p></td></tr>
 [%- END %]
       </table>
     </td>
index 5ea2007..b124682 100644 (file)
@@ -3,7 +3,7 @@
 <body>
 
 [%- IF params.error %]
- <p><div class="error_message">[% params.error %]</div></p>
+ <p><div class="message_error">[% params.error %]</div></p>
 [%- END %]
 
  <p><div class="listtop">[% title %]</div></p>
index 129b36b..f54c687 100644 (file)
@@ -5,10 +5,10 @@
 
  <input type="hidden" name="action" value="login">
  <p><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
+ <p class="message_hint">
+  [% LxERP.t8('Lx-Office is about to update the database [ #1 ].', dbname) | html %]
+ </p>
  <p>
-  [% LxERP.t8('Lx-Office is about to update the database <b>#1</b>.', dbname) | html %]
-  </p>
-  <p>
   [% 'You should create a backup of the database before proceeding because the backup might not be reversible.' | $T8 %]
  </p>
 
index 2f98575..2410439 100644 (file)
@@ -80,6 +80,7 @@
   <input type="hidden" name="saved_donumber" value="[% HTML.escape(saved_donumber) %]">
   <input type="hidden" name="shiptocity" value="[% HTML.escape(shiptocity) %]">
   <input type="hidden" name="shiptocontact" value="[% HTML.escape(shiptocontact) %]">
+  <input type="hidden" name="shiptocp_gender" value="[% HTML.escape(shiptocp_gender) %]">
   <input type="hidden" name="shiptocountry" value="[% HTML.escape(shiptocountry) %]">
   <input type="hidden" name="shiptodepartment_1" value="[% HTML.escape(shiptodepartment_1) %]">
   <input type="hidden" name="shiptodepartment_2" value="[% HTML.escape(shiptodepartment_2) %]">
index b26f86f..3c24f05 100644 (file)
@@ -6,7 +6,7 @@
   decides wether it should be a text field or a drop down box,
   generates the HTML code, and fixes everything just right.
 
-  call:  INCLUDE generic/multibox.html var = var, var2 = ....
+  call:  PROCESS generic/multibox.html var = var, var2 = ....
 
   options and variables:
     name          : name of the select/textfield
     select_name   : if a select is displayed, use a different name. ex.: department for textinput, but department_id for selects
     readonly      : softly prevents modification
 -%]
-[%- DEFAULT
-  limit      = limit   != '' ? limit   : vclimit != '' ? vclimit : 200
-  show_text  = allow_textbox and DATA.size and limit < DATA.size ? 1 : 0
-  id         = id      != '' ? id      : name
-  default    = default != '' ? default : $name
--%]
 [%-
-  name       = (select_name != '' and ! show_text) ? select_name : name
+  Multibox__limit      = limit   != '' ? limit   : vclimit != '' ? vclimit : 200
+  Multibox__show_text  = allow_textbox and DATA.size and Multibox__limit < DATA.size ? 1 : 0
+  Multibox__id         = id      != '' ? id      : name
+  Multibox__default    = default != '' ? default : $name
+  Multibox__name       = (select_name != '' and ! Multibox__show_text) ? select_name : name
 -%]
-[%- FOREACH row = DATA %]
-  [%-
-       row.id       = row.$id_key     != ''  ? row.$id_key    : $id_sub(row)
-       row.label    = row.$label_key  != ''  ? row.$label_key
-                    : $label_sub(row) != ''  ? $label_sub(row)
-                    :                          row.id
-       row.selected = default == row.id
-  -%]
-[%- END -%]
-[%- IF show_text %]
+[%- IF Multibox__show_text %]
 <input type="text"
- [%- IF name     %] name="[%     HTML.escape(name)     %]"[% END -%]
- [%- IF id       %] id="[%       HTML.escape(id)       %]"[% END -%]
- [%- IF default  %] value="[%    HTML.escape(default)  %]"[% END -%]
- [%- IF style    %] style="[%    HTML.escape(style)    %]"[% END -%]
- [%- IF readonly %] readonly[% END -%]
+ [%- IF Multibox__name     %] name="[%  Multibox__name    | html %]"[% END -%]
+ [%- IF Multibox__id       %] id="[%    Multibox__id      | html %]"[% END -%]
+ [%- IF Multibox__default  %] value="[% Multibox__default | html %]"[% END -%]
+ [%- IF style              %] style="[% style             | html %]"[% END -%]
+ [%- IF readonly           %] readonly[% END -%]
 [%- -%]>
 [%- IF select -%]
   <input type="button" onclick="[% select %]" value="?">
 [%- END -%]
 [%- ELSE %]
 <select
- [%- IF name     %] name="[%     HTML.escape(name)     %]"[% END -%]
- [%- IF id       %] id="[%       HTML.escape(id)       %]"[% END -%]
- [%- IF style    %] style="[%    HTML.escape(style)    %]"[% END -%]
- [%- IF onChange %] onChange="[% HTML.escape(onChange) %]"[% END -%]
- [%- IF readonly %] disabled[% END -%]
+ [%- IF Multibox__name     %] name="[%     Multibox__name     | html %]"[% END -%]
+ [%- IF Multibox__id       %] id="[%       Multibox__id       | html %]"[% END -%]
+ [%- IF style              %] style="[%    style              | html %]"[% END -%]
+ [%- IF onChange           %] onChange="[% onChange           | html %]"[% END -%]
+ [%- IF readonly           %] disabled[% END -%]
 [%- -%]>
   [%- IF show_empty %]
   <option value=""></option>
   [%- END %]
   [%- FOREACH row = DATA %]
-  <option value="[% row.id | html %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.label) %]</option>
+  [%-
+      Multibox__row_id       = row.$id_key     != ''  ? row.$id_key    : $id_sub(row)
+      Multibox__row_label    = row.$label_key  != ''  ? row.$label_key
+                             : $label_sub(row) != ''  ? $label_sub(row)
+                             :                          Multibox__row_id
+      Multibox__row_selected = Multibox__default == Multibox__row_id
+  %]
+  <option value="[% Multibox__row_id | html %]"[% IF Multibox__row_selected %] selected[% END %]>[% Multibox__row_label | html %]</option>
   [%- END %]
 </select>
 [%- END %]
index 0b298c7..8bfd218 100644 (file)
@@ -9,7 +9,7 @@
      <h3 class="login" align="center">[% 'Lx-Office' | $T8 %] [% version %]</h3>
 
      [% IF error_message %]
-     <p><span class="error_message">[% error_message %]</span></p>
+     <p><span class="message_error_login">[% error_message %]</span></p>
      [% END %]
 
      <p>
index de6d7b9..7beb407 100644 (file)
 </table>
 
 [% label_edit %]<br>
-<input class="submit" type="submit" name="action" id="update_button" value="[% 'Update' | $T8 %]">
-<input class="submit" type="submit" name="action" value="[% 'Ship to' | $T8 %]">
-<input class="submit" type="submit" name="action" value="[% 'Print' | $T8 %]">
-<input class="submit" type="submit" name="action" value="[% 'E-mail' | $T8 %]">
-<input class="submit" type="submit" name="action" value="[% 'Save' | $T8 %]">
-<input class="submit" type="submit" name="action" value="[% 'Save and Close' | $T8 %]">
+<input class="submit" type="submit" name="action_update" id="update_button" value="[% 'Update' | $T8 %]">
+<input class="submit" type="submit" name="action_ship_to" value="[% 'Ship to' | $T8 %]">
+<input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]">
+<input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]">
+<input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]">
+<input class="submit" type="submit" name="action_save_and_close" value="[% 'Save and Close' | $T8 %]">
 
 [%- IF id %]
   <input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
   <input type="button" class="submit" onclick="set_history_window([% HTML.escape(id) %])" name="history" id="history" value="[% 'history' | $T8 %]">
 
   <br>[% label_workflow %]<br>
-  <input class="submit" type="submit" name="action" value="[% 'Save as new' | $T8 %]">
-  <input class="submit" type="submit" name="action" value="[% 'Delete' | $T8 %]">
+  <input class="submit" type="submit" name="action_save_as_new" value="[% 'Save as new' | $T8 %]">
+  <input class="submit" type="submit" name="action_delete" value="[% 'Delete' | $T8 %]">
 
   [%- IF is_sales_quo %]
-    <input class="submit" type="submit" name="action" value="[% 'Sales Order' | $T8 %]">
+    <input class="submit" type="submit" name="action_sales_order" value="[% 'Sales Order' | $T8 %]">
   [%- END %]
 
   [%- IF is_req_quo %]
-    <input class="submit" type="submit" name="action" value="[% 'Purchase Order' | $T8 %]">
+    <input class="submit" type="submit" name="action_purchase_order" value="[% 'Purchase Order' | $T8 %]">
   [%- END %]
 
   [%- IF is_sales_ord || is_pur_ord %]
-    <input class="submit" type="submit" name="action" value="[% 'Delivery Order' | $T8 %]">
+    <input class="submit" type="submit" name="action_delivery_order" value="[% 'Delivery Order' | $T8 %]">
   [%- END %]
 
-  <input class="submit" type="submit" name="action" value="[% 'Invoice' | $T8 %]">
+  <input class="submit" type="submit" name="action_invoice" value="[% 'Invoice' | $T8 %]">
 
   [%- IF is_sales_ord || is_pur_ord %]
     <br>[% heading %] als neue Vorlage verwenden f&uuml;r<br>
     [%- IF is_sales_ord %]
-      <input class="submit" type="submit" name="action" value="[% 'Purchase Order' | $T8 %]">
-     <input class="submit" type="submit" name="action" value="[% 'Quotation' | $T8 %]">
+      <input class="submit" type="submit" name="action_purchase_order" value="[% 'Purchase Order' | $T8 %]">
+     <input class="submit" type="submit" name="action_quotation" value="[% 'Quotation' | $T8 %]">
     [%- ELSE %]
     [%- IF is_pur_ord %]
-      <input class="submit" type="submit" name="action" value="[% 'Sales Order' | $T8 %]">
-     <input class="submit" type="submit" name="action" value="[% 'Request for Quotation' | $T8 %]">
+      <input class="submit" type="submit" name="action_sales_order" value="[% 'Sales Order' | $T8 %]">
+     <input class="submit" type="submit" name="action_request_for_quotation" value="[% 'Request for Quotation' | $T8 %]">
     [%- END %]
     [%- END %]
   [%- END %]
 [%- END %]
+<input type="hidden" name="action" value="dispatcher">
 <input type="hidden" name="saved_xyznumber" value="[% HTML.escape(saved_xyznumber) %]">
 <input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
 <input type="hidden" name="callback" value="[% callback %]">
index ba6c9cc..0bd6002 100644 (file)
                     <th align="right" nowrap>
                      [%- IF is_order %]
                       [% 'Order Date' | $T8 %]
+                     [%- ELSIF is_req_quo %]
+                      [% 'RFQ Date' | $T8 %]
                      [%- ELSE %]
                       [% 'Quotation Date' | $T8 %]
                      [%- END %]
index fa8874c..32c2bd5 100644 (file)
@@ -92,7 +92,7 @@
   </table>
  </p>
  [% ELSE %]
-  <p>[% 'No data was found.' | $T8 %]</p>
+  <p class="message_hint">[% 'No data was found.' | $T8 %]</p>
  [% END %]
 
  [% RAW_BOTTOM_INFO_TEXT %]
index c9b010a..269e44c 100644 (file)
@@ -91,7 +91,7 @@
   </table>
  </p>
  [% ELSE %]
-  <p>[% 'No data was found.' | $T8 %]</p>
+  <p class="message_hint">[% 'No data was found.' | $T8 %]</p>
  [% END %]
 
  [% RAW_BOTTOM_INFO_TEXT %]
index 318639e..06bbea8 100644 (file)
@@ -3,7 +3,7 @@
 <body>
 
  [%- IF error_message %]
- <p><div class="error_message">[% error_message %]</div></p>
+ <p><div class="message_error">[% error_message %]</div></p>
  [%- END %]
 
  <p><div class="listtop">[% title %]</div></p>