fix report issue
This commit is contained in:
@@ -112,6 +112,8 @@ class DashboardPage:
|
|||||||
#print(month_first_day)
|
#print(month_first_day)
|
||||||
if len(self.all_orders)>0:
|
if len(self.all_orders)>0:
|
||||||
for order in self.all_orders:
|
for order in self.all_orders:
|
||||||
|
if order.get('status') != 'active':
|
||||||
|
continue
|
||||||
dt = self._parse_dt(order.get('created_at'))
|
dt = self._parse_dt(order.get('created_at'))
|
||||||
if dt and dt.date() >= month_first_day.date():
|
if dt and dt.date() >= month_first_day.date():
|
||||||
self.orders.append(order)
|
self.orders.append(order)
|
||||||
|
|||||||
@@ -141,8 +141,8 @@ class ReportPage:
|
|||||||
ft.DataCell(ft.Text(client_name)),
|
ft.DataCell(ft.Text(client_name)),
|
||||||
ft.DataCell(ft.Text(transporter_name)),
|
ft.DataCell(ft.Text(transporter_name)),
|
||||||
ft.DataCell(ft.Text(order_date)),
|
ft.DataCell(ft.Text(order_date)),
|
||||||
ft.DataCell(ft.Text(received)),
|
|
||||||
ft.DataCell(ft.Text(paid)),
|
ft.DataCell(ft.Text(paid)),
|
||||||
|
ft.DataCell(ft.Text(received)),
|
||||||
ft.DataCell(ft.Text(profit)),
|
ft.DataCell(ft.Text(profit)),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user