X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/f4338c0b4202c8ec37bc838c012268615f58f40c..e309bf11488adf41abefed6a2833761e3d9ab3c9:/bin/mozilla/ic.pl
diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl
index e9b13a327..db3326920 100644
--- a/bin/mozilla/ic.pl
+++ b/bin/mozilla/ic.pl
@@ -52,6 +52,14 @@ 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 {
@@ -164,49 +172,49 @@ sub choice {
my ($partnumber, $description, $unit, $sellprice, $soldtotal);
# if choice set data
- if ($form->{ndx}) {
- for (my $i = 0; $i < $form->{ndxs_counter}; $i++) {
-
- # prepeare data
- $partnumber = $form->{"totop100_partnumber_$j"};
- $description = $form->{"totop100_description_$j"};
- $unit = $form->{"totop100_unit_$j"};
- $sellprice = $form->{"totop100_sellprice_$j"};
- $soldtotal = $form->{"totop100_soldtotal_$j"};
-
- # insert data into top100
- push @{ $form->{parts} },
- { number => "",
- partnumber => "$partnumber",
- description => "$description",
- unit => "$unit",
- sellprice => "$sellprice",
- soldtotal => "$soldtotal" };
- } #rof
- } #fi
+# if ($form->{ndx}) {
+# for my $i (0 .. $form->{ndxs_counter}) {
+#
+# # insert data into top100
+# push @{ $form->{parts} },
+# { number => "",
+# partnumber => $form->{"totop100_partnumber_$j"},
+# description => $form->{"totop100_description_$j"},
+# unit => $form->{"totop100_unit_$j"},
+# sellprice => $form->{"totop100_sellprice_$j"},
+# soldtotal => $form->{"totop100_soldtotal_$j"},
+# };
+# } #rof
+# } #fi
$totop100 = "";
# set data for next page
- if (($form->{ndxs_counter}) > 0) {
- for (my $i = 1; ($i < $form->{ndxs_counter} + 1); $i++) {
- $partnumber = $form->{"totop100_partnumber_$i"};
- $description = $form->{"totop100_description_$i"};
- $unit = $form->{"totop100_unit_$i"};
- $sellprice = $form->{"totop100_sellprice_$i"};
- $soldtotal = $form->{"totop100_soldtotal_$i"};
-
- $totop100 .= qq|
-{"totop100_partnumber_$i"}>
-{"totop100_description_$i"}>
-{"totop100_unit_$i"}>
-{"totop100_sellprice_$i"}>
-{"totop100_soldtotal_$i"}>
- |;
- } #rof
- } #fi
-
- print $form->parse_html_template('ic/choice', +{ HIDDENS => \@HIDDENS, totop100 => $totop100 });
+ for my $i (1 .. $form->{ndxs_counter}) {
+ $partnumber = $form->{"totop100_partnumber_$i"};
+ $description = $form->{"totop100_description_$i"};
+ $unit = $form->{"totop100_unit_$i"};
+ $sellprice = $form->{"totop100_sellprice_$i"};
+ $soldtotal = $form->{"totop100_soldtotal_$i"};
+
+ push @PARTS, {
+ totop100_partnumber => $form->{"totop100_partnumber_$i"},
+ totop100_description => $form->{"totop100_description_$i"},
+ totop100_unit => $form->{"totop100_unit_$i"},
+ totop100_sellprice => $form->{"totop100_sellprice_$i"},
+ totop100_soldtotal => $form->{"totop100_soldtotal_$i"},
+ }
+
+# $totop100 .= qq|
+#{"totop100_partnumber_$i"}>
+#{"totop100_description_$i"}>
+#{"totop100_unit_$i"}>
+#{"totop100_sellprice_$i"}>
+#{"totop100_soldtotal_$i"}>
+# |;
+ } #rof
+
+ print $form->parse_html_template('ic/choice', +{ HIDDENS => \@HIDDENS, PARTS => \@PARTS });
$lxdebug->leave_sub();
} #end choice
@@ -491,16 +499,13 @@ sub addtop100 {
}
if ($form->{serialnumber}) {
$callback .= "&serialnumber=$form->{serialnumber}";
- $option .=
- $locale->text('Serial Number') . qq| : $form->{serialnumber}
|;
+ $option .= $locale->text('Serial Number') . qq| : $form->{serialnumber}
|;
}
if ($form->{description}) {
- $callback .= "&description=$form->{description}";
+ $callback .= "&description=$form->{description}";
$description = $form->{description};
- $description =~ s/
-/
/g;
- $option .=
- $locale->text('Part Description') . qq| : $form->{description}
|;
+ $description =~ s/\n/
/g;
+ $option .= $locale->text('Part Description') . qq| : $form->{description}
|;
}
if ($form->{make}) {
$callback .= "&make=$form->{make}";
@@ -756,8 +761,7 @@ sub addtop100 {
$onhand = 0 if ($form->{sold});
}
- $ref->{description} =~ s/
-/
/g;
+ $ref->{description} =~ s/\n/
/g;
$column_data{number} =
"
"
@@ -1405,10 +1409,7 @@ sub link_part {
if (@{ $form->{all_partsgroup} }) {
$form->{selectpartsgroup} = qq||;
- foreach my $item (@{ $form->{payment_terms} }) {
- if ($form->{payment_id} eq $item->{id}) {
- $payment .= qq||;
- } else {
- $payment .= qq||;
- }
- }
-
-
- if (($rows = $form->numtextrows($form->{notes}, 40)) < 2) {
- $rows = 4;
- }
-
- $notes =
- qq||;
- if (($rows = $form->numtextrows($form->{description}, 40)) > 1) {
- $description =
- qq||;
- } else {
- $description =
- qq||;
- }
-
- $ean = qq||;
-
- foreach my $item (split / /, $form->{taxaccounts}) {
- $form->{"IC_tax_$item"} = ($form->{"IC_tax_$item"}) ? "checked" : "";
- }
+ $rows = 4 if $rows = $form->numtextrows($form->{notes}, 40) < 2;
+ $form->{notes_rows} = $rows;
IC->retrieve_buchungsgruppen(\%myconfig, $form);
- if (@{ $form->{BUCHUNGSGRUPPEN} }) {
- foreach my $item (@{ $form->{BUCHUNGSGRUPPEN} }) {
- if ($item->{id} == $form->{buchungsgruppen_id}) {
- $form->{selectbuchungsgruppe} .=
- " |