X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fap.pl;h=74285e73ea51cd0b4e7241df4a7edc3bccc56d0f;hb=4099d0e8f2d10fecac8bdccb82c900cb7059ab98;hp=06541ef05b4a147b8a38b40786dd340a8863f156;hpb=a873249c8c3c32006540d8636102c195dd4d9448;p=kivitendo-erp.git diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 06541ef05..74285e73e 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -92,7 +92,7 @@ sub add { $form->{title} = "Add"; - $form->{callback} = "ap.pl?action=add" unless $form->{callback}; + $form->{callback} = "ap.pl?action=add&DONT_LOAD_DRAFT=1" unless $form->{callback}; AP->get_transdate(\%myconfig, $form); $form->{initial_transdate} = $form->{transdate}; @@ -244,17 +244,10 @@ sub form_header { $form->{forex} = $form->check_exchangerate( \%myconfig, $form->{currency}, $form->{transdate}, 'sell'); $form->{exchangerate} = $form->{forex} if $form->{forex}; - # format amounts - $form->{exchangerate} = - $form->format_amount(\%myconfig, $form->{exchangerate}); - if ($form->{exchangerate} == 0) { - $form->{exchangerate} = ""; - } - $form->{creditlimit} = - $form->format_amount(\%myconfig, $form->{creditlimit}, 0, "0"); - $form->{creditremaining} = - $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0"); + $form->{exchangerate} = $form->{exchangerate} ? $form->format_amount(\%myconfig, $form->{exchangerate}) : ''; + $form->{creditlimit} = $form->format_amount(\%myconfig, $form->{creditlimit}, 0, "0"); + $form->{creditremaining} = $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0"); my $exchangerate = qq| {forex}>