rem: if ( DEBUG ) printf ( "gsb_transactions_list_delete_transaction no %d\n", transaction_number );
add: devel_debug ( g_strdup_printf ("gsb_transactions_list_delete_transaction no %d", transaction_number ));
context: gboolean gsb_transactions_list_delete_transaction ( gint transaction_number ){    gint transaction_number_tmp;    gdouble montant;    /* vérifications de bases */    if ( !transaction_number	 ||	 transaction_number < 0 )	return FALSE;    if ( DEBUG )	printf ( "gsb_transactions_list_delete_transaction no %d\n",		 transaction_number );    /* check if the transaction is not reconciled */    if ( gsb_transactions_list_check_mark ( gsb_data_transaction_get_pointer_to_transaction (transaction_number)))    {	dialogue_error ( _("Impossible to delete a reconciled transaction.\nThe transaction, the contra-transaction or the children if it is a breakdown are reconciled. You can remove the reconciliation with Ctrl R if it is really necessary.") );	return FALSE;    }    if ( !question_yes_no_hint ( _("Delete a transaction"),				 g_strdup_printf ( _("Do you really want to delete the transaction whith the party '%s' ?"),						   gsb_data_payee_get_name ( gsb_data_transaction_get_party_number ( transaction_number),								      FALSE ))))	return FALSE;    /* find the next transaction to be selected */    if ( gsb_data_account_get_current_transaction_number (gsb_data_transaction_get_account_number (transaction_number)) == transaction_number)    {	gint next_transaction_number;	next_transaction_number = transaction_number;	/* xxx à vérifier que le changemment de sélection lors de la supression avec ventil marche bien... */	while ( next_transaction_number		&&		( next_transaction_number == transaction_number 		  ||		  gsb_data_transaction_get_mother_transaction_number (next_transaction_number) == transaction_number ))	    next_transaction_number = gsb_transactions_list_get_transaction_next ( next_transaction_number,										   gsb_data_transaction_get_mother_transaction_number (next_transaction_number));	gsb_data_account_set_current_transaction_number ( gsb_data_transaction_get_account_number (transaction_number),						     next_transaction_number);    }    /* if it's a transfer, delete the contra-transaction */    if ( gsb_data_transaction_get_transaction_number_transfer ( transaction_number)	 &&	 gsb_data_transaction_get_account_number_transfer ( transaction_number)!= -1 )    {	transaction_number_tmp = gsb_data_transaction_get_transaction_number_transfer ( transaction_number);	gsb_transactions_list_delete_transaction_from_tree_view (gsb_data_transaction_get_pointer_to_transaction (transaction_number_tmp));	gsb_data_transaction_remove_transaction (transaction_number_tmp);    }    /* if it's a breakdown, delete all the childs */    if ( gsb_data_transaction_get_breakdown_of_transaction ( transaction_number))    {	GSList *list_tmp_transactions;	list_tmp_transactions = gsb_data_transaction_get_transactions_list ();	while ( list_tmp_transactions )	{	    transaction_number_tmp = gsb_data_transaction_get_transaction_number (list_tmp_transactions -> data);	    if ( gsb_data_transaction_get_account_number (transaction_number_tmp) == gsb_data_transaction_get_account_number (transaction_number))	    {		if ( gsb_data_transaction_get_mother_transaction_number (transaction_number_tmp) == transaction_number )		{		    /* on se place tout de suite sur l'opé suivante */		    list_tmp_transactions = list_tmp_transactions -> next;		    if ( gsb_data_transaction_get_transaction_number_transfer (transaction_number_tmp))		    {			/* the breakdown is a transfer, delete the contra-transaction */			gint contra_transaction_number;			contra_transaction_number = gsb_data_transaction_get_transaction_number_transfer (transaction_number_tmp );			gsb_transactions_list_delete_transaction_from_tree_view ( gsb_data_transaction_get_pointer_to_transaction (contra_transaction_number));			gsb_data_transaction_remove_transaction (contra_transaction_number);		    }		    gsb_transactions_list_delete_transaction_from_tree_view ( gsb_data_transaction_get_pointer_to_transaction (transaction_number_tmp));		    gsb_data_transaction_remove_transaction (transaction_number_tmp);		}		else		    list_tmp_transactions = list_tmp_transactions -> next;	    }	    else		list_tmp_transactions = list_tmp_transactions -> next;	}	/* we have also to destroy the white line of the breakdown */	gsb_transactions_list_delete_transaction_from_tree_view ( gsb_transactions_list_find_white_breakdown ( gsb_data_transaction_get_pointer_to_transaction (transaction_number)));    }    /* now we delete the original transaction */    gsb_transactions_list_delete_transaction_from_tree_view ( gsb_data_transaction_get_pointer_to_transaction (transaction_number));    gsb_data_transaction_remove_transaction ( transaction_number);    gsb_transactions_list_set_background_color (gsb_data_transaction_get_account_number (transaction_number));    gsb_transactions_list_set_transactions_balances (gsb_data_transaction_get_account_number (transaction_number));    /*     calcul des nouveaux soldes */    montant = gsb_data_transaction_get_adjusted_amount ( transaction_number);    gsb_data_account_set_current_balance ( gsb_data_transaction_get_account_number (transaction_number),				      gsb_data_account_get_current_balance (gsb_data_transaction_get_account_number (transaction_number)) - montant );    if ( gsb_data_transaction_get_marked_transaction ( transaction_number))	gsb_data_account_set_marked_balance ( gsb_data_transaction_get_account_number (transaction_number),					 gsb_data_account_get_marked_balance (gsb_data_transaction_get_account_number (transaction_number)) - montant );    /*     on met à jour les labels de solde */    mise_a_jour_labels_soldes ();    /* si on est en train d'équilibrer => recalcule le total pointé */    if ( etat.equilibrage )	calcule_total_pointe_compte ( gsb_data_transaction_get_account_number (transaction_number));    /* on réaffiche la liste de l'état des comptes de l'accueil */    mise_a_jour_liste_comptes_accueil = 1;    mise_a_jour_soldes_minimaux = 1;    affiche_dialogue_soldes_minimaux ();    /* FIXME : on devrait réafficher les listes de tiers, categ, ib... */    modification_fichier( TRUE );    return FALSE;}