summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xLedgerSMB/CP.pm3
-rw-r--r--LedgerSMB/Locale.pm10
2 files changed, 6 insertions, 7 deletions
diff --git a/LedgerSMB/CP.pm b/LedgerSMB/CP.pm
index bfd18585..b5aa6258 100755
--- a/LedgerSMB/CP.pm
+++ b/LedgerSMB/CP.pm
@@ -307,6 +307,7 @@ sub post_payment {
my ($self, $myconfig, $form) = @_;
+
# connect to database, turn AutoCommit off
my $dbh = $form->{dbh};
@@ -422,7 +423,7 @@ sub post_payment {
?)|;
$sth = $dbh->prepare($query);
$sth->execute($form->{"id_$i"}, $id,
- $form->{date_paid}, $amount * $ml)
+ $form->{datepaid}, $amount * $ml)
|| $form->dberror($query, __file__, __line__);
# add payment
diff --git a/LedgerSMB/Locale.pm b/LedgerSMB/Locale.pm
index 737affad..68710445 100644
--- a/LedgerSMB/Locale.pm
+++ b/LedgerSMB/Locale.pm
@@ -116,9 +116,6 @@ sub date {
$mm = substr("0$mm", -2);
$longdate = "$yy$spc$mm$spc$dd";
- if (defined $longformat) {
- $longdate = &text($self, $longmonth[--$mm])." $dd $yy";
- }
} else {
@@ -127,10 +124,11 @@ sub date {
$mm = substr("0$mm", -2);
$longdate = "$mm$spc$dd$spc$yy";
- if (defined $longformat) {
- $longdate = &text($self, $longmonth[--$mm])." $dd $yy";
- }
}
+ if (defined $longformat) {
+ $longdate = &text($self, $longmonth[--$mm])." $dd $yy";
+ }
+ $longdate;
}
1;