Пример #1
0
$diachi = $_POST['txtdiachi'];
$sodienthoai = $_POST['txtsodienthoai'];
$lydoxuatkho = $_POST['txtlydoxuatkho'];
$xuattaikho = $_POST['txtxuattaikho'];
$tongtien = $data[0]['TongTien'];
/////chen chitietphieuxuatvao
$chitietpx = new ChiTietPhieuXuat();
foreach ($datachitietdh as $datadh) {
    $chitietpx->set_idphieuxuat($so);
    $chitietpx->set_idhang($datadh['idHang']);
    $chitietpx->set_soluong($datadh['SoLuong']);
    $chitietpx->insert_chitietphieuxuat();
}
// them phieu xuat
if (isset($_POST['ok'])) {
    $phieuxuat = new PhieuXuat();
    $phieuxuat->set_idphieuxuat($so);
    $phieuxuat->set_ngayxuat($dat);
    $phieuxuat->set_bophan($bophan);
    $phieuxuat->set_no($no);
    $phieuxuat->set_co($co);
    $phieuxuat->set_nguoinhan($hoten);
    $phieuxuat->set_diachi($diachi);
    $phieuxuat->set_dienthoai($sodienthoai);
    $phieuxuat->set_lydoxuat($lydoxuatkho);
    $phieuxuat->set_xuattaikho($xuattaikho);
    $phieuxuat->set_tongtien($tongtien);
    $phieuxuat->insert_phieuxuat();
    dongcuaso();
    exit;
}
Пример #2
0
        	<td class=title width="100px">Mã Đơn</td>
            <td class=title width="100px">Bộ Phận</td>
            <td class=title width="70px">Ngày Xuất</td>
            <td class=title width="70px">Tổng Tiền</td>
            <td class=title width="80px">Người Nhận</td>
            <td class=title width="100px">Điện Thoại</td>
        	<td class=title width="100px">Địa điểm giao</td>
        	<td class=title width="100px">Ghi Chú</td>
            <td class=title width="50px">Xem Phiếu</td>
            <td class=title width="50px">Xóa</td>
            
                                                            
        </tr>
<?php 
$stt = 0;
$phieuxuat = new PhieuXuat();
$data_phieuxuat = $phieuxuat->listphieuxuat();
foreach ($data_phieuxuat as $item_phieuxuat) {
    $stt++;
    echo "<tr height='20px'>";
    echo "<td align=center width='50px'>{$stt}</td>";
    echo "<td align=center width='100px'>{$item_phieuxuat['idPhieuXuat']}</td>";
    echo "<td align=center width='100px'><textarea id='username{$stt}' readonly='readonly' cols='5' rows='2' disabled >{$item_phieuxuat['BoPhan']}</textarea></td>";
    echo "<td align=center width='70px'><input type='text' class='tim' id='ngayxuat{$stt}' value='{$item_phieuxuat['NgayXuat']}' size='7' disabled='disabled'/></td>";
    echo "<td align=center width='70px'><font style='font-weight:900; color:#FF0'>" . xulygia($item_phieuxuat['TongTien']) . "</font></td>";
    echo "<td align=center width='80px'><textarea id='nguoinhan{$stt}'  cols='7' rows='2' disabled='disabled' >{$item_phieuxuat['NguoiNhan']}</textarea></td>";
    echo "<td align=center width='100px'><input type='text' id='dienthoai{$stt}' value='{$item_phieuxuat['DienThoai']}' size='9' disabled='disabled' /></td>";
    echo "<td align=center width='100px'><textarea id='diadiemgiao{$stt}' cols='9' rows='2' disabled='disabled'>{$item_phieuxuat['DiaChi']}</textarea></td>";
    echo "<td align=center width='100px'><input type='text' id='ghichu{$stt}' value='";
    if ($item_donhang['GhiChu'] != "") {
        echo $item_donhang['GhiChu'];
<?php

require_once '../../../libraries/oop.php';
require_once '../../../libraries/phieuxuat.php';
require_once '../../../libraries/chitietphieuxuat.php';
require_once '../../../libraries/hanghoa.php';
require_once '../../../libraries/loaihang.php';
require_once '../../../libraries/function.php';
ini_set("display_errors", 0);
if (isset($_POST['dong'])) {
    dongcuaso();
    exit;
}
$id = $_GET['id'];
$phieuxuat = new PhieuXuat();
$phieuxuat->set_idphieuxuat($id);
$data_phieuxuat = $phieuxuat->getdata();
// lay cac bien
$bophan = $data_phieuxuat['BoPhan'];
$so = $id;
$no = $data_phieuxuat['No'];
$co = $data_phieuxuat['Co'];
$hoten = $data_phieuxuat['NguoiNhan'];
$diachi = $data_phieuxuat['DiaChi'];
$sodienthoai = $data_phieuxuat['DienThoai'];
$lydoxuatkho = $data_phieuxuat['LyDoXuat'];
$xuattaikho = $data_phieuxuat['XuatTaiKho'];
$tongtien = $data_phieuxuat['TongTien'];
/////
$ngaydat = date('d');
$thangdat = date('m');
Пример #4
0
<?php

ini_set("display_errors", 0);
require_once '../../../libraries/oop.php';
require_once '../../../libraries/phieuxuat.php';
require_once '../../../libraries/chitietphieuxuat.php';
$px = new PhieuXuat();
$ct = new ChiTietPhieuXuat();
$id = $_GET['id'];
$ct->set_idphieuxuat($id);
$ct->delete_allchitietinphieuxuat();
$px->set_idphieuxuat($id);
$px->delete_phieuxuat();
echo '19';
?>