[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-bugs] GNUmed 1.25 Billing module - Remove button does not re
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-bugs] GNUmed 1.25 Billing module - Remove button does not remove |
Date: |
Sun, 6 Jan 2013 21:44:31 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Jan 06, 2013 at 09:41:23PM +0100, Karsten Hilbert wrote:
> > Are there any constraints that determine whether or not
> > the remove button will function, or is this an outright bug?
>
> Are we talking about this button ?
If we are the constraints are as follows:
#--------------------------------------------------------
def _del_item(self, item):
if item['pk_bill'] is not None:
gmDispatcher.send(signal = 'statustext', msg =
_('Cannot delete already invoiced bill items.'), beep = True)
return False
go_ahead = gmGuiHelpers.gm_show_question (
_( 'Do you really want to delete this\n'
'bill item from the patient ?'),
_('Deleting bill item')
)
if not go_ahead:
return False
gmBilling.delete_bill_item(pk_bill_item = item['pk_bill_item'])
return True
def delete_bill_item(pk_bill_item=None):
cmd = u'DELETE FROM bill.bill_item WHERE pk = %(pk)s AND
fk_bill IS NULL'
args = {'pk': pk_bill_item}
gmPG2.run_rw_queries(queries = [{'cmd': cmd, 'args': args}])
meaning that items already linked to bills cannot be removed
(until removed from the bill). The item tooltip would tell
us more on that.
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346