diff --git a/modules/EcommerceFinance/View/FinanceLedgerPageData.php b/modules/EcommerceFinance/View/FinanceLedgerPageData.php
index 6f2ef946..980f952f 100644
--- a/modules/EcommerceFinance/View/FinanceLedgerPageData.php
+++ b/modules/EcommerceFinance/View/FinanceLedgerPageData.php
@@ -88,11 +88,11 @@ class FinanceLedgerPageData
$openingDate = (string) config('finance_ledger.opening_date', '2026-10-17');
$transactionView = $this->transactionView();
$requestedFlowView = trim((string) request('flows_view', 'summary'));
- $flowView = in_array($requestedFlowView, ['summary', 'bank', 'non_store', 'wangshang', 'wallet', 'daily'], true)
+ $flowView = in_array($requestedFlowView, ['summary', 'bank', 'non_store', 'wangshang', 'wallet', 'daily', 'basic'], true)
? $requestedFlowView
: 'summary';
$requestedAccountView = trim((string) request('accounts_view', 'all'));
- $accountView = in_array($requestedAccountView, ['all', 'basic', 'bank', 'non_store', 'wangshang', 'wallet', 'other'], true)
+ $accountView = in_array($requestedAccountView, ['all', 'bank', 'non_store', 'wangshang', 'wallet', 'other'], true)
? $requestedAccountView
: 'all';
$flowPeriod = $this->dateRange('flows');
@@ -101,21 +101,16 @@ class FinanceLedgerPageData
$sourcePeriod = $this->dateRange('sources');
$accountDisplayLabels = $this->accountDisplayLabels();
- $accounts = $accountView === 'basic'
- ? [
- 'rows' => collect(),
- 'summary' => [
- 'count' => 0,
- 'unretained' => 0,
- 'current_balance' => 0,
- 'balance' => 0,
- 'blocked' => 0,
- ],
- ]
- : $this->accounts($accountView, $accountDisplayLabels);
+ $accounts = $this->accounts($accountView, $accountDisplayLabels);
$shops = $this->shops();
$availableBreakdown = $this->availableBreakdown($shops);
- $flows = $this->flows($flowPeriod, $flowView, $accountDisplayLabels);
+ $flows = $flowView === 'basic'
+ ? [
+ 'rows' => collect(),
+ 'summary' => ['count' => 0, 'opening' => 0, 'inflow' => 0, 'outflow' => 0, 'closing' => 0],
+ 'custom_fields' => [],
+ ]
+ : $this->flows($flowPeriod, $flowView, $accountDisplayLabels);
$transactions = $this->transactions($transactionView['account_short'], $transactionPeriod);
$transactionViewIsIndependent = (bool) ($transactionView['independent'] ?? false);
$transactionViewAccountExists = $transactionViewIsIndependent
@@ -132,7 +127,7 @@ class FinanceLedgerPageData
'ledgerAccountView' => $accountView,
'ledgerAccounts' => $accounts['rows'],
'ledgerAccountSummary' => $accounts['summary'],
- 'ledgerAccountTypeCards' => $accountView === 'basic' ? $this->accountTypeCards() : [],
+ 'ledgerAccountTypeCards' => $flowView === 'basic' ? $this->accountTypeCards() : [],
'ledgerShops' => $shops['rows'],
'ledgerShopSummary' => $shops['summary'],
'ledgerShopBalanceDate' => $shops['balance_date'] ?? null,
diff --git a/resources/views/business/pages/financial-ledger/ledger.blade.php b/resources/views/business/pages/financial-ledger/ledger.blade.php
index 39bbf170..7f77a045 100644
--- a/resources/views/business/pages/financial-ledger/ledger.blade.php
+++ b/resources/views/business/pages/financial-ledger/ledger.blade.php
@@ -72,6 +72,8 @@
'accounts_filter_value',
'accounts_sort',
'accounts_direction',
+ 'flows_view',
+ 'txns_view',
])
->filter(static fn ($value): bool => is_scalar($value) || $value === null)
->all();
@@ -92,7 +94,7 @@
$currentMonthEnd = now()->endOfMonth()->toDateString();
$flowPeriod = $ledgerFlowPeriod ?? ['from' => $currentMonthStart, 'to' => $currentMonthEnd];
$flowView = $ledgerFlowView ?? 'summary';
- $flowUsesAccountSummary = $flowView !== 'daily';
+ $flowUsesAccountSummary = ! in_array($flowView, ['daily', 'basic'], true);
$flowSummaryCustomFields = $ledgerFlowSummaryCustomFields ?? [];
$transactionPeriod = $ledgerTransactionPeriod ?? ['from' => $currentMonthStart, 'to' => $currentMonthEnd];
$mappingPeriod = $ledgerMappingPeriod ?? ['from' => $currentMonthStart, 'to' => $currentMonthEnd];
@@ -117,7 +119,15 @@
$transactionDateHeaderOptions = $ledgerTransactionDateHeaderOptions ?? [];
$optionMap = static fn (array $values): array => array_combine($values, $values) ?: [];
$flowViewQuery = collect(request()->query())
- ->except(['flows_page', 'flows_filter_column', 'flows_filter_value', 'flows_sort', 'flows_direction'])
+ ->except([
+ 'flows_page',
+ 'flows_filter_column',
+ 'flows_filter_value',
+ 'flows_sort',
+ 'flows_direction',
+ 'accounts_view',
+ 'txns_view',
+ ])
->filter(static fn ($value): bool => is_scalar($value) || $value === null)
->all();
$flowViewUrl = static fn (string $view): string => $ledgerPageUrl . '?' . http_build_query(array_merge(
@@ -125,14 +135,21 @@
['tab' => 'flows', 'flows_view' => $view],
));
$transactionViewQuery = collect(request()->query())
- ->except(['txns_page', 'txns_filter_column', 'txns_filter_value', 'txns_sort', 'txns_direction'])
+ ->except([
+ 'txns_page',
+ 'txns_filter_column',
+ 'txns_filter_value',
+ 'txns_sort',
+ 'txns_direction',
+ 'accounts_view',
+ 'flows_view',
+ ])
->filter(static fn ($value): bool => is_scalar($value) || $value === null)
->all();
$transactionViewUrl = static fn (string $view): string => $ledgerPageUrl . '?' . http_build_query(array_merge(
$transactionViewQuery,
['tab' => 'transactions', 'txns_view' => $view],
));
- $accountBasicViewUrl = $accountViewUrl('basic');
$flowSummaryEditDate = now()->toDateString();
if (($flowPeriod['to'] ?? null) !== null && $flowSummaryEditDate > $flowPeriod['to']) {
$flowSummaryEditDate = $flowPeriod['to'];
@@ -705,34 +722,6 @@
{{-- 账户总表 --}}
点击账户类型卡片查看对应账户资料;每种账户只展示自己需要的表头。 {{ $card['description'] }}账户基本信息
-
-
-
- @endforeach
-
点击账户类型卡片查看对应账户资料;每种账户只展示自己需要的表头。
+{{ $card['description'] }}
+