prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Admin sales shift API should also return total_paid_revenue
  ### Is your feature request related to a problem? Please describe.
  The current admin sales shift api route only gives the total_revenue for a shift, but this might contain unpaid orders. We don't want those in certain scoreboards, like for the rag week.
  
  ### Describe the solution you'd like
  Add `total_paid_revenue`
  
  ### Motivation
  
  ### Describe alternatives you've considered
  
  ### Additional context
  
  
  </issue>
  <code>
  [start of website/sales/api/v2/admin/serializers/shift.py]
  1 from rest_framework import serializers
  2 
  3 from sales.models.product import ProductListItem
  4 from sales.models.shift import Shift
  5 
  6 
  7 class ProductListItemSerializer(serializers.ModelSerializer):
  8     """Serializer for product list items."""
  9 
  10     class Meta:
  11         model = ProductListItem
  12         fields = ("name", "price", "age_restricted")
  13         read_only_fields = ("name", "price", "age_restricted")
  14 
  15     name = serializers.SerializerMethodField("_name")
  16     age_restricted = serializers.SerializerMethodField("_age_restricted")
  17 
  18     def _name(self, instance):
  19         return instance.product.name
  20 
  21     def _age_restricted(self, instance):
  22         return instance.product.age_restricted
  23 
  24 
  25 class ShiftSerializer(serializers.ModelSerializer):
  26     """Serializer for shifts."""
  27 
  28     class Meta:
  29         model = Shift
  30         fields = (
  31             "pk",
  32             "title",
  33             "locked",
  34             "active",
  35             "start",
  36             "end",
  37             "products",
  38             "total_revenue",
  39             "num_orders",
  40             "product_sales",
  41         )
  42 
  43     total_revenue = serializers.DecimalField(
  44         max_digits=10, decimal_places=2, min_value=0, read_only=True
  45     )
  46 
  47     products = ProductListItemSerializer(
  48         source="product_list.product_items", many=True, read_only=True
  49     )
  50 
  51     title = serializers.SerializerMethodField("_get_title")
  52 
  53     def _get_title(self, instance):
  54         return instance.title
  55 
  56     product_sales = serializers.JSONField()
  57
  [end of website/sales/api/v2/admin/serializers/shift.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/website/sales/api/v2/admin/serializers/shift.py b/website/sales/api/v2/admin/serializers/shift.py
  --- a/website/sales/api/v2/admin/serializers/shift.py
  +++ b/website/sales/api/v2/admin/serializers/shift.py
  @@ -1,5 +1,6 @@
   from rest_framework import serializers
   
  +from payments.api.v2.serializers.payment_amount import PaymentAmountSerializer
   from sales.models.product import ProductListItem
   from sales.models.shift import Shift
   
  @@ -36,13 +37,13 @@
               "end",
               "products",
               "total_revenue",
  +            "total_revenue_paid",
               "num_orders",
               "product_sales",
           )
   
  -    total_revenue = serializers.DecimalField(
  -        max_digits=10, decimal_places=2, min_value=0, read_only=True
  -    )
  +    total_revenue = PaymentAmountSerializer(min_value=0, read_only=True)
  +    total_revenue_paid = PaymentAmountSerializer(min_value=0, read_only=True)
   
       products = ProductListItemSerializer(
           source="product_list.product_items", many=True, read_only=True
  
verification_info: {"golden_diff": "diff --git a/website/sales/api/v2/admin/serializers/shift.py b/website/sales/api/v2/admin/serializers/shift.py\n--- a/website/sales/api/v2/admin/serializers/shift.py\n+++ b/website/sales/api/v2/admin/serializers/shift.py\n@@ -1,5 +1,6 @@\n from rest_framework import serializers\n \n+from payments.api.v2.serializers.payment_amount import PaymentAmountSerializer\n from sales.models.product import ProductListItem\n from sales.models.shift import Shift\n \n@@ -36,13 +37,13 @@\n             \"end\",\n             \"products\",\n             \"total_revenue\",\n+            \"total_revenue_paid\",\n             \"num_orders\",\n             \"product_sales\",\n         )\n \n-    total_revenue = serializers.DecimalField(\n-        max_digits=10, decimal_places=2, min_value=0, read_only=True\n-    )\n+    total_revenue = PaymentAmountSerializer(min_value=0, read_only=True)\n+    total_revenue_paid = PaymentAmountSerializer(min_value=0, read_only=True)\n \n     products = ProductListItemSerializer(\n         source=\"product_list.product_items\", many=True, read_only=True\n", "issue": "Admin sales shift API should also return total_paid_revenue\n### Is your feature request related to a problem? Please describe.\r\nThe current admin sales shift api route only gives the total_revenue for a shift, but this might contain unpaid orders. We don't want those in certain scoreboards, like for the rag week.\r\n\r\n### Describe the solution you'd like\r\nAdd `total_paid_revenue`\r\n\r\n### Motivation\r\n\r\n### Describe alternatives you've considered\r\n\r\n### Additional context\r\n\n", "before_files": [{"content": "from rest_framework import serializers\n\nfrom sales.models.product import ProductListItem\nfrom sales.models.shift import Shift\n\n\nclass ProductListItemSerializer(serializers.ModelSerializer):\n    \"\"\"Serializer for product list items.\"\"\"\n\n    class Meta:\n        model = ProductListItem\n        fields = (\"name\", \"price\", \"age_restricted\")\n        read_only_fields = (\"name\", \"price\", \"age_restricted\")\n\n    name = serializers.SerializerMethodField(\"_name\")\n    age_restricted = serializers.SerializerMethodField(\"_age_restricted\")\n\n    def _name(self, instance):\n        return instance.product.name\n\n    def _age_restricted(self, instance):\n        return instance.product.age_restricted\n\n\nclass ShiftSerializer(serializers.ModelSerializer):\n    \"\"\"Serializer for shifts.\"\"\"\n\n    class Meta:\n        model = Shift\n        fields = (\n            \"pk\",\n            \"title\",\n            \"locked\",\n            \"active\",\n            \"start\",\n            \"end\",\n            \"products\",\n            \"total_revenue\",\n            \"num_orders\",\n            \"product_sales\",\n        )\n\n    total_revenue = serializers.DecimalField(\n        max_digits=10, decimal_places=2, min_value=0, read_only=True\n    )\n\n    products = ProductListItemSerializer(\n        source=\"product_list.product_items\", many=True, read_only=True\n    )\n\n    title = serializers.SerializerMethodField(\"_get_title\")\n\n    def _get_title(self, instance):\n        return instance.title\n\n    product_sales = serializers.JSONField()\n", "path": "website/sales/api/v2/admin/serializers/shift.py"}]}