feat: 세금계산서/거래명세서 일괄 발행 API 추가
- POST /api/v1/tax-invoices/bulk-issue: 세금계산서 일괄 발행 - POST /api/v1/sales/bulk-issue-statement: 거래명세서 일괄 발행 - FormRequest 검증 (최대 100건) - Service 일괄 처리 로직 (개별 오류 처리) - Swagger 문서 추가 - i18n 메시지 키 추가 (ko/en)
This commit is contained in:
@@ -154,6 +154,29 @@
|
||||
* @OA\Property(property="sent_at", type="string", format="date-time", example="2025-01-15T10:30:00+09:00", description="발송일시"),
|
||||
* @OA\Property(property="statement_number", type="string", example="STSL202501150001", description="거래명세서 번호")
|
||||
* )
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="SaleBulkIssueStatementRequest",
|
||||
* type="object",
|
||||
* required={"ids"},
|
||||
* description="거래명세서 일괄 발행 요청",
|
||||
*
|
||||
* @OA\Property(property="ids", type="array", minItems=1, maxItems=100, description="발행할 매출 ID 목록 (최대 100개)",
|
||||
* @OA\Items(type="integer", example=1)
|
||||
* )
|
||||
* )
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="SaleBulkIssueStatementResponse",
|
||||
* type="object",
|
||||
* description="거래명세서 일괄 발행 응답",
|
||||
*
|
||||
* @OA\Property(property="issued", type="integer", example=8, description="발행 성공 건수"),
|
||||
* @OA\Property(property="failed", type="integer", example=2, description="발행 실패 건수"),
|
||||
* @OA\Property(property="errors", type="object", description="실패 상세 (ID: 에러메시지)",
|
||||
* @OA\AdditionalProperties(type="string", example="확정 상태가 아닌 매출입니다.")
|
||||
* )
|
||||
* )
|
||||
*/
|
||||
class SaleApi
|
||||
{
|
||||
@@ -514,4 +537,41 @@ public function issueStatement() {}
|
||||
* )
|
||||
*/
|
||||
public function sendStatement() {}
|
||||
|
||||
/**
|
||||
* @OA\Post(
|
||||
* path="/api/v1/sales/bulk-issue-statement",
|
||||
* tags={"Sales"},
|
||||
* summary="거래명세서 일괄 발행",
|
||||
* description="여러 매출에 대한 거래명세서를 일괄 발행합니다. 확정(confirmed) 상태이면서 아직 발행되지 않은 건만 발행됩니다. 각 건별로 성공/실패가 처리됩니다.",
|
||||
* security={{"ApiKeyAuth":{}},{"BearerAuth":{}}},
|
||||
*
|
||||
* @OA\RequestBody(
|
||||
* required=true,
|
||||
*
|
||||
* @OA\JsonContent(ref="#/components/schemas/SaleBulkIssueStatementRequest")
|
||||
* ),
|
||||
*
|
||||
* @OA\Response(
|
||||
* response=200,
|
||||
* description="일괄 발행 처리 완료",
|
||||
*
|
||||
* @OA\JsonContent(
|
||||
* allOf={
|
||||
*
|
||||
* @OA\Schema(ref="#/components/schemas/ApiResponse"),
|
||||
* @OA\Schema(
|
||||
*
|
||||
* @OA\Property(property="data", ref="#/components/schemas/SaleBulkIssueStatementResponse")
|
||||
* )
|
||||
* }
|
||||
* )
|
||||
* ),
|
||||
*
|
||||
* @OA\Response(response=400, description="잘못된 요청", @OA\JsonContent(ref="#/components/schemas/ErrorResponse")),
|
||||
* @OA\Response(response=401, description="인증 실패", @OA\JsonContent(ref="#/components/schemas/ErrorResponse")),
|
||||
* @OA\Response(response=500, description="서버 에러", @OA\JsonContent(ref="#/components/schemas/ErrorResponse"))
|
||||
* )
|
||||
*/
|
||||
public function bulkIssueStatement() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user