projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Freigabe der Shopschnittstelle für xtCommerce
[kivitendo-erp.git]
/
SL
/
IR.pm
diff --git
a/SL/IR.pm
b/SL/IR.pm
index
6950739
..
30f49fd
100644
(file)
--- a/
SL/IR.pm
+++ b/
SL/IR.pm
@@
-178,8
+178,6
@@
sub post_invoice {
@values = ($form->{"sellprice_$i"}, conv_i($form->{"id_$i"}));
do_query($form, $dbh, $query, @values);
@values = ($form->{"sellprice_$i"}, conv_i($form->{"id_$i"}));
do_query($form, $dbh, $query, @values);
- $form->update_balance($dbh, "parts", "onhand", qq|id = ?|, $baseqty, $form->{"id_$i"}) if !$form->{shipped};
-
# check if we sold the item already and
# make an entry for the expense and inventory
$query =
# check if we sold the item already and
# make an entry for the expense and inventory
$query =
@@
-572,9
+570,6
@@
sub reverse_invoice {
next unless $ref->{inventory_accno_id};
next unless $ref->{inventory_accno_id};
- # update onhand
- $form->update_balance($dbh, "parts", "onhand", qq|id = $ref->{parts_id}|, $ref->{qty});
-
# if $ref->{allocated} > 0 than we sold that many items
next if ($ref->{allocated} <= 0);
# if $ref->{allocated} > 0 than we sold that many items
next if ($ref->{allocated} <= 0);
@@
-1057,6
+1052,8
@@
sub retrieve_item {
$stw->finish();
chop $ref->{taxaccounts};
$stw->finish();
chop $ref->{taxaccounts};
+ $ref->{onhand} *= 1;
+
push @{ $form->{item_list} }, $ref;
}
push @{ $form->{item_list} }, $ref;
}
@@
-1108,6
+1105,11
@@
sub vendor_details {
map { $form->{$_} = $ref->{$_} } keys %$ref;
map { $form->{$_} = $ref->{$_} } keys %$ref;
+ my $custom_variables = CVar->get_custom_variables('dbh' => $dbh,
+ 'module' => 'CT',
+ 'trans_id' => $form->{vendor_id});
+ map { $form->{"vc_cvar_$_->{name}"} = $_->{value} } @{ $custom_variables };
+
$dbh->disconnect();
$main::lxdebug->leave_sub();
$dbh->disconnect();
$main::lxdebug->leave_sub();