سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 14:30 UTC
docs/wave2-closeout
audit-remediation-wave3-4-20261002
audit-remediation-wave3-verify-20261002
audit-remediation-wave4-20261002
audit-remediation-wave4b-20261002
audit-remediation-wave5a-identity-20261002
audit-remediation-wave5b-offboarding-20261002
audit-remediation-wave5c-authorization-20261002
audit-security-intent-review-20261002
audit/finora-financial-core-20261115
audit/finora-master-prompt-phase0-20261016
audit/finora-stage3-legacy-source-readonly-20261023
audit/full-controls-20261030
audit/owner-live-state-reconcile-20261012
audit/owner-review-20261007
audit/phase1-live-permissions-readonly-20261013
audit/reconcile-live-state-20261006
audit/reconcile-state-20261002
audit/wp0-hardening-baseline-20261102
branding-login-favicon-20261002
c8-workflow-task1
c8-workflow-task2
c8-workflow-task3
chore/wave0-pages-gate-closeout
claude-code-plugins-setup
design/finora-c01-authoritative-source-draft-20261124
docs-wave4b-verified-20261002
docs/active-company-invoice-release-evidence-20261014
docs/agent-operating-model-20261114
docs/chart-taxpayer-release-evidence-20261004
docs/cloud-only-agent-orchestration-20261115
docs/confirm-finora-product-charter-20261115
docs/continuation-20261030
docs/d4a-verified
docs/external-work-review-20261121
docs/finora-audit-continuity-20261014
docs/finora-backup-merge-evidence-20261014
docs/finora-ci-reconciliation-20261122
docs/finora-codex-master-prompt
docs/finora-eight-phase-plan-20261011
docs/finora-f002-live-buyer-filter-verified-20261015
docs/finora-license-race-release-evidence-20261014
docs/finora-license-rollout-acceptance-20261015
docs/finora-phase0-repeat-and-pages-nav-verified-20261015
docs/finora-phase0-repeat-evidence-20261015
docs/finora-selectors-release-and-fixture-qa-20261015
docs/finora-stagea-pr240-ci-triage-20261123
docs/finora-test-license-live-pass-20261015
docs/finora-v2-m01-coverage-20261124
docs/handoff-charter-v2-20261124
docs/invoice-product-search-release-20261011
docs/invoice-workspace-release-20261007
docs/phase-status-20261031
docs/phase0-acceptance-release-evidence-20261012
docs/phase0-admin-provision-release-evidence-20261012
docs/phase0-core-bundle-owner-login-open-20261013
docs/phase0-duplicate-js-release-20261016
docs/phase0-f001-auth-rest-shared-timeout-20261013
docs/phase0-f001-owner-login-observed-20261013
docs/phase0-f001-second-device-fail-40s-20261013
docs/phase0-f003-release-verification-20261011
docs/phase0-f004-print-release-evidence-20261012
docs/phase0-f004-watermark-release-evidence-20261012
docs/phase0-f005-large-selector-release-20261012
docs/phase0-f005-release-evidence-20261012
docs/phase0-f006-dark-release-evidence-20261012
docs/phase0-f008-final-pr-closure-evidence-20261012
docs/phase0-f008-reconcile-stale-prs-20261012
docs/phase0-f107-production-evidence-20261012
docs/phase0-kavenegar-otp-preflight-release-20261012
docs/phase0-login-release-evidence-20261012
docs/phase0-login-rest-bootstrap-stage-release-20261012
docs/phase0-owner-app-assets-bundle-release-20261013
docs/phase0-owner-login-csp-release-20261012
docs/phase0-reconcile-postmerge-evidence-20261012
docs/phase0-site-probe-release-evidence-20261012
docs/phase0-startup-release-evidence-20261012
docs/phase3-treasury-release-evidence-20261014
docs/pilot-posted-correction-release-evidence-20261014
docs/pilot-purchase-correction-release-evidence-20261014
docs/print-persian-release-verification-20261011
docs/qa-ci-triage-218-20261122
docs/real-account-qa-20261030
docs/release-state-20261007
docs/seamless-amendment-release-20261014
docs/seamless-document-correction-release-20261014
docs/settings-login-release-20261025
docs/stripe-qa-deployment-evidence-20261011
docs/ux-f2-release-evidence-20261011
docs/ux-f2-release-verification-20261011
docs/wave0-closeout
docs/wave2-closeout
exec-phase1-architecture
exec-phase1-implementation
exec-phase1-qa
exec-phase1-security-release
exec-phase1-ux
feat/accounting-document-draft-approval-20261011
feat/accounting-document-release-candidate-20261011
feat/active-company-strict-isolation-20261014
feat/admin-provisioning-reconciled-20261011
feat/admin-secure-user-provisioning-20261011
feat/admin-user-provisioning-merged-20261011
feat/d4a-request-work-queue
feat/document-lifecycle-atf-20261118
feat/document-lifecycle-temp-permanent-atef
feat/draft-first-attachment-lifecycle-216
feat/finora-offline-encrypted-backup-20261014
feat/finora-phase-a-navigation-20261023
feat/finora-stripe-sandbox-edge-gate
feat/immutable-attachment-temporary-vouchers
feat/iran-accounting-design-audit
feat/journal-document-lifecycle-20261118
feat/journal-rpc-repository-adapter-20261117
feat/office-c7-fulltext-ocr-provenance
feat/password-recovery-admin-reset-20261025
feat/pilot-expense-income-inplace-amendment-20261014
feat/pilot-journal-invoice-correction-20261014
feat/pilot-purchase-correction-20261014
feat/pilot-treasury-unallocated-correction-20261014
feat/retain-document-editor-after-save-20261014
feat/seamless-financial-document-correction-20261014
feat/slice-b-tenant-rbac
feat/stripe-sandbox-invoice-probe
feature/accounting-core-p0
feature/accounting-product-guidance
feature/admin-identity-phone-auth
feature/commercial-rnd
feature/finora-phase1a-supabase-cli-20261016
feature/finora-stage2-manual-canary-20261017
feature/finora-stage3-commercial-payload-20261023
feature/finora-stage3-enforce-invoice-rpc-20261023
feature/finora-stage3-enforce-purchase-red-20261023
feature/invoice-workspace-cleanup
feature/phase0-kavenegar-otp-preflight-20261012
feature/ux-commerce-settings-r2
fix-shell-scroll-live-cache-20261002
fix-shell-scrollbar-explicit-ownership-20261002
fix-shell-scrollbar-ownership-20261002
fix-shell-scrollbar-right-edge-20261002
fix/about-bug-report-20261114
fix/active-company-invoice-scope-20261014
fix/active-company-isolation-reconcile-20261014
fix/admin-central-password-reset-20261028
fix/auth-network-diagnostics
fix/chart-taxpayer-reference-20261003
fix/combobox-enter-reliability
fix/combobox-live-search
fix/combobox-production-cache
fix/combobox-release-asset-v2
fix/company-edit-action-20261028
fix/company-edit-pilot-delete-20261014
fix/company-form-action-state-20261014
fix/company-form-action-state-rebased-20261014
fix/contact-operational-balance-20261111
fix/dark-theme-contrast
fix/financial-lifecycle-recovery-20261124
fix/finora-accounting-test-organization-readiness-20261015
fix/finora-b01-safe-org-switch-20261124
fix/finora-b02-sync-recovery-20261124
fix/finora-b03-conflict-review-20261124
fix/finora-org-license-bootstrap-race-20261014
fix/finora-stage3-posted-source-immutable-20261023
fix/finora-v2-b03-r2-qa-20261124
fix/finora-v2-b03-r3-readonly-20261124
fix/g01-asof-financial-position-20261128
fix/invoice-product-search-rehydrate-20261011
fix/invoice-search-cache-bust
fix/issue229-linked-draft-status-20261122
fix/login-assets-retry-20261014
fix/login-inert-startup-20261110
fix/login-member-access-20261101
fix/login-resilience-20261017
fix/login-short-viewport-20261028
fix/login-startup-readiness-20261024
fix/navigation-utilities-placement-20261105
fix/office-c7-source-ref-binding
fix/office-c7-source-ref-binding-v2
fix/owner-login-network-20261026
fix/password-recovery-invalid-cancel-20261026
fix/payment-amount-format-20261111
fix/phase0-admin-provision-seat-bootstrap-20261012
fix/phase0-auth-bundled-assets-for-unstable-isp-20261013
fix/phase0-auth-handler-binding-stalled-session-20261012
fix/phase0-login-context-stage-visibility-20261012
fix/phase0-login-single-local-bundle-20261013
fix/phase0-login-site-probe-clarity-20261012
fix/phase0-login-ui-ready-20261012
fix/phase0-modal-dashboard-drill-20261011
fix/phase0-pages-blocking-core-bundles-20261013
fix/phase0-print-no-draft-watermark-20261012
fix/phase0-startup-parallel-asset-load-20261012
fix/phase3-behavioral-verification
fix/preserve-pending-edits-20261121
fix/print-persian-digit-consistency-20261011
fix/recovery-login-startup-20261027
fix/report-opening-balance-release-20261130
fix/settings-checkbox-persistence-20261024
fix/taxpayer-arithmetic-20261004
fix/ux-keyboard-search-f2-20261011
fix/wave2-request-input-integrity
hardening/c01-source-draft-20261129
hardening/global-draft-conversion-20261113
hardening/wp1-ledger-integrity-20261102
integration/finora-execution-20261124
integration/issue229-ui-qa-20261122
integration/wp1-ledger-core-20261115
integration/wp2-manual-journal-rpc-20261116
main
ops-heartbeat-v2-20261002
ops-progress-heartbeat-rule-20261002
ops/wave4-production-20261003
plan/financial-core-phase1-approval-20261016
qa/attachment-allocator-two-session-20261122
qa/draft-first-save-red-evidence-20261122
qa/finora-autopost-retry-identity-red-20261122
qa/finora-identity-rpc-security-tripwire-20261122
qa/finora-issue223-manual-kardex-browser-red-20261123
qa/finora-issue223-stock-real-jwt-20261123
qa/finora-issue238-inventory-count-browser-red-20261123
qa/finora-issue238-save-browser-red-20261122
qa/finora-login-cors-header-preflight-20261025
qa/finora-phase0-saved-session-repeat-20261015
qa/finora-phase5-posted-insert-jwt-red-20261123
qa/finora-stage3-ui-jwt-autopost-20261023
qa/finora-v2-g01-report-reconciliation-20261125
qa/free-supabase-local-wp2-20261116
qa/issue229-approval-boundary-jwt-20261122
qa/issue229-sale-save-linked-draft-red-20261122
qa/phase0-acceptance-start-20261012
qa/phase0-f005-account-project-contract-stress-20261012
qa/phase0-f005-selector-stress-20261012
qa/phase0-f006-dark-contrast-20261012
qa/post-wave4-verification-20261003
qa/posted-source-immutable-jwt-20261122
qa/pr219-wp1-disposable-dburl-proof-20261123
qa/purchase-source-jwt-20261122
qa/real-settings-acceptance-20261025
qa/recovery-mail-acceptance-20261026
qa/source-autopost-jwt-atomicity-20261122
qa/wave0-negative-gate-proof
qa/wp2-auth-tenant-e2e-20261117
qa/wp2-authorized-journal-write-20261122
qa/wp2-financial-paths-reconciliation-20261122
qa/wp3-financial-tenant-isolation-20261117
remediation/wave0-liveqa-wave1
remediation/wave2-request-integrity
staging/finora-stage22-free-20261022
state-scroll-verified-20261002
state-wave4b-production-20261002
state-wave5a-production-20261002
test/finora-accounting-boot-readiness-20261015
test/finora-f0-02-production-selectors-20261015
test/finora-pages-commerce-event-wiring-20261015
test/finora-pages-invoice-selectors-readonly-20261015
test/finora-stage3-jwt-source-post-20261023
test/phase0-invoice-fixture-bootstrap-20261016
test/phase0-invoice-persistence-20261011
test/phase0-pages-delayed-dispatcher-20261016
ux-scroll-ownership-20261002
work/finora-stage3-enforce-purchase-green-20261023
work/finora-stage3-enforce-sale-green-20261023
work/finora-stage3-payload-green-20261023
| 1 | <!DOCTYPE html> |
| 2 | <html lang="fa" dir="rtl"> |
| 3 | <head> |
| 4 | <meta charset="UTF-8" /> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" /> |
| 6 | <title>فینورا | سامانه صدور فاکتور و مدیریت مالی</title> |
| 7 | <link rel="manifest" href="manifest.json" /> |
| 8 | <meta name="application-name" content="فینورا" /> |
| 9 | <meta name="description" content="سامانه ابری صدور فاکتور و مدیریت مالی فینورا" /> |
| 10 | <meta name="referrer" content="strict-origin-when-cross-origin" /> |
| 11 | <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; font-src 'self' https://cdn.jsdelivr.net data:; img-src 'self' data: blob:; connect-src 'self' https://hcsixhqbyuhpshfwqpjx.supabase.co; object-src 'none'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests" /> |
| 12 | <meta name="apple-mobile-web-app-capable" content="yes" /> |
| 13 | <meta name="theme-color" content="#2563eb" /> |
| 14 | <script src="vendor/supabase.js"></script> |
| 15 | <script src="https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"></script> |
| 16 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/misc/Farsi-Digits/Vazirmatn-FD-font-face.css" /> |
| 17 | <style> |
| 18 | :root{--primary:#2563eb;--primary-hover:#1d4ed8;--bg:#f8fafc;--card-bg:#fff;--text:#0f172a;--text-muted:#64748b;--border:#cbd5e1;--danger:#dc2626;--success:#059669;--warning:#d97706;--sidebar-w:240px;--nav-h:70px} |
| 19 | html,body{width:100%;max-width:100%;overflow-x:hidden!important;position:relative} |
| 20 | *{box-sizing:border-box;margin:0;padding:0;font-family:'Vazirmatn FD',-apple-system,BlinkMacSystemFont,Tahoma,sans-serif;-webkit-tap-highlight-color:transparent} |
| 21 | body{background-color:var(--bg);color:var(--text);font-size:14px} |
| 22 | #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} |
| 23 | .auth-card{background:#fff;border-radius:16px;max-width:420px;width:100%;padding:30px;box-shadow:0 25px 50px -12px rgba(0,0,0,.25);text-align:right} |
| 24 | .app-root{display:flex;min-height:100vh;width:100%;max-width:100%;overflow-x:hidden} |
| 25 | .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} |
| 26 | .brand-box{padding:20px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--border)} |
| 27 | .brand-icon{width:40px;height:40px;background:var(--primary);border-radius:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:bold;font-size:14px} |
| 28 | .sidebar-menu{list-style:none;padding:16px 8px;flex:1;overflow-y:auto} |
| 29 | .sidebar-menu li a{display:flex;align-items:center;gap:12px;padding:12px 16px;color:var(--text);text-decoration:none;border-radius:8px;margin-bottom:4px;font-size:14px;font-weight:500;transition:all .2s;cursor:pointer} |
| 30 | .sidebar-menu li a:hover,.sidebar-menu li a.active{background:#eff6ff;color:var(--primary);font-weight:bold} |
| 31 | .sidebar-footer{padding:12px;border-top:1px solid var(--border);font-size:12px;color:var(--text-muted);text-align:center;display:flex;flex-direction:column;gap:6px} |
| 32 | .main-surface{flex:1;margin-right:var(--sidebar-w);padding:20px;padding-bottom:100px;max-width:calc(100% - var(--sidebar-w));overflow-x:hidden} |
| 33 | .mobile-dock{display:none;position:fixed;bottom:0;left:0;right:0;min-height:var(--nav-h);background:rgba(255,255,255,.98);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-top:1px solid #cbd5e1;z-index:200;align-items:stretch;padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -4px 12px rgba(0,0,0,.06);overflow-x:auto;scrollbar-width:none}.mobile-dock::-webkit-scrollbar{display:none} |
| 34 | .dock-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#475569;text-decoration:none;font-size:10.5px;font-weight:600;flex:0 0 76px;min-height:64px;cursor:pointer;white-space:nowrap} |
| 35 | .dock-tab.active{color:var(--primary);font-weight:800} |
| 36 | .dock-tab svg{width:20px;height:20px;stroke-width:2} |
| 37 | .whatsapp-support{position:fixed;bottom:90px;left:20px;z-index:250;display:flex;align-items:center;gap:8px;background:linear-gradient(135deg,#25D366,#128C7E);color:#fff;text-decoration:none;padding:10px 16px 10px 12px;border-radius:50px;box-shadow:0 8px 24px rgba(37,211,102,.4);font-weight:700;font-size:13px;transition:all .25s ease} |
| 38 | .whatsapp-support:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(37,211,102,.55)} |
| 39 | .whatsapp-support svg{width:22px;height:22px;flex-shrink:0} |
| 40 | .card{background:var(--card-bg);border:1px solid var(--border);border-radius:12px;padding:18px;margin-bottom:18px;box-shadow:0 1px 3px rgba(0,0,0,.03);width:100%;max-width:100%;overflow:hidden} |
| 41 | .grid-kpi{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin-bottom:18px} |
| 42 | .kpi-gradient{box-shadow:0 4px 14px rgba(0,0,0,.12);border:none} |
| 43 | .quick-actions-row{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px} |
| 44 | .qa-btn{display:flex;align-items:center;gap:6px;border:none;color:#fff;padding:11px 16px;border-radius:12px;font-size:13px;font-weight:600;cursor:pointer;box-shadow:0 3px 10px rgba(0,0,0,.15);flex:1;min-width:130px;justify-content:center} |
| 45 | .qa-btn:hover{filter:brightness(1.08)} |
| 46 | .report-bar-wrap{display:flex;align-items:flex-end;gap:6px;height:160px;padding:10px 4px;overflow-x:auto} |
| 47 | .report-bar-col{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:38px} |
| 48 | .report-bar{width:26px;border-radius:6px 6px 0 0;background:linear-gradient(180deg,#8b5cf6,#6d28d9);transition:height .3s} |
| 49 | .report-bar-label{font-size:10px;color:var(--text-muted);white-space:nowrap} |
| 50 | .report-bar-value{font-size:10px;font-weight:bold;color:var(--text)} |
| 51 | .kpi-unit{background:var(--card-bg);border:1px solid var(--border);border-radius:10px;padding:16px;display:flex;align-items:center;gap:14px} |
| 52 | .kpi-icon{width:44px;height:44px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:20px} |
| 53 | .kpi-val{font-size:17px;font-weight:bold;margin-top:4px} |
| 54 | .kpi-lbl{color:var(--text-muted);font-size:12px;font-weight:500} |
| 55 | .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 16px;background:var(--primary);color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:14px;font-weight:600;transition:background .2s;text-decoration:none} |
| 56 | .btn:hover{background:var(--primary-hover)} |
| 57 | .btn-secondary{background:#e2e8f0;color:var(--text)} |
| 58 | .btn-secondary:hover{background:#cbd5e1} |
| 59 | .btn-success{background:var(--success)} |
| 60 | .btn-danger{background:var(--danger)} |
| 61 | .btn-warning{background:var(--warning);color:#fff} |
| 62 | .form-group{margin-bottom:14px;width:100%} |
| 63 | .form-group label{display:block;margin-bottom:6px;font-size:13px;font-weight:600;color:#334155} |
| 64 | .form-control{width:100%;min-height:44px;padding:8px 12px;border:1px solid var(--border);border-radius:8px;font-size:14px;outline:none;background:#fff;transition:border-color .2s;direction:rtl} |
| 65 | .form-control:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.15)} |
| 66 | .form-control:disabled{background-color:#f1f5f9;color:#94a3b8;cursor:not-allowed} |
| 67 | .form-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;width:100%} |
| 68 | .table-responsive{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--border);border-radius:8px} |
| 69 | table{width:100%;border-collapse:collapse;text-align:right;font-size:13px;min-width:500px} |
| 70 | th,td{padding:10px 10px;border-bottom:1px solid var(--border)} |
| 71 | th{background:#f1f5f9;color:#334155;font-weight:700} |
| 72 | #invoice-items-table{direction:rtl;width:100%;table-layout:auto} |
| 73 | #invoice-items-table th,#invoice-items-table td{text-align:right} |
| 74 | #invoice-items-table th:first-child,#invoice-items-table td:first-child{text-align:center} |
| 75 | #invoice-items-table th:last-child,#invoice-items-table td:last-child{text-align:center} |
| 76 | .badge{display:inline-block;padding:3px 8px;border-radius:6px;font-size:11px;font-weight:600} |
| 77 | .badge-success{background:#d1fae5;color:#065f46} |
| 78 | .badge-warning{background:#fef3c7;color:#92400e} |
| 79 | .badge-danger{background:#fee2e2;color:#991b1b} |
| 80 | .badge-info{background:#e0f2fe;color:#0369a1} |
| 81 | .view-pane{display:none} |
| 82 | .view-pane.active{display:block} |
| 83 | .modal-backdrop{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(15,23,42,.6);backdrop-filter:blur(4px);z-index:999;align-items:center;justify-content:center;padding:16px} |
| 84 | .modal-backdrop.active{display:flex} |
| 85 | .modal-card{background:#fff;border-radius:14px;max-width:600px;width:100%;max-height:90vh;overflow-y:auto;padding:20px;box-shadow:0 20px 25px -5px rgba(0,0,0,.1)} |
| 86 | .accordion-item{border:1px solid var(--border);border-radius:10px;margin-bottom:12px;overflow:hidden;background:#fff} |
| 87 | .accordion-header{padding:14px 18px;background:#f8fafc;font-weight:bold;display:flex;justify-content:space-between;align-items:center;cursor:pointer;user-select:none} |
| 88 | .accordion-body{padding:16px;border-top:1px solid var(--border);display:none;background:#fff} |
| 89 | .accordion-item.open .accordion-body{display:block} |
| 90 | .about-dev-card{background:linear-gradient(135deg,#eff6ff,#f8fafc);border:1.5px solid #bfdbfe;border-radius:12px;padding:16px 18px;margin:14px 0;display:flex;align-items:center;gap:14px;flex-wrap:wrap} |
| 91 | .about-dev-avatar{width:52px;height:52px;background:linear-gradient(135deg,var(--primary),#1e40af);color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:bold;flex-shrink:0} |
| 92 | .about-dev-info{flex:1;min-width:180px} |
| 93 | .about-dev-info h4{font-size:15px;color:#1e293b;margin-bottom:4px} |
| 94 | .about-dev-info p{font-size:12.5px;color:#64748b;margin-bottom:2px} |
| 95 | .about-dev-actions{display:flex;gap:8px;flex-wrap:wrap} |
| 96 | .about-dev-actions a{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:8px;font-size:12.5px;font-weight:700;text-decoration:none;transition:all .2s} |
| 97 | .about-dev-actions .btn-wa{background:linear-gradient(135deg,#25D366,#128C7E);color:#fff} |
| 98 | .about-dev-actions .btn-call{background:var(--primary);color:#fff} |
| 99 | @media print{ |
| 100 | @page{size:A4 landscape;margin:8mm 10mm} |
| 101 | html,body{background:#fff!important;color:#000!important;margin:0!important;padding:0!important;width:100%!important} |
| 102 | .sidebar,.mobile-dock,.no-print,#auth-screen,.modal-backdrop,.whatsapp-support{display:none!important} |
| 103 | .view-pane{display:none!important} |
| 104 | .main-surface{margin:0!important;padding:0!important;max-width:100%!important;width:100%!important} |
| 105 | .main-surface>*:not(#printable-invoice){display:none!important} |
| 106 | .card{border:none!important;box-shadow:none!important;padding:0!important;margin:0!important} |
| 107 | .invoice-a4-page{width:100%!important;margin:0 auto!important;page-break-after:always!important;break-after:page!important;box-sizing:border-box!important} |
| 108 | .invoice-a4-page:last-child{page-break-after:avoid!important;break-after:avoid!important} |
| 109 | #printable-invoice{display:block!important} |
| 110 | } |
| 111 | @media (max-width:768px){ |
| 112 | .sidebar{display:none} |
| 113 | .main-surface{margin-right:0;padding:12px;padding-bottom:calc(var(--nav-h) + 20px);max-width:100%} |
| 114 | .mobile-dock{display:flex} |
| 115 | .btn{width:100%} |
| 116 | .btn-inline{width:auto} |
| 117 | .form-row{grid-template-columns:1fr} |
| 118 | .whatsapp-support{bottom:84px;left:12px;padding:8px 12px 8px 10px;font-size:11.5px} |
| 119 | } |
| 120 | |
| 121 | /* Finora Phase 1 — scalable enterprise shell */ |
| 122 | :root{--shell-rail:82px;--shell-panel:238px;--shell-top:72px;--shell-line:#e5eaf1;--shell-soft:#f4f8fc;--shell-accent:#078b9b;--shell-accent-soft:#e9f8fa} |
| 123 | body{background:#f6f9fc} |
| 124 | .app-shell-nav.sidebar{width:var(--shell-rail);border-left:1px solid var(--shell-line);box-shadow:none;background:#fff;z-index:320} |
| 125 | .app-shell-nav .brand-box{height:var(--shell-top);padding:9px 6px;display:flex;flex-direction:column;justify-content:center;gap:2px;text-align:center;border-bottom:1px solid var(--shell-line)} |
| 126 | .app-shell-nav .brand-icon{display:none} |
| 127 | .app-shell-nav .brand-copy h2{font-size:18px;line-height:1.2;color:#10204b;letter-spacing:-.3px} |
| 128 | .app-shell-nav .brand-copy small{font-size:10px;color:#1685d1;font-weight:800} |
| 129 | .module-rail{display:flex;flex:1;flex-direction:column;gap:4px;padding:8px 6px;overflow-y:auto;scrollbar-width:thin} |
| 130 | .module-tab{appearance:none;border:0;background:transparent;color:#334155;border-radius:9px;min-height:55px;padding:6px 3px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer;font:inherit;transition:.16s ease} |
| 131 | .module-tab span{font-family:Arial,sans-serif;font-size:21px;line-height:1} |
| 132 | .module-tab b{font-size:10.5px;font-weight:650;white-space:nowrap} |
| 133 | .module-tab:hover{background:#f2f7fb;color:#0f6470} |
| 134 | .module-tab.active{background:linear-gradient(145deg,#0795a5,#057b8b);color:#fff;box-shadow:0 5px 14px rgba(7,139,155,.18)} |
| 135 | .app-shell-nav .sidebar-footer{padding:7px 4px;gap:5px;border-top:1px solid var(--shell-line);font-size:9.5px;overflow:hidden} |
| 136 | .shell-logout{border:0;background:transparent;color:#64748b;font:inherit;font-size:10px;cursor:pointer} |
| 137 | .module-panel{position:fixed;top:0;bottom:0;right:var(--shell-rail);width:var(--shell-panel);z-index:310;background:#fff;border-left:1px solid var(--shell-line);transition:transform .2s ease,opacity .2s ease} |
| 138 | .module-panel-head{height:var(--shell-top);display:flex;align-items:center;justify-content:space-between;padding:13px 16px;border-bottom:1px solid var(--shell-line)} |
| 139 | .module-panel-head small{display:block;color:#94a3b8;font-size:10px;margin-bottom:3px} |
| 140 | .module-panel-head h3{font-size:16px;color:#0f172a} |
| 141 | .module-panel-handle{position:fixed;z-index:325;top:50%;right:calc(var(--shell-rail) + var(--shell-panel) - 1px);transform:translate(50%,-50%);width:24px;height:54px;border:1px solid #cbd5e1;border-radius:10px 0 0 10px;background:#fff;color:#087c8a;box-shadow:0 4px 14px rgba(15,23,42,.12);cursor:pointer;font:700 20px/1 Arial,sans-serif;transition:right .2s ease,background .15s ease} |
| 142 | .module-panel-handle:hover{background:#effafb} |
| 143 | .module-panel-handle:focus-visible{outline:3px solid rgba(7,139,155,.22);outline-offset:2px} |
| 144 | .module-panel-links{height:calc(100vh - var(--shell-top));overflow-y:auto;padding:11px} |
| 145 | .module-group{padding:5px 0 11px;border-bottom:1px solid #f0f3f7;margin-bottom:8px} |
| 146 | .module-group:last-child{border-bottom:0} |
| 147 | .module-group-title{font-size:10.5px;color:#94a3b8;font-weight:700;padding:5px 8px 7px} |
| 148 | .module-link{width:100%;border:0;background:transparent;color:#334155;border-radius:8px;min-height:38px;padding:8px 9px;display:flex;align-items:center;gap:9px;text-align:right;font:inherit;font-size:12px;cursor:pointer} |
| 149 | .module-link .mi{width:22px;text-align:center;font-family:Arial,sans-serif;color:#64748b;font-size:15px} |
| 150 | .module-link:hover{background:#f6f9fc;color:#075f6a} |
| 151 | .module-link.active{background:var(--shell-accent-soft);color:#087c8a;font-weight:800;box-shadow:inset -3px 0 #0a9baa} |
| 152 | .module-link.active .mi{color:#078b9b} |
| 153 | .topbar{position:fixed;z-index:300;top:0;right:calc(var(--shell-rail) + var(--shell-panel));left:0;height:var(--shell-top);display:flex;align-items:center;gap:12px;padding:10px 20px;background:rgba(255,255,255,.96);border-bottom:1px solid var(--shell-line);backdrop-filter:blur(12px)} |
| 154 | .topbar-menu{display:none;width:38px;height:38px;border:1px solid var(--shell-line);border-radius:9px;background:#fff;color:#334155;cursor:pointer} |
| 155 | .global-search{position:relative;flex:1;max-width:600px;margin-inline:auto;display:flex;align-items:center;gap:7px;height:40px;padding:0 12px;background:#f8fafc;border:1px solid #dce4ee;border-radius:9px} |
| 156 | .global-search:focus-within{background:#fff;border-color:#8ecbd3;box-shadow:0 0 0 3px rgba(7,139,155,.08)} |
| 157 | .global-search>span{color:#64748b;font-size:18px} |
| 158 | .global-search input{width:100%;border:0;outline:0;background:transparent;font:inherit;color:#0f172a;font-size:12px} |
| 159 | .command-results{display:none;position:absolute;top:46px;right:0;left:0;background:#fff;border:1px solid var(--shell-line);border-radius:10px;padding:6px;box-shadow:0 16px 35px rgba(15,23,42,.13);max-height:330px;overflow:auto} |
| 160 | .command-results.open{display:block} |
| 161 | .command-result{padding:9px 10px;border-radius:7px;cursor:pointer;color:#334155;font-size:12px} |
| 162 | .command-result:hover{background:#f0f8fa;color:#087c8a} |
| 163 | .command-result small{float:left;color:#94a3b8} |
| 164 | .topbar-actions{display:flex;gap:7px;align-items:center} |
| 165 | .topbar-pill{height:38px;border:1px solid #dce4ee;border-radius:9px;background:#fff;color:#334155;padding:0 11px;font:inherit;font-size:11.5px;font-weight:650;cursor:pointer;white-space:nowrap} |
| 166 | .topbar-pill:hover{border-color:#a9cbd0;background:#f7fbfc} |
| 167 | .quick-create{position:relative}.quick-create-menu{display:none;position:absolute;top:44px;left:0;width:230px;background:#fff;border:1px solid var(--shell-line);border-radius:10px;padding:7px;box-shadow:0 16px 35px rgba(15,23,42,.14);z-index:420}.quick-create-menu.open{display:block}.quick-create-menu button{width:100%;border:0;background:transparent;border-radius:7px;padding:9px 10px;text-align:right;font:inherit;font-size:11.5px;color:#334155;cursor:pointer}.quick-create-menu button:hover{background:#f0f8fa;color:#087c8a}.quick-create-menu .quick-create-group{padding:5px 8px 4px;color:#94a3b8;font-size:9.5px;font-weight:800} |
| 168 | .main-surface{margin-right:calc(var(--shell-rail) + var(--shell-panel));padding:calc(var(--shell-top) + 18px) 22px 90px;max-width:calc(100% - var(--shell-rail) - var(--shell-panel));transition:margin-right .2s ease,max-width .2s ease} |
| 169 | .workspace-context{display:flex;align-items:center;gap:9px;margin:0 0 14px;padding:0 2px;color:#64748b;font-size:11px} |
| 170 | .workspace-context strong{color:#0f172a;font-size:13px} |
| 171 | .workspace-eyebrow{color:#078b9b;font-weight:800} |
| 172 | .shell-panel-collapsed .module-panel{transform:translateX(100%);opacity:0;pointer-events:none} |
| 173 | .shell-panel-collapsed .module-panel-handle{right:calc(var(--shell-rail) - 1px)} |
| 174 | .shell-panel-collapsed .topbar{right:var(--shell-rail)} |
| 175 | .shell-panel-collapsed .main-surface{margin-right:var(--shell-rail);max-width:calc(100% - var(--shell-rail))} |
| 176 | .grid-kpi .kpi-gradient{background:#fff!important;border:1px solid var(--shell-line)!important;box-shadow:0 2px 7px rgba(15,23,42,.035)!important} |
| 177 | .grid-kpi .kpi-gradient .kpi-lbl{color:#475569!important} |
| 178 | .grid-kpi .kpi-gradient .kpi-val{color:#10204b!important;font-size:19px} |
| 179 | .grid-kpi .kpi-gradient .kpi-icon{background:#f1f7fb!important;color:#087c8a!important} |
| 180 | .card,.kpi-unit{border-color:var(--shell-line);box-shadow:0 2px 7px rgba(15,23,42,.035)} |
| 181 | .fin-dashboard-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:2px 0 16px}.fin-dashboard-head h1{font-size:25px;color:#10204b;margin:3px 0}.fin-dashboard-head p,.fin-breadcrumb{font-size:11px;color:#64748b}.fin-dashboard-actions{display:flex;gap:8px} |
| 182 | .fin-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}.fin-kpi-card{background:#fff;border:1px solid var(--shell-line);border-radius:10px;padding:16px;display:flex;align-items:flex-start;gap:12px;min-height:118px;box-shadow:0 2px 7px rgba(15,23,42,.035)}.fin-kpi-icon{width:42px;height:42px;border-radius:10px;background:#edf7fb;color:#1685d1;display:grid;place-items:center;font-size:21px;flex:0 0 auto}.fin-kpi-card small{display:block;color:#475569;font-size:11.5px;margin-bottom:8px}.fin-kpi-card strong{display:block;color:#10204b;font-size:20px;direction:rtl}.fin-kpi-card em{display:block;color:#94a3b8;font-style:normal;font-size:10px;margin-top:7px} |
| 183 | .fin-dashboard-grid{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(280px,.9fr);gap:12px}.fin-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.fin-card-head h3{font-size:14px;color:#10204b}.fin-card-head small{display:block;color:#94a3b8;font-size:10px;margin-top:3px}.fin-cash-chart{min-height:255px;display:flex;align-items:center;justify-content:center}.fin-cash-chart svg{width:100%;height:245px;overflow:visible}.fin-chart-legend{display:flex;gap:14px;font-size:10px;color:#64748b}.fin-chart-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-left:4px}.fin-status-row{padding:10px 0;border-bottom:1px solid #f0f3f7}.fin-status-row:last-child{border-bottom:0}.fin-status-line{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:#334155;margin-bottom:6px}.fin-status-track{height:7px;background:#edf2f7;border-radius:999px;overflow:hidden}.fin-status-fill{height:100%;background:#0a9baa;border-radius:999px}.fin-dashboard-bottom{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(0,1.7fr);gap:12px;margin-top:12px}.fin-quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.fin-quick-grid button{border:1px solid #e5eaf1;background:#fff;border-radius:8px;min-height:72px;padding:8px 4px;font:inherit;font-size:10.5px;color:#334155;cursor:pointer}.fin-quick-grid button:hover{border-color:#9bd0d6;background:#f3fbfc;color:#087c8a}.fin-quick-grid span{display:block;font-size:20px;color:#1685d1;margin-bottom:5px}.fin-text-btn{border:0;background:transparent;color:#1685d1;font:inherit;font-size:11px;cursor:pointer} |
| 184 | @media(max-width:1180px){.fin-kpi-grid{grid-template-columns:repeat(2,1fr)}.fin-dashboard-grid,.fin-dashboard-bottom{grid-template-columns:1fr}}@media(max-width:620px){.fin-dashboard-head{align-items:flex-start;flex-direction:column}.fin-kpi-grid{grid-template-columns:1fr 1fr}.fin-kpi-card{padding:11px;min-height:100px}.fin-kpi-card strong{font-size:15px}.fin-quick-grid{grid-template-columns:repeat(2,1fr)}} |
| 185 | @media(max-width:1100px){:root{--shell-panel:210px}.topbar{padding-inline:12px}.topbar-pill.fiscal-pill{display:none}} |
| 186 | @media(max-width:820px){ |
| 187 | .app-shell-nav,.module-panel,.module-panel-handle{display:none!important} |
| 188 | .topbar,.shell-panel-collapsed .topbar{right:0;height:58px;padding:8px 10px;gap:7px} |
| 189 | .topbar-menu{display:none} |
| 190 | .topbar-actions .topbar-pill{display:none} |
| 191 | .global-search{height:38px;max-width:none} |
| 192 | .main-surface,.shell-panel-collapsed .main-surface{margin-right:0;max-width:100%;padding:72px 12px 92px} |
| 193 | .workspace-context{overflow:hidden;white-space:nowrap} |
| 194 | .mobile-dock{display:flex} |
| 195 | .whatsapp-support{bottom:84px} |
| 196 | } |
| 197 | @media(max-width:520px){.grid-kpi{grid-template-columns:1fr 1fr}.kpi-unit{padding:11px;gap:8px}.grid-kpi .kpi-gradient .kpi-val{font-size:14px}.kpi-icon{width:36px;height:36px}.workspace-context{font-size:10px}} |
| 198 | @media print{.topbar,.module-panel,.app-shell-nav,.workspace-context{display:none!important}.main-surface{margin:0!important;max-width:none!important;padding:0!important}} |
| 199 | </style> |
| 200 | </head> |
| 201 | <body> |
| 202 | |
| 203 | <div id="auth-screen"> |
| 204 | <div class="auth-card"> |
| 205 | <div style="text-align:center;margin-bottom:20px"> |
| 206 | <div style="width:50px;height:50px;background:var(--primary);color:#fff;font-weight:bold;font-size:18px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;margin-bottom:10px">فینورا</div> |
| 207 | <h2 style="font-size:20px;font-weight:bold;color:var(--text)">سامانه فینورا</h2> |
| 208 | <p style="font-size:12px;color:var(--text-muted);margin-top:4px">ورود یا ثبتنام در سامانه</p> |
| 209 | </div> |
| 210 | <div id="auth-form-container"> |
| 211 | <button class="btn btn-secondary" style="width:100%;margin-bottom:12px" onclick="signInWithGoogle()"><strong>G</strong> ادامه با Google</button> |
| 212 | <div style="text-align:center;font-size:12px;color:var(--text-muted);margin:8px 0">یا با ایمیل</div> |
| 213 | <div class="form-group"><label>ایمیل</label><input type="email" id="auth-email" class="form-control" placeholder="name@example.com" autocomplete="email" autocapitalize="none" dir="ltr" /></div> |
| 214 | <div class="form-group"><label>رمز عبور (اگر قبلاً تعیین کردهاید)</label><input type="password" id="auth-password" class="form-control" placeholder="رمز عبور" autocomplete="current-password" dir="ltr" /></div> |
| 215 | <div style="display:flex;gap:10px;margin-top:16px"> |
| 216 | <button class="btn btn-primary" style="flex:1" onclick="handleLogin()">ورود با رمز</button> |
| 217 | <button class="btn btn-secondary" style="flex:1" onclick="startEmailOtp()">ادامه با کد ایمیل</button> |
| 218 | </div> |
| 219 | <p style="font-size:11.5px;color:var(--text-muted);margin-top:12px;line-height:1.8">کاربر جدید هستید یا رمز را فراموش کردهاید؟ «ادامه با کد ایمیل» را بزنید؛ کد یکبارمصرف برای شما ایمیل میشود.</p> |
| 220 | </div> |
| 221 | <div id="auth-otp-container" style="display:none"> |
| 222 | <p style="font-size:13px;line-height:1.9;margin-bottom:12px">کد یکبارمصرف به <strong dir="ltr" id="auth-otp-email-label"></strong> ارسال شد. پوشهی هرزنامه را هم ببینید.</p> |
| 223 | <div class="form-group"><label>کد تأیید</label><input type="text" id="auth-otp" class="form-control" inputmode="numeric" autocomplete="one-time-code" placeholder="------" dir="ltr" /></div> |
| 224 | <div style="display:flex;gap:10px;margin-top:16px"> |
| 225 | <button class="btn btn-primary" style="flex:1" onclick="verifyEmailOtp()">تأیید کد</button> |
| 226 | <button class="btn btn-secondary" style="flex:1" onclick="startEmailOtp(true)">ارسال دوباره</button> |
| 227 | </div> |
| 228 | <button class="btn btn-secondary" style="width:100%;margin-top:10px" onclick="backToAuthMain()">بازگشت</button> |
| 229 | </div> |
| 230 | <div id="auth-setpass-container" style="display:none"> |
| 231 | <p style="font-size:13px;line-height:1.9;margin-bottom:12px">ایمیل شما تأیید شد. برای ورودهای بعدی میتوانید یک رمز عبور تعیین کنید.</p> |
| 232 | <div class="form-group"><label>رمز عبور جدید</label><input type="password" id="auth-newpass" class="form-control" placeholder="حداقل ۸ کاراکتر" autocomplete="new-password" dir="ltr" /></div> |
| 233 | <div class="form-group"><label>تکرار رمز عبور</label><input type="password" id="auth-newpass2" class="form-control" placeholder="تکرار رمز" autocomplete="new-password" dir="ltr" /></div> |
| 234 | <button class="btn btn-primary" style="width:100%;margin-top:16px" onclick="saveNewPassword()">ذخیره رمز و ورود</button> |
| 235 | <button class="btn btn-secondary" style="width:100%;margin-top:10px" onclick="skipSetPassword()">فعلاً بدون رمز ادامه بده</button> |
| 236 | </div> |
| 237 | </div> |
| 238 | </div> |
| 239 | |
| 240 | <div id="sync-badge" style="display:none;position:fixed;bottom:80px;left:12px;z-index:9999;color:#fff;padding:6px 12px;border-radius:999px;font-size:12px;box-shadow:0 2px 8px rgba(0,0,0,.25)"></div> |
| 241 | <div class="app-root"> |
| 242 | <aside class="sidebar app-shell-nav no-print" aria-label="ناوبری اصلی"> |
| 243 | <div class="brand-box"> |
| 244 | <div class="brand-icon" aria-hidden="true">F</div> |
| 245 | <div class="brand-copy"><h2>فینورا</h2><small>نسخه ۱.۰</small><span class="sr-only">فینورا — نسخه ۱.۰</span></div> |
| 246 | </div> |
| 247 | <div class="module-rail" id="module-rail"> |
| 248 | <button class="module-tab active" data-module="dashboard" data-view="view-dashboard" onclick="openModule('dashboard','view-dashboard','overview')" title="داشبورد"><span>⌂</span><b>داشبورد</b></button> |
| 249 | <button class="module-tab" data-module="accounting" data-view="view-accounting-foundation" onclick="openModule('accounting','view-accounting-foundation','accounts')" title="حسابداری"><span>▦</span><b>حسابداری</b></button> |
| 250 | <button class="module-tab" data-module="commerce" data-view="view-invoices" onclick="openModule('commerce','view-invoices')" title="بازرگانی"><span>⇄</span><b>بازرگانی</b></button> |
| 251 | <button class="module-tab" data-module="treasury" data-view="view-payments" onclick="openModule('treasury','view-payments')" title="خزانهداری"><span>◈</span><b>خزانه</b></button> |
| 252 | <button class="module-tab" data-module="projects" data-view="view-contracting" onclick="openModule('projects','view-contracting')" title="پیمانها"><span>▧</span><b>پیمانها</b></button> |
| 253 | <button class="module-tab" data-module="inventory" data-view="view-inventory" onclick="openModule('inventory','view-inventory','stock')" title="انبار"><span>▦</span><b>انبار</b></button> |
| 254 | <button class="module-tab" data-module="assets" data-view="view-assets" onclick="openModule('assets','view-assets','asset-register')" title="دارایی ثابت"><span>◆</span><b>دارایی</b></button> |
| 255 | <button class="module-tab" data-module="enterprise" data-view="view-enterprise" onclick="openModule('enterprise','view-enterprise','employees')" title="سازمان"><span>♙</span><b>سازمان</b></button> |
| 256 | <button class="module-tab" data-module="reports" data-view="view-reports" onclick="openModule('reports','view-reports')" title="گزارشها"><span>▥</span><b>گزارش</b></button> |
| 257 | <button class="module-tab" data-module="settings" data-view="view-settings" onclick="openModule('settings','view-settings')" title="تنظیمات"><span>⚙</span><b>تنظیمات</b></button> |
| 258 | </div> |
| 259 | <div class="sidebar-footer"> |
| 260 | <span id="logged-user-label">کاربر</span> |
| 261 | <button class="shell-logout" onclick="handleLogout()" title="خروج">خروج</button> |
| 262 | </div> |
| 263 | </aside> |
| 264 | <aside class="module-panel no-print" id="module-panel" aria-label="زیرمنوی ماژول"> |
| 265 | <div class="module-panel-head"> |
| 266 | <div><small>زیرسیستم</small><h3 id="module-panel-title">داشبورد</h3></div> |
| 267 | </div> |
| 268 | <div id="module-panel-links" class="module-panel-links"></div> |
| 269 | </aside> |
| 270 | <button id="module-panel-handle" class="module-panel-handle no-print" type="button" onclick="toggleModulePanel()" aria-label="جمع کردن پنل زیرسیستم" aria-controls="module-panel" aria-expanded="true" title="جمع/باز کردن پنل زیرسیستم">›</button> |
| 271 | <header class="topbar no-print"> |
| 272 | <button class="topbar-menu" onclick="toggleModulePanel()" aria-label="منو">☰</button> |
| 273 | <div class="global-search"> |
| 274 | <span>⌕</span><input id="global-command-search" type="search" placeholder="جستوجوی منو؛ مثلاً فروش، چک، گزارش..." autocomplete="off" oninput="renderCommandSearch(this.value)" onkeydown="handleCommandSearchKey(event)" /> |
| 275 | <div id="command-search-results" class="command-results"></div> |
| 276 | </div> |
| 277 | <div class="topbar-actions"> |
| 278 | <button class="topbar-pill fiscal-pill" id="topbar-fiscal-year" onclick="navigateShell('accounting','view-accounting-foundation','fiscal')" title="سال مالی">سال مالی جاری</button> |
| 279 | <button class="topbar-pill" id="topbar-company" onclick="navigateShell('settings','view-settings','company')" title="شرکت فعال">شرکت فعال</button> |
| 280 | <div class="quick-create"> |
| 281 | <button class="topbar-pill" id="quick-create-toggle" onclick="toggleQuickCreateMenu(event)" aria-haspopup="true" aria-expanded="false" title="ایجاد سریع">+ ایجاد سریع</button> |
| 282 | <div class="quick-create-menu" id="quick-create-menu" role="menu" aria-label="ایجاد سریع"> |
| 283 | <div class="quick-create-group">اسناد و عملیات</div> |
| 284 | <button onclick="navigateShell('commerce','view-invoices');closeQuickCreateMenu()">فاکتور فروش</button> |
| 285 | <button onclick="navigateShell('commerce','view-purchases');closeQuickCreateMenu()">فاکتور خرید</button> |
| 286 | <button onclick="navigateShell('treasury','view-payments');closeQuickCreateMenu()">دریافت / پرداخت</button> |
| 287 | <button onclick="navigateShell('accounting','view-journal','new');closeQuickCreateMenu()">سند حسابداری</button> |
| 288 | <div class="quick-create-group">اطلاعات پایه</div> |
| 289 | <button onclick="navigateShell('commerce','view-contacts');closeQuickCreateMenu()">طرف حساب</button> |
| 290 | <button onclick="navigateShell('commerce','view-products');closeQuickCreateMenu()">کالا / خدمت</button> |
| 291 | </div> |
| 292 | </div> |
| 293 | </div> |
| 294 | </header> |
| 295 | |
| 296 | <a class="whatsapp-support no-print" href="https://wa.me/989124376991?text=سلام%20داود%20عزیز،%20درباره%20نرمافزار%20فینورا%20سؤال%20داشتم." target="_blank" rel="noopener" title="پشتیبانی واتساپ"> |
| 297 | <svg viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.451.03-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/></svg> |
| 298 | <span>پشتیبانی واتساپ</span> |
| 299 | </a> |
| 300 | |
| 301 | <main class="main-surface"> |
| 302 | <div class="workspace-context no-print"><span class="workspace-eyebrow">مسیر کاری</span><strong id="workspace-title">داشبورد</strong><span id="workspace-context-text">نمای یکپارچه عملیات مالی</span></div> |
| 303 | |
| 304 | |
| 305 | <section id="view-dashboard" class="view-pane active"> |
| 306 | <div class="fin-dashboard-head"><div><div class="fin-breadcrumb">داشبورد / نمای مالی</div><h1>داشبورد مالی</h1><p id="dashboard-date-display"></p></div><div class="fin-dashboard-actions no-print"><span id="user-license-status-badge" class="badge badge-warning">در حال بررسی...</span><button class="btn btn-secondary btn-inline" onclick="navigateShell('accounting','view-journal','new')">+ سند حسابداری</button><button class="btn btn-primary btn-inline" onclick="startNewInvoice()">+ فاکتور فروش</button></div></div> |
| 307 | <div id="dashboard-license-details"></div> |
| 308 | <div class="fin-kpi-grid"> |
| 309 | <div class="fin-kpi-card"><span class="fin-kpi-icon">◔</span><div><small>جمع داراییها</small><strong id="kpi-assets-sum">۰</strong><em>بر اساس دفتر قطعی</em></div></div> |
| 310 | <div class="fin-kpi-card"><span class="fin-kpi-icon">▰</span><div><small>مانده نقد و بانک</small><strong id="kpi-cash-sum">۰</strong><em>حساب نقش نقد/بانک</em></div></div> |
| 311 | <div class="fin-kpi-card"><span class="fin-kpi-icon">◎</span><div><small>دریافتنیهای جاری</small><strong id="kpi-receivable-sum">۰</strong><em>مانده فاکتورهای نسیه</em></div></div> |
| 312 | <div class="fin-kpi-card"><span class="fin-kpi-icon">▣</span><div><small>پرداختنیهای جاری</small><strong id="kpi-payable-sum">۰</strong><em>مانده خریدهای نسیه</em></div></div> |
| 313 | </div> |
| 314 | <div class="fin-dashboard-grid"> |
| 315 | <div class="card fin-chart-card"><div class="fin-card-head"><div><h3>گردش ورود و خروج نقدینگی</h3><small>شش ماه اخیر بر اساس دریافت و پرداخت ثبتشده</small></div></div><div id="dashboard-cashflow-chart" class="fin-cash-chart"></div></div> |
| 316 | <div class="card fin-status-card"><div class="fin-card-head"><div><h3>وضعیت حسابها</h3><small>ترکیب ماندههای عملیاتی</small></div></div><div id="dashboard-account-status"></div></div> |
| 317 | </div> |
| 318 | <div class="fin-dashboard-bottom"> |
| 319 | <div class="card fin-quick-card"><div class="fin-card-head"><h3>دسترسی سریع</h3></div><div class="fin-quick-grid"> |
| 320 | <button onclick="navigateShell('accounting','view-accounting-foundation','fiscal')"><span>▣</span>سال مالی</button> |
| 321 | <button onclick="navigateShell('accounting','view-accounting-foundation','dimensions')"><span>⌘</span>تفصیلیهای شناور</button> |
| 322 | <button onclick="navigateShell('accounting','view-accounting-foundation','accounts')"><span>▦</span>کدینگ حسابها</button> |
| 323 | <button onclick="navigateShell('accounting','view-journal','new')"><span>+</span>سند حسابداری</button> |
| 324 | <button onclick="navigateShell('accounting','view-accounting-reports','trial')"><span>▥</span>تراز آزمایشی</button> |
| 325 | <button onclick="navigateShell('accounting','view-accounting-reports','ledger')"><span>▤</span>دفاتر حسابداری</button> |
| 326 | <button onclick="navigateShell('treasury','view-payments')"><span>↔</span>گردش حساب</button> |
| 327 | <button onclick="navigateShell('settings','view-data-center','data-backup')"><span>⇅</span>پشتیبان و داده</button> |
| 328 | </div></div> |
| 329 | <div class="card fin-recent-card"><div class="fin-card-head"><h3>آخرین اسناد حسابداری</h3><button class="fin-text-btn" onclick="navigateShell('accounting','view-journal','register')">همه اسناد</button></div><div class="table-responsive"><table><thead><tr><th>شماره سند</th><th>تاریخ</th><th>شرح</th><th>جمع بدهکار</th><th>جمع بستانکار</th><th>وضعیت</th></tr></thead><tbody id="dashboard-recent-journals"><tr><td colspan="6" class="af-empty">سندی ثبت نشده است.</td></tr></tbody></table></div></div> |
| 330 | </div> |
| 331 | </section> |
| 332 | |
| 333 | <section id="view-reports" class="view-pane"> |
| 334 | <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;flex-wrap:wrap;gap:10px"> |
| 335 | <h1 style="font-size:20px;font-weight:bold">📈 گزارشات مالی</h1> |
| 336 | <select id="report-year-select" class="form-control" style="max-width:160px" onchange="renderFinancialReports()"></select> |
| 337 | </div> |
| 338 | |
| 339 | <div class="grid-kpi"> |
| 340 | <div class="kpi-unit kpi-gradient" style="background:linear-gradient(135deg,#6366f1,#4338ca)"><div class="kpi-icon" style="background:rgba(255,255,255,.2);color:#fff">💵</div><div><div class="kpi-lbl" style="color:rgba(255,255,255,.85)">مجموع فروش سال</div><div class="kpi-val" style="color:#fff" id="rep-year-total">۰</div></div></div> |
| 341 | <div class="kpi-unit kpi-gradient" style="background:linear-gradient(135deg,#ec4899,#be185d)"><div class="kpi-icon" style="background:rgba(255,255,255,.2);color:#fff">📊</div><div><div class="kpi-lbl" style="color:rgba(255,255,255,.85)">میانگین فروش ماهانه</div><div class="kpi-val" style="color:#fff" id="rep-year-avg">۰</div></div></div> |
| 342 | <div class="kpi-unit kpi-gradient" style="background:linear-gradient(135deg,#14b8a6,#0f766e)"><div class="kpi-icon" style="background:rgba(255,255,255,.2);color:#fff">🏆</div><div><div class="kpi-lbl" style="color:rgba(255,255,255,.85)">پرفروشترین ماه</div><div class="kpi-val" style="color:#fff" id="rep-best-month">—</div></div></div> |
| 343 | <div class="kpi-unit kpi-gradient" style="background:linear-gradient(135deg,#f97316,#c2410c)"><div class="kpi-icon" style="background:rgba(255,255,255,.2);color:#fff">🧾</div><div><div class="kpi-lbl" style="color:rgba(255,255,255,.85)">تعداد فاکتور صادرشده</div><div class="kpi-val" style="color:#fff" id="rep-invoice-count">۰</div></div></div> |
| 344 | </div> |
| 345 | |
| 346 | <div class="card"> |
| 347 | <h3 style="font-size:15px;margin-bottom:6px">روند فروش ماهانه</h3> |
| 348 | <div class="report-bar-wrap" id="report-monthly-chart"></div> |
| 349 | </div> |
| 350 | |
| 351 | <div class="card"> |
| 352 | <h3 style="font-size:15px;margin-bottom:12px">مشتریان برتر (بر اساس مبلغ خرید)</h3> |
| 353 | <div class="table-responsive"> |
| 354 | <table> |
| 355 | <thead><tr><th>مشتری</th><th>تعداد فاکتور</th><th>جمع خرید (<span class="cur-label">ریال</span>)</th></tr></thead> |
| 356 | <tbody id="report-top-customers"><tr><td colspan="3" style="text-align:center;color:var(--text-muted);padding:20px">دادهای برای نمایش وجود ندارد.</td></tr></tbody> |
| 357 | </table> |
| 358 | </div> |
| 359 | </div> |
| 360 | |
| 361 | <div class="card"> |
| 362 | <h3 style="font-size:15px;margin-bottom:12px">تفکیک نوع فاکتور</h3> |
| 363 | <div style="display:flex;gap:24px;flex-wrap:wrap"> |
| 364 | <div>🔴 رسمی: <strong id="rep-formal-count">۰</strong> فقره — <strong id="rep-formal-sum">۰</strong></div> |
| 365 | <div>🟢 غیررسمی: <strong id="rep-informal-count">۰</strong> فقره — <strong id="rep-informal-sum">۰</strong></div> |
| 366 | </div> |
| 367 | </div> |
| 368 | <div class="card"> |
| 369 | <h3 style="font-size:15px;margin-bottom:12px">خلاصه سود و زیان و جریان نقدی</h3> |
| 370 | <div class="grid-kpi" style="margin-bottom:12px"> |
| 371 | <div class="kpi-unit"><div><div class="kpi-lbl">خرید سال</div><div class="kpi-val" id="rep-purchase-total">۰</div></div></div> |
| 372 | <div class="kpi-unit"><div><div class="kpi-lbl">هزینهها</div><div class="kpi-val" id="rep-expense-total">۰</div></div></div> |
| 373 | <div class="kpi-unit"><div><div class="kpi-lbl">سود تعهدی</div><div class="kpi-val" id="rep-accrual-profit">۰</div></div></div> |
| 374 | <div class="kpi-unit"><div><div class="kpi-lbl">خالص جریان نقدی</div><div class="kpi-val" id="rep-cash-net">۰</div></div></div> |
| 375 | </div> |
| 376 | <div class="table-responsive"><table><thead><tr><th>شاخص</th><th>مبلغ (<span class="cur-label">ریال</span>)</th></tr></thead><tbody id="report-financial-summary"></tbody></table></div> |
| 377 | </div> |
| 378 | </section> |
| 379 | |
| 380 | <section id="view-accounting-reports" class="view-pane"><div style="margin-bottom:14px"><h1 style="font-size:20px;font-weight:bold">گزارشهای حرفهای حسابداری</h1><p style="font-size:12px;color:var(--text-muted)">مبنای گزارش: اسناد قطعی دفتر کل؛ فیلترها در فضای گزارش اعمال میشوند.</p></div><div id="p6-reporting-root"></div></section> |
| 381 | |
| 382 | <section id="view-invoices" class="view-pane"> |
| 383 | <div class="card no-print"> |
| 384 | <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;flex-wrap:wrap;gap:10px"> |
| 385 | <h2 style="font-size:17px" id="invoice-form-title">صدور فاکتور جدید</h2> |
| 386 | <div style="display:flex;gap:8px;flex-wrap:wrap;align-items:center"> |
| 387 | <button type="button" class="btn btn-primary btn-inline" style="min-height:34px;padding:4px 12px;font-size:12px" onclick="switchView('view-invoices')">🧾 فاکتور فروش</button> |
| 388 | <button type="button" class="btn btn-secondary btn-inline" style="min-height:34px;padding:4px 12px;font-size:12px" onclick="switchView('view-purchases')">🛒 فاکتور خرید</button> |
| 389 | <label class="btn btn-secondary btn-inline" style="min-height:34px;padding:4px 10px;font-size:12px">📥 ورود اقلام از اکسل<input type="file" id="excel-import-invoice-items" style="display:none" onchange="importInvoiceItemsFromExcel(event)" accept=".xlsx, .xls" /></label> |
| 390 | <button class="btn btn-secondary btn-inline" style="display:none;padding:4px 10px;font-size:12px" id="btn-cancel-edit" onclick="cancelInvoiceEdit()">انصراف از ویرایش</button> |
| 391 | </div> |
| 392 | </div> |
| 393 | <input type="hidden" id="edit-invoice-id" value="" /> |
| 394 | <div class="form-row" style="background:#f1f5f9;padding:12px;border-radius:10px;margin-bottom:14px"> |
| 395 | <div class="form-group" style="margin-bottom:0"><label>تاریخ فاکتور</label><input type="text" id="invoice-date-input" class="form-control" /></div> |
| 396 | <div class="form-group" style="margin-bottom:0"><label>شماره فاکتور</label><input type="text" id="invoice-number" class="form-control" placeholder="PINV-31" /></div> |
| 397 | <div class="form-group" style="margin-bottom:0"> |
| 398 | <label>قالب و نوع سند</label> |
| 399 | <select id="invoice-kind" class="form-control" onchange="handleInvoiceKindChange()"> |
| 400 | <option value="non_formal">فاکتور غیررسمی</option> |
| 401 | <option value="formal">فاکتور رسمی</option> |
| 402 | <option value="pre_invoice">پیشفاکتور فروش</option> |
| 403 | <option value="contract_statement">صورت وضعیت پیمان</option> |
| 404 | </select> |
| 405 | </div> |
| 406 | </div> |
| 407 | <div class="form-row"> |
| 408 | <div class="form-group"><label>فروشنده (سربرگ شرکت)</label><select id="invoice-company-id" class="form-control" onchange="onActiveCompanyFilterChange()"></select></div> |
| 409 | <div class="form-group"> |
| 410 | <label style="display:flex;justify-content:space-between"><span>نام خریدار را وارد یا انتخاب کنید</span><a href="#" style="color:var(--primary);text-decoration:none" onclick="openQuickContactModal();return false">➕ شخص جدید</a></label> |
| 411 | <div style="display:flex;gap:8px"> |
| 412 | <select id="invoice-contact-id" class="form-control" style="flex:1" onchange="handleInvoiceContactChange()"></select> |
| 413 | <button class="btn btn-secondary btn-inline" type="button" onclick="openQuickContactModal()" style="padding:0 12px;min-height:42px">➕</button> |
| 414 | </div> |
| 415 | </div> |
| 416 | </div> |
| 417 | <div class="form-row"><div class="form-group"><label>نحوه تسویه</label><select id="invoice-payment-method" class="form-control"><option value="cash">نقدی / تسویهشده</option><option value="credit">نسیه / ایجاد مطالبات</option></select></div><div class="form-group"><label>انبار خروج کالا</label><select id="invoice-warehouse-id" class="form-control"></select></div></div> |
| 418 | <div class="form-row" id="box-invoice-project-row" style="display:none"> |
| 419 | <div class="form-group"><label>پروژه طرفحساب</label><select id="invoice-project-id" class="form-control"></select></div> |
| 420 | </div> |
| 421 | <div class="form-row" id="box-invoice-contract-number" style="display:none;background:#fef3c7;padding:12px;border-radius:10px;margin-bottom:14px"> |
| 422 | <div class="form-group" style="margin-bottom:0"><label>شماره پیمان <span style="color:var(--danger)">*</span></label><input type="text" id="invoice-contract-number" class="form-control" placeholder="شماره پیمان الزامی است" /></div> |
| 423 | </div> |
| 424 | <div style="margin:16px 0"> |
| 425 | <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:8px"> |
| 426 | <h4 style="font-size:14px">اقلام کالا یا خدمات</h4> |
| 427 | <button class="btn btn-secondary btn-inline" style="font-size:12px;min-height:34px;padding:4px 10px" onclick="openQuickProductModal()">➕ کالای جدید</button> |
| 428 | </div> |
| 429 | <div class="table-responsive"> |
| 430 | <table id="invoice-items-table"> |
| 431 | <thead><tr style="background:#e2e8f0"><th style="width:40px;text-align:center">#</th><th>شرح کالا | خدمات</th><th style="width:90px;text-align:center">واحد</th><th style="width:100px;text-align:center">مقدار</th><th style="width:160px;text-align:left">قیمت واحد (<span class="cur-label">ریال</span>)</th><th style="width:170px;text-align:left">قیمت کل (<span class="cur-label">ریال</span>)</th><th style="width:50px;text-align:center">حذف</th></tr></thead> |
| 432 | <tbody id="invoice-items-table-body"></tbody> |
| 433 | </table> |
| 434 | </div> |
| 435 | <button class="btn btn-secondary btn-inline" style="margin-top:10px;width:100%;border:1.5px dashed var(--primary);color:var(--primary);background:#eff6ff" onclick="addInvoiceItemRow()">+ افزودن ردیف</button> |
| 436 | </div> |
| 437 | <div class="form-row" style="background:#f1f5f9;padding:14px;border-radius:10px;margin-top:12px"> |
| 438 | <div class="form-group" style="background:#fff;padding:12px;border-radius:8px;border:1px solid var(--border);margin-bottom:0"> |
| 439 | <label style="font-weight:bold;border-bottom:1px solid #eee;padding-bottom:6px;margin-bottom:8px">مالیات و تخفیف</label> |
| 440 | <div id="box-invoice-vat-mode-row" style="display:flex;justify-content:space-between;align-items:center;margin-bottom:8px"> |
| 441 | <span>مالیات ارزش افزوده</span> |
| 442 | <select id="invoice-vat-mode" class="form-control" style="width:140px;min-height:36px" onchange="handleVatModeChange()"><option value="none">غیرفعال</option><option value="with_vat">فعال</option></select> |
| 443 | </div> |
| 444 | <div id="box-invoice-vat-rate" style="display:none;justify-content:space-between;align-items:center;margin-bottom:8px;gap:8px"> |
| 445 | <select id="invoice-vat-type" class="form-control" style="width:110px;min-height:36px" onchange="handleVatTypeChange()"><option value="percent">درصدی</option><option value="fixed">مبلغ ثابت</option></select> |
| 446 | <input type="text" inputmode="decimal" id="invoice-vat-rate-input" class="form-control" style="width:100px;min-height:36px" value="10" oninput="handleMoneyInput(this);recomputeTotals()" /> |
| 447 | </div> |
| 448 | <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;gap:8px"> |
| 449 | <span>تخفیف کلی فاکتور</span> |
| 450 | <select id="invoice-discount-type" class="form-control" style="width:110px;min-height:36px" onchange="handleDiscountTypeChange()"><option value="fixed">مبلغ ثابت</option><option value="percent">درصدی</option></select> |
| 451 | </div> |
| 452 | <div style="display:flex;justify-content:space-between;align-items:center"> |
| 453 | <span id="label-invoice-discount-value">مبلغ تخفیف (ریال)</span> |
| 454 | <input type="text" inputmode="decimal" id="invoice-discount-fixed" class="form-control" style="width:140px;min-height:36px" value="0" oninput="handleMoneyInput(this);recomputeTotals()" /> |
| 455 | </div> |
| 456 | </div> |
| 457 | <div class="form-group" style="background:#fff;padding:12px;border-radius:8px;border:1px solid var(--border);margin-bottom:0"> |
| 458 | <label style="font-weight:bold;border-bottom:1px solid #eee;padding-bottom:6px;margin-bottom:8px">جمعبندی نهایی</label> |
| 459 | <div style="display:flex;justify-content:space-between;margin-bottom:6px;font-size:13px"><span>جمع کل:</span><span id="summary-subtotal" style="font-weight:bold">۰ ریال</span></div> |
| 460 | <div style="display:flex;justify-content:space-between;margin-bottom:6px;font-size:13px"><span>مالیات:</span><span id="summary-vat" style="font-weight:bold">۰ ریال</span></div> |
| 461 | <div style="display:flex;justify-content:space-between;margin-bottom:6px;font-size:14px;border-top:1px solid #eee;padding-top:6px"><span style="font-weight:bold;color:var(--primary)">قابل پرداخت:</span><span id="summary-grandtotal" style="font-weight:bold;color:var(--primary)">۰ ریال</span></div> |
| 462 | <div style="font-size:11px;color:var(--text-muted);margin-top:4px" id="summary-words">به حروف: صفر ریال</div> |
| 463 | </div> |
| 464 | </div> |
| 465 | <div class="form-row" style="margin-top:14px"> |
| 466 | <div class="form-group" style="margin-bottom:0"><label>توضیحات فاکتور</label><textarea id="invoice-desc-input" class="form-control" rows="2" placeholder="توضیحات تکمیلی..."></textarea></div> |
| 467 | </div> |
| 468 | <div id="box-enable-electronic-doc" style="display:none;margin-top:14px;padding:14px;background:#fef3c7;border-radius:10px;border:1.5px solid #fcd34d"> |
| 469 | <label style="display:flex;align-items:center;gap:10px;cursor:pointer"> |
| 470 | <input type="checkbox" id="enable-electronic-doc" onchange="toggleElectronicDoc()" style="width:18px;height:18px" /> |
| 471 | <span style="font-weight:bold;font-size:14px;color:#92400e">📄 صدور سند الکترونیکی سامانه مودیان</span> |
| 472 | </label> |
| 473 | <div id="edoc-status" style="font-size:12px;color:#475569;margin-top:8px"></div> |
| 474 | </div> |
| 475 | <div style="display:flex;gap:10px;margin-top:16px;flex-wrap:wrap"> |
| 476 | <button class="btn btn-success" id="btn-save-invoice" onclick="commitSaveInvoice()">💾 ثبت فاکتور</button> |
| 477 | </div> |
| 478 | </div> |
| 479 | |
| 480 | <div class="card no-print"> |
| 481 | <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;flex-wrap:wrap;gap:10px"> |
| 482 | <h3 style="font-size:15px">دفتر بایگانی فاکتورها</h3> |
| 483 | <select id="filter-invoice-company" class="form-control" style="width:200px;min-height:36px" onchange="renderInvoices()"></select> |
| 484 | </div> |
| 485 | <div class="table-responsive"> |
| 486 | <table> |
| 487 | <thead><tr><th>شماره</th><th>فروشنده</th><th>خریدار</th><th>نوع</th><th>تاریخ</th><th>قابل پرداخت (<span class="cur-label">ریال</span>)</th><th>عملیات</th></tr></thead> |
| 488 | <tbody id="invoice-archive-table-body"></tbody> |
| 489 | </table> |
| 490 | </div> |
| 491 | </div> |
| 492 | </section> |
| 493 | |
| 494 | <section id="view-products" class="view-pane"> |
| 495 | <div class="card no-print"> |
| 496 | <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;flex-wrap:wrap;gap:10px"> |
| 497 | <h2 style="font-size:17px">تعریف کالا / خدمت جدید</h2> |
| 498 | <div style="display:flex;gap:8px"> |
| 499 | <label class="btn btn-secondary btn-inline" style="min-height:36px;padding:4px 12px;font-size:13px">📥 ورود از اکسل<input type="file" id="excel-import-products" style="display:none" onchange="importProductsFromExcel(event)" accept=".xlsx, .xls" /></label> |
| 500 | <button class="btn btn-secondary btn-inline" style="min-height:36px;padding:4px 12px;font-size:13px" onclick="downloadProductsExcelTemplate()">📄 نمونه اکسل</button> |
| 501 | </div> |
| 502 | </div> |
| 503 | <div class="form-row"> |
| 504 | <div class="form-group"><label>کد کالا</label><input type="text" id="prod-code-input" class="form-control" placeholder="101" /></div> |
| 505 | <div class="form-group"><label>عنوان کالا</label><input type="text" id="prod-name-input" class="form-control" placeholder="هارد سرور..." /></div> |
| 506 | <div class="form-group"><label>مشخصه / مدل</label><input type="text" id="prod-spec-input" class="form-control" placeholder="2.5 اینچ SAS" /></div> |
| 507 | <div class="form-group"><label>واحد</label><input type="text" id="prod-unit-input" class="form-control" value="عدد" /></div> |
| 508 | </div> |
| 509 | <div class="form-row"> |
| 510 | <div class="form-group"><label>نوع</label><select id="prod-type-input" class="form-control"><option value="good">کالا (انبارشونده)</option><option value="service">خدمت (غیرانبارشونده)</option></select></div> |
| 511 | <div class="form-group"><label>گروه / دسته</label><input type="text" id="prod-category-input" class="form-control" /></div> |
| 512 | <div class="form-group"><label>بارکد</label><input type="text" id="prod-barcode-input" class="form-control" /></div> |
| 513 | <div class="form-group"><label>حداقل موجودی</label><input type="text" id="prod-min-stock-input" class="form-control" value="0" /></div> |
| 514 | </div> |
| 515 | <div class="form-row"> |
| 516 | <div class="form-group"><label>قیمت خرید (<span class="cur-label">ریال</span>)</label><input type="text" inputmode="decimal" id="prod-buy-input" class="form-control" value="0" oninput="handleMoneyInput(this)" /></div> |
| 517 | <div class="form-group"><label>قیمت فروش (<span class="cur-label">ریال</span>)</label><input type="text" inputmode="decimal" id="prod-sale-input" class="form-control" value="0" oninput="handleMoneyInput(this)" /></div> |
| 518 | <div class="form-group"><label>شناسه کالا/خدمت داخلی</label><input type="text" id="prod-internal-id-input" class="form-control" placeholder="2330004169617" /><small style="color:var(--text-muted)">در سند الکترونیکی بهصورت خودکار استفاده میشود.</small></div><div class="form-group"><label>شناسه کالا/خدمت سامانه مالیاتی (خارجی)</label><input type="text" id="prod-official-id-input" class="form-control" placeholder="در صورت وجود ثبت کنید" /><small style="color:var(--text-muted)">اگر خالی باشد هنگام صدور سند الکترونیکی دریافت میشود.</small></div> |
| 519 | </div> |
| 520 | <div style="display:flex;gap:8px;flex-wrap:wrap"><button id="product-save-btn" class="btn btn-success" onclick="commitSaveProduct()">➕ ثبت کالا</button><button id="product-edit-cancel-btn" class="btn btn-secondary" style="display:none" onclick="cancelProductEdit()">انصراف از اصلاح</button></div> |
| 521 | </div> |
| 522 | <div class="card"> |
| 523 | <h3 style="font-size:15px;margin-bottom:12px">کالاهای ثبتشده</h3> |
| 524 | <div class="table-responsive"> |
| 525 | <table><thead><tr><th>کد</th><th>نام</th><th>نوع</th><th>گروه</th><th>واحد</th><th>قیمت فروش (<span class="cur-label">ریال</span>)</th><th>بارکد / شناسه</th><th>عملیات</th></tr></thead><tbody id="products-catalog-table-body"></tbody></table> |
| 526 | </div> |
| 527 | </div> |
| 528 | </section> |
| 529 | |
| 530 | <section id="view-contacts" class="view-pane"> |
| 531 | <div class="card no-print"> |
| 532 | <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;flex-wrap:wrap;gap:10px"> |
| 533 | <h2 style="font-size:17px">ثبت طرف حساب جدید</h2> |
| 534 | <div style="display:flex;gap:8px"> |
| 535 | <label class="btn btn-secondary btn-inline" style="min-height:36px;padding:4px 12px;font-size:13px">📥 ورود از اکسل<input type="file" id="excel-import-contacts" style="display:none" onchange="importContactsFromExcel(event)" accept=".xlsx, .xls" /></label> |
| 536 | <button class="btn btn-secondary btn-inline" style="min-height:36px;padding:4px 12px;font-size:13px" onclick="downloadContactsExcelTemplate()">📄 نمونه اکسل</button> |
| 537 | </div> |
| 538 | </div> |
| 539 | <div class="form-row"> |
| 540 | <div class="form-group"><label>نوع شخص</label><select id="contact-entity-type" class="form-control" onchange="handleContactEntityChange()"><option value="natural">شخص حقیقی</option><option value="legal">شخص حقوقی</option></select></div> |
| 541 | <div class="form-group" id="box-contact-prefix"><label>پیشوند</label><select id="contact-prefix-select" class="form-control"><option value="آقا/خانم">آقا / خانم</option><option value="فروشگاه">فروشگاه</option></select></div> |
| 542 | <div class="form-group" style="grid-column:span 2" id="box-contact-name"><label>نام طرف حساب</label><input type="text" id="contact-name-input" class="form-control" placeholder="دانشگاه صنعتی شریف..." /></div> |
| 543 | </div> |
| 544 | <div class="form-row"> |
| 545 | <div class="form-group"><label>نقش</label><select id="contact-role-input" class="form-control"><option value="customer">مشتری / خریدار</option><option value="supplier">تأمینکننده / فروشنده</option><option value="both">هر دو (خرید و فروش)</option></select></div> |
| 546 | <div class="form-group"><label>همراه</label><input type="text" id="contact-mobile-input" class="form-control" /></div> |
| 547 | <div class="form-group"><label id="label-contact-national">شناسه ملی</label><input type="text" id="contact-national-input" class="form-control" /></div> |
| 548 | <div class="form-group" id="box-contact-economic"><label>کد اقتصادی</label><input type="text" id="contact-economic-input" class="form-control" /></div> |
| 549 | </div> |
| 550 | <div class="form-row"> |
| 551 | <div class="form-group" id="box-contact-reg"><label>شماره ثبت</label><input type="text" id="contact-reg-input" class="form-control" /></div> |
| 552 | <div class="form-group"><label>کد پستی</label><input type="text" id="contact-postal-input" class="form-control" /></div> |
| 553 | <div class="form-group" style="grid-column:span 2"><label>نشانی</label><input type="text" id="contact-address-input" class="form-control" /></div> |
| 554 | </div> |
| 555 | <div class="form-row"> |
| 556 | <div class="form-group"><label>حالت پروژه</label><select id="contact-project-mode" class="form-control"><option value="single">بدون پروژه</option><option value="multi">پروژهمحور (پروژه و زیرپروژه)</option></select></div> |
| 557 | </div> |
| 558 | <div style="display:flex;gap:8px;flex-wrap:wrap"><button id="contact-save-btn" class="btn btn-success" onclick="commitSaveContact()">➕ ثبت طرف حساب</button><button id="contact-edit-cancel-btn" class="btn btn-secondary" style="display:none" onclick="cancelContactEdit()">انصراف از اصلاح</button></div> |
| 559 | </div> |
| 560 | <div class="card"> |
| 561 | <h3 style="font-size:15px;margin-bottom:12px">دفتر اشخاص</h3> |
| 562 | <div class="table-responsive"> |
| 563 | <table><thead><tr><th>نام</th><th>نوع</th><th>شناسه / کد ملی</th><th>کد اقتصادی</th><th>کد پستی</th><th>همراه</th><th>مانده (<span class="cur-label">ریال</span>)</th><th>پروژهها</th><th>عملیات</th></tr></thead><tbody id="contacts-ledger-table-body"></tbody></table> |
| 564 | </div> |
| 565 | </div> |
| 566 | </section> |
| 567 | |
| 568 | <section id="view-cheques" class="view-pane"> |
| 569 | <div class="card"> |
| 570 | <h2 style="font-size:17px;margin-bottom:14px">ثبت چک صیادی</h2> |
| 571 | <div class="form-row"> |
| 572 | <div class="form-group"><label>نوع</label><select id="chq-direction-input" class="form-control"><option value="inbound">دریافتی</option><option value="outbound">پرداختی</option></select></div> |
| 573 | <div class="form-group"><label>طرف حساب</label><select id="chq-contact-select" class="form-control"></select></div> |
| 574 | <div class="form-group"><label>شناسه صیادی</label><input type="text" id="chq-sayad-input" class="form-control" /></div> |
| 575 | <div class="form-group"><label>بانک</label><input type="text" id="chq-bank-input" class="form-control" /></div> |
| 576 | </div> |
| 577 | <div class="form-row"> |
| 578 | <div class="form-group"><label>مبلغ (<span class="cur-label">ریال</span>)</label><input type="text" inputmode="decimal" id="chq-amount-input" class="form-control" oninput="handleMoneyInput(this)" /></div> |
| 579 | <div class="form-group"><label>سررسید</label><input type="text" id="chq-due-input" class="form-control" placeholder="1405/06/30" /></div> |
| 580 | <div class="form-group"><label>وضعیت</label><select id="chq-status-input" class="form-control"><option value="registered">در جریان</option><option value="cleared">وصول / پرداخت شده</option><option value="bounced">برگشتی / ناموفق</option><option value="cancelled">باطل شده</option></select></div> |
| 581 | </div> |
| 582 | <div style="display:flex;gap:8px;flex-wrap:wrap"><button id="cheque-save-btn" class="btn btn-success" onclick="commitSaveCheque()">➕ ثبت چک</button><button id="cheque-edit-cancel-btn" class="btn btn-secondary" style="display:none" onclick="cancelChequeEdit()">انصراف از اصلاح</button></div> |
| 583 | </div> |
| 584 | <div class="card"> |
| 585 | <h3 style="font-size:15px;margin-bottom:12px">لیست چکها</h3> |
| 586 | <div class="table-responsive"><table><thead><tr><th>نوع</th><th>طرف حساب</th><th>بانک / صیاد</th><th>مبلغ (<span class="cur-label">ریال</span>)</th><th>سررسید</th><th>وضعیت</th><th>عملیات</th></tr></thead><tbody id="cheques-ledger-table-body"></tbody></table></div> |
| 587 | </div> |
| 588 | </section> |
| 589 | |
| 590 | <section id="view-expenses" class="view-pane"> |
| 591 | <div class="card"> |
| 592 | <h2 style="font-size:17px;margin-bottom:14px">ثبت هزینه / درآمد</h2> |
| 593 | <div class="form-row"> |
| 594 | <div class="form-group"><label>نوع</label><select id="trx-kind-input" class="form-control"><option value="expense">هزینه</option><option value="income">درآمد</option></select></div> |
| 595 | <div class="form-group"><label>سرفصل</label><select id="trx-category-input" class="form-control"><option value="قبوض">قبوض</option><option value="حقوق">حقوق</option><option value="سایر">سایر</option></select></div> |
| 596 | <div class="form-group"><label>طرف حساب (اختیاری)</label><select id="trx-contact-select" class="form-control" onchange="refreshExpenseProjects()"><option value="">بدون طرف حساب</option></select></div> |
| 597 | <div class="form-group"><label>پروژه / مرکز هزینه (اختیاری)</label><select id="trx-project-select" class="form-control"><option value="">بدون پروژه</option></select></div> |
| 598 | <div class="form-group"><label>مبلغ (<span class="cur-label">ریال</span>)</label><input type="text" inputmode="decimal" id="trx-amount-input" class="form-control" oninput="handleMoneyInput(this)" /></div> |
| 599 | <div class="form-group"><label>شرح</label><input type="text" id="trx-desc-input" class="form-control" /></div> |
| 600 | </div> |
| 601 | <div style="display:flex;gap:8px;flex-wrap:wrap"><button id="expense-save-btn" class="btn btn-success" onclick="commitSaveExpense()">➕ ثبت سند</button><button id="expense-edit-cancel-btn" class="btn btn-secondary" style="display:none" onclick="cancelExpenseEdit()">انصراف از اصلاح</button></div> |
| 602 | </div> |
| 603 | <div class="card"> |
| 604 | <h3 style="font-size:15px;margin-bottom:12px">گردش هزینه و درآمد</h3> |
| 605 | <div class="table-responsive"><table><thead><tr><th>نوع</th><th>سرفصل</th><th>طرف حساب</th><th>پروژه / مرکز هزینه</th><th>شرح</th><th>مبلغ (<span class="cur-label">ریال</span>)</th><th>عملیات</th></tr></thead><tbody id="expenses-ledger-table-body"></tbody></table></div> |
| 606 | </div> |
| 607 | </section> |
| 608 | |
| 609 | <section id="view-contracting" class="view-pane"><div id="phase4-root"></div></section> |
| 610 | <section id="view-inventory" class="view-pane"><div id="p5-inventory-root"></div></section> |
| 611 | <section id="view-assets" class="view-pane"><div id="p5-assets-root"></div></section> |
| 612 | <section id="view-currency" class="view-pane"><div id="p5-currency-root"></div></section> |
| 613 | <section id="view-data-center" class="view-pane"><div id="p5-data-root"></div></section> |
| 614 | <section id="view-integrations" class="view-pane"><div id="p5-integrations-root"></div></section> |
| 615 | |
| 616 | <section id="view-settings" class="view-pane"> |
| 617 | <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:14px"> |
| 618 | <h2 style="font-size:17px">⚙️ تنظیمات و شرکتها</h2> |
| 619 | <button class="btn btn-danger btn-inline no-print" style="padding:6px 12px;font-size:12px;min-height:32px" onclick="handleLogout()">🚪 خروج از حساب کاربری</button> |
| 620 | </div> |
| 621 | |
| 622 | <div class="accordion-item" data-finora-task="account"> |
| 623 | <div class="accordion-header" onclick="toggleAccordion(this)"><span>🔐 حساب کاربری و رمز عبور</span><span>▼</span></div> |
| 624 | <div class="accordion-body"> |
| 625 | <p style="font-size:13px;color:var(--text-muted);margin-bottom:10px">با تعیین رمز عبور، دفعات بعد میتوانید علاوه بر ورود با گوگل، مستقیم با ایمیل و رمز عبور هم وارد سامانه شوید.</p> |
| 626 | <div class="form-row"> |
| 627 | <div class="form-group"><label>رمز عبور جدید</label><input type="password" id="acct-newpass" class="form-control" placeholder="حداقل ۸ کاراکتر" /></div> |
| 628 | <div class="form-group"><label>تکرار رمز عبور</label><input type="password" id="acct-newpass2" class="form-control" /></div> |
| 629 | </div> |
| 630 | <button class="btn btn-primary" onclick="changeAccountPassword()">💾 ذخیره رمز عبور</button> |
| 631 | </div> |
| 632 | </div> |
| 633 | |
| 634 | <div class="accordion-item open" data-finora-task="company"> |
| 635 | <div class="accordion-header" onclick="toggleAccordion(this)"><span>🏢 اطلاعات فروشگاه و چاپ (مدیریت شرکتها)</span><span>▼</span></div> |
| 636 | <div class="accordion-body"> |
| 637 | <div class="form-row"> |
| 638 | <div class="form-group"><label>نوع شخص</label><select id="company-entity-type" class="form-control" onchange="handleCompanyEntityTypeChange()"><option value="legal">حقوقی</option><option value="natural">حقیقی / کسبوکار فردی</option></select></div> |
| 639 | <div class="form-group" id="company-sector-box"><label>ماهیت مالکیت / بخش</label><select id="company-sector" class="form-control"><option value="private">خصوصی</option><option value="cooperative">تعاونی</option><option value="public_non_government">عمومی غیردولتی</option><option value="government">دولتی / حکومتی</option><option value="other">سایر</option></select></div><div class="form-group" id="company-organization-box"><label>جایگاه در گروه شرکتها</label><select id="company-organization-role" class="form-control" onchange="handleCompanyOrganizationRoleChange()"><option value="standalone">شرکت / واحد مستقل</option><option value="holding_parent">شرکت مادر / هلدینگ</option><option value="subsidiary">شرکت تابعه</option></select></div><div class="form-group" id="company-parent-box" style="display:none"><label>شرکت مادر</label><select id="company-parent-id" class="form-control"><option value="">— انتخاب شرکت مادر —</option></select><small style="color:var(--text-muted)">این رابطه فعلاً ساختار سازمانی را ثبت میکند؛ تلفیق، حذف معاملات درونگروهی و گزارش گروهی ماژول جداگانه خواهند بود.</small></div> |
| 640 | <div class="form-group" id="company-legal-form-box"><label>قالب حقوقی ثبت</label><select id="company-legal-form" class="form-control"><option value="private_joint_stock">سهامی خاص</option><option value="public_joint_stock">سهامی عام</option><option value="limited_liability">با مسئولیت محدود</option><option value="general_partnership">تضامنی</option><option value="relative_partnership">نسبی</option><option value="mixed_non_stock">مختلط غیرسهامی</option><option value="mixed_stock">مختلط سهامی</option><option value="cooperative">تعاونی</option><option value="noncommercial_institution">مؤسسه غیرتجاری</option><option value="other">سایر / نامشخص</option></select></div> |
| 641 | <div class="form-group"><label>نوع فعالیت عملیاتی</label><select id="company-activity-type" class="form-control"><option value="trading">بازرگانی</option><option value="service">خدماتی</option><option value="manufacturing">تولیدی</option><option value="contracting">پیمانکاری</option><option value="retail">فروشگاهی</option><option value="distribution">پخش</option><option value="nonprofit">غیرانتفاعی</option><option value="professional">خدمات حرفهای</option></select></div> |
| 642 | </div> |
| 643 | <div class="form-row"> |
| 644 | <div class="form-group"><label>راهاندازی حسابداری</label><select id="company-accounting-template" class="form-control"><option value="recommended">اعمال کدینگ پیشنهادی Finora</option><option value="empty">شروع با کدینگ خالی</option></select></div> |
| 645 | <div class="form-group"><label id="company-name-label">نام شرکت / کسبوکار</label><input type="text" id="company-name-input" class="form-control" placeholder="آرا سپهر راستین" /></div> |
| 646 | <div class="form-group"><label>تلفن</label><input type="text" id="company-phone-input" class="form-control" /></div> |
| 647 | </div> |
| 648 | <div class="form-row"> |
| 649 | <div class="form-group"><label id="company-national-label">شناسه ملی</label><input type="text" id="company-national-input" class="form-control" /></div> |
| 650 | <div class="form-group"><label>کد اقتصادی</label><input type="text" id="company-economic-input" class="form-control" /></div> |
| 651 | <div class="form-group" id="company-registration-box"><label>شماره ثبت</label><input type="text" id="company-reg-input" class="form-control" /></div> |
| 652 | <div class="form-group"><label>کد پستی</label><input type="text" id="company-postal-input" class="form-control" /></div> |
| 653 | </div> |
| 654 | <div class="form-group"><label>نشانی کامل</label><input type="text" id="company-address-input" class="form-control" /></div> |
| 655 | <div class="form-group"><label>پاورقی فاکتور</label><textarea id="company-footer-input" class="form-control" rows="2"></textarea></div> |
| 656 | <div style="display:flex;gap:8px;flex-wrap:wrap"><button id="company-save-btn" class="btn btn-success" onclick="commitSaveCompany()">➕ ثبت شرکت جدید</button><button id="company-edit-cancel-btn" class="btn btn-secondary" style="display:none" onclick="cancelCompanyEdit()">انصراف از اصلاح</button></div> |
| 657 | <div style="margin-top:16px"> |
| 658 | <h4 style="font-size:14px;margin-bottom:8px">لیست شرکتهای ثبتشده</h4> |
| 659 | <div class="table-responsive"><table><thead><tr><th>نام</th><th>شخصیت / قالب</th><th>نوع فعالیت</th><th>شناسه ملی</th><th>کد اقتصادی</th><th>پیشفرض</th><th>عملیات</th></tr></thead><tbody id="companies-table-body"></tbody></table></div> |
| 660 | </div> |
| 661 | </div> |
| 662 | </div> |
| 663 | |
| 664 | <div class="accordion-item" data-finora-task="invoice-defaults"> |
| 665 | <div class="accordion-header" onclick="toggleAccordion(this)"><span>⚙️ مالیات، تخفیف و واحد پول (پیشفرض فاکتور جدید)</span><span>▼</span></div> |
| 666 | <div class="accordion-body"> |
| 667 | <div class="form-row"> |
| 668 | <div class="form-group"><label>قالب پیشفرض فاکتور</label><select id="def-invoice-kind" class="form-control"><option value="non_formal">فاکتور غیررسمی</option><option value="formal">فاکتور رسمی</option><option value="pre_invoice">پیشفاکتور فروش</option><option value="contract_statement">صورت وضعیت پیمان</option></select></div> |
| 669 | <div class="form-group"><label>وضعیت پیشفرض ارزش افزوده</label><select id="def-vat-mode" class="form-control"><option value="none">بدون ارزش افزوده</option><option value="with_vat">با ارزش افزوده</option></select></div> |
| 670 | <div class="form-group"><label>نرخ ارزش افزوده (درصد)</label><input type="text" inputmode="decimal" id="def-vat-rate" class="form-control" value="10" oninput="handleMoneyInput(this)" /></div> |
| 671 | </div> |
| 672 | <div class="form-row"> |
| 673 | <div class="form-group"><label>واحد پول</label><select id="def-currency-mode" class="form-control" onchange="handleCurrencyModeChange()"><option value="rial">ریال</option><option value="toman">تومان</option><option value="custom">سایر (دلخواه)</option></select></div> |
| 674 | <div class="form-group" id="box-currency-custom" style="display:none"><label>نام واحد پول دلخواه</label><input type="text" id="def-currency-custom" class="form-control" placeholder="مثلاً: یورو، دلار، درهم..." /></div> |
| 675 | </div> |
| 676 | <button class="btn btn-primary" onclick="commitSaveDefaultSettings()">ذخیره پیشفرضها</button> |
| 677 | </div> |
| 678 | </div> |
| 679 | |
| 680 | <div class="accordion-item" data-finora-task="legacy-backup"> |
| 681 | <div class="accordion-header" onclick="toggleAccordion(this)"><span>💾 دیتابیس و پشتیبانگیری</span><span>▼</span></div> |
| 682 | <div class="accordion-body"> |
| 683 | <p style="font-size:13px;color:var(--text-muted);margin-bottom:12px">وضعیت دیتابیس: <span class="badge badge-success">تفکیک کاربر فعال</span></p> |
| 684 | <div style="display:flex;gap:10px;flex-wrap:wrap"> |
| 685 | <button class="btn btn-secondary" onclick="exportDataBlob()">📥 دانلود فایل پشتیبان (JSON)</button> |
| 686 | <label class="btn btn-secondary" style="margin-bottom:0">📤 بازگردانی فایل<input type="file" id="import-json-file" style="display:none" onchange="importDataBlob(event)" accept=".json" /></label> |
| 687 | </div> |
| 688 | </div> |
| 689 | </div> |
| 690 | |
| 691 | <div class="accordion-item" data-finora-task="about"> |
| 692 | <div class="accordion-header" onclick="toggleAccordion(this)"><span>ℹ️ درباره نرمافزار</span><span>▼</span></div> |
| 693 | <div class="accordion-body"> |
| 694 | <h3 style="font-size:16px;font-weight:bold">فینورا - Finora</h3> |
| 695 | <p style="color:var(--text-muted);font-size:13px;margin:6px 0 12px 0">سامانه ابری صدور فاکتور و مدیریت مالی چندکاربره</p> |
| 696 | <p style="font-size:13px;margin-bottom:8px">نگارش فعال: <strong>نسخه ۱.۰</strong></p> |
| 697 | <div class="about-dev-card"> |
| 698 | <div class="about-dev-avatar">د.م</div> |
| 699 | <div class="about-dev-info"> |
| 700 | <h4>داود مهربان</h4> |
| 701 | <p>طراح و توسعهدهنده نرمافزار</p> |
| 702 | <p>📱 <span dir="ltr" style="font-family:Tahoma">0912-437-6991</span></p> |
| 703 | </div> |
| 704 | <div class="about-dev-actions"> |
| 705 | <a class="btn-wa" href="https://wa.me/989124376991?text=سلام%20داود%20عزیز،%20درباره%20نرمافزار%20فینورا%20سؤال%20داشتم." target="_blank" rel="noopener"> |
| 706 | <svg viewBox="0 0 24 24" fill="currentColor" width="14" height="14"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.451.03-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/></svg> |
| 707 | واتساپ |
| 708 | </a> |
| 709 | <a class="btn-call" href="tel:+989124376991">📞 تماس</a> |
| 710 | </div> |
| 711 | </div> |
| 712 | <div style="display:flex;gap:10px;margin-top:10px"> |
| 713 | <button class="btn btn-primary" onclick="alert('آخرین نگارش نصب است.')">بررسی آپدیت</button> |
| 714 | <button class="btn btn-secondary" onclick="alert('پشتیبانی فعال است.')">گزارش باگ</button> |
| 715 | </div> |
| 716 | </div> |
| 717 | </div> |
| 718 | </section> |
| 719 | |
| 720 | <section id="view-admin" class="view-pane"> |
| 721 | <div class="card"> |
| 722 | <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;flex-wrap:wrap;gap:10px"> |
| 723 | <div><h2 style="font-size:18px;color:var(--danger)">👑 پنل مدیریت مرکزی کاربران و لایسنسها</h2><p style="color:var(--text-muted);font-size:13px;margin-top:4px">تعریف کاربران، تخصیص طرحهای لایسنس، تمدید، تغییر مدت و لغو اشتراک.</p></div> |
| 724 | <button class="btn btn-primary btn-inline" onclick="refreshAdminPanel()">🔄 تازهسازی لیست</button> |
| 725 | </div> |
| 726 | <div style="background:#eff6ff;border:1px solid #bfdbfe;border-radius:10px;padding:14px;margin-bottom:20px;font-size:13px;line-height:1.9">کاربران خودشان از صفحه ورود ثبتنام میکنند و ۱۵ روز آزمایشی میگیرند. در این پنل فقط لایسنسها (فعالسازی، تمدید، تغییر طرح، لغو) مدیریت میشود و کنترل نهایی روی سرور انجام میشود.</div> |
| 727 | <div class="table-responsive"> |
| 728 | <table><thead><tr><th>کاربر</th><th>وضعیت حساب</th><th>نوع اشتراک</th><th>ظرفیت شرکت</th><th>ظرفیت کاربران</th><th>تاریخ شروع</th><th>تاریخ پایان</th><th>روزهای باقیمانده</th><th>عملیات مدیریت لایسنس</th></tr></thead><tbody id="admin-users-table-body"><tr><td colspan="9" style="text-align:center;padding:20px">در حال بارگذاری کاربران...</td></tr></tbody></table> |
| 729 | </div> |
| 730 | </div> |
| 731 | </section> |
| 732 | |
| 733 | <div id="printable-invoice" style="display:none"></div> |
| 734 | </main> |
| 735 | </div> |
| 736 | |
| 737 | <div class="modal-backdrop" id="modal-user-onboarding"><div class="modal-card" style="max-width:520px"><h3 style="font-size:18px;margin-bottom:6px">خوش آمدید به فینورا</h3><p style="font-size:12.5px;color:var(--text-muted);line-height:1.9;margin-bottom:14px">برای شخصیسازی محیط کاری، نام و نقش حرفهای خودتان را مشخص کنید. این نقش فقط برای تجربه کاربری است و دسترسی «مدیر سیستم» ایجاد نمیکند.</p><div class="form-group"><label>نام و نام خانوادگی</label><input id="onboarding-full-name" class="form-control" maxlength="80" placeholder="مثلاً محمد رضایی" autocomplete="name"></div><div class="form-group"><label>در فینورا با چه نقشی کار میکنید؟</label><select id="onboarding-professional-role" class="form-control"><option value="business_owner">مالک / مدیر کسبوکار</option><option value="financial_manager">مدیر مالی</option><option value="chief_accountant">رئیس حسابداری</option><option value="accountant">حسابدار</option><option value="treasury">خزانهدار</option><option value="sales">فروش / بازرگانی</option><option value="warehouse">انباردار</option><option value="auditor">حسابرس / ناظر</option><option value="other">سایر</option></select></div><button class="btn btn-primary" style="width:100%;margin-top:12px" onclick="saveUserOnboarding()">ذخیره و ورود به محیط کار</button></div></div> |
| 738 | |
| 739 | <div class="modal-backdrop" id="modal-quick-contact"> |
| 740 | <div class="modal-card"> |
| 741 | <h3 style="font-size:16px;margin-bottom:12px">➕ تعریف سریع خریدار</h3> |
| 742 | <div class="form-row"> |
| 743 | <div class="form-group"><label>نوع</label><select id="quick-c-entity" class="form-control" onchange="handleQuickCEntityChange()"><option value="natural">شخص حقیقی</option><option value="legal">شخص حقوقی</option></select></div> |
| 744 | <div class="form-group" id="box-quick-c-prefix"><label>پیشوند</label><select id="quick-c-prefix" class="form-control"><option value="آقا/خانم">آقا / خانم</option><option value="فروشگاه">فروشگاه</option></select></div> |
| 745 | <div class="form-group" style="grid-column:span 2" id="box-quick-c-name"><label>نام</label><input type="text" id="quick-c-name" class="form-control" /></div> |
| 746 | </div> |
| 747 | <div class="form-row"> |
| 748 | <div class="form-group"><label id="label-quick-c-national">شناسه ملی</label><input type="text" id="quick-c-national" class="form-control" /></div> |
| 749 | <div class="form-group" id="box-quick-c-economic"><label>کد اقتصادی</label><input type="text" id="quick-c-economic" class="form-control" /></div> |
| 750 | <div class="form-group" id="box-quick-c-reg"><label>شماره ثبت</label><input type="text" id="quick-c-reg" class="form-control" /></div> |
| 751 | </div> |
| 752 | <div class="form-row"> |
| 753 | <div class="form-group"><label>کد پستی</label><input type="text" id="quick-c-postal" class="form-control" /></div> |
| 754 | <div class="form-group"><label>تلفن</label><input type="text" id="quick-c-mobile" class="form-control" /></div> |
| 755 | </div> |
| 756 | <div class="form-group"><label>نشانی</label><input type="text" id="quick-c-address" class="form-control" /></div> |
| 757 | <div style="display:flex;gap:10px;margin-top:12px"> |
| 758 | <button class="btn btn-success" onclick="saveQuickContact()">ذخیره و انتخاب</button> |
| 759 | <button class="btn btn-secondary" onclick="closeQuickContactModal()">انصراف</button> |
| 760 | </div> |
| 761 | </div> |
| 762 | </div> |
| 763 | |
| 764 | <div class="modal-backdrop" id="modal-quick-product"> |
| 765 | <div class="modal-card"> |
| 766 | <h3 style="font-size:16px;margin-bottom:12px">➕ تعریف سریع کالا</h3> |
| 767 | <div class="form-row"> |
| 768 | <div class="form-group"><label>کد</label><input type="text" id="quick-p-code" class="form-control" /></div> |
| 769 | <div class="form-group"><label>عنوان</label><input type="text" id="quick-p-name" class="form-control" /></div> |
| 770 | <div class="form-group"><label>مشخصه</label><input type="text" id="quick-p-spec" class="form-control" /></div> |
| 771 | </div> |
| 772 | <div class="form-row"> |
| 773 | <div class="form-group"><label>واحد</label><input type="text" id="quick-p-unit" class="form-control" value="عدد" /></div> |
| 774 | <div class="form-group"><label>قیمت فروش (<span class="cur-label">ریال</span>)</label><input type="text" inputmode="decimal" id="quick-p-price" class="form-control" value="0" oninput="handleMoneyInput(this)" /></div> |
| 775 | <div class="form-group"><label>شناسه کالا/خدمت داخلی</label><input type="text" id="quick-p-internal-id" class="form-control" /></div><div class="form-group"><label>شناسه کالا/خدمت سامانه مالیاتی</label><input type="text" id="quick-p-official-id" class="form-control" /></div> |
| 776 | </div> |
| 777 | <div style="display:flex;gap:10px;margin-top:12px"> |
| 778 | <button class="btn btn-success" onclick="saveQuickProduct()">ذخیره و افزودن</button> |
| 779 | <button class="btn btn-secondary" onclick="closeQuickProductModal()">انصراف</button> |
| 780 | </div> |
| 781 | </div> |
| 782 | </div> |
| 783 | |
| 784 | <div class="modal-backdrop" id="modal-admin-license-edit"> |
| 785 | <div class="modal-card"> |
| 786 | <h3 style="font-size:16px;margin-bottom:12px" id="modal-license-user-title">تغییر مدت و لایسنس کاربر</h3> |
| 787 | <input type="hidden" id="modal-license-target-username" /> |
| 788 | <div class="form-group"><label>انتخاب مدت و نوع لایسنس جدید</label><select id="modal-license-duration-select" class="form-control"><option value="monthly">اشتراک ۱ ماهه (۳۰ روز)</option><option value="three_months">اشتراک ۳ ماهه (۹۰ روز)</option><option value="annual">اشتراک ۱ ساله (۳۶۵ روز)</option><option value="lifetime">اشتراک دائمی (Lifetime)</option></select></div><div class="form-row"><div class="form-group"><label>حداکثر تعداد شرکت حقوقی</label><input id="modal-license-company-limit" type="number" min="1" max="1000" value="1" class="form-control"><small id="modal-license-company-limit-hint" style="color:var(--text-muted)">ناحیه/واحد سهمیه شرکت مصرف نمیکند.</small></div><div class="form-group"><label>حداکثر کاربران نامدار</label><input id="modal-license-user-limit" type="number" min="1" max="100000" value="1" class="form-control"><small id="modal-license-user-limit-hint" style="color:var(--text-muted)">هر عضو فعال یک Seat مصرف میکند.</small></div></div> |
| 789 | <div style="display:flex;gap:10px;margin-top:16px"> |
| 790 | <button class="btn btn-success" style="flex:1" onclick="applyLicenseDurationChange()">تایید و اعمال لایسنس</button> |
| 791 | <button class="btn btn-secondary" style="flex:1" onclick="closeLicenseEditModal()">انصراف</button> |
| 792 | </div> |
| 793 | </div> |
| 794 | </div> |
| 795 | |
| 796 | <div class="modal-backdrop" id="modal-electronic-doc"> |
| 797 | <div class="modal-card" style="max-width:850px"> |
| 798 | <h3 style="font-size:16px;margin-bottom:6px">📄 سند الکترونیکی سامانه مودیان</h3> |
| 799 | <p style="font-size:12px;color:var(--text-muted);margin-bottom:14px">اطلاعات این سند فقط برای فاکتور رسمی قابل تکمیل است.</p> |
| 800 | |
| 801 | <h4 style="font-size:14px;margin-bottom:8px;color:#1e3a8a;border-bottom:1px solid #e2e8f0;padding-bottom:6px">الف) سربرگ صورتحساب</h4> |
| 802 | <div class="form-row"> |
| 803 | <div class="form-group"><label>شماره منحصر به فرد مالیاتی</label><input type="text" id="edoc-unique-number" class="form-control" placeholder="A2EAG4050E000000043C9" /></div> |
| 804 | <div class="form-group"><label>شماره مالیاتی مندرج در برگه تشخیص</label><input type="text" id="edoc-tax-number" class="form-control" placeholder="0000000043C" /></div> |
| 805 | </div> |
| 806 | <div class="form-row"> |
| 807 | <div class="form-group"><label>تاریخ و زمان صدور</label><input type="text" id="edoc-issue-datetime" class="form-control" placeholder="1405/06/17 11:35:00" /></div> |
| 808 | <div class="form-group"><label>نوع صورتحساب</label><select id="edoc-kind" class="form-control"><option value="اصل">اصل</option><option value="برگشت">برگشت</option><option value="اصلاحی">اصلاحی</option></select></div> |
| 809 | </div> |
| 810 | <div class="form-row"> |
| 811 | <div class="form-group"><label>تاریخ صورتحساب الکترونیکی اصلی</label><input type="text" id="edoc-original-date" class="form-control" placeholder="1405/06/17" /></div> |
| 812 | <div class="form-group"><label>شماره صورتحساب الکترونیکی اصلی</label><input type="text" id="edoc-original-number" class="form-control" placeholder="140505" /></div> |
| 813 | </div> |
| 814 | <div class="form-row"> |
| 815 | <div class="form-group"><label>الگو / موضوع صورتحساب</label><select id="edoc-pattern" class="form-control" onchange="handleEdocPatternChange()"><option value="کالا">فروش کالا</option><option value="خدمات">خدمات</option><option value="پیمانکاری">قرارداد پیمانکاری</option><option value="هردو">هر دو (کالا و خدمات)</option></select></div> |
| 816 | </div> |
| 817 | |
| 818 | <h4 style="font-size:14px;margin:14px 0 8px 0;color:#1e3a8a;border-bottom:1px solid #e2e8f0;padding-bottom:6px">ب) اقلام کالا/خدمت</h4> |
| 819 | <div id="edoc-items-container"></div> |
| 820 | |
| 821 | <h4 style="font-size:14px;margin:14px 0 8px 0;color:#1e3a8a;border-bottom:1px solid #e2e8f0;padding-bottom:6px">ج) موارد اختصاصی قرارداد پیمانکاری</h4> |
| 822 | <div id="box-edoc-contract" style="display:none"> |
| 823 | <div class="form-group"><label>شناسه یکتای ثبت قرارداد</label><input type="text" id="edoc-contract-id" class="form-control" placeholder="205108734859" /></div> |
| 824 | </div> |
| 825 | <div id="edoc-contract-hint" style="font-size:12px;color:var(--text-muted);padding:8px;background:#f8fafc;border-radius:6px">این بخش فقط برای الگوی «قرارداد پیمانکاری» فعال است.</div> |
| 826 | |
| 827 | <div style="display:flex;gap:10px;margin-top:16px"> |
| 828 | <button class="btn btn-success" onclick="saveElectronicDocToPending()">💾 ذخیره اطلاعات سند</button> |
| 829 | <button class="btn btn-secondary" onclick="cancelElectronicDoc()">انصراف</button> |
| 830 | </div> |
| 831 | </div> |
| 832 | </div> |
| 833 | |
| 834 | <nav class="mobile-dock" aria-label="ناوبری موبایل"> |
| 835 | <div class="dock-tab active" data-view="view-dashboard" onclick="switchView('view-dashboard')"><span>📊</span><span>داشبورد</span></div> |
| 836 | <div class="dock-tab" data-view="view-invoices" onclick="switchView('view-invoices')"><span>🧾</span><span>فاکتور</span></div> |
| 837 | <div class="dock-tab" data-view="view-purchases" onclick="switchView('view-purchases')"><span>🛒</span><span>خرید</span></div> |
| 838 | <div class="dock-tab" data-view="view-payments" onclick="switchView('view-payments')"><span>💳</span><span>دریافت/پرداخت</span></div> |
| 839 | <div class="dock-tab" data-view="view-inventory" onclick="switchView('view-inventory')"><span>🏭</span><span>انبار</span></div> |
| 840 | <div class="dock-tab" data-view="view-reports" onclick="switchView('view-reports')"><span>📈</span><span>گزارش</span></div> |
| 841 | <div class="dock-tab" data-view="view-contacts" onclick="switchView('view-contacts')"><span>👥</span><span>اشخاص</span></div> |
| 842 | <div class="dock-tab" data-view="view-products" onclick="switchView('view-products')"><span>📦</span><span>کالا</span></div> |
| 843 | <div class="dock-tab" data-view="view-cheques" onclick="switchView('view-cheques')"><span>🏦</span><span>چک</span></div> |
| 844 | <div class="dock-tab" data-view="view-expenses" onclick="switchView('view-expenses')"><span>💰</span><span>هزینه/درآمد</span></div> |
| 845 | <div class="dock-tab" data-view="view-settings" onclick="switchView('view-settings')"><span>⚙️</span><span>تنظیمات</span></div> |
| 846 | </nav> |
| 847 | |
| 848 | <script src="js/core.js?v=20260928-security-v4"></script> |
| 849 | <script src="js/admin.js"></script> |
| 850 | <script src="js/sync.js?v=20260928-data-v4"></script> |
| 851 | <script src="js/ui.js?v=20260928-phase1-shell-final"></script> |
| 852 | <script src="js/invoices.js?v=20260928-phase3-final"></script> |
| 853 | <script src="js/print.js?v=20260928-layout-v4"></script> |
| 854 | <script src="js/products.js"></script> |
| 855 | <script src="js/contacts.js?v=20260928-roles-v3"></script> |
| 856 | <script src="js/cheques.js"></script> |
| 857 | <script src="js/expenses.js"></script> |
| 858 | <script src="js/companies.js?v=20260928-integrity-v4"></script> |
| 859 | <script src="js/backup.js?v=20260928-data-v3"></script> |
| 860 | <script src="js/words.js"></script> |
| 861 | <script src="js/bootstrap.js"></script> |
| 862 | |
| 863 | <style> |
| 864 | .form-control, textarea, select { direction: rtl; } |
| 865 | </style> |
| 866 | |
| 867 | <script src="js/patches.js"></script> |
| 868 | <script src="js/idle-and-reports.js?v=20260928-phase3-v5"></script> |
| 869 | <script src="js/money-format.js"></script> |
| 870 | <script src="js/projects.js?v=20260928-projects-v7"></script> |
| 871 | <script src="js/invoice-excel-import.js"></script> |
| 872 | <script src="js/purchases.js?v=20260928-phase3-final"></script> |
| 873 | <script src="js/operations.js?v=20260928-phase3-final"></script> |
| 874 | <script src="js/payments.js?v=20260928-phase3-final"></script> |
| 875 | <script src="js/accounting.js?v=20260928-accounting-v3"></script> |
| 876 | <style id="phase2-accounting-style"> |
| 877 | .af-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:16px}.af-head h1{font-size:20px;color:#0f172a}.af-head p,.af-hint{font-size:12px;color:#64748b;margin-top:5px}.af-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.af-space,.af-list{margin-top:14px}.af-chip{display:inline-flex;align-items:center;gap:6px;background:#eef7f8;color:#0b6874;border:1px solid #cce9ec;border-radius:999px;padding:6px 10px;margin:3px;font-size:11px}.af-chip button{border:0;background:transparent;color:#b91c1c;cursor:pointer;font-size:15px}.af-master-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border-bottom:1px solid #edf1f5}.af-master-row:last-child{border-bottom:0}.af-master-row small{display:block;color:#64748b;margin-top:3px}.af-empty{text-align:center;padding:18px;color:#64748b}@media(max-width:820px){.af-grid{grid-template-columns:1fr}} |
| 878 | </style> |
| 879 | <script src="js/accounting-foundation.js?v=20260928-phase3-final"></script> |
| 880 | <script src="js/journal-engine.js?v=20260928-phase3-final"></script> |
| 881 | <script src="js/accounting-foundation-ui.js?v=20260928-phase2-v1"></script> |
| 882 | <script src="js/accounting-foundation-render.js?v=20260928-phase2-v1"></script> |
| 883 | <script src="js/journal-ui.js?v=20260928-phase3-final"></script> |
| 884 | <script src="js/drilldown.js?v=20260928-drill-v10"></script> |
| 885 | <script src="js/phase4-contracting.js?v=20260929-phase4-v1"></script> |
| 886 | <script src="js/phase5-domain.js?v=20260929-phase5-v1"></script> |
| 887 | <script src="js/phase5-enterprise.js?v=20260929-phase5-v1"></script> |
| 888 | <script src="js/phase6-reporting.js?v=20260929-phase6-v1"></script> |
| 889 | <script src="js/enterprise-iran.js?v=20260930-iran-erp-v1"></script> |
| 890 | <script src="js/enterprise-iran-v2.js?v=20260930-iran-erp-v2"></script> |
| 891 | <script src="js/selfcheck.js?v=20260928-release-1-0"></script> |
| 892 | |
| 893 | </body> |
| 894 | </html> |