← Back to team overview

openerp-india team mailing list archive

[Bug 1129117] Re: Cash Register (Cash box) cannot be closed

 

*** This bug is a duplicate of bug 1102217 ***
    https://bugs.launchpad.net/bugs/1102217

Thanks Ali !!!

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1129117

Title:
  Cash Register (Cash box) cannot be closed

Status in OpenERP Addons (modules):
  New

Bug description:
  Hi all,

  I'm using OpenERP v7.0-20130218-002621.

  When I try to close an existing instance of cash box I get the
  following error message:

  ================================================================
  The statement balance is incorrect !
  The expected balance (0.00) is different than the computed one. (31.00) 
  ================================================================

  I get this message despite setting my closing balance to:
  - 3 * 10€
  - 1 * 1€

  What I noticed is that the `balance_end_real` field in
  `account_bank_statement` table is empty i.e. set to null value,
  despite entering closing balance.

  Since the closing balance is never written to `balance_end_real`
  field,  the validation fails in `account_bank_statement.py`, function
  `balance_check` (see below).

  ========================================================================

  def balance_check(self, cr, uid, st_id, journal_type='bank', context=None):
          st = self.browse(cr, uid, st_id, context=context)
          if not ((abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001) or (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001)):
              raise osv.except_osv(_('Error!'),
                      _('The statement balance is incorrect !\nThe expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end))
          return True

  ========================================================================

  Regards,
  Danijel

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1129117/+subscriptions