Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
onestartup-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Angel Martin
onestartup-shop
Commits
46eb1e35
Commit
46eb1e35
authored
Jul 30, 2018
by
Francisco Salazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
validacion en categorias sat y config de facturacion
parent
2476456f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
75 additions
and
6 deletions
+75
-6
AdminProductController.php
src/controllers/AdminProductController.php
+2
-1
CategorySatController.php
src/controllers/CategorySatController.php
+5
-3
RequestCategorySat.php
src/requests/RequestCategorySat.php
+34
-0
RequestConfigFactura.php
src/requests/RequestConfigFactura.php
+32
-0
edit.blade.php
src/views/categorysat/edit.blade.php
+1
-1
fields.blade.php
src/views/config_factura/fields.blade.php
+1
-1
No files found.
src/controllers/AdminProductController.php
View file @
46eb1e35
...
...
@@ -27,6 +27,7 @@ use Onestartup\Shop\Libs\Util;
use
Onestartup\Shop\Requests\RequestProduct
;
use
Onestartup\Shop\Requests\RequestProductInfo
;
use
Onestartup\Shop\Requests\RequestGallery
;
use
Onestartup\Shop\Requests\RequestConfigFactura
;
use
Onestartup\Shop\Payment\MP
;
use
PayPal\Api\Amount
;
...
...
@@ -646,7 +647,7 @@ class AdminProductController extends Controller
->
with
(
'regimen'
,
$regimen
);
}
public
function
postConfigs
(
Request
$request
)
{
public
function
postConfigs
(
Request
ConfigFactura
$request
)
{
$config
=
Config
::
first
();
...
...
src/controllers/CategorySatController.php
View file @
46eb1e35
...
...
@@ -11,6 +11,8 @@ use Onestartup\Shop\Model\CategoriaSat as Category;
use
Onestartup\Shop\Model\Unidad
;
use
Onestartup\Shop\Model\ClavesProducto
;
use
Onestartup\Shop\Requests\RequestCategorySat
;
class
CategorySatController
extends
Controller
{
/**
...
...
@@ -36,7 +38,7 @@ class CategorySatController extends Controller
* @param Request $request
* @return Response
*/
public
function
store
(
Request
$request
)
public
function
store
(
Request
CategorySat
$request
)
{
$category
=
new
Category
(
$request
->
all
());
...
...
@@ -69,7 +71,7 @@ class CategorySatController extends Controller
* @param Request $request
* @return Response
*/
public
function
update
(
Request
$request
,
$id
)
public
function
update
(
Request
CategorySat
$request
,
$id
)
{
$category
=
Category
::
find
(
$id
);
$category
->
fill
(
$request
->
all
());
...
...
@@ -77,7 +79,7 @@ class CategorySatController extends Controller
return
redirect
()
->
back
()
->
with
(
'message_success'
,
'Categor
i
a actualizado correctamente'
);
->
with
(
'message_success'
,
'Categor
í
a actualizado correctamente'
);
}
/**
...
...
src/requests/RequestCategorySat.php
0 → 100644
View file @
46eb1e35
<?php
namespace
Onestartup\Shop\Requests
;
use
Illuminate\Foundation\Http\FormRequest
;
class
RequestCategorySat
extends
FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public
function
authorize
()
{
return
true
;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public
function
rules
()
{
return
[
'nombre'
=>
'required|max:255'
,
'clave_producto'
=>
'required|max:255'
,
'clave_unidad'
=>
'required|max:255'
,
'unidad'
=>
'required|max:255'
,
];
}
}
\ No newline at end of file
src/requests/RequestConfigFactura.php
0 → 100644
View file @
46eb1e35
<?php
namespace
Onestartup\Shop\Requests
;
use
Illuminate\Foundation\Http\FormRequest
;
class
RequestConfigFactura
extends
FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public
function
authorize
()
{
return
true
;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public
function
rules
()
{
return
[
'regimen_fiscal'
=>
'required|max:255'
,
'lugar_expedicion'
=>
'required|numeric'
,
];
}
}
\ No newline at end of file
src/views/categorysat/edit.blade.php
View file @
46eb1e35
...
...
@@ -7,7 +7,7 @@
<a href="
{{
route
(
'admin-shop-client.orders'
)}}
">Tienda</a>
</li>
<li class="
breadcrumb
-
item
">
<a href="
{{
route
(
'admin.shop.categor
y.index'
)}}
">Listado de categorías
</a>
<a href="
{{
route
(
'admin.shop.categor
iasat.index'
)}}
">Listado de categorías del SAT
</a>
</li>
<li class="
breadcrumb
-
item
active
">
{
{$category->nombre}
}
...
...
src/views/config_factura/fields.blade.php
View file @
46eb1e35
...
...
@@ -9,7 +9,7 @@
<div
class=
"col-md-6"
>
<div
class=
"form-group"
>
{!! Form::label('lugar_expedicion', 'Lugar de expedición (Código Postal)') !!}
{!! Form::text('lugar_expedicion', null, ["class"=>"form-control"]) !!}
{!! Form::text('lugar_expedicion', null, ["class"=>"form-control"
, "maxlength" => "5"
]) !!}
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment