X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fis.pl;h=a83e4bcc7e55682fa3208cd9a2cd7af001ce4995;hb=6573d4a45ddef660c04b34e37409bd1d90ded054;hp=e7515e1d0dc75c61a3f61d5db59d0fc88ef21f9d;hpb=d8e323bbf44a0759359d1b727ce6335e7423b22f;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index e7515e1d0..a83e4bcc7 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -378,6 +378,7 @@ sub form_header { shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2 shiptocp_gender message email subject cc bcc taxaccounts cursor_fokus convert_from_do_ids convert_from_oe_ids + show_details ), @custom_hiddens, map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}]; @@ -817,6 +818,7 @@ sub use_as_new { $form->{rowcount}--; $form->{invdate} = $form->current_date(\%myconfig); $form->{duedate} = $form->get_duedate(\%myconfig, $form->{invdate}) || $form->{invdate}; + $form->{employee_id} = SL::DB::Manager::Employee->current->id; # remember pricegroups for "use as new" IS->get_pricegroups_for_parts(\%myconfig, \%$form); @@ -843,6 +845,9 @@ sub storno { if (IS->has_storno(\%myconfig, $form, "ar")) { $form->error($locale->text("Invoice has already been storno'd!")); } + if ($form->datetonum($form->{invdate}, \%myconfig) <= $form->datetonum($form->{closedto}, \%myconfig)) { + $form->error($locale->text('Cannot storno invoice for a closed period!')); + } map({ my $key = $_; delete($form->{$key}) unless (grep({ $key eq $_ } qw(id login password type))); } keys(%{ $form })); @@ -1018,6 +1023,10 @@ sub yes { $main::lxdebug->leave_sub(); } +sub post_and_e_mail { + e_mail(); +}; + sub e_mail { $main::lxdebug->enter_sub();