X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fic.pl;h=4eb1e41e108a32d790f6b8ba6d94624b2c81f2b0;hb=606e7e2575ff6112e8e45acf0e74e87faa5cfa7c;hp=51be87c0c6173202dc213b59ecba2bf44c725689;hpb=7987d7a92af48a6fdd1422766cd1efba2d04be86;p=kivitendo-erp.git
diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl
index 51be87c0c..4eb1e41e1 100644
--- a/bin/mozilla/ic.pl
+++ b/bin/mozilla/ic.pl
@@ -30,1467 +30,415 @@
# Inventory Control module
#
#======================================================================
-#$locale->text('ea');
+use POSIX qw(strftime);
+use List::Util qw(max);
+use List::MoreUtils qw(any);
+
+use SL::AM;
+use SL::CVar;
use SL::IC;
+use SL::ReportGenerator;
#use SL::PE;
-require "$form->{path}/io.pl";
-
-1;
-
-# end of main
-
-sub add {
- $lxdebug->enter_sub();
+use strict;
+#use warnings;
- $form->{title} = $locale->text('Add ' . ucfirst $form->{item});
+# global imports
+our ($form, $locale, %myconfig, $lxdebug, $auth);
- $form->{callback} =
- "$form->{script}?action=add&item=$form->{item}&path=$form->{path}&login=$form->{login}&password=$form->{password}"
- unless $form->{callback};
+require "bin/mozilla/io.pl";
+require "bin/mozilla/invoice_io.pl";
+require "bin/mozilla/common.pl";
+require "bin/mozilla/reportgenerator.pl";
- $form->{"unit_changeable"} = 1;
+1;
- IC->get_pricegroups(\%myconfig, \%$form);
- &link_part;
- &display_form;
+# 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')
+# $locale->text('Parts')
+# $locale->text('Services')
+# $locale->text('Inventory quantity must be zero before you can set this part obsolete!')
+# $locale->text('Inventory quantity must be zero before you can set this assembly obsolete!')
+# $locale->text('Part Number missing!')
+# $locale->text('Service Number missing!')
+# $locale->text('Assembly Number missing!')
+# $locale->text('ea');
- $lxdebug->leave_sub();
-}
+# end of main
-sub search {
+sub add {
$lxdebug->enter_sub();
- $form->{title} = (ucfirst $form->{searchitems}) . "s";
- $form->{title} = $locale->text($form->{title});
-
- # switch for backward sorting
- $form->{revers} = 0;
-
- # memory for which table was sort at last time
- $form->{lastsort} = "";
-
- # counter for added entries to top100
- $form->{ndxs_counter} = 0;
-
- # $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
-
-
- |
-
-|;
-
- } else {
-
- $bought = qq|
-
- |
-
-
-
-
-
- |
- |
-
-
-
- | . $locale->text('From') . qq| |
- $button1
- | . $locale->text('To') . qq| |
- $button2
-
-
- |
-
-
- |
-
-|;
- }
-
- $form->header;
-
- print qq|
-
-
-
-
-
-