Skip to content

Commit

Permalink
Last changes...
Browse files Browse the repository at this point in the history
  • Loading branch information
cbdavide committed Nov 26, 2017
1 parent 5b2b659 commit e150206
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 5 deletions.
1 change: 0 additions & 1 deletion app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
Expand Down
3 changes: 3 additions & 0 deletions ejecutar.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SET CURRENTDIR=%cd%
PATH=%PATH%;%CURRENTDIR%\p3\;%CURRENTDIR%\p3\Scripts
python get-shwifty\manage.py runserver
3 changes: 3 additions & 0 deletions run.vbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Set WshShell = CreateObject("WScript.Shell" )
WshShell.Run chr(34) & WshShell.CurrentDirectory + "\ejecutar.bat" & Chr(34), 0
Set WshShell = Nothing
3 changes: 3 additions & 0 deletions sales/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
padding-bottom: 0 !important;
margin-bottom: 0;
}
#recieve {
display: block;
}
#back, #print {
display: none;
}
Expand Down
7 changes: 5 additions & 2 deletions sales/static/js/listado.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ $(document).ready(function() {
})

$.get('/registros', function(data) {
console.log(data)
var registros = data.data

elements['credit'].text(data.card_cash)
Expand Down Expand Up @@ -63,7 +62,11 @@ $(document).ready(function() {
})
}

elements['cash'].text(data.today_cash - gastos['kenosis'])
var g = gastos['kenosis']
if (g === undefined) {
g = 0
}
elements['cash'].text(data.today_cash - g)


})
Expand Down
5 changes: 5 additions & 0 deletions sales/static/js/product.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ $(document).ready(function() {

if(data.ok) {
alert('El ingreso se registro correctamente.')
//popuate sub table
$('#print-cod').text(bar_code)
// console.log(bar_code)
$('#print-nam').text(name)
$('#print-pri').text(price)
initialize(elements)
window.print()

Expand Down
37 changes: 35 additions & 2 deletions sales/templates/sales/create_product_sale.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,24 @@
<link rel="stylesheet" type="text/css" href="/static/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/static/css/bootstrap-grid.min.css">
<link rel="stylesheet" type="text/css" href="/static/css/bootstrap-reboot.min.css">
<style>
#recieve {
display: none;
}
@media print {
#recieve {
display: block;
}
#content {
display: none;
}
}
</style>
</head>
<body>

<!-- Content -->
<div class="container">
<div class="container" id="content">
<div class="row" style="margin-top: 20px">
<div class="col">
<h1>Venta de producto</h1>
Expand Down Expand Up @@ -42,7 +55,7 @@ <h1>Venta de producto</h1>
<label for="product-price">Precio: </label>
<div class="input-group">
<span class="input-group-addon">$</span>
<input type="text" id="price" class="form-control input-right" aria-label="Precio" placeholder="0" readonly="" >
<input type="text" id="price" class="form-control input-right" aria-label="Precio" placeholder="0" >
<span class="input-group-addon">.00</span>
</div>
</div>
Expand Down Expand Up @@ -104,6 +117,26 @@ <h1>Venta de producto</h1>

</form>

</div>
<div class="container" id="recieve">
<h3>Venta Producto</h3>
<table class="table table-hover">
<tbody id="table">
<tr id="row_base">
<td>Código:</td>
<td class="text-right" id="print-cod"></td>
</tr>
<tr id="row_base">
<td>Nombre:</td>
<td class="text-right" id="print-nam"></td>
</tr>
<tr id="row_base">
<td>Precio:</td>
<td class="text-right" id="print-pri"></td>
</tr>
</tbody>
</table>

</div>

<!-- Dependencies -->
Expand Down

0 comments on commit e150206

Please sign in to comment.