<i class="icon-file"></i>Danh Sách Các Sách Trong Phiếu
                </h2>
                <div class="box-icon">
                    <a href="#" class="btn-minimize"><i class="icon-chevron-up"></i></a>
                </div>
            </div>
            <div class="box-content">
                <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper form-inline" role="grid">

                    <?php 
$IdPm = 0;
if (Session::has('message')) {
    echo "<p style='color:green;'>" . Session::get('message') . "</p>";
}
foreach ($dsPhieuMuon as $PhieuMuon) {
    $IdPm = General::getIdPhieuMuon($PhieuMuon->id);
}
?>
                    <input type="hidden" name="txtIdBorrowsDetail" id="txtIdBorrowsDetaiId" value="<?php 
echo $IdPm;
?>
"/>
                    <img  src="{{URL}}public/images/icon/documents.gif" name="" id="" value="" onclick="ThucHienIn('<?php 
echo URL;
?>
', document.getElementById('txtIdBorrowsDetaiId').value)" title="Thực hiện in"/>&nbsp;     
                    <form name="frmCheckPrint" method="post" action="<?php 
echo URL;
?>
mborrows/detailborrows">
                        <table class="table table-striped table-bordered bootstrap-datatable datatable dataTable" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
 public function destroydetailtemp()
 {
     $id = Input::get('txtIdPhieuMuon');
     $idPhieuMuon = General::getIdPhieuMuon($id);
     $result = false;
     try {
         $result = ChiTietPhieuMuonSach::find($id)->delete();
     } catch (Exception $ex) {
         $result = false;
     }
     return Redirect::back()->with('result', $result);
 }
@extends('layouts.print')
@section('content')
<?php 
$stt = 0;
$ms = 0;
$mp = 0;
foreach ($dsPhieuMuon as $PhieuMuon) {
    $ms = General::getMst($PhieuMuon->id_nguoi_muon);
    $mp = General::getMaPhieuMuon(General::getIdPhieuMuon($PhieuMuon->id));
}
?>
<button type="submit" name="txtIn" onclick="this.style.display = 'none';
        window.print();">In Trang Này</i></button>
<div style="text-align: center; margin: -15 0 0 0;" ><h2>DANH SÁCH CÁC SÁCH TRONG PHIẾU MƯỢN</h2></div>
<div style="text-align: center; margin: -15 0 0 0;" >(Kèm theo Thông tư số: 11/2013/ĐHCT ngày 25 tháng 11 năm 2013</div>
<div style="text-align: center;" > của Thư viện Khoa Công nghệ Thông tin và Truyền thông)</div>
<div class="line"></div>
<table class="table" width='100%' >
<?php 
echo "<tr>" . "<td>" . "Mã Phiếu: " . "</td>" . "<td>" . $mp . "</td>" . "<td>" . "Thời gian in: " . "</td>" . "<td>" . date('H:i:s d/m/Y', time()) . "</td>" . "</tr>";
echo "<tr>" . "<td>" . "Người Mượn: " . "</td>" . "<td>" . General::getHoten($ms) . "(" . $ms . ")" . "</td>" . "<td>" . "Đơn vị: " . "</td>" . "<td>" . General::getDonVi($ms) . "</td>" . "</tr>";
echo "<tr>" . "<td>" . "Email: " . "</td>" . "<td>" . General::getEmail($ms) . "</td>" . "<td>" . "Điện thoại: " . "</td>" . "<td>" . General::getSDT($ms) . "</td>" . "</tr>";
?>
</table>
<table cellspacing="0" cellspadding="0" width="100%" border="0" style="border-top: 1px solid #ccc">
    <tr align="center" style="font-weight: bold">
        <td width="5%" style="border-left: 1px solid #ccc;border-bottom: 1px solid #ccc">STT</td>
        <td width="10%" style="border-left: 1px solid #ccc;border-bottom: 1px solid #ccc">Mã BarCode</td>
        <td width="35%" style="border-left: 1px solid #ccc;border-bottom: 1px solid #ccc">Tên Đầu Sách</td>
        <td width="10%" style="border-left: 1px solid #ccc;border-bottom: 1px solid #ccc">Thời Gian Mượn</td>
        <td width="10%" style="border-left: 1px solid #ccc;border-bottom: 1px solid #ccc">Thời Gian Hẹn Trả</td>
                        <input type="text" class="form-control" placeholder="Thời gian mượn" name="txtThoiGianMuon" id="txtThoiGianMuonId" value="<?php 
    echo date('d/m/Y', strtotime($Phieu->thoi_gian_muon));
    ?>
" readonly/>
                    </div>
                    <div class="input-group">
                        <span class="input-group-addon">Thời Gian Hẹn Trả:</span>
                        <input type="date" class="form-control" placeholder="Thời gian hẹn trả" name="txtThoiGianHenTra" id="txtThoiGianHenTraId" value="<?php 
    echo $Phieu->thoi_gian_hen_tra;
    ?>
" 
                               min="<?php 
    echo date("Y-m-d", strtotime($Phieu->thoi_gian_hen_tra));
    ?>
" <?php 
    if (General::getIdQuyenHan(General::getIdNguoiMuon(General::getIdPhieuMuon($Phieu->id))) == 4) {
        ?>
 max="<?php 
        echo date("Y-m-d", strtotime($Phieu->thoi_gian_hen_tra) + 86400 * SO_NGAY_MUON_SV);
        ?>
" <?php 
    } else {
        ?>
 max="<?php 
        echo date("Y-m-d", strtotime($Phieu->thoi_gian_hen_tra) + 86400 * SO_NGAY_MUON_CB);
        ?>
" <?php 
    }
    ?>
/>
                    </div>