Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Si se cumplen ambas precio 0 y cantidad 0, es facturable #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions gestionatr/input/messages/F1.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,14 @@ def es_facturable(self):
"""Algunas empresas envian periodos que no se deben facturar.
Esos tienen precio 0. Pese a eso, si tienen cantidad los facturaremos
igual ya que tambien hay empresas que quieren facturar lineas pero dejan
el precio a 0"""
return bool(self.precio) or bool(self.cantidad)
el precio a 0.
Hay distribuidoras que envían periodos con precio 0 y cantidad 0, que
son de activa y reactiva en periodos que sí hay que tener en cuenta.
Si ambos son 0, los consideramos facturables.
"""
return bool(self.precio) or bool(self.cantidad) or (
not bool(self.precio) and not bool(self.cantidad)
)


class PeriodoPotencia(Periodo):
Expand Down