GIỚI THIỆU CÁC CHỨC NĂNG CHƯƠNG TRèNH

Một phần của tài liệu Thiết kế hệ thống thông kế toán chi tiết vật tư tại công ty cổ phần BA AN (Trang 71)

Chương trỡnh được thiết kế nhằm thực hiện cỏc chức năng sau: - Chức năng quản lớ người dựng:

+ Với bất kỡ người dựng nào của hệ thống đều cú thể đăng nhập và thay đổi mật khẩu của mỡnh

+ Ngoài ra, với người quản trị cú thể thờm, xoỏ, cập nhật thụng tin của người dựng.

+ Hệ thống đó phõn quyền ở một mức nhất định thụng qua hệ thống thực đơn.

- Quản lớ cỏc danh mục: Cú thể thờm mới, sửa đổi thụng tin, xoỏ một bản ghi trong cơ sở dữ liệu; và cú thể xem thụng tin theo loại.

- Quản lớ việc Nhập - xuất kho: Cập nhật cỏc phiếu Xuất và nhập kho. Cho phộp xem tồn kho của một loại vật tư bất kỡ.

- Hạch toỏn chi tiết vật tư:

+ Cú thể tạo ra cỏc sổ chi tiết vật tư

+ Tổng hợp tỡnh hỡnh Nhập - xuất - tồn của từng loại vật tư, lập bảng kờ Nhập - xuất - tồn.

+ Lập cỏc bỏo cỏo: Cú thể lập cỏc bỏo cỏo một cỏch nhanh nhất, ngay khi cú yờu cầu bỏo cỏo.

Do việc dựng chung cơ sở dữ liệu nờn phũng kế toỏn sẽ cập nhật được thụng tin nhập, xuất và tồn vật tư một cỏch nhanh nhất, giảm được một phần cụng việc trựng lặp giữa thủ kho và kế toỏn.

Trong điều kiện thời gian khụng cho phộp, đồ ỏn đó thực hiện được một số module sau:

+ Xử lớ cập nhật cỏc danh mục, bao gồm: thờm mới, sửa, xoỏ. + Xử lớ nhập phiếu nhập, phiếu xuất

KẾT LUẬN

Vật tư với ý nghĩa là yếu tố đầu vào then chốt khụng thể thiếu trong mọi quy trỡnh sản xuất của cỏc doanh nghiệp sản xuất. Do đú quản lý tốt vật tư là vấn đề đặt ra đối với tất cả cỏc doanh nghiệp. Thụng qua quỏ trỡnh khảo sỏt kế toỏn vật tư tại Cụng ty cổ phần Ba An vấn đề đặt ra với hệ thống này cần được khắc phục trong thời gian sớm nhất nhằm nõng cao chất lượng quản lý của doanh nghiệp.

Một hệ thống thụng tin kế toỏn vật tư cần được xõy dựng hoàn thiện sao cho đảm bảo quản lý tốt quy trỡnh sản xuất tạo điều kiện hạch toỏn chi phớ nguyờn vật liệu trực tiếp. Đồng thời tạo ra một cơ chế người dựng hệ thống một cỏch nhanh chúng tiện lợi để đạt được mục tiờu hoạt động của hệ thống.

Sự phỏt triển của một hệ thống thụng tin núi chung, của hệ thống thụng tin kế toỏn vật tư núi riờng chỉ cú thể đạt hiệu quả dựa trờn việc thực hiện đỳng chớnh sỏch về kế toỏn, phản ỏnh được tỡnh hỡnh thực tế của doanh nghiệp. Do đú việc phõn tớch thiết kế hệ thống thụng tin về kế toỏn vật tư phải đảm bảo phự hợp với chế độ kế toỏn của doanh nghiệp và tỡnh hỡnh thực tế hoạt động của doanh nghiệp.

Mặc dự em đó cố gắng rất nhiều nhưng do điều kiện về thời gian cũng như trỡnh độ của bản thõn cũn hạn chế nờn đề tài này vẫn chưa thể đỏp ứng được toàn bộ cỏc chức năng mà yờu cầu đặt ra. Tuy nhiờn, với những phõn tớch và kết quả đạt được, đồ ỏn đó ớt nhiều hỗ trợ cho hoạt động của Cụng ty Cổ phần Ba An. Tuy đề tài chưa thật hoàn chỉnh nhưng những gỡ đạt được đó đem lại cho em một số hiểu biết nhất định, hỗ trợ cho việc phỏt triển tiếp nghiờn cứu này.

Một lần nữa, em xin chõn thành cảm ơn Thạc sỹ Vũ Bỏ Anh cựng toàn thể cỏc thầy cụ giỏo bộ mụn đó giỳp em thực hiện đề tài nghiờn cứu của mỡnh.

SinhViờn

TÀI LIỆU THAM KHẢO

[1] Vũ Bỏ Anh. Bài giảng gốc Cơ sở dữ liệu (Học phần 2). Hà Nội, 2008. [2] - Nguyễn Văn Vỵ - Phõn tớch thiết kế hệ thống thụng tin quản lý. Nhà xuất bản khoa học tự nhiờn và cụng nghệ Hà Nội , 2007.

[3] – Nguyễn Ngọc Minh (chủ biờn), Nguyễn Đỡnh Tễ - Sử dụng và khai thỏc Microsoft Visual Foxpro 6.0 – Nhà xuất bản Lao động – Xó hội, 2003.

[4] –Vũ Nhật Minh–Thực hành lập trỡnh Microsoft Visual FoxproFoxpro 9.0 – Nhà xuất bản Giao thụng vận tải.

[5] – PGS.TS Ngụ Thế Chi – TS Trương Thị Thuỷ - Giỏo trỡnh kế toỏn Tài chớnh - Học viện tài chớnh. Nhà xuất bản Tài chớnh – Hà Nội , 2007.

PHỤ LỤC

1. Main Program CLOSE ALL

CLOSE DATABASES ALL

SET DEFAULT TO d:\QLVT_DATN

SET DATE TO french

SET SAFETY OFF Set Date french Set Century On Set Notify Off Set Talk Off Set Deleted On Set Safety Off Set Exact Off Set Null Off (adsbygoogle = window.adsbygoogle || []).push({});

SET SYSMENU OFF SET STATUS BAR OFF SET TALK OFF

SET UDFPARMS ON WITH _SCREEN .VISIBLE=.f. .WINDOWSTATE=2 ENDWITH PUBLIC _ton_dau_ki STORE 0 TO _ton_dau_ki

DO FORM form\dangnhap

READ EVENTS

2. Form đăng nhập.

Sự kiện Click của commandbuttom “đăng nhập” SELECT nguoidung

LOCATE FOR

ALLTRIM(ten_dangnhap)==ALLTRIM(thisform.txtten_dn.value) .AND. ALLTRIM(mat_khau)==ALLTRIM(thisform.txt_mk.value)

IF !FOUND() THEN

MESSAGEBOX(" Đăng nhập sai. Đăng nhập lại")

RETURN ELSE m.ten=ten_dangnhap m.quyen=quyen SELECT nguoidung USE

=MESSAGEBOX([Xin Chào ] +thisform.txtten_dn.value,4096,[Hân hạnh chàođón],1000)

thisform.Release

DO FORM form\form_chinh.scx

ENDIF

Form cập nhật người dựng Procedure them.click

IF EMPTY(thisform.text1.Value) .and. EMPTY(thisform.text2.Value).and. EMPTY(thisform.text4.Value)

=MESSAGEBOX("Hãy điền đầy đủ thông tin cho ngời dùng !",0+16) ELSE

IF EMPTY(thisform.text2.Value)

=MESSAGEBOX(" Mật khẩu còn trống. Nhập mật khẩu vào !",0+16) ELSE

IF EMPTY(thisform.combo1.Value)

IF EMPTY(thisform.text4.Value)

=MESSAGEBOX("haỹ gán chức vụ cho ngời dùng!",1+16) else

SELECT nguoidung

LOCATE FOR

UPPER(ten_dangnhap)=UPPER(ALLTRIM(thisform.text1.Value))

IF FOUND()

=MESSAGEBOX("Ngời dùng này đã tồn tại !",0+16) ELSE

APPEND BLANK

REPLACE ten_dangnhap WITH thisform.text1.Value,mat_khau WITH (adsbygoogle = window.adsbygoogle || []).push({});

thisform.text2.Value, quyen WITH thisform.combo1.value,chuc_vu WITH

thisform.text4.value

=MESSAGEBOX("cập nhật thành công !",0,32) thisform.text1.Value=""

thisform.text2.Value="" thisform.combo1.Value="" thisform.text4.Value="" endif endif endif ENDIF ENDIF thisform.Refresh Procedure sua.click IF (this.Caption="Sửa")

q=MESSAGEBOX("Bạn muốn sửa thông tin?",1+32) IF q=1

thisform.them.Caption="cập nhật"

SELECT nguoidung

thisform.text2.Value=nguoidung.mat_khau

thisform.combo1.Value=nguoidung.quyen

thisform.text4.Value=nguoidung.chuc_vu

SELECT nguoidung SET DELETED ON DELETE ENDIF ENDIF Procedure xoa.click #define msgbox_yes 6 #define c_msgbox1 36

#define c_thongbao "Có chắc chắn xoá bản ghi này ko?

IF MESSAGEBOX(c_thongbao,c_msgbox1,"Chú ý")=msgbox_yes

DELETE IF !EOF() SKIP 1 IF EOF() GO bott ELSE SKIP 1 IF EOF() GO bott ELSE SKIP -1 ENDIF ENDIF ENDIF thisform.Refresh endif

Procedure them.click

IF (this.Caption="Thêm") thisform.ma_vt.Enabled= .T. thisform.ten_vt.Enabled= .T. thisform.ma_loaivt.Enabled= .T. thisform.text1.enabled=.t.

thisform.dvt.Enabled= .T. thisform.ma_vt.Value="" thisform.ten_vt.Value="" thisform.ma_loaivt.Value="" thisform.text1.Value="" thisform.dvt.Value="" this.Caption="Lu"

thisform.thoat.Caption="Cancel" thisform.Sua.Enabled= .F.

thisform.Xoa.Enabled= .F. thisform.ma_vt.SetFocus ELSE

IF

(EMPTY(thisform.ma_vt.Value).or.EMPTY(thisform.ten_vt.Value).or.EMPTY(thi sform.ma_loaivt.Value))

MESSAGEBOX("Thụng tin điền thiếu hoặc sai.Bạn hóy điền lại!!",0+16)

thisform.ma_vt.setfocus

ELSE

SELECT vat_tu

LOCATE FOR

ALLTRIM(UPPER(ma_vt))==ALLTRIM(UPPER(thisform.ma_vt.Value))

IF FOUND()

Ok=MESSAGEBOX("Đó cú mó này!!!Bạn cú muốn sửa khụng?",1+32) IF (Ok=1)

THISFORM.ten_vt.Value=vat_tu.ten_vt thisform.ma_loaivt.Value=vat_tu.ma_loaivt thisform.text1.Value=loaivt.ten_loaivt thisform.dvT.Value=vat_tu.dvt (adsbygoogle = window.adsbygoogle || []).push({});

thisform.Sua.Caption="Lu" thisform.Sua.Enabled= .T. thisform.them.Enabled= .F. thisform.Xoa.Enabled= .F. thisform.thoat.Caption="Cancel" thisform.them.caption="Thêm" skip

THISFORM.Refresh

ELSE

THISFORM.ma_vt.Value="" THISFORM.ten_vt.Value="" thisform.ma_loaivt.Value="" thisform.text1.Value="" thisform.dvt.Value=""

thisform.ma_vt.Enabled= .F. thisform.ten_vt.Enabled= .F. thisform.ma_loaivt.Enabled= .F. thisform.text1.Enabled= .F. thisform.dvt.Enabled= .F. thisform.Sua.Caption="Sửa" thisform.Sua.Enabled= .T. thisform.them.Enabled= .T. thisform.Xoa.Enabled= .T. thisform.thoat.Caption="Thoát" thisform.them.Caption="Thêm"

ELSE

APPEND BLANK

replace ma_vt WITH UPPER(thisform.ma_vt.Value)

replace ten_vt WITH ALLTRIM(thisform.ten_vt.Value)

replace ma_loaivt WITH ALLTRIM(thisform.ma_loaivt.Value)

replace dvt WITH ALLTRIM(thisform.dvt.Value)

MESSAGEBOX("Thờm Thành Cụng ",0+32,"Thành Cụng",120) thisform.ma_vt.Value=""

thisform.ten_vt.Value="" thisform.ma_loaivt.Value="" thisform.text1.Value="" thisform.dvt.Value=""

thisform.ma_vt.Enabled= .F. thisform.ten_vt.Enabled= .F. thisform.ma_loaivt.Enabled=.F. thisform.text1.enabled=.f. thisform.dvt.Enabled= .F.

thisform.Sua.Enabled= .T. thisform.Xoa.Enabled= .T.

thisform.Thoat.Caption="Cancel" this.Caption="Thêm"

thisform.them.Enabled= .T. thisform.grid1.Refresh

thisform.Refresh ENDIF ENDIF ENDIF Procedure sua.click

IF this.Caption ="Sửa"

thisform.ma_vt.Value=vat_tu.ma_vt thisform.ten_vt.Value=vat_tu.ten_vt

thisform.ma_loaivt.Value=vat_tu.ma_loaivt THISform.text1.Value=loaivt.ten_loaivt thisform.dvt.Value=vat_tu.dvt

this.Caption ="Lu"

thisform.grid1.Enabled= .F. thisform.them.Enabled= .F. thisform.them.Caption=" Thêm" thisform.Xoa.Enabled= .F. thisform.thoat.Caption="Cancel" thisform.ma_vt.Enabled= .T. thisform.ten_vt.Enabled= .T. thisform.ma_loaivt.Enabled=.T. thisform.text1.Enabled= .T. thisform.dvt.Enabled= .T. ELSE

replace ma_vt WITH UPPER(thisform.ma_vt.Value ) replace ten_vt WITH thisform.ten_vt.Value

replace ma_loaivt WITH thisform.ma_loaivt.value replace ten_loaivt WITH thisform.text1.value replace dvt WITH thisform.dvt.value

thisform.grid1.Enabled= .T. thisform.them.Enabled= .T.

thisform.Xoa.Enabled= .T. thisform.thoat.Caption="Thoát" THISFORM.THEM.Caption="Thêm" this.Caption = "Sửa"

thisform.ten_vt.Value="" thisform.ma_loaivt.Value="" thisform.text1.Value="" thisform.dvt.Value=""

thisform.ma_vt.Enabled= .F. thisform.ten_vt.Enabled= .F. thisform.ma_loaivt.Enabled=.F. thisform.text1.Enabled= .F. thisform.dvt.Enabled= .F. ENDIF (adsbygoogle = window.adsbygoogle || []).push({});

thisform.Refresh Procedure xoa.click IF EOF()

MESSAGEBOX("Khụng cú bản ghi nào") RETURN

ENDIF

IF MESSAGEBOX("Bạn cú muốn xúa khụng",4+32)=7 thisform.ma_vt.Value=""

thisform.ten_vt.Value="" thisform.ma_loaivt.Value="" thisform.text1.Value="" thisform.dvt.Value="" thisform.grid1.Enabled= .F. thisform.them.Enabled= .T. thisform.Xoa.Enabled= .T. thisform.ma_vt.Enabled= .F. thisform.ten_vt.Enabled= .F. thisform.ma_loaivt.Enabled=.F. thisform.text1.Enabled= .F. thisform.dvt.Enabled= .F. RETURN

ENDIF

SELECT vat_tu

SET DELETED ON DELETE

GO TOP

THISFORM.them.Enabled=.T.

thisform.sua.Enabled=.t. thisform.Refresh

Procedure thoat.click IF this.Caption="Cancel" thisform.grid1.Enabled= .T. thisform.them.Enabled= .T. thisform.Xoa.Enabled= .T. thisform.Sua.Enabled = .T. thisform.them.Caption="Thêm" thisform.Sua.Caption="Sửa" thisform.Xoa.Caption="Xoá" thisform.ma_vt.Enabled= .F. thisform.ten_vt.Enabled= .F. thisform.ma_loaivt.Enabled= .F. thisform.text1.Enabled= .F. thisform.dvt.Enabled= .F. thisform.ma_vt.Value="" thisform.ten_vt.Value="" thisform.ma_loaivt.Value="" thisform.text1.Value="" thisform.dvt.Value="" this.Caption="Thoát" thisform.Refresh

thisform.Release ENDIF

4. Form phiếu nhập Sự kiện init của form.

SELECT kho

SELECT dongphieunhap

CREATE TABLE temp_pn FREE (so_phieu character(10),ma_vt

character(8),ten_vt character(20),dvt character(10),so_luong float(10,2),don_gia float(10,2),thanhtien float(15,2))

SELECT temp_pn

thisform.grid1.RecordSource="temp_pn" thisform.grid1.ColumnCount=6

thisform.grid1.column1.ControlSource="temp_pn.ma_vt" thisform.grid1.column2.ControlSource="temp_pn.ten_vt" thisform.grid1.column3.ControlSource="temp_pn.dvt" thisform.grid1.column4.ControlSource="temp_pn.so_luong" thisform.grid1.column5.ControlSource="temp_pn.don_gia" thisform.grid1.column6.ControlSource="temp_pn.thanhtien" *---Header trong Grid1---*

thisform.grid1.column1.header1.caption="Mã vật t"

thisform.grid1.column2.header1.caption="Tên vật t"

thisform.grid1.column3.header1.caption="Đơn vị tính" thisform.grid1.column4.header1.caption="Số lợng" thisform.grid1.column5.header1.caption="Đơn giáá" thisform.grid1.column6.header1.caption="Số tiền" Sự kiện load của form

CLOSE ALL SET safety off

USE bang\vat_tu IN 1

USE bang\dongphieunhap IN 2 USE bang\nhacungcap IN 3

USE bang\kho IN 4 ALIAS kho USE bang\taikhoan IN 5

USE temp_pn IN 6

USE bang\phieunhap IN 7 Procedure moi.click thisform.combo3.Value="" thisform.txt_tennhacc.Value="" thisform.txt_diachi.Value="" thisform.txt_diengiai.Value="" thisform.combo1.value="" thisform.txt_tenkho.Value="" thisform.txt_sophieu.Value="" thisform.txt_tkno.Value="" thisform.txt_tkco.Value="" thisform.txt_tentkno.Value="" thisform.txt_tentkco.Value="" thisform.txt_ngayp.Value="" thisform.combo2.Value="" thisform.txt_tongtien.Value="" thisform.txt_thue.Value="" thisform.txt_thanhtoan.Value="" (adsbygoogle = window.adsbygoogle || []).push({});

SELECT temp_pn

zap

thisform.grid1.Refresh thisform.combo3.SetFocus Procedure themdong.click

SELECT temp_pn

APPEND BLANK thisform.grid1.Refresh Procedure luu.click

_so_phieu= ALLTRIM(thisform.txt_sophieu.Value)

LOCATE for ALLTRIM(so_phieu)=_so_phieu

IF FOUND()

MESSAGEBOX("Số phiếu này đã tồn tại,mời nhập lại,0") ELSE

DELETE FOR EMPTY(so_phieu)

SET DELETED on delete

APPEND BLANK

replace ma_nhacc WITH ALLTRIM(thisform.combo3.Value)

replace li_do WITH ALLTRIM(thisform.txt_diengiai.Value)

replace ma_kho WITH ALLTRIM(thisform.combo1.Value)

replace tk_no WITH ALLTRIM(thisform.txt_tkno.value) replace tk_co WITH ALLTRIM(thisform.txt_tkco.Value) replace ngay_phieu WITH thisform.txt_ngayp.value

replace so_phieu WITH ALLTRIM(thisform.txt_sophieu.Value) replace so_tien WITH thisform.txt_tongtien.value

SELECT 6

GO top

DO WHILE NOT EOF()

STORE "" TO _ma_vt,_ten_vt,_dvt,_so_luong,_don_gia _ma_vt=ma_vt _ten_vt=ten_vt _dvt=dvt _so_luong=so_luong _don_gia=don_gia INSERT INTO bang\dongphieunhap(so_phieu,ma_vt,ten_vt,dvt,so_luong,don_gia); VALUES (thisform.txt_sophieu.value,_ma_vt,_ten_vt,_dvt,_so_luong,_don_gia)

SKIP ENDDO ENDIF

SELECT 2

DELETE FOR EMPTY(ma_vt)

SET DELETED on delete

thisform.refresh

thisform.combo3.Value="" thisform.txt_tennhacc.Value="" thisform.txt_diengiai.Value="" thisform.combo1.value="" thisform.txt_tenkho.Value="" thisform.txt_sophieu.Value="" thisform.txt_tkno.Value="" thisform.txt_tkco.Value="" thisform.txt_tentkno.Value="" thisform.txt_tentkco.Value=""

thisform.txt_ngayp.Value=CTOD("") thisform.combo2.Value=""

thisform.txt_tongtien.Value=0 thisform.txt_thue.Value=0 thisform.txt_thanhtoan.Value=0 thisform.combo3.SetFocus Procedure in.click

REPORT FORM bao_cao\phieunhap PREVIEW FOR (adsbygoogle = window.adsbygoogle || []).push({});

Một phần của tài liệu Thiết kế hệ thống thông kế toán chi tiết vật tư tại công ty cổ phần BA AN (Trang 71)