Skip to content

Commit

Permalink
升级反核销资金单逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
lonelyleaves authored Aug 1, 2018
1 parent f602731 commit 3e4581c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions money/models/money_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,9 @@ def money_order_draft(self):

# 收/付款单 存在已审核金额不为0的核销单
total_current_reconciled = order.amount - order.advance_payment
if order.reconciled != total_current_reconciled:
raise UserError(u'单据已核销金额不为0,不能反审核!请检查核销单!')
decimal_amount = self.env.ref('core.decimal_amount')
if float_compare(order.reconciled, total_current_reconciled, precision_digits=decimal_amount.digits) != 0:
raise UserError(u'单据已核销金额不为0,不能反审核!请检查核销单!')

total = 0
for line in order.line_ids:
Expand Down

0 comments on commit 3e4581c

Please sign in to comment.