Skip to content

Commit

Permalink
Merge pull request #730 from Som-Energia/FIX_ccpp_esborrany
Browse files Browse the repository at this point in the history
fix ccpp esborrany
  • Loading branch information
pauboixsom authored Sep 27, 2024
2 parents 8903eec + 7247e46 commit 936da7c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions som_polissa_condicions_generals/models/report_backend_ccpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,18 +265,17 @@ def get_prices_data(self, cursor, uid, pol, context=None): # noqa: C901
pricelist_id = pol_obj.escull_llista_preus(
cursor, uid, pol.id, tarifes_ids, context=context)
ctx.update({'force_pricelist': pricelist_id.id})
tarifes_a_mostrar = [{'date_start': False, 'date_end': False}]
tarifes_a_mostrar = get_comming_atr_price(cursor, uid, polissa, ctx)
res['pricelists'] = []
for dades_tarifa in tarifes_a_mostrar:
text_vigencia = ''
pricelist = {}

if pol.state == 'esborrany':
text_vigencia = ''
elif lead:
if lead:
text_vigencia = ''
elif (not pol.modcontractual_activa.data_final and not (modcon_pendent_indexada or modcon_pendent_indexada)) and dades_tarifa['date_end']: # noqa: E501
text_vigencia = _(u"(vigents fins al {})").format(dades_tarifa['date_end'])
text_vigencia = _(u"(vigents fins al {})").format(
datetime.strptime(dades_tarifa['date_end'], '%Y-%m-%d').strftime('%d/%m/%Y'))
elif dades_tarifa['date_end'] and dades_tarifa['date_start']:
text_vigencia = _(u"(vigents fins al {})").format(
(datetime.strptime(dades_tarifa['date_end'], '%Y-%m-%d')).strftime('%d/%m/%Y'))
Expand Down

0 comments on commit 936da7c

Please sign in to comment.