# 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

```sql
// 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%'
```

```sql
// 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
```

```sql
// 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
```

```sql
// Kho
update taikhoan 
set chitiettheo=chitiettheo+ (case when chitiettheo<>'' then ',Kho#1,SanPham#1' else 'Kho#1,SanPham#1' end)
, chitiettheotext = chitiettheotext 
+ (case when chitiettheotext<>'' then N', Kho<Bắt buộc>, Sản phẩm<Bắt buộc>' else  N'Kho<Bắt buộc>, Sản phẩm<Bắt buộc>' end)
, modidate=getdate()
where ma like '15%' and ma not like '154%' and CHARINDEX(N'sanpham',chitiettheo)=0
```

```sql
// Tài sản
update taikhoan 
set chitiettheo=chitiettheo+ (case when chitiettheo<>'' then ',TaiSan#1' else 'TaiSan#1' end)
, chitiettheotext = chitiettheotext 
+ (case when chitiettheotext<>'' then N', Tài sản<Bắt buộc>' else  N'Tài sản<Bắt buộc>' end)
, modidate=getdate()
where ma like '21%' and CHARINDEX(N'taisan',chitiettheo)=0
```

```sql
// phân bổ
update taikhoan 
set chitiettheo=chitiettheo+ (case when chitiettheo<>'' then ',PhanBo#1' else 'PhanBo#1' end)
, chitiettheotext = chitiettheotext 
+ (case when chitiettheotext<>'' then N', Chi phí chờ phân bổ<Bắt buộc>' else  N'Chi phí chờ phân bổ<Bắt buộc>' end)
, modidate=getdate()
where ma like '242%' and CHARINDEX(N'phanbo',chitiettheo)=0
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kythuat.dtechvn.com/danh-muc/update-chitiettheo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
