projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Schnellsuche für Verkaufs- & Einkaufslieferscheine
[kivitendo-erp.git]
/
bin
/
mozilla
/
gl.pl
diff --git
a/bin/mozilla/gl.pl
b/bin/mozilla/gl.pl
index
26e0a74
..
5f65720
100644
(file)
--- a/
bin/mozilla/gl.pl
+++ b/
bin/mozilla/gl.pl
@@
-1365,17
+1365,19
@@
sub post_transaction {
die "guru meditation error: Can only assign amount to one bank account booking" if scalar @{ $payment } > 1;
# credit/debit * -1 matches the sign for bt.amount and bt.invoice_amount
die "guru meditation error: Can only assign amount to one bank account booking" if scalar @{ $payment } > 1;
# credit/debit * -1 matches the sign for bt.amount and bt.invoice_amount
- die "Can only assign the full bank amount to a single general ledger booking" unless $bt->amount == $payment->[0]->amount * -1;
+ die "Can only assign the full (partial) bank amount to a single general ledger booking"
+ unless $bt->not_assigned_amount == $payment->[0]->amount * -1;
+
$bt->update_attributes(invoice_amount => $bt->invoice_amount + ($payment->[0]->amount * -1));
# create record_link
$bt->update_attributes(invoice_amount => $bt->invoice_amount + ($payment->[0]->amount * -1));
# create record_link
- my
@
props = (
+ my
%
props = (
from_table => 'bank_transactions',
from_id => $::form->{bt_id},
to_table => 'gl',
to_id => $::form->{id},
);
from_table => 'bank_transactions',
from_id => $::form->{bt_id},
to_table => 'gl',
to_id => $::form->{id},
);
- SL::DB::RecordLink->new(
@
props)->save;
+ SL::DB::RecordLink->new(
%
props)->save;
# and tighten holy acc_trans_id for this bank_transaction
my %props_acc = (
acc_trans_id => $payment->[0]->acc_trans_id,
# and tighten holy acc_trans_id for this bank_transaction
my %props_acc = (
acc_trans_id => $payment->[0]->acc_trans_id,