fray...@hephaestos.ovh.adullact.org
unread,Jun 11, 2020, 5:52:49 AM6/11/20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openmairie-...@googlegroups.com
Author: fraynaud
Date: 2020-06-11 11:52:46 +0200 (Thu, 11 Jun 2020)
New Revision: 1109
Modified:
branches/5.1.0/HISTORY.txt
branches/5.1.0/app/framework_openmairie.class.php
branches/5.1.0/obj/courrier.class.php
Log:
traitement registre en action
Modified: branches/5.1.0/HISTORY.txt
===================================================================
--- branches/5.1.0/HISTORY.txt 2020-06-11 09:15:56 UTC (rev 1108)
+++ branches/5.1.0/HISTORY.txt 2020-06-11 09:52:46 UTC (rev 1109)
@@ -25,7 +25,8 @@
pb mail diffusion -> config password reset
bug sous service
-(bug) correction des erreurs de notices et des erreurs deprecated (10 juin 2020)
+(+) traitement remise a 0 registre depart et arrivée fr-10-06-2020
+(bug) correction des erreurs de notices et des erreurs deprecated fr-10 juin 2020
(+) affichage des notes et taches dans le courrier arrivée
(+) passage en framework om 4.9.2 [26/02/2020] fr-arles
(+) om-theme et normalisation du logo
Modified: branches/5.1.0/app/framework_openmairie.class.php
===================================================================
--- branches/5.1.0/app/framework_openmairie.class.php 2020-06-11 09:15:56 UTC (rev 1108)
+++ branches/5.1.0/app/framework_openmairie.class.php 2020-06-11 09:52:46 UTC (rev 1109)
@@ -274,11 +274,20 @@
$links[] = array(
"href" => OM_ROUTE_FORM."&obj=courrier&action=7",
"class" => "courrier",
- "title" => _("Mise a 0 registre courrier"),
+ "title" => _("Mise a 0 registre courrier arrivée"),
"right" => array("courrier", "courrier_tab", ),
"open" => array("index.php|courrier[module=form]",),
);
+
$links[] = array(
+ "href" => OM_ROUTE_FORM."&obj=courrier&action=8",
+ "class" => "courrier",
+ "title" => _("Mise a 0 registre courrier depart"),
+ "right" => array("courrier", "courrier_tab", ),
+ "open" => array("index.php|courrier[module=form]",),
+ );
+
+ $links[] = array(
"href" => "../app/gestion_scan.php",
"title" => _("Gestion ducuments"),
"right" => array("gestion_scan" ),
Modified: branches/5.1.0/obj/courrier.class.php
===================================================================
--- branches/5.1.0/obj/courrier.class.php 2020-06-11 09:15:56 UTC (rev 1108)
+++ branches/5.1.0/obj/courrier.class.php 2020-06-11 09:52:46 UTC (rev 1109)
@@ -34,14 +34,26 @@
"button" => "diffuser",
"permission_suffix" => "diffuser",
);
- /*
- // om_dbform
+
+ $this->class_actions[7] = array(
+ "identifier" => "registre",
+ "portlet"=>array(), // pas d affichage en portlet
+ "view" => "registrecourrier_miseazero", // gestion affichage par la methode
+ );
+
+ $this->class_actions[8] = array(
+ "identifier" => "registre_depart",
+ "portlet"=>array(), // pas d affichage en portlet
+ "view" => "registrecourrier_depart_miseazero", // gestion affichage par la methode
+ );
+
+ // ex om_dbform
if (isset($this->f->submitted_get_value['obj'])) {
if ($this->f->submitted_get_value['obj'] != NULL) {
$this->preparePrecSuiv();
}
}
- */
+
}
@@ -1701,5 +1713,115 @@
return $prev_suiv;
}
+// =======================
+// mise a zero du registre
+// =======================
+
+ function registrecourrier_miseazero(){
+ $obj="registrecourrier";
+ $description = _("Cette page vous permet de remettre a 1 le numero de registre des courriers arrivés.");
+ $description .= " "._("Ce traitement est a faire en debut d annee.");
+ $this->f->displayDescription($description);
+ // GET
+ if (isset ($_GET['validation'])){
+ $validation=$_GET['validation'];
+ }else{
+ $validation=0;
+ }
+ if($validation==0){
+ $validation=1;
+ $sql1 = "select last_value from ".DB_PREFIXE."registre_seq";
+ $res1=$this->f->db->getOne($sql1);
+ $this->f->isDatabaseError($res1);
+ echo "<fieldset class=\"cadre ui-corner-all ui-widget-content\">\n";
+ echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">";
+ echo _("Registre")."</legend>";
+ echo "<div class='message ui-widget ui-corner-all ui-state-highlight ui-state-error'>";
+ echo "<span class='ui-icon ui-icon-info'></span>";
+ if ($res1!=0){
+ echo _("le dernier no du registre est")." : ".$res1." ";
+ }else{
+ echo _("vous avez deja fait une remise a 0")."<br>";
+ }
+ echo "</div>";
+ echo "<table class='tab-tab' CELLPADDING='5px' CELLSPACING='10px'>";
+ echo "<tr class='tabCol'><td colspan='2'>"._("Traitement du registre")."</td></tr>";
+ echo "<form method=\"POST\" action=\"../app/index.php?module=form&obj=courrier&action=7&validation=".$validation."\" name=f1>";
+ echo "<tr class='fondvalid'><td colspan=2><br>";
+ if ($this->f->isAccredited($obj)) {
+ echo "<input type='submit' value='"._("confirmez")." "._("traitement").
+ " "._("registre courrier arrivée")."'>";
+ }else{
+ echo _("vous n'avez pas le droit")." ".$obj;
+ }
+ echo "</form>";
+ echo "</td></tr></table>";
+ }else{
+ $fic_seq="";
+ $fic_seq=DB_PREFIXE."registre_seq";
+ $sql="SELECT setval( '$fic_seq',1)";
+ $res=$this->f->db->getOne($sql);
+ $this->f->isDatabaseError($res);
+ echo "<div class='message ui-widget ui-corner-all ui-state-highlight ui-state-error'>";
+ echo "<span class='ui-icon ui-icon-info'></span>";
+ echo "<font size='2'><b>"._("Mise a 0 du registre courrier arrivée")." "._("reussi")."</b></font>";
+ echo "</div>";
+ }
+ }
+
+ function registrecourrier_depart_miseazero(){
+ $obj="registrecourrier";
+ $description = _("Cette page vous permet de remettre a 1 le numero de registre des courriers arrivés.");
+ $description .= " "._("Ce traitement est a faire en debut d annee.");
+ $this->f->displayDescription($description);
+ // GET
+ if (isset ($_GET['validation'])){
+ $validation=$_GET['validation'];
+ }else{
+ $validation=0;
+ }
+ if($validation==0){
+ $validation=1;
+ $sql1 = "select last_value from ".DB_PREFIXE."registre_depart_seq";
+ $res1=$this->f->db->getOne($sql1);
+ $this->f->isDatabaseError($res1);
+ echo "<fieldset class=\"cadre ui-corner-all ui-widget-content\">\n";
+ echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">";
+ echo _("Registre")."</legend>";
+ echo "<div class='message ui-widget ui-corner-all ui-state-highlight ui-state-error'>";
+ echo "<span class='ui-icon ui-icon-info'></span>";
+ if ($res1!=0){
+ echo _("le dernier no du registre depart est")." : ".$res1." ";
+ }else{
+ echo _("vous avez deja fait une remise a 0")."<br>";
+ }
+ echo "</div>";
+ echo "<table class='tab-tab' CELLPADDING='5px' CELLSPACING='10px'>";
+ echo "<tr class='tabCol'><td colspan='2'>"._("Traitement du registre")."</td></tr>";
+ echo "<form method=\"POST\" action=\"../app/index.php?module=form&obj=courrier&action=7&validation=".$validation."\" name=f1>";
+ echo "<tr class='fondvalid'><td colspan=2><br>";
+ if ($this->f->isAccredited($obj)) {
+ echo "<input type='submit' value='"._("confirmez")." "._("traitement").
+ " "._("registre courrier depart")."'>";
+ }else{
+ echo _("vous n'avez pas le droit")." ".$obj;
+ }
+ echo "</form>";
+ echo "</td></tr></table>";
+ }else{
+ $fic_seq="";
+ $fic_seq=DB_PREFIXE."registre_depart_seq";
+ $sql="SELECT setval( '$fic_seq',1)";
+ $res=$this->f->db->getOne($sql);
+ $this->f->isDatabaseError($res);
+ echo "<div class='message ui-widget ui-corner-all ui-state-highlight ui-state-error'>";
+ echo "<span class='ui-icon ui-icon-info'></span>";
+ echo "<font size='2'><b>"._("Mise a 0 du registre courrier arrivée")." "._("reussi")."</b></font>";
+ echo "</div>";
+ }
+ }
+
+
+
}