Phiếu xuất nhập kho

  • /api/bill/search: Dùng để lấy danh sách phiếu xuất nhập kho (hóa đơn nhập nhà cung cấp, bán lẻ, bán buôn, chuyển kho, kiểm kho).

  • Chú ý:

    • Nếu bạn không truyền param fromDate và toDate hoặc customerId hoặc customerMobile, mặc định sẽ lấy dữ liệu trong 10 ngày gần nhất.

    • Nếu bạn muốn lấy dữ liệu các ngày cũ hơn, xin vui lòng truyền fromDate và toDate trong khoảng 10 ngày (VD: 2020-09-01 => 2020-09-10, 2020-09-11 => 2020-09-20)

Request

KeyTypeDescription

page

int

Phân trang (giá trị mặc định là 1)

icpp

int

Số lượng đơn hàng trên 1 trang. Mặc định là 10. Tối đa không quá 20.

id

int

Tìm kiếm theo ID phiếu XNK

type

int

Tìm kiếm theo loại XNK

mode

int

Tìm kiếm theo kiểu XNK

modes

array

Tìm kiếm theo kiểu XNK

depotId

int

Tìm kiếm theo kho hàng

customerId

int

Tìm kiếm theo ID khách hàng

customerMobile

string

Tìm kiếm theo số điện thoại khách hàng

fromDate

date

Tìm kiếm ngày XNK >= fromeDate. Format yyyy-mm-dd (.e.g. 2015-07-16)

toDate

date

Tìm kiếm ngày XNK =< toDate Format yyyy-mm-dd (.e.g. 2015-08-16)

dataOptions

array

Lựa chọn dữ liệu cần lấy thêm, VD "dataOptions":["giftProducts"]. Các giá trị: - giftProducts: Lấy thông tin quà tặng của sản phẩm trong đơn hàng, - tags: lấy tag hóa đơn

Response

JSON decode the response to get the structure:

KeyTypeDescription

code

int

1 = success or 0 = failed

messages

array

is an array of error messages if code = 0

data

array

is an array of customer list

[
    "totalPages" => int,
    "bill" => [
        [ ], // each bill item, all properties are listed in the table below
        [ ],
        ...
    ]
]
KeyTypeDescription

id

int

ID của hóa đơn

date

date

Ngày xuất nhập kho (format: yyyy-mm-dd)

createdDateTime

datetime

Ngày giờ tạo hóa đơn (format: yyyy-mm-dd h:i:s)

type

int

mode

int

depotId

int

ID kho doanh nghiệp

customerId

int

ID khách hàng mua hàng, có thể sử dụng để đồng bộ với ID khách hàng trong /api/customer/search

customerId

int

ID khách hàng

customerName

string

Tên khách hàng

customerMobile

string

Số điện thoại khách hàng

saleId

int

ID nhân viên bán hàng

saleName

string

Nhân viên bán hàng

createdById

int

ID nhân viên thu ngân

createdByName

string

Nhân viên thu ngân

discount

double

Chiết khấu hóa đơn

moneyTransfer

double

Tiền chuyển khoản

moneyAccount

double

Tài khoản ngân hàng

cash

double

Tiền mặt

cashAccount

string

Quỹ tiền mặt

installmentMoney

double

Trả góp

installmentAccount

string

Dịch vụ trả góp

installmentCode

string

Mã dịch vụ trả góp

creditMoney

double

Tiền quẹt thẻ

creditAccount

double

Tài khoản quẹt thẻ

creditCode

string

Mã quẹt thẻ

usedPoints

double

Điểm sử dụng

usedPointsMoney

double

Tiền sử dụng

money

double

Tổng tiền hóa đơn

saleBonus

double

Hoa hồng bán hàng

payment

double

Tổng tiền đã thanh toán

relatedBillId

int

ID hóa đơn được trả hàng

relatedUserName

string

Người tạo hóa đơn được trả hàng

technicalId

int

ID nhân viên kỹ thuật

technicalName

string

Tên nhân viên kỹ thuật

requirementBillId

int

ID phiếu nháp

orderId

int

ID đơn hàng

inventoryCheckId

int

ID phiếu kiểm kho

warrantyBillId

int

ID phiếu bảo hành

description

string

ghi chú của hóa đơn

products

array

Danh sách sản phẩm theo hóa đơn [Xem bảng bên dưới]

  • Products: Danh sách sản phẩm XNK trong phiếu

KeyTypeDescription

id

int

ID của sản phẩm

code

string

Mã code của sản phẩm

name

string

Tên sản phẩm

quantity

float

Số lượng sản phẩm

price

double

Giá sản phẩm

discount

double

Chiết khấu của sản phẩm

imei

array

danh sách IMEI của sản phẩm. Nếu sản phẩm tồn tại IMEI sẽ hiện thêm trường này.

giftProducts

array

danh sách thông tin quà tặng sản phẩm [Xem bảng bên dưới].

  • giftProducts: Danh sách thông tin quà tặng sản phẩm

KeyTypeDescription

productCode

string

Mã code của sản phẩm

productName

string

Tên sản phẩm

productQuantity

float

Số lượng sản phẩm

/api/bill/index

  • Lấy danh sách hóa đơn

Request

Last updated