X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fam.pl;h=d6ccfe2dfac35cda3e8dd42393d1444a0c1c2c77;hb=bfaef835c20ba69d5ea4242e67a0dcb4fcbd4f50;hp=70a7a387ea1927cdbdb67d9e375c9d86c568108f;hpb=595dc614f285c4ad859ab410e2c0e32026dd2dce;p=kivitendo-erp.git diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 70a7a387e..d6ccfe2df 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -40,6 +40,8 @@ use Data::Dumper; 1; +require "$form->{path}/common.pl"; + # end of main sub add { &{"add_$form->{type}"} } @@ -92,14 +94,13 @@ sub account_header { $form->{description} =~ s/\"/"/g; if (@{ $form->{TAXKEY} }) { - $form->{selecttaxkey} = "Keine Steuer 0%\n"; foreach $item (@{ $form->{TAXKEY} }) { - if ($item->{taxkey} == $form->{taxkey_id}) { + if ($item->{tax} == $form->{tax}) { $form->{selecttaxkey} .= - "{taxkey} selected>$item->{taxdescription}\n"; + "{tax} selected>$item->{taxdescription}\n"; } else { $form->{selecttaxkey} .= - "{taxkey}>$item->{taxdescription}\n"; + "{tax}>$item->{taxdescription}\n"; } } @@ -108,8 +109,9 @@ sub account_header { $taxkey = qq| | . $locale->text('Steuersatz') . qq| - $form->{selecttaxkey} - + $form->{selecttaxkey} + | . $locale->text('Gültig ab') . qq| + |; if (@{ $form->{NEWACCOUNT} }) { @@ -362,7 +364,9 @@ sub account_header { | . $locale->text('Revenue') . qq|\n | - . $locale->text('Expense') . qq| + . $locale->text('Expense') . qq| + | + . $locale->text('Costs') . qq| | @@ -1088,6 +1092,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| + + + + + $form->{title} + + + +|; + + 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|{script}?action=edit_lead&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{lead}|; + + map { print "$column_data{$_}\n" } @column_index; + + print qq| + +|; + } + + print qq| + + + + + + +{script}> + + + + + +{path}> +{login}> +{password}> + +|; + + if ($form->{menubar}) { + require "$form->{path}/menu.pl"; + &menubar; + } + + print qq| + + + +