255], ]; } /* * Relations */ public function getEtablissement() { return $this->hasOne(Etablissement::className(), ['id' => 'id_etablissement']); } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'id_etablissement' => 'Id Etablissement', 'date' => 'Date', 'reference' => 'Reference', 'libelle' => 'Libelle', 'texte' => 'Texte', 'montant_ht' => 'Montant Ht', 'paye' => 'Paye', 'date_paiement' => 'Date Paiement', 'methode_paiement' => 'Methode Paiement', 'ca' => 'CA' ]; } /** * Retourne la dernière facture émise. * * @return Facture */ public static function getLastFacture() { return Facture::find() ->orderBy('reference DESC') ->one(); } }