Add logic for booked department 75 redistribution with fixed pricing and subscription weights. Update OpenAPI spec, unit tests, and service integration.
This commit is contained in:
+129
-1
@@ -5721,6 +5721,33 @@ paths:
|
||||
'403': { $ref: '#/components/responses/Forbidden' }
|
||||
'500': { $ref: '#/components/responses/InternalServerError' }
|
||||
|
||||
/superuser/invoicing/period/distribution/v2/booked-department-75:
|
||||
get:
|
||||
tags:
|
||||
- Invoices
|
||||
summary: Get booked e-conomic department 75 redistribution
|
||||
operationId: getInvoicingPeriodDistributionV2BookedDepartment75
|
||||
parameters:
|
||||
- name: dateFrom
|
||||
in: query
|
||||
required: true
|
||||
schema: { type: string, format: date }
|
||||
- name: dateTo
|
||||
in: query
|
||||
required: true
|
||||
schema: { type: string, format: date }
|
||||
responses:
|
||||
'200':
|
||||
description: Actual booked e-conomic department 75 net amounts redistributed to internal departments
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InvoicingDistributionV2BookedDepartment75Response'
|
||||
'400': { $ref: '#/components/responses/BadRequest' }
|
||||
'401': { $ref: '#/components/responses/Unauthorized' }
|
||||
'403': { $ref: '#/components/responses/Forbidden' }
|
||||
'500': { $ref: '#/components/responses/InternalServerError' }
|
||||
|
||||
/superuser/customers/pricing-history:
|
||||
get:
|
||||
tags:
|
||||
@@ -11207,6 +11234,105 @@ components:
|
||||
InvoicingDistributionV2CustomerPricesResponse:
|
||||
$ref: '#/components/schemas/InvoicingDistributionV2CategoryResponse'
|
||||
|
||||
InvoicingDistributionV2BookedDepartment75Group:
|
||||
type: object
|
||||
properties:
|
||||
month:
|
||||
type: string
|
||||
example: '2026-01'
|
||||
source_category:
|
||||
type: string
|
||||
enum: [fixed_pricing, wash_subscriptions, unclassified]
|
||||
invoice_ids:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
booked_net_amount:
|
||||
type: number
|
||||
department_distribution:
|
||||
$ref: '#/components/schemas/EconomicV2DepartmentDistribution'
|
||||
undistributed_net_amount:
|
||||
type: number
|
||||
required:
|
||||
- month
|
||||
- source_category
|
||||
- invoice_ids
|
||||
- booked_net_amount
|
||||
- department_distribution
|
||||
- undistributed_net_amount
|
||||
|
||||
InvoicingDistributionV2BookedDepartment75Meta:
|
||||
type: object
|
||||
properties:
|
||||
booked_net_amount:
|
||||
type: number
|
||||
distributed_net_amount:
|
||||
type: number
|
||||
undistributed_net_amount:
|
||||
type: number
|
||||
department_distribution:
|
||||
$ref: '#/components/schemas/EconomicV2DepartmentDistribution'
|
||||
booked_groups:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/InvoicingDistributionV2BookedDepartment75Group'
|
||||
required:
|
||||
- booked_net_amount
|
||||
- distributed_net_amount
|
||||
- undistributed_net_amount
|
||||
- department_distribution
|
||||
- booked_groups
|
||||
|
||||
InvoicingDistributionV2BookedDepartment75Customer:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/InvoicingDistributionV2Customer'
|
||||
- type: object
|
||||
properties:
|
||||
meta:
|
||||
type: object
|
||||
properties:
|
||||
booked_department_75:
|
||||
$ref: '#/components/schemas/InvoicingDistributionV2BookedDepartment75Meta'
|
||||
required:
|
||||
- booked_department_75
|
||||
|
||||
InvoicingDistributionV2BookedDepartment75CollectiveResults:
|
||||
type: object
|
||||
properties:
|
||||
booked_net_amount:
|
||||
type: number
|
||||
distributed_net_amount:
|
||||
type: number
|
||||
undistributed_net_amount:
|
||||
type: number
|
||||
department_distribution:
|
||||
$ref: '#/components/schemas/EconomicV2DepartmentDistribution'
|
||||
department_distribution_parsed:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: number
|
||||
required:
|
||||
- booked_net_amount
|
||||
- distributed_net_amount
|
||||
- undistributed_net_amount
|
||||
- department_distribution
|
||||
- department_distribution_parsed
|
||||
|
||||
InvoicingDistributionV2BookedDepartment75Response:
|
||||
type: object
|
||||
properties:
|
||||
customers:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/InvoicingDistributionV2BookedDepartment75Customer'
|
||||
collective_results:
|
||||
$ref: '#/components/schemas/InvoicingDistributionV2BookedDepartment75CollectiveResults'
|
||||
warnings:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
required: [customers, collective_results, warnings]
|
||||
|
||||
InvoicingDistributionV2AllResponse:
|
||||
type: object
|
||||
properties:
|
||||
@@ -11216,7 +11342,9 @@ components:
|
||||
$ref: '#/components/schemas/InvoicingDistributionV2WashSubscriptionsResponse'
|
||||
customer_prices:
|
||||
$ref: '#/components/schemas/InvoicingDistributionV2CustomerPricesResponse'
|
||||
required: [fixed_pricing, wash_subscriptions, customer_prices]
|
||||
booked_department_75:
|
||||
$ref: '#/components/schemas/InvoicingDistributionV2BookedDepartment75Response'
|
||||
required: [fixed_pricing, wash_subscriptions, customer_prices, booked_department_75]
|
||||
|
||||
PricingHistoryVersionEntry:
|
||||
type: object
|
||||
|
||||
Reference in New Issue
Block a user