Webdav: Wenn eine Pfadkomponente Leerzeichen enthielt (z.B. "Storno zu ..."), dann...
[kivitendo-erp.git] / bin / mozilla / ir.pl
index 701c91b..77f911d 100644 (file)
@@ -46,6 +46,7 @@ require "bin/mozilla/drafts.pl";
 
 sub add {
   $lxdebug->enter_sub();
+  $form->{"Watchdog::invdate,duedate,vendor,vendor_id"} = 1;
 
   return $lxdebug->leave_sub() if (load_draft_maybe());
 
@@ -227,6 +228,9 @@ sub form_header {
     $form->{salesman_id} = $form->{old_salesman_id};
   }
 
+  $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
+
+
   $form->{radier} =
     ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0;
 
@@ -1057,6 +1061,8 @@ sub use_as_template {
 
 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);
@@ -1098,6 +1104,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("vendor",  $locale->text('Vendor missing!'));
 
@@ -1141,6 +1149,7 @@ sub post {
 
   ($form->{AP})      = split /--/, $form->{AP};
   ($form->{AP_paid}) = split /--/, $form->{AP_paid};
+  $form->{storno}    = 0;
 
   $form->{id} = 0 if $form->{postasnew};