Commit 161ddc5d authored by Aurel's avatar Aurel

fix way to check bank account

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15100 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9ceda9e6
......@@ -103,15 +103,15 @@ transaction.Baobab_checkCounterDateOpen(site=transaction.getSite(),\n
if out_price > 0:\n
transaction.checkVaultBalance(state_change)\n
\n
if transaction.getIncidentType == "account_incident":\n
bank_account = transaction.getSourcePaymentValue()\n
if transaction.getIncidentType() == "account_incident":\n
bank_account = transaction.getDestinationPaymentValue()\n
if bank_account is None:\n
msg = Message(domain=\'ui\', message="No bank account defined.")\n
raise ValidationFailed, (msg,)\n
if transaction.BankAccount_isMessagePending(bank_account):\n
msg = Message(domain=\'ui\', message="There are operations pending for this account that prevent form calculating its position. Please try again later.")\n
raise ValidationFailed, (msg,)\n
\n
if bank_account is None:\n
msg = Message(domain=\'ui\', message="No bank account defined.")\n
raise ValidationFailed, (msg,)\n
if out_price > 0:\n
error = transaction.BankAccount_checkAvailableBalance(bank_account.getRelativeUrl(), out_price)\n
if error[\'error_code\'] == 1:\n
......
378
\ No newline at end of file
381
\ 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