Beispiel #1
0
 /**
  *  Delete detail line
  *
  *  @param		int		$lineid			Id of line to delete
  *  @return     int         			>0 if OK, <0 if KO
  */
 function deleteline($lineid)
 {
     if ($this->statut == 0) {
         $line = new PropaleLigne($this->db);
         // For triggers
         $line->fetch($lineid);
         if ($line->delete() > 0) {
             $this->update_price(1);
             return 1;
         } else {
             return -1;
         }
     } else {
         return -2;
     }
 }