Commit 28672714 authored by Aurel's avatar Aurel

check a 'bon de virement' is not older than 3 month

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15382 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c6f913cc
......@@ -127,7 +127,14 @@ for check_operation_line in transaction.contentValues(filter = {\'portal_type\'
msg = Message(domain=\'ui\', message="Check $check is more than 3 years old.",\n
mapping={"check" : check_operation_line.getAggregateFreeText()})\n
raise ValidationFailed, (msg,)\n
\n
elif \'virement\' in check_operation_line.getAggregateResourceTitle():\n
interval = getIntervalBetweenDates(check_operation_line.getStartDate(), check_operation_line.getStopDate())\n
if interval[\'month\'] >= 3:\n
if interval["day"] > 0:\n
msg = Message(domain=\'ui\', message="Check $check is more than 3 month old.",\n
mapping={"check" : check_operation_line.getAggregateFreeText()})\n
raise ValidationFailed, (msg,)\n
\n
\n
# Test if the account balance is sufficient.\n
error = context.BankAccount_checkBalance(source_bank_account.getRelativeUrl(), check_operation_line.getPrice())\n
......
309
\ No newline at end of file
311
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment