pshung29 / turbocare

Automatically exported from code.google.com/p/turbocare
0 stars 0 forks source link

Can't retrive old patient record if append the bill #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Find a patient from registration and try to make a new bill or append.
It is not getting save and showing "ERROR" on the left top corner. I can't
retrive the same record again and giving the error messege which I
mentioned in addition information area.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

500 Internal error

The server encountered an unexpected condition which prevented it from
fulfilling the request.

Page handler: <function _wrapper at 0x2aaaaae23a28>
Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools
.py",
line 105, in _run
    self.main()
  File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools
.py",
line 254, in main
    body = page_handler(*virtual_path, **self.params)
  File
"/usr/lib/python2.4/site-packages/TurboGears-1.0b2-py2.4.egg/turbogears/identity
/conditions.py",
line 275, in _wrapper
    return fn( *args, **kw )
  File "<string>", line 3, in RegistrationPage1
  File
"/usr/lib/python2.4/site-packages/TurboGears-1.0b2-py2.4.egg/turbogears/controll
ers.py",
line 334, in expose
    output = database.run_with_transaction(
  File "<string>", line 5, in run_with_transaction
  File
"/usr/lib/python2.4/site-packages/TurboGears-1.0b2-py2.4.egg/turbogears/database
.py",
line 245, in so_rwt
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File
"/usr/lib/python2.4/site-packages/TurboGears-1.0b2-py2.4.egg/turbogears/controll
ers.py",
line 351, in <lambda>
    mapping, fragment, args, kw)))
  File
"/usr/lib/python2.4/site-packages/TurboGears-1.0b2-py2.4.egg/turbogears/controll
ers.py",
line 378, in _execute_func
    output = errorhandling.try_call(func, *args, **kw)
  File
"/usr/lib/python2.4/site-packages/TurboGears-1.0b2-py2.4.egg/turbogears/errorhan
dling.py",
line 71, in try_call
    return func(self, *args, **kw)
  File "/home/me/svn/turbocare/turbocare/controllers_registration.py", line
516, in RegistrationPage1
    return self.RegistrationPatientLoad(PatientID, CustomerID)
  File "/home/me/svn/turbocare/turbocare/controllers_registration.py", line
370, in RegistrationPatientLoad
    PastDues = customer.CalcPayment() - customer.CalcPaid()
  File "/home/me/svn/turbocare/turbocare/model_inventory.py", line 927, in
CalcPayment
    Payment += receipt.TotalPaymentCalc()
  File "/home/me/svn/turbocare/turbocare/model_inventory.py", line 1639, in
TotalPaymentCalc
    TotalPay += item.Quantity*item.UnitCost - item.Discount
TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'

Original issue reported on code.google.com by tushar.c...@gmail.com on 9 Apr 2007 at 12:53

GoogleCodeExporter commented 8 years ago
I have done something like this many times already without any problem.  Based 
on
what I see in the error message, it seems that a quantity or unit cost value 
doesn't
have a value assigned to it.

I have modified the code so that, for now, if either the quantity or unit cost 
of the
item being purchased is not set, the program will not attempt to include it in 
the
total cost.

Revision 239

Original comment by umpen...@gmail.com on 11 Apr 2007 at 9:56