projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bugfix 319 Kreditorenbuchung Korrekturhaken wurde nicht gespeichert - Patch von Udo
[kivitendo-erp.git]
/
bin
/
mozilla
/
ic.pl
diff --git
a/bin/mozilla/ic.pl
b/bin/mozilla/ic.pl
index
7893dc5
..
bcd1405
100644
(file)
--- a/
bin/mozilla/ic.pl
+++ b/
bin/mozilla/ic.pl
@@
-30,8
+30,10
@@
# Inventory Control module
#
#======================================================================
# Inventory Control module
#
#======================================================================
+#$locale->text('ea');
use SL::IC;
use SL::IC;
+
#use SL::PE;
require "$form->{path}/io.pl";
#use SL::PE;
require "$form->{path}/io.pl";
@@
-51,7
+53,7
@@
sub add {
$form->{unit} =
($form->{item} eq 'service') ? $locale->text('hr') : $locale->text('ea');
$form->{unit} =
($form->{item} eq 'service') ? $locale->text('hr') : $locale->text('ea');
-
+ IC->get_pricegroups(\%myconfig, \%$form);
&link_part;
&display_form;
&link_part;
&display_form;
@@
-1933,7
+1935,7
@@
sub form_header {
$lxdebug->enter_sub();
my $dec = '';
$lxdebug->enter_sub();
my $dec = '';
-
+
#decimalplaces for listprice
($dec) = ($form->{listprice} =~ /\.(\d+)/);
$dec = length $dec;
#decimalplaces for listprice
($dec) = ($form->{listprice} =~ /\.(\d+)/);
$dec = length $dec;
@@
-2227,8
+2229,7
@@
sub form_header {
#write Trigger
$jsscript =
#write Trigger
$jsscript =
- Form->write_trigger(\%myconfig, "1", "priceupdate", "BL", "trigger1", "",
- "", "");
+ Form->write_trigger(\%myconfig, "1", "priceupdate", "BL", "trigger1");
} else {
# without JavaScript Calendar
} else {
# without JavaScript Calendar
@@
-2718,6
+2719,8
@@
sub save {
# $locale->text('Assembly Number missing!')
# save part
# $locale->text('Assembly Number missing!')
# save part
+ $lxdebug->message(LXDebug::DEBUG1,
+ "ic.pl: sellprice in save = $form->{sellprice}\n");
$rc = IC->save(\%myconfig, \%$form);
if ($rc == 3) {
$form->error($locale->text('Partnumber not unique!'));
$rc = IC->save(\%myconfig, \%$form);
if ($rc == 3) {
$form->error($locale->text('Partnumber not unique!'));
@@
-2772,11
+2775,12
@@
sub save {
map { $form->{"${_}_$i"} = $newform{$_} }
qw(partnumber description bin unit listprice inventory_accno income_accno expense_accno sellprice);
$form->{"sellprice_$i"} = $newform{lastcost} if ($form->{vendor_id});
map { $form->{"${_}_$i"} = $newform{$_} }
qw(partnumber description bin unit listprice inventory_accno income_accno expense_accno sellprice);
$form->{"sellprice_$i"} = $newform{lastcost} if ($form->{vendor_id});
-
if ($form->{exchangerate} != 0) {
$form->{"sellprice_$i"} /= $form->{exchangerate};
}
if ($form->{exchangerate} != 0) {
$form->{"sellprice_$i"} /= $form->{exchangerate};
}
-
+ $lxdebug->message(LXDebug::DEBUG1,
+ qq|sellprice_$i in previousform 2 = |
+ . $form->{"sellprice_$i"} . qq|\n|);
map { $form->{"taxaccounts_$i"} .= "$_ " } split / /,
$newform{taxaccount};
chop $form->{"taxaccounts_$i"};
map { $form->{"taxaccounts_$i"} .= "$_ " } split / /,
$newform{taxaccount};
chop $form->{"taxaccounts_$i"};
@@
-2797,6
+2801,12
@@
sub save {
$form->{creditremaining} -= $amount;
$form->{creditremaining} -= $amount;
+ # redo number formatting, because invoice parse them!
+ $i = $form->{rowcount};
+ map {
+ $form->{"${_}_$i"} =
+ $form->format_amount(\%myconfig, $form->{"${_}_$i"})
+ } qw(weight listprice sellprice rop);
}
$form->{"id_$i"} = $parts_id;
}
$form->{"id_$i"} = $parts_id;
@@
-2818,6
+2828,9
@@
sub save {
}
$form->{callback} = $callback;
}
}
$form->{callback} = $callback;
}
+ $lxdebug->message(LXDebug::DEBUG1,
+ qq|ic.pl: sellprice_$i nach sub save = |
+ . $form->{"sellprice_$i"} . qq|\n|);
# redirect
$form->redirect;
# redirect
$form->redirect;
@@
-3038,7
+3051,7
@@
sub price_row {
for $i (1 .. $numrows) {
print qq|
<tr>
for $i (1 .. $numrows) {
print qq|
<tr>
- <td width=50%><input type=hidden name="pricegroup_$i" size=30 value=
$form->{"pricegroup_$i"}
>$form->{"pricegroup_$i"}</td>
+ <td width=50%><input type=hidden name="pricegroup_$i" size=30 value=
"$form->{"pricegroup_$i"}"
>$form->{"pricegroup_$i"}</td>
<td width=50%><input name="price_$i" size=11 value="$form->{"price_$i"}"></td>
<input type=hidden name="pricegroup_id_$i" value="$form->{"pricegroup_id_$i"}">
</tr>
<td width=50%><input name="price_$i" size=11 value="$form->{"price_$i"}"></td>
<input type=hidden name="pricegroup_id_$i" value="$form->{"pricegroup_id_$i"}">
</tr>