From ea2e84cc75e2879141eea5e957439936280682bf Mon Sep 17 00:00:00 2001 From: Philip Reetz Date: Tue, 5 May 2009 11:34:04 +0000 Subject: [PATCH] Bug #862 behoben, Funktionen fuer die Buttons unter den Listen (Rechnungen und Buchungsjournal) generell nach common.pl ausgelagert. --- bin/mozilla/ap.pl | 34 ----------------- bin/mozilla/ar.pl | 37 +------------------ bin/mozilla/common.pl | 85 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 70 deletions(-) diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 884933b9f..342928a17 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -1514,40 +1514,6 @@ sub ap_transactions { $lxdebug->leave_sub(); } - -sub vendor_invoice { - $lxdebug->enter_sub(); - - $auth->assert('invoice_edit'); - - - $form->{script} = 'ir.pl'; - $script = "ir"; - $form->{type} = "invoice"; - $locale = new Locale "$myconfig{countrycode}", "$script"; - - require "bin/mozilla/$form->{script}"; - &add; - - $lxdebug->leave_sub(); -} - -sub ap_transaction { - $lxdebug->enter_sub(); - - $auth->assert('general_ledger'); - - - $form->{script} = 'ap.pl'; - $script = "ap"; - $locale = new Locale "$myconfig{countrycode}", "$script"; - - require "bin/mozilla/$form->{script}"; - &add; - - $lxdebug->leave_sub(); -} - sub storno { $lxdebug->enter_sub(); diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 43d324bf4..caf48362f 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -1507,7 +1507,7 @@ sub ar_transactions { $report->set_columns(%column_defs); $report->set_column_order(@columns); - $report->set_export_options('ar_transactions', @hidden_variables, qw(sort sortdir)); + $report->set_export_options('ar_transactions', @hidden_variables); $report->set_sort_indicator($form->{sort}, $form->{sortdir}); @@ -1620,41 +1620,6 @@ sub ar_transactions { $lxdebug->leave_sub(); } -sub sales_invoice { - $lxdebug->enter_sub(); - - $auth->assert('invoice_edit'); - - - $form->{script} = 'is.pl'; - $script = "is"; - $form->{type} = "invoice"; - $locale = new Locale "$myconfig{countrycode}", "$script"; - - require "bin/mozilla/$form->{script}"; - &add; - - $lxdebug->leave_sub(); -} - -sub ar_transaction { - $lxdebug->enter_sub(); - - $auth->assert('general_ledger'); - - - $form->{script} = 'ar.pl'; - $script = "ar"; - $locale = new Locale "$myconfig{countrycode}", "$script"; - - require "bin/mozilla/$form->{script}"; - &add; - - $lxdebug->leave_sub(); -} - - - sub storno { $lxdebug->enter_sub(); diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index 1bd92dc91..9cd54a456 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -588,4 +588,89 @@ sub cov_selection_internal { $lxdebug->leave_sub(); } + +# Functions to call add routines beneath different reports + +sub sales_invoice { + $lxdebug->enter_sub(); + + $auth->assert('invoice_edit'); + + + $form->{script} = 'is.pl'; + $script = "is"; + $form->{type} = "invoice"; + $locale = new Locale "$myconfig{countrycode}", "$script"; + + require "bin/mozilla/$form->{script}"; + &add; + + $lxdebug->leave_sub(); +} + +sub ar_transaction { + $lxdebug->enter_sub(); + + $auth->assert('general_ledger'); + + + $form->{script} = 'ar.pl'; + $script = "ar"; + $locale = new Locale "$myconfig{countrycode}", "$script"; + + require "bin/mozilla/$form->{script}"; + &add; + + $lxdebug->leave_sub(); +} + +sub vendor_invoice { + $lxdebug->enter_sub(); + + $auth->assert('invoice_edit'); + + + $form->{script} = 'ir.pl'; + $script = "ir"; + $form->{type} = "invoice"; + $locale = new Locale "$myconfig{countrycode}", "$script"; + + require "bin/mozilla/$form->{script}"; + &add; + + $lxdebug->leave_sub(); +} + +sub ap_transaction { + $lxdebug->enter_sub(); + + $auth->assert('general_ledger'); + + + $form->{script} = 'ap.pl'; + $script = "ap"; + $locale = new Locale "$myconfig{countrycode}", "$script"; + + require "bin/mozilla/$form->{script}"; + &add; + + $lxdebug->leave_sub(); +} + +sub gl_transaction { + $lxdebug->enter_sub(); + + $auth->assert('general_ledger'); + + + $form->{script} = 'gl.pl'; + $script = "gl"; + $locale = new Locale "$myconfig{countrycode}", "$script"; + + require "bin/mozilla/$form->{script}"; + &add; + + $lxdebug->leave_sub(); +} + 1; -- 2.20.1