slow2812 > 13-12-16, 07:15 PM
SELECT tblPhieuNhap.NgayNhap, tblPhieuNhap.spn, tblPhieuNhap.DienGiai, tblDanhMucHangHoa.TenHang, tblChiTietNhap.idHang, Nz(Format(tblChiTietNhap.SLN,"#,##0")) AS SoLuong, Nz(Format(tblChiTietNhap.DGN,"#,##0")) AS DonGia,Nz(Format(([SLN]*[DGN]),"#,##0")) AS ThanhTien,0 as No, Nz(Val([ThanhTien])) AS Co
FROM tblDanhMucHangHoa INNER JOIN (tblPhieuNhap INNER JOIN tblChiTietNhap ON tblPhieuNhap.spn = tblChiTietNhap.spn) ON tblDanhMucHangHoa.idHang = tblChiTietNhap.idHang
UNION ALL SELECT tblPhieuChi.NgayChungTu, tblPhieuChi.SoChungTu, tblPhieuChi.DienGiai,"" , "" ,"" ,"" ,"",Nz(Format(tblPhieuChi.SoTien,"#,##0")),""
FROM tblPhieuChi;
ongke0711 > 13-12-16, 07:44 PM