fix: invoice edit/list improvements
- Due date uses days selector in edit mode (same as create) - Overdue invoices fully editable (same as issued) - Overdue status reversed to issued when due date moved to future - Invoice list: edit icon for issued/overdue, eye for paid - Invoice list: PDF opens blob from NAS (removed lang modal) - NAS cleanup: properly scans directories when cleaning old PDFs - Fixed syntax error from leftover else block Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -41,7 +41,13 @@ class NasFinancialsManager {
|
||||
const yearPath = path.join(issuedDir, yearDir);
|
||||
if (!fs.statSync(yearPath).isDirectory()) continue;
|
||||
for (const monthDir of fs.readdirSync(yearPath)) {
|
||||
const filePath = path.join(yearPath, monthDir, safeName);
|
||||
const monthPath = path.join(yearPath, monthDir);
|
||||
try {
|
||||
if (!fs.statSync(monthPath).isDirectory()) continue;
|
||||
} catch {
|
||||
continue;
|
||||
}
|
||||
const filePath = path.join(monthPath, safeName);
|
||||
if (fs.existsSync(filePath)) {
|
||||
fs.unlinkSync(filePath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user