projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9dbc9e
)
Gesamtbetrag auf Gegenkonto buchen
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 10 Nov 2010 17:05:36 +0000
(18:05 +0100)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 12 Jan 2011 15:18:54 +0000
(16:18 +0100)
SL/DB/Invoice.pm
patch
|
blob
|
history
diff --git
a/SL/DB/Invoice.pm
b/SL/DB/Invoice.pm
index
96c140c
..
482bb70
100644
(file)
--- a/
SL/DB/Invoice.pm
+++ b/
SL/DB/Invoice.pm
@@
-120,6
+120,8
@@
sub new_from {
sub post {
my ($self, %params) = @_;
+ croak("Missing parameter 'ar_id'") unless $params{ar_id};
+
$self->db->do_transaction(sub {
1; # dummy instruction for Emacs ;)
@@
-133,6
+135,8
@@
sub post {
$self->_post_add_acctrans($data{amounts});
$self->_post_add_acctrans($data{taxes});
+ $self->_post_add_acctrans({ $params{ar_id} => $self->amount * -1 });
+
$self->_post_update_allocated($data{allocated});
die;