-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
2,778 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import Navigation from "@/app/components/Navigation"; | ||
import BankAccounts from "@/app/components/BankAccounts"; | ||
|
||
export default function BankAccountsPage() { | ||
return ( | ||
<div className="flex min-h-screen flex-col items-center p-24"> | ||
<Navigation /> | ||
<h1 className="text-2xl mb-4">حسابهای بانکی</h1> | ||
<BankAccounts /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
'use client' | ||
|
||
import React, { useState } from 'react'; | ||
import { ChevronRight, ChevronDown } from 'lucide-react'; | ||
|
||
interface Transaction { | ||
description: string; | ||
debit: { account: string; amount: number }; | ||
credit: { account: string; amount: number }; | ||
} | ||
|
||
const AccountingCycle: React.FC = () => { | ||
const [currentStep, setCurrentStep] = useState(0); | ||
const [expandedSteps, setExpandedSteps] = useState<number[]>([]); | ||
|
||
const steps = [ | ||
{ | ||
title: 'تولید میز', | ||
transactions: [ | ||
{ | ||
description: 'ثبت هزینههای تولید', | ||
debit: { account: 'هزینههای تولید', amount: 1000000 }, | ||
credit: { account: 'حسابهای پرداختنی', amount: 1000000 }, | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'انبارش میز', | ||
transactions: [ | ||
{ | ||
description: 'ثبت انبارش کالا', | ||
debit: { account: 'موجودی کالا', amount: 1000000 }, | ||
credit: { account: 'هزینههای تولید', amount: 1000000 }, | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'فروش میز به آقای احمدی', | ||
transactions: [ | ||
{ | ||
description: 'ثبت فروش کالا', | ||
debit: { account: 'حسابهای دریافتنی', amount: 1500000 }, | ||
credit: { account: 'درآمد فروش', amount: 1500000 }, | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'دریافت وجه از آقای احمدی', | ||
transactions: [ | ||
{ | ||
description: 'ثبت دریافت وجه', | ||
debit: { account: 'نقد', amount: 1500000 }, | ||
credit: { account: 'حسابهای دریافتنی', amount: 1500000 }, | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'کاهش موجودی کالا', | ||
transactions: [ | ||
{ | ||
description: 'ثبت کاهش موجودی کالا', | ||
debit: { account: 'هزینه کالاهای فروختهشده', amount: 1000000 }, | ||
credit: { account: 'موجودی کالا', amount: 1000000 }, | ||
}, | ||
], | ||
}, | ||
]; | ||
|
||
const toggleStepExpansion = (index: number) => { | ||
setExpandedSteps(prev => | ||
prev.includes(index) | ||
? prev.filter(i => i !== index) | ||
: [...prev, index] | ||
); | ||
}; | ||
|
||
const renderTransaction = (transaction: Transaction) => ( | ||
<div className="bg-white p-4 rounded-lg shadow mb-2"> | ||
<p className="font-semibold mb-2">{transaction.description}</p> | ||
<div className="grid grid-cols-2 gap-4"> | ||
<div> | ||
<p className="text-green-600">بدهکار:</p> | ||
<p>{transaction.debit.account}: {transaction.debit.amount.toLocaleString()} تومان</p> | ||
</div> | ||
<div> | ||
<p className="text-red-600">بستانکار:</p> | ||
<p>{transaction.credit.account}: {transaction.credit.amount.toLocaleString()} تومان</p> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
|
||
return ( | ||
<div className="max-w-4xl mx-auto mt-8 p-4 bg-gray-100 rounded-lg shadow"> | ||
<h2 className="text-2xl font-bold mb-4">چرخه حسابداری فروش میز</h2> | ||
{steps.map((step, index) => ( | ||
<div key={index} className="mb-4"> | ||
<div | ||
className="flex items-center bg-blue-100 p-3 rounded-lg cursor-pointer" | ||
onClick={() => toggleStepExpansion(index)} | ||
> | ||
{expandedSteps.includes(index) ? ( | ||
<ChevronDown className="mr-2" /> | ||
) : ( | ||
<ChevronRight className="mr-2" /> | ||
)} | ||
<h3 className="font-semibold">{step.title}</h3> | ||
</div> | ||
{expandedSteps.includes(index) && ( | ||
<div className="mt-2 pr-8"> | ||
{step.transactions.map((transaction, tIndex) => ( | ||
<div key={tIndex}>{renderTransaction(transaction)}</div> | ||
))} | ||
</div> | ||
)} | ||
</div> | ||
))} | ||
</div> | ||
); | ||
}; | ||
|
||
export default AccountingCycle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
import React from 'react'; | ||
import { Wallet, CreditCard, Users, DollarSign, Receipt, Banknote, Building, ShoppingCart, FileText, Briefcase, PiggyBank, Landmark, BarChart, ShoppingBag, Percent, Clock, Calendar, Scissors, Zap } from 'lucide-react'; | ||
|
||
const AccountingStructure: React.FC = () => { | ||
return ( | ||
<div className="accounting-structure rtl p-4"> | ||
<div className="main-accounts mb-8 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 gap-8"> | ||
<div className="text-center p-4 bg-blue-100 rounded-lg"> | ||
<Wallet className="w-12 h-12 mb-2 text-blue-500 mx-auto" /> | ||
<h3 className="font-bold mb-4">داراییها</h3> | ||
<div className="grid grid-cols-2 gap-2"> | ||
<div className="text-center bg-blue-200 p-2 rounded"> | ||
<Clock className="w-8 h-8 mb-1 text-blue-500 mx-auto" /> | ||
<p className="text-xs font-bold">جاری</p> | ||
<div className="grid grid-cols-2 gap-1 mt-2"> | ||
<div className="text-center"> | ||
<Banknote className="w-6 h-6 mb-1 text-blue-500 mx-auto" /> | ||
<p className="text-xs">وجه نقد</p> | ||
</div> | ||
<div className="text-center"> | ||
<FileText className="w-6 h-6 mb-1 text-blue-500 mx-auto" /> | ||
<p className="text-xs">حسابهای دریافتنی</p> | ||
</div> | ||
<div className="text-center"> | ||
<ShoppingCart className="w-6 h-6 mb-1 text-blue-500 mx-auto" /> | ||
<p className="text-xs">موجودی کالا</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="text-center bg-blue-200 p-2 rounded"> | ||
<Calendar className="w-8 h-8 mb-1 text-blue-500 mx-auto" /> | ||
<p className="text-xs font-bold">غیرجاری</p> | ||
<div className="grid grid-cols-1 gap-1 mt-2"> | ||
<div className="text-center"> | ||
<Building className="w-6 h-6 mb-1 text-blue-500 mx-auto" /> | ||
<p className="text-xs">داراییهای ثابت</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div className="text-center p-4 bg-red-100 rounded-lg"> | ||
<CreditCard className="w-12 h-12 mb-2 text-red-500 mx-auto" /> | ||
<h3 className="font-bold mb-4">بدهیها</h3> | ||
<div className="grid grid-cols-2 gap-2"> | ||
<div className="text-center bg-red-200 p-2 rounded"> | ||
<Clock className="w-8 h-8 mb-1 text-red-500 mx-auto" /> | ||
<p className="text-xs font-bold">جاری</p> | ||
<div className="grid grid-cols-2 gap-1 mt-2"> | ||
<div className="text-center"> | ||
<FileText className="w-6 h-6 mb-1 text-red-500 mx-auto" /> | ||
<p className="text-xs">حسابهای پرداختنی</p> | ||
</div> | ||
<div className="text-center"> | ||
<Briefcase className="w-6 h-6 mb-1 text-red-500 mx-auto" /> | ||
<p className="text-xs">وامهای کوتاهمدت</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="text-center bg-red-200 p-2 rounded"> | ||
<Calendar className="w-8 h-8 mb-1 text-red-500 mx-auto" /> | ||
<p className="text-xs font-bold">غیرجاری</p> | ||
<div className="grid grid-cols-1 gap-1 mt-2"> | ||
<div className="text-center"> | ||
<Landmark className="w-6 h-6 mb-1 text-red-500 mx-auto" /> | ||
<p className="text-xs">وامهای بلندمدت</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div className="text-center p-4 bg-green-100 rounded-lg"> | ||
<Users className="w-12 h-12 mb-2 text-green-500 mx-auto" /> | ||
<h3 className="font-bold mb-4">حقوق صاحبان سهام</h3> | ||
<div className="grid grid-cols-2 gap-2"> | ||
<div className="text-center"> | ||
<PiggyBank className="w-8 h-8 mb-1 text-green-500 mx-auto" /> | ||
<p className="text-xs">سرمایه</p> | ||
</div> | ||
<div className="text-center"> | ||
<BarChart className="w-8 h-8 mb-1 text-green-500 mx-auto" /> | ||
<p className="text-xs">سود انباشته</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div className="text-center p-4 bg-yellow-100 rounded-lg"> | ||
<DollarSign className="w-12 h-12 mb-2 text-yellow-500 mx-auto" /> | ||
<h3 className="font-bold mb-4">درآمد</h3> | ||
<div className="grid grid-cols-2 gap-2"> | ||
<div className="text-center"> | ||
<ShoppingBag className="w-8 h-8 mb-1 text-yellow-500 mx-auto" /> | ||
<p className="text-xs">فروش کالا</p> | ||
</div> | ||
<div className="text-center"> | ||
<Briefcase className="w-8 h-8 mb-1 text-yellow-500 mx-auto" /> | ||
<p className="text-xs">درآمد خدمات</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div className="text-center p-4 bg-purple-100 rounded-lg"> | ||
<Receipt className="w-12 h-12 mb-2 text-purple-500 mx-auto" /> | ||
<h3 className="font-bold mb-4">هزینهها</h3> | ||
<div className="grid grid-cols-2 gap-2"> | ||
<div className="text-center bg-purple-200 p-2 rounded"> | ||
<Scissors className="w-8 h-8 mb-1 text-purple-500 mx-auto" /> | ||
<p className="text-xs font-bold">ثابت</p> | ||
<div className="grid grid-cols-1 gap-1 mt-2"> | ||
<div className="text-center"> | ||
<Building className="w-6 h-6 mb-1 text-purple-500 mx-auto" /> | ||
<p className="text-xs">اجاره</p> | ||
</div> | ||
<div className="text-center"> | ||
<Users className="w-6 h-6 mb-1 text-purple-500 mx-auto" /> | ||
<p className="text-xs">حقوق ثابت</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="text-center bg-purple-200 p-2 rounded"> | ||
<Zap className="w-8 h-8 mb-1 text-purple-500 mx-auto" /> | ||
<p className="text-xs font-bold">متغیر</p> | ||
<div className="grid grid-cols-1 gap-1 mt-2"> | ||
<div className="text-center"> | ||
<ShoppingCart className="w-6 h-6 mb-1 text-purple-500 mx-auto" /> | ||
<p className="text-xs">مواد اولیه</p> | ||
</div> | ||
<div className="text-center"> | ||
<Percent className="w-6 h-6 mb-1 text-purple-500 mx-auto" /> | ||
<p className="text-xs">کمیسیون فروش</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div className="explanations grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 gap-8 text-sm"> | ||
<div> | ||
<h4 className="font-bold text-blue-500 mb-2">داراییها</h4> | ||
<p>منابع اقتصادی متعلق به شرکت که انتظار میرود در آینده منافع اقتصادی ایجاد کنند. شامل داراییهای جاری (مانند وجه نقد و موجودی کالا) و غیرجاری (مانند ساختمان و تجهیزات) میشود.</p> | ||
</div> | ||
<div> | ||
<h4 className="font-bold text-red-500 mb-2">بدهیها</h4> | ||
<p>تعهدات مالی شرکت که باید در آینده پرداخت شوند. شامل بدهیهای جاری (مانند حسابهای پرداختنی و وامهای کوتاهمدت) و غیرجاری (مانند وامهای بلندمدت) میشود.</p> | ||
</div> | ||
<div> | ||
<h4 className="font-bold text-green-500 mb-2">حقوق صاحبان سهام</h4> | ||
<p>ارزش باقیمانده داراییهای شرکت پس از کسر بدهیها. شامل سرمایهگذاری اولیه مالکان و سود انباشته است که نشاندهنده ارزش خالص شرکت میباشد.</p> | ||
</div> | ||
<div> | ||
<h4 className="font-bold text-yellow-500 mb-2">درآمد</h4> | ||
<p>افزایش در منافع اقتصادی طی دوره حسابداری که به شکل ورودی یا افزایش داراییها یا کاهش بدهیها رخ میدهد و منجر به افزایش حقوق صاحبان سهام میشود.</p> | ||
</div> | ||
<div> | ||
<h4 className="font-bold text-purple-500 mb-2">هزینهها</h4> | ||
<p>کاهش در منافع اقتصادی طی دوره حسابداری که به شکل خروجی یا کاهش داراییها یا افزایش بدهیها رخ میدهد. شامل هزینههای ثابت (مانند اجاره و حقوق ثابت) و هزینههای متغیر (مانند مواد اولیه و کمیسیون فروش) میشود.</p> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AccountingStructure; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use client' | ||
|
||
import React from 'react'; | ||
import AccountsReceivable from './AccountsReceivable'; | ||
import AccountsPayable from './AccountsPayable'; | ||
|
||
const AccountsOverview: React.FC = () => { | ||
return ( | ||
<div className="mt-8 p-4 bg-white rounded-lg shadow-md"> | ||
<h2 className="text-2xl font-bold mb-4">مرور حسابها</h2> | ||
<div className="flex flex-col md:flex-row gap-8"> | ||
<div className="w-full md:w-1/2"> | ||
<AccountsReceivable /> | ||
</div> | ||
<div className="w-full md:w-1/2"> | ||
<AccountsPayable /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AccountsOverview; |
Oops, something went wrong.