def update_accrued_amt()

in approve-request/app.py [0:0]


def update_accrued_amt(business_entity_id, accruedForecastedSpend, accruedBlockedSpend, accruedApprovedSpend):
    logger.info("Update the Budget with new accrued amounts Blocked: {}, Forcasted: {}, Approved: {}".format(accruedBlockedSpend, accruedForecastedSpend, accruedApprovedSpend))
    update_expression = "set accruedForecastedSpend=:a, accruedBlockedSpend=:b, accruedApprovedSpend=:c"
    expression_attributes = {
        ':a': accruedForecastedSpend,
        ':b': accruedBlockedSpend,
        ':c': accruedApprovedSpend
    }
    response = budgets_table.update_item(
        Key={'partitionKey': budget_partition, 'rangeKey': business_entity_id},
        UpdateExpression = update_expression,
        ExpressionAttributeValues=expression_attributes,
        ReturnValues="UPDATED_NEW")
    logger.info('Successfully Updated accrued Amt for Key: {} with response {}'.format(business_entity_id, response))
    return True