X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=2d833b6b7cf8a20beeed209630f7cd3c551c6747;hb=9e152755a340c813514eb132de27349ae7a9e028;hp=07b40d4d5b8cd5025a7add8d2d475a040b42e662;hpb=3a94f4d2dd9a835d4a7007e1b999ea00b3c4e1cd;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 07b40d4d5..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; @@ -132,8 +133,8 @@ sub invoice_links { $form->{vc} = 'customer'; # create links - $form->{webdav} = $::lx_office_conf{system}->{webdav}; - $form->{lizenzen} = $::lx_office_conf{system}->{lizenzen}; + $form->{webdav} = $::lx_office_conf{features}->{webdav}; + $form->{lizenzen} = $::lx_office_conf{features}->{lizenzen}; $form->create_links("AR", \%myconfig, "customer"); @@ -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; @@ -561,7 +562,7 @@ sub update { $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"}); - if ($::lx_office_conf{system}->{lizenzen}) { + if ($::lx_office_conf{features}->{lizenzen}) { if ($form->{"inventory_accno_$i"} ne "") { $form->{"lizenzen_$i"} = qq||; foreach my $item (@{ $form->{LIZENZEN}{ $form->{"id_$i"} } }) { @@ -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);