@davoodmehraban89 / Factor-easy / commits / b297d3e
Fork 0

سامانه صدور فاکتور و حسابداری

Refactor HTML for improved clarity and layout

Updated the title and various text elements for clarity and consistency. Adjusted styles and layout for better user experience.

davoodmehraban89 committed Sep 16, 2026 at 15:53 UTC b297d3e2daa94b8b61cee7c42bbde7c87692a273
1 file changed +37 -44
index.html
+37 -44
@@ -3,7 +3,7 @@
3 <head>
4 <meta charset="UTF-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
6 - <title>ایزی فاکتور | نسخه تجاری ۱.۰</title>
6 + <title>ایزی فاکتور | سامانه صدور فاکتور و مدیریت مالی</title>
7
8 <link rel="manifest" href="manifest.json" />
9 <meta name="apple-mobile-web-app-capable" content="yes" />
@@ -28,23 +28,15 @@
28 --success: #059669;
29 --warning: #d97706;
30 --sidebar-w: 240px;
31 - --nav-h: 74px;
31 + --nav-h: 70px;
32 }
33
34 html, body { width: 100%; max-width: 100%; overflow-x: hidden !important; position: relative; }
35 * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Vazirmatn FD', -apple-system, BlinkMacSystemFont, Tahoma, sans-serif; -webkit-tap-highlight-color: transparent; }
36 body { background-color: var(--bg); color: var(--text); font-size: 14px; }
37
38 - /* صفحه احراز هویت (ورود / ثبت‌نام) */
39 - #auth-screen {
40 - position: fixed; top: 0; left: 0; right: 0; bottom: 0;
41 - background: linear-gradient(135deg, #1e3a8a, #2563eb);
42 - z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px;
43 - }
44 - .auth-card {
45 - background: #fff; border-radius: 16px; max-width: 420px; width: 100%; padding: 30px;
46 - box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); text-align: right;
47 - }
38 + #auth-screen { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(135deg, #1e3a8a, #2563eb); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
39 + .auth-card { background: #fff; border-radius: 16px; max-width: 420px; width: 100%; padding: 30px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); text-align: right; }
40
41 .app-root { display: flex; min-height: 100vh; width: 100%; max-width: 100%; overflow-x: hidden; }
42 .sidebar { width: var(--sidebar-w); background: var(--card-bg); border-left: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; right: 0; z-index: 100; }
@@ -85,8 +77,8 @@
77 .form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; width: 100%; }
78
79 .table-responsive { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 8px; }
88 - table { width: 100%; border-collapse: collapse; text-align: right; font-size: 13px; min-width: 600px; }
89 - th, td { padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
80 + table { width: 100%; border-collapse: collapse; text-align: right; font-size: 13px; min-width: 500px; }
81 + th, td { padding: 10px 10px; border-bottom: 1px solid var(--border); }
82 th { background: #f1f5f9; color: #334155; font-weight: 700; }
83
84 .badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
@@ -127,13 +119,13 @@
119 </head>
120 <body>
121
130 - <!-- صفحه ورود و ثبت‌نام تجاری نسخه ۱.۰ -->
122 + <!-- صفحه ورود و ثبت‌نام تجاری -->
123 <div id="auth-screen">
124 <div class="auth-card">
125 <div style="text-align:center; margin-bottom:20px;">
126 <div style="width:50px; height:50px; background:var(--primary); color:#fff; font-weight:bold; font-size:24px; border-radius:12px; display:inline-flex; align-items:center; justify-content:center; margin-bottom:10px;">ایزی</div>
127 <h2 style="font-size:20px; font-weight:bold; color:var(--text);">سامانه ایزی فاکتور</h2>
136 - <p style="font-size:12px; color:var(--text-muted); margin-top:4px;">ورود به حساب کاربری یا ثبت‌نام (نسخه تجاری)</p>
128 + <p style="font-size:12px; color:var(--text-muted); margin-top:4px;">ورود یا ثبت‌نام در سامانه</p>
129 </div>
130
131 <div id="auth-form-container">
@@ -146,8 +138,8 @@
138 <input type="password" id="auth-password" class="form-control" placeholder="رمز عبور" />
139 </div>
140 <div style="display:flex; gap:10px; margin-top:16px;">
149 - <button class="btn btn-primary" style="flex:1;" onclick="handleLogin()">ورود به سامانه</button>
150 - <button class="btn btn-secondary" style="flex:1;" onclick="switchToRegister()">ثبت‌نام جدید</button>
141 + <button class="btn btn-primary" style="flex:1;" onclick="handleLogin()">ورود</button>
142 + <button class="btn btn-secondary" style="flex:1;" onclick="switchToRegister()">ثبت‌نام</button>
143 </div>
144 </div>
145 </div>
@@ -160,7 +152,7 @@
152 <div class="brand-icon">ایزی</div>
153 <div>
154 <h2 style="font-size: 15px; font-weight: bold;">ایزی فاکتور</h2>
163 - <small style="color: var(--text-muted); font-size: 11px;">نگارش تجاری ۱.۰</small>
155 + <small style="color: var(--text-muted); font-size: 11px;">نگارش ۴.۲ (موبایل و دسکتاپ)</small>
156 </div>
157 </div>
158 <ul class="sidebar-menu">
@@ -171,8 +163,7 @@
163 <li><a href="#" class="nav-link" data-view="view-cheques">💳 چک‌ها و صیاد</a></li>
164 <li><a href="#" class="nav-link" data-view="view-expenses">💰 هزینه‌ها و درآمد</a></li>
165 <li><a href="#" class="nav-link" data-view="view-settings">⚙️ تنظیمات و شرکت‌ها</a></li>
174 - <!-- منوی اختصاصی ادمین کل -->
175 - <li id="menu-admin-panel" style="display:none;"><a href="#" class="nav-link" data-view="view-admin" style="background:#fef2f2; color:#dc2626; font-weight:bold;">👑 مدیریت لایسنس کاربران</a></li>
166 + <li id="menu-admin-panel" style="display:none;"><a href="#" class="nav-link" data-view="view-admin" style="background:#fef2f2; color:#dc2626; font-weight:bold;">👑 مدیریت کاربران</a></li>
167 </ul>
168 <div class="sidebar-footer">
169 <span id="logged-user-label">کاربر</span> | <a href="#" onclick="handleLogout()" style="color:var(--danger); text-decoration:none;">خروج</a>
@@ -186,12 +177,12 @@
177 <section id="view-dashboard" class="view-pane active">
178 <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px;">
179 <div>
189 - <h1 style="font-size: 20px; font-weight: bold;">سامانه ایزی فاکتور (نسخه تجاری ۱.۰)</h1>
180 + <h1 style="font-size: 20px; font-weight: bold;">سامانه ایزی فاکتور</h1>
181 <p style="color: var(--text-muted); font-size: 13px;" id="dashboard-date-display"></p>
182 </div>
183 <div style="display:flex; align-items:center; gap:10px;">
193 - <span id="user-license-status-badge" class="badge badge-warning">آزمایشی (Trial)</span>
194 - <button class="btn btn-inline no-print" onclick="startNewInvoice()">➕ صدور فاکتور جدید</button>
184 + <span id="user-license-status-badge" class="badge badge-warning">آزمایشی</span>
185 + <button class="btn btn-inline no-print" onclick="startNewInvoice()">➕ فاکتور جدید</button>
186 </div>
187 </div>
188
@@ -242,7 +233,7 @@
233 </tr>
234 </thead>
235 <tbody id="dashboard-recent-table">
245 - <tr><td colspan="7" style="text-align:center; color:var(--text-muted); padding:20px;">هنوز فاکتوری صادر نشده است.</td></tr>
236 + <tr><td colspan="7" style="text-align:center; color:var(--text-muted); padding:20px;">هیچ فاکتوری صادر نشده است.</td></tr>
237 </tbody>
238 </table>
239 </div>
@@ -254,7 +245,7 @@
245 <div class="card no-print">
246 <div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:14px;">
247 <h2 style="font-size: 17px;" id="invoice-form-title">صدور فاکتور جدید</h2>
257 - <button class="btn btn-secondary btn-inline" style="display:none; padding:4px 10px; font-size:12px;" id="btn-cancel-edit" onclick="cancelInvoiceEdit()">انصراف از ویرایش</button>
248 + <button class="btn btn-secondary btn-inline" style="display:none; padding:4px 10px; font-size:12px;" id="btn-cancel-edit" onclick="cancelInvoiceEdit()">انصراف</button>
249 </div>
250
251 <input type="hidden" id="edit-invoice-id" value="" />
@@ -559,7 +550,7 @@
550 </div>
551 </section>
552
562 - <!-- ۷. تنظیمات و شرکت‌ها -->
553 + <!-- ۷. تنظیمات و شرکت‌ها (با تمام فیلدهای حقوقی دقیقاً مطابق تصویر ۱۶) -->
554 <section id="view-settings" class="view-pane">
555
556 <div class="accordion-item open">
@@ -569,17 +560,21 @@
560 </div>
561 <div class="accordion-body">
562 <div class="form-row">
572 - <div class="form-group"><label>نوع شخص</label><select id="company-entity-type" class="form-control"><option value="legal">حقوقی</option><option value="natural">حقیقی</option></select></div>
563 + <div class="form-group"><label>نوع شخص حقیقی / حقوقی</label><select id="company-entity-type" class="form-control"><option value="legal">حقوقی</option><option value="natural">حقیقی</option></select></div>
564 <div class="form-group"><label>نام شرکت / فروشگاه</label><input type="text" id="company-name-input" class="form-control" placeholder="آرا سپهر راستین" /></div>
574 - <div class="form-group"><label>تلفن</label><input type="text" id="company-phone-input" class="form-control" /></div>
565 + <div class="form-group"><label>شماره تلفن / نمابر</label><input type="text" id="company-phone-input" class="form-control" placeholder="09124376991" /></div>
566 + </div>
567 + <div class="form-row">
568 + <div class="form-group"><label>شناسه ملی</label><input type="text" id="company-national-input" class="form-control" placeholder="14008507476" /></div>
569 + <div class="form-group"><label>شماره اقتصادی</label><input type="text" id="company-economic-input" class="form-control" placeholder="14008507476" /></div>
570 + <div class="form-group"><label>شماره ثبت</label><input type="text" id="company-reg-input" class="form-control" placeholder="544926" /></div>
571 + <div class="form-group"><label>کد پستی (۱۰ رقمی)</label><input type="text" id="company-postal-input" class="form-control" placeholder="1445956311" /></div>
572 </div>
573 <div class="form-row">
577 - <div class="form-group"><label>شناسه ملی</label><input type="text" id="company-national-input" class="form-control" /></div>
578 - <div class="form-group"><label>کد اقتصادی</label><input type="text" id="company-economic-input" class="form-control" /></div>
579 - <div class="form-group"><label>شماره ثبت</label><input type="text" id="company-reg-input" class="form-control" /></div>
580 - <div class="form-group"><label>کد پستی</label><input type="text" id="company-postal-input" class="form-control" /></div>
574 + <div class="form-group"><label>استان</label><input type="text" id="company-province-input" class="form-control" value="تهران" /></div>
575 + <div class="form-group"><label>شهرستان</label><input type="text" id="company-county-input" class="form-control" value="تهران" /></div>
576 + <div class="form-group" style="grid-column: span 2;"><label>نشانی کامل</label><input type="text" id="company-address-input" class="form-control" placeholder="شهرارا کوچه مجاهد پلاک 61" /></div>
577 </div>
582 - <div class="form-group"><label>نشانی کامل</label><input type="text" id="company-address-input" class="form-control" /></div>
578 <div class="form-group"><label>پاورقی فاکتور</label><textarea id="company-footer-input" class="form-control" rows="2"></textarea></div>
579 <button class="btn btn-success" onclick="commitSaveCompany()">➕ ثبت شرکت جدید</button>
580
@@ -649,7 +644,7 @@
644 <div class="accordion-body">
645 <h3 style="font-size:16px; font-weight:bold;">ایزی فاکتور - EasyFactor</h3>
646 <p style="color:var(--text-muted); font-size:13px; margin:6px 0 12px 0;">سیستم هوشمند صدور فاکتور رسمی و غیررسمی (ریال)</p>
652 - <p style="font-size:13px; margin-bottom:14px;">نگارش فعال: <strong>نسخه ۱.۰ (تجاری - لایسنس‌دار)</strong></p>
647 + <p style="font-size:13px; margin-bottom:14px;">نگارش فعال: <strong>نسخه ۴.۲ (فول فیلد سازگار)</strong></p>
648 <div style="display:flex; gap:10px;">
649 <button class="btn btn-primary" onclick="alert('آخرین نگارش نصب است.')">بررسی آپدیت</button>
650 <button class="btn btn-secondary" onclick="alert('پشتیبانی فعال است.')">گزارش باگ</button>
@@ -659,12 +654,12 @@
654
655 </section>
656
662 - <!-- بخش ادمین کل (مختص شما) -->
657 + <!-- بخش ادمین کل -->
658 <section id="view-admin" class="view-pane">
659 <div class="card">
660 <h2 style="font-size: 18px; margin-bottom: 12px; color:var(--danger);">👑 پنل مدیریت مرکزی لایسنس کاربران</h2>
661 <p style="color:var(--text-muted); font-size:13px; margin-bottom:16px;">
667 - مدیریت دسترسی کاربران، تمدید حساب‌های آزمایشی (Trial) و ارتقای حساب‌ها به نسخه تجاری نامحدود.
662 + مدیریت دسترسی کاربران و تمدید حساب‌های آزمایشی (Trial) به نسخه تجاری.
663 </p>
664 <div class="table-responsive">
665 <table>
@@ -763,8 +758,8 @@
758 </nav>
759
760 <script>
766 - const STORAGE_KEY = 'easy_factor_commercial_v1_0';
767 - const AUTH_KEY = 'easy_factor_auth_users_v1_0';
761 + const STORAGE_KEY = 'easy_factor_commercial_v4_2';
762 + const AUTH_KEY = 'easy_factor_auth_users_v4_2';
763
764 let currentUser = null;
765 let usersDb = [
@@ -783,6 +778,8 @@
778 economic_code: '14008507476',
779 reg_number: '544926',
780 postal_code: '1445956311',
781 + province: 'تهران',
782 + county: 'تهران',
783 address: 'استان تهران - شهرستان تهران - شهر آرا کوچه مجاهد پلاک 61',
784 footer: 'از خرید شما سپاسگزاریم.'
785 }
@@ -858,7 +855,6 @@
855 return;
856 }
857
861 - // محاسبه ۱۵ روز آزمایشی (Trial)
858 const now = new Date();
859 now.setDate(now.getDate() + 15);
860 const expireStr = now.toISOString().split('T')[0];
@@ -890,7 +886,6 @@
886 adminMenu.style.display = 'none';
887 }
888
893 - // بررسی انقضای لایسنس
889 checkLicenseValidity(userObj);
890 initDatastore();
891 }
@@ -907,7 +902,7 @@
902 if (user.expire_date && user.expire_date < today) {
903 badge.innerText = 'منقضی شده';
904 badge.className = 'badge badge-danger';
910 - alert('مهلت استفاده آزمایشی ۱۵ روزه شما به پایان رسیده است. لطفاً جهت ارتقا با مدیریت تماس بگیرید.');
905 + alert('مهلت استفاده آزمایشی ۱۵ روزه شما به پایان رسیده است.');
906 } else {
907 badge.innerText = `آزمایشی (تا ${user.expire_date})`;
908 badge.className = 'badge badge-warning';
@@ -919,7 +914,6 @@
914 window.location.reload();
915 }
916
922 - // پنل ادمین کل
917 function renderAdminPanel() {
918 const tbody = document.getElementById('admin-users-table-body');
919 tbody.innerHTML = usersDb.map(u => `
@@ -956,7 +950,6 @@
950 renderAdminPanel();
951 }
952
959 - // ثبت‌نام در منوهای داشبورد
953 document.querySelectorAll('.nav-link').forEach(btn => {
954 btn.addEventListener('click', (e) => {
955 e.preventDefault();