@@ -66,7 +66,7 @@ def deposits(self, transaction_status: str = 'successful') -> List[Dict]:
6666 def sales (self , transaction_status : str = 'successful' ) -> List [Dict ]:
6767 """Calculates the total amount deducted for recharges"""
6868 total_amount , total_saldo , total_movil , total_nauta = 0 , 0 , 0 , 0
69- total_nauta_hogar , total_factura , total_propia = 0 , 0 , 0
69+ total_nauta_hogar , total_factura , total_propia , total_electrica = 0 , 0 , 0 , 0
7070 data = []
7171 for row in self .transactions (transaction_status ):
7272 if row ['transaction_type' ] == 'Venta de Saldo AT' :
@@ -81,8 +81,10 @@ def sales(self, transaction_status: str = 'successful') -> List[Dict]:
8181 total_nauta_hogar += row ['amount_paid' ]
8282 if row ['transaction_type' ] == 'Pago Factura AT' :
8383 total_factura += row ['amount_paid' ]
84+ if row ['transaction_type' ] == 'Factura Electrica' :
85+ total_electrica += row ['amount_paid' ]
8486 if row ['transaction_type' ] not in ['Estado de Cuenta' , 'Recarga Bolsa CUP' ]:
8587 data .append (row )
8688 total_amount += row ['amount_paid' ]
8789 profits = total_amount / 0.9 - total_amount
88- return round (total_amount , 2 ), round (total_saldo , 2 ), round (total_propia , 2 ), round (total_movil , 2 ), round (total_nauta , 2 ), round (total_nauta_hogar , 2 ), round (total_factura , 2 ), round (profits , 2 ), data
90+ return round (total_amount , 2 ), round (total_saldo , 2 ), round (total_propia , 2 ), round (total_movil , 2 ), round (total_nauta , 2 ), round (total_nauta_hogar , 2 ), round (total_factura , 2 ), round (total_electrica , 2 ), round ( profits , 2 ), data
0 commit comments