Установить баланс поставщика
Раздел «Настройки → Финансы → Установить баланс поставщика» (AR-228). Документ на дату date делает баланс каждого указанного поставщика равным введённому «Факту» по каждой валюте. Знак сумм документа: минус — мы должны поставщику, плюс — поставщик должен нам. «План» (plan_amount) — баланс по системе на конец даты документа. Черновик (status = draft) ничего не меняет и редактируется; при проведении (completed) на каждую ненулевую разницу в журнал поставщика пишется строка «Корректировка баланса» (source_type = balance_document, source_id — документ, source_data.number — номер) с датой документа. В кассу и финансы документ не попадает. Проведённый документ нельзя изменить.
| Метод | Адрес | Назначение |
|---|---|---|
| GET | /company/supplier/balance-document/suppliers | Поставщики для документа |
| GET | /company/supplier/balance-document/download-example | Шаблон импорта |
| POST | /company/supplier/balance-document/import | Импорт балансов |
| GET | /company/supplier/balance-document | Документы баланса поставщиков |
| GET | /company/supplier/balance-document/{model} | Документ баланса поставщика |
| POST | /company/supplier/balance-document | Сохранить документ |
| PUT | /company/supplier/balance-document/{model} | Изменить черновик |
Поставщики для документа
Данные формы на дату date (по умолчанию сегодня): data — все поставщики компании с валютами расчётов currencies и балансом по системе plan по каждой валюте (минус — мы должны), currencies — блоки таблицы (валюты компании), next_number — номер нового документа.
/company/supplier/balance-document/suppliersЗаголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Параметры запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
date | string (date) | Нет | Дата. Формат Y-m-d. Не позже сегодняшнего дня |
Ответ · 200
Поля ответа
| Поле | Тип | Описание |
|---|---|---|
data | object[] | Данные |
data[].id | integer | ID |
data[].name | string | Название |
data[].currencies | array | Валюты |
data[].plan | object | |
data[].plan.uzs | integer | |
data[].plan.usd | integer | |
data[].plan.eur | integer | |
data[].plan.rub | integer | |
currencies | array | Валюты |
next_number | integer | |
date | string | Дата |
{
"data": [
{
"id": 73,
"name": "«Artel Savdo»",
"currencies": [
"uzs",
"usd"
],
"plan": {
"uzs": 500000,
"usd": -1400,
"eur": 0,
"rub": 0
}
},
{
"id": 72,
"name": "Dena Foods MChJ",
"currencies": [
"uzs"
],
"plan": {
"uzs": -3750000,
"usd": 0,
"eur": 0,
"rub": 0
}
}
],
"currencies": [
"uzs",
"usd"
],
"next_number": 1001,
"date": "2026-11-25"
}Шаблон импорта
Файл Excel для импорта: все поставщики по их валютам с текущим балансом (минус — мы должны).
/company/supplier/balance-document/download-exampleЗаголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Ответ · 200
Ответ — файл или текст, не JSON.
Импорт балансов
Читает файл file (xlsx: Поставщик, Валюта, Факт; до 1000 строк) и ничего не сохраняет: data — строки (row — номер строки, supplier_id, currency, actual_amount) с ошибками errors по каждой строке.
/company/supplier/balance-document/importЗаголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
file | file | Да | Файл. Форматы: xlsx. Макс. 2048 КБ |
{}curl -X POST "https://api.wasyt.uz/company/supplier/balance-document/import" \
-H "Accept: application/json" \
-H "Accept-Language: ru" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '[]'Ответ · 200
Поля ответа
| Поле | Тип | Описание |
|---|---|---|
data | object[] | Данные |
data[].row | integer | |
data[].supplier_name | string | |
data[].supplier_id | integer | Поставщик |
data[].currency | string | Валюта |
data[].actual_amount | integer | |
data[].errors | array | Ошибки валидации по полям |
{
"data": [
{
"row": 2,
"supplier_name": "Dena Foods MChJ",
"supplier_id": 64,
"currency": "uzs",
"actual_amount": -3000000,
"errors": []
},
{
"row": 3,
"supplier_name": "dena foods mchj",
"supplier_id": 64,
"currency": "usd",
"actual_amount": -50.5,
"errors": []
}
]
}Документы баланса поставщиков
Документы, новые первыми: number (1001, 1002… — одна нумерация на компанию), date, status (draft — черновик, completed — проведён), positions — число поставщиков, comment — примечание, totals по валютам — «Прежняя сумма» (plan), «Новая сумма» (actual) и «Разница» (difference). with[]=items.supplier — поставщики документа, with[]=creator.profile — автор. Фильтры: filter[status], filter[date], filter[creator_id].
/company/supplier/balance-documentЗаголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Параметры запроса
| Параметр | Описание |
|---|---|
filter[id] | ID — точное значение |
filter[company_id] | Компания — точное значение |
filter[creator_id] | Создатель — точное значение |
filter[status] | Статус — точное значение |
filter[date] | Дата — период: [0] — с, [1] — по (Y-m-d) |
sort[] | Сортировка, - — по убыванию: id, -id, number, -number, date, -date |
with[] | Подгрузить связи: creator.profile, items.supplier |
page | Номер страницы, с 1 |
page-size | Записей на странице, не больше 20 |
GET /company/supplier/balance-document?with[0]=items.supplier&with[1]=creator.profileОтвет · 200
Постраничный ответ: записи в data[], пагинация в links и meta.
Поля ответа
| Поле | Тип | Описание |
|---|---|---|
data | object[] | Данные |
data[].id | integer | ID |
data[].creator_id | integer | Создатель |
data[].company_id | integer | Компания |
data[].number | integer | Номер |
data[].date | string | Дата |
data[].comment | null | Комментарий |
data[].status | string | Статус |
data[].positions | integer | |
data[].totals | array | |
data[].completed_at | null | |
data[].created_at | string | Создано |
data[].updated_at | string | Обновлено |
data[].items | object[] | Состав |
data[].items[].id | integer | ID |
data[].items[].document_id | integer | |
data[].items[].supplier_id | integer | Поставщик |
data[].items[].balances | array | |
data[].items[].supplier | object | |
data[].items[].supplier.id | integer | ID |
data[].items[].supplier.creator_id | integer | Создатель |
data[].items[].supplier.company_id | integer | Компания |
data[].items[].supplier.name | string | Название |
data[].items[].supplier.full_name | string | ФИО |
data[].items[].supplier.type | string | Тип |
data[].items[].supplier.phone | string | Телефон |
data[].items[].supplier.additional_phones | array | Дополнительные телефоны |
data[].items[].supplier.inn | null | ИНН |
data[].items[].supplier.address | null | Адрес |
data[].items[].supplier.category | null | Категория |
data[].items[].supplier.currency | string | Валюта |
data[].items[].supplier.currencies | array | Валюты |
data[].items[].supplier.bank_account | null | Расчётный счёт |
data[].items[].supplier.mfo | null | МФО |
data[].items[].supplier.bank_name | null | Банк |
data[].items[].supplier.photo | null | |
data[].items[].supplier.photo_thumbs | array | |
data[].items[].supplier.start_balances | object | |
data[].items[].supplier.start_balances.eur | integer | |
data[].items[].supplier.start_balances.rub | integer | |
data[].items[].supplier.start_balances.usd | integer | |
data[].items[].supplier.start_balances.uzs | integer | |
data[].items[].supplier.start_balance_set_at | null | |
data[].items[].supplier.created_at | string | Создано |
data[].items[].supplier.updated_at | string | Обновлено |
data[].items[].supplier.is_deleted | boolean | Удалена |
data[].creator | object | |
data[].creator.id | integer | ID |
data[].creator.type | string | Тип |
data[].creator.role_id | integer | Роль |
data[].creator.company_id | integer | Компания |
data[].creator.partner_id | null | Партнёр |
data[].creator.username | string | Логин |
data[].creator.pinfl | null | ПИНФЛ |
data[].creator.phone | string | Телефон |
data[].creator.sipuni_sip_number | string | VoIP - Sipuni (SIP-номер) |
data[].creator.is_confirmed | boolean | |
data[].creator.are_all_companies_available | boolean | |
data[].creator.last_login_at | null | Последний вход |
data[].creator.created_at | string | Создано |
data[].creator.updated_at | string | Обновлено |
data[].creator.is_deleted | boolean | Удалена |
data[].creator.profile | object | |
data[].creator.profile.first_name | null | Имя |
data[].creator.profile.last_name | null | Фамилия |
data[].creator.profile.position | null | Должность |
data[].creator.profile.birth_date | null | Дата рождения |
data[].creator.profile.gender | null | Пол |
data[].creator.profile.is_discount_limited | boolean | |
data[].creator.profile.max_item_discount_percent | null | |
data[].creator.profile.max_check_discount_percent | null | |
data[].creator.profile.is_device_limited | boolean | |
data[].creator.profile.max_devices | integer | |
data[].creator.profile.is_mobile_login_allowed | boolean | |
data[].creator.profile.last_device_number | integer | |
data[].creator.profile.full_name | string | ФИО |
{
"data": [
{
"id": 8,
"creator_id": 2,
"company_id": 1,
"number": 1002,
"date": "2026-11-25",
"comment": null,
"status": "draft",
"positions": 1,
"totals": [],
"completed_at": null,
"created_at": "2026-11-25 16:49:01",
"updated_at": "2026-11-25 16:49:01",
"items": [
{
"id": 9,
"document_id": 8,
"supplier_id": 69,
"balances": [],
"supplier": {
"id": 69,
"creator_id": 2,
"company_id": 1,
"name": "«Artel Savdo»",
"full_name": "«Artel Savdo»",
"type": "entity",
"phone": "998901870331",
"additional_phones": [],
"inn": null,
"address": null,
"category": null,
"currency": "uzs",
"currencies": [
"uzs",
"usd"
],
"bank_account": null,
"mfo": null,
"bank_name": null,
"photo": null,
"photo_thumbs": [],
"start_balances": {
"eur": 0,
"rub": 0,
"usd": 0,
"uzs": 0
},
"start_balance_set_at": null,
"created_at": "2026-11-25 16:49:01",
"updated_at": "2026-11-25 16:49:01",
"is_deleted": false
}
}
],
"creator": {
"id": 2,
"type": "director",
"role_id": 2,
"company_id": 1,
"partner_id": null,
"username": "director_1@local.host",
"pinfl": null,
"phone": "998020000001",
"sipuni_sip_number": "210",
"is_confirmed": true,
"are_all_companies_available": false,
"last_login_at": null,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"is_deleted": false,
"profile": {
"first_name": null,
"last_name": null,
"position": null,
"birth_date": null,
"gender": null,
"is_discount_limited": false,
"max_item_discount_percent": null,
"max_check_discount_percent": null,
"is_device_limited": true,
"max_devices": 2,
"is_mobile_login_allowed": true,
"last_device_number": 0,
"full_name": " "
}
}
},
{
"id": 7,
"creator_id": 2,
"company_id": 1,
"number": 1001,
"date": "2026-11-25",
"comment": null,
"status": "completed",
"positions": 1,
"totals": {
"uzs": {
"plan": -3750000,
"actual": -3000000,
"difference": 750000
}
},
"completed_at": "2026-11-25 16:49:01",
"created_at": "2026-11-25 16:49:01",
"updated_at": "2026-11-25 16:49:01",
"items": [
{
"id": 8,
"document_id": 7,
"supplier_id": 68,
"balances": [
{
"currency": "uzs",
"difference": 750000,
"plan_amount": -3750000,
"actual_amount": -3000000
}
],
"supplier": {
"id": 68,
"creator_id": 2,
"company_id": 1,
"name": "Dena Foods MChJ",
"full_name": "Dena Foods MChJ",
"type": "entity",
"phone": "998901478489",
"additional_phones": [],
"inn": null,
"address": null,
"category": null,
"currency": "uzs",
"currencies": [
"uzs"
],
"bank_account": null,
"mfo": null,
"bank_name": null,
"photo": null,
"photo_thumbs": [],
"start_balances": {
"eur": 0,
"rub": 0,
"usd": 0,
"uzs": 0
},
"start_balance_set_at": null,
"created_at": "2026-11-25 16:49:01",
"updated_at": "2026-11-25 16:49:01",
"is_deleted": false
}
}
],
"creator": {
"id": 2,
"type": "director",
"role_id": 2,
"company_id": 1,
"partner_id": null,
"username": "director_1@local.host",
"pinfl": null,
"phone": "998020000001",
"sipuni_sip_number": "210",
"is_confirmed": true,
"are_all_companies_available": false,
"last_login_at": null,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"is_deleted": false,
"profile": {
"first_name": null,
"last_name": null,
"position": null,
"birth_date": null,
"gender": null,
"is_discount_limited": false,
"max_item_discount_percent": null,
"max_check_discount_percent": null,
"is_device_limited": true,
"max_devices": 2,
"is_mobile_login_allowed": true,
"last_device_number": 0,
"full_name": " "
}
}
}
],
"links": {
"first": "https://api.wasyt.uz/company/supplier/balance-document?page=1",
"last": "https://api.wasyt.uz/company/supplier/balance-document?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [],
"path": "https://api.wasyt.uz/company/supplier/balance-document",
"per_page": 20,
"to": 2,
"total": 2
}
}Документ баланса поставщика
Документ с поставщиками (items): по каждому balances — валюта, plan_amount (по системе), actual_amount (факт), difference.
/company/supplier/balance-document/{model}Заголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Параметры пути
| Параметр | Описание |
|---|---|
model | ID записи |
Параметры запроса
| Параметр | Описание |
|---|---|
with[] | Подгрузить связи |
GET /company/supplier/balance-document/9?with[0]=items.supplier&with[1]=creator.profileОтвет · 200
Поля ответа
| Поле | Тип | Описание |
|---|---|---|
id | integer | ID |
creator_id | integer | Создатель |
company_id | integer | Компания |
number | integer | Номер |
date | string | Дата |
comment | null | Комментарий |
status | string | Статус |
positions | integer | |
totals | object | |
totals.uzs | object | |
totals.uzs.plan | integer | |
totals.uzs.actual | integer | |
totals.uzs.difference | integer | |
completed_at | string | |
created_at | string | Создано |
updated_at | string | Обновлено |
items | object[] | Состав |
items[].id | integer | ID |
items[].document_id | integer | |
items[].supplier_id | integer | Поставщик |
items[].balances | object[] | |
items[].balances[].currency | string | Валюта |
items[].balances[].difference | integer | |
items[].balances[].plan_amount | integer | |
items[].balances[].actual_amount | integer | |
items[].supplier | object | |
items[].supplier.id | integer | ID |
items[].supplier.creator_id | integer | Создатель |
items[].supplier.company_id | integer | Компания |
items[].supplier.name | string | Название |
items[].supplier.full_name | string | ФИО |
items[].supplier.type | string | Тип |
items[].supplier.phone | string | Телефон |
items[].supplier.additional_phones | array | Дополнительные телефоны |
items[].supplier.inn | null | ИНН |
items[].supplier.address | null | Адрес |
items[].supplier.category | null | Категория |
items[].supplier.currency | string | Валюта |
items[].supplier.currencies | array | Валюты |
items[].supplier.bank_account | null | Расчётный счёт |
items[].supplier.mfo | null | МФО |
items[].supplier.bank_name | null | Банк |
items[].supplier.photo | null | |
items[].supplier.photo_thumbs | array | |
items[].supplier.start_balances | object | |
items[].supplier.start_balances.eur | integer | |
items[].supplier.start_balances.rub | integer | |
items[].supplier.start_balances.usd | integer | |
items[].supplier.start_balances.uzs | integer | |
items[].supplier.start_balance_set_at | null | |
items[].supplier.created_at | string | Создано |
items[].supplier.updated_at | string | Обновлено |
items[].supplier.is_deleted | boolean | Удалена |
creator | object | |
creator.id | integer | ID |
creator.type | string | Тип |
creator.role_id | integer | Роль |
creator.company_id | integer | Компания |
creator.partner_id | null | Партнёр |
creator.username | string | Логин |
creator.pinfl | null | ПИНФЛ |
creator.phone | string | Телефон |
creator.sipuni_sip_number | string | VoIP - Sipuni (SIP-номер) |
creator.is_confirmed | boolean | |
creator.are_all_companies_available | boolean | |
creator.last_login_at | null | Последний вход |
creator.created_at | string | Создано |
creator.updated_at | string | Обновлено |
creator.is_deleted | boolean | Удалена |
creator.profile | object | |
creator.profile.first_name | null | Имя |
creator.profile.last_name | null | Фамилия |
creator.profile.position | null | Должность |
creator.profile.birth_date | null | Дата рождения |
creator.profile.gender | null | Пол |
creator.profile.is_discount_limited | boolean | |
creator.profile.max_item_discount_percent | null | |
creator.profile.max_check_discount_percent | null | |
creator.profile.is_device_limited | boolean | |
creator.profile.max_devices | integer | |
creator.profile.is_mobile_login_allowed | boolean | |
creator.profile.last_device_number | integer | |
creator.profile.full_name | string | ФИО |
{
"id": 9,
"creator_id": 2,
"company_id": 1,
"number": 1001,
"date": "2026-11-25",
"comment": null,
"status": "completed",
"positions": 1,
"totals": {
"uzs": {
"plan": -3750000,
"actual": -3000000,
"difference": 750000
}
},
"completed_at": "2026-11-25 16:49:01",
"created_at": "2026-11-25 16:49:01",
"updated_at": "2026-11-25 16:49:01",
"items": [
{
"id": 10,
"document_id": 9,
"supplier_id": 70,
"balances": [
{
"currency": "uzs",
"difference": 750000,
"plan_amount": -3750000,
"actual_amount": -3000000
}
],
"supplier": {
"id": 70,
"creator_id": 2,
"company_id": 1,
"name": "Dena Foods MChJ",
"full_name": "Dena Foods MChJ",
"type": "entity",
"phone": "998902477990",
"additional_phones": [],
"inn": null,
"address": null,
"category": null,
"currency": "uzs",
"currencies": [
"uzs"
],
"bank_account": null,
"mfo": null,
"bank_name": null,
"photo": null,
"photo_thumbs": [],
"start_balances": {
"eur": 0,
"rub": 0,
"usd": 0,
"uzs": 0
},
"start_balance_set_at": null,
"created_at": "2026-11-25 16:49:01",
"updated_at": "2026-11-25 16:49:01",
"is_deleted": false
}
}
],
"creator": {
"id": 2,
"type": "director",
"role_id": 2,
"company_id": 1,
"partner_id": null,
"username": "director_1@local.host",
"pinfl": null,
"phone": "998020000001",
"sipuni_sip_number": "210",
"is_confirmed": true,
"are_all_companies_available": false,
"last_login_at": null,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"is_deleted": false,
"profile": {
"first_name": null,
"last_name": null,
"position": null,
"birth_date": null,
"gender": null,
"is_discount_limited": false,
"max_item_discount_percent": null,
"max_check_discount_percent": null,
"is_device_limited": true,
"max_devices": 2,
"is_mobile_login_allowed": true,
"last_device_number": 0,
"full_name": " "
}
}
}Сохранить документ
date — дата баланса (не позже сегодня), comment, status — draft (черновик) или completed (провести), items — поставщики (каждый один раз): supplier_id, balances — введённые «Факты» (currency, actual_amount со знаком: минус — мы должны). «План» и разница считаются в момент проведения. Ввод суммы в валюте, в которой поставщик не работает, добавляет её в его валюты расчётов.
/company/supplier/balance-documentЗаголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
date | string (date) | Да | Дата. Формат Y-m-d. Не позже сегодняшнего дня |
comment | string | Нет | Комментарий. Макс. 1000 символов |
status | string | Да | Статус. Допустимые значения: draft, completed |
items | object[] | Да | Состав. Мин. 1 элементов |
items[].supplier_id | integer | Да | Поставщик. Без повторов. ID существующей записи, доступной пользователю |
items[].balances | object[] | Да (можно null) | Фактические суммы |
items[].balances[].currency | string | Да | Валюта. Допустимые значения: uzs, usd, eur, rub |
items[].balances[].actual_amount | number | Да | Факт. До 2 знаков после запятой. Не меньше -1000000000. Не больше 1000000000 |
{
"date": "2026-11-25",
"comment": "Остаток, перенесённый из старой системы",
"status": "completed",
"items": [
{
"supplier_id": 50,
"balances": [
{
"currency": "uzs",
"actual_amount": -3000000
}
]
},
{
"supplier_id": 51,
"balances": [
{
"currency": "uzs",
"actual_amount": 0
},
{
"currency": "usd",
"actual_amount": -1400
}
]
}
]
}curl -X POST "https://api.wasyt.uz/company/supplier/balance-document" \
-H "Accept: application/json" \
-H "Accept-Language: ru" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"date":"2026-11-25","comment":"Остаток, перенесённый из старой системы","status":"completed","items":[{"supplier_id":50,"balances":[{"currency":"uzs","actual_amount":-3000000}]},{"supplier_id":51,"balances":[{"currency":"uzs","actual_amount":0},{"currency":"usd","actual_amount":-1400}]}]}'Ответ · 200
Поля ответа
| Поле | Тип | Описание |
|---|---|---|
totals | object | |
totals.uzs | object | |
totals.uzs.plan | integer | |
totals.uzs.actual | integer | |
totals.uzs.difference | integer | |
totals.usd | object | |
totals.usd.plan | integer | |
totals.usd.actual | integer | |
totals.usd.difference | integer | |
positions | integer | |
company_id | integer | Компания |
creator_id | integer | Создатель |
number | integer | Номер |
date | string | Дата |
comment | string | Комментарий |
status | string | Статус |
completed_at | string | |
updated_at | string | Обновлено |
created_at | string | Создано |
id | integer | ID |
items | object[] | Состав |
items[].id | integer | ID |
items[].document_id | integer | |
items[].supplier_id | integer | Поставщик |
items[].balances | object[] | |
items[].balances[].currency | string | Валюта |
items[].balances[].difference | integer | |
items[].balances[].plan_amount | integer | |
items[].balances[].actual_amount | integer | |
items[].supplier | object | |
items[].supplier.id | integer | ID |
items[].supplier.creator_id | integer | Создатель |
items[].supplier.company_id | integer | Компания |
items[].supplier.name | string | Название |
items[].supplier.full_name | string | ФИО |
items[].supplier.type | string | Тип |
items[].supplier.phone | string | Телефон |
items[].supplier.additional_phones | array | Дополнительные телефоны |
items[].supplier.inn | null | ИНН |
items[].supplier.address | null | Адрес |
items[].supplier.category | null | Категория |
items[].supplier.currency | string | Валюта |
items[].supplier.currencies | array | Валюты |
items[].supplier.bank_account | null | Расчётный счёт |
items[].supplier.mfo | null | МФО |
items[].supplier.bank_name | null | Банк |
items[].supplier.photo | null | |
items[].supplier.photo_thumbs | array | |
items[].supplier.start_balances | object | |
items[].supplier.start_balances.eur | integer | |
items[].supplier.start_balances.rub | integer | |
items[].supplier.start_balances.usd | integer | |
items[].supplier.start_balances.uzs | integer | |
items[].supplier.start_balance_set_at | null | |
items[].supplier.created_at | string | Создано |
items[].supplier.updated_at | string | Обновлено |
items[].supplier.is_deleted | boolean | Удалена |
{
"totals": {
"uzs": {
"plan": -3250000,
"actual": -3000000,
"difference": 250000
},
"usd": {
"plan": -1400,
"actual": -1400,
"difference": 0
}
},
"positions": 2,
"company_id": 1,
"creator_id": 2,
"number": 1001,
"date": "2026-11-25",
"comment": "Остаток, перенесённый из старой системы",
"status": "completed",
"completed_at": "2026-11-25 16:49:00",
"updated_at": "2026-11-25 16:49:00",
"created_at": "2026-11-25 16:49:00",
"id": 1,
"items": [
{
"id": 1,
"document_id": 1,
"supplier_id": 50,
"balances": [
{
"currency": "uzs",
"difference": 750000,
"plan_amount": -3750000,
"actual_amount": -3000000
}
],
"supplier": {
"id": 50,
"creator_id": 2,
"company_id": 1,
"name": "Dena Foods MChJ",
"full_name": "Dena Foods MChJ",
"type": "entity",
"phone": "998906693487",
"additional_phones": [],
"inn": null,
"address": null,
"category": null,
"currency": "uzs",
"currencies": [
"uzs"
],
"bank_account": null,
"mfo": null,
"bank_name": null,
"photo": null,
"photo_thumbs": [],
"start_balances": {
"eur": 0,
"rub": 0,
"usd": 0,
"uzs": 0
},
"start_balance_set_at": null,
"created_at": "2026-11-25 16:49:00",
"updated_at": "2026-11-25 16:49:00",
"is_deleted": false
}
},
{
"id": 2,
"document_id": 1,
"supplier_id": 51,
"balances": [
{
"currency": "uzs",
"difference": -500000,
"plan_amount": 500000,
"actual_amount": 0
},
{
"currency": "usd",
"difference": 0,
"plan_amount": -1400,
"actual_amount": -1400
}
],
"supplier": {
"id": 51,
"creator_id": 2,
"company_id": 1,
"name": "«Artel Savdo»",
"full_name": "«Artel Savdo»",
"type": "entity",
"phone": "998906216185",
"additional_phones": [],
"inn": null,
"address": null,
"category": null,
"currency": "uzs",
"currencies": [
"uzs",
"usd"
],
"bank_account": null,
"mfo": null,
"bank_name": null,
"photo": null,
"photo_thumbs": [],
"start_balances": {
"eur": 0,
"rub": 0,
"usd": 0,
"uzs": 0
},
"start_balance_set_at": null,
"created_at": "2026-11-25 16:49:00",
"updated_at": "2026-11-25 16:49:00",
"is_deleted": false
}
}
]
}Изменить черновик
Те же поля, что при создании; меняется только черновик (проведённый — 400). status = completed проводит его.
/company/supplier/balance-document/{model}Из формы (
multipart/form-data) методPUTотправляется какPOSTс параметром?_method=PUT.
Заголовки
| Заголовок | Значение | Описание |
|---|---|---|
Authorization | Bearer {token} | Токен из POST /common/auth/login |
Accept | application/json | Ответ в JSON |
Accept-Language | ru | Язык сообщений и названий: ru, uz, oz |
Параметры пути
| Параметр | Описание |
|---|---|
model | ID записи |
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
date | string (date) | Да | Дата. Формат Y-m-d. Не позже сегодняшнего дня |
comment | string | Нет | Комментарий. Макс. 1000 символов |
status | string | Да | Статус. Допустимые значения: draft, completed |
items | object[] | Да | Состав. Мин. 1 элементов |
items[].supplier_id | integer | Да | Поставщик. Без повторов. ID существующей записи, доступной пользователю |
items[].balances | object[] | Да (можно null) | Фактические суммы |
items[].balances[].currency | string | Да | Валюта. Допустимые значения: uzs, usd, eur, rub |
items[].balances[].actual_amount | number | Да | Факт. До 2 знаков после запятой. Не меньше -1000000000. Не больше 1000000000 |
{
"date": "2026-11-25",
"comment": "Сверка",
"status": "completed",
"items": [
{
"supplier_id": 77,
"balances": [
{
"currency": "usd",
"actual_amount": -1000
}
]
}
]
}curl -X PUT "https://api.wasyt.uz/company/supplier/balance-document/10" \
-H "Accept: application/json" \
-H "Accept-Language: ru" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"date":"2026-11-25","comment":"Сверка","status":"completed","items":[{"supplier_id":77,"balances":[{"currency":"usd","actual_amount":-1000}]}]}'Ответ · 200
Поля ответа
| Поле | Тип | Описание |
|---|---|---|
id | integer | ID |
creator_id | integer | Создатель |
company_id | integer | Компания |
number | integer | Номер |
date | string | Дата |
comment | string | Комментарий |
status | string | Статус |
positions | integer | |
totals | object | |
totals.usd | object | |
totals.usd.plan | integer | |
totals.usd.actual | integer | |
totals.usd.difference | integer | |
completed_at | string | |
created_at | string | Создано |
updated_at | string | Обновлено |
items | object[] | Состав |
items[].id | integer | ID |
items[].document_id | integer | |
items[].supplier_id | integer | Поставщик |
items[].balances | object[] | |
items[].balances[].currency | string | Валюта |
items[].balances[].difference | integer | |
items[].balances[].plan_amount | integer | |
items[].balances[].actual_amount | integer | |
items[].supplier | object | |
items[].supplier.id | integer | ID |
items[].supplier.creator_id | integer | Создатель |
items[].supplier.company_id | integer | Компания |
items[].supplier.name | string | Название |
items[].supplier.full_name | string | ФИО |
items[].supplier.type | string | Тип |
items[].supplier.phone | string | Телефон |
items[].supplier.additional_phones | array | Дополнительные телефоны |
items[].supplier.inn | null | ИНН |
items[].supplier.address | null | Адрес |
items[].supplier.category | null | Категория |
items[].supplier.currency | string | Валюта |
items[].supplier.currencies | array | Валюты |
items[].supplier.bank_account | null | Расчётный счёт |
items[].supplier.mfo | null | МФО |
items[].supplier.bank_name | null | Банк |
items[].supplier.photo | null | |
items[].supplier.photo_thumbs | array | |
items[].supplier.start_balances | object | |
items[].supplier.start_balances.eur | integer | |
items[].supplier.start_balances.rub | integer | |
items[].supplier.start_balances.usd | integer | |
items[].supplier.start_balances.uzs | integer | |
items[].supplier.start_balance_set_at | null | |
items[].supplier.created_at | string | Создано |
items[].supplier.updated_at | string | Обновлено |
items[].supplier.is_deleted | boolean | Удалена |
{
"id": 10,
"creator_id": 2,
"company_id": 1,
"number": 1001,
"date": "2026-11-25",
"comment": "Сверка",
"status": "completed",
"positions": 1,
"totals": {
"usd": {
"plan": -1400,
"actual": -1000,
"difference": 400
}
},
"completed_at": "2026-11-25 16:49:02",
"created_at": "2026-11-25 16:49:02",
"updated_at": "2026-11-25 16:49:02",
"items": [
{
"id": 12,
"document_id": 10,
"supplier_id": 77,
"balances": [
{
"currency": "usd",
"difference": 400,
"plan_amount": -1400,
"actual_amount": -1000
}
],
"supplier": {
"id": 77,
"creator_id": 2,
"company_id": 1,
"name": "«Artel Savdo»",
"full_name": "«Artel Savdo»",
"type": "entity",
"phone": "998909166237",
"additional_phones": [],
"inn": null,
"address": null,
"category": null,
"currency": "uzs",
"currencies": [
"uzs",
"usd"
],
"bank_account": null,
"mfo": null,
"bank_name": null,
"photo": null,
"photo_thumbs": [],
"start_balances": {
"eur": 0,
"rub": 0,
"usd": 0,
"uzs": 0
},
"start_balance_set_at": null,
"created_at": "2026-11-25 16:49:02",
"updated_at": "2026-11-25 16:49:02",
"is_deleted": false
}
}
]
}
