projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
admin muss mit login.pl nicht mit am.pl verknuepft werden.
[kivitendo-erp.git]
/
SL
/
IR.pm
diff --git
a/SL/IR.pm
b/SL/IR.pm
index
56207bf
..
d79e0fd
100644
(file)
--- a/
SL/IR.pm
+++ b/
SL/IR.pm
@@
-107,8
+107,12
@@
sub post_invoice {
if ($form->{storno}) {
$form->{"qty_$i"} *= -1;
}
if ($form->{storno}) {
$form->{"qty_$i"} *= -1;
}
+
+ if ($main::eur) {
+ $form->{"inventory_accno_$i"} = $form->{"expense_accno_$i"};
+ }
- if ($form->{"
qty_$i"} != 0
) {
+ if ($form->{"
id_$i"}
) {
# get item baseunit
$query = qq|SELECT p.unit
# get item baseunit
$query = qq|SELECT p.unit
@@
-1218,7
+1222,7
@@
sub retrieve_item {
sub vendor_details {
$main::lxdebug->enter_sub();
sub vendor_details {
$main::lxdebug->enter_sub();
- my ($self, $myconfig, $form) = @_;
+ my ($self, $myconfig, $form
, @wanted_vars
) = @_;
# connect to database
my $dbh = $form->dbconnect($myconfig);
# connect to database
my $dbh = $form->dbconnect($myconfig);
@@
-1245,6
+1249,14
@@
sub vendor_details {
# remove id and taxincluded before copy back
delete @$ref{qw(id taxincluded)};
# remove id and taxincluded before copy back
delete @$ref{qw(id taxincluded)};
+
+ @wanted_vars = grep({ $_ } @wanted_vars);
+ if (scalar(@wanted_vars) > 0) {
+ my %h_wanted_vars;
+ map({ $h_wanted_vars{$_} = 1; } @wanted_vars);
+ map({ delete($ref->{$_}) unless ($h_wanted_vars{$_}); } keys(%{$ref}));
+ }
+
map { $form->{$_} = $ref->{$_} } keys %$ref;
$sth->finish;
map { $form->{$_} = $ref->{$_} } keys %$ref;
$sth->finish;