X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fic.pl;h=3d9d6ef2de9580fff5f10a60f8455d53362b192e;hb=2efc8cbcc63c56094e0692067b7cb678c1583987;hp=3df2e51ed60d680415ea750787642b39997b9196;hpb=4dbb09950c9f5596646537c12d991c99086fe7c1;p=kivitendo-erp.git
diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl
index 3df2e51ed..3d9d6ef2d 100644
--- a/bin/mozilla/ic.pl
+++ b/bin/mozilla/ic.pl
@@ -30,13 +30,26 @@
# Inventory Control module
#
#======================================================================
-
+#$locale->text('ea');
use SL::IC;
-require "$form->{path}/io.pl";
+#use SL::PE;
+
+use strict;
+#use warnings;
+
+require "bin/mozilla/io.pl";
+require "bin/mozilla/common.pl";
1;
+
+# global imports
+my $form = $main::form;
+my $locale = $main::locale;
+my %myconfig = %main::myconfig;
+my $lxdebug = $main::lxdebug;
+
# end of main
sub add {
@@ -44,10 +57,13 @@ sub add {
$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}" unless $form->{callback};
+ $form->{callback} =
+ "$form->{script}?action=add&item=$form->{item}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
- $form->{unit} = ($form->{item} eq 'service') ? $locale->text('hr') : $locale->text('ea');
+ $form->{"unit_changeable"} = 1;
+ IC->get_pricegroups(\%myconfig, \%$form);
&link_part;
&display_form;
@@ -57,68 +73,79 @@ sub add {
sub search {
$lxdebug->enter_sub();
- $form->{title} = (ucfirst $form->{searchitems})."s";
+ my ($button1, $button2, $onhand, $makemodel, $serialnumber, $l_serialnumber, $toplevel, $bought);
+
+ $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')
+ # $locale->text('Parts')
+ # $locale->text('Services')
# use JavaScript Calendar or not
- $form->{jsscript} = $jscalendar;
- $jsscript = "";
- if ($form->{jsscript})
- {
+ $form->{jsscript} = 1;
+ my $jsscript = "";
+ if ($form->{jsscript}) {
+
# with JavaScript Calendar
$button1 = qq|
|
- text('button').qq|> |
+ text('button') . qq|> |
|;
- $button2 = qq|
+ $button2 = qq|
|
- text('button').qq|> |
+ text('button') . qq|> |
|;
+
#write Trigger
- $jsscript = Form->write_trigger(\%myconfig,"2","transdatefrom","BL","trigger1","transdateto","BL","trigger2");
- }
- else
- {
- # without JavaScript Calendar
- $button1 = qq|
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "transdatefrom", "BL", "trigger1",
+ "transdateto", "BL", "trigger2");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 = qq|
| |;
- $button2 = qq|
+ $button2 = qq|
| |;
- }
+ }
unless ($form->{searchitems} eq 'service') {
$onhand = qq|
- |.$locale->text('On Hand').qq|
- |.$locale->text('Short').qq|
+ |
+ . $locale->text('On Hand') . qq|
+ |
+ . $locale->text('Short') . qq|
|;
$makemodel = qq|
- |.$locale->text('Make').qq| |
+ | . $locale->text('Make') . qq| |
|
- |.$locale->text('Model').qq| |
+ | . $locale->text('Model') . qq| |
|
|;
$serialnumber = qq|
- |.$locale->text('Serial Number').qq| |
+ | . $locale->text('Serial Number') . qq| |
|
|;
$l_serialnumber = qq|
- |.$locale->text('Serial Number').qq| |
+ |
+ . $locale->text('Serial Number') . qq| |
|;
}
@@ -131,8 +158,10 @@ sub search {
|
- |.$locale->text('Top Level').qq|
- |.$locale->text('Individual Items').qq|
+ |
+ . $locale->text('Top Level') . qq|
+ |
+ . $locale->text('Individual Items') . qq|
|
|;
@@ -147,28 +176,28 @@ sub search {
|
- |.$locale->text('From').qq| |
+ | . $locale->text('From') . qq| |
$button1
- |.$locale->text('To').qq| |
+ | . $locale->text('To (time)') . qq| |
$button2
@@ -178,7 +207,7 @@ sub search {
} else {
- $bought = qq|
+ $bought = qq|
|
@@ -188,27 +217,27 @@ sub search {
|
@@ -216,9 +245,9 @@ sub search {
- |.$locale->text('From').qq| |
+ | . $locale->text('From') . qq| |
$button1
- |.$locale->text('To').qq| |
+ | . $locale->text('To (time)') . qq| |
$button2
@@ -250,33 +279,39 @@ sub search {
|
|