@floristcloud/api-lib 1.2.109 → 1.2.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/commands/client/get-client-calculate.query.js +6 -4
- package/build/commands/consignment/execute-consignment-product-update.command.js +5 -4
- package/build/commands/integration/moysklad/execute-moysklad-import.command.js +3 -2
- package/build/commands/integration/moysklad/preview-moysklad-products.query.js +3 -2
- package/build/commands/integration/moysklad/scan-moysklad-import.query.js +3 -2
- package/build/commands/order/create-order.command.js +2 -1
- package/build/commands/order/update-order.command.js +3 -2
- package/build/commands/order/webshop/get-order-sales-by-month.query.js +2 -1
- package/build/commands/order-product/create-order-product.command.js +2 -1
- package/build/commands/order-product/group/price-valuation-execute.command.js +3 -1
- package/build/commands/order-product/update-order-product.command.js +2 -1
- package/build/commands/payment-invoice/create-payment-invoice.command.js +3 -1
- package/build/commands/payment-invoice/pay-payment-invoice.command.js +3 -1
- package/build/commands/pre-order-collection-item/execute-pre-order-collection-item-update.command.js +3 -2
- package/build/commands/pre-order-collection-item/get-pre-order-collection-item-grouped-list-for-client.query.js +1 -0
- package/build/commands/pre-order-collection-item/get-pre-order-collection-item-list-filter-values-for-client.query.js +2 -0
- package/build/commands/pre-order-collection-item/get-pre-order-collection-item-list-filter-values.query.js +2 -0
- package/build/commands/pre-order-collection-item/get-pre-order-collection-item-list-for-client.query.js +1 -0
- package/build/commands/pre-order-collection-item/get-pre-order-collection-item-list.query.js +1 -0
- package/build/commands/pre-order-collection-item/multiplicity-option/create-pre-order-collection-item-multiplicity-option.command.js +2 -1
- package/build/commands/pre-order-collection-item/multiplicity-option/update-pre-order-collection-item-multiplicity-option.command.js +2 -1
- package/build/commands/product/create-product.command.js +4 -3
- package/build/commands/product/group/update-group-product-prices.command.js +3 -2
- package/build/commands/product/group/update-group-product-update-batch.command.js +4 -3
- package/build/commands/product/multiplicity-option/create-product-multiplicity-option.command.js +2 -1
- package/build/commands/product/multiplicity-option/update-product-multiplicity-option.command.js +2 -1
- package/build/commands/product/update-product.command.js +4 -3
- package/build/commands/report/get-cash-flow.query.js +8 -5
- package/build/commands/report/get-daily-orders-summary.query.js +2 -1
- package/build/commands/report/get-report-for-period.query.js +10 -9
- package/build/commands/report/get-report-group-by-client.query.js +11 -10
- package/build/commands/report/get-report-group-by-position.query.js +15 -14
- package/build/commands/report/get-sales-summary.query.js +13 -11
- package/build/commands/transaction/generate-check-transaction.command.js +2 -1
- package/build/commands/transaction/generate-pre-payment-check.command.js +2 -1
- package/build/commands/transaction/get-sum-transaction-by-money-account.query.js +3 -1
- package/build/commands/transaction/get-transaction-summary.query.js +5 -3
- package/build/commands/write-off/get-write-off-sum-by-order.query.js +3 -1
- package/build/commands/write-off/update-write-off-price.command.js +2 -1
- package/build/schemas/action-log/action-log-money.schema.js +28 -0
- package/build/schemas/action-log/index.js +1 -0
- package/build/schemas/action-log/order-info.schema.js +3 -2
- package/build/schemas/action-log/order-product-info.schema.js +2 -1
- package/build/schemas/action-log/order-product-update-action-log.schema.js +2 -1
- package/build/schemas/action-log/pre-order-product-info.schema.js +2 -1
- package/build/schemas/action-log/pre-order-product-update-action-log.schema.js +2 -1
- package/build/schemas/action-log/transaction-info.schema.js +2 -1
- package/build/schemas/bank-payment/bank-payment.schema.js +2 -1
- package/build/schemas/client/client-debt.schema.js +8 -5
- package/build/schemas/client/client.schema.js +2 -1
- package/build/schemas/consignment/consignment.schema.js +10 -9
- package/build/schemas/consignment-transfer/accept-consignment-transfer.schema.js +3 -1
- package/build/schemas/consignment-transfer/consignment-transfer-request-item.schema.js +2 -1
- package/build/schemas/delivery-route/delivery-route.schema.js +2 -1
- package/build/schemas/discount-rules/discount-rules.schema.js +9 -2
- package/build/schemas/index.js +3 -0
- package/build/schemas/money-account/money-account-with-balance.schema.js +2 -2
- package/build/schemas/money.schema.js +27 -0
- package/build/schemas/non-negative-money.schema.js +17 -0
- package/build/schemas/order/order.schema.js +10 -9
- package/build/schemas/order-product/order-product-multiplicity-optiom.schema.js +2 -1
- package/build/schemas/order-product/order-product.schema.js +5 -4
- package/build/schemas/order-product/price-correction-analyze-item.schema.js +10 -8
- package/build/schemas/order-product/price-correction-execute-result-item.schema.js +3 -2
- package/build/schemas/order-service-line/order-service-line.schema.js +12 -5
- package/build/schemas/payment-invoice/payment-invoice.schema.js +5 -4
- package/build/schemas/positive-money.schema.js +18 -0
- package/build/schemas/pre-order/pre-order.schema.js +2 -1
- package/build/schemas/pre-order-collection-item/pre-order-collection-item-multiplicity-option.schema.js +2 -1
- package/build/schemas/pre-order-collection-item/pre-order-collection-item.schema.js +4 -3
- package/build/schemas/pre-order-product/pre-order-product.schema.js +5 -4
- package/build/schemas/product/product-multiplicity-option.schema.js +2 -1
- package/build/schemas/product/product.schema.js +6 -5
- package/build/schemas/report/client-by-weeks.schema.js +2 -1
- package/build/schemas/report/client-statement.schema.js +2 -1
- package/build/schemas/report/inventory-turnover-category-item.schema.js +1 -1
- package/build/schemas/report/inventory-turnover-detailed-item.schema.js +1 -1
- package/build/schemas/report/sales-by-client-row.schema.js +9 -8
- package/build/schemas/report/sales-by-client-top-item.schema.js +2 -1
- package/build/schemas/service/service.schema.js +8 -3
- package/build/schemas/settings/settings.schema.js +6 -2
- package/build/schemas/transaction/transaction.schema.js +2 -1
- package/commands/client/get-client-calculate.query.ts +6 -4
- package/commands/consignment/execute-consignment-product-update.command.ts +5 -4
- package/commands/integration/moysklad/execute-moysklad-import.command.ts +3 -2
- package/commands/integration/moysklad/preview-moysklad-products.query.ts +3 -2
- package/commands/integration/moysklad/scan-moysklad-import.query.ts +3 -2
- package/commands/order/create-order.command.ts +2 -1
- package/commands/order/update-order.command.ts +3 -2
- package/commands/order/webshop/get-order-sales-by-month.query.ts +3 -1
- package/commands/order-product/create-order-product.command.ts +2 -1
- package/commands/order-product/group/price-valuation-execute.command.ts +4 -1
- package/commands/order-product/update-order-product.command.ts +2 -1
- package/commands/payment-invoice/create-payment-invoice.command.ts +4 -1
- package/commands/payment-invoice/pay-payment-invoice.command.ts +4 -1
- package/commands/pre-order-collection-item/execute-pre-order-collection-item-update.command.ts +3 -2
- package/commands/pre-order-collection-item/get-pre-order-collection-item-grouped-list-for-client.query.ts +1 -0
- package/commands/pre-order-collection-item/get-pre-order-collection-item-list-filter-values-for-client.query.ts +2 -0
- package/commands/pre-order-collection-item/get-pre-order-collection-item-list-filter-values.query.ts +2 -0
- package/commands/pre-order-collection-item/get-pre-order-collection-item-list-for-client.query.ts +1 -0
- package/commands/pre-order-collection-item/get-pre-order-collection-item-list.query.ts +1 -0
- package/commands/pre-order-collection-item/multiplicity-option/create-pre-order-collection-item-multiplicity-option.command.ts +2 -1
- package/commands/pre-order-collection-item/multiplicity-option/update-pre-order-collection-item-multiplicity-option.command.ts +2 -1
- package/commands/product/create-product.command.ts +4 -3
- package/commands/product/group/update-group-product-prices.command.ts +3 -2
- package/commands/product/group/update-group-product-update-batch.command.ts +4 -3
- package/commands/product/multiplicity-option/create-product-multiplicity-option.command.ts +2 -1
- package/commands/product/multiplicity-option/update-product-multiplicity-option.command.ts +2 -1
- package/commands/product/update-product.command.ts +4 -3
- package/commands/report/get-cash-flow.query.ts +8 -5
- package/commands/report/get-daily-orders-summary.query.ts +2 -1
- package/commands/report/get-report-for-period.query.ts +10 -9
- package/commands/report/get-report-group-by-client.query.ts +11 -10
- package/commands/report/get-report-group-by-position.query.ts +15 -14
- package/commands/report/get-sales-summary.query.ts +13 -11
- package/commands/transaction/generate-check-transaction.command.ts +2 -1
- package/commands/transaction/generate-pre-payment-check.command.ts +2 -1
- package/commands/transaction/get-sum-transaction-by-money-account.query.ts +3 -1
- package/commands/transaction/get-transaction-summary.query.ts +5 -3
- package/commands/write-off/get-write-off-sum-by-order.query.ts +4 -1
- package/commands/write-off/update-write-off-price.command.ts +2 -1
- package/package.json +1 -1
- package/schemas/action-log/action-log-money.schema.ts +26 -0
- package/schemas/action-log/index.ts +1 -0
- package/schemas/action-log/order-info.schema.ts +3 -2
- package/schemas/action-log/order-product-info.schema.ts +2 -1
- package/schemas/action-log/order-product-update-action-log.schema.ts +2 -1
- package/schemas/action-log/pre-order-product-info.schema.ts +2 -1
- package/schemas/action-log/pre-order-product-update-action-log.schema.ts +2 -1
- package/schemas/action-log/transaction-info.schema.ts +2 -1
- package/schemas/bank-payment/bank-payment.schema.ts +2 -1
- package/schemas/client/client-debt.schema.ts +8 -5
- package/schemas/client/client.schema.ts +2 -1
- package/schemas/consignment/consignment.schema.ts +10 -9
- package/schemas/consignment-transfer/accept-consignment-transfer.schema.ts +4 -1
- package/schemas/consignment-transfer/consignment-transfer-request-item.schema.ts +2 -1
- package/schemas/delivery-route/delivery-route.schema.ts +2 -1
- package/schemas/discount-rules/discount-rules.schema.ts +9 -2
- package/schemas/index.ts +3 -0
- package/schemas/money-account/money-account-with-balance.schema.ts +2 -1
- package/schemas/money.schema.ts +25 -0
- package/schemas/non-negative-money.schema.ts +15 -0
- package/schemas/order/order.schema.ts +10 -9
- package/schemas/order-product/order-product-multiplicity-optiom.schema.ts +2 -1
- package/schemas/order-product/order-product.schema.ts +5 -4
- package/schemas/order-product/price-correction-analyze-item.schema.ts +10 -8
- package/schemas/order-product/price-correction-execute-result-item.schema.ts +3 -2
- package/schemas/order-service-line/order-service-line.schema.ts +13 -5
- package/schemas/payment-invoice/payment-invoice.schema.ts +5 -4
- package/schemas/positive-money.schema.ts +16 -0
- package/schemas/pre-order/pre-order.schema.ts +2 -1
- package/schemas/pre-order-collection-item/pre-order-collection-item-multiplicity-option.schema.ts +3 -1
- package/schemas/pre-order-collection-item/pre-order-collection-item.schema.ts +4 -3
- package/schemas/pre-order-product/pre-order-product.schema.ts +5 -4
- package/schemas/product/product-multiplicity-option.schema.ts +2 -1
- package/schemas/product/product.schema.ts +6 -5
- package/schemas/report/client-by-weeks.schema.ts +2 -1
- package/schemas/report/client-statement.schema.ts +2 -1
- package/schemas/report/inventory-turnover-category-item.schema.ts +1 -1
- package/schemas/report/inventory-turnover-detailed-item.schema.ts +1 -1
- package/schemas/report/sales-by-client-row.schema.ts +9 -8
- package/schemas/report/sales-by-client-top-item.schema.ts +2 -1
- package/schemas/service/service.schema.ts +9 -3
- package/schemas/settings/settings.schema.ts +7 -2
- package/schemas/transaction/transaction.schema.ts +2 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { OrderStatusEnum, OrderTypeEnum } from '../../enum';
|
|
3
3
|
import { OrderSchema } from '../../schemas';
|
|
4
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
4
5
|
|
|
5
6
|
const UpdateOrderRequestSchema = z.object({
|
|
6
7
|
clientUUID: z.uuid(),
|
|
7
8
|
branchUUID: z.uuid().nullable(),
|
|
8
|
-
deliveryCost:
|
|
9
|
+
deliveryCost: MoneySchema,
|
|
9
10
|
type: z.nativeEnum(OrderTypeEnum),
|
|
10
11
|
comment: z.string().nullable(),
|
|
11
12
|
clientComment: z.string().nullable(),
|
|
@@ -13,7 +14,7 @@ const UpdateOrderRequestSchema = z.object({
|
|
|
13
14
|
status: z.nativeEnum(OrderStatusEnum),
|
|
14
15
|
isPaid: z.coerce.boolean(),
|
|
15
16
|
deliveryVat: z.coerce.number().nullable(),
|
|
16
|
-
deliveryVatAmount:
|
|
17
|
+
deliveryVatAmount: MoneySchema,
|
|
17
18
|
completedAt: z.coerce.date().nullable().optional(),
|
|
18
19
|
paymentDueAt: z.coerce.date().nullable().optional(),
|
|
19
20
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { MoneySchema } from '../../../schemas/money.schema';
|
|
3
|
+
import { NonNegativeMoneySchema } from '../../../schemas/non-negative-money.schema';
|
|
2
4
|
|
|
3
5
|
const GetOrderSalesByMonthRequestSchema = z.object({
|
|
4
6
|
month: z.coerce.number().int().min(1).max(12),
|
|
@@ -6,7 +8,7 @@ const GetOrderSalesByMonthRequestSchema = z.object({
|
|
|
6
8
|
|
|
7
9
|
const GetOrderSalesByMonthResponseSchema = z.object({
|
|
8
10
|
message: z.string().optional(),
|
|
9
|
-
data:
|
|
11
|
+
data: NonNegativeMoneySchema,
|
|
10
12
|
});
|
|
11
13
|
|
|
12
14
|
export namespace GetOrderSalesByMonthContractQuery {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { OrderProductSchema } from '../../schemas';
|
|
3
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
3
4
|
|
|
4
5
|
const CreateOrderProductRequestSchema = z.object({
|
|
5
6
|
quantity: z.number(),
|
|
6
|
-
price:
|
|
7
|
+
price: MoneySchema,
|
|
7
8
|
comment: z.string().nullable(),
|
|
8
9
|
tag: z.string().nullable(),
|
|
9
10
|
isEditable: z.coerce.boolean(),
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { PriceCorrectionExecuteResultItemSchema } from '../../../schemas';
|
|
3
|
+
import { MoneySchema } from '../../../schemas/money.schema';
|
|
4
|
+
import { NonNegativeMoneySchema } from '../../../schemas/non-negative-money.schema';
|
|
3
5
|
|
|
4
6
|
const PRICE_VALUATION_BATCH_LIMIT = 50;
|
|
5
7
|
|
|
6
8
|
const PriceValuationExecuteItemSchema = z.object({
|
|
7
9
|
orderProductUUID: z.string().uuid(),
|
|
8
|
-
|
|
10
|
+
// Неотрицательность проверяем по знаку строки: минус — единственный признак отрицательной суммы.
|
|
11
|
+
price: NonNegativeMoneySchema,
|
|
9
12
|
});
|
|
10
13
|
|
|
11
14
|
const PriceValuationExecuteRequestSchema = z.object({
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { OrderProductSchema } from '../../schemas';
|
|
3
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
3
4
|
|
|
4
5
|
const UpdateOrderProductRequestSchema = z.object({
|
|
5
6
|
productUUID: z.uuid(),
|
|
6
7
|
quantity: z.number(),
|
|
7
|
-
price:
|
|
8
|
+
price: MoneySchema,
|
|
8
9
|
comment: z.string().nullable(),
|
|
9
10
|
tag: z.string().nullable(),
|
|
10
11
|
isEditable: z.coerce.boolean(),
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { PaymentInvoiceSchema } from '../../schemas/payment-invoice/payment-invoice.schema';
|
|
3
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
4
|
+
import { PositiveMoneySchema } from '../../schemas/positive-money.schema';
|
|
3
5
|
|
|
4
6
|
// Потолок числа заказов в счёте. Это защита от абсурдного запроса, а не бизнес-правило: счёт за месяц
|
|
5
7
|
// клиенту с ежедневными поставками — это уже 30 строк, поэтому 10-20 отрезали бы живые сценарии.
|
|
@@ -15,7 +17,8 @@ const CreatePaymentInvoiceRequestSchema = z
|
|
|
15
17
|
clientUUID: z.uuid(),
|
|
16
18
|
invoiceDate: z.coerce.date(),
|
|
17
19
|
orderUUIDs: z.uuid().array().max(MAX_INVOICE_ORDER_COUNT).optional(),
|
|
18
|
-
|
|
20
|
+
// Строго положительная сумма: отсекаем минус по знаку строки и нулевые записи вида "0" / "0.00".
|
|
21
|
+
amount: PositiveMoneySchema.optional(),
|
|
19
22
|
})
|
|
20
23
|
.refine(value => Boolean(value.orderUUIDs?.length) || value.amount !== undefined, {
|
|
21
24
|
message: 'Either orderUUIDs or amount must be provided',
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { PaymentInvoiceSchema } from '../../schemas/payment-invoice/payment-invoice.schema';
|
|
3
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
4
|
+
import { PositiveMoneySchema } from '../../schemas/positive-money.schema';
|
|
3
5
|
|
|
4
6
|
// Оплата по счёту. amount не передан — гасим остаток целиком; передан — частичная оплата.
|
|
5
7
|
const PayPaymentInvoiceRequestSchema = z.object({
|
|
6
8
|
moneyAccountUUID: z.uuid(),
|
|
7
|
-
|
|
9
|
+
// Строго положительная сумма: отсекаем минус по знаку строки и нулевые записи вида "0" / "0.00".
|
|
10
|
+
amount: PositiveMoneySchema.optional(),
|
|
8
11
|
comment: z.string().optional(),
|
|
9
12
|
cashFlowItemUUID: z.uuid().nullable().optional(),
|
|
10
13
|
createdAt: z.coerce.date().optional(),
|
package/commands/pre-order-collection-item/execute-pre-order-collection-item-update.command.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ErrorMessageSchema } from '../../schemas/error-message.schema';
|
|
3
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
3
4
|
|
|
4
5
|
const OptionUpdateSchema = z.object({
|
|
5
6
|
title: z.string().nullable().optional(),
|
|
6
7
|
optionMultiplicity: z.number().nullable().optional(),
|
|
7
|
-
optionPrice:
|
|
8
|
+
optionPrice: MoneySchema.nullable().optional(),
|
|
8
9
|
});
|
|
9
10
|
|
|
10
11
|
const PositionUpdateSchema = z.object({
|
|
@@ -12,7 +13,7 @@ const PositionUpdateSchema = z.object({
|
|
|
12
13
|
multiplicity: z.number().nullable().optional(),
|
|
13
14
|
quantity: z.number().nullable().optional(),
|
|
14
15
|
balance: z.number().nullable().optional(),
|
|
15
|
-
price:
|
|
16
|
+
price: MoneySchema.nullable().optional(),
|
|
16
17
|
advancedPrice: z.string().nullable().optional(),
|
|
17
18
|
grower: z.string().nullable().optional(),
|
|
18
19
|
size: z.string().nullable().optional(),
|
|
@@ -7,6 +7,7 @@ const GetPreOrderCollectionItemGroupedListForClientRequestSchema = z.object({
|
|
|
7
7
|
preOrderCollectionsUUID: z.array(z.string()).optional(),
|
|
8
8
|
categoriesUUID: z.array(z.string()).optional(),
|
|
9
9
|
growers: z.array(z.string()).optional(),
|
|
10
|
+
countries: z.array(z.string()).optional(),
|
|
10
11
|
searchQuery: z.string().optional(),
|
|
11
12
|
page: z.coerce.number().optional().default(1),
|
|
12
13
|
count: z.coerce.number().optional().default(10),
|
|
@@ -6,6 +6,7 @@ const GetPreOrderCollectionItemListFilterValuesForClientRequestSchema = z.object
|
|
|
6
6
|
preOrderCollectionsUUID: z.array(z.string()).optional(),
|
|
7
7
|
categoriesUUID: z.array(z.string()).optional(),
|
|
8
8
|
growers: z.array(z.string()).optional(),
|
|
9
|
+
countries: z.array(z.string()).optional(),
|
|
9
10
|
});
|
|
10
11
|
|
|
11
12
|
const GetPreOrderCollectionItemListFilterValuesForClientResponseSchema = z.object({
|
|
@@ -13,6 +14,7 @@ const GetPreOrderCollectionItemListFilterValuesForClientResponseSchema = z.objec
|
|
|
13
14
|
data: z.object({
|
|
14
15
|
sizes: z.array(z.string()).optional(),
|
|
15
16
|
growers: z.array(z.string()).optional(),
|
|
17
|
+
countries: z.array(z.string()).optional(),
|
|
16
18
|
colors: z.array(z.string()).optional(),
|
|
17
19
|
categories: z.array(z.object({ uuid: z.string(), name: z.string() })),
|
|
18
20
|
preOrderCollectionsUUID: z.array(z.string()).optional(),
|
package/commands/pre-order-collection-item/get-pre-order-collection-item-list-filter-values.query.ts
CHANGED
|
@@ -4,6 +4,7 @@ const GetPreOrderCollectionItemListFilterValuesRequestSchema = z.object({
|
|
|
4
4
|
sizes: z.array(z.string()).optional(),
|
|
5
5
|
colors: z.array(z.string()).optional(),
|
|
6
6
|
growers: z.array(z.string()).optional(),
|
|
7
|
+
countries: z.array(z.string()).optional(),
|
|
7
8
|
categoriesUUID: z.array(z.string()).optional(),
|
|
8
9
|
});
|
|
9
10
|
|
|
@@ -12,6 +13,7 @@ const GetPreOrderCollectionItemListFilterValuesResponseSchema = z.object({
|
|
|
12
13
|
data: z.object({
|
|
13
14
|
sizes: z.array(z.string()),
|
|
14
15
|
growers: z.array(z.string()),
|
|
16
|
+
countries: z.array(z.string()),
|
|
15
17
|
categories: z.array(z.object({ uuid: z.string(), name: z.string() })),
|
|
16
18
|
colors: z.array(z.string()),
|
|
17
19
|
}),
|
package/commands/pre-order-collection-item/get-pre-order-collection-item-list-for-client.query.ts
CHANGED
|
@@ -7,6 +7,7 @@ const GetPreOrderCollectionItemListForClientRequestSchema = z.object({
|
|
|
7
7
|
preOrderCollectionsUUID: z.array(z.string()).optional(),
|
|
8
8
|
categoriesUUID: z.array(z.string()).optional(),
|
|
9
9
|
growers: z.array(z.string()).optional(),
|
|
10
|
+
countries: z.array(z.string()).optional(),
|
|
10
11
|
searchQuery: z.string().optional(),
|
|
11
12
|
page: z.coerce.number().optional().default(1),
|
|
12
13
|
count: z.coerce.number().optional().default(10),
|
|
@@ -7,6 +7,7 @@ const GetPreOrderCollectionItemListRequestSchema = z.object({
|
|
|
7
7
|
sizes: z.array(z.string()).optional(),
|
|
8
8
|
colors: z.array(z.string()).optional(),
|
|
9
9
|
growers: z.array(z.string()).optional(),
|
|
10
|
+
countries: z.array(z.string()).optional(),
|
|
10
11
|
categoriesUUID: z.array(z.string()).optional(),
|
|
11
12
|
searchQuery: z.string().optional(),
|
|
12
13
|
hasPreOrder: z.coerce.boolean().optional(),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { PreOrderCollectionItemMultiplicityOptionSchema } from '../../../schemas';
|
|
3
|
+
import { NonNegativeMoneySchema } from '../../../schemas/non-negative-money.schema';
|
|
3
4
|
|
|
4
5
|
const CreatePreOrderCollectionItemMultiplicityOptionRequestSchema = z.object({
|
|
5
6
|
title: z.string().max(100).nullable().optional(),
|
|
6
7
|
optionMultiplicity: z.coerce.number().int().min(1),
|
|
7
|
-
optionPrice:
|
|
8
|
+
optionPrice: NonNegativeMoneySchema.nullable().optional(),
|
|
8
9
|
rank: z.coerce.number().int().min(0).default(0).optional(),
|
|
9
10
|
});
|
|
10
11
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { PreOrderCollectionItemMultiplicityOptionSchema } from '../../../schemas';
|
|
3
|
+
import { NonNegativeMoneySchema } from '../../../schemas/non-negative-money.schema';
|
|
3
4
|
|
|
4
5
|
const UpdatePreOrderCollectionItemMultiplicityOptionRequestSchema = z
|
|
5
6
|
.object({
|
|
6
7
|
title: z.string().max(100).nullable(),
|
|
7
8
|
optionMultiplicity: z.coerce.number().int().min(1),
|
|
8
|
-
optionPrice:
|
|
9
|
+
optionPrice: NonNegativeMoneySchema.nullable(),
|
|
9
10
|
rank: z.coerce.number().int().min(0).default(0),
|
|
10
11
|
})
|
|
11
12
|
.partial();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ProductMarkEnum, SalesUnitEnum } from '../../enum';
|
|
3
3
|
import { ProductExtendedForAdminSchema } from '../../schemas';
|
|
4
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
4
5
|
|
|
5
6
|
const CreateProductRequestSchema = z.object({
|
|
6
7
|
name: z.string(),
|
|
@@ -8,8 +9,8 @@ const CreateProductRequestSchema = z.object({
|
|
|
8
9
|
categoryUUID: z.string(),
|
|
9
10
|
balance: z.number(),
|
|
10
11
|
quantity: z.number(),
|
|
11
|
-
price:
|
|
12
|
-
costPrice:
|
|
12
|
+
price: MoneySchema,
|
|
13
|
+
costPrice: MoneySchema,
|
|
13
14
|
multiplicity: z.number(),
|
|
14
15
|
isOpen: z.coerce.boolean(),
|
|
15
16
|
|
|
@@ -20,7 +21,7 @@ const CreateProductRequestSchema = z.object({
|
|
|
20
21
|
size: z.string().nullable(),
|
|
21
22
|
size2: z.string().nullable(),
|
|
22
23
|
size3: z.string().nullable(),
|
|
23
|
-
invoicePrice:
|
|
24
|
+
invoicePrice: MoneySchema.nullable(),
|
|
24
25
|
invoiceNumber: z.string().nullable(),
|
|
25
26
|
imageUUID: z.string().nullable(),
|
|
26
27
|
country: z.string().nullable(),
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { MoneySchema } from '../../../schemas/money.schema';
|
|
2
3
|
|
|
3
4
|
const UpdateGroupProductPricesRequestSchema = z.object({
|
|
4
5
|
data: z
|
|
5
6
|
.object({
|
|
6
7
|
productUUID: z.string(),
|
|
7
|
-
newCost:
|
|
8
|
-
newPrice:
|
|
8
|
+
newCost: MoneySchema,
|
|
9
|
+
newPrice: MoneySchema.optional(),
|
|
9
10
|
})
|
|
10
11
|
.array(),
|
|
11
12
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { SalesUnitEnum } from '../../../enum';
|
|
3
3
|
import { ErrorMessageSchema } from '../../../schemas/error-message.schema';
|
|
4
|
+
import { MoneySchema } from '../../../schemas/money.schema';
|
|
4
5
|
|
|
5
6
|
const UpdateGroupProductUpdateBatchRequestSchema = z.object({
|
|
6
7
|
productUUIDList: z.array(z.string()),
|
|
@@ -8,15 +9,15 @@ const UpdateGroupProductUpdateBatchRequestSchema = z.object({
|
|
|
8
9
|
.object({
|
|
9
10
|
name: z.string(),
|
|
10
11
|
categoryUUID: z.string(),
|
|
11
|
-
price:
|
|
12
|
-
costPrice:
|
|
12
|
+
price: MoneySchema,
|
|
13
|
+
costPrice: MoneySchema,
|
|
13
14
|
color: z.string().nullable(),
|
|
14
15
|
size: z.string().nullable(),
|
|
15
16
|
multiplicity: z.coerce.number(),
|
|
16
17
|
size2: z.string().nullable(),
|
|
17
18
|
grower: z.string().nullable(),
|
|
18
19
|
country: z.string().nullable(),
|
|
19
|
-
invoicePrice:
|
|
20
|
+
invoicePrice: MoneySchema.nullable(),
|
|
20
21
|
invoiceNumber: z.string().nullable(),
|
|
21
22
|
imageUUID: z.string().nullable(),
|
|
22
23
|
multiplicityDescription: z.string().nullable(),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ProductMultiplicityOptionSchema } from '../../../schemas';
|
|
3
|
+
import { NonNegativeMoneySchema } from '../../../schemas/non-negative-money.schema';
|
|
3
4
|
|
|
4
5
|
const CreateProductMultiplicityOptionRequestSchema = z.object({
|
|
5
6
|
title: z.string().max(100).nullable().optional(),
|
|
6
7
|
optionMultiplicity: z.coerce.number().int().min(1),
|
|
7
|
-
optionPrice:
|
|
8
|
+
optionPrice: NonNegativeMoneySchema.nullable().optional(),
|
|
8
9
|
rank: z.coerce.number().int().min(0).default(0).optional(),
|
|
9
10
|
});
|
|
10
11
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ProductMultiplicityOptionSchema } from '../../../schemas';
|
|
3
|
+
import { NonNegativeMoneySchema } from '../../../schemas/non-negative-money.schema';
|
|
3
4
|
|
|
4
5
|
const UpdateProductMultiplicityOptionRequestSchema = z
|
|
5
6
|
.object({
|
|
6
7
|
title: z.string().max(100).nullable(),
|
|
7
8
|
optionMultiplicity: z.coerce.number().int().min(1),
|
|
8
|
-
optionPrice:
|
|
9
|
+
optionPrice: NonNegativeMoneySchema.nullable(),
|
|
9
10
|
rank: z.coerce.number().int().min(0).default(0),
|
|
10
11
|
})
|
|
11
12
|
.partial();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ProductMarkEnum, SalesUnitEnum } from '../../enum';
|
|
3
3
|
import { ProductExtendedForAdminSchema } from '../../schemas';
|
|
4
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
4
5
|
|
|
5
6
|
const UpdateProductRequestSchema = z.object({
|
|
6
7
|
name: z.string(),
|
|
@@ -8,8 +9,8 @@ const UpdateProductRequestSchema = z.object({
|
|
|
8
9
|
categoryUUID: z.string(),
|
|
9
10
|
balance: z.number(),
|
|
10
11
|
quantity: z.number(),
|
|
11
|
-
price:
|
|
12
|
-
costPrice:
|
|
12
|
+
price: MoneySchema,
|
|
13
|
+
costPrice: MoneySchema,
|
|
13
14
|
multiplicity: z.number(),
|
|
14
15
|
isOpen: z.coerce.boolean(),
|
|
15
16
|
|
|
@@ -20,7 +21,7 @@ const UpdateProductRequestSchema = z.object({
|
|
|
20
21
|
size: z.string().nullable(),
|
|
21
22
|
size2: z.string().nullable(),
|
|
22
23
|
size3: z.string().nullable(),
|
|
23
|
-
invoicePrice:
|
|
24
|
+
invoicePrice: MoneySchema.nullable(),
|
|
24
25
|
invoiceNumber: z.string().nullable(),
|
|
25
26
|
imageUUID: z.string().nullable(),
|
|
26
27
|
country: z.string().nullable(),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { dateRangeCheck, isStatementPeriodWithinLimit } from '../../helpers/date.helper';
|
|
3
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
3
4
|
|
|
4
5
|
const GetCashFlowRequestSchema = z
|
|
5
6
|
.object({
|
|
@@ -28,8 +29,8 @@ const CashFlowItemRowSchema = z.object({
|
|
|
28
29
|
// null — строка "Без статьи": платежи, которым статью ещё не проставили.
|
|
29
30
|
cashFlowItemUUID: z.string().nullable(),
|
|
30
31
|
cashFlowItemName: z.string().nullable(),
|
|
31
|
-
income:
|
|
32
|
-
expense:
|
|
32
|
+
income: MoneySchema,
|
|
33
|
+
expense: MoneySchema,
|
|
33
34
|
transactionCount: z.number(),
|
|
34
35
|
});
|
|
35
36
|
|
|
@@ -43,9 +44,11 @@ const GetCashFlowResponseSchema = z.object({
|
|
|
43
44
|
byItem: CashFlowItemRowSchema.array(),
|
|
44
45
|
byMonth: CashFlowMonthRowSchema.array(),
|
|
45
46
|
totals: z.object({
|
|
46
|
-
income:
|
|
47
|
-
expense:
|
|
48
|
-
|
|
47
|
+
income: MoneySchema,
|
|
48
|
+
expense: MoneySchema,
|
|
49
|
+
// Сальдо (`income - expense`) — знаковая величина, минус здесь легален,
|
|
50
|
+
// поэтому ограничения на знак нет и быть не должно.
|
|
51
|
+
total: MoneySchema,
|
|
49
52
|
}),
|
|
50
53
|
}),
|
|
51
54
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { dateRangeCheck, isStatementPeriodWithinLimit } from '../../helpers/date.helper';
|
|
3
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
3
4
|
|
|
4
5
|
const GetDailyOrdersSummaryRequestSchema = z
|
|
5
6
|
.object({
|
|
@@ -24,7 +25,7 @@ const UnitsByMeasureSchema = z.object({
|
|
|
24
25
|
const metricsShape = {
|
|
25
26
|
ordersCreated: z.number(),
|
|
26
27
|
ordersCompleted: z.number(),
|
|
27
|
-
totalSum:
|
|
28
|
+
totalSum: MoneySchema,
|
|
28
29
|
unitsByMeasure: UnitsByMeasureSchema,
|
|
29
30
|
};
|
|
30
31
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { dateRangeCheck } from '../../helpers/date.helper';
|
|
3
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
3
4
|
|
|
4
5
|
const GetReportForPeriodRequestSchema = z
|
|
5
6
|
.object({
|
|
@@ -25,17 +26,17 @@ const GetReportForPeriodResponseSchema = z.object({
|
|
|
25
26
|
data: z.object({
|
|
26
27
|
totalOrders: z.number(),
|
|
27
28
|
soldUnits: z.number(),
|
|
28
|
-
totalSales:
|
|
29
|
-
totalCost:
|
|
29
|
+
totalSales: MoneySchema,
|
|
30
|
+
totalCost: MoneySchema,
|
|
30
31
|
totalUnits: z.number(),
|
|
31
|
-
totalWriteOff: z.number(),
|
|
32
|
-
totalWriteOffCost:
|
|
32
|
+
totalWriteOff: z.number(), // количество списанных единиц (SUM по quantity), не деньги
|
|
33
|
+
totalWriteOffCost: MoneySchema,
|
|
33
34
|
totalWriteOffByOrder: z.number(),
|
|
34
|
-
totalWriteOffCostByOrder:
|
|
35
|
-
totalVatAmount:
|
|
36
|
-
totalDeliveryCost:
|
|
37
|
-
middlePrice:
|
|
38
|
-
grossProfit:
|
|
35
|
+
totalWriteOffCostByOrder: MoneySchema,
|
|
36
|
+
totalVatAmount: MoneySchema,
|
|
37
|
+
totalDeliveryCost: MoneySchema,
|
|
38
|
+
middlePrice: MoneySchema,
|
|
39
|
+
grossProfit: MoneySchema,
|
|
39
40
|
marginality: z.number(),
|
|
40
41
|
}),
|
|
41
42
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { OrderByEnum, ReportSortByEnum } from '../../enum';
|
|
3
3
|
import { dateRangeCheck } from '../../helpers/date.helper';
|
|
4
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
4
5
|
import { ReportOrderFilterSchema } from '../../schemas/report/report-order-filter.schema';
|
|
5
6
|
|
|
6
7
|
const GetReportGroupByClientRequestSchema = z
|
|
@@ -49,16 +50,16 @@ const GetReportGroupByClientResponseSchema = z.object({
|
|
|
49
50
|
clientName: z.string(),
|
|
50
51
|
totalOrders: z.number(),
|
|
51
52
|
soldUnits: z.number(),
|
|
52
|
-
totalSales:
|
|
53
|
-
totalSalesCost:
|
|
54
|
-
totalWriteOff: z.number(),
|
|
55
|
-
totalWriteOffSales:
|
|
56
|
-
totalVatAmount:
|
|
57
|
-
totalDeliveryCost:
|
|
58
|
-
totalServiceAmount:
|
|
59
|
-
totalPayments:
|
|
60
|
-
middlePrice:
|
|
61
|
-
grossProfit:
|
|
53
|
+
totalSales: MoneySchema,
|
|
54
|
+
totalSalesCost: MoneySchema,
|
|
55
|
+
totalWriteOff: z.number(), // количество списанных единиц (SUM по quantity), не деньги
|
|
56
|
+
totalWriteOffSales: MoneySchema, // деньги: SUM(write_off.quantity * order_product.price)
|
|
57
|
+
totalVatAmount: MoneySchema,
|
|
58
|
+
totalDeliveryCost: MoneySchema,
|
|
59
|
+
totalServiceAmount: MoneySchema,
|
|
60
|
+
totalPayments: MoneySchema,
|
|
61
|
+
middlePrice: MoneySchema,
|
|
62
|
+
grossProfit: MoneySchema,
|
|
62
63
|
marginality: z.number(),
|
|
63
64
|
}),
|
|
64
65
|
),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { OrderByEnum, PositionReportTypeEnum, ReportSortByEnum } from '../../enum';
|
|
3
3
|
import { dateRangeCheck } from '../../helpers/date.helper';
|
|
4
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
4
5
|
|
|
5
6
|
const GetReportGroupByPositionRequestSchema = z
|
|
6
7
|
.object({
|
|
@@ -49,15 +50,15 @@ const GetReportGroupByPositionResponseSchema = z.object({
|
|
|
49
50
|
name: z.string(),
|
|
50
51
|
}),
|
|
51
52
|
totalOrders: z.number(),
|
|
52
|
-
totalSales:
|
|
53
|
+
totalSales: MoneySchema,
|
|
53
54
|
soldUnits: z.number(),
|
|
54
|
-
totalCost:
|
|
55
|
+
totalCost: MoneySchema,
|
|
55
56
|
totalUnits: z.number(),
|
|
56
|
-
totalWriteOff: z.number(),
|
|
57
|
-
totalWriteOffCost:
|
|
58
|
-
totalVatAmount:
|
|
59
|
-
middlePrice:
|
|
60
|
-
grossProfit:
|
|
57
|
+
totalWriteOff: z.number(), // количество списанных единиц (SUM по quantity), не деньги
|
|
58
|
+
totalWriteOffCost: MoneySchema,
|
|
59
|
+
totalVatAmount: MoneySchema,
|
|
60
|
+
middlePrice: MoneySchema,
|
|
61
|
+
grossProfit: MoneySchema,
|
|
61
62
|
marginality: z.number(),
|
|
62
63
|
}),
|
|
63
64
|
)
|
|
@@ -69,14 +70,14 @@ const GetReportGroupByPositionResponseSchema = z.object({
|
|
|
69
70
|
productKey: z.string(),
|
|
70
71
|
totalOrders: z.number(),
|
|
71
72
|
soldUnits: z.number(),
|
|
72
|
-
totalSales:
|
|
73
|
-
totalCost:
|
|
73
|
+
totalSales: MoneySchema,
|
|
74
|
+
totalCost: MoneySchema,
|
|
74
75
|
totalUnits: z.number(),
|
|
75
|
-
totalWriteOff: z.number(),
|
|
76
|
-
totalWriteOffCost:
|
|
77
|
-
totalVatAmount:
|
|
78
|
-
middlePrice:
|
|
79
|
-
grossProfit:
|
|
76
|
+
totalWriteOff: z.number(), // количество списанных единиц (SUM по quantity), не деньги
|
|
77
|
+
totalWriteOffCost: MoneySchema,
|
|
78
|
+
totalVatAmount: MoneySchema,
|
|
79
|
+
middlePrice: MoneySchema,
|
|
80
|
+
grossProfit: MoneySchema,
|
|
80
81
|
marginality: z.number(),
|
|
81
82
|
}),
|
|
82
83
|
)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { dateRangeCheck } from '../../helpers/date.helper';
|
|
3
3
|
import { ReportPeriodTypeEnum } from '../../enum/report-period-type.enum';
|
|
4
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
4
5
|
import { ReportOrderFilterSchema } from '../../schemas/report/report-order-filter.schema';
|
|
5
6
|
|
|
6
7
|
const GetSalesSummaryRequestSchema = z
|
|
@@ -27,27 +28,28 @@ const GetSalesSummaryRequestSchema = z
|
|
|
27
28
|
);
|
|
28
29
|
|
|
29
30
|
const SalesSummaryTotalsSchema = z.object({
|
|
30
|
-
totalRevenue:
|
|
31
|
-
totalRevenueWithDelivery:
|
|
31
|
+
totalRevenue: MoneySchema,
|
|
32
|
+
totalRevenueWithDelivery: MoneySchema,
|
|
32
33
|
totalOrders: z.number(),
|
|
33
34
|
uniqueClients: z.number(),
|
|
34
35
|
soldUnits: z.number(),
|
|
35
|
-
avgCheck:
|
|
36
|
-
totalVatAmount:
|
|
37
|
-
totalCost:
|
|
38
|
-
totalDeliveryCost:
|
|
39
|
-
totalServiceAmount:
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
avgCheck: MoneySchema,
|
|
37
|
+
totalVatAmount: MoneySchema,
|
|
38
|
+
totalCost: MoneySchema,
|
|
39
|
+
totalDeliveryCost: MoneySchema,
|
|
40
|
+
totalServiceAmount: MoneySchema,
|
|
41
|
+
// Сумма скидки в деньгах (SUM(order.discount_amount)) — в отличие от процента `discountPercent`
|
|
42
|
+
totalDiscountAmount: MoneySchema,
|
|
43
|
+
grossProfit: MoneySchema,
|
|
42
44
|
marginality: z.number(),
|
|
43
45
|
});
|
|
44
46
|
|
|
45
47
|
const SalesSummarySeriesItemSchema = z.object({
|
|
46
48
|
period: z.string(),
|
|
47
|
-
revenue:
|
|
49
|
+
revenue: MoneySchema,
|
|
48
50
|
orders: z.number(),
|
|
49
51
|
units: z.number(),
|
|
50
|
-
avgCheck:
|
|
52
|
+
avgCheck: MoneySchema,
|
|
51
53
|
});
|
|
52
54
|
|
|
53
55
|
const GetSalesSummaryResponseSchema = z.object({
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DeleteDataResponseSchema } from '../../schemas';
|
|
3
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
3
4
|
|
|
4
5
|
const GenerateCheckTransactionRequestSchema = z.object({
|
|
5
6
|
orderUUID: z.string(),
|
|
6
|
-
amount:
|
|
7
|
+
amount: MoneySchema,
|
|
7
8
|
});
|
|
8
9
|
|
|
9
10
|
const GenerateCheckTransactionResponseSchema = z.object({
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DeleteDataResponseSchema } from '../../schemas';
|
|
3
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
3
4
|
|
|
4
5
|
const GeneratePrepaymentCheckRequestSchema = z.object({
|
|
5
6
|
clientUUID: z.string(),
|
|
6
|
-
amount:
|
|
7
|
+
amount: MoneySchema,
|
|
7
8
|
});
|
|
8
9
|
|
|
9
10
|
const GeneratePrepaymentCheckResponseSchema = z.object({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { dateRangeCheck } from '../../helpers/date.helper';
|
|
3
|
+
import { MoneySchema } from '../../schemas/money.schema';
|
|
3
4
|
|
|
4
5
|
const GetSumTransactionByMoneyAccountRequestSchema = z
|
|
5
6
|
.object({
|
|
@@ -24,7 +25,8 @@ const GetSumTransactionByMoneyAccountRequestSchema = z
|
|
|
24
25
|
const GetSumTransactionByMoneyAccountResponseSchema = z.object({
|
|
25
26
|
message: z.string().optional(),
|
|
26
27
|
data: z.object({
|
|
27
|
-
|
|
28
|
+
// Сальдо по кассе: расход может превысить приход, поэтому знаковых ограничений нет.
|
|
29
|
+
sum: MoneySchema,
|
|
28
30
|
}),
|
|
29
31
|
});
|
|
30
32
|
|