POST api/trahang/TaoPhieuTraHang
Tạo phiếu trả hàng bao gồm insert và bảng PhieuTra và PhieuTraCT Header truyền vào token
Request Information
URI Parameters
None.
Body Parameters
PhieuTra| Name | Description | Type | Additional information |
|---|---|---|---|
| IDPhieu | integer |
None. |
|
| MaPhieu | string |
None. |
|
| IDKhachHang | integer |
None. |
|
| IDKho | integer |
None. |
|
| IDThuKho | integer |
None. |
|
| IDLoaiPhieu | integer |
None. |
|
| TongSoLuong | integer |
None. |
|
| TongTien | decimal number |
None. |
|
| GhiChu | string |
None. |
|
| IDPhieuXuat | integer |
None. |
|
| IDNguoiDuyet | integer |
None. |
|
| NgayDuyet | string |
None. |
|
| NgayNhapKho | string |
None. |
|
| ChiTiet | Collection of ChiTietPhieuTra |
None. |
Request Formats
application/json, text/json
Sample:
{
"IDPhieu": 1,
"MaPhieu": "sample string 2",
"IDKhachHang": 3,
"IDKho": 4,
"IDThuKho": 5,
"IDLoaiPhieu": 6,
"TongSoLuong": 7,
"TongTien": 8.1,
"GhiChu": "sample string 9",
"IDPhieuXuat": 10,
"IDNguoiDuyet": 11,
"NgayDuyet": "sample string 12",
"NgayNhapKho": "sample string 13",
"ChiTiet": [
{
"IDMatHang": "sample string 1",
"IDPhieu": 2,
"DonGia": 3.1,
"SoLuong": 4.1,
"GhiChu": "sample string 5"
},
{
"IDMatHang": "sample string 1",
"IDPhieu": 2,
"DonGia": 3.1,
"SoLuong": 4.1,
"GhiChu": "sample string 5"
}
]
}
application/xml, text/xml
Sample:
<PhieuTra xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API_KD.Models">
<ChiTiet>
<ChiTietPhieuTra>
<DonGia>3.1</DonGia>
<GhiChu>sample string 5</GhiChu>
<IDMatHang>sample string 1</IDMatHang>
<IDPhieu>2</IDPhieu>
<SoLuong>4.1</SoLuong>
</ChiTietPhieuTra>
<ChiTietPhieuTra>
<DonGia>3.1</DonGia>
<GhiChu>sample string 5</GhiChu>
<IDMatHang>sample string 1</IDMatHang>
<IDPhieu>2</IDPhieu>
<SoLuong>4.1</SoLuong>
</ChiTietPhieuTra>
</ChiTiet>
<GhiChu>sample string 9</GhiChu>
<IDKhachHang>3</IDKhachHang>
<IDKho>4</IDKho>
<IDLoaiPhieu>6</IDLoaiPhieu>
<IDNguoiDuyet>11</IDNguoiDuyet>
<IDPhieu>1</IDPhieu>
<IDPhieuXuat>10</IDPhieuXuat>
<IDThuKho>5</IDThuKho>
<MaPhieu>sample string 2</MaPhieu>
<NgayDuyet>sample string 12</NgayDuyet>
<NgayNhapKho>sample string 13</NgayNhapKho>
<TongSoLuong>7</TongSoLuong>
<TongTien>8.1</TongTien>
</PhieuTra>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
BaseModelOfObject| Name | Description | Type | Additional information |
|---|---|---|---|
| status | integer |
None. |
|
| data | Object |
None. |
|
| page | Object |
None. |
|
| error | ErrorModel |
None. |
Response Formats
application/json, text/json
Sample:
{
"status": 1,
"data": {},
"page": {},
"error": {
"message": "sample string 1",
"code": "sample string 2"
}
}
application/xml, text/xml
Sample:
<BaseModelOfanyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API_KD.Models">
<data />
<error>
<code>sample string 2</code>
<message>sample string 1</message>
</error>
<page />
<status>1</status>
</BaseModelOfanyType>