Пример #1
0
function egresos_detalles($id)
{
    $datosEgreso = '(\'' . $id . '\');';
    $detallesidEgreso = '_detalle_documento(' . $id . ');';
    $columnas = array("producto", "cantidad", "precio_u", "iva", "precio_total", "id_sucursal", "idConcepto");
    //SELECT PROVEEDOR
    $optProveedores = selectLabel($datosEgreso, "nombre_proveedor");
    //SELECT DATOS EGRESO
    $fechaDoc = selectLabel($datosEgreso, "fecha_doc");
    //SELECT STATUS
    $statusDoc = selectLabel($datosEgreso, "estatus");
    //SELECT FOLIO
    $folioDoc = selectLabel($datosEgreso, "folio");
    //SELECT CONCEPTO
    $concepto = selectLabel($datosEgreso, "concepto_documento");
    //SELECT OBSERVACION
    $observacion = selectLabel($datosEgreso, "observaciones");
    //SELECT TOTAL
    $total = selectLabel($datosEgreso, "monto_documento");
    //SELECT SUBTOTAL
    $subtotal = selectLabel($datosEgreso, "monto_documento");
    //SELECT IVA
    $iva = selectLabel($datosEgreso, "saldo_pendiente");
    $tablaDetalles = selectTable($detallesidEgreso, $columnas);
    //SELECCIONA LOS PAGOS PARA EL DOCUMENTO
    $tablaPagos = selectTable('_pagos("10", "' . $id . '");', array("id_pagos", "fecha_pago", "monto_pago", "estatus", "usuario_pago", "nombre_sucursales", "numero_ctas_banco", "banco_ctas_banco"));
    $_SESSION["idProyectoActual"] = '';
    $_SESSION["idProveedorActual"] = '';
    $hoy = date("Y-m-d");
    switch (trim($statusDoc)) {
        case '<label id="">3</label>':
            $span = '<span style="font-size:14px; font-weight:bold;" class="banner_magenta">CAPTURADO';
            $class = 'magenta';
            break;
        case '<label id="">2</label>':
            $span = '<span style="font-size:14px; font-weight:bold;" class="banner_azul">PROGRAMADO';
            $class = 'azul';
            break;
        case '<label id="">4</label>':
            $span = '<span style="font-size:14px; font-weight:bold;" class="banner_verde">LIQUIDADO';
            $class = 'verde';
            break;
        case '<label id="">5</label>':
            $span = '<span style="font-size:14px; font-weight:bold;" class="banner_amarillo">ABONADO';
            $class = 'amarillo';
            break;
        default:
            $span = '<span style="font-size:14px; font-weight:bold;" class="banner_magenta">' . selectLabel($datosEgreso, "estatus");
            $class = 'magenta';
            break;
    }
    $pagina .= '
<div id = "page-heading">
    <ol class = "breadcrumb">
	<li><a href = "javascript:navegar_modulo(0);">Dashboard</a></li>
	<li><a href = "javascript:navegar_modulo(' . $_SESSION["mod"] . ');">' . $_SESSION["moduloPadreActual"] . '</a></li>
	<li class = "active">
	    ' . $_SESSION["moduloHijoActual"] . '
	</li>
    </ol>
    <h1>' . $_SESSION["moduloHijoActual"] . '</h1>
    <div class = "options">
	<div class = "btn-toolbar">
	    <input type = "hidden" id="idEgresoActual" name = "idEgresoActual" 
	    value = "0" readonly = "readonly"/>
	    <input type = "hidden" id = "idProyectoActual" name = "idProyectoActual" 
	    value = "0" readonly = "readonly"/>
	    <input type = "hidden" id = "sumDetalles" name = "sumDetalles" 
	    value = "0" readonly = "readonly"/>
	</div>
    </div>
</div>
<div class = "container">
    <div class = "row">
        <div class = "col-md-12">  
            <div class = "panel-body collapse in" id = "divDatosEgreso" style="background:#ffffff;">
                <h3><span class = "label label-ribbon" style="margin-left:-31px;">Datos generales</span></h3>
                <h4 class="upper-ribbon-' . $class . '">' . $span . '</h4>
                <div class="row">
                    <div class="col-md-6">
                        <div class = "form-group">
                            <label for = "idProveedor" class = "col-sm-3 control-label">Proveedor:</label>
                            <div class = "col-sm-6">                                        
                                <span style="font-size:14px; font-weight:bold;">' . $optProveedores . '</span>
                            </div>
                        </div>
                    </div>        
                    <div class="col-md-6">
                        <div class = "form-group">
                            <label for = "idProveedor" class = "col-sm-3 control-label">Estatus:</label>
                            <div class = "col-sm-6"><span id="sp_id_doc" style="display:none">' . $id . '</span>';
    $pagina .= '
                            </div>
                        </div>
                    </div>   
                </div>
                <div class = "row">
                <div class = "col-md-6" style="width:50%">
                    <div class = "form-group">
                    <label class = "col-sm-3 control-label">Fecha del Documento:</label>
                    <div class = "col-sm-6">
                        <div class = "input-group">
                        <span style="font-size:14px; font-weight:bold;" id="sp_fecha_doc">' . $fechaDoc . '</span>
                        </div>
                    </div>
                    </div>
                </div>
                <div class = "col-md-6" style="width:50%">
                    <div class = "form-group">
                    <label for = "folioCliente" class = "col-sm-3 control-label">
                    Folio Documento:</label>
                    <div class = "col-sm-6">
                        <span style="font-size:14px; font-weight:bold; color:#470f0f">' . $folioDoc . '</span>
                    </div>
                    </div>
                </div>
                </div>
                <div class = "row">
                <div class = "col-md-6" style="width:50%">
                    <div class = "form-group">
                    <label class = "col-sm-3 control-label">Concepto:</label>
                    <div class = "col-sm-6">
                        <span style="font-size:14px; font-weight:bold;">' . $concepto . '</span>
                    </div>
                    </div>
                </div>
                <div class = "col-md-6" style="width:50%">
                    <div class = "form-group">
                        <label class = "col-sm-3 control-label">Observación:</label>
                        <div class = "col-sm-6">
                            ' . $observacion . '
                        </div>
                    </div>
                </div>
                </div>
                <h3><span class="label label-ribbon" style="margin-left:-31px;">Totales</span></h3>
                <div class = "row">
                <div class = "col-md-4">
                </div>
                <div class = "col-md-4">
                    <div class = "form-group">
                    <label class = "col-sm-3 control-label">SALDO PENDIENTE:</label>
                    <div class = "col-sm-6">
                        <span style="font-size:15px; font-weight:bold;color:#DA4453">$ ' . money_string_format($iva) . '</span>
                    </div>
                    </div>
                </div>
                <div class = "col-md-4">
                    <div class = "form-group">
                    <label id="ribbon-total" class = "col-sm-3 control-label">TOTAL:</label>
                    <div class = "col-sm-6">
                        <span style="font-size:14px; font-weight:bold;" id="sp_total_doc">$' . money_string_format($total) . '</span>
                    </div>
                    </div>
                </div>
                </div>
                <h3></h3>
                <hr style = "margin-top:0; margin-bottom:10px;">
                <div class = "row">
                <div class = "col-sm-12">
                    <div class = "btn-toolbar btnsGuarCan">
                        <i class = "btn-danger btn"';
    if (strpos($statusDoc, '4') === false && strpos($statusDoc, '3') === false) {
        $pagina .= ' href="#myModal7" style="background:#8cc152;"';
    } else {
        $pagina .= ' style="background:#656d78; opacity:0.2"';
    }
    $pagina .= 'id="btnRealizarPago" data-toggle="modal">Realizar Pago</i>';
    if (!strpos($statusDoc, '3') === false) {
        $pagina .= '<i class = "btn-danger btn" style="background:#ed5565" id="btnAutorizarDoc">Autorizar</i>';
    }
    $pagina .= '<i class = "btn-danger btn" style="background:#aab2bd" onclick="navegar();">Regresar</i>
                    </div>
                </div>
                </div>
            </div>
            </div>
        </div>
    </div>';
    $pagina .= '
	<div class = "col-md-12">
		<div class = "panel-body collapse in" style="background:#ffffff;margin: 0 20px 20px 20px;">                        
        
        <div class="panel-heading">
            <h4>DETALLES</h4>
            <div class="options">
                <a href="javascript:;" class="panel-collapse"><i class="fa fa-chevron-down"></i></a>
            </div>
        </div>
        <div class="panel-body collapse">
			<div class = "col-md-12">
                <div id = "divDetallesEgreso" style = "height:207px;">
                    <div class = "table-responsive">
                        <table class = "table table-bordered table-striped" id = "js-tabla">
                            <thead>
                                <tr>
                                    <th>DESCRIPCION</th>
                                    <th>CANTIDAD</th>
                                    <th>PRECIO UNITARIO</th>
                                    <th>IVA(%)</th>
                                    <th>TOTAL</th>
                                    <th>SUCURSAL</th>
                                    <th>CONCEPTO</th>
                                </tr>
                            </thead>
                            <tbody>
                                ' . $tablaDetalles . '
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
		</div>
        <div class="panel-heading">
            <h4>PAGOS AL DOCUMENTO</h4>
            <div class="options">
                <a href="javascript:;" class="panel-collapse"><i class="fa fa-chevron-down"></i></a>
            </div>
        </div>
<div class="panel-body collapse" >                        
            <div class = "row">
                <div class = "col-md-12">
                    <div id = "divDetallesEgreso" style="height:287px;">
                        <div class = "table-responsive">
                            <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered datatables" id="example">
                                <thead>
                                    <tr>
                                        <th>No de Pago</th>
                                        <th>FECHA DE PAGO</th>
                                        <th>MONTO DE PAGO</th>
                                        <th>ESTATUS</th>
                                        <th>USUARIO</th>
                                        <th>SUCURSAL</th>
                                        <th>CUENTA</th>
                                        <th>BANCO</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    ' . $tablaPagos . '
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div id="detallesProducto"></div>
                    </div>
                </div>
            </div>
		</div>
	    </div>
</div>';
    $pagina .= '<div class="modal fade" id="myModal7" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
						<div class="modal-content">
							<div id="divFormPago">
								<div class="modal-header">
									<h4 class="modal-title">Realizar Nuevo Pago</h4>
                                    <span id="spIdDoc" style="display:none">' . $id . '</span>
								</div>
                                <div class="modal-body">
                                    <div class="form-horizontal">
                                        <div class="form-group">
                                            <label for="fechaPago" class="col-sm-3 control-label">Fecha de Pago:</label>
                                            <div class="col-sm-6">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                                    <input readonly="readonly" type="text" class="form-control" id="datepicker" name="fechaPago" value="' . $hoy . '"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="montoPago" class="col-sm-3 control-label">Monto del Pago:</label>
                                            <div class="col-sm-6">
                                                <input type="text" class="form-control" id="txtMontoPago_modal" name="MontoPago" value="0.00" maxlength="100"/>
                                                
                                            </div>
                                            <button class="btn btn-info" id="btn_settle_pay_detail"  style="margin:0 auto;" type="button">
                                                <i class="fa">LIQUIDAR</i>
                                            </button>
                                        </div>
                                        
                                        <div class="form-group">
                                            <label for="txtCuentaPago" class="col-sm-3 control-label">Cuenta de Pago:</label>
                                            <div class="col-sm-6">
                                                <select id="txtCuentaPago" name="txtCuentaPago" style="width:100% !important" class="selectSerch">
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="id_tipo_pago" class="col-sm-3 control-label">Tipo de Pago:</label>
                                            <div class="col-sm-6">
                                                <select id="id_tipo_pago" name="id_tipo_pago" style="width:100% !important" class="selectSerch">
                                                    <option value="1">SPEI</option>
                                                    <option value="2">Cheque</option>
                                                    <option value="3">Efectivo</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="txtCuentaPago" class="col-sm-3 control-label">Referencia de Pago:</label>
                                            <div class="col-sm-6">
                                                <input type="text" id="txtReferenciaPago" name="txtReferenciaPago" style="width:100% !important" maxlength="45" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
								<div class="modal-footer">									
									<i class="btn-danger btn" style="margin:10px 3px 10px 10px;" onclick="" data-dismiss="modal">Cancelar</i>
									<i class="btn-success btn" style="margin:10px 3px 10px 10px;" data-dismiss="modal" id="btnPagarDetalle" >Realizar Pago</i>
								</div>
                            </div>
                        </div>
                    </div>
                </div>';
    return $pagina;
}
Пример #2
0
if (isset($_POST['set'])) {
    $status = $_POST['status'] == "Enabled" ? "true" : "false";
    setStr("Device.X_CISCO_COM_DDNS.Enable", $status, true);
    $status = getStr("Device.X_CISCO_COM_DDNS.Enable");
    $status = $status == "true" ? "Enabled" : "Disabled";
    header("Content-Type: application/json");
    echo json_encode($status);
    //	echo json_encode("Disabled");
}
if (isset($_POST['add'])) {
    $sp = $_POST['sp'];
    $username = $_POST['username'];
    $password = $_POST['password'];
    $hostname = $_POST['hostname'];
    $result = "";
    $id = selectTable($sp);
    if ($id != 0) {
        setStr("Device.X_CISCO_COM_DDNS.Service." . $id . ".ServiceName", $sp, false);
        setStr("Device.X_CISCO_COM_DDNS.Service." . $id . ".Username", $username, false);
        setStr("Device.X_CISCO_COM_DDNS.Service." . $id . ".Password", $password, false);
        setStr("Device.X_CISCO_COM_DDNS.Service." . $id . ".Domain", $hostname, false);
        setStr("Device.X_CISCO_COM_DDNS.Service." . $id . ".Enable", "true", true);
        $result = "Success!";
    } else {
        $result = "Service Provider is not exist!";
    }
    header("Content-Type: application/json");
    echo json_encode($result);
    /*	
    	$ids=explode(",",getInstanceIDs("Device.X_CISCO_COM_DDNS.Service."));
    	if (count($ids)==0) {	//no table, need test whether it equals 0
Пример #3
0
function egresos_detalles($id)
{
    $datosEgreso = 'get_pagos_id(' . $id . ');';
    $proveedorEgreso = 'proveedor_egreso(' . $id . ');';
    $detallesidPago = 'sp_get_pagos_for_docs(' . $id . ');';
    $columnas = array("fecha_pago_documento", "estatus doc", "monto_pago", "concepto_documento", "folio", "saldo_pendiente", "monto_documento");
    //SELECT PROVEEDOR
    $optProveedores = selectLabel($proveedorEgreso, "proveedor");
    //SELECT DATOS EGRESO
    $fechaDoc = selectLabel($datosEgreso, "fecha_pago");
    //SELECT CONCEPTO
    $concepto = selectLabel($datosEgreso, "banco_ctas_banco");
    //SELECT STATUS
    $statusPay = selectLabel($datosEgreso, "estatus");
    //SELECT OBSERVACION
    $observacion = selectLabel($datosEgreso, "numero_ctas_banco");
    //SELECT TOTAL
    $total = selectLabel($datosEgreso, "monto_pago");
    //SELECT SUBTOTAL
    $subtotal = selectLabel($datosEgreso, "subtotal");
    //SELECT IVA
    $iva = selectLabel($datosEgreso, "iva");
    //SELECT NO DE PAGO
    $folioDoc = selectLabel($datosEgreso, "id_pagos");
    $tablaDetalles = selectTable($detallesidPago, $columnas);
    $_SESSION["idProyectoActual"] = '';
    $_SESSION["idProveedorActual"] = '';
    switch (trim($statusPay)) {
        case '<label id="">0</label>':
            $span = '<span style="font-size:14px; font-weight:bold;" class="banner_rojo">CAPTURADO';
            $class = 'magenta';
            break;
        case '<label id="">3</label>':
            $span = '<span style="font-size:14px; font-weight:bold;" class="banner_azul">PROGRAMADO';
            $class = 'azul';
            break;
        case '<label id="">1</label>':
            $span = '<span style="font-size:14px; font-weight:bold;" class="banner_verde">ACTIVO';
            $class = 'verde';
            break;
        case '<label id="">5</label>':
            $span = '<span style="font-size:14px; font-weight:bold;" class="banner_amarillo">ABONADO';
            $class = 'amarillo';
            break;
        default:
            $span = '<span style="font-size:14px; font-weight:bold;" class="banner_magenta">full';
            $class = 'magenta';
            break;
    }
    $pagina .= '
<div id = "page-heading">
    <ol class = "breadcrumb">
	<li><a href = "javascript:navegar_modulo(0);">Dashboard</a></li>
	<li><a href = "javascript:navegar_modulo(' . $_SESSION["mod"] . ');">' . $_SESSION["moduloPadreActual"] . '</a></li>
	<li class = "active">
	    ' . $_SESSION["moduloHijoActual"] . '
	</li>
    </ol>
    <h1>' . $_SESSION["moduloHijoActual"] . '</h1>
    <div class = "options">
	<div class = "btn-toolbar">
	    <input type = "hidden" id = "idPagoActual" name = "idPagoActual" 
	    value = "0" readonly = "readonly"/>
	    <input type = "hidden" id = "idProyectoActual" name = "idProyectoActual" 
	    value = "0" readonly = "readonly"/>
	    <input type = "hidden" id = "sumDetalles" name = "sumDetalles" 
	    value = "0" readonly = "readonly"/>
	</div>
    </div>
</div>
<div class = "container">
    <div class = "row">
	<div class = "col-md-12">
		<div class = "panel-body collapse in" id = "divDatosEgreso" style="background:#ffffff;">
		    <h3><span class = "label label-ribbon" style="margin-left:-31px;box-shadow:2px 2px 5px #bfbfbf;">Datos generales</span></h3>
            <h4 class="upper-ribbon-' . $class . '">' . $span . '</h4>
		    <div class = "row">
			<div class = "col-md-6">
			    
			</div>                            
		    </div>
		    <div class = "row">
			<div class = "col-md-6">
			    <div class = "form-group">
				<label class = "col-sm-3 control-label">Fecha del Documento:</label>
				<div class = "col-sm-6">
				    <div class = "input-group">
					' . $fechaDoc . '
				    </div>
				</div>
			    </div>
			</div>
			<div class = "col-md-6">
			    <div class = "form-group">
				<label for = "folioCliente" class = "col-sm-3 control-label">
				No. de Pago:</label>
				<div class = "col-sm-6">
				    ' . $folioDoc . '
				</div>
			    </div>
			</div>
		    </div>
		    <div class = "row">
			<div class = "col-md-6">
			    <div class = "form-group">
				<label class = "col-sm-3 control-label">Banco Emisor:</label>
				<div class = "col-sm-6">
				    ' . $concepto . '
				</div>
			    </div>
			</div>
			<div class = "col-md-6">
			    <div class = "form-group">
				<label class = "col-sm-3 control-label">No. de Cuenta:</label>
				<div class = "col-sm-6">
				    ' . $observacion . '
				</div>
			    </div>
			</div>
		    </div>
		    <h3><span class="label label-ribbon" style="margin-left:-31px;box-shadow:2px 2px 5px #bfbfbf;">Totales</span></h3>
		    <div class = "row">
			<div class = "col-md-4">
			    <div class = "form-group">
				<label class = "col-sm-3 control-label">TOTAL:</label>
				<div class = "col-sm-6">
				    $ ' . $total . '
				</div>
			    </div>
			</div>
		    </div>
		    <h3></h3>
		    <hr style = "margin-top:0; margin-bottom:10px;">
		    <div class = "row">
			<div class = "col-sm-12">
			    <div class = "btn-toolbar btnsGuarCan">
				<i class = "btn-danger btn" style="background:#aab2bd" onclick = "navegar();">Regresar</i>
			    </div>
			</div>
		    </div>
		</div>
	    </div>
	</div>
    </div>';
    $pagina .= '
    <div class = "row" id = "divCapturaDetalles">
        <div class = "col-md-12">

            <div class = "panel-body collapse in" style="background:#ffffff;margin: 0 20px 20px 20px;">                        

                <div class="panel-heading">
                    <h4>DETALLES</h4>
                    <div class="options">
                        <a href="javascript:;" class="panel-collapse"><i class="fa fa-chevron-down"></i></a>
                    </div>
                </div>
                <div class = "panel-body collapse in">                        
                    <div class = "row">
                    <div class = "col-md-12">
                        <div id = "divDetallesEgreso" style = "height:357px;">
                        <div class = "table-responsive">
                            <table class = "table table-bordered table-striped" id = "js-tabla">
                            <thead>
                                <tr>
                                <th>FECHA DEL DOCUMENTO</th>
                                <th>ESTATUS</th>
                                <th>MONTO DEL PAGO</th>
                                <th>CONCEPTO</th>
                                <th>FOLIO</th>
                                <th>SALDO RESTANTE</th>
                                <th>TOTAL DEL DOCUMENTO</th>
                                </tr>
                            </thead>
                            <tbody>
                                ' . $tablaDetalles . '
                            </tbody>
                            </table>
                        </div>
                        <div id = "detallesProducto"></div>
                        </div>
                    </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
';
    return $pagina;
}
<?php

include_once '../includes/db_connect.php';
include_once '../includes/functions.php';
include_once '../includes/database_functions.php';
sec_session_start();
$sem = strval($_GET['sem']);
$branch = strval($_GET['branch']);
$table = selectTable($branch, $sem);
$sql = "SELECT * FROM " . $table;
$result = mysqli_query($mysqli, $sql);
while ($row = mysqli_fetch_array($result)) {
    echo "<label>";
    echo "<input type=\"checkbox\" name=\"subject[]\" id=\"subject[]\" value=\"" . $row['Subject_Name'] . "\" data-title=\"" . $row['Subject_Name'] . "\" onclick=\"getfees()\"/>" . $row['Subject_Name'];
    echo "</label>";
    echo "<input type=\"text\" class=\"form-control\" value=\"" . $row['Subject_Fees'] . "\" disabled name=\"fees\">";
}
echo "</div>";
echo "<div id=form_payment_error></div>";
echo "</div>";
Пример #5
0
 protected function setupFormFields()
 {
     return ['id_cidade' => ['insert' => ['disabled' => true], 'update' => ['readonly' => true]], 'fk_estado' => ['type' => selectTable('estado', 'id_estado', 'nome_estado')->defaultText("Selecione um estado...")], 'updated_at' => ['hidden' => true], 'created_at' => ['hidden' => true]];
 }
Пример #6
0
                                        <thead>
                                        <tr>
                                            <th>ID</th>
                                            <th>Username</th>
                                            <th>Fullname</th>
                                            <th></th>
                                            <th>Email</th>
                                            <th>Created On</th>
                                            <th>Last Login</th>
                                            <th>Designation</th>
                                            <th>Options</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <?php 
$arr = selectTable();
while ($row1 = mysql_fetch_array($arr)) {
    if ($_SESSION['s_id'] == 1) {
        $editBtn = "<button type='button' class='btn btn-default' data-toggle='modal' data-target='#editModal' data-id=" . $row1['id'] . "><i class='glyphicon glyphicon-edit'></i></button>";
        $delBtn = "<button type='button' class='btn btn-info' data-id=" . $row1['id'] . "><i class='glyphicon glyphicon-trash'></i></button>";
    } else {
        $editBtn = "";
        $delBtn = "";
    }
    echo "<tr id=" . $row1['id'] . ">";
    echo "<td>" . $row1['id'] . "</td>";
    echo "<td>" . $row1['username'] . "</td>";
    echo "<td>" . $row1['fullname'] . "</td>";
    echo "<td>";
    $email = $row1['email'];
    $default = "http://geeknews.net/images/no_gravatar.jpg";