Comming ucUs SH3LL V.2

Path : /home/gujo45me/public_html/anmar/resources/views/compra/
Disable Functions : exec,passthru,shell_exec,system
System : Linux server-604606.appsiete.com 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64

[ Home ][ Zone-h ][ Jumping ][ Symlink ][ Mass Depes ][ Command ]

File Upload :
Current File : /home/gujo45me/public_html/anmar/resources/views/compra/nuevo.blade.php

@extends('layout.main')
@section('content')

    <div class="sixteen wide tablet sixteen wide computer column ">
        <div class="ui segment">
            
            <h4 class="ui dividing header teal centered">COMPRAR PRODUCTOS PARA ALMACÉN</h4>
            <br>

            <form class="ui form" id="frmNuevo" autocomplete="off"> 
                
                <!-- start tab 1 -->
                <div class="ui tab active" data-tab="one">

                    <div class="three fields">
                        <div class="three wide field">
                            <div class="ui fluid large white label">Almacén de Destino</div>
                        </div>
                        <div class="eleven wide field">
                            <select class="ui fluid small input dropdown" name="id_local">
                                <option value="{{ Auth::guard("usuario")->user()->id_local }}"> {{ Auth::guard('usuario')->user()->local->nombre }} ({{ ucwords(mb_strtolower(Auth::guard('usuario')->user()->local->direccion ))}})</option>  
                            </select>  
                        </div>
                    </div>

                    <div class="three fields">
                        <div class="three wide field">
                            <div class="ui fluid large white label">Proveedor</div>
                        </div>
                        <div class="eleven wide field">
                            <select class="ui small search selection dropdown" name="id_proveedor">
                            <option value="">Seleccione</option>
                            @foreach($proveedores as $data)
                               <option value="{{ $data->id_proveedor }}"> {{ $data->nombre }} ({{ ucwords(mb_strtolower($data->numero_documento ))}})</option>
                            @endforeach 
                        </select> 
                        </div>
                        <div class="two wide field">
                            <div class="ui fluid small green button btn_nuevo_proveedor" title="Clic para agregar nuevo"><i class="plus icon"></i>NUEVO</div>
                        </div>
                    </div>

                    <div class="six fields">
                        
                        <div class="three wide field">
                            <div class="ui fluid large white label">Tipo Comprobante</div>
                        </div>
                        <div class="three wide field">
                            <input type="hidden" name="tipo_comprobante" value="FACTURA">
                            <select class="ui fluid small input dropdown" name="id_tipo_comprobante">
                                <option value="">Seleccione</option>
                                @foreach($tipo_comprobante as $tipo)
                                    <option value="{{ $tipo->id_tipo_comprobante }}">{{ $tipo->nombre }}</option>
                                @endforeach
                            </select> 
                        </div>
                        

                        <div class="two wide field">
                            <div class="ui fluid large white label">Serie de Factura</div>
                        </div>
                        <div class="two wide field">
                            <div class="ui small input">
                                <input type="text" placeholder="F001" maxlength="4" name="serie_comprobante" oninput="$.upperCase(this)">
                            </div> 
                        </div>

                        <div class="two wide field">
                            <div class="ui fluid large white label">Numero de Factura</div>
                        </div>
                        <div class="two wide field">
                            <div class="ui small input">
                                <input type="text" placeholder="0012" maxlength="8" name="numero_comprobante" oninput="$.upperCase(this)">
                            </div> 
                        </div>

                    </div>

                    <div class="five fields">

                        <div class="three wide field">
                            <div class="ui fluid large white label">Fecha de Compra</div>
                        </div>
                        <div class="three wide field">
                            <div class="ui small input">
                                <input type="text" class="fecha hasDate" name="fecha_compra" >
                            </div> 
                        </div>


                        
                        <div class="two wide field">
                            <div class="ui fluid large white label">Tipo de Compra</div>
                        </div>
                        <div class="two wide field">
                            <select class="ui fluid small input dropdown" name="tipo_compra">
                                <option value="CONTADO">Al Contado</option>
                                <option value="CREDITO">Al Crédito</option>
                            </select> 
                        </div>
                        <div class="two wide field" id="fecha_pago" style="visibility: hidden;">
                            <div class="ui small input">
                                <input type="text" class="fecha_fut" name="fecha_pago" placeholder="Fecha Pago">
                            </div> 
                        </div>
                    </div>

                    <div class="form_footer">
                        <div class="ui right floated default button tab_two">SIGUIENTE<i class="arrow right icon"></i></div>
                    </div>
                </div>
                <!-- end tab 1 -->

                <!-- start tab 2 -->
                <div class="ui tab" data-tab="two">

                    
                    <div class="four fields">
                        <div class="four wide field">
                            <div class="ui fluid large white label">Buscar Producto</div>
                        </div>
                        <div class="three wide field">
                            <div class="ui fluid small purple button btn_buscar_producto" title="Clic para buscar"><i class="search icon"></i>BUSCAR PRODUCTO</div>
                        </div>
                        <div class="four wide field">
                            <div class="ui fluid large white label">Registrar Nuevo Producto</div>
                        </div>
                        <div class="three wide field">
                            <div class="ui fluid small green button btn_nuevo_producto" title="Clic para agregar nuevo"><i class="plus icon"></i>REGISTRAR NUEVO</div>
                        </div>
                    </div>


                    <div class="four fields">
                        <div class="four wide field">
                            <div class="ui fluid large white label">Moneda</div>
                        </div>
                        <div class="three wide field">
                            <select class="ui fluid small input dropdown" id="moneda">
                                <option value="SOLES">SOLES</option>
                                <option value="DOLARES">DOLARES</option>
                                {{-- <option value="DOLARES">EUROS</option> --}}
                            </select> 
                        </div>
                        <div class="four wide field tipo_cambio" style="visibility: hidden;">
                            <div class="ui fluid large white label">Tipo de Cambio</div>
                        </div>
                        <div class="three wide field tipo_cambio" style="visibility: hidden;">
                            <div class="ui small input">
                                <input type="text" id="valor_cambio" name="valor_cambio" value="1.00">
                            </div> 
                        </div>
                    </div>

                    <div class="four fields">
                        <div class="four wide field">
                            <div class="ui fluid large white label">Observacion</div>
                        </div>
                        <div class="ten wide field">
                            <div class="ui small input ">
                                <input type="text" name="observacion" maxlength="800" oninput="$.upperCase(this)">
                            </div>
                        </div>
                    </div>

                    <div class="ui hidden divider"></div>
                    <div class="form_footer">
                        <div class="ui left floated default button tab_one"><i class="arrow left icon"></i>REGRESAR</div>
                        {{-- <div class="ui right floated teal button btn_agregar_producto"><i class="arrow down icon"></i>AÑADIR A LISTA</div> --}}
                    </div>

                    <div class="ui hidden divider"></div>

                    <table class="ui celled table">
                        <thead>
                            <tr>
                                <th class="center aligned">Producto</th>
                                <th class="center aligned" data-tooltip="Cantidad comprada" data-position="top center" data-inverted="">Cantidad</th>
                                <th class="center aligned" data-tooltip="Precio de compra por unidad" data-position="top center" data-inverted="">Precio de Compra</th>
                                <th class="center aligned">Subtotal</th>
                                <th class="center aligned">Acción</th>
                            </tr>
                        </thead>
                        <tbody id="tbody"></tbody>
                    </table>    


                    <div class="form_footer">

                        <div class="ui labeled small input">
                            <label class="ui brown label">TOTAL</label>
                            <input type="text" name="total_compra" id="total_compra" size="5" readonly style="width: 0%">
                        </div> 
                        
                        <div class="ui right floated primary button btn_registrar"><i class="check icon"></i>REGISTRAR COMPRA</div>
                    </div>
                </div>
                <div id="inputs"></div>
                <!-- end tab 2 -->
            </form>

        </div>
    </div>

    <!--start register modal -->
    <div class="ui small basic modal" id="register_modal">
        <div class="ui icon header"><i class="shopping cart icon"></i>Registrar Productos</div>
        <div class="content" style="text-align: center; font-size: 16px">
          <p>¿Desea registrar estos productos en el sistema?</p>
        </div>
        <div class="actions">
            <div class="ui red basic cancel inverted button" title="Haga clic para salir"><i class="remove icon"></i>Cancelar</div>
            <div class="ui green ok inverted button" title="Haga clic para registrar"> <i class="checkmark icon"></i>Registrar</div>
        </div>
    </div>
    <!--end register modal -->

    <!--start nuevo proveedor modal -->
    <div class="ui standard small modal" id="nuevo_proveedor_modal">
        <div class="header">Registrar Nuevo Proveedor</div>
        <div class="content">
            <div class="ui disabled inverted dimmer" id="loader_proveedor">
                <div class="ui text loader">Procesando...</div>
            </div>
            <form class="ui form" id="frmNevoProveedor" autocomplete="off">
              
                <div class="two fields">
                    
                    <div class="ten wide field">
                        <label>RUC del Proveedor</label>
                        <div class="ui action small input" >
                            <input type="text" id="numero_documento" name="numero_documento"  placeholder="Buscar..." maxlength="11">
                            <div class="ui icon button" id="loading_doc" title="Clic para Consultar"><i class="search icon"></i>&nbsp;Buscar en SUNAT</div>
                        </div>
                    </div>

                    <div class="six wide field">
                        <label>Tipo de Documento</label>
                        <select class="ui small input dropdown" id="tipo_documento" name="id_tipo_documento">
                             @foreach($tipo_documento as $tipo)
                                <option value="{{ $tipo->id_tipo_documento }}">{{ $tipo->nombre }}</option>
                             @endforeach
                        </select>  
                    </div>

                </div>

                <div class="field">
                    <div class="field">
                        <label>Nombre / Razon Social</label>
                        <div class="ui small input ">
                          <input type="text" id="nombre_proveedor" name="nombre" maxlength="200" oninput="$.upperCase(this)">
                        </div>
                    </div>
                </div>
                
                <div class="field">
                    <div class="field">
                        <label>Direccion</label>
                        <div class="ui small input ">
                          <input type="text" id="direccion" name="direccion" maxlength="200" oninput="$.upperCase(this)">
                        </div>
                    </div>
                </div>

                <div class="two fields">
                    <div class="field">
                        <label>Email</label>
                        <div class="ui small input ">
                          <input type="text" name="email" maxlength="50">
                        </div>
                    </div>
                    <div class="field">
                        <label>Telefono</label>
                        <div class="ui small input ">
                          <input type="text" name="telefono"  maxlength="15">
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <div class="actions" >
            <div class="ui left floated black right labeled icon deny button" style="margin-bottom: 1em">Cerrar<i class="times icon"></i></div>
            <div class="ui right floated primary button btn_registrar_proveedor"><i class="check icon"></i>REGISTRAR</div>
        </div>
    </div>
    <!--end nuevo proveedor  modal -->

    <!--start nuevo producto modal -->
    <div class="ui modal" id="nuevo_producto_modal">
        <div class="header">Registrar Nuevo Producto</div>     
        <div class="scrolling content">
            <div class="ui disabled inverted dimmer" id="loader_producto">
                <div class="ui text loader">Procesando...</div>
            </div>
            <form class="ui form" id="frmNuevoProducto" autocomplete="off">

                <div class="field">
                    <div class="field">
                        <label>Nombre del producto</label>
                        <div class="ui small input ">
                          <input type="text" name="nombre"  maxlength="800" oninput="$.upperCase(this)">
                        </div>
                    </div>
                </div> 
                
                <div class="two fields">
                    <div class="field">
                        <label>Marca del producto</label>
                        <div class="ui small input ">
                          <input type="text" name="descripcion" maxlength="100" oninput="$.upperCase(this)">
                        </div>
                    </div>
                    <div class="field">
                        <label>Código de Barras</label>
                        <div class="ui small input ">
                          <input type="text" name="codigo_barras"  maxlength="100" oninput="$.upperCase(this)">
                        </div>
                    </div>
                </div>

                <div class="two fields">
                    
                    <div class="six wide field">
                        <label>Precio de Venta por UNIDAD</label>
                        <div class="ui labeled small input">
                            <input type="text" name="precio" maxlength="11">
                        </div>  
                    </div>

                    <div class="two wide field">
                        <label> &nbsp;</label>
                        <select class="ui fluid small input dropdown" name="tipo_precio">
                            <option value="1"> S/ </option>
                            <option value="2"> %  </option>
                        </select>    
                    </div>

                    
                    <div class="three wide field">
                        <label>Precio de venta por</label>
                        <div class="ui small input">
                            <input type="text" name="precio_mayorista" maxlength="11">
                        </div>  
                    </div>

                     <div class="two wide field">
                        <label> MAYOR</label>
                        <select class="ui fluid small input dropdown" name="tipo_precio_2">
                            <option value="1"> S/ </option>
                            <option value="2"> %  </option>
                        </select>    
                    </div>

                    <div class="three wide field">
                        <label>Precio de Compra</label>
                        <div class="ui labeled small input">
                            <label class="ui label">S/</label>
                            <input type="text" name="precio_compra" maxlength="11">
                        </div>  
                    </div>

                    

                </div> 

                <div class="two fields">
                    <div class="field">
                        <label>Tipo de Presentación</label>
                        <select class="ui small search selection dropdown" name="id_tipo_presentacion">
                            @foreach($tipo_presentacion as $tipo)
                                <option value="{{ $tipo->id_tipo_presentacion }}"> {{ $tipo->nombre }} </option>
                            @endforeach
                        </select>  
                    </div>
                    <div class="field">
                        <label>Unidad de Medida</label>
                        <select class="ui small search selection dropdown" name="id_unidad_medida">
                            @foreach($unidad_medida as $unidad)
                                <option value="{{$unidad->id_unidad_medida}}">{{$unidad->nombre}} ({{$unidad->abreviatura}})</option>
                            @endforeach
                        </select>  
                    </div>
                </div>

                <div class="two fields">
                    <div class="field">
                        <label>Situacion de Impuesto</label>
                        <select class="ui small selection dropdown" name="situacion_impuesto">
                            <option value="AFECTO">Afecto</option>
                            <option value="INAFECTO">Inafecto</option>
                            <option value="EXONERADO">Exonerado</option>
                        </select>  
                    </div>

                    <div class="field">
                        <label>Tipo de Producto</label>
                        <select class="ui small input dropdown" name="tipo_producto">
                            <option value="Generico">Generico</option>
                            <option value="Comercial">Comercial</option>
                        </select>  
                    </div> 
                </div> 


                <div class="two fields">
                    <div class="field">
                        <label>Tipo de Impuesto</label>
                        <select class="ui small selection dropdown" name="tipo_impuesto">
                            <option value="IGV">IGV</option>
                            {{-- <option value="ISC">ISC</option> --}}
                        </select>  
                    </div>

                    <div class="field">
                        <label>Valor de Impuesto</label>
                        <div class="ui right labeled small input">
                            <input type="text" name="valor_impuesto" id="valor_impuesto" value="{{$empresa->valor_impuesto}}" maxlength="8" readonly="">
                            <label class="ui label">%</label>
                        </div>  
                    </div> 

                </div> 


                <div class="two fields">
                    <div class="field">
                        <label>Fecha de Vencimiento</label>
                        <div class="ui small input">
                            <input type="text" class="fecha" name="fecha_vencimiento">
                        </div>   
                    </div>

                    <div class="field">
                        <label>Lote / Serie</label>
                        <div class="ui small input">
                            <input type="text" name="lote" maxlength="800" oninput="$.upperCase(this)">
                        </div>  
                    </div> 

                </div> 
 
            </form>
        </div>
        <div class="actions" >
            <div class="ui left floated black right labeled icon deny button" style="margin-bottom: 1em">Cerrar<i class="times icon"></i></div>
            <div class="ui right floated primary button btn_registrar_producto"><i class="check icon"></i>REGISTRAR</div>
        </div>
    </div>
    <!--end nuevo producto  modal --> 

    <!--start buscar producto modal -->
    <div class="ui standard large modal" id="buscar_producto_modal">
        <div class="header">Buscar Productos</div>
        <div class="scrolling content">
            <div class="ui disabled inverted dimmer" id="loader_busqueda">
                <div class="ui text loader">Procesando...</div>
            </div>
            <div class="ui action small input"  autocomplete="off">
                <input type="text" id="buscar_producto" name="buscar_producto" placeholder="Producto a buscar...">
                <div class="ui icon button" id="btn_buscar_prod" title="Clic para buscar"><i class="search icon"></i></div>
            </div> 
            <table class="ui celled striped table" id="tabla_productos">
                <thead>
                    <tr>
                        <th class="head_table">N°</th>
                        <th class="head_table">Cod Barras</th>
                        <th class="head_table">Producto</th>
                        <th class="head_table">Marca</th>
                        <th class="head_table">Presentacion</th>
                        <th class="head_table">Precio Venta S/</th>
                        <th class="head_table">Vencimiento</th>
                        <th class="head_table">Acciones</th>
                    </tr>
                </thead>
                <tbody id="tbody_productos">
                   <?php /**/ $i = 1/**/ ?>
                    @foreach ($productos->sortBy('producto.nombre') as $row)
                    <tr data-table="{{ $row->id_producto }}">
                        <td>{{ $i }}</td>
                        <td>{{ $row->producto->codigo_barras }}</td>
                        <td>{{ $row->producto->nombre }} </td>
                        <td>{{ $row->producto->descripcion }}</td>
                        <td>{{ $row->producto->tipo_presentacion->nombre }}</td>
                        <td>{{ $row->producto->precio }}</td>
                        <td>{{ !is_null($row->producto->fecha_vencimiento) ? $row->producto->fecha_vencimiento : "Sin fecha" }}</td>
                        
                        <td>                            
                            <div class="ui mini vertical animated positive button btn_seleccionar_producto" title="Seleccionar este producto" data-id="{{ $row->id_producto }}" >
                                <div class="hidden content">Elegir</div>
                                <div class="visible content"><i class="check icon"></i></div>
                            </div>
                        </td>
                    </tr>
                    <?php /**/ $i++ /**/ ?>
                    @endforeach
                </tbody>
            </table>
        </div>
        <div class="actions" >
            <div class="ui left floated red right labeled icon deny button" style="margin-bottom: 1em">Cerrar<i class="times icon"></i></div>
        </div>
    </div>
    <!--end buscar producto modal -->
@stop

@section('scripts')
    <script src="{{ asset('js/compra/nuevo.js') }}"></script>
@stop



Copyright © 2019 | Powered By MecUs7