This commit is contained in:
admin
2026-02-01 21:09:51 +09:00
parent cf17eef442
commit 7e67f9d422

View File

@@ -318,14 +318,14 @@ def build_voucher_summary(
salary_months = [] salary_months = []
if salary_list: if salary_list:
salary_months = [ salary_months = [
f"{s.payroll_year:04d}-{s.payroll_month:02d}" f"{s.payroll_year if s.payroll_year else 0:04d}-{s.payroll_month if s.payroll_month else 0:02d}"
for s in salary_list for s in salary_list
] ]
bonus_months = [] bonus_months = []
if bonus_list: if bonus_list:
bonus_months = [ bonus_months = [
f"{b.bonus_year:04d}-{b.bonus_month:02d}" f"{b.bonus_year if b.bonus_year else 0:04d}-{b.bonus_month if b.bonus_month else 0:02d}"
for b in bonus_list for b in bonus_list
] ]
@@ -349,8 +349,9 @@ def export_vouchers(request: VoucherExportRequest) -> VoucherExportResponse:
"""账票エクスポート処理(メイン)""" """账票エクスポート処理(メイン)"""
try: try:
# リクエストログ # リクエストログ
end_label = f"{request.end_year:04d}-{request.end_month:02d}" if request.end_year else "None" end_label = f"{request.end_year:04d}-{request.end_month:02d}" if request.end_year and request.end_month else "None"
logger.info(f"エクスポート要求: start={request.start_year:04d}-{request.start_month:02d}, " start_label = f"{request.start_year:04d}-{request.start_month:02d}" if request.start_year and request.start_month else "None"
logger.info(f"エクスポート要求: start={start_label}, "
f"end={end_label}, " f"end={end_label}, "
f"type={request.voucher_type}, employees={request.employee_ids}") f"type={request.voucher_type}, employees={request.employee_ids}")