X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fic.pl;h=fc0da269e7d0244cf5f3961d3f312a7cd4363d7e;hb=f559ec45ea2fc09c361ef7e4a40a59b1f2133737;hp=b2a4da64a9da486cb8a38a97677ea9be11798207;hpb=a2a806917f032855799eebba851e67eff2e377ef;p=kivitendo-erp.git
diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl
index b2a4da64a..fc0da269e 100644
--- a/bin/mozilla/ic.pl
+++ b/bin/mozilla/ic.pl
@@ -32,11 +32,23 @@
#======================================================================
#$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;
@@ -48,11 +60,11 @@ 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}"
+ "$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;
@@ -63,6 +75,8 @@ sub add {
sub search {
$lxdebug->enter_sub();
+ my ($button1, $button2, $onhand, $makemodel, $serialnumber, $l_serialnumber, $toplevel, $bought);
+
$form->{title} = (ucfirst $form->{searchitems}) . "s";
$form->{title} = $locale->text($form->{title});
@@ -79,8 +93,8 @@ sub search {
# $locale->text('Services')
# use JavaScript Calendar or not
- $form->{jsscript} = $jscalendar;
- $jsscript = "";
+ $form->{jsscript} = 1;
+ my $jsscript = "";
if ($form->{jsscript}) {
# with JavaScript Calendar
@@ -96,44 +110,33 @@ sub search {
|;
#write Trigger
- $jsscript =
- Form->write_trigger(\%myconfig, "2", "transdatefrom", "BL", "trigger1",
- "transdateto", "BL", "trigger2");
+ $jsscript = Form->write_trigger(\%myconfig, "2", "transdatefrom", "BL", "trigger1", "transdateto", "BL", "trigger2");
} else {
# without JavaScript Calendar
- $button1 = qq|
-
| |;
- $button2 = qq|
- | |;
+ $button1 = qq| | |;
+ $button2 = qq| | |;
}
unless ($form->{searchitems} eq 'service') {
- $onhand = qq|
- |
- . $locale->text('On Hand') . qq|
- |
- . $locale->text('Short') . qq|
+ $onhand = qq| | . $locale->text('On Hand') . qq|
+ | . $locale->text('Short') . qq|
|;
$makemodel = qq|
- | . $locale->text('Make') . qq| |
- |
- | . $locale->text('Model') . qq| |
- |
+ | . $locale->text('Make') . 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| |
|;
}
@@ -185,7 +188,7 @@ sub search {
|
| . $locale->text('From') . qq| |
$button1
- | . $locale->text('To') . qq| |
+ | . $locale->text('To (time)') . qq| |
$button2
@@ -235,7 +238,7 @@ sub search {
| . $locale->text('From') . qq| |
$button1
- | . $locale->text('To') . qq| |
+ | . $locale->text('To (time)') . qq| |
$button2
@@ -269,6 +272,8 @@ sub search {
| . $locale->text('Part Number') . qq| |
|
+ | . $locale->text('EAN') . qq| |
+ |
|
@@ -326,7 +331,7 @@ sub search {
. $locale->text('List Price') . qq|
| |
. $locale->text('Sell Price') . qq| |
- |
+ | |
. $locale->text('Last Cost') . qq| |
|
. $locale->text('Line Total') . qq| |
@@ -372,12 +377,12 @@ $jsscript
-{path}>
{login}>
{password}>
+
@@ -394,9 +399,238 @@ $jsscript
$lxdebug->leave_sub();
} #end search()
+sub search_update_prices {
+ $lxdebug->enter_sub();
+
+ my ($onhand, $makemodel, $serialnumber, $l_serialnumber, $toplevel, $bought);
+
+ $form->{title} = $locale->text('Update prices');
+ IC->get_pricegroups(\%myconfig, \%$form);
+
+ # use JavaScript Calendar or not
+# $form->{jsscript} = 1;
+# $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|
+# | |;
+# }
+
+ $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| |
+|;
+
+
+
+ $form->header;
+
+ print qq|
+
+
+