Skip to content

Commit

Permalink
添加限制 已有核销金额的结算单不允许删除
Browse files Browse the repository at this point in the history
  • Loading branch information
zhhangtaao committed Sep 18, 2018
1 parent 4abfc9e commit 16f5b30
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions money/models/money_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,8 @@ def money_invoice_draft(self):
for inv in self:
if inv.state == 'draft':
raise UserError(u'请不要重复撤销')
if inv.reconciled != 0.0:
raise UserError(u'已核销的结算单不允许删除')
inv.reconciled = 0.0
inv.to_reconcile = 0.0
inv.state = 'draft'
Expand Down

0 comments on commit 16f5b30

Please sign in to comment.