Delimiter $$
/**
 * compute BUSINESS_COMPUTE_ENTRIES_DATA
 * lance les procédure de precalcul des données lié aux mouvements
 * met à jour la table ENTRIES_COMPUTED_DATA
 */ 
Drop Procedure if Exists BUSINESS_COMPUTE_ENTRIES_DATA $$
Create Procedure BUSINESS_COMPUTE_ENTRIES_DATA(In refdate DateTime, In idaccounts Int unsigned, In identities Int unsigned)
Begin
    entr_computed_data: begin
        if refdate is null Then
            set refdate = AMO_BAL_REFDATE();
        End if ;
        call BUSINESS_COMPUTE_ENTRIES_DATA_NB_DOCS(refdate, idaccounts, identities, null);
    end;
    
end $$
Delimiter ;
