summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-27 16:37:41 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-27 16:37:41 +0000
commitb98753377ace509aeee17ee41f28a3556d8fdcb1 (patch)
tree11167b2e45a6007d6f3fbc5103de95d4e2703b57 /bin
parent2a7a42fc5a6f1ada7dec820303dd739bcd7c34f2 (diff)
Payment screens now treat empty strings as current_date
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1014 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin')
-rwxr-xr-xbin/aa.pl3
-rwxr-xr-xbin/cp.pl10
2 files changed, 10 insertions, 3 deletions
diff --git a/bin/aa.pl b/bin/aa.pl
index e85dc8a7..f1e43e37 100755
--- a/bin/aa.pl
+++ b/bin/aa.pl
@@ -1225,7 +1225,7 @@ sub transactions {
$form->{$form->{vc}} = $form->unescape($form->{$form->{vc}});
($form->{$form->{vc}}, $form->{"$form->{vc}_id"}) = split(/--/, $form->{$form->{vc}});
}
-
+ my @column_index;
AA->transactions(\%myconfig, \%$form);
$href = "$form->{script}?action=transactions";
@@ -1356,7 +1356,6 @@ sub transactions {
$href .= "&l_$item=Y";
}
}
-
if (!$form->{summary}) {
foreach $item (qw(source debit credit accno description projectnumber)) {
push @column_index, $item;
diff --git a/bin/cp.pl b/bin/cp.pl
index c4474e38..6e866767 100755
--- a/bin/cp.pl
+++ b/bin/cp.pl
@@ -56,6 +56,11 @@ require "bin/arap.pl";
1;
# end of main
+# This may need to get more sophisticated in the future
+# Anyway, it provides one point of control for date handling.
+sub default_date {
+ $form->{date} ||= 'current_date'
+}
sub payment {
@@ -1137,7 +1142,10 @@ sub payment_footer {
}
-sub post { &{"post_$form->{payment}"} }
+sub post {
+ &default_date;
+ &{"post_$form->{payment}"};
+}
sub post_payments {