X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Foe.pl;h=ad119c477af13ae579c47d92dae8d90cba2fa585;hb=d735aab3fc2987d555c63ce0dc8e24626ca30654;hp=c3242ec294a9e115dd11d16ef50bc7d28382c8d4;hpb=c607fb403082a05a5c9f16b084de5b99203bfad7;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index c3242ec29..ad119c477 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -376,6 +376,7 @@ sub form_header { ]); $TMPL_VAR{ALL_PROJECTS} = SL::DB::Manager::Project->get_all_sorted(query => \@conditions); + $form->{ALL_PROJECTS} = $TMPL_VAR{ALL_PROJECTS}; # make projects available for second row drop-down in io.pl # label subs my $employee_list_query_gen = sub { $::form->{$_[0]} ? [ or => [ id => $::form->{$_[0]}, deleted => 0 ] ] : [ deleted => 0 ] }; @@ -1146,6 +1147,7 @@ sub save_and_close { my $locale = $main::locale; check_oe_access(); + $form->mtime_ischanged('oe'); $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); @@ -1252,6 +1254,7 @@ sub save { check_oe_access(); + $form->mtime_ischanged('oe'); $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); @@ -1403,6 +1406,8 @@ sub invoice { check_oe_access(); check_oe_conversion_to_sales_invoice_allowed(); + $form->mtime_ischanged('oe'); + $main::auth->assert($form->{type} eq 'purchase_order' || $form->{type} eq 'request_quotation' ? 'vendor_invoice_edit' : 'invoice_edit'); $form->{old_salesman_id} = $form->{salesman_id}; @@ -1750,6 +1755,8 @@ sub purchase_order { my $locale = $main::locale; check_oe_access(); + $form->mtime_ischanged('oe'); + $main::auth->assert('purchase_order_edit'); $form->{sales_order_to_purchase_order} = 0; @@ -1787,6 +1794,8 @@ sub sales_order { my $locale = $main::locale; check_oe_access(); + + $form->mtime_ischanged('oe'); $main::auth->assert('sales_order_edit'); if ($form->{type} eq "purchase_order") { @@ -1877,6 +1886,8 @@ sub delivery_order { my $form = $main::form; my %myconfig = %main::myconfig; + $form->mtime_ischanged('oe'); + if ($form->{type} =~ /^sales/) { $main::auth->assert('sales_delivery_order_edit'); @@ -1933,9 +1944,11 @@ sub e_mail { $main::lxdebug->enter_sub(); my $form = $main::form; + my $locale = $main::locale; check_oe_access(); + $form->mtime_ischanged('oe','mail'); $form->{print_and_save} = 1; my $saved_form = save_form(); @@ -2062,6 +2075,7 @@ sub save_periodic_invoices_config { my $config = { active => $::form->{active} ? 1 : 0, terminated => $::form->{terminated} ? 1 : 0, + direct_debit => $::form->{direct_debit} ? 1 : 0, periodicity => (any { $_ eq $::form->{periodicity} } @SL::DB::PeriodicInvoicesConfig::PERIODICITIES) ? $::form->{periodicity} : 'm', order_value_periodicity => (any { $_ eq $::form->{order_value_periodicity} } ('p', @SL::DB::PeriodicInvoicesConfig::ORDER_VALUE_PERIODICITIES)) ? $::form->{order_value_periodicity} : 'p', start_date_as_date => $::form->{start_date_as_date},