결재 및 마스터 모듈을 v4 API 계약에 맞게 조정

This commit is contained in:
JiWoong Sul
2025-10-16 17:27:20 +09:00
parent d5c99627db
commit 9e2244f260
34 changed files with 1394 additions and 330 deletions

View File

@@ -195,13 +195,23 @@ class StockTransactionListFilter {
'transaction_status_id': transactionStatusId,
if (warehouseId != null) 'warehouse_id': warehouseId,
if (customerId != null) 'customer_id': customerId,
if (from != null) 'from': from!.toIso8601String(),
if (to != null) 'to': to!.toIso8601String(),
if (from != null) 'date_from': _formatDate(from!),
if (to != null) 'date_to': _formatDate(to!),
if (sort != null && sort!.trim().isNotEmpty) 'sort': sort,
if (order != null && order!.trim().isNotEmpty) 'order': order,
if (include.isNotEmpty) 'include': include.join(','),
};
}
/// 백엔드가 요구하는 `yyyy-MM-dd`(NaiveDate) 형식으로 변환한다.
String _formatDate(DateTime value) {
final iso = value.toIso8601String();
final separatorIndex = iso.indexOf('T');
if (separatorIndex == -1) {
return iso;
}
return iso.substring(0, separatorIndex);
}
}
/// 재고 트랜잭션 생성 시 결재(Approval) 정보를 담는 입력 모델.