From 5767df5ef5616bd2f100a7f16f0db672bc615ace Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 30 Mar 2007 17:33:38 +0000 Subject: 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 --- LedgerSMB/CP.pm | 3 ++- LedgerSMB/Locale.pm | 10 ++++------ 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'LedgerSMB') 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; -- cgit v1.2.3