Commit b95ceb37 by Damien Moulard

Merge branch 'desactiver-cotisation' into 'develop'

Desactiver cotisation

See merge request !135
parents e49eaef7 c73e439b
......@@ -59,7 +59,7 @@ class GlobalParameter
const SSA_HOUSEHOLD_ALLOCATION_MSG_FOR_COMPTOIR = 'SSA_HOUSEHOLD_ALLOCATION_MSG_FOR_COMPTOIR';
const ACTIVATE_ADHERENTS_BALANCE_CEILING = 'ACTIVATE_ADHERENTS_BALANCE_CEILING';
const SSA_SIMPL_HOUSEHOLD_ADMIN_TEXT_INFO_ADHERENT_FALLBACKS_TO_PROFILECOTIS = 'SSA_SIMPL_HOUSEHOLD_ADMIN_TEXT_INFO_ADHERENT_FALLBACKS_TO_PROFILECOTIS';
const SSA_DISABLE_COTISATION = 'SSA_DISABLE_COTISATION';
/**
* @var \Ramsey\Uuid\UuidInterface
*
......
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20250317142939 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql("
INSERT INTO global_parameter (id, name, description, value, mandatory)
VALUES (UUID(), 'SSA_DISABLE_COTISATION', 'La valeur \'true\' bloque la possibilité de cotiser.', '', '0')
");
}
public function down(Schema $schema) : void
{
$this->addSql("DELETE FROM global_parameter where name='SSA_DISABLE_COTISATION'");
// this down() migration is auto-generated, please modify it to your needs
}
}
......@@ -7,7 +7,9 @@
{% set form = getPayerCotisationTAVForm(app.user) %}
{% set formRecurrentPayment = getPaiementRecurrentCotisationTAVForm(app.user) %}
{% if form.montant.vars.value == false and not household_based_allowance %}
{% if KOH_SSA_DISABLE_COTISATION == 'true' %}
<p>{{ 'La possibilité de cotiser a été désactivée par un•e administrateur•rice.' }}</p>
{% elseif form.montant.vars.value == false and not household_based_allowance %}
<p>{{ 'Vous n\'avez pas de profil de cotisation associé, vous ne pouvez donc pas payer de cotisation.'|trans }}</p>
<p>{{ 'Veuillez contacter un•e administrateur•rice.'|trans }}</p>
{% elseif form.montant.vars.value == false and household_based_allowance %}
......
......@@ -4,7 +4,9 @@
<i class="fa fa-exchange fa-exchange-alt mr-4"></i> {{ 'Encaisser la COTISATION d\'un habitant'|trans }}
{% endblock blocktitle %}
{% block blockcontent %}
{% if app.session.has('_comptoirgere') %}
{% if KOH_SSA_DISABLE_COTISATION == 'true' %}
<p>{{ 'La possibilité de cotiser a été désactivée par un•e administrateur•rice.' }}</p>
{% elseif app.session.has('_comptoirgere') %}
<div id="formEncaisserCotisationAdherent-montant-container" style="display:none">
<h5> <b>Montant de la cotisation : <span id="formEncaisserCotisationAdherent-montant-display"></span></b></h5>
<br/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment