<?php ini_set("display_errors", 0); require_once '../../../libraries/oop.php'; require_once '../../../libraries/phieunhap.php'; require_once '../../../libraries/chitietphieunhap.php'; $pn = new PhieuNhap(); $ct = new ChiTietPhieuNhap(); $id = $_GET['id']; $ct->set_idphieunhap($id); $ct->delete_allchitietinphieunhap(); $pn->set_idphieunhap($id); $pn->delete_phieunhap(); echo '14'; ?>
$a->set_idphieunhap($id); if (isset($_POST['xoa'])) { $a->delete_phieunhap(); dongcuaso(); exit; } $data = $a->getdata(); $ngaynhap = $data['NgayNhap']; $nam = substr($ngaynhap, 0, 4); $thang = substr($ngaynhap, 5, 2); $ngay = substr($ngaynhap, 8, 2); $ngaynhap = $ngay . '-' . $thang . '-' . $nam; $tongtien = $data['TongTien']; $ghichu = $data['GhiChu']; $chitiet = new ChiTietPhieuNhap(); $chitiet->set_idphieunhap($id); $data_chitiet = $chitiet->listchitietphieunhap(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Chi Tiết Phiếu Nhập</title> <script type="text/javascript" src="../../../libraries/ajax_nhaphang.js"></script> <link href="../../templates/default/style_admin.css" rel="stylesheet" type="text/css" /> </head> <body> <form action="chitiet.php?id=<?php echo $id;