Skip to content
Snippets Groups Projects
Commit 4081fb5a authored by clement's avatar clement
Browse files

Merge branch 'master' of gitlab.utc.fr:nf17-camp-p14/clivi

parents 8f223be5 7b232677
No related branches found
No related tags found
No related merge requests found
......@@ -28,11 +28,13 @@ class Animal extends Objet
),
"date_naissance" => array(
"i" => 8,
"label" => "Date de naissance"
"label" => "Date de naissance",
"t" => "DateField"
),
"date_deces" => array(
"i" => 9,
"label" => "Date de deces"
"label" => "Date de deces",
"t" => "DateField"
),
"sterile" => array(
"t" => "BoolField",
......
......@@ -2,6 +2,7 @@
class Client extends Personne
{
protected $num_tel;
public $_specialFields = array(
"num_tel" => array(
......@@ -9,8 +10,6 @@ class Client extends Personne
"label" => "Numero de telephone",
));
protected $num_tel;
public function num_tel()
{
return $this->num_tel;
......
......@@ -6,28 +6,18 @@ class DateField extends Field
// Todo, if isset($_POST[$this->name]) && !$this->validate() => Show a error msg explanation for this line.
$html = '<div class="form-group">
<label for="form'.$this->name.'">'.$this->label.'</label>
<input type="number" class="form-control" name="'.$this->name.'" value="'.$this->value.'">
<input type="date" class="form-control" name="'.$this->name.'" value="'.$this->value.'">
</div>';
return $html;
}
public function validate()
{
if (isset($_POST[$this->name]))
{
$this->value = $_POST[$this->name];
if ($this->value > -1) {
return true;
}
}
return false;
$this->value = $_POST[$this->name];
return true;
}
public function show() {
$prix = $this->value;
$html = (string)$prix;
$html .= "€";
return $html;
return $this->value;
}
}
......@@ -18,11 +18,13 @@ class Facture extends Objet
),
"date_edition" => array(
"label" => "Date d'édition",
"i" => 8
"i" => 8,
"t" => "DateField"
),
"date_paiement" => array(
"label" => "Date de paiement",
"i" => 8
"i" => 8,
"t" => "DateField"
),
"moyen_paiement" => array(
"label" => "Moyen de paiement",
......
......@@ -12,7 +12,8 @@ class Ordonnance extends Objet
"i" => 1
),
"date" => array(
"i" => 2
"i" => 2,
"t" => "DateField"
),
"animal" => array(
"i" => 3
......
......@@ -27,7 +27,7 @@ class PriceField extends Field
public function show() {
$prix = $this->value;
$html = (string)$prix;
$html .= "€";
$html .= " €";
return $html;
}
}
......@@ -20,7 +20,8 @@ class Rdv extends Objet
"i" => 1
),
"date" => array(
"i" => 4
"i" => 4,
"t" => "DateField"
),
"duree" => array(
"i" => 5
......
......@@ -24,7 +24,11 @@ switch($action) {
case "detailFacture":
// TODO: Ajouter bouton payer
// TODO: Ajouter résumé de la facture (client, prix etc... )
// TODO: Ajouter 3 boutons: "Ajouter Prestation", "Ajouter Produit", "Ajouter Medicament/Ordonnance"
echo '<div class="container">';
echo ' <a href="'.$base_url.$page.'/addPresta'.'?factId='.$_GET["id"].'" type="button" class="btn btn-success">Ajouter une Prestation</a>';
echo ' <a href="'.$base_url.$page.'/addProduit'.'?factId='.$_GET["id"].'" type="button" class="btn btn-success">Ajouter un Produit</a>';
echo ' <a href="'.$base_url.$page.'/addOrd'.'?factId='.$_GET["id"].'" type="button" class="btn btn-success">Ajouter une Ordonnance</a>';
echo '</div>';
$list = LigneFacture::getList("Détails de la facture", $_GET["id"]);
include 'view/list.php';
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment