Por que este error:Class App\Http\Controllers\infoventasController does not exist
Publicado por Enlace Visual (3 intervenciones) el 10/12/2019 00:15:00
Hola amigos, se me está generando este error, Class App\Http\Controllers\infoventasController does not exist.
Pero en routes.php tiene lo siguiente:
Todo está bien aparentemente. Entonces por que el error?. Agradecería su ayuda de antemano.
Atte
Luis Alberto bernal B.
Valeldupar - Colombia
Pero en routes.php tiene lo siguiente:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
return view('welcome');
});
Route::auth();
Route::get('/home', 'HomeController@index');
Route::get('/vercartera/detallecartera/{id}','VercarteraController@detallecartera');
Route::get('/verctasxpagar/detallectasxpagar/{id}','VerctasxpagarController@detallectasxpagar');
Route::get('/infoventas/detalledemovimientos/{id}','infoventasController@detalledemovimientos');
Route::resource('inicio','InicioController');
Route::resource('usuarios','UsuarioController');
Route::resource('inventarios','InventarioController');
Route::resource('verinventarios','VerinventarioController');
Route::resource('vercartera','VercarteraController');
Route::resource('verctasxpagar','VerctasxpagarController');
Route::resource('infoventas','InfoventasController');
y mi controller infoventasController.php, tiene lo siguiente:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Http\Requests;
use App\cliente;
use App\proveedore;
use App\factura;
use App\remision;
use App\ingreso;
use App\egreso;
use Auth;
use Hash;
class InfoventasController extends Controller
{
public function index()
{
$ano = date("Y");
$anodeproceso = $ano;
$hoy = date('Y-m-d');
$cero = 00000.00;
$query = " select year(a.fechadefactura) ano, month(a.fechadefactura) mes,ELT(MONTH(a.fechadefactura), 'Enero', 'Febrero', 'Marzo','Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre','Octubre', 'Noviembre','Diciembre') mesde, sum(a.totalfactura) totalventas, ing.pagos totalingresos, pgo.pagos totalpagos from facturas a left outer join (select sum(b.pagoenefectivo+b.pagoencheques) pagos, month(b.fechadeldocumento) mes, year(b.fechadeldocumento) ano from ingresos b where b.estado=1 and year(b.fechadeldocumento) = $ano group by ano, mes) ing
on month(a.fechadefactura) = ing.mes AND year(a.fechadefactura) = ing.ano
left outer join (select sum(b.valordelpago+b.otrospagos) pagos, month(b.fechadeldocumento) mes, year(b.fechadeldocumento) ano from egresos b where b.estado=1 and year(b.fechadeldocumento) = $ano group by ano, mes) pgo
on month(a.fechadefactura) = pgo.mes AND year(a.fechadefactura) = pgo.ano
where year(a.fechadefactura)= $ano group by ano,mes";
$ventas = DB::select($query);
$totalventas = 0;
$totalingresos = 0;
$totalpagos = 0;
foreach ($ventas as $vta)
{
$totalventas+=$vta->totalventas;
$totalingresos+=$vta->totalingresos;
$totalpagos+=$vta->totalpagos;
}
return view('infoventas.index',compact('ventas','totalventas','totalingresos','totalpagos','anodeproceso'))->with('ventas', $ventas);
}
public function detalledemovimientos($id)
{
$ano = date("Y");
$mes = $id;
$anodeproceso = $ano;
$hoy = date('Y-m-d');
$cero = 00000.00;
$query = " select ELT(MONTH(a.fechadefactura), 'Enero', 'Febrero', 'Marzo','Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre','Octubre', 'Noviembre','Diciembre') mesdeproceso, day(a.fechadefactura) dias, sum(if(a.tipodefactura=1,a.totalfactura,0)) ventascontado, sum(if(a.tipodefactura=2,a.totalfactura,0)) ventascredito,0 remcontado, 0 remcredito, 0 totalventas, ing.pagos totalingresos, pgo.pagosproveedores, pgo.otrospagos, (pgo.pagosproveedores + pgo.otrospagos) totalpagos from facturas a
left outer join (select sum(b.pagoenefectivo+b.pagoencheques) pagos, day(b.fechadeldocumento) dias from ingresos b where b.estado=1 and year(b.fechadeldocumento) = $ano and month(b.fechadeldocumento) = $mes group by dias) ing
on day(a.fechadefactura) = ing.dias
left outer join (select sum(if(b.estado1=0,b.valordelpago+b.otrospagos,0)) pagosproveedores, sum(if(b.estado1=1,b.valordelpago+b.otrospagos,0)) otrospagos,day(b.fechadeldocumento) dias from egresos b where b.estado=1 and year(b.fechadeldocumento)=$ano and month(b.fechadeldocumento) = $mes group by dias) pgo on day(a.fechadefactura) = pgo.dias where year(a.fechadefactura)= $ano and month(a.fechadefactura)=$id group by dias";
$movventas = DB::select($query);
$totalventas = 0;
$totalingresos = 0;
$totalpagos = 0;
foreach ($movventas as $vta)
{
$totalventas+=$vta->totalventas;
$totalingresos+=$vta->totalingresos;
$totalpagos+=$vta->totalpagos;
$vta->totalventas = $vta->ventascontado + $vta->ventascredito + $vta->remcontado + $vta->remcredito;
}
return view('infoventas.detalledemovimientos',compact('movventas','totalventas','totalingresos','totalpagos','anodeproceso'))->with('movventas', $movventas);
}
}
Todo está bien aparentemente. Entonces por que el error?. Agradecería su ayuda de antemano.
Atte
Luis Alberto bernal B.
Valeldupar - Colombia
Valora esta pregunta


0