X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fgl.pl;h=ea94a28be8807414893b1523b7272c152aad67b4;hb=6768ddad54d2a675939e1167536f4943628de2bb;hp=e642f7e420594973debe96e77194953cc5837a9e;hpb=a873249c8c3c32006540d8636102c195dd4d9448;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index e642f7e42..ea94a28be 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -31,6 +31,9 @@ # #====================================================================== +use utf8; +use strict; + use POSIX qw(strftime); use List::Util qw(sum); @@ -39,13 +42,11 @@ use SL::GL; use SL::IS; use SL::PE; use SL::ReportGenerator; +use SL::DBUtils qw(selectrow_query selectall_hashref_query); require "bin/mozilla/common.pl"; -require "bin/mozilla/drafts.pl"; require "bin/mozilla/reportgenerator.pl"; -use strict; - # this is for our long dates # $locale->text('January') # $locale->text('February') @@ -82,8 +83,6 @@ sub add { my $form = $main::form; my %myconfig = %main::myconfig; - return $main::lxdebug->leave_sub() if (load_draft_maybe()); - $form->{title} = "Add"; $form->{callback} = "gl.pl?action=add" unless $form->{callback}; @@ -166,7 +165,7 @@ sub prepare_transaction { $form->{totalcredit} += $ref->{amount}; $form->{"credit_$i"} = $ref->{amount}; } - $form->{"taxchart_$i"} = "0--0.00"; + $form->{"taxchart_$i"} = $ref->{id}."--0.00000"; $form->{"project_id_$i"} = $ref->{project_id}; $i++; } @@ -210,201 +209,22 @@ sub edit { sub search { - $main::lxdebug->enter_sub(); - - $main::auth->assert('general_ledger'); - - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; - my $cgi = $main::cgi; - - $form->{title} = $locale->text('Journal'); - - $form->all_departments(\%myconfig); - - # departments - if (@{ $form->{all_departments} || [] }) { - $form->{selectdepartment} = "