diff --git a/core/class/declarationtva.class.php b/core/class/declarationtva.class.php index 93745ea..6c77f6f 100644 --- a/core/class/declarationtva.class.php +++ b/core/class/declarationtva.class.php @@ -938,6 +938,7 @@ class DeclarationTVA return false; } + /* No bank entries anymore , are done manually // Create bank journal entries $bank_entries = $this->createBankJournalEntries($declaration, $ca3_lookup, $journal_config, $user); if ($bank_entries === false) { @@ -945,6 +946,7 @@ class DeclarationTVA return false; } // Note: $bank_entries can be an empty array for carry-forward cases, which is OK + */ return true; } @@ -1429,7 +1431,7 @@ class DeclarationTVA // Check if declaration is validated // TEMPORARILY DISABLED FOR TESTING - allows re-submission - if ($declaration->status !== 'validated') { + if ($this->status !== 'validated') { $this->error = 'Declaration must be validated before submission'; return false; } @@ -1913,7 +1915,7 @@ class DeclarationTVA $obj = $this->db->fetch_object($result); // Only check for documents if declaration is validated - if ($obj->status != 'validated') { + if ($obj->status != 'validated' && $obj->status != 'submitted') { return false; } @@ -1953,7 +1955,7 @@ class DeclarationTVA $obj = $this->db->fetch_object($result); // Only return path if declaration is validated - if ($obj->status != 'validated') { + if ($obj->status != 'validated' && $obj->status != 'submitted') { return false; } diff --git a/declarationtvaindex.php b/declarationtvaindex.php index 4a86a0b..1cda3b0 100644 --- a/declarationtvaindex.php +++ b/declarationtvaindex.php @@ -138,6 +138,9 @@ if (empty($declarations)) { $status_icon = ' '; } elseif ($d['status'] == 'draft') { $status_icon = ' '; + } elseif ($d['status'] == 'submitted') { + $status_icon = ' '; + $status_icon .= ' '; } print '