Did you receive this error while you are deleting AP history record (AP/Inquiries/History/Invoice history and matching details) in AX2012 R2 RTM?
Message 1:
SQL error description: [Microsoft][SQL Server Native Client 10.0][SQL Server]BudgetControlProcessProc ( in SysRaiseErrorProc): Trying:exec BudgetControlCheckBudgetProc :BudgetControlCheckBudgetProc: Trying:No BudgetSource rows for BudgetCheckGroup = XXXXXXXX: at line unknown at line 67

If yes, you can try refer to solution from AX 2012 R2: Error al eliminar Historial de facturas y coincidencias de Orden de compra. It is in Spanish language.
The solution the author provided is changing the standard class BudgetControlProcessor, this amendment should allow making the request to the BUDGETSOURCETRACKINGDETAIL table and check if you have the budget tracking information, if not find information shall not perform control of the budget document.
- Create method checkBudgetFix.
- ProcessForBudgetControl modify standard method to invoke the new method.
Note: Please remember to test in your Development environment first before applied to your Production. Try test post the invoice in Development and check the posting calculation result is correct or not.
/// <summary>
/// Invokes the stored procedure for performing the budget check.
/// </summary>
/// <returns>
/// A Boolean that indicates whether the stored procedure completed successfully.
/// </returns>
protected boolean processForBudgetControl()
{
boolean isStoredProcedureSuccessful = true;
// The stored procedure must be called in the case where pending deletions are prepared or return details or
// relieving details are prepared regardless of whether there are control details to be checked
//if (this.areProcessingDetailsPrepared()) //original
if (this.areProcessingDetailsPrepared() && this.checkBudgetFix()) //New fix line
//Please get the checkBudgetFix() method from original website above
{
isStoredProcedureSuccessful = BudgetControlProcessor::invokeBudgetCheckStoredProcedure(
budgetCheckGroup,
areRelievingDetailsPrepared || areRelievingPendingDeletionsPrepared);
}
return isStoredProcedureSuccessful;
}