diff --git a/include/class_html_input.php b/include/class_html_input.php
index 020abcb20..73bf6586a 100755
--- a/include/class_html_input.php
+++ b/include/class_html_input.php
@@ -127,8 +127,8 @@ class HtmlInput
/**
* Make a JSON object, this method create a javascript object
* with the attribute set, it returns a javascript string with the object
- * @param $p_name : name of the object, can be null. If the name is not null, return
- * $p_name={} otherwise only the object {}
+ * @param $p_name : name of the object, can be null. If the name is not null, return
+ * $p_name={} otherwise only the object {}
* @return javascript string with the object
* @note: there is not check on the key->value, so you could need to escape
* special char as quote, single-quote...
@@ -201,7 +201,7 @@ class HtmlInput
/*!\brief create a button with a ref
*\param $p_label the text
- *\param $p_value the location of the window,
+ *\param $p_value the location of the window,
*\param $p_name the id of the span
*\param $p_javascript javascript for this button
*\return string with htmlcode
@@ -286,7 +286,7 @@ class HtmlInput
/**
* return the html code to create an hidden div and a button
* to show this DIV. This contains all the available ledgers
- * for the user in READ or RW
+ * for the user in READ or RW
*@param $p_array is an array obtains thanks User::get_ledger
*@param $selected is an array of checkbox
*@note the choosen ledger are stored in the array r_jrn (_GET)
@@ -376,7 +376,7 @@ class HtmlInput
return $r;
}
/**
- *close button for the HTML popup
+ *close button for the HTML popup
*@see add_div modify_operation
*@param $div_name is the name of the div to remove
*/
@@ -418,7 +418,7 @@ class HtmlInput
/**
* Return a html string with an anchor looking like anchor_button in the right corner
*@param $action action action to perform (message)
- *@param $javascript javascript
+ *@param $javascript javascript
*@note not protected against html
*@see Acc_Ledger::display_search_form
*/
@@ -453,8 +453,8 @@ class HtmlInput
}
/**
*transform request data to hidden
- *@param $array is an of indices
- *@param $request name of the superglobal $_POST $_GET $_REQUEST(default)
+ *@param $array is an of indices
+ *@param $request name of the superglobal $_POST $_GET $_REQUEST(default)
*@return html string with the hidden data
*/
static function array_to_hidden($array,$global_array )
@@ -467,12 +467,12 @@ class HtmlInput
{
if (isset($global_array [$a])) $r.=HtmlInput::hidden($a,$global_array [$a]);
}
-
+
return $r;
}
/**
*transform $_GET data to hidden
- *@param $array is an of indices
+ *@param $array is an of indices
*@see HtmlInput::request_to_hidden
*@return html string with the hidden data
*/
@@ -484,7 +484,7 @@ class HtmlInput
/**
*transform $_POST data to hidden
- *@param $array is an of indices
+ *@param $array is an of indices
*@see HtmlInput::request_to_hidden
*@return html string with the hidden data
*/
@@ -496,7 +496,7 @@ class HtmlInput
/**
*transform $_REQUEST data to hidden
- *@param $array is an of indices
+ *@param $array is an of indices
*@see HtmlInput::request_to_hidden
*@return html string with the hidden data
*/
@@ -508,8 +508,8 @@ class HtmlInput
/**
*transform request data to string
- *@param $array is an of indices
- *@param $request name of the superglobal $_POST $_GET $_REQUEST(default)
+ *@param $array is an of indices
+ *@param $request name of the superglobal $_POST $_GET $_REQUEST(default)
*@return html string with the string data
*/
static function array_to_string($array,$global_array )
@@ -518,19 +518,19 @@ class HtmlInput
$r="?";
if ( count($global_array )==0) return '';
- $and="";
+ $and="";
foreach ($array as $a)
{
if (isset($global_array [$a]))
- $r.=$and."&$a=".$global_array [$a];
- $and="";
+ $r.=$and."$a=".$global_array [$a];
+ $and="&";
}
-
+
return $r;
}
/**
*transform $_GET data to string
- *@param $array is an of indices
+ *@param $array is an of indices
*@see HtmlInput::request_to_string
*@return html string with the string data
*/
@@ -542,7 +542,7 @@ class HtmlInput
/**
*transform $_POST data to string
- *@param $array is an of indices
+ *@param $array is an of indices
*@see HtmlInput::request_to_string
*@return html string with the string data
*/
@@ -554,7 +554,7 @@ class HtmlInput
/**
*transform $_REQUEST data to string
- *@param $array is an of indices
+ *@param $array is an of indices
*@see HtmlInput::request_to_string
*@return html string with the string data
*/
@@ -565,7 +565,7 @@ class HtmlInput
}
/**
- * generate an unique id for a widget,
+ * generate an unique id for a widget,
*@param $p_prefix prefix
*@see HtmlInput::IDate
*@return string with a unique id
@@ -578,7 +578,7 @@ class HtmlInput
/**
* return default if the value if the array doesn't exist
*@param $ind the index to check
- *@param $default the value to return
+ *@param $default the value to return
*@param $array the array
*/
static function default_value($ind,$default,$array)
diff --git a/include/class_icheckbox.php b/include/class_icheckbox.php
index afd83b224..7761d99bd 100644
--- a/include/class_icheckbox.php
+++ b/include/class_icheckbox.php
@@ -55,6 +55,14 @@ class ICheckBox extends HtmlInput
return $r;
}
+ /**
+ *set selected to true (checked) if the value equal the parameter
+ * @param $p_value value to compare
+ */
+ public function set_check($p_value)
+ {
+ if ($this->value==$p_value)$this->selected=true;
+ }
static public function test_me()
{
}
diff --git a/include/class_iradio.php b/include/class_iradio.php
index 379ac13b8..b7b596d81 100644
--- a/include/class_iradio.php
+++ b/include/class_iradio.php
@@ -1,4 +1,5 @@
name=($p_name==null)?$this->name:$p_name;
- $this->value=($p_value==null)?$this->value:$p_value;
- if ( $this->readOnly==true) return $this->display();
- $check=( $this->selected==true||$this->selected=='t' )?"checked":"unchecked";
- $r='name = ($p_name == null) ? $this->name : $p_name;
+ $this->value = ($p_value == null) ? $this->value : $p_value;
+ if ($this->readOnly == true)
+ return $this->display();
+
+ $check = ( $this->selected == true || $this->selected == 't' ) ? "checked" : "unchecked";
+ $r = 'value\"";
- $r.=($this->javascript !='')? 'onclick="'.$this->javascript.'"':'';
+ $r.=($this->javascript != '') ? 'onclick="' . $this->javascript . '"' : '';
$r.=" $check > ";
return $r;
- }
- /*!\brief print in html the readonly value of the widget*/
+ }
+
+ /* !\brief print in html the readonly value of the widget */
+
public function display()
- {
+ {
- $check=( $this->selected==true || $this->selected=='t' )?"Yes":"no";
- $r=$check;
+ $check = ( $this->selected == true || $this->selected == 't' ) ? "Yes" : "no";
+ $r = $check;
return $r;
+ }
+
+ /**
+ * set selected to true (checked) if the value equal the parameter
+ * @param $p_value value to compare
+ */
+ public function set_check($p_value)
+ {
+ if ($this->value == $p_value)
+ $this->selected = true;
+ }
+
+ static public function test_me()
+ {
+
+ }
}
- static public function test_me()
- {
- }
-}
diff --git a/release-note b/release-note
index dd5fee885..8b1378917 100644
--- a/release-note
+++ b/release-note
@@ -1,40 +1 @@
-1. Ajout balance par catégorie de fiche
-2. DONE3. changer le code pour ajouter de la CA ou la modifier dans un DIV HTML, le fichier jrn.php devient inutile (deprecated)
-3. DONE16 Détail opération dans DIV HTML
-4. Dans les détails d'opérations, on a aussi des liens vers les historiques par fiche ou par poste comptable
-5. Depuis les impressions -> balances et impression -> poste, on a les détails des opérations
- TODO15 Ajoutez les détails pour l'impression en PDF pour impression poste / fiche
-6. TODO5 bug IE : les DIV HTML n'ont pas la bonne taille
-7. DONE4 Ajout d'un lien sur les postes et client pour accèder avec un DIV contenant l'historique (au moins une partie / présentation par slice)/ bouton suivant-précédent )
-8. TODO18 Acc_Account_Ledger::HtmlTable et Fiche::HtmlTable, il manque la sécurité pour filtrer les journaux
-9. Ajout d'une FK TODO1 réecriture de quant_* la liaison avec la jrn se fait à travers jr_id et non pas jr_internal qui n'est pas indexé.
-Conséquence : réécriture de code, correction modop, ...
-10. TODO2 Object pour extourner proprement une operation, le fichier annulation.php devient inutile (deprecated) depend de TODO1 TODO10
-11. TODO17 extourne depuis DIV HTML dépend de TODO16
-12. TODO10 Enlever le bouton enlever dans les listes d'opération et le mettre dans le DIV HTML qui présente les détails de l'op
-13. Pour les balances, on peut choisir les journaux : adapté à ceux en ayant vraiment beaucoup
-14. Depuis les lettrages, on peut aussi accèder aux détails d'une opération
-15. TODO9 - dépend de TODO4 TODO2 - dans impressions, on peut avoir les détails de toutes les opérations
-16. TODO19 Le menu Grand Livre devient recherche
-17. TODO20 Ajouter d'attribut avec type : text, nombre ou date; ajouter le javascript équivalent pour la saisie, le numéro de séquence
-commence à 10000, afin de ne pas mélanger les attributs que je créé avec ceux des utilisateurs. A ajouter dans la doc comme exemple pour la gestion d'abonnés dont on peut tirer un CSV par impression -> catégorie -> résume
-18. Impression - Rapprochement
-19. TODO21 Dans DIV HTML donner le code de la TVA dans les détails VEN et ACH
-20. TODO20 DIV HTML dans le tableau de bord
-21. TODO14 confirmation quand effacement d'un PA (comptabilité analytique -> Plan Analytique)
-22. TODO19 Pour les fiches,suivant le type d'attributs, on peut utiliser le javascript pour les dates
-23. On peut ajouter aux modèles de fiches, des détails qui sont soit du texte soit des nombres soit une date, soit une zone. La longueur peut-être définie mais limitée à 22 caractères, sauf les dates et les zones dont les tailles sont fixes
-24. TODO27 : Déplacement de fiche : les attributs manquant sont ajoutés !
-25 TODO24 : Dans impression -> poste , il faut avoir l'impression des détails des opérations
-26. TODO28 : dans jrnx ajouter les f_id, le qcode n'est là que pour accèlèrer; constraint fk on update cascade on delete restrict
-27. TODO25 : dans recherche de liste, utilisez des tableaux !
-28. Dans les balances, on peut choisir plusieurs journaux ou plusieurs cat. de journal. Les données sont filtrées en plus d'après la sécurité
-29. Dans impression -> poste, on peut filtrer les opérations suivant qu'elles sont lettrées ou non.
-30. Après avoir sauvé une opération, vous pouvez avoir le détail de l'opération en cliquant sur le numéro interne qui s'affiche
-31. Les journaux FIN doivent être attachés à un compte en banque et uniquement un A propos du mode de paiement : on ne change rien mais il faut que dans la doc, il est précisé qu'il faut paramètrer le mdp comme le journal FIN
-32. Rapprochement doivent avoir les journaux + sécurité
-33. ajout bouton "ajoutez ligne" pour les OD en CA
-34. ajout bouton "ajoutez ligne" pour les prévisions
-35. Ajout l'impression pour les lettrages par poste comptables
-36. Les historiques des fiches et postes comptables (impression->poste) ont un solde progressif