Ir para conteúdo
Fórum CódigoFonte.net
Entre para seguir isso  
vismachado@gmail.com

duvida sobre como criar uma pagina de vendas php

Recommended Posts

esse e o codigo da tela de vendas do meu programa de controle de estoque e vendas

 <?php

 
session_start();
error_reporting(0);
ini_set(“display_errors”, 0 );
?>
 
<!DOCTYPE html>
<html lang="br">
<head>
 
<!-- start: Meta -->
<meta charset="utf-8">
<title>Principal</title>
<meta name="description" content="Bootstrap Metro Dashboard">
<!-- end: Meta -->
 
<!-- start: Mobile Specific -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- end: Mobile Specific -->
 
<!-- start: CSS -->
<link id="bootstrap-style" href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
<link id="base-style" href="css/style.css" rel="stylesheet">
<link id="base-style-responsive" href="css/style-responsive.css" rel="stylesheet">
<link href="css/fontes.css" rel='stylesheet' type='text/css'>
<!-- end: CSS -->
 
<!-- start: Favicon -->
<link rel="shortcut icon" href="img/favicon.ico">
<!-- end: Favicon -->
 
 
 
</head>
 
<body>
<!-- start: Header -->
<div class="navbar">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".top-nav.nav-collapse,.sidebar-nav.nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="index.php"><span>SGP</span></a>
 
<!-- start: Header Menu -->
<div class="nav-no-collapse header-nav">
<ul class="nav pull-right">
<!-- start: User Dropdown -->
<li class="dropdown">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
<i class="halflings-icon white user"></i> Virginia Machado
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li class="dropdown-menu-title">
  <span> Configurações </span>
</li>
<li><a href="# "><i class="halflings-icon user"></i> Perfil</a></li>
<li><a href="# "><i class="halflings-icon off"></i> Sair</a></li>
</ul>
</li>
<!-- end: User Dropdown -->
</ul>
</div>
<!-- end: Header Menu -->
 
</div>
</div>
</div>
<!-- start: Header -->
 
<div class="container-fluid-full">
<div class="row-fluid">
 
<!-- start: Main Menu -->
<div id="sidebar-left" class="span2">
<div class="nav-collapse sidebar-nav">
<ul class="nav nav-tabs nav-stacked main-menu">
<li><a href="index.php"><i class="icon-bar-chart"></i><span class="hidden-tablet"> Menu </span></a></li>
<li><a href="funcionarios.php"><i class="icon-group"></i><span class="hidden-tablet"> Funcionarios </span></a></li>
<li><a href="fornecedores.php"><i class="icon-truck"></i><span class="hidden-tablet"> Fornecedores </span></a></li>
<li><a href="produtos.php"><i class="icon-tasks"></i><span class="hidden-tablet"> Produtos </span></a></li>
<li><a href="contas.php"><i class="icon-wrench"></i><span class="hidden-tablet"> Contas a pagar </span></a></li>
<li><a href="cadastro_entrada_produtos.php"><i class="icon-wrench"></i><span class="hidden-tablet"> Entrada de produtos </span></a></li>
<li><a href="vendas.php"><i class="icon-shopping-cart"></i><span class="hidden-tablet"> Caixa </span></a></li>
 
<li>
<a class="dropmenu" href="#"><i class="icon-bar-chart"></i><span class="hidden-tablet"> Relatório &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span class="label label-important"><i class="icon-sort-down"></i> </span></a>
<ul>
<a href="relatorios/classeRelatorio.php><li><a class="submenu" href="#"><span class="hidden-tablet"> Funcionarios</span></a></li>
<a href="relatorios/classeRelatorio.php><li><a class="submenu" href="#"><span class="hidden-tablet"> Fornecedores </span></a></li>
<a href="relatorios/classeRelatorio.php><li><a class="submenu" href="#"><span class="hidden-tablet"> Produtos</span></a></li>
<a href="relatorios/classeRelatorio.php><li><a class="submenu" href="#"><span class="hidden-tablet"> Contas a pagar</span></a></li>
<a href="relatorios/classeRelatorio.php><li><a class="submenu" href="#"><span class="hidden-tablet">  Entrada de produtos</span></a></li>
<a href="relatorios/classeRelatorio.php><li><a class="submenu" href="#"><span class="hidden-tablet"> Caixa </span></a></li>
 
</ul>
</li>
<li>
<a class="dropmenu" href="#"><i class="icon-cogs"></i><span class="hidden-tablet"> Configurações &nbsp;&nbsp; </span><span class="label label-important"><i class="icon-sort-down"></i> </span></a>
<ul>
<li><a class="submenu" href="#"><span class="hidden-tablet"> Usuários </span></a></li>
<li><a class="submenu" href="#"><span class="hidden-tablet"> Permissões</span></a></li>
</ul>
</li>
 
</ul>
</div>
</div>
<!-- end: Main Menu -->
 
 
 
<!-- start: Content -->
<div id="content" class="span10">
 
 
<ul class="breadcrumb">
<li>
<i class="icon-home"></i>
<a href="index.php">Inicio</a> 
<i class="icon-angle-right"></i>
</li>
<li>
<a href="#">Produtos</a>
<i class="icon-angle-right"></i>
</li>
<li><a href="#">Cadastro de Produtos</a></li>
</ul>
 
 
<div class="row-fluid hideInIE8 circleStats">
<div class="row-fluid sortable">
<div class="box span12">
<div class="box-header" data-original-title>
<h2><i class="halflings-icon edit"></i><span class="break">Formulário de vendas</span></h2>
</div>
<div class="box-content">
<form class="form-horizontal" method="POST" action="banco/valida_cadastro_vendas.php" >
<fieldset>
<!-- start: Nome Produto -->
 <div class="control-group">
<div style="width:20%; float:left;">
<label style="float:left; padding-left:30px; padding-top: 5px;"> Codigo de Barras: </font><font color='red'><strong> * </strong></font></label>
</div>
<div>
<div style="float:left;">
<input type="text" name="codigo"   required autofocus />
</div>
</div>
 </div>
 
 
 <!-- start: Código de Barras --> 
 <div class="control-group">
<div style="width:20%; float:left;">
<label style="float:left; padding-left:30px; padding-top: 5px;"> Produto: </font><font color='red'><strong> * </strong></font></label>
</div>
<div>
<div style="float:left;">
<input type="text" class="form-control" name="nome_produto"   required autofocus />
</div>
</div>
 </div>
 
 
  <!-- start: Unidade Médida --> 
 <div class="control-group">
<div style="width:20%; float:left;">
<label style="float:left; padding-left:30px; padding-top: 5px;"> Quantidade: </font><font color='red'><strong> * </strong></font></label>
</div>
<div>
<div style="float:left;">
<input type="text" class="form-control" name="quantidade"  required autofocus />
</div>
<div style="float:left;">
<label style="float:left; padding-left:30px; padding-top: 5px;"> Preco: </font><font color='red'><strong> * </strong></font></label>
<div style="float:right; padding-left:30px;">
<input type="text" class="form-control" style="width:100px" name="preco" placeholder="$0.00" required autofocus />
</div>
</div>
<div style="float:left;">
<label style="float:left; padding-left:10px; padding-top: 5px;"> Subtotal: </font><font color='red'><strong> * </strong></font></label>
<div style="float:right; padding-left:30px;">
<input type="text" class="form-control" style="width:50px" name="subtotal"  placeholder="$0.00" required autofocus />
</div>
</div>
</div>
 </div>
 
 <!-- start: Preço Venda --> 
  </div>
 <!-- start: Email --> 
 <div class="control-group">
<div style="width:20%; float:left;">
<label style="float:left; padding-left:30px; padding-top: 5px;"> Total a pagar:</font></label>
</div>
<div>
<div style="float:left;">
<input type="text"class="form-control"   name="total_pagar" placeholder="$ 00,00" required autofocus />
</div>
</div>
 </div>  
 <!-- start: Email --> 
 <div class="control-group">
<div style="width:20%; float:left;">
<label style="float:left; padding-left:30px; padding-top: 5px;">  Forma pagamento: </font><font color='red'><strong> * </strong></font></label>
</div>
<div>
<div style="float:left;">
<select name="pagamento">
<option>cartao_credito</option>
<option>cartao_debito</option>
<option>cartao_alimentacao</option>
<option>cartao_refeicao</option>
<option>dinheiro</option>
<option>a_vista_cartoes</option>
</select>
</div>
</div>
</div>
 <div class="control-group">
<div style="width:20%; float:left;">
<label style="float:left; padding-left:30px; padding-top: 5px;"> Total pago:</font></label>
</div>
<div>
<div style="float:left;">
<input type="text"class="form-control"   name="total_pago" placeholder="$ 00,00" required autofocus />
</div>
</div>
 </div>
 
 
<br/><br/><br/><br/><br/> 
<div style="float:right; padding-right:30px;">
<button type="submit" class="btn btn-success"><i class="icon-ok" ></i> Finalizar Venda </button>
 
</div>
<?php
include estoque.php;
if(isset($_SESSION['cadastroErro'])){
echo  $_SESSION['cadastroErro'];
unset($_SESSION['cadastroErro']);
}
?>
</fieldset>
</form>
 
</div>
</div><!--/span-->
 
</div><!--/row-->
</div>
 
 
       
 
</div><!--/.fluid-container-->
 
<!-- end: Content -->
</div><!--/#content.span10-->
</div><!--/fluid-row-->
 
<div class="clearfix"></div>
<footer>
 
<p>
<span style="text-align:left;float:left">&copy; 2016 </a></span>
 
</p>
 
</footer>
 
<!-- start: JavaScript-->
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery-migrate-1.0.0.min.js"></script>
 
<script src="js/jquery-ui-1.10.0.custom.min.js"></script>
<script src="js/jquery.ui.touch-punch.js"></script>
<script src="js/modernizr.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.cookie.js"></script>
<script src='js/fullcalendar.min.js'></script>
<script src='js/jquery.dataTables.min.js'></script>
<script src="js/excanvas.js"></script>
<script src="js/jquery.flot.js"></script>
<script src="js/jquery.flot.pie.js"></script>
<script src="js/jquery.flot.stack.js"></script>
<script src="js/jquery.flot.resize.min.js"></script>
 
<script src="js/jquery.chosen.min.js"></script>
<script src="js/jquery.uniform.min.js"></script>
<script src="js/jquery.cleditor.min.js"></script>
<script src="js/jquery.noty.js"></script>
<script src="js/jquery.elfinder.min.js"></script>
<script src="js/jquery.raty.min.js"></script>
<script src="js/jquery.iphone.toggle.js"></script>
<script src="js/jquery.uploadify-3.1.min.js"></script>
<script src="js/jquery.gritter.min.js"></script>
<script src="js/jquery.imagesloaded.js"></script>
<script src="js/jquery.masonry.min.js"></script>
<script src="js/jquery.knob.modified.js"></script>
<script src="js/jquery.sparkline.min.js"></script>
<script src="js/counter.js"></script>
<script src="js/retina.js"></script>
<script src="js/custom.js"></script>
<!-- end: JavaScript-->
 
<!--   plugins -->
<script src="js/js/jquery.validate.min.js"></script> 
<script src="js/js/jquery.maskedinput.js"></script> 
 
<script src="js/js/ie10-viewport-bug-workaround.js"></script>
<script src="js/js/jquery.maskedinput.js"></script>
 
 
 
</body>
</html>
gostaria de fazer uma esse codigo gerasse uma tabela na tela para colocar todos os produtos daquela venda porque do modo que está  a pessoa tem que colocar o produto e em seguida finalizar a venda

 

 

Compartilhar este post


Link para o post
Compartilhar em outros sites

Crie uma conta ou entre para comentar

Você precisar ser um membro para fazer um comentário

Criar uma conta

Crie uma nova conta em nossa comunidade. É fácil!

Crie uma nova conta

Entrar

Já tem uma conta? Faça o login.

Entrar Agora
Entre para seguir isso  

×
×
  • Criar Novo...