summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-09-29 23:38:19 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-09-29 23:38:19 +0000
commitbf2133de02409b0f9aa497eb0ed32a3e2550ba84 (patch)
treeafa36c86ba3d2144255b9732feaebf5212fd1bb3 /scripts
parentbe0fdf68acb96cd021608564fa3c7c40803fdee2 (diff)
Correcting payment bug: contact total shows 0 when Some radio button is selected
Also moved the bulk post function to use a temp table to try to get performance gains (if this doesn't work, we will have to go to the one stored proc per invoice approach which I would rather not do). git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2344 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'scripts')
-rw-r--r--scripts/payment.pl7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/payment.pl b/scripts/payment.pl
index b9d6f94c..f5173e24 100644
--- a/scripts/payment.pl
+++ b/scripts/payment.pl
@@ -368,11 +368,10 @@ sub display_payments {
for my $invoice (@{$_->{invoices}}){
if (($payment->{action} ne 'update_payments')
or (defined $payment->{"id_$_->{contact_id}"})){
-
if ($payment->{"paid_$_->{contact_id}"} eq 'some'){
my $i_id = $invoice->[0];
$contact_total
- += $payment->{"paid_$_->{contact_id}_$i_id"};
+ += $payment->{"payment_$i_id"};
}
}
$invoice->[3] = $payment->format_amount(amount => $invoice->[3],
@@ -383,8 +382,8 @@ sub display_payments {
money => 1);
$invoice->[6] = $payment->format_amount(amount => $invoice->[6],
money => 1);
- if (!$payment->{action} ne 'update_payments'){
- my $fld = "payment_" . $invoice->[0];
+ my $fld = "payment_" . $invoice->[0];
+ if (!defined $payment->{"$fld"} ){
$payment->{"$fld"} = $invoice->[6];
}
}