<!-- Modal -->

<div id="modalListChangePrice" class='modal fade' data-backdrop="static" data-keyboard="false" role="dialog" style=" overflow: hidden;background: transparent">

    <div class="modal-dialog modal-lg" role="document">

        <div class="modal-content">

            <div class="modal-body">

                <div class="box box-primary">

                    <div class="box-header with-border">

                        <button type="button" class="close _closeModalChangePrice"><i class="fa fa-window-close"></i></button>

                        <h4><i class='fa-fw fa fa-tags'></i> <span id="title_modal_salesrecord"><?php echo $_translator->_getTranslation('Productos con cambios'); ?></span></h4>

                    </div>

                    <div class="box-body">

                        <div class='flashmessenger_modal_change_price'><?php $flashmessenger->showMessage(true); ?></div>
                        <div>

                            <div class="col-md-12">


                                <div class="table-responsive">
                                    <table id="tblcambiosPrecios" class="table  table-hover table-condensed">

                                        <thead>
                                            <th class="text-center">

                                                <?php echo $_translator->_getTranslation('Categoria'); ?>

                                            </th>

                                            <th class="text-center">

                                                <?php echo $_translator->_getTranslation('Codigo'); ?>

                                            </th>

                                            <th class="text-center">

                                                <?php echo $_translator->_getTranslation('Sucursal'); ?>

                                            </th>

                                            <th class="text-center">

                                                <?php echo $_translator->_getTranslation('Nombre para venta'); ?>

                                            </th>



                                            <th class="text-center">

                                                <?php echo $_translator->_getTranslation('Anterior Monto'); ?>

                                            </th>
                                            <th class="text-center">

                                                <?php echo $_translator->_getTranslation('Nuevo Monto'); ?>

                                            </th>

                                        </thead>

                                        <tbody>

                                         
                                        </tbody>

                                    </table>
                                </div>

                            </div>

                        </div>

                    </div>

                    <div class="box-footer">

                        <div class="pull-right">

                            <!-- <input type="button" id='btn_save_transaction' value="<?php echo $_translator->_getTranslation('Enviar cambios') ?>" class='btn btn-primary' /> -->

                        </div>

                        <div class="pull-left">

                            <input type="button" value="<?php echo $_translator->_getTranslation('Cancelar') ?>" class="btn btn-default _closeModalChangePrice" />


                        </div>

                    </div>



                </div>

            </div>

        </div>

    </div>
    <script>
        var storesJSON;
        //$('#store_id').select2();

        $('#modalListChangePrice').on('shown.bs.modal', function(e) {

            if ($('#action').val() === 'insert') {
                $('#initial_cash').focus();
            }



            var input = null;

            $("form[name=salesrecord]").find('div').each(function() {

                if ($(this).hasClass('has-error') === true) {

                    input = $(this).data('errorfor');

                    return false;

                }

            });



            if (input !== null) {
                $('#' + input).focus();
            }

        });
      

    </script>

</div>