Skip to main content

Tab Hợp đồng

CTDA Hợp đồng

 

Target release

Hợp đồng

Epic

Hợp đồng

Document status

 

Document owner

 

Designer

 

Tech lead

 

Technical writers

 

QA

 

 

 

Requirements
  • Màn List Hợp Đồng

      • Web - Tab Hợp đồng

 

 

image.png

 

 

 

  • Màn tạo/sửa hợp đồng

 

 

image.png

 

  • Danh sách sản phẩm

 

image.png

 

  • Tiến độ thanh toán

 

image.png
image.png

 

 

  • Tải file
image.png
image.png

 

  • Từ điển
ConstructionContract Tên tiếng việt Tên tiếng anh Kiểu dữ liệu    

id Id bigint    
Hợp đồng mã hợp đồng Code nvarchar(50)    
  tên hợp đồng Name nvarchar(50)    
  loại hợp đồng ContractTypeId bigint ConstructionContractType  
  người tạo CreatorId bigint AppUser  
  khách hàng CustomerId bigint Customer  
  đơn vị tiền tệ CurrencyId bigint Currency  
  tổng giá trị TotalValue decimal    
  tổng phụ SubTotal decimal    
  ngày có hiệu lực ValidityDate datetime?    
  ngày hết hiệu ExpirationDate datetime?    
  trạng thái ContractStatusId bigint ConstructionContractStatus  
  trạng thái thanh toán PaymentStatus bigint PaymentStatus  
  Quốc gia xuất hóa đơn InvoiceNationId bigint? Nation  
  Tỉnh xuất hóa đơn InvoiceProvinceId bigint? ProvinceId  
  Quận xuất hóa đơn InvoiceDistrictId bigint? District  
  Phường xuất hóa đơn InvoiceWardId bigint? Ward  
  Mã bưu điện InvoiceZipCode nvarchar(50)?    
  ngày tạo CreatedAt datetime    
  ngày cập nhật UpdatedAt datetime?    
  ngày xóa DeletedAt datetime?    
  đơn vị vận chuyển DeliveryUnit nvarchar(50)    
  địa chỉ giao hàng ReceiveAddress nvarchar(500)    
  quốc giá giao hàng ReceiveNationId bigint Nation  
  thành phố giao hàng ReceiveProvinceId bigint ProvinceId  
  quận huyện giao hàng ReceiveDistrictId bigint District  
  xã giao hàng ReceiveWardId bigint Ward  
  mã bưu diện gia hàng ReceiveZipCode bigint    
  Id sửa giá EditedPriceStatusId bigitn EditedPriceStatus  
  tỉ giá gốc FromCurrencyId bigint Currency  
  tỉ giá chuyển đổi ToCurrencyId bigint Currency  
  tỉ giá ExchangeRate bigint ExchangeRate  
  tỷ lệ chiết khấu GeneralDiscountPercentage decimal(18,4)    
  tổng giá chiết khấu GeneralDiscountAmount decimal(18,4)    
  tổng giá thuế khác TotalTaxAmountOther decimal(18,4)    
  tổng giá thuế VAT TotalTaxAmount decimal(18,4)    
  tỉ giá chuyển đổi phụ ExchangeSubTotal decimal(18,4)    
  tổng giá chiết khấu khi chuyển ExchangeGeneralDiscountAmount decimal(18,4)    
  tổng giá vat khi chuyển ExchangeTotalTaxAmountOther decimal(18,4)    
  tổng giá thuế khác khi chuyển ExchangeTotalTaxAmountOther decimal(18,4)    
  tổng giá khi chuyển ExchangeTotal decimal(18,4)    
           
  tổng giá Total decimal(18,4)    
  điều khoản TermAndCondition nvarchar(4000)  

 

 

ConstrcutionContractFileGrouping Id Id bigint    
  Tiêu đề Title nvarchar(500)    
  Người tạo CreatorId bigint AppUser  
  Loại file FileTypeId bigint FileType  
  Hợp đồng ConstructionContractId bigint ConstructionContract  
  Ngày tạo CreatedAt datetime    
  Ngày cập nhật UpdatedAt datetime?    
  Ngày xóa DeletedAt datetime?  

 

 

ConstructionContractFileMapping File hợp đồng ConstrcutionContractFileGroupingId bigint ConstrcutionContractFileGrouping  
  Tệp tin FileId bigint ConstructionContractFile  
         

 

ConstructionItemDetail Id Id bigint    
  id hợp đồng ConstructionContractId bigint ConstructionContrac  
  id item dự án ConstructionItemId bigint ConstructionItem  
  id đơn vị đo gốc UnitOfMeasureId bigint UnitOfMeasure  
  id đơn vị đo chính PrimaryUnitOfMeasureId bigint UnitOfMeasure  
  giá gốc PrimaryPrice decimal(18,4)    
  giá bán SalePrice decimal(18,4)
 
  số lượng Quantity decimal(18,4)    
  tỷ lệ chiết khấu DiscountPercentage decimal(18,4)    
  giá dc chiết khấu DiscountAmount decimal(18,4)    
  tỷ lệ sau khi chiết khấu GeneralDiscountPercentage decimall(18,4)    
  giá khi chiết khấu GeneralDiscountAmount decimal(18,4)    
  tỉ lệ thuế VAT TaxPercentage decimal(18,4)    
  giá thuế VAT TaxAmount decimal(18,4)    
  tỷ lêh thuế khác TaxPercentageOther decimal(18,4)    
  giá thuế khác TaxAmountOther decimal(18,4)    
  tổng giá TotalPrice decimal(18,4)    
  giá gốc khi chuyển đổi ExchangePrimaryPrice decimal(18,4)    
  giá bán khi chuyển đổi ExchangeSalePrice decimal(18,4)    
  tỉ lệ chiết khấu khi chuyển đổi ExchangeDiscountAmount decimal(18,4)    
  giá dc chiết khấu chuyển đổi ExchangeGeneralDiscountAmount decimal(18,4)    
  tỷ lệ thuế sau khi chuyển đổi ExchangeTaxAmount decimal(18,4)    
  tỷ lệ thuế khác sau khi chuyển đổi ExchangeTaxAmountOther decimal(18,4)    
  id loại thuế TaxTypeId bigint TaxType  
  Id sửa giá EditedPriceStatusId bigint EditedPriceStatus  
  tổng giá sau khi chuyển đổi ExchangeTotalPrice decimal(18,4)    
  ngày tạo CreatedAt datetime    
  ngày sửa UpdateAt datetime    
  ngày xóa DeletedAt datetime  
PaymentType Id Id bigint  
phương thức thanh toán Mã pt thanh toán Code nvarchar(250)  
  Tên pt thanh toán Name nvarchar(250)  
         
  Ngày tạo CreatedAt datetime  
  Ngày sửa UpdatedAt datetime  
  Ngày Xóa DeletedAt datetime  
  Trạng thái StatusId bigint Status
ConstructionPaymentHistory Id Code nvarchar(250)  
lịch sử thanh toán id hợp đồng ConstructionContractId bigint ConstructionContract
  mốc tahnh toán PaymentMilestone nvarchar(4000)  
  % đã thanh toán PaymentPercentage? decimal(18,4)  
  số tiền đã thanh toán PaymentAmount? decimal(18,4)  
  số tiền đã thanh toán khi chuyển đổii ExchangePaymentAmount? decimal(18,4)  
  pt thanh toán PaymentTypeId bigint PaymentType
  ghi chú Description nvarchar(4000)  
  đã thanh toán IsPaid? bit  
  Ngày tạo CreatedAt datetime  
  Ngày sửa UpdatedAt datetime  
  Ngày Xóa DeletedAt datetime  
       

 

  • List API Web
Tên API Chức năng Dữ liệu vào Payload Dữ liệu ra Note
rpc/crm/construction-contract/count Đếm số lượng hợp đồng theo công trình  
"constructionId": {
        "equal": 10
    }
...
Số hợp đồng đã được tạo theo công trình Đã xong
rpc/crm/construction-contract/list Đưa ra danh sách hợp đồng theo công trình
"constructionId": {
        "equal": 10
  }
...
Đưa ra danh sách hợp đồng theo công trình Đã xong
rpc/crm/construction-contract/get lấy ra chi tiết hợp đồng id {"id": 10} trả ra hợp đồng công trình với id  Đã xong
rpc/crm/construction-contract/create sửa hợp đồng theo công trình
{
  "code": "HD2025",
  "name": "Hợp đồng 2025",
  "constructionId": 10,
  "totalValue": 100000000,
  "deliveryUnit": "Tự đến lấy",
  "validityDate": "2024-01-19T09:04:37+07:00",
  "expirationDate": "2024-01-23T09:04:40+07:00",
  "invoiceAddress": "219 trung kính",
  "invoiceZipCode": "CTV",
  "receiveAddress": "HQV",
  "receiveZipCode": "MDH",
  "invoiceNationId": "1",
  "invoiceProvinceId": "64",
  "invoiceDistrictId": "708",
  "receiveNationId": "1",
  "receiveProvinceId": "64",
  "receiveDistrictId": "709",
  "constructioncontractTypeId": "2",
  "appUserId": "2",
  "constructioncontractStatusId": 1,
  "customerId": "200002",
  "currencyId": "1",
  "paymentStatusId": 1,
  "appUser": {
    "errors": null,
    "id": 2,
    "username": "Administrator",
    "displayName": "Administrator",
    "address": null,
    "email": "ad@gmail.com",
    "phone": "0784929656",
    "sexId": 1,
    "birthday": "2020-08-17T09:00:00+07:00",
    "avatar": "/rpc/utils/file/download/avatar/20220715/b307fd89-6595-419a-8287-102e31d66b75.png",
    "positionId": null,
    "department": null,
    "organizationId": 1,
    "provinceId": null,
    "longitude": null,
    "latitude": null,
    "statusId": 1,
    "informations": null,
    "warnings": null,
    "disabled": null,
    "generalInformations": [],
    "generalWarnings": [],
    "generalErrors": []
  },
  "constructioncontractStatus": {
    "id": 1,
    "code": "NEW",
    "name": "Mới tạo"
  },
  "constructioncontractType": {
    "errors": null,
    "id": 2,
    "name": "Công ty",
    "code": "COMPANY",
    "statusId": 0,
    "displayOrder": null,
    "informations": null,
    "warnings": null,
    "disabled": null,
    "generalInformations": [],
    "generalWarnings": [],
    "generalErrors": []
  },
  "currency": {
    "errors": null,
    "id": 1,
    "code": "VND",
    "name": "VNĐ",
    "displayOrder": null,
    "statusId": 0,
    "exchangeRate": 12,
    "informations": null,
    "warnings": null,
    "disabled": null,
    "generalInformations": [],
    "generalWarnings": [],
    "generalErrors": []
  },
  "exchangeRate": 0,
  "customer": {
    "errors": null,
    "id": 200002,
    "code": "KH2",
    "name": "ABB",
    "phone": "0987",
    "address": null,
    "nationId": null,
    "provinceId": null,
    "districtId": null,
    "wardId": null,
    "customerTypeId": 2,
    "birthday": "2000-01-03T07:00:00+07:00",
    "email": null,
    "professionId": null,
    "customerSourceId": null,
    "sexId": null,
    "statusId": 1,
    "taxCode": null,
    "fax": null,
    "website": null,
    "numberOfEmployee": null,
    "businessTypeId": null,
    "investment": null,
    "revenueAnnual": null,
    "storeId": null,
    "description": null,
    "creatorId": 43055,
    "used": true,
    "rowId": "3dead304-34d1-4abd-b3f6-b36237ee686c",
    "informations": null,
    "warnings": null,
    "disabled": null,
    "generalInformations": [],
    "generalWarnings": [],
    "generalErrors": []
  },
  "invoiceDistrict": {
    "errors": null,
    "id": 708,
    "code": "001",
    "name": "Quận Ba Đình",
    "priority": null,
    "provinceId": 64,
    "statusId": 1,
    "informations": null,
    "warnings": null,
    "disabled": null,
    "generalInformations": [],
    "generalWarnings": [],
    "generalErrors": []
  },
  "invoiceNation": {
    "errors": null,
    "id": 1,
    "code": "VNM",
    "name": "Việt Nam",
    "displayOrder": null,
    "statusId": 1,
    "informations": null,
    "warnings": null,
    "disabled": null,
    "generalInformations": [],
    "generalWarnings": [],
    "generalErrors": []
  },
  "invoiceProvince": {
    "errors": null,
    "id": 64,
    "code": "01",
    "name": "Thành phố Hà Nội",
    "priority": null,
    "statusId": 1,
    "informations": null,
    "warnings": null,
    "disabled": null,
    "generalInformations": [],
    "generalWarnings": [],
    "generalErrors": []
  },
  "paymentStatus": {
    "id": 1,
    "name": "Chưa thanh toán"
  },
  "receiveDistrict": {
    "errors": null,
    "id": 709,
    "code": "002",
    "name": "Quận Hoàn Kiếm",
    "priority": null,
    "provinceId": 64,
    "statusId": 1,
    "informations": null,
    "warnings": null,
    "disabled": null,
    "generalInformations": [],
    "generalWarnings": [],
    "generalErrors": []
  },
  "receiveNation": {
    "errors": null,
    "id": 1,
    "code": "VNM",
    "name": "Việt Nam",
    "displayOrder": null,
    "statusId": 1,
    "informations": null,
    "warnings": null,
    "disabled": null,
    "generalInformations": [],
    "generalWarnings": [],
    "generalErrors": []
  },
  "receiveProvince": {
    "errors": null,
    "id": 64,
    "code": "01",
    "name": "Thành phố Hà Nội",
    "priority": null,
    "statusId": 1,
    "informations": null,
    "warnings": null,
    "disabled": null,
    "generalInformations": [],
    "generalWarnings": [],
    "generalErrors": []
  },
  "ConstructionContractFileGroupings": [
    {
        "title": "File",
        "fileType": {
        "errors": null,
        "id": 1,
        "code": "CONTRACT",
        "name": "Tập tài liệu hợp đồng",
        "appUserId": null,
        "createdAt": "0001-01-01T06:42:04+06:42",
        "updatedAt": "0001-01-01T06:42:04+06:42",
        "informations": null,
        "warnings": null,
        "disabled": null,
        "generalInformations": [],
        "generalWarnings": [],
        "generalErrors": []
      },
      "fileTypeId": "1",
      "constructionContractFileGroupingFileMappings": [
        {
          "id": 864619,
          "name": "Screenshot 2023-12-14 at 09.12.09.png",
          "title": null,
          "description": null,
          "url": "/rpc/utils/file/download/contract/20240201/fd1da968-1c44-47b2-8220-d7efe1cc0d29.png",
          "appUserId": 2,
          "appUser": {
            "id": 2,
            "username": "Administrator",
            "displayName": "Administrator",
            "address": null,
            "email": "ad@gmail.com",
            "phone": "0784929656",
            "sexId": 1,
            "birthday": "2020-08-17T02:00:00.000Z",
            "avatar": "/rpc/utils/file/download/avatar/20220715/b307fd89-6595-419a-8287-102e31d66b75.png",
            "positionId": null,
            "department": null,
            "organizationId": 1,
            "provinceId": null,
            "longitude": null,
            "latitude": null,
            "statusId": 1,
            "informations": null,
            "warnings": null,
            "errors": null,
            "disabled": null,
            "generalInformations": [],
            "generalWarnings": [],
            "generalErrors": []
          },
          "createdAt": "2024-02-01T04:23:17.793Z",
          "updatedAt": "2024-02-01T04:23:17.793Z",
          "informations": null,
          "warnings": null,
          "errors": null,
          "disabled": null,
          "generalInformations": [],
          "generalWarnings": [],
          "generalErrors": [],
          "fileId": 864619
        }
      ],
      "description": "<p>This is file</p>"
    }
  ],
  "constructioncontractItemDetails": [
    {
        "PrimaryUnitOfMeasureId": 1,
        "UnitOfMeasureId": 1,
        "constructionItemId": 35,
        "salePrice": 4000,
        "quantity": 5,
        "primaryPrice": 4000,
        "discountPercentage": 0,
        "taxPercentage": 10,
        "taxPercentageOther": 0,
        "taxTypeId": 34,
        "constructionItem": {
            "id": 35,
        "productId": 31,
        "code": "01",
        "name": "Điện thoại di động - Đỏ",
        "scanCode": null,
        "salePrice": 10000.0000,
        "retailPrice": null,
        "exchangeSalePrice": null,
        "exchangeRetailPrice": null,
        "statusId": 1,
        "used": true,
        "saleStock": 0,
        "hasInventory": false,
        "canDelete": false,
        "product": {
            "id": 31,
            "code": "DTIP",
            "supplierCode": null,
            "name": "Điện thoại iPhone",
            "description": null,
            "scanCode": null,
            "erpCode": null,
            "productTypeId": 1,
            "supplierId": null,
            "brandId": null,
            "unitOfMeasureId": 1,
            "unitOfMeasureGroupingId": null,
            "salePrice": null,
            "retailPrice": null,
            "taxTypeId": 1,
            "statusId": 1,
            "otherName": null,
            "technicalName": null,
            "note": null,
            "isNew": false,
            "usedVariationId": 0,
            "used": false,
            "brand": null,
            "productType": {
                "id": 1,
                "code": "test",
                "name": "giữ quan điểm không lên án chiến dịch của Nga tại Ukraine. Bắc Kinh ngày 24/2 công bố tài liệu 12 điểm về xung đột Ngột hi ha ha",
                "description": null,
                "statusId": 0,
                "used": false,
                "informations": null,
                "warnings": null,
                "errors": null,
                "disabled": null,
                "generalInformations": [],
                "generalWarnings": [],
                "generalErrors": []
            },
            "supplier": null,
            "taxType": {
                "id": 1,
                "code": "tax",
                "name": "thuế khác",
                "percentage": 10.0000,
                "statusId": 1,
                "used": false,
                "informations": null,
                "warnings": null,
                "errors": null,
                "disabled": null,
                "generalInformations": [],
                "generalWarnings": [],
                "generalErrors": []
            },
            "unitOfMeasure": {
                "id": 1,
                "code": "Cai",
                "name": "Cái",
                "description": null,
                "statusId": 0,
                "used": false,
                "factor": null,
                "informations": null,
                "warnings": null,
                "errors": null,
                "disabled": null,
                "generalInformations": [],
                "generalWarnings": [],
                "generalErrors": []
            },
            "unitOfMeasureGrouping": null,
            "productProductGroupingMappings": null,
            "createdAt": "0001-01-01T00:00:00.000Z",
            "updatedAt": "0001-01-01T00:00:00.000Z",
            "informations": null,
            "warnings": null,
            "errors": null,
            "disabled": null,
            "generalInformations": [],
            "generalWarnings": [],
            "generalErrors": []
        },
        "informations": null,
        "warnings": null,
        "errors": null,
        "disabled": null,
        "generalInformations": [],
        "generalWarnings": [],
        "generalErrors": []
        },
        "informations": null,
        "warnings": null,
        "errors": null,
        "disabled": null,
        "generalInformations": [],
        "generalWarnings": [],
        "generalErrors": []
        }
  ],
  "constructioncontractPaymentHistories": [
    {
      "errors": {
        "paymentType": null
      },
      "paymentMilestone": "Thanh toán 50%",
      "paymentPercentage": 50,
      "paymentAmount": 50000000,
      "paymentType": {
        "errors": null,
        "id": 1,
        "code": "01",
        "name": "Chuyển khoản AA",
        "statusId": 1,
        "used": true,
        "rowId": "b1299b9f-e280-4ece-b004-c3480a1144b9",
        "informations": null,
        "warnings": null,
        "disabled": null,
        "generalInformations": [],
        "generalWarnings": [],
        "generalErrors": []
      },
      "paymentTypeId": 1
    }
  ],
  "subTotal": 0,
  "generalDiscountPercentage": 0,
  "generalDiscountAmount": 0,
  "totalTaxAmountOther": 0,
  "totalTaxAmount": 0,
  "total": 0,
  "termAndCondition": "<p><span style=\"font-family: Montserrat, sans-serif; text-wrap: nowrap; background-color: #ffffff;\">Điều khoản &amp; Điều kiện</span></p>",
  "EditedPriceStatus": false,
}
tạo hợp đồng Đã xong
rpc/crm/construction-contract/update sửa hợp đồng theo công trình

sửa hợp đồng Đã xong
rpc/crm/construction-contract/bulk-delete xóa nhiều hợp đồng
[82,81]
xóa nhiều hợp đồng Đã xong
rpc/crm/construction-contract/delete xóa hợp đồng
{id: 10} xóa hợp đồng Đã xong
rpc/crm/construction-contract/multi-update upload file
file
Đã xong
rpc/crm/construction-contract/export xuất excel
{} xuất file excel tất cả hợp đồng Đã xong
rpc/crm/construction-contract/list-construction-item lấy danh sách sản phẩm
{} lấy danh sách sản phẩm đang bán Đã xong
rpc/crm/construction-contract/count-construction-item lấy số lượng sản phẩm
{} lấy số lượng sản phẩm đang bán Đã xong
rpc/crm/construction-contract/filter-list-app-user filter theo app user Id or code or name {} Danh sách app user Đã xong
rpc/crm/construction-contract/filter-list-customer filter theo khách hàng Id or code or name {} Danh sách các khách hàng Đã Xong
rpc/crm/construction-contract/filter-list-construction-contract-status filter theo trạng thái hợp đồng Id or code or name {} Danh sách trạng thái hợp đồng Đã xong
rpc/crm/construction-contract/filter-list-construction-contract-type filter theo loại hợp đồng Id or code or name {}

Danh sách loại hợp

đồng 

Đã xong
rpc/crm/construction-contract/filter-list-currentcy filter theo đơn vị tiện tệ Id or code or name {} Danh sách  loại tiền  Đã xong
rpc/crm/construction-contract/filter-list-payment-status filter theo trạng thái thanh  id or code or name {} Danh sách trạng thái thanh toán Đã xong
rpc/crm/construction-contract/filter-list-payment-type filter theo phương thức thanh toán id or code or name {} Danh sách phương thức thanh toán Đã xong
rpc/crm/construction-contract/filter-list-organization filter theo đơn vị id or code or name {} Danh sách đơn vị Đã xong
rpc/crm/construction-contract/single-list-app-user lấy ra danh sách app user id or code or name {} danh sách app user Đã xong
rpc/crm/construction-contract/single-list-construction-contract-status lấy ra danh sách trạng thái hợp đồng id or code or name {} Danh sách trạng thái hợp đồng Đã xong
rpc/crm/construction-contract/single-list-construction-contract-type lấy ra danh sách loại hợp đồng id or code or name {} Danh sách loại hợp đồng Đã xong
rpc/crm/construction-contract/single-list-organization lấy ra danh sách đơn vị id or code or name {} Danh sách đơn vị Đã xong
rpc/crm/construction-contract/single-list-currency lấy ra danh sách đơn vị tiền tệ id or code or name {} Danh sách đơn vị tiền tệ Đã xong
rpc/crm/construction-contract/single-list-nation danh sách các quốc gia id or code or name {} Danh sách quốc gia Đã xong
rpc/crm/construction-contract/single-list-province lấy ra danh sách thành phố id or code or name {} Danh sách thành phố Đã xong
rpc/crm/construction-contract/single-list-district lấy ra danh sách quận, huyện id or code or name {} Danh sách quận ,  Đã xong
rpc/crm/construction-contract/single-list-ward  lấy ra danh sách phường, xã id or code or name {} Danh sách phường xã Đã xong
rpc/crm/construction-contract/single-list-payment-status lấy ra danh sách trạng thái thanh toán id or code or name {} Danh sách trạng thái thanh toán Đã xong
rpc/crm/construction-contract/single-list-payment-type lấy ra danh sách phương thức thanh toán id or code or name {} anh sách phương thức thanh toán Đã xong
rpc/crm/construction-contract/single-list-customer lấy ra danh sách khách hàng id or code or name {} Danh sách khách hàng Đã xong
rpc/crm/construction-contract/single-list-tax-type lấy ra danh sách các loại thuế id or code or name {} Danh sách các loại thuế Đã xong
rpc/crm/construction-contract/single-list-unit-of-measure lấy ra danh sách đơn vị tính trên mỗi sản phẩm id or code or name {} Danh sách đơn vị tính trên mỗi sản phẩm Đã xong
rpc/crm/construction-contract/single-list-file-type lấy ra danh sách loại file id or code or name {} Danh sách loại file Đã xong
rpc/crm/construction-contract/single-list-exchange-rate lấy ra danh sách tỷ giá chuyển đổi id or code or name {} Danh sách tỷ giá chuyển đổi Đã xong