コード例 #1
0
 public function tasa_iva()
 {
     if (!empty($this->item_bas)) {
         $t = Tabla::where('codigo_tabla', '=', 'ITEM_BAS')->where('valor', '=', $this->item_bas)->firstOrFail();
         return $t->coeficiente;
     } else {
         return null;
     }
 }
コード例 #2
0
ファイル: Ctacte.php プロジェクト: ateszki/clinicasapp
 public function getHaberAttribute($value)
 {
     $t = Tabla::where('codigo_tabla', '=', 'COMPROBANTES_CTACTE')->where('valor', '=', $this->tipo_prev)->first();
     return is_object($t) ? $t->debehaber == 'H' ? $this->importe_total : 0 : 0;
 }
コード例 #3
0
 public function vistacodigotabla($codigotabla)
 {
     $tabla = Tabla::where('codigo_tabla', '=', $codigotabla)->get();
     return Response::json(array('error' => false, 'listado' => $tabla), 200);
 }