feat(warehouse): 庫存統計卡片加入總金額顯示 (可用/帳面)
This commit is contained in:
@@ -34,7 +34,9 @@ interface PageProps {
|
||||
};
|
||||
totals: {
|
||||
available_stock: number;
|
||||
available_amount: number;
|
||||
book_stock: number;
|
||||
book_amount: number;
|
||||
};
|
||||
filters: {
|
||||
search?: string;
|
||||
@@ -169,9 +171,16 @@ export default function WarehouseIndex({ warehouses, totals, filters }: PageProp
|
||||
<CardContent className="p-6">
|
||||
<div className="flex flex-col">
|
||||
<span className="text-sm font-medium text-gray-500 mb-1">可用庫存總計</span>
|
||||
<span className="text-3xl font-bold text-primary-main">
|
||||
{totals.available_stock.toLocaleString()}
|
||||
</span>
|
||||
<div className="flex items-baseline gap-2">
|
||||
<span className="text-3xl font-bold text-primary-main">
|
||||
{totals.available_stock.toLocaleString()}
|
||||
</span>
|
||||
<Can permission="inventory.view_cost">
|
||||
<span className="text-lg font-medium text-gray-400">
|
||||
( 總額:${totals.available_amount?.toLocaleString()} )
|
||||
</span>
|
||||
</Can>
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
@@ -180,9 +189,16 @@ export default function WarehouseIndex({ warehouses, totals, filters }: PageProp
|
||||
<CardContent className="p-6">
|
||||
<div className="flex flex-col">
|
||||
<span className="text-sm font-medium text-gray-500 mb-1">帳面庫存總計</span>
|
||||
<span className="text-3xl font-bold text-gray-700">
|
||||
{totals.book_stock.toLocaleString()}
|
||||
</span>
|
||||
<div className="flex items-baseline gap-2">
|
||||
<span className="text-3xl font-bold text-gray-700">
|
||||
{totals.book_stock.toLocaleString()}
|
||||
</span>
|
||||
<Can permission="inventory.view_cost">
|
||||
<span className="text-lg font-medium text-gray-400">
|
||||
( 總額:${totals.book_amount?.toLocaleString()} )
|
||||
</span>
|
||||
</Can>
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user