fix(finance): align operating fund export labels

This commit is contained in:
2026-09-01 10:19:35 +08:00
parent 2c3efad70a
commit 3d7990250f
3 changed files with 23 additions and 4 deletions
@@ -112,6 +112,24 @@ class FinanceExportProviderServiceTest {
verify(operationService).listDerivedCustomerAccountLedger(10001L, 1, 200, null, null, null);
}
@Test
void accountExportUsesOperatingFundNamesAndAcceptsSupplierPaymentLedgerFilters() {
when(accountService.list(1, 100, null, null, 10001L))
.thenReturn(PageEnvelope.success(List.of(), 1, 100, 0));
var account = service.exportBatch(FinanceExportProviderService.CUSTOMER_ACCOUNT_LIST,
request(Map.of("customerId", "10001"), null, null));
assertThat(account.columns()).extracting(column -> column.title()).contains(
"待收客户款(CNY)", "待付供应商款(CNY)", "已线下支付供应商款(CNY)");
for (String businessType : List.of("SUPPLIER_DIRECT_PAID", "SUPPLIER_ON_ACCOUNT_PAYMENT")) {
when(operationService.listDerivedCustomerAccountLedger(10001L, 1, 100, businessType, null, null))
.thenReturn(PageEnvelope.success(List.of(), 1, 100, 0));
service.exportBatch(FinanceExportProviderService.CUSTOMER_ACCOUNT_LEDGER,
request(Map.of("customerId", "10001", "businessType", businessType), null, null));
verify(operationService).listDerivedCustomerAccountLedger(10001L, 1, 100, businessType, null, null);
}
}
@Test
void exportsTheSameMonthlyCnyCustomerStatisticsWithoutExcludedPrototypeFields() {
when(receivableStatisticsService.exportRows(YearMonth.of(2026, 7), 10001L)).thenReturn(List.of(