rem: struct operation_echeance *scheduled_transaction )
add: gint scheduled_number )
context: gboolean gsb_scheduler_get_category_for_transaction_from_transaction ( gint transaction_number,								       struct operation_echeance *scheduled_transaction ){    /* if category is set, it's a normal category */    if ( scheduled_transaction -> categorie )    {	/* it's a normal category */	gsb_data_transaction_set_category_number ( transaction_number,						   scheduled_transaction -> categorie );	gsb_data_transaction_set_sub_category_number ( transaction_number,						       scheduled_transaction -> sous_categorie );	return TRUE;    }    if ( scheduled_transaction -> operation_ventilee )    {	/* it's a breakdown of transaction,	 * we will check all the scheduled transactions to find all the children */	GSList *scheduled_transactions_list;	gsb_data_transaction_set_breakdown_of_transaction ( transaction_number,							    1 );	scheduled_transactions_list = liste_struct_echeances;	while (scheduled_transactions_list)	{	    struct operation_echeance *scheduled_transaction_child;	    scheduled_transaction_child = scheduled_transactions_list -> data;	    if ( scheduled_transaction_child -> no_operation_ventilee_associee == scheduled_transaction -> no_operation )	    {		/* the scheduled_transaction_child is a child of scheduled_transaction */		gint breakdown_transaction_number;		/* we create the daughter transaction */		breakdown_transaction_number = gsb_data_transaction_new_transaction ( gsb_data_transaction_get_account_number (transaction_number));		/* most of that transaction is the same of the mother */		gsb_data_transaction_copy_transaction ( transaction_number,							breakdown_transaction_number );		/* set the mother */		gsb_data_transaction_set_mother_transaction_number ( breakdown_transaction_number,								     transaction_number );		/* now we had to change what is specific to the daughter */		gsb_data_transaction_set_amount ( breakdown_transaction_number,						  scheduled_transaction -> montant );		gsb_data_transaction_set_category_number ( breakdown_transaction_number,							   scheduled_transaction -> categorie );		gsb_data_transaction_set_sub_category_number ( breakdown_transaction_number,							       scheduled_transaction -> sous_categorie );		gsb_data_transaction_set_notes ( breakdown_transaction_number,						 scheduled_transaction -> notes );		gsb_data_transaction_set_budgetary_number ( breakdown_transaction_number,							    scheduled_transaction -> imputation);		gsb_data_transaction_set_sub_budgetary_number ( breakdown_transaction_number,								scheduled_transaction -> sous_imputation);		gsb_data_transaction_set_financial_year_number ( breakdown_transaction_number,								 scheduled_transaction -> no_exercice);		/* if it's a transfer, set the contra transaction */		if ( scheduled_transaction -> compte_virement != -1 )		{		    gint contra_transaction_number;		    contra_transaction_number = gsb_form_validate_transfer ( breakdown_transaction_number,									     TRUE,									     gsb_data_account_get_name ( scheduled_transaction -> compte_virement ));		    gsb_data_transaction_set_method_of_payment_number ( contra_transaction_number,									scheduled_transaction -> type_contre_ope );		}		update_transaction_in_trees (gsb_data_transaction_get_pointer_to_transaction(breakdown_transaction_number));	    }	    scheduled_transactions_list = scheduled_transactions_list -> next;	}    }    else    {	/* it's not a breakdown of transaction and not a normal category 	 * so it's a transfer, except if the target account is -1 then it's a	 * transaction with no category */	if ( scheduled_transaction -> compte_virement != -1 )	{	    gint contra_transaction_number;	    contra_transaction_number = gsb_form_validate_transfer ( transaction_number,								     TRUE,								     gsb_data_account_get_name ( scheduled_transaction -> compte_virement ));	    gsb_data_transaction_set_method_of_payment_number ( contra_transaction_number,								scheduled_transaction -> type_contre_ope );	}    }    return TRUE;}