X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fic.pl;h=928a0aba6109219a701d183760ec3e7c348df8c6;hb=9dc9cfefd45e66cb4298dd572e3582613ae547a6;hp=80e0bbc554e277d6325882fdf03fb2e173c13ad9;hpb=e7214232350249fdab6da3445442ff85891a0d7c;p=kivitendo-erp.git
diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl
index 80e0bbc55..928a0aba6 100644
--- a/bin/mozilla/ic.pl
+++ b/bin/mozilla/ic.pl
@@ -32,23 +32,45 @@
#======================================================================
#$locale->text('ea');
+use POSIX qw(strftime);
+
use SL::IC;
+use SL::ReportGenerator;
#use SL::PE;
-require "$form->{path}/io.pl";
+# use strict;
+#use warnings;
+
+# global imports
+our ($form, $locale, %myconfig, $lxdebug);
+
+require "bin/mozilla/io.pl";
+require "bin/mozilla/invoice_io.pl";
+require "bin/mozilla/common.pl";
+require "bin/mozilla/reportgenerator.pl";
1;
+# Parserhappy(R):
+# type=submit $locale->text('Add Part')
+# type=submit $locale->text('Add Service')
+# type=submit $locale->text('Add Assembly')
+# type=submit $locale->text('Edit Part')
+# type=submit $locale->text('Edit Service')
+# type=submit $locale->text('Edit Assembly')
+
# end of main
sub add {
$lxdebug->enter_sub();
+ $auth->assert('part_service_assembly_edit');
+
$form->{title} = $locale->text('Add ' . ucfirst $form->{item});
$form->{callback} =
- "$form->{script}?action=add&item=$form->{item}&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ "$form->{script}?action=add&item=$form->{item}"
unless $form->{callback};
$form->{"unit_changeable"} = 1;
@@ -63,8 +85,7 @@ sub add {
sub search {
$lxdebug->enter_sub();
- $form->{title} = (ucfirst $form->{searchitems}) . "s";
- $form->{title} = $locale->text($form->{title});
+ $auth->assert('part_service_assembly_edit');
# switch for backward sorting
$form->{revers} = 0;
@@ -78,533 +99,49 @@ sub search {
# $locale->text('Parts')
# $locale->text('Services')
- # use JavaScript Calendar or not
- $form->{jsscript} = $jscalendar;
- $jsscript = "";
- if ($form->{jsscript}) {
-
- # with JavaScript Calendar
- $button1 = qq|
-
|
- text('button') . qq|> |
- |;
- $button2 = qq|
- |
- text('button') . qq|> |
- |;
-
- #write Trigger
- $jsscript =
- Form->write_trigger(\%myconfig, "2", "transdatefrom", "BL", "trigger1",
- "transdateto", "BL", "trigger2");
- } else {
-
- # without JavaScript Calendar
- $button1 = qq|
- | |;
- $button2 = qq|
- | |;
- }
-
- unless ($form->{searchitems} eq 'service') {
-
- $onhand = qq|
- |
- . $locale->text('On Hand') . qq|
- |
- . $locale->text('Short') . qq|
-|;
-
- $makemodel = qq|
-
- | . $locale->text('Make') . qq| |
- |
- | . $locale->text('Model') . qq| |
- |
-
-|;
-
- $serialnumber = qq|
- | . $locale->text('Serial Number') . qq| |
- |
-|;
-
- $l_serialnumber = qq|
- |
- . $locale->text('Serial Number') . qq| |
-|;
-
- }
-
- if ($form->{searchitems} eq 'assembly') {
-
- $form->{title} = $locale->text('Assemblies');
-
- $toplevel = qq|
-
- |
-
- |
- . $locale->text('Top Level') . qq|
- |
- . $locale->text('Individual Items') . qq|
- |
-
-|;
-
- $bought = qq|
-
- |
-
-
-
-
-
- |
- |
- | . $locale->text('From') . qq| |
- $button1
- | . $locale->text('To') . qq| |
- $button2
-
-
- |
-
-|;
+ my $is_service = $form->{searchitems} eq 'service';
+ my $is_assembly = $form->{searchitems} eq 'assembly';
- } else {
+ $form->{title} = (ucfirst $form->{searchitems}) . "s";
+ $form->{title} = $locale->text($form->{title});
+ $form->{title} = $locale->text('Assemblies') if $is_assembly;
- $bought = qq|
-
- |
-
-
-
-
-
- |
- |
-
-
-
- | . $locale->text('From') . qq| |
- $button1
- | . $locale->text('To') . qq| |
- $button2
-
-
- |
-
-
- |
-
-|;
- }
+ $form->{jsscript} = 1;
$form->header;
- print qq|
-
-
-
-
-
-