X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/e0f5deeae4cdcf3faf3bc68a202f20ec6cd9af2e..46aa98a931708ad5ee5003437af92f0358e582b3:/bin/mozilla/gl.pl diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 42ac4a008..77591f5d2 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -24,7 +24,8 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1335, USA. #====================================================================== # # Genereal Ledger @@ -40,7 +41,6 @@ use List::Util qw(sum); use SL::FU; use SL::GL; use SL::IS; -use SL::PE; use SL::ReportGenerator; use SL::DBUtils qw(selectrow_query selectall_hashref_query); @@ -210,7 +210,7 @@ sub edit { sub search { $::lxdebug->enter_sub; - $::auth->assert('gl_transactions'); + $::auth->assert('general_ledger | gl_transactions'); $::form->all_departments(\%::myconfig); $::form->get_lists( @@ -249,7 +249,7 @@ sub create_subtotal_row { sub generate_report { $main::lxdebug->enter_sub(); - $main::auth->assert('gl_transactions'); + $main::auth->assert('general_ledger | gl_transactions'); my $form = $main::form; my %myconfig = %main::myconfig; @@ -510,6 +510,12 @@ sub generate_report { $main::lxdebug->leave_sub(); } +sub show_draft { + $::form->{transdate} = DateTime->today_local->to_kivitendo if !$::form->{transdate}; + $::form->{gldate} = $::form->{transdate} if !$::form->{gldate}; + update(); +} + sub update { $main::lxdebug->enter_sub();