<!-- Modal -->
<div id="modalChooseReceiptOption" class="modal fade" data-keyboard="false" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog " 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('Selecciona opcion para recibo');?></h3>
        </div> 
        <div class="modal-body">   
            <input type="hidden" id="payment_with_cash" value="" />
            <div class='col-lg-12 col-md-12 col-sm-12'>
                <div class="col-lg-4 col-md-4 col-xs-12">
                    <div class="thumbnail text-center _receipt_email cursor_pointer">
                        <i class="fa fa-envelope fa-4x"></i>
                        <div class="caption">
                          <h5><?php echo $_translator->_getTranslation('Enviar a Email')?></h5>
                        </div>
                    </div>
                </div>
                <div class="col-lg-4 col-md-4 col-xs-12">
                    <div class="thumbnail text-center _receipt_print cursor_pointer">
                        <i class="fa fa-print fa-4x"></i>
                        <div class="caption">
                          <h5><?php echo $_translator->_getTranslation('Imprimir')?></h5>
                        </div>
                    </div>
                </div>
                <div class="col-lg-4 col-md-4 col-xs-12">
                    <div class="thumbnail text-center _receipt_print_email cursor_pointer">
                        <i class="fa fa-check-square fa-4x"></i>
                        <div class="caption">
                          <h5><?php echo $_translator->_getTranslation('Imprimir + Email')?></h5>
                        </div>
                    </div>
                </div>
                <div class='col-lg-12 col-md-12 col-sm-12 text-center'>
                    <a href="#" class="btn btn-default _receipt_none cursor_pointer"><?php echo $_translator->_getTranslation('Sin recibo')?></a>
                </div>
            </div>       
            <div class="clear"></div>
        </div>
    </div>           
    </div>
    <script>
        $('div._receipt_email').on('click',function(){            
            $('#modalChooseReceiptOption').modal('hide');
            if($('#payment_with_cash').val() == '1'){
                $('#payment_with_cash').val('');
                openCashRegister();
            }
            mailingTicketVenta($("#last_sale_id").val());
        });
        
        $('div._receipt_print').on('click',function(){            
            $('#modalChooseReceiptOption').modal('hide');
            printTicketVenta($("#last_sale_id").val());
        });
        
        
        $('div._receipt_print_email').on('click',function(){
            $('#modalChooseReceiptOption').modal('hide');
            printTicketVenta($("#last_sale_id").val());
            mailingTicketVenta($("#last_sale_id").val());
        });
        
        $('a._receipt_none').on('click',function(){            
            $('#modalChooseReceiptOption').modal('hide');
            $('body').css('padding-right','0px');
            if($('#payment_with_cash').val() == '1'){
                $('#payment_with_cash').val('');
                openCashRegister();
            }
        });
    </script>
</div>