X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fam.pl;h=0ce8c2ee6d371106e68626fec8b151b91b757a06;hb=f65faf202a24a1f1316f45e3695d3d9390dc0793;hp=d251740932c8b4398d49e6dcd602b5794021625a;hpb=24e5732397bd678379297f9660d366af9164c8dd;p=kivitendo-erp.git diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index d25174093..0ce8c2ee6 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -40,6 +40,10 @@ use Data::Dumper; 1; + + +require "$form->{path}/common.pl"; + # end of main sub add { &{"add_$form->{type}"} } @@ -92,14 +96,16 @@ 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}) { + foreach my $item (@{ $form->{TAXKEY} }) { + + $item->{rate} = $item->{rate} * 100 . '%'; + + if ($item->{tax} == $form->{tax}) { $form->{selecttaxkey} .= - "{taxkey} selected>$item->{taxdescription}\n"; + "{tax} selected>$item->{taxdescription} ($item->{rate})\n"; } else { $form->{selecttaxkey} .= - "{taxkey}>$item->{taxdescription}\n"; + "{tax}>$item->{taxdescription} ($item->{rate})\n"; } } @@ -108,8 +114,9 @@ sub account_header { $taxkey = qq| | . $locale->text('Steuersatz') . qq| - $form->{selecttaxkey} - + $form->{selecttaxkey} + | . $locale->text('Gültig ab') . qq| + |; if (@{ $form->{NEWACCOUNT} }) { @@ -173,10 +180,14 @@ sub account_header { 76 => $locale->text('UStVA-Nr. 76'), 77 => $locale->text('UStVA-Nr. 77'), 80 => $locale->text('UStVA-Nr. 80'), + 81 => $locale->text('UStVA-Nr. 81 left'), + 811 => $locale->text('UStVA-Nr. 81 right'), 84 => $locale->text('UStVA-Nr. 84'), 85 => $locale->text('UStVA-Nr. 85'), 86 => $locale->text('UStVA-Nr. 86 left'), 861 => $locale->text('UStVA-Nr. 86 right'), + 89 => $locale->text('UStVA-Nr. 89 left'), + 891 => $locale->text('UStVA-Nr. 89 right'), 91 => $locale->text('UStVA-Nr. 91'), 93 => $locale->text('UStVA-Nr. 93 left'), 931 => $locale->text('UStVA-Nr. 93 right'), @@ -362,7 +373,9 @@ sub account_header { | . $locale->text('Revenue') . qq|\n | - . $locale->text('Expense') . qq| + . $locale->text('Expense') . qq| + | + . $locale->text('Costs') . qq| | @@ -490,11 +503,6 @@ sub form_footer { . $locale->text('Delete') . qq|">|; } - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } - print qq| @@ -529,36 +537,7 @@ sub list_account { $callback = "$form->{script}?action=list_account&path=$form->{path}&login=$form->{login}&password=$form->{password}"; - @column_index = qw(accno gifi_accno description debit credit link); - - $column_header{accno} = qq|| . $locale->text('Account') . qq||; - $column_header{gifi_accno} = - qq|| . $locale->text('GIFI') . qq||; - $column_header{description} = - qq|| . $locale->text('Description') . qq||; - $column_header{debit} = qq|| . $locale->text('Debit') . qq||; - $column_header{credit} = qq|| . $locale->text('Credit') . qq||; - $column_header{link} = qq|| . $locale->text('Link') . qq||; - $form->header; - $colspan = $#column_index + 1; - - print qq| - - - - - $form->{title} - - - -|; - - map { print "$column_header{$_}\n" } @column_index; - - print qq| - -|; # escape callback $callback = $form->escape($callback); @@ -577,50 +556,66 @@ sub list_account { $form->format_amount(\%myconfig, -$ca->{amount}, 2, " "); } - $ca->{link} =~ s/://og; - - if ($ca->{charttype} eq "H") { - print qq||; - - $column_data{accno} = - qq|{script}?action=edit_account&id=$ca->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{accno}|; - $column_data{gifi_accno} = - qq|{script}?action=edit_gifi&accno=$ca->{gifi_accno}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{gifi_accno} |; - $column_data{description} = qq|$ca->{description} |; - $column_data{debit} = qq| |; - $column_data{credit} = qq| |; - $column_data{link} = qq| |; - - } else { - $i++; - $i %= 2; - print qq| -|; - $column_data{accno} = - qq|{script}?action=edit_account&id=$ca->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{accno}|; - $column_data{gifi_accno} = - qq|{script}?action=edit_gifi&accno=$ca->{gifi_accno}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{gifi_accno} |; - $column_data{description} = qq|$ca->{description} |; - $column_data{debit} = qq|$ca->{debit}|; - $column_data{credit} = qq|$ca->{credit}|; - $column_data{link} = qq|$ca->{link} |; - + my @links = split( q{:}, $ca->{link}); + + $ca->{link} = q{}; + + foreach my $link (@links){ + $link = ( $link eq 'AR') ? $locale->text('Account Link AR') + : ( $link eq 'AP') ? $locale->text('Account Link AP') + : ( $link eq 'IC') ? $locale->text('Account Link IC') + : ( $link eq 'AR_amount' ) ? $locale->text('Account Link AR_amount') + : ( $link eq 'AR_paid' ) ? $locale->text('Account Link AR_paid') + : ( $link eq 'AR_tax' ) ? $locale->text('Account Link AR_tax') + : ( $link eq 'AP_amount' ) ? $locale->text('Account Link AP_amount') + : ( $link eq 'AP_paid' ) ? $locale->text('Account Link AP_paid') + : ( $link eq 'AP_tax' ) ? $locale->text('Account Link AP_tax') + : ( $link eq 'IC_sale' ) ? $locale->text('Account Link IC_sale') + : ( $link eq 'IC_cogs' ) ? $locale->text('Account Link IC_cogs') + : ( $link eq 'IC_taxpart' ) ? $locale->text('Account Link IC_taxpart') + : ( $link eq 'IC_income' ) ? $locale->text('Account Link IC_income') + : ( $link eq 'IC_expense' ) ? $locale->text('Account Link IC_expense') + : ( $link eq 'IC_taxservice' ) ? $locale->text('Account Link IC_taxservice') + : ( $link eq 'CT_tax' ) ? $locale->text('Account Link CT_tax') + : $locale->text('Unknown Link') . ': ' . $link; + + $ca->{link} .= qq|[| . $link . qq|] |; } - - map { print "$column_data{$_}\n" } @column_index; - - print "\n"; + + $ca->{startdate} =~ s/,//og; + $ca->{tk_ustva} =~ s/,//og; + $ca->{taxkey} =~ s/,//og; + $ca->{taxaccount} =~ s/,//og; + $ca->{taxdescription} =~ s/,//og; + $ca->{datevautomatik} = ($ca->{datevautomatik}) ? $locale->text('On'):q{}; + + $ca->{category} = ($ca->{category} eq 'A') ? $locale->text('Account Category A') + : ($ca->{category} eq 'E') ? $locale->text('Account Category E') + : ($ca->{category} eq 'L') ? $locale->text('Account Category L') + : ($ca->{category} eq 'I') ? $locale->text('Account Category I') + : ($ca->{category} eq 'Q') ? $locale->text('Account Category Q') + : ($ca->{category} eq 'C') ? $locale->text('Account Category C') + : ($ca->{category} eq 'G') ? $locale->text('Account Category G') + : $locale->text('Unknown Category') . ': ' . $ca->{category}; + + $ca->{link_edit_account} = + qq|$form->{script}?action=edit_account&id=$ca->{id}| + .qq|&path=$form->{path}&login=$form->{login}| + .qq|&password=$form->{password}&callback=$callback|; } - - print qq| - - - - -