Ejemplo n.º 1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     \Dmed\Entities\Nota::truncate();
     factory(\Dmed\Entities\Nota::class, 100)->create();
 }
Ejemplo n.º 2
0
 public function getNotaConferida($ano, $mes, $empresa)
 {
     if ($mes == 0) {
         $notas = Nota::whereRaw('YEAR(data_emissao) = ? and cnpj_tomador = \'\' and cpf_tomador <> \'00000000000\' and  empresa_id = ?  and substituida = ? and situacao_id = 1', [$ano, $empresa, 0])->orderBy('cpf_tomador', 'ASC')->with('dependentes')->get();
     } else {
         $notas = Nota::whereRaw('YEAR(data_emissao) = ? and MONTH(data_emissao) = ? and cnpj_tomador = \'\' and cpf_tomador <> \'00000000000\' and  empresa_id = ?  and substituida = ? and situacao_id = 1', [$ano, $mes, $empresa, 0])->orderBy('cpf_tomador', 'ASC')->with('dependentes')->get();
     }
     return $notas;
 }
Ejemplo n.º 3
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     \Dmed\Entities\Nota::truncate();
 }