X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fic.pl;h=784cc1ad237a8b7bec6347fc3abf8ee3430b8177;hb=eb0c12081383b487025dd5f438808116728775ad;hp=b5e4db70dbf36bf4a046eda2b97cfdc1544042ee;hpb=5cf977e52788c523150fa19225b90914e6ddc909;p=kivitendo-erp.git
diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl
index b5e4db70d..784cc1ad2 100644
--- a/bin/mozilla/ic.pl
+++ b/bin/mozilla/ic.pl
@@ -24,26 +24,32 @@
# 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 Control module
#
#======================================================================
-#$locale->text('ea');
use POSIX qw(strftime);
+use List::Util qw(first max);
+use List::MoreUtils qw(any);
+use SL::AM;
+use SL::CVar;
use SL::IC;
+use SL::Helper::Flash qw(flash);
+use SL::HTML::Util;
use SL::ReportGenerator;
#use SL::PE;
-# use strict;
+use strict;
#use warnings;
# global imports
-our ($form, $locale, %myconfig, $lxdebug);
+our ($form, $locale, %myconfig, $lxdebug, $auth);
require "bin/mozilla/io.pl";
require "bin/mozilla/common.pl";
@@ -51,1437 +57,77 @@ require "bin/mozilla/reportgenerator.pl";
1;
-# end of main
-
-sub add {
- $lxdebug->enter_sub();
-
- $form->{title} = $locale->text('Add ' . ucfirst $form->{item});
+# 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');
- $form->{callback} =
- "$form->{script}?action=add&item=$form->{item}&login=$form->{login}&password=$form->{password}"
- unless $form->{callback};
-
- $form->{"unit_changeable"} = 1;
-
- IC->get_pricegroups(\%myconfig, \%$form);
- &link_part;
- &display_form;
-
- $lxdebug->leave_sub();
-}
+# end of main
sub search {
$lxdebug->enter_sub();
- my ($button1, $button2, $onhand, $makemodel, $serialnumber, $l_serialnumber, $toplevel, $bought);
+ $auth->assert('part_service_assembly_details');
+
+ $form->{revers} = 0; # switch for backward sorting
+ $form->{lastsort} = ""; # memory for which table was sort at last time
+ $form->{ndxs_counter} = 0; # counter for added entries to top100
$form->{title} = (ucfirst $form->{searchitems}) . "s";
+ $form->{title} =~ s/ys$/ies/;
$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} = 1;
- my $jsscript = "";
- if ($form->{jsscript}) {
-
- # with JavaScript Calendar
- $button1 = qq|
-