wherehouse: change inventory list serializer

This commit is contained in:
behruz-dev
2025-11-10 15:54:30 +05:00
parent 94d14d548e
commit e96475c81d
6 changed files with 54 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ from core.apps.wherehouse.models.inventory import Inventory
@shared_task
def create_inventory(
wherehouse, quantity, product, unity, price, project_folder, project, unity_price
wherehouse, quantity, product, unity, price, project_folder, project, unity_price, received_currency
):
inventory, created = Inventory.objects.get_or_create(
product_id=product,
@@ -18,6 +18,7 @@ def create_inventory(
project_folder_id=project_folder,
project_id=project,
unit_price=unity_price,
received_currency=received_currency,
)
)
if not created:

View File

@@ -172,6 +172,7 @@ class PartyChangeStatusToIsMadeApiView(generics.GenericAPIView):
order.project_folder.id if order.project_folder else None,
order.project.id if order.project else None,
order.unit_amount,
order.currency,
)
order.received_count += product_quantity
order.received_date = product_receive_date