UPDATE CHITIETTHEO

  • update nhanh tài khoản cần quản lý chi tiết theo.

  • Ví dụ: Tài khoản 641 cần quản lý theo khoản mục

// Some code
update taikhoan 
set chitiettheo=chitiettheo+ (case when chitiettheo<>'' then ',KhoanMuc#1' else 'KhoanMuc#1' end)
, chitiettheotext = chitiettheotext + (case when chitiettheotext<>'' then N', Khoản mục<Bắt buộc>' else  N'Khoản mục<Bắt buộc>' end)
, modidate=getdate()
where ma like '64%'
// khách hàng
update taikhoan 
set chitiettheo=chitiettheo+ (case when chitiettheo<>'' then ',KhachHang#1' else 'KhachHang#1' end)
, chitiettheotext = chitiettheotext 
+ (case when chitiettheotext<>'' then N', Đối tượng công nợ<Bắt buộc>' else  N'Đối tượng công nợ<Bắt buộc>' end)
, modidate=getdate()
where ma like '131%' and CHARINDEX(N'khachhang',chitiettheo)=0
// ngân hàng
update taikhoan 
set chitiettheo=chitiettheo+ (case when chitiettheo<>'' then ',BankAccount#1' else 'BankAccount#1' end)
, chitiettheotext = chitiettheotext 
+ (case when chitiettheotext<>'' then N', Ngân hàng<Bắt buộc>' else  N'Ngân hàng<Bắt buộc>' end)
, modidate=getdate()
where ma like '112%' and CHARINDEX(N'BankAccount',chitiettheo)=0

Last updated