def distribute_amounts(available: int, categories: dict, distributed_by_categories: dict):
    """
    This function distributes total amount into categories in proportion to their prices.

    :param available: amount of available money from a payment
    :param categories: a dict of categories with their prices
    :param distributed_by_categories: a dict of distributed categories
    :return: a list of proportionally distributed amounts
    """

    data = []
    total_price = sum(categories.values())

    for category, price in categories.items():
        distributed_amount = round(price / total_price * available)

        # Check if sum of already distributed amount and current distributed amount does not exceeds the price
        if distributed_by_categories[category] + distributed_amount >= price:
            distributed_amount = price - distributed_by_categories[category]

        distributed_by_categories[category] += distributed_amount
        total_price -= price
        available -= distributed_amount

        data.append({
            'category': category,
            'net_amount': distributed_amount
        })

    return data, distributed_by_categories