gnumed-bugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-bugs] <bug>: still bugs on deleting invoice


From: Karsten Hilbert
Subject: Re: [Gnumed-bugs] <bug>: still bugs on deleting invoice
Date: Fri, 7 Nov 2014 16:56:24 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

Hi Marc,

> user comment  : still bugs on deleting invoice
> 
> client version: 1.4.12

...

> 2014-11-06 18:59:29  DEBUG     gm.gui 
> (/usr/share/gnumed/Gnumed/wxpython/gmExceptionHandlingWidgets.py::handle_uncaught_exception_wx()
>  #220): unhandled exception caught:
> Traceback (most recent call last):
>   File "/usr/share/gnumed/Gnumed/wxpython/gmListWidgets.py", line 300, in 
> _on_right_extra_button_pressed
>     if not self.__right_extra_button_callback(item_data):
>   File "/usr/share/gnumed/Gnumed/wxpython/gmBillingWidgets.py", line 834, in 
> remove_items
>     return remove_items_from_bill(parent = parent, bill = bill)
>   File "/usr/share/gnumed/Gnumed/wxpython/gmBillingWidgets.py", line 760, in 
> remove_items_from_bill
>     item.save()
>   File "/usr/share/gnumed/Gnumed/pycommon/gmBusinessDBObject.py", line 560, 
> in save
>     return self.save_payload(conn = conn)
>   File "/usr/share/gnumed/Gnumed/pycommon/gmBusinessDBObject.py", line 620, 
> in save_payload
>     conn.commit()
> IntegrityError: [bill.trf_prevent_empty_bills]: cannot remove (by <UPDATE>) 
> the only item (bill.bill_item.pk=2479) from bill 
> (bill.bill_item.fk_bill=bill.bill.pk=612) 
> 
> 2014-11-06 18:59:29  DEBUG     gm.logging 
> (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #151): stack 
> trace follows:

> 2014-11-06 18:59:30  DEBUG     gm.logging 
> (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #158): >>> 
> execution frame [_browse_bills] in 
> [/usr/share/gnumed/Gnumed/wxpython/gmBillingWidgets.py] at line 1230 <<<
...
> 2014-11-06 18:59:30  DEBUG     gm.logging 
> (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #158): >>> 
> execution frame [manage_bills] in 
> [/usr/share/gnumed/Gnumed/wxpython/gmBillingWidgets.py] at line 887 <<<
...
> 2014-11-06 18:59:30  DEBUG     gm.logging 
> (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #158): >>> 
> execution frame [get_choices_from_list] in 
> [/usr/share/gnumed/Gnumed/wxpython/gmListWidgets.py] at line 114 <<<
...
> 2014-11-06 18:59:30  DEBUG     gm.logging 
> (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #173):   
> right_extra_button = (u'Stornieren', u'Rechnungsposten w\xe4hlen und 
> stornieren.', <function remove_items at 0x7f81b2ea5f50>)
...
> 2014-11-06 18:59:30  DEBUG     gm.logging 
> (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #158): >>> 
> execution frame [_on_right_extra_button_pressed] in 
> [/usr/share/gnumed/Gnumed/wxpython/gmListWidgets.py] at line 300 <<<
...
> 2014-11-06 18:59:30  DEBUG     gm.logging 
> (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #158): >>> 
> execution frame [remove_items] in 
> [/usr/share/gnumed/Gnumed/wxpython/gmBillingWidgets.py] at line 834 <<<

You've been using the functionality to remove single items
from an existing bill (Storno). This only works for all but
one item per bill because GNUmed does now allow bills without
actual items.

If you want to cancel _all_ entries of a single bill you'll
have to delete the bill (at which point GNUmed will ask 
whether you want to delete or remove-and-keep the items on it).

Of course, GNUmed should refuse to attempt to remove all
items w/o deleting the bill, too -- which I am going to add
now.

Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

[Prev in Thread] Current Thread [Next in Thread]