X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=0b7e00088a99e762ecd9687daff7187434acd64e;hb=796b3881fae7c5f5feacfc5914a2d47cb85e18e6;hp=9fbbb9efe045f310c9434ab8104563b25800e4c0;hpb=0cb4ad8c4f693d746e9d9fa5da900d4accd7119d;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 9fbbb9efe..0b7e00088 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -302,7 +302,7 @@ sub form_header { } } } - + $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); $form->{radier} = ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0; @@ -1031,6 +1031,9 @@ if ($form->{type} eq "credit_note") { $form->{"exchangerate_$i"} = $form->format_amount(\%myconfig, $form->{"exchangerate_$i"}); + if ($form->{"exchangerate_$i"} == 0) { + $form->{"exchangerate_$i"} = ""; + } $exchangerate = qq| |; if ($form->{currency} ne $form->{defaultcurrency}) { if ($form->{"forex_$i"}) { @@ -1168,11 +1171,16 @@ if ($form->{type} eq "credit_note") { . Q($form->{id}) . qq|);" name="history" id="history" value="| . $locale->text('history') - . qq|">|; + . qq|"> |; } # /button for saving history - - + + # mark_as_paid button + if($form->{id} ne "") { + print qq||; + } + # /mark_as_paid button print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) . qq| @@ -1193,6 +1201,12 @@ print qq| $lxdebug->leave_sub(); } +sub mark_as_paid { + $lxdebug->enter_sub(); + &mark_as_paid_common(\%myconfig,"ar"); + $lxdebug->leave_sub(); +} + sub update { $lxdebug->enter_sub(); @@ -1368,6 +1382,8 @@ sub update { sub post_payment { $lxdebug->enter_sub(); + + $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); for $i (1 .. $form->{paidaccounts}) { if ($form->{"paid_$i"}) { $datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig); @@ -1399,6 +1415,8 @@ sub post_payment { sub post { $lxdebug->enter_sub(); + + $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); $form->isblank("invdate", $locale->text('Invoice Date missing!')); $form->isblank("customer", $locale->text('Customer missing!')); @@ -1445,6 +1463,7 @@ sub post { ($form->{AR}) = split /--/, $form->{AR}; ($form->{AR_paid}) = split /--/, $form->{AR_paid}; + $form->{storno} = 0; $form->{label} = $locale->text('Invoice'); @@ -1542,7 +1561,6 @@ sub preview { $form->{preview} = 1; $old_form = new Form; for (keys %$form) { $old_form->{$_} = $form->{$_} } - $old_form->{rowcount}++; &print_form($old_form); $lxdebug->leave_sub();