summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-30 17:33:38 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-30 17:33:38 +0000
commit5767df5ef5616bd2f100a7f16f0db672bc615ace (patch)
tree27421a62be31f0b902fcde3bd78e740057aa43a4 /LedgerSMB
parentb98753377ace509aeee17ee41f28a3556d8fdcb1 (diff)
Fixing missing date errors
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1015 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-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;