parent
e7ad693418
commit
15a9e3f475
@ -32,6 +32,9 @@
|
||||
$options = $options ?? ['shops' => [], 'product_types' => []];
|
||||
$shops = is_array($options['shops'] ?? null) ? $options['shops'] : [];
|
||||
$productTypes = is_array($options['product_types'] ?? null) ? $options['product_types'] : [];
|
||||
$incomeWan = ((float) ($summary['income_total'] ?? 0)) / 10000;
|
||||
$expenseWan = ((float) ($summary['expense_total'] ?? 0)) / 10000;
|
||||
$netWan = ((float) ($summary['net'] ?? 0)) / 10000;
|
||||
@endphp
|
||||
|
||||
<div class="w-full">
|
||||
@ -43,9 +46,9 @@
|
||||
|
||||
<div class="mb-4 grid grid-cols-2 gap-3 sm:grid-cols-4">
|
||||
@foreach ([
|
||||
['label' => '入账合计(元)', 'value' => (float) ($summary['income_total'] ?? 0), 'class' => 'alibaba-bill-income', 'prefix' => '+ '],
|
||||
['label' => '出帐合计(元)', 'value' => (float) ($summary['expense_total'] ?? 0), 'class' => 'alibaba-bill-expense', 'prefix' => '- '],
|
||||
['label' => '净额(入账 - 出帐,元)', 'value' => (float) ($summary['net'] ?? 0), 'class' => ((float) ($summary['net'] ?? 0) >= 0 ? 'text-gray-900' : 'alibaba-bill-expense'), 'prefix' => ((float) ($summary['net'] ?? 0) >= 0 ? '+ ' : '')],
|
||||
['label' => '入账合计(万元)', 'value' => $incomeWan, 'class' => 'alibaba-bill-income', 'prefix' => '+ '],
|
||||
['label' => '出帐合计(万元)', 'value' => $expenseWan, 'class' => 'alibaba-bill-expense', 'prefix' => '- '],
|
||||
['label' => '净额(入账 - 出帐,万元)', 'value' => $netWan, 'class' => ($netWan >= 0 ? 'text-gray-900' : 'alibaba-bill-expense'), 'prefix' => ($netWan >= 0 ? '+ ' : '')],
|
||||
['label' => '流水笔数', 'value' => (int) ($summary['count'] ?? 0), 'class' => 'text-gray-900', 'prefix' => ''],
|
||||
] as $metric)
|
||||
<div class="rounded-lg border border-gray-200 bg-white px-4 py-3">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user