Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp
authorJan Büren <jan@lx-office-hosting.de>
Thu, 18 Nov 2010 09:14:18 +0000 (10:14 +0100)
committerJan Büren <jan@lx-office-hosting.de>
Thu, 18 Nov 2010 09:14:18 +0000 (10:14 +0100)
21 files changed:
SL/AM.pm
SL/IC.pm
SL/IS.pm
bin/mozilla/ic.pl
bin/mozilla/oe.pl
locale/de/all
locale/de_DE/all
locale/en/all
locale/fr/all
menu.ini
sql/Pg-upgrade2/add_makemodel_prices.sql [new file with mode: 0644]
sql/Pg-upgrade2/auth_enable_sales_all_edit.pl
templates/webpages/admin/delete_group_confirm.html
templates/webpages/admin/edit_group.html
templates/webpages/admin/edit_user.html
templates/webpages/admin_printer/edit.html
templates/webpages/admin_printer/list.html
templates/webpages/admin_printer/login.html
templates/webpages/generic/error.html
templates/webpages/ic/makemodel.html
templates/webpages/oe/form_footer.html

index d637e2a..12a4ad7 100644 (file)
--- a/SL/AM.pm
+++ b/SL/AM.pm
@@ -39,6 +39,7 @@ package AM;
 
 use Carp;
 use Data::Dumper;
+use Encode;
 use SL::DBUtils;
 
 use strict;
@@ -1315,6 +1316,8 @@ sub load_template {
     close(TEMPLATE);
   }
 
+  $content = Encode::decode('utf-8-strict', $content) if $::locale->is_utf8;
+
   $main::lxdebug->leave_sub();
 
   return ($content, $lines);
@@ -1330,6 +1333,7 @@ sub save_template {
   my $error = "";
 
   if (open(TEMPLATE, ">$filename")) {
+    $content = Encode::encode('utf-8-strict', $content) if $::locale->is_utf8;
     $content =~ s/\r\n/\n/g;
     print(TEMPLATE $content);
     close(TEMPLATE);
index b9ad62c..35718f6 100644 (file)
--- a/SL/IC.pm
+++ b/SL/IC.pm
@@ -167,14 +167,17 @@ sub get_part {
 
     # get makes
     if ($form->{makemodel}) {
-      $query = qq|SELECT m.make, m.model FROM makemodel m | .
-               qq|WHERE m.parts_id = ?|;
+    #hli
+      $query = qq|SELECT m.make, m.model,m.lastcost,m.lastcost,m.lastupdate,m.sortorder FROM makemodel m | .
+               qq|WHERE m.parts_id = ? order by m.sortorder asc|;
       my @values = ($form->{id});
       $sth = $dbh->prepare($query);
       $sth->execute(@values) || $form->dberror("$query (" . join(', ', @values) . ")");
 
       my $i = 1;
-      while (($form->{"make_$i"}, $form->{"model_$i"}) = $sth->fetchrow_array)
+
+      while (($form->{"make_$i"}, $form->{"model_$i"}, $form->{"old_lastcost_$i"}, 
+                $form->{"lastcost_$i"}, $form->{"lastupdate_$i"}, $form->{"sortorder_$i"}) = $sth->fetchrow_array)
       {
         $i++;
       }
@@ -493,12 +496,21 @@ sub save {
 
   # insert makemodel records
   unless ($form->{item} eq 'service') {
+    my $lastupdate = '';
+    my $value = 0;
     for my $i (1 .. $form->{makemodel_rows}) {
       if (($form->{"make_$i"}) || ($form->{"model_$i"})) {
-
-        $query = qq|INSERT INTO makemodel (parts_id, make, model) | .
-                 qq|VALUES (?, ?, ?)|;
-        @values = (conv_i($form->{id}), conv_i($form->{"make_$i"}), $form->{"model_$i"});
+        #hli
+        $value = $form->parse_amount($myconfig, $form->{"lastcost_$i"});
+        if ($value == $form->{"old_lastcost_$i"}) 
+        {
+            $lastupdate = $dbh->quote($form->{"lastupdate_$i"});
+        } else {
+            $lastupdate = 'now()';
+        }
+        $query = qq|INSERT INTO makemodel (parts_id, make, model, lastcost, lastupdate, sortorder) | .
+                 qq|VALUES (?, ?, ?, ?, ?, ?)|;
+        @values = (conv_i($form->{id}), conv_i($form->{"make_$i"}), $form->{"model_$i"}, $value, $lastupdate, conv_i($form->{"sortorder_$i"}) );
 
         do_query($form, $dbh, $query, @values);
       }
@@ -818,7 +830,7 @@ sub all_parts {
      ordnumber    => 'apoe.', make         => 'mm.',
      quonumber    => 'apoe.', model        => 'mm.',
      invnumber    => 'apoe.', partsgroup   => 'pg.',
-     lastcost     => ' ',   , soldtotal    => ' ',
+     lastcost     => 'p.',  , soldtotal    => ' ',
      factor       => 'pfac.',
      'SUM(ioi.qty)' => ' ',
      description  => 'p.',
index e5b4036..53de890 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -561,7 +561,7 @@ sub post_invoice {
   if ($form->{currency} eq $defaultcurrency) {
     $form->{exchangerate} = 1;
   } else {
-    $exchangerate = $form->check_exchangerate($myconfig, $form->{currency}, $form->{transdate}, 'buy');
+    $exchangerate = $form->check_exchangerate($myconfig, $form->{currency}, $form->{invdate}, 'buy');
   }
 
   $form->{exchangerate} =
index 3fa0da5..5a012b7 100644 (file)
@@ -1579,8 +1579,8 @@ sub form_footer {
 sub makemodel_row {
   $lxdebug->enter_sub();
   my ($numrows) = @_;
-
-  my @mm_data = grep { any { $_ ne '' } @$_{qw(make model)} } map +{ make => $form->{"make_$_"}, model => $form->{"model_$_"} }, 1 .. $numrows;
+  #hli
+  my @mm_data = grep { any { $_ ne '' } @$_{qw(make model)} } map +{ make => $form->{"make_$_"}, model => $form->{"model_$_"}, lastcost => $form->{"lastcost_$_"}, lastupdate => $form->{"lastupdate_$_"}, sortorder => $form->{"sortorder_$_"} }, 1 .. $numrows;
   delete @{$form}{grep { m/^make_\d+/ || m/^model_\d+/ } keys %{ $form }};
   print $form->parse_html_template('ic/makemodel', { MM_DATA => [ @mm_data, {} ], mm_rows => scalar @mm_data + 1 });
 
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 2cb2705..56acd09 100644 (file)
@@ -554,7 +554,7 @@ $self->{texts} = {
   'Do you really want to delete AP transaction #1?' => 'Wollen Sie wirklich die Kreditorenbuchung #1 löschen?',
   'Do you really want to delete AR transaction #1?' => 'Wollen Sie wirklich die Debitorenbuchung #1 löschen?',
   'Do you really want to delete GL transaction #1?' => 'Wollen Sie wirklich die Dialogbuchung #1 löschen?',
-  'Do you really want to delete this group:' => 'Wollen Sie wirklich diese Gruppe l&ouml;schen:',
+  'Do you really want to delete this group?' => 'Gruppe wirklich l&ouml;schen?',
   'Do you really want to delete this warehouse?' => 'Wollen Sie dieses Lager wirklich l&ouml;schen?',
   'Do you want Lx-Office to create a group for access to all functions?' => 'Wollen Sie, dass Lx-Office eine Gruppe mit Zugriff auf alle Funktionen anlegt?',
   'Do you want to <b>limit</b> your search?' => 'Wollen Sie Ihre Suche <b>spezialisieren</b>?',
@@ -1716,7 +1716,7 @@ $self->{texts} = {
   'To (email)'                  => 'An',
   'To (time)'                   => 'Bis',
   'To Date'                     => 'Bis',
-  '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.' => 'Um einer Gruppe einen neuen Benutzer hinzuzufügen, ändern und speichern Sie am einfachsten einen bestehen den Benutzernamen. Unter dem neuen Namen wird dann ein Benutzer mit denselben Einstellungen angelegt.',
+  '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.' => 'Um einer Gruppe einen neuen Benutzer hinzuzufügen, ändern und speichern Sie am einfachsten einen bestehenden Benutzernamen. Unter dem neuen Namen wird dann ein Benutzer mit denselben Einstellungen angelegt.',
   'Top'                         => 'Oben',
   'Top (CSS)'                   => 'Oben (mit CSS)',
   'Top (CSS) new'               => 'Oben (mit CSS, neu)',
index 127d0bf..4d657e8 100644 (file)
@@ -554,7 +554,7 @@ $self->{texts} = {
   'Do you really want to delete AP transaction #1?' => 'Wollen Sie wirklich die Kreditorenbuchung #1 löschen?',
   'Do you really want to delete AR transaction #1?' => 'Wollen Sie wirklich die Debitorenbuchung #1 löschen?',
   'Do you really want to delete GL transaction #1?' => 'Wollen Sie wirklich die Dialogbuchung #1 löschen?',
-  'Do you really want to delete this group:' => 'Wollen Sie wirklich diese Gruppe l&ouml;schen:',
+  'Do you really want to delete this group?' => 'Gruppe wirklich l&ouml;schen?',
   'Do you really want to delete this warehouse?' => 'Wollen Sie dieses Lager wirklich l&ouml;schen?',
   'Do you want Lx-Office to create a group for access to all functions?' => 'Wollen Sie, dass Lx-Office eine Gruppe mit Zugriff auf alle Funktionen anlegt?',
   'Do you want to <b>limit</b> your search?' => 'Wollen Sie Ihre Suche <b>spezialisieren</b>?',
@@ -971,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 [ #1 ].' => '',
+  '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.',
@@ -1305,6 +1305,7 @@ $self->{texts} = {
   'Quote chararacter'           => 'Anf&uuml;hrungszeichen',
   'Quoted'                      => 'Angeboten',
   'RFQ'                         => 'Anfrage',
+  'RFQ Date'                    => 'Anfragedatum',
   'RFQ Number'                  => 'Anfragenummer',
   'RFQs'                        => 'Preisanfragen',
   'ROP'                         => 'Mindestlagerbestand',
@@ -1715,7 +1716,7 @@ $self->{texts} = {
   'To (email)'                  => 'An',
   'To (time)'                   => 'Bis',
   'To Date'                     => 'Bis',
-  '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.' => 'Um einer Gruppe einen neuen Benutzer hinzuzufügen, ändern und speichern Sie am einfachsten einen bestehen den Benutzernamen. Unter dem neuen Namen wird dann ein Benutzer mit denselben Einstellungen angelegt.',
+  '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.' => 'Um einer Gruppe einen neuen Benutzer hinzuzufügen, ändern und speichern Sie am einfachsten einen bestehenden Benutzernamen. Unter dem neuen Namen wird dann ein Benutzer mit denselben Einstellungen angelegt.',
   'Top'                         => 'Oben',
   'Top (CSS)'                   => 'Oben (mit CSS)',
   'Top (CSS) new'               => 'Oben (mit CSS, neu)',
index 2224c7b..cb322ee 100644 (file)
@@ -554,7 +554,7 @@ $self->{texts} = {
   'Do you really want to delete AP transaction #1?' => '',
   'Do you really want to delete AR transaction #1?' => '',
   'Do you really want to delete GL transaction #1?' => '',
-  'Do you really want to delete this group:' => '',
+  'Do you really want to delete this group?' => '',
   'Do you really want to delete this warehouse?' => '',
   'Do you want Lx-Office to create a group for access to all functions?' => '',
   'Do you want to <b>limit</b> your search?' => '',
index 1d6cc54..6b00577 100644 (file)
@@ -549,7 +549,7 @@ $self->{texts} = {
   'Do you really want to delete AP transaction #1?' => '',
   'Do you really want to delete AR transaction #1?' => '',
   'Do you really want to delete GL transaction #1?' => '',
-  'Do you really want to delete this group:' => '',
+  'Do you really want to delete this group?' => '',
   'Do you really want to delete this warehouse?' => '',
   'Do you want Lx-Office to create a group for access to all functions?' => '',
   'Do you want to <b>limit</b> your search?' => '',
index edb30dc..cf95938 100644 (file)
--- a/menu.ini
+++ b/menu.ini
@@ -164,6 +164,7 @@ ACCESS=dunning_edit
 module=dn.pl
 action=search
 
+
 [AP]
 
 [AP--Add RFQ]
diff --git a/sql/Pg-upgrade2/add_makemodel_prices.sql b/sql/Pg-upgrade2/add_makemodel_prices.sql
new file mode 100644 (file)
index 0000000..0fffafc
--- /dev/null
@@ -0,0 +1,12 @@
+-- @tag: add_makemodel_prices
+-- @description: EK-Preis zu jedem Lieferanten speichern und das Datum der Eingabe
+-- @depends: release_2_6_1
+ALTER TABLE makemodel ADD COLUMN lastcost  numeric(15,5) ;
+ALTER TABLE makemodel ADD COLUMN lastupdate  date;
+ALTER TABLE makemodel ADD COLUMN sortorder integer;
+
+UPDATE makemodel SET sortorder = 1;
+
+--# Da noch keine Daten vorhanden, den Wert "veralten"
+UPDATE makemodel SET lastupdate = '1999-01-01';
+
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;
 }
 
index e74911e..1b558c7 100644 (file)
@@ -1,20 +1,18 @@
 [%- USE T8 %]
 [% USE HTML %]<body>
- <form name="Form" method="post" action="admin.pl">
+  <div class="listtop">[% 'Delete group' | $T8 %]: [% name %]</div>
+  <p class="message_hint">[ [% name %] ] - [% 'Do you really want to delete this group?' | $T8 %]</p>
 
+   <form name="Form" method="post" action="admin.pl">
+    <input type="hidden" name="back_nextsub" value="edit_groups">
+    <input type="submit" class="submit" name="action" value="[% 'Back' | $T8 %]">
 
-  <input type="hidden" name="group_id" value="[% HTML.escape(id) %]">
-  <input type="hidden" name="confirmed" value="1">
 
-  <div class="listtop">[% 'Delete group' | $T8 %]</div>
+    <input type="hidden" name="group_id" value="[% HTML.escape(id) %]">
+    <input type="hidden" name="confirmed" value="1">
+    <input type="hidden" name="delete_nextsub" value="delete_group">
+    <input type="submit" class="submit" name="action" value="[% 'Delete' | $T8 %]">
+   </form>
 
-  <p class="message_hint">[% 'Do you really want to delete this group:' | $T8 %] [% name %] ?</p>
-
-  <input type="hidden" name="delete_nextsub" value="delete_group">
-  <button type="button" onclick="history.back()">[% 'Back' | $T8 %]</button>
-  <input type="submit" class="submit" name="action" value="[% 'Delete' | $T8 %]">
-
- </form>
-
-</body>
+ </body>
 </html>
index 195efbc..88ced6a 100644 (file)
@@ -75,9 +75,8 @@
 
    <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 %]">
+    <input type="submit" class="submit" name="action" value="[% 'Save' | $T8 %]">
  </form>
 </body>
 </html>
index 5ef1e90..4cd24ca 100644 (file)
 
   <input name="callback" type="hidden" value="admin.pl?action=list_users">
 
+  <input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]">
   <input type="hidden" name="action" value="dispatcher">
   <input type="submit" class="submit" name="action_save_user" value="[% 'Save' | $T8 %]">
 
    <input type="hidden" name="action_save_user_as_new" id="action_save_user_as_new" value="">
    <input type="button" class="submit" id="save_as_new_button" value="[% 'Save as new' | $T8 %]">
    <input type="submit" class="submit" name="action_delete_user" value="[% 'Delete' | $T8 %]">
-   <input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]">
    <input type="hidden" name="edit" value="1">
   [% END %]
 
index c8edd60..6f50b64 100644 (file)
 
 <br>
 <input type=hidden name=action value="printer_dispatcher">
+<input type=submit class=submit name=list_printers value="[% 'Back' | $T8 %]">
 <input type=submit class=submit name=save_printer value="[% 'Save' | $T8 %]">
 
 [%- IF id %]
 <input type=submit class=submit name=delete_printer value="[% 'Delete' | $T8 %]">
 [%- END %]
-<input type=submit class=submit name=list_printers value="[% 'Back' | $T8 %]">
 
 </form>
 
index cd9b784..6ff4b5e 100644 (file)
@@ -19,9 +19,9 @@
 [%- IF all_printers.size %]
 [%- FOREACH row = all_printers %]
         <tr valign=top class="listrow[% loop.count % 2 %]">
-          <td><a href="[% edit_link %][% row.id %]">[% row.printer_description %]</a></td>
-          <td align=left>[% row.printer_command | html %]</td>
-          <td align=left>[% row.template_code | html %]</td>
+          <td>&nbsp;<a href="[% edit_link %][% row.id %]">[% row.printer_description %]</a></td>
+          <td align=left>&nbsp;[% row.printer_command | html %]</td>
+          <td align=left>&nbsp;[% row.template_code | html %]</td>
         </tr>
 [%- END %]
 [%- ELSE %]
@@ -37,8 +37,8 @@
 
 <br>
  <input type="hidden" name="action" value="printer_dispatcher">
- <input type="submit" name="add_printer" value ="[% 'Add' | $T8 %]">
  <input type="submit" name='get_login_form' value="[% 'Back' | $T8 %]">
+ <input type="submit" name="add_printer" value ="[% 'Add' | $T8 %]">
 </form>
 </body>
 </html>
index d45f1ce..0948d1b 100644 (file)
@@ -9,8 +9,8 @@
 
 <input type='hidden' name='action' value='printer_dispatcher'>
 <p>
-<input type='submit' name='list_printers' value='[% 'Continue' | $T8 %]'>
 <input type='submit' name='list_users' value='[% 'Back' | $T8 %]'>
+<input type='submit' name='list_printers' value='[% 'Continue' | $T8 %]'>
 </p>
 
 </form>
index f421e0c..cb3f225 100644 (file)
@@ -1,10 +1,12 @@
 [%- USE T8 %]
 [% USE HTML %]<body>
 
- <div class="message_error">[% IF title_error %][% title_error %][% ELSE %][% 'Error!' | $T8 %][% END %]</div>
-<p><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
+ <div class="message_error">[% IF title_error %][% title_error %][% ELSE %][% 'Error!' | $T8 %][% END %]
  <p>[% label_error %]</p>
-
+ </div>
+ <p style="text-align: left;"><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
  [%- IF SHOW_BACK_BUTTON %]
  <form>
   <p>
index 6412124..d610c39 100644 (file)
@@ -7,6 +7,9 @@
         <tr>
           <th class="listheading">[% 'Make' | $T8 %]</th>
           <th class="listheading">[% 'Model' | $T8 %]</th>
+          <th class="listheading">[% 'Last Cost' | $T8 %]</th>
+          <th class="listheading">[% 'Updated' | $T8 %]</th>
+          <th class="listheading">[% 'order' | $T8 %]</th>
         </tr>
       [%- FOREACH row = MM_DATA %]
         <tr>
             -%]
           </td>
           <td><input name="model_[% loop.count %]" size="30" value="[% HTML.escape(row.model) %]"></td>
+          <td><input type="hidden" name="old_lastcost_[% loop.count %]" value="[% LxERP.format_amount(row.lastcost, -2) %]">
+              <input name="lastcost_[% loop.count %]" size="10" value="[% LxERP.format_amount(row.lastcost, -2) %]"></td>
+          <td><input name="lastupdate_[% loop.count %]" size="10" value="[% HTML.escape(row.lastupdate) %]"></td>
+          <td><input name="sortorder_[% loop.count %]" size="3" value="[% HTML.escape(row.sortorder) %]"></td>
         </tr>
       [%- END %]
       </table>
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 %]">