]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/is.pl
booking roundings to new standard-accounts
[mfinanz.git] / bin / mozilla / is.pl
index 49b0c1e04c14fadfab3ed32ed5e90719a2d165b6..bbbd157a3135cf2ad601c601ed8b7bc28f99180f 100644 (file)
@@ -463,6 +463,10 @@ sub form_footer {
     }
   }
 
+  my $total = $form->round_amount( $form->{invtotal}, 2, 1 );
+  $form->{rounding} = $form->round_amount( $total-$form->{invtotal}, 2 );
+  $form->{invtotal} = $total;
+
   # follow ups
   if ($form->{id}) {
     $form->{follow_ups}            = FU->follow_ups('trans_id' => $form->{id}) || [];
@@ -682,6 +686,7 @@ sub post_payment {
 
   $main::auth->assert('invoice_edit');
 
+  $form->mtime_ischanged('ar') ;
   my $invdate = $form->datetonum($form->{invdate}, \%myconfig);
 
   $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
@@ -737,6 +742,7 @@ sub post {
   my $locale   = $main::locale;
 
   $main::auth->assert('invoice_edit');
+  $form->mtime_ischanged('ar');
 
   $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
   $form->isblank("invdate",  $locale->text('Invoice Date missing!'));