feat: add daily report functionality and settlement status to shop orders

This commit is contained in:
Parsa Nazer
2026-02-09 11:08:39 +03:30
parent 0771a286b2
commit bd7c7252c7
6 changed files with 78 additions and 11 deletions
+2
View File
@@ -279,6 +279,7 @@ class ShopOrderModel(models.Model):
"""
order = models.ForeignKey(OrderModel, on_delete=models.CASCADE, related_name='shop_orders')
shop = models.ForeignKey('account.ShopModel', on_delete=models.CASCADE, related_name='shop_orders')
daily_report = models.ForeignKey('ShopDailyReport', on_delete=models.SET_NULL, null=True, blank=True, related_name='shop_orders', verbose_name='گزارش روزانه')
# Customer Information
customer = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, blank=True, verbose_name='مشتری')
@@ -355,6 +356,7 @@ class ShopDailyReport(models.Model):
total_sales = models.BigIntegerField(default=0)
total_commission = models.BigIntegerField(default=0)
total_payable = models.BigIntegerField(default=0)
is_settled = models.BooleanField(default=False, verbose_name='تسویه شده')
created_at = models.DateTimeField(auto_now_add=True)
class Meta: