X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=2d833b6b7cf8a20beeed209630f7cd3c551c6747;hb=9e152755a340c813514eb132de27349ae7a9e028;hp=51c7def7588836d90fe7af0d608f7a720102ee14;hpb=0bf9f21482c4581f8cea90cc8d847f876682302f;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 51c7def75..2d833b6b7 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -94,14 +94,6 @@ sub edit { $form->{javascript} = qq||; #/show hhistory button - if ($form->{type} eq "credit_note") { - $form->{title} = $locale->text('Edit Credit Note'); - $form->{title} = $locale->text('Edit Storno Credit Note') if $form->{storno}; - } else { - $form->{title} = $locale->text('Edit Sales Invoice'); - $form->{title} = $locale->text('Edit Storno Invoice') if $form->{storno}; - } - my ($language_id, $printer_id); if ($form->{print_and_post}) { $form->{action} = "print"; @@ -109,7 +101,16 @@ sub edit { $language_id = $form->{language_id}; $printer_id = $form->{printer_id}; } + &invoice_links; + if ($form->{type} eq "credit_note") { + $form->{title} = $locale->text('Edit Credit Note'); + $form->{title} = $locale->text('Edit Storno Credit Note') if $form->{storno}; + } else { + $form->{title} = $locale->text('Edit Sales Invoice'); + $form->{title} = $locale->text('Edit Storno Invoice') if $form->{storno}; + } + &prepare_invoice; if ($form->{print_and_post}) { $form->{language_id} = $language_id; @@ -332,7 +333,7 @@ sub form_header { my @values = map { $_ } @{ $form->{ALL_CURRENCIES} }; my %labels = map { $_ => $_ } @{ $form->{ALL_CURRENCIES} }; $form->{currency} = $form->{defaultcurrency} unless $form->{currency}; - $TMPL_VAR{show_exchangerate} = $form->{currency} ne $form->{defaultcurrency}; + $form->{show_exchangerate} = $form->{currency} ne $form->{defaultcurrency}; $TMPL_VAR{currencies} = NTI($::cgi->popup_menu('-name' => 'currency', '-default' => $form->{"currency"}, '-values' => \@values, '-labels' => \%labels)) if scalar @values; push @custom_hiddens, "forex"; @@ -472,7 +473,7 @@ sub update { $main::auth->assert('invoice_edit'); - my ($recursive_call) = shift; + my ($recursive_call) = @_; $form->{exchangerate} = $form->parse_amount(\%myconfig, $form->{exchangerate}) unless $recursive_call; @@ -915,7 +916,8 @@ sub credit_note { $form->{title} = $locale->text('Add Credit Note'); $form->{script} = 'is.pl'; - + # Bei Gutschriften bezug zur Rechnungsnummer + $form->{invnumber_for_credit_note} = $form->{invnumber}; # bo creates the id, reset it map { delete $form->{$_} } qw(id invnumber subject message cc bcc printed emailed queued);