Add comparison endpoint and mass comparison feature for collected invoices with E-conomic in openapi.yaml and CollectedOrderInvoicesListPagination.vue.
This commit is contained in:
@@ -3140,6 +3140,41 @@ paths:
|
||||
'200':
|
||||
description: Ready invoices retrieved successfully
|
||||
|
||||
/collected-invoices/economic/compare:
|
||||
get:
|
||||
tags:
|
||||
- Invoices
|
||||
summary: Compare collected invoice totals with E-conomic
|
||||
description: |
|
||||
Compares a collected invoice in the system with its corresponding invoice in E-conomic.
|
||||
Returns totals from both sources, their difference, and any warnings detected during comparison.
|
||||
operationId: compareCollectedInvoiceEconomic
|
||||
parameters:
|
||||
- name: collected_invoice_id
|
||||
in: query
|
||||
required: true
|
||||
description: The internal collected invoice ID to compare
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
responses:
|
||||
'200':
|
||||
description: Comparison completed successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CollectedInvoiceEconomicCompareResponse'
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'403':
|
||||
$ref: '#/components/responses/Forbidden'
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
/superuser/invoicing/period:
|
||||
get:
|
||||
tags:
|
||||
@@ -5516,6 +5551,7 @@ components:
|
||||
cashier_id:
|
||||
type: integer
|
||||
description: Cashier user ID
|
||||
|
||||
cashier_name:
|
||||
type: string
|
||||
description: Cashier name
|
||||
@@ -5544,6 +5580,65 @@ components:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
CollectedInvoiceEconomicCompareResponse:
|
||||
type: object
|
||||
description: Result of comparing a collected invoice with its E-conomic counterpart
|
||||
properties:
|
||||
collected_invoice_id:
|
||||
type: integer
|
||||
description: The internal collected invoice ID
|
||||
example: 123
|
||||
draft_id:
|
||||
type: integer
|
||||
nullable: true
|
||||
description: E-conomic draft invoice ID, if present
|
||||
example: 456
|
||||
booked_id:
|
||||
type: integer
|
||||
nullable: true
|
||||
description: E-conomic booked invoice ID, if present
|
||||
example: 28368
|
||||
warnings:
|
||||
type: array
|
||||
description: List of warnings detected during comparison
|
||||
items:
|
||||
type: string
|
||||
example:
|
||||
- "Total amount mismatch for draft invoice ID 456: E-Conomic total is 867.5, internal total is 694"
|
||||
draft_total:
|
||||
type: number
|
||||
format: float
|
||||
nullable: true
|
||||
description: Total amount from the E-conomic draft (gross)
|
||||
example: 867.5
|
||||
booked_total:
|
||||
type: number
|
||||
format: float
|
||||
nullable: true
|
||||
description: Total amount from the E-conomic booked invoice (gross minus VAT if applicable)
|
||||
example: 694
|
||||
difference:
|
||||
type: number
|
||||
format: float
|
||||
nullable: true
|
||||
description: draft_total minus booked_total when both are available
|
||||
example: 0
|
||||
internal_total:
|
||||
type: number
|
||||
format: float
|
||||
description: Internal total amount for the collected invoice
|
||||
example: 694
|
||||
order_ids:
|
||||
type: array
|
||||
description: List of order IDs included in the collected invoice
|
||||
items:
|
||||
type: integer
|
||||
example: [38679, 39210]
|
||||
required:
|
||||
- collected_invoice_id
|
||||
- internal_total
|
||||
- order_ids
|
||||
|
||||
SelfServeLaneStatus:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
Reference in New Issue
Block a user