Verwaltung von Kundenquellen entfernt
authorMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 31 Jan 2017 15:23:21 +0000 (16:23 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 31 Jan 2017 15:53:28 +0000 (16:53 +0100)
Diese Funktionalität wird in der ERP nicht genutzt.

SL/AM.pm
bin/mozilla/am.pl
locale/de/all
menus/user/00-erp.yaml
templates/webpages/am/lead_header.html [deleted file]
templates/webpages/am/lead_list.html [deleted file]

index 7818fb1..2aa1ad2 100644 (file)
--- a/SL/AM.pm
+++ b/SL/AM.pm
@@ -410,92 +410,6 @@ sub _delete_account {
   return 1;
 }
 
-sub lead {
-  $main::lxdebug->enter_sub();
-
-  my ($self, $myconfig, $form) = @_;
-
-  my $dbh = SL::DB->client->dbh;
-
-  my $query = qq|SELECT id, lead
-                 FROM leads
-                 ORDER BY 2|;
-
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
-    push @{ $form->{ALL} }, $ref;
-  }
-
-  $sth->finish;
-
-  $main::lxdebug->leave_sub();
-}
-
-sub get_lead {
-  $main::lxdebug->enter_sub();
-
-  my ($self, $myconfig, $form) = @_;
-
-  my $dbh = SL::DB->client->dbh;
-
-  my $query =
-    qq|SELECT l.id, l.lead | .
-    qq|FROM leads l | .
-    qq|WHERE l.id = ?|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute($form->{id}) || $form->dberror($query . " ($form->{id})");
-
-  my $ref = $sth->fetchrow_hashref("NAME_lc");
-
-  map { $form->{$_} = $ref->{$_} } keys %$ref;
-
-  $sth->finish;
-
-  $main::lxdebug->leave_sub();
-}
-
-sub save_lead {
-  $main::lxdebug->enter_sub();
-
-  my ($self, $myconfig, $form) = @_;
-  my ($query);
-
-  my $dbh = SL::DB->client->dbh;
-
-  my @values = ($form->{description});
-  # id is the old record
-  if ($form->{id}) {
-    $query = qq|UPDATE leads SET
-                lead = ?
-                WHERE id = ?|;
-    push(@values, $form->{id});
-  } else {
-    $query = qq|INSERT INTO leads
-                (lead)
-                VALUES (?)|;
-  }
-  do_query($form, $dbh, $query, @values);
-
-  $main::lxdebug->leave_sub();
-}
-
-sub delete_lead {
-  $main::lxdebug->enter_sub();
-
-  my ($self, $myconfig, $form) = @_;
-  my ($query);
-
-  SL::DB->client->with_transaction(sub {
-    $query = qq|DELETE FROM leads WHERE id = ?|;
-    do_query($form, SL::DB->client->dbh, $query, $form->{id});
-    1;
-  }) or do { die SL::DB->client->error };
-
-  $main::lxdebug->leave_sub();
-}
-
 sub language {
   $main::lxdebug->enter_sub();
 
index 5a3b742..7f0441d 100644 (file)
@@ -614,103 +614,6 @@ sub delete_account {
   $main::lxdebug->leave_sub();
 }
 
-sub add_lead {
-  $main::lxdebug->enter_sub();
-
-  my $form     = $main::form;
-
-  $main::auth->assert('config');
-
-  $form->{title} = "Add";
-
-  $form->{callback} = "am.pl?action=add_lead" unless $form->{callback};
-
-  &lead_header;
-  &form_footer;
-
-  $main::lxdebug->leave_sub();
-}
-
-sub edit_lead {
-  $main::lxdebug->enter_sub();
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-
-  $main::auth->assert('config');
-
-  $form->{title} = "Edit";
-
-  AM->get_lead(\%myconfig, \%$form);
-
-  &lead_header;
-
-  $form->{orphaned} = 1;
-  &form_footer;
-
-  $main::lxdebug->leave_sub();
-}
-
-sub list_lead {
-  $::lxdebug->enter_sub;
-  $::auth->assert('config');
-
-  AM->lead(\%::myconfig, $::form);
-
-  $::form->{callback} = "am.pl?action=list_lead";
-  $::form->{title}    = $::locale->text('Lead');
-
-  $::form->header;
-  print $::form->parse_html_template('am/lead_list');
-
-  $::lxdebug->leave_sub;
-}
-
-sub lead_header {
-  $::lxdebug->enter_sub;
-  $::auth->assert('config');
-
-  # $locale->text('Add Lead')
-  # $locale->text('Edit Lead')
-  $::form->{title} = $::locale->text("$::form->{title} Lead");
-
-  $::form->header;
-  print $::form->parse_html_template('am/lead_header');
-
-  $::lxdebug->leave_sub;
-}
-
-sub save_lead {
-  $main::lxdebug->enter_sub();
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-  my $locale   = $main::locale;
-
-  $main::auth->assert('config');
-
-  $form->isblank("description", $locale->text('Description missing!'));
-  AM->save_lead(\%myconfig, \%$form);
-  $form->redirect($locale->text('lead saved!'));
-
-  $main::lxdebug->leave_sub();
-}
-
-sub delete_lead {
-  $main::lxdebug->enter_sub();
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-  my $locale   = $main::locale;
-
-  $main::auth->assert('config');
-
-  AM->delete_lead(\%myconfig, \%$form);
-  $form->redirect($locale->text('lead deleted!'));
-
-  $main::lxdebug->leave_sub();
-}
-
 sub add_language {
   $main::lxdebug->enter_sub();
 
index 8ac98c2..6ab5746 100755 (executable)
@@ -161,7 +161,6 @@ $self->{texts} = {
   'Add Follow-Up for #1'        => 'Wiedervorlage f&uuml;r #1 erstellen',
   'Add General Ledger Transaction' => 'Dialogbuchen',
   'Add Language'                => 'Sprache hinzufügen',
-  'Add Lead'                    => 'Kundenquelle erfassen',
   'Add Letter'                  => 'Brief hinzufügen',
   'Add Part'                    => 'Ware erfassen',
   'Add Price Factor'            => 'Preisfaktor erfassen',
@@ -1068,7 +1067,6 @@ $self->{texts} = {
   'Edit Follow-Up for #1'       => 'Wiedervorlage f&uuml;r #1 bearbeiten',
   'Edit General Ledger Transaction' => 'Buchung im Hauptbuch bearbeiten',
   'Edit Language'               => 'Sprache bearbeiten',
-  'Edit Lead'                   => 'Kundenquelle bearbeiten',
   'Edit Letter'                 => 'Brief bearbeiten',
   'Edit Part'                   => 'Ware bearbeiten',
   'Edit Preferences for #1'     => 'Einstellungen von #1 bearbeiten',
@@ -1627,8 +1625,6 @@ $self->{texts} = {
   'Last transaction'            => 'Letzte Buchung',
   'Lastcost'                    => 'Einkaufspreis',
   'Lastcost (with X being a number)' => 'Einkaufspreis (X ist eine fortlaufende Zahl)',
-  'Lead'                        => 'Kundenquelle',
-  'Leads'                       => 'Kundenquellen',
   'Left'                        => 'Links',
   'Letter'                      => 'Brief',
   'Letter Draft'                => 'Briefentwurf',
@@ -3668,8 +3664,6 @@ $self->{texts} = {
   'kivitendo v#1 administration' => 'kivitendo v#1 Administration',
   'kivitendo website (external)' => 'kivitendo-Webseite (extern)',
   'kivitendo will then update the database automatically.' => 'kivitendo wird die Datenbank daraufhin automatisch aktualisieren.',
-  'lead deleted!'               => 'Kundenquelle gelöscht',
-  'lead saved!'                 => 'Kundenquelle geichert',
   'letters_list'                => 'briefliste',
   'list_of_payments'            => 'zahlungsausgaenge',
   'list_of_receipts'            => 'zahlungseingaenge',
index aaa3e8e..1b99707 100644 (file)
   order: 1400
   params:
     action: Business/list
-- parent: system
-  id: system_leads
-  name: Leads
-  order: 1500
-  module: am.pl
-  params:
-    action: list_lead
 - parent: system
   id: system_project_types
   name: Project Types
diff --git a/templates/webpages/am/lead_header.html b/templates/webpages/am/lead_header.html
deleted file mode 100644 (file)
index f29b0ec..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[%- USE HTML %]
-[%- USE T8 %]
-<h1>[% title | html %]</h1>
-
-<form method=post action=am.pl>
-
-<input type=hidden name=id value='[% id | html %]'>
-<input type=hidden name=type value=lead>
-
-<table width=100%>
-  <tr>
-    <th align=right>[% 'Description' | $T8 %]</th>
-    <td><input name=description size=50 value="[% lead | html %]"></td>
-  </tr>
-    <td colspan=2><hr size=3 noshade></td>
-  </tr>
-</table>
diff --git a/templates/webpages/am/lead_list.html b/templates/webpages/am/lead_list.html
deleted file mode 100644 (file)
index 1bdac5a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-[%- USE T8 %]
-[%- USE HTML %]
-[%- USE LxERP %]
-[%- USE L %]
-<h1>[% title | html %]</h1>
-
-<table width=100%>
-  <tr class=listheading>
-    <th class=listheading width=100%>[% 'Description' | $T8 %]</th>
-  </tr>
-[%- FOREACH row = ALL  %]
-  <tr valign=top class=listrow[% loop.count % 2 %]>
-    <td><a href="am.pl?action=edit_lead&id=[% row.id | html %]&callback=[% callback | html %]">[% row.lead | html %]</a></td>
-  </tr>
-[%- END %]
-  <tr>
-  <td><hr size=3 noshade></td>
-  </tr>
-</table>
-
-<br>
-
-  <a href="am.pl?action=add&type=lead&callback=[% HTML.url(callback) %]">[%- 'Add' | $T8 %]</a>