Quellcode durchsuchen

[Backend] Correction formulaire pour créditer

Conservation du commentaire inscrit par le producteur lors de l'enregistrement du CreditHistorique.
prodstable
keun vor 7 Jahren
Ursprung
Commit
44350026f5
1 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen
  1. +6
    -2
      common/models/CreditHistorique.php

+ 6
- 2
common/models/CreditHistorique.php Datei anzeigen

@@ -98,7 +98,7 @@ class CreditHistorique extends ActiveRecord {

public function save($runValidation = true, $attributeNames = NULL) {
// initialisation du commentaire avant sauvegarde
$this->commentaire = $this->getStrCommentaire() ;
$this->commentaire .= $this->getStrCommentaire() ;
parent::save($runValidation, $attributeNames);

@@ -172,7 +172,11 @@ class CreditHistorique extends ActiveRecord {
}
public function getStrCommentaire() {
$str = $this->getStrLibelle() ;
$str = '' ;
if(strlen($this->commentaire)) {
$str .= '<br />' ;
}
$str .= $this->getStrLibelle() ;
if(isset($this->commande)) {
$str .= '<br />Montant de la commande : '.$this->commande->getMontant(true) ;
}

Laden…
Abbrechen
Speichern