add transport to total
This commit is contained in:
@@ -59,7 +59,7 @@ class Cart:
|
|||||||
)
|
)
|
||||||
self.payment.value = 'ramburs' if self.user['email'] != 'user_de_test@gmail.com' else None
|
self.payment.value = 'ramburs' if self.user['email'] != 'user_de_test@gmail.com' else None
|
||||||
self.payment_message = ft.Text("")
|
self.payment_message = ft.Text("")
|
||||||
self.payment_redirect_button = ft.ElevatedButton(
|
self.payment_redirect_button = ft.FilledButton(
|
||||||
"Finalizeaza plata",
|
"Finalizeaza plata",
|
||||||
visible=False,
|
visible=False,
|
||||||
)
|
)
|
||||||
@@ -210,11 +210,11 @@ class Cart:
|
|||||||
weight=ft.FontWeight.BOLD
|
weight=ft.FontWeight.BOLD
|
||||||
),
|
),
|
||||||
self.payment_message,
|
self.payment_message,
|
||||||
self.payment_redirect_button,
|
ft.Row([self.payment_redirect_button],alignment=ft.MainAxisAlignment.CENTER),
|
||||||
ft.Row([self.error_message],alignment=ft.MainAxisAlignment.CENTER),
|
ft.Row([self.error_message],alignment=ft.MainAxisAlignment.CENTER),
|
||||||
ft.Row(
|
ft.Row(
|
||||||
[
|
[
|
||||||
ft.FilledButton(
|
ft.Button(
|
||||||
"Comanda",
|
"Comanda",
|
||||||
width=150,
|
width=150,
|
||||||
on_click=self.open_confirm_dialog
|
on_click=self.open_confirm_dialog
|
||||||
@@ -281,7 +281,7 @@ class Cart:
|
|||||||
|
|
||||||
def get_order_products(self, id):
|
def get_order_products(self, id):
|
||||||
products = self.orders_manager.get_order_products(id)
|
products = self.orders_manager.get_order_products(id)
|
||||||
total = 17
|
total = 0
|
||||||
|
|
||||||
all_products = []
|
all_products = []
|
||||||
for product in products:
|
for product in products:
|
||||||
@@ -291,7 +291,7 @@ class Cart:
|
|||||||
if name not in all_products:
|
if name not in all_products:
|
||||||
all_products.append(name)
|
all_products.append(name)
|
||||||
try:
|
try:
|
||||||
self.pret_total.value = f'Pret total: {total}'
|
self.pret_total.value = f'Pret total: {total+17}'
|
||||||
self.pret_total.update()
|
self.pret_total.update()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user