<!-- Modal -->
<div id="modalDevolucion" class='modal fade' data-backdrop="static"  data-keyboard="false" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="myModalLabel"><?php echo $_translator->_getTranslation('Devolucion');?></h3>
        </div> 
        <div id="flashmessenger-devolucion"></div>
        <div class="modal-body">  
            <div class="col-lg-6">
                <table class="table table-condensed">
                    <tr>
                        <th class="col-lg-3"><?php echo $_translator->_getTranslation('Venta #');?></th>
                        <td colspan="3">
                            <?php $element = $form->getElement('idVentaDevolucion');$form->createElement($element);?></td>
                    </tr>
                    <tr>
                        <th class="col-lg-3"><?php echo $_translator->_getTranslation('Cliente');?></th>
                        <td colspan="3" id="clienteOrigen" class="infoOrigenVenta"></td>
                    </tr>
                    <tr>
                        <th class="col-lg-3"><?php echo $_translator->_getTranslation('Subtotal');?></th>
                        <td id="subtotalOrigen" class="infoOrigenVenta col-lg-3 text-right"></td>
                        <th class="col-lg-3"><?php echo $_translator->_getTranslation('Impuestos');?></th>
                        <td id="impuestosTotalOrigen" class="infoOrigenVenta col-lg-3 text-right"></td>
                    </tr>
                    <tr>
                        <th class="col-lg-3"><?php echo $_translator->_getTranslation('Descuento');?></th>
                        <td id="descuentoOrdenOrigen" class="infoOrigenVenta col-lg-3 text-right"></td>
                        <th class="col-lg-3"><?php echo $_translator->_getTranslation('Total');?></th>
                        <td id="montoTotalOrigen" class="infoOrigenVenta col-lg-3 text-right"></td>
                    </tr>
                </table>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6">
                <?php echo $form->showElement('notasDevolucion');?>
            </div>
            <div class="clear"></div>
            <div class="col-lg-12 col-md-12">
                <table id='devolucion-table' class="table table-scroll" style="height: 25vh">
                <thead>                
                    <th style="width:35%;text-align:center"><?php echo $_translator->_getTranslation('Descripcion');?></th>
                    <th style="width:12%;text-align:center"><?php echo $_translator->_getTranslation('Cantidad');?></th>
                    <th style="width:17%;text-align:right"><?php echo $_translator->_getTranslation('Total unitario');?></th>
                    <th style="width:12%;text-align:center"><?php echo $_translator->_getTranslation('Dev. previas');?></th>
                    <th style="width:12%;text-align:center"><?php echo $_translator->_getTranslation('Devolucion');?></th>
                    <th style="width:12%;text-align:right"><?php echo $_translator->_getTranslation('Subtotal');?></th>
                </thead>
                <tbody></tbody>
                </table> 
                <div class="clear"></div>
                <div class="col-lg-11 col-md-11 text-right">
                        <label><?php echo $_translator->_getTranslation('Total Devolucion');?></label>
                </div>
                <div class="col-lg-1 col-md-1 text-right">
                    <span id="montoTotalDevolucion" class="montoTotalDevolucion"></span>
                </div>
                <div class="col-lg-11 col-md-11 text-right">
                    <label><?php echo $_translator->_getTranslation('Total Pagado');?></label>
                </div>
                <div class="col-lg-1 col-md-1 text-right">
                    <span id="totalPagadoDevolucion" class="totalPagadoDevolucion"></span>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="modal-footer">
            <div class="col-lg-12 col-md-12 col-sm-12">
                <div class="pull-left"><?php $element = $form->getElement('agregarPagoDevolucion');echo $form->createOnlyElement($element);?></div>
                <?php $element = $form->getElement('guardarDevolucion');echo $form->createOnlyElement($element); /* Save devolucion */?>
                <?php $element = $form->getElement('cerrarDevolucion');echo $form->createOnlyElement($element);?>
            </div>
        </div>
    </div>           
    </div>
</div>