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
926dc40b
Commit
926dc40b
authored
Jun 06, 2018
by
Angel MAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
185bae97
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
AdminProductController.php
src/controllers/AdminProductController.php
+5
-0
StockDataTable.php
src/lib/StockDataTable.php
+1
-1
orden.blade.php
src/views/clients/orden.blade.php
+14
-3
No files found.
src/controllers/AdminProductController.php
View file @
926dc40b
...
...
@@ -280,6 +280,10 @@ class AdminProductController extends Controller
public
function
showOrder
(
$id
)
{
$sale
=
Sale
::
find
(
$id
);
$promo
=
null
;
if
(
$sale
->
coupon
!=
null
)
{
$promo
=
$this
->
util
->
getDiscount
(
$sale
,
$sale
->
coupon
);
}
$client
=
$sale
->
client
;
$orden
=
$sale
->
items
;
$shipping
=
$client
->
shipping
;
...
...
@@ -306,6 +310,7 @@ class AdminProductController extends Controller
->
with
(
'client'
,
$client
)
->
with
(
'orden'
,
$orden
)
->
with
(
'estado'
,
$estado
)
->
with
(
'promo'
,
$promo
)
->
with
(
'shipping_price'
,
$shipping_price
)
->
with
(
'shipping'
,
$shipping
);
}
...
...
src/lib/StockDataTable.php
View file @
926dc40b
...
...
@@ -32,7 +32,7 @@ class StockDataTable extends DataTable
$existencia
=
"<span class='badge primary'>"
.
$product
->
infoSale
->
quantity
.
"</span>"
;
}
$html
=
"Precio venta: <b>"
.
$product
->
infoSale
->
sale_price
.
"</b><br>Precio compra: <b>"
.
$product
->
infoSale
->
purchase_price
.
"</b><br>Alerta de reserva: <b><span class='badge info'>"
.
$product
->
infoSale
->
reserve_amount
.
"</b></span><br>Existencias:
$existencia
<br>"
;
$html
=
"Precio venta: <b>"
.
money_format
(
'%(#10n'
,
$product
->
infoSale
->
sale_price
)
.
"</b><br>Precio compra: <b>"
.
money_format
(
'%(#10n'
,
$product
->
infoSale
->
purchase_price
)
.
"</b><br>Alerta de reserva: <b><span class='badge info'>"
.
$product
->
infoSale
->
reserve_amount
.
"</b></span><br>Existencias:
$existencia
<br>"
;
return
$html
;
})
...
...
src/views/clients/orden.blade.php
View file @
926dc40b
...
...
@@ -17,7 +17,7 @@ setlocale(LC_MONETARY, 'en_US');
</
li
>
<
li
class
="
nav
-
item
">
<a class="
nav
-
link
block
" href="" data-toggle="
tab
" data-target="
#tab-2">
<
h6
>
Ord
é
n
</
h6
>
<
h6
>
Ord
e
n
</
h6
>
</
a
>
</
li
>
<
li
class
="
nav
-
item
">
...
...
@@ -45,8 +45,8 @@ setlocale(LC_MONETARY, 'en_US');
<p>Teléfono: <b>
{
{$client->phone}
}
</b></p>
<p>Correo: <b>
{
{$client->email}
}
</b></p>
<p>Fecha de registro: <b>
{
{$client->created_at}
}
</b></p>
<p>Requiere factura: <b>
{
{$shipping->facturacion}
}
</b></p>
<h6>Datos de facturación</h6>
</div>
<div class="
col
-
md
-
6
">
...
...
@@ -105,7 +105,7 @@ setlocale(LC_MONETARY, 'en_US');
</div><!-- end tab-1 -->
<div class="
tab
-
pane
" id="
tab
-
2
">
<div class="
p
-
a
-
md
dark
_600
">Resumen de la Ord
é
n</div>
<div class="
p
-
a
-
md
dark
_600
">Resumen de la Ord
e
n</div>
<div class="
box
">
<div class="
box
-
body
">
<div class="
row
">
...
...
@@ -119,6 +119,9 @@ setlocale(LC_MONETARY, 'en_US');
<b>
{
{$sale->transaction_id}
}
</b>
<br>Fecha de orden:<br>
<b>
{
{$sale->created_at}
}
</b>
<br>Cupon de descuento <br>
<b>{{$sale->coupon != null ?
$sale->coupon
: 'N/A'}}</b>
<b></b>
</div>
<div class="
col
-
md
-
8
">
...
...
@@ -140,6 +143,14 @@ setlocale(LC_MONETARY, 'en_US');
<td>{{money_format('%(#10n', (
$item->product
->infoSale->sale_price *
$item->quantity
))}}</td>
</tr>
@endforeach
@if(
$sale->coupon
!= null)
<tr>
<td>1</td>
<td>Descuento
{
{$sale->coupon}
}
</td>
<td> -
{
{$promo['amount']}
}
</td>
<td> -
{
{$promo['amount']}
}
</td>
</tr>
@endif
<tr>
<td>1</td>
<td>
{
{$shipping_price->name}
}
</td>
...
...
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