فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

fix(A02): invalidate approved opening preview when the selected file changes

davoodmehraban89 committed Oct 16, 2026 at 16:51 UTC 39a3088a98266b265d916fc64aa832481c158dc3
1 file changed +9 -1
src/views/AccountingView.js
+9 -1
@@ -100,7 +100,8 @@ class AccountingViewImpl {
100 <div class="form-group">
101 <label class="form-label" for="openingFileInput">فایل افتتاحیه برای بررسی</label>
102 <input id="openingFileInput" class="form-control" type="file"
103 - accept=".json,application/json" />
103 + accept=".json,application/json"
104 + onchange="window.AccountingView.resetOpeningPreview()" />
105 </div>
106 <button class="btn btn-secondary" onclick="window.AccountingView.previewOpeningFile()">
107 کنترل مانده‌ها و دوره (بدون ثبت)
@@ -112,6 +113,13 @@ class AccountingViewImpl {
113 `;
114 }
115
116 + resetOpeningPreview() {
117 + this._openingCandidate = null;
118 + this._openingReview = null;
119 + const host = document.getElementById('openingPreviewReport');
120 + if (host) host.textContent = 'فایل تغییر کرد؛ لازم است دوباره بررسی شود.';
121 + }
122 +
123 async previewOpeningFile() {
124 if (!Auth.isAdmin()) { Toast.error('دسترسی فقط برای مدیر مجاز است'); return; }
125 const file = document.getElementById('openingFileInput')?.files?.[0];