feat: Phase 3.8 바로빌 세금계산서 연동 API 구현
- 마이그레이션: barobill_settings, tax_invoices 테이블 생성 - 모델: BarobillSetting (인증서 암호화), TaxInvoice (상태/유형 상수) - 서비스: BarobillService (API 연동), TaxInvoiceService (CRUD, 발행/취소) - 컨트롤러: BarobillSettingController, TaxInvoiceController - FormRequest: 6개 요청 검증 클래스 - Swagger: API 문서 완성 (BarobillSettingApi, TaxInvoiceApi)
This commit is contained in:
62
app/Http/Requests/TaxInvoice/UpdateTaxInvoiceRequest.php
Normal file
62
app/Http/Requests/TaxInvoice/UpdateTaxInvoiceRequest.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\TaxInvoice;
|
||||
|
||||
use App\Models\Tenants\TaxInvoice;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateTaxInvoiceRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'invoice_type' => ['sometimes', 'string', Rule::in(TaxInvoice::INVOICE_TYPES)],
|
||||
'issue_type' => ['sometimes', 'string', Rule::in(TaxInvoice::ISSUE_TYPES)],
|
||||
'direction' => ['sometimes', 'string', Rule::in(TaxInvoice::DIRECTIONS)],
|
||||
|
||||
// 공급자 정보
|
||||
'supplier_corp_num' => ['sometimes', 'string', 'max:20'],
|
||||
'supplier_corp_name' => ['sometimes', 'string', 'max:100'],
|
||||
'supplier_ceo_name' => ['nullable', 'string', 'max:50'],
|
||||
'supplier_addr' => ['nullable', 'string', 'max:200'],
|
||||
'supplier_biz_type' => ['nullable', 'string', 'max:100'],
|
||||
'supplier_biz_class' => ['nullable', 'string', 'max:100'],
|
||||
'supplier_contact_id' => ['nullable', 'string', 'email', 'max:100'],
|
||||
|
||||
// 공급받는자 정보
|
||||
'buyer_corp_num' => ['sometimes', 'string', 'max:20'],
|
||||
'buyer_corp_name' => ['sometimes', 'string', 'max:100'],
|
||||
'buyer_ceo_name' => ['nullable', 'string', 'max:50'],
|
||||
'buyer_addr' => ['nullable', 'string', 'max:200'],
|
||||
'buyer_biz_type' => ['nullable', 'string', 'max:100'],
|
||||
'buyer_biz_class' => ['nullable', 'string', 'max:100'],
|
||||
'buyer_contact_id' => ['nullable', 'string', 'email', 'max:100'],
|
||||
|
||||
// 금액 정보
|
||||
'issue_date' => ['sometimes', 'date'],
|
||||
'supply_amount' => ['sometimes', 'numeric', 'min:0'],
|
||||
'tax_amount' => ['sometimes', 'numeric', 'min:0'],
|
||||
|
||||
// 품목 정보
|
||||
'items' => ['nullable', 'array'],
|
||||
'items.*.name' => ['required_with:items', 'string', 'max:100'],
|
||||
'items.*.spec' => ['nullable', 'string', 'max:100'],
|
||||
'items.*.qty' => ['nullable', 'numeric', 'min:0'],
|
||||
'items.*.unit_price' => ['nullable', 'numeric', 'min:0'],
|
||||
'items.*.supply_amt' => ['nullable', 'numeric', 'min:0'],
|
||||
'items.*.tax_amt' => ['nullable', 'numeric', 'min:0'],
|
||||
'items.*.remark' => ['nullable', 'string', 'max:200'],
|
||||
|
||||
// 참조 정보
|
||||
'reference_type' => ['nullable', 'string', 'max:50'],
|
||||
'reference_id' => ['nullable', 'integer'],
|
||||
'description' => ['nullable', 'string', 'max:1000'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user