X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fam.pl;h=0ce8c2ee6d371106e68626fec8b151b91b757a06;hb=f65faf202a24a1f1316f45e3695d3d9390dc0793;hp=d25eb7e308977f6f49a232dfe6d1d4a4949a39af;hpb=9a795b8553bd43a379646bc6244c618e570556e9;p=kivitendo-erp.git diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index d25eb7e30..0ce8c2ee6 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -96,13 +96,16 @@ sub account_header { $form->{description} =~ s/\"/"/g; if (@{ $form->{TAXKEY} }) { - foreach $item (@{ $form->{TAXKEY} }) { + foreach my $item (@{ $form->{TAXKEY} }) { + + $item->{rate} = $item->{rate} * 100 . '%'; + if ($item->{tax} == $form->{tax}) { $form->{selecttaxkey} .= - "{tax} selected>$item->{taxdescription}\n"; + "{tax} selected>$item->{taxdescription} ($item->{rate})\n"; } else { $form->{selecttaxkey} .= - "{tax}>$item->{taxdescription}\n"; + "{tax}>$item->{taxdescription} ($item->{rate})\n"; } } @@ -1110,11 +1113,9 @@ sub list_business { |; $discount = - $form->format_amount(\%myconfig, $ref->{discount} * 100, 1, " "); + $form->format_amount(\%myconfig, $ref->{discount} * 100); $description = - ($ref->{salesman}) - ? "$ref->{description}" - : "$ref->{description}"; + $ref->{description}; $column_data{description} = qq|{script}?action=edit_business&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$description|; $column_data{discount} = qq|$discount|; @@ -1164,7 +1165,6 @@ sub business_header { $lxdebug->enter_sub(); $form->{title} = $locale->text("$form->{title} Business"); - $form->{salesman} = "checked" if $form->{salesman}; # $locale->text('Add Business') # $locale->text('Edit Business') @@ -1200,10 +1200,6 @@ sub business_header { | . $locale->text('Customernumberinit') . qq| {customernumberinit}> - - | . $locale->text('Salesman') . qq| - {salesman}> - @@ -1216,6 +1212,7 @@ sub save_business { $lxdebug->enter_sub(); $form->isblank("description", $locale->text('Description missing!')); + $form->{discount} = $form->parse_amount(\%myconfig, $form->{discount}) / 100; AM->save_business(\%myconfig, \%$form); $form->redirect($locale->text('Business saved!')); @@ -1645,7 +1642,7 @@ sub list_buchungsgruppe { $column_data{up} = qq|| . qq|| . - qq|| . + qq|| . qq||; } else { $column_data{up} = qq| |; @@ -1658,7 +1655,7 @@ sub list_buchungsgruppe { $column_data{down} = qq|| . qq|| . - qq|| . + qq|| . qq||; } @@ -2091,7 +2088,6 @@ sub delete_printer { $lxdebug->leave_sub(); } - sub add_payment { $lxdebug->enter_sub(); @@ -2213,7 +2209,7 @@ sub list_payment { $column_data{up} = qq|| . qq|| . - qq|| . + qq|| . qq||; } else { $column_data{up} = qq| |; @@ -2226,7 +2222,7 @@ sub list_payment { $column_data{down} = qq|| . qq|| . - qq|| . + qq|| . qq||; } @@ -2416,209 +2412,6 @@ sub swap_payment_terms { $lxdebug->leave_sub(); } -sub add_sic { - $lxdebug->enter_sub(); - - $form->{title} = "Add"; - - $form->{callback} = - "$form->{script}?action=add_sic&path=$form->{path}&login=$form->{login}&password=$form->{password}" - unless $form->{callback}; - - &sic_header; - &form_footer; - - $lxdebug->leave_sub(); -} - -sub edit_sic { - $lxdebug->enter_sub(); - - $form->{title} = "Edit"; - - AM->get_sic(\%myconfig, \%$form); - - &sic_header; - - $form->{orphaned} = 1; - &form_footer; - - $lxdebug->leave_sub(); -} - -sub list_sic { - $lxdebug->enter_sub(); - - AM->sic(\%myconfig, \%$form); - - $form->{callback} = - "$form->{script}?action=list_sic&path=$form->{path}&login=$form->{login}&password=$form->{password}"; - - $callback = $form->escape($form->{callback}); - - $form->{title} = $locale->text('Standard Industrial Codes'); - - @column_index = qw(code description); - - $column_header{code} = - qq|| . $locale->text('Code') . qq||; - $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; - - if ($ref->{sictype} eq 'H') { - print qq| - -|; - $column_data{code} = - qq|{script}?action=edit_sic&code=$ref->{code}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{code}|; - $column_data{description} = qq|$ref->{description}|; - - } else { - print qq| - -|; - - $column_data{code} = - qq|{script}?action=edit_sic&code=$ref->{code}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{code}|; - $column_data{description} = qq|$ref->{description}|; - - } - - map { print "$column_data{$_}\n" } @column_index; - - print qq| - -|; - } - - print qq| - - - - - - - - - -{script}> - - - - - -{path}> -{login}> -{password}> - - - - - - -