gnumed-bugs
[Top][All Lists]
Advanced

[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: Busser, Jim
Subject: Re: [Gnumed-bugs] GNUmed 1.25 Billing module - Remove button does not remove
Date: Sat, 5 Jan 2013 01:49:13 +0000

On 2013-01-04, at 5:05 PM, "Busser, Jim" <address@hidden> wrote:

> 
> On 2013-01-04, at 4:45 PM, "Busser, Jim" <address@hidden> wrote:
> 
>> Are there any constraints that determine whether or not the remove button 
>> will function, or is this an outright bug?
>> 
>> In the present instance, a billing which I created using the Add button (and 
>> which I did not yet invoice) does not allow itself to be removed by the 
>> Remove button, despite that the Remove button gives me no complaints about 
>> my request.
>> 
>> -- Jim
> 
> further to the above, when in psql I do
> 
>       select * from bill.bill_item where fk_billable = (select pk from 
> ref.billable where code = '00311') ;
> 
> psql returns one row, however even after I do
> 
>       set default_transaction_read_only to off;
> 
> I cannot successfully delete the above record… when I try
> 
>       delete from bill.bill_item where fk_billable = (select pk from 
> ref.billable where code = '00311') ;
> 
> I get
> 
>       DELETE 0
> 
> ??
> 
> By the way, I do not presently have any bills in my 'bill' table.
> 
> -- Jim

Disabling (after which deleting and then re-enabling)

        ALTER TABLE bill.bill_item DISABLE TRIGGER tr_prevent_empty_bills ;

allowed me to delete the offending record. Hopefully it was ok to circumvent 
the constraint. Question: if I do

        \d+ bill.bill_item

I am shown triggers which include the following

        tr_prevent_empty_bills BEFORE DELETE OR UPDATE ON bill.bill_item FOR 
EACH ROW EXECUTE PROCEDURE bill.trf_prevent_empty_bills()

but I had trouble to further examine for why the above gives trouble. Where is 
the procedure

        bill.trf_prevent_empty_bills()

further defined? Is there a command with which to further expose what is wrong 
with it?

I am assuming that this trigger wants to avoid the existence of bills for which 
there exist no items linked to the bill. I only cannot see how this is 
achieved. If I do

        \d+ bill.bill

this does not show me what I think I am looking for. ???

-- Jim




reply via email to

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