<?php
include('./conexion.php');


date_default_timezone_set('America/Mazatlan');
$suc = $_SESSION['IdSuc'];
$tipou= $_SESSION['tipouser'];
$user= $_SESSION['nom_admin'];
$idu = $_SESSION['id_user'];
$codigo = $_POST['codigo'];
$mpeso = $_POST['mpeso'];
$mdos = $_POST['mdos'];
$mcin = $_POST['mcin'];
$mdiez = $_POST['mdiez'];
$mveinte = $_POST['mveinte'];
$bveinte = $_POST['bveinte'];
$bcin = $_POST['bcin'];
$bcien = $_POST['bcien'];
$bdosc = $_POST['bdosc'];
$bquin = $_POST['bquin'];
$cheque = $_POST['cheques'];

$fecha = date('Y-m-d');

$mpf = $mpeso * 1;
$mdf = $mdos * 2;
$mcf = $mcin * 5;
$mdif = $mdiez * 10;
$mvf = $mveinte * 20;
$bvf = $bveinte * 20;
$bcf = $bcin * 50;
$bcif = $bcien * 100;
$bdf = $bdosc * 200;
$bqf = $bquin * 500;

$suma = $mpf + $mdf + $mcf + $mdif + $mvf + $bvf + $bcf + $bcif + $bdf +$bqf + $cheque;

echo $suma;
/*
$codigo= 1234;
$nombre= jose;
$rfc= 1234;
$rs= 1234;
$calle= 1234;
$ne= 1234;
$ni= 1234;
$cp= 1234;
$col= 1234;
$ciu= 1234;
$edo= 1234;
$cor= 1234;
$tel= 1234;
$cel= 1234;
$fecha= date(d-m-Y);

nombre LIKE '%$dato%' OR idremitente LIKE '%$dato%'
*/

	mysqli_query($conexion,"INSERT INTO Arqueo VALUES(DEFAULT,'$fecha','1','$bveinte','$bcin','$bcien','$bdosc','$bquin','$mpeso','$mdos','$mcin','$mdiez','$mveinte','$suma','$cheque','$idu',DEFAULT,'$suma','$suc'); ");

	mysqli_query($conexion,"INSERT INTO ArqueoBU VALUES(DEFAULT,'$fecha','1','$bveinte','$bcin','$bcien','$bdosc','$bquin','$mpeso','$mdos','$mcin','$mdiez','$mveinte','$suma','$cheque','$idu',DEFAULT,'$suma','$suc'); ");
	



?>