[opendebitdeboisson-commits] r1851 - in trunk: . obj

0 views
Skip to first unread message

fmi...@users.adullact.net

unread,
Jun 4, 2024, 5:19:33 PMJun 4
to openmairie-ope...@googlegroups.com
Author: fmichon
Date: 2024-06-04 23:19:30 +0200 (Tue, 04 Jun 2024)
New Revision: 1851

Modified:
trunk/HISTORY.txt
trunk/obj/declaration.class.php
Log:
* Evolution : Les editions 'recepisse' et 'cerfa_declaration' sont desormais optionnelles sur la declaration.


Modified: trunk/HISTORY.txt
===================================================================
--- trunk/HISTORY.txt 2024-05-22 14:15:38 UTC (rev 1850)
+++ trunk/HISTORY.txt 2024-06-04 21:19:30 UTC (rev 1851)
@@ -4,7 +4,7 @@
3.0.0-rc2 (unreleased)
----------------------

-* Aucun changement.
+* Évolution : Les éditions 'recepisse' et 'cerfa_declaration' sont désormais optionnelles sur la déclaration.


3.0.0-rc1 (25/04/2024)

Modified: trunk/obj/declaration.class.php
===================================================================
--- trunk/obj/declaration.class.php 2024-05-22 14:15:38 UTC (rev 1850)
+++ trunk/obj/declaration.class.php 2024-06-04 21:19:30 UTC (rev 1851)
@@ -29,6 +29,9 @@
),
"view" => "view_cerfa_declaration",
"permission_suffix" => "consulter",
+ "condition" => array(
+ "is_edition_cerfa_declaration_set",
+ ),
);
//
$this->class_actions[12] = array(
@@ -41,6 +44,9 @@
),
"view" => "view_recepisse",
"permission_suffix" => "consulter",
+ "condition" => array(
+ "is_edition_recepisse_set",
+ ),
);
// ACTION - 601 - listing_advs
$this->class_actions[601] = array(
@@ -57,6 +63,42 @@
}

/**
+ * CONDITION - is_edition_recepisse_set.
+ *
+ * @return boolean
+ */
+ function is_edition_recepisse_set() {
+ $inst__om_edition = $this->f->get_inst__om_edition();
+ $edition = $inst__om_edition->get_edition_from_collectivite(
+ "om_etat",
+ "recepisse",
+ $_SESSION["collectivite"]
+ );
+ if (is_null($edition)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * CONDITION - is_edition_cerfa_declaration_set.
+ *
+ * @return boolean
+ */
+ function is_edition_cerfa_declaration_set() {
+ $inst__om_edition = $this->f->get_inst__om_edition();
+ $edition = $inst__om_edition->get_edition_from_collectivite(
+ "om_etat",
+ "cerfa_declaration",
+ $_SESSION["collectivite"]
+ );
+ if (is_null($edition)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
* GETTER_FORMINC - champs.
*
* - Table de liens 'lien_declaration_contact'.

Reply all
Reply to author
Forward
0 new messages