Diese Funktionalität wird in der ERP nicht genutzt.
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();
$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();
'Add Follow-Up for #1' => 'Wiedervorlage fü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',
'Edit Follow-Up for #1' => 'Wiedervorlage fü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',
'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',
'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',
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
+++ /dev/null
-[%- 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>
+++ /dev/null
-[%- 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>