X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fgl.pl;h=cb2ebb2e7ad25a26a4e696bbb79030328a0aa36b;hb=b96aeec0aa41e81c1fce82ba095486b05d601b31;hp=e642f7e420594973debe96e77194953cc5837a9e;hpb=a873249c8c3c32006540d8636102c195dd4d9448;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index e642f7e42..cb2ebb2e7 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -24,28 +24,31 @@ # 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 # #====================================================================== +use utf8; +use strict; + use POSIX qw(strftime); 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); +use SL::Webdav; +use SL::Locale::String qw(t8); 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') @@ -77,13 +80,11 @@ use strict; sub add { $main::lxdebug->enter_sub(); - $main::auth->assert('general_ledger'); + $main::auth->assert('gl_transactions'); 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}; @@ -98,16 +99,7 @@ sub add { $form->{credit} = 0; $form->{tax} = 0; - # departments - $form->all_departments(\%myconfig); - if (@{ $form->{all_departments} || [] }) { - $form->{selectdepartment} = "