From: Holger Lindemann Date: Fri, 24 Nov 2006 22:40:00 +0000 (+0000) Subject: Kundenquelle (Leads) eingeführt X-Git-Tag: release-2.4.0^2~167 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=baf92f533975d1224700a85d0b8ededd8246d09b;p=kivitendo-erp.git Kundenquelle (Leads) eingeführt --- diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 70a7a387e..d7373d78b 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -1088,6 +1088,189 @@ sub delete_department { $lxdebug->leave_sub(); } +sub add_lead { + $lxdebug->enter_sub(); + + $form->{title} = "Add"; + + $form->{callback} = + "$form->{script}?action=add_lead&path=$form->{path}&login=$form->{login}&password=$form->{password}" + unless $form->{callback}; + + &lead_header; + &form_footer; + + $lxdebug->leave_sub(); +} + +sub edit_lead { + $lxdebug->enter_sub(); + + $form->{title} = "Edit"; + + AM->get_lead(\%myconfig, \%$form); + + &lead_header; + + $form->{orphaned} = 1; + &form_footer; + + $lxdebug->leave_sub(); +} + +sub list_lead { + $lxdebug->enter_sub(); + + AM->lead(\%myconfig, \%$form); + + $form->{callback} = + "$form->{script}?action=list_lead&path=$form->{path}&login=$form->{login}&password=$form->{password}"; + + $callback = $form->escape($form->{callback}); + + $form->{title} = $locale->text('Lead'); + + @column_index = qw(description cost profit); + + $column_header{description} = + qq|| + . $locale->text('Description') + . qq||; + + $form->header; + + print qq| + + + + + + + + +|; + + map { print "$column_header{$_}\n" } @column_index; + + print qq| + +|; + + foreach $ref (@{ $form->{ALL} }) { + + $i++; + $i %= 2; + + print qq| + +|; + + $lead = $ref->{lead}; + + $column_data{description} = + qq||; + + map { print "$column_data{$_}\n" } @column_index; + + print qq| + +|; + } + + print qq| + + + +
$form->{title}
{script}?action=edit_lead&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{lead}

+ +
+
{script}> + + + + + +{path}> +{login}> +{password}> + +|; + + if ($form->{menubar}) { + require "$form->{path}/menu.pl"; + &menubar; + } + + print qq| +
+ + + +|; + + $lxdebug->leave_sub(); +} + +sub lead_header { + $lxdebug->enter_sub(); + + $form->{title} = $locale->text("$form->{title} Lead"); + + # $locale->text('Add Lead') + # $locale->text('Edit Lead') + + $form->{description} =~ s/\"/"/g; + + $description = + qq||; + + $form->header; + + print qq| + + +
{script}> + +{id}> + + + + + + + + + + + + + +
$form->{title}
| . $locale->text('Description') . qq|$description

+|; + + $lxdebug->leave_sub(); +} + +sub save_lead { + $lxdebug->enter_sub(); + + $form->isblank("description", $locale->text('Description missing!')); + AM->save_lead(\%myconfig, \%$form); + $form->redirect($locale->text('lead saved!')); + + $lxdebug->leave_sub(); +} + +sub delete_lead { + $lxdebug->enter_sub(); + + AM->delete_lead(\%myconfig, \%$form); + $form->redirect($locale->text('lead deleted!')); + + $lxdebug->leave_sub(); +} + sub add_business { $lxdebug->enter_sub();