X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fir.pl;h=9baa523a28bc585a8f36e81f20ef53f2940ff854;hb=9d1e95b0eb88a54c083815ffd2db30227c2acf4a;hp=6038276b69e7fbd02cfadb909109e7af2b709280;hpb=b3501bdfd1971fd17d06e47cdf994c7545c3c13c;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 6038276b6..9baa523a2 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -36,6 +36,7 @@ use SL::PE; require "$form->{path}/io.pl"; require "$form->{path}/arap.pl"; +require "$form->{path}/common.pl"; 1; @@ -55,7 +56,11 @@ sub add { sub edit { $lxdebug->enter_sub(); - + + # show history button + $form->{javascript} = qq||; + #/show hhistory button + $form->{title} = $locale->text('Edit Vendor Invoice'); &invoice_links; @@ -112,7 +117,7 @@ sub invoice_links { } # currencies - @curr = split /:/, $form->{currencies}; + @curr = split(/:/, $form->{currencies}); chomp $curr[0]; $form->{defaultcurrency} = $curr[0]; @@ -189,6 +194,7 @@ sub prepare_invoice { map { $form->{$_} =~ s/\"/"/g } qw(invnumber ordnumber quonumber); + my $i = 0; foreach $ref (@{ $form->{invoice_details} }) { $i++; map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref}; @@ -218,7 +224,7 @@ sub form_header { $lxdebug->enter_sub(); # set option selected - foreach $item (qw(AP vendor currency department contact)) { + foreach $item (qw(AP vendor currency department)) { $form->{"select$item"} =~ s/ selected//; $form->{"select$item"} =~ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/; @@ -238,20 +244,6 @@ sub form_header { $form->{creditremaining} = $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0"); - #build contacts - if ($form->{all_contacts}) { - - $form->{selectcontact} = ""; - foreach $item (@{ $form->{all_contacts} }) { - if ($form->{cp_id} == $item->{cp_id}) { - $form->{selectcontact} .= - ""; + ""; } else { $form->{selecttaxzone} .= - ""; + ""; } } @@ -291,11 +313,6 @@ sub form_header { $form->{selecttaxzone} =~ s/value=$form->{taxzone_id}/value=$form->{taxzone_id} selected/; } } - if ($form->{rowcount} >1) { - $form->{selecttaxzone} =~ /