$content = array(); //$content[] = "<a href='".HOST_PROJECT."/index/main/caymoc_detail/true/macaymoc/".$item['MaMoc']."/'>".$item['TenCayMoc']."</a>"; $content[] = "<a href='" . HOST_PROJECT . "/index/main/hopdong_detail/true/mahopdong/" . $id_hopdong . "/right/caymoc/macaymoc/" . $item['MaMoc'] . "/'>" . $item['TenCayMoc'] . "</a>"; // Lô Nhuộm if ($item['MaLoNhuom'] == null) { $content[] = '<button type="button" class="btn btn-success"><a class ="axem" href="' . HOST_PROJECT . "/index/nhaplieu/lonhuom/true/mamoc/" . $item['MaMoc'] . "/mahopdong/" . $this->param->getParam("mahopdong") . '\\">Tạo Lô Nhuộm</a></button>'; } else { $ln = new Model_Lonhuom(); $lonhuom = $ln->getWhere($item['MaLoNhuom']); //$content[] = "<a href='".HOST_PROJECT."/index/main/lonhuom_detail/true/malonhuom/".$lonhuom[0]['MaLoNhuom']."/'>".$lonhuom[0]['TenLoNhuom']."</a>"; $content[] = "<a href='" . HOST_PROJECT . "/index/main/hopdong_detail/true/mahopdong/" . $id_hopdong . "/right/lonhuom/malonhuom/" . $lonhuom[0]['MaLoNhuom'] . "/'>" . $lonhuom[0]['TenLoNhuom'] . "</a>"; // Cây Thành Phẩm if ($item['MaCTP'] == null) { $content[] = '<button type="button" class="btn btn-success"><a class ="axem" href="' . HOST_PROJECT . "/index/nhaplieu/caythanhpham/true/mamoc/" . $item['MaMoc'] . "/mahopdong/" . $this->param->getParam("mahopdong") . '\\">Tạo Cây Thành Phẩm</a>'; } else { $ctp = $data->getCayTP($item['MaCTP']); //$content[] = "<a href='".HOST_PROJECT."/index/main/ctp_detail/true/mactp/".$item['MaCTP']."/'>".$ctp[0]['TenCTP']."</a>"; $content[] = "<a href='" . HOST_PROJECT . "/index/main/hopdong_detail/true/mahopdong/" . $id_hopdong . "/right/caythanhpham/mactp/" . $item['MaCTP'] . "/'>" . $ctp[0]['TenCTP'] . "</a>"; if ($ctp[0]['MaKho'] == null) { $content[] = '<button type="button" class="btn btn-success"><a class ="axem" href="' . HOST_PROJECT . "/index/nhaplieu/chonkhohang/true/mactp/" . $ctp[0]['MaCTP'] . "/mahopdong/" . $this->param->getParam("mahopdong") . '\\">Chọn kho hàng</a></button>'; } else { $kho = new Model_Khohang(); $kho1 = $kho->getWhere($ctp[0]['MaKho']); //$content[] = "<a href='".HOST_PROJECT."/index/main/kho_detail/true/mactp/".$item['MaCTP']."/makho/".$kho1[0]['MaKho']."/'>".$kho1[0]['TenKho']."</a>"; $content[] = "<a href='" . HOST_PROJECT . "/index/main/hopdong_detail/true/mahopdong/" . $id_hopdong . "/right/khohang/mactp/" . $item['MaCTP'] . "/makho/" . $kho1[0]['MaKho'] . "/'>" . $kho1[0]['TenKho'] . "</a>"; if ($ctp[0]['MaDonXuat'] == null) { $content[] = '<button type="button" class="btn btn-success"><a class ="axem" href="' . HOST_PROJECT . "/index/nhaplieu/donxuat/true/mactp/" . $ctp[0]['MaCTP'] . "/mahopdong/" . $this->param->getParam("mahopdong") . '/">Tạo Đơn Xuất</a></button>'; } else { $dx = new Model_Donxuat(); $donxuat = $dx->getWhere($ctp[0]['MaDonXuat']); //$content[] = "<a href='".HOST_PROJECT."/index/main/donxuat_detail/true/madonxuat/".$donxuat[0]['MaDonXuat']."/'>".$donxuat[0]['TenDonXuat']."</a>";