X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fir.pl;h=74819105984322e02c26b7b486e09ce714e5b1e2;hb=bce08af4ca2b6a160505dedd3a28edb455e1de7a;hp=e90b12cf651161bc64a9bdc9dbfc7f53aeb0fc82;hpb=766f5705ecb9cd56adfbffd94c871959bb64c6fd;p=kivitendo-erp.git
diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl
index e90b12cf6..748191059 100644
--- a/bin/mozilla/ir.pl
+++ b/bin/mozilla/ir.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.
#======================================================================
#
# Inventory received module
@@ -34,15 +35,15 @@
use SL::FU;
use SL::IR;
use SL::IS;
-use SL::PE;
use SL::DB::Default;
+use SL::DB::Department;
+use SL::DB::PurchaseInvoice;
+use SL::DB::Vendor;
use List::Util qw(max sum);
+use List::UtilsBy qw(sort_by);
require "bin/mozilla/io.pl";
-require "bin/mozilla/invoice_io.pl";
-require "bin/mozilla/arap.pl";
require "bin/mozilla/common.pl";
-require "bin/mozilla/drafts.pl";
use strict;
@@ -58,7 +59,11 @@ sub add {
$main::auth->assert('vendor_invoice_edit');
- return $main::lxdebug->leave_sub() if (load_draft_maybe());
+ if (!$::instance_conf->get_allow_new_purchase_invoice) {
+ $::form->show_generic_error($::locale->text("You do not have the permissions to access this function."));
+ }
+
+ $form->{show_details} = $::myconfig{show_form_details};
$form->{title} = $locale->text('Record Vendor Invoice');
@@ -77,6 +82,8 @@ sub edit {
$main::auth->assert('vendor_invoice_edit');
+ $form->{show_details} = $::myconfig{show_form_details};
+
# show history button
$form->{javascript} = qq||;
#/show hhistory button
@@ -101,21 +108,8 @@ sub invoice_links {
$form->{vc} = 'vendor';
# create links
- $form->{webdav} = $::instance_conf->get_webdav;
-
$form->create_links("AP", \%myconfig, "vendor");
- #quote all_vendor Bug 133
- foreach my $ref (@{ $form->{all_vendor} }) {
- $ref->{name} = $form->quote($ref->{name});
- }
-
- if ($form->{all_vendor}) {
- unless ($form->{vendor_id}) {
- $form->{vendor_id} = $form->{all_vendor}->[0]->{id};
- }
- }
-
$form->backup_vars(qw(payment_id language_id taxzone_id
currency delivery_term_id intnotes cp_id));
@@ -128,25 +122,6 @@ sub invoice_links {
my @curr = $form->get_all_currencies();
map { $form->{selectcurrency} .= "