From 0003863c90637aa352d330895c4ff2d1a4a00cc8 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Wed, 23 Jul 2008 18:34:14 +0000 Subject: Adding error when payment selection does not have date for payment batch listed. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2220 4979c152-3d1c-0410-bac9-87ea11338e46 --- scripts/payment.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/payment.pl b/scripts/payment.pl index 905c89c8..3c5b6671 100644 --- a/scripts/payment.pl +++ b/scripts/payment.pl @@ -74,6 +74,9 @@ sub payments { my ($request) = @_; my $payment = LedgerSMB::DBObject::Payment->new({'base' => $request}); $payment->get_metadata(); + if (!defined $payment->{batch_date}){ + $payment->error("No Batch Date!"); + } my $template = LedgerSMB::Template->new( user => $request->{_user}, locale => $request->{_locale}, -- cgit v1.2.3