chore: sync local changes before new work
- Update declaration calculations and Section D handling - Adjust main index workflow - Improve PDF download handling - Update French translations
This commit is contained in:
parent
0cc15800db
commit
59424209b7
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -138,6 +138,9 @@ if (empty($declarations)) {
|
||||
$status_icon = ' <i class="fa fa-check-circle text-success" title="' . $langs->trans("ValidatedDeclaration") . '"></i>';
|
||||
} elseif ($d['status'] == 'draft') {
|
||||
$status_icon = ' <i class="fa fa-edit text-warning" title="' . $langs->trans("DraftDeclaration") . '"></i>';
|
||||
} elseif ($d['status'] == 'submitted') {
|
||||
$status_icon = ' <i class="fa fa-check-circle text-success" title="' . $langs->trans("DraftDeclaration") . '"></i>';
|
||||
$status_icon .= ' <i class="fa fa-check-circle text-success" title="' . $langs->trans("DraftDeclaration") . '"></i>';
|
||||
}
|
||||
print '<td class="center">' . $langs->trans("Status" . ucfirst($d['status'])) . $status_icon . '</td>';
|
||||
|
||||
@ -175,7 +178,7 @@ if (empty($declarations)) {
|
||||
|
||||
// Document column
|
||||
print '<td class="center">';
|
||||
if ($d['status'] == 'validated') {
|
||||
if (($d['status'] == 'validated') || ($d['status'] == 'submitted')) {
|
||||
// Check if document exists
|
||||
$has_document = $declarationtva->hasValidatedDocument($d['rowid']);
|
||||
|
||||
@ -192,7 +195,8 @@ if (empty($declarations)) {
|
||||
print '<i class="fa fa-file-pdf" style="font-size: 16px; color: #28a745;" title="' . $langs->trans("ValidatedPDFAvailable") . '"></i>';
|
||||
}
|
||||
} else {
|
||||
print '<i class="fa fa-file-o text-muted" title="' . $langs->trans("NoDocument") . '"></i>';
|
||||
//print '<i class="fa fa-file-o text-muted" title="' . $langs->trans("NoDocument") . '"></i>';
|
||||
print 'file';
|
||||
}
|
||||
} else {
|
||||
print '<i class="fa fa-minus text-muted"></i>';
|
||||
|
||||
@ -45,7 +45,7 @@ if ($result <= 0) {
|
||||
}
|
||||
|
||||
// Check if declaration is validated
|
||||
if ($declarationtva->status != 'validated') {
|
||||
if ($declarationtva->status != 'validated' && $declarationtva->status != 'submitted') {
|
||||
setEventMessages("Declaration is not validated", null, 'errors');
|
||||
header("Location: declarationtva_view.php?id=" . $declaration_id);
|
||||
exit;
|
||||
|
||||
@ -388,12 +388,12 @@ Submit = Soumettre
|
||||
View = Voir
|
||||
StatusDraft = Brouillon
|
||||
StatusValidated = Validée
|
||||
StatusSubmitted = Soumise
|
||||
StatusSubmitted = Transferée
|
||||
|
||||
# Success and Error Messages
|
||||
DeclarationCreated = Déclaration créée avec succès
|
||||
DeclarationValidated = Déclaration validée avec succès
|
||||
DeclarationSubmitted = Déclaration soumise avec succès
|
||||
DeclarationSubmitted = Déclaration transferée avec succès
|
||||
ErrorCreatingDeclaration = Erreur lors de la création de la déclaration
|
||||
ErrorValidatingDeclaration = Erreur lors de la validation de la déclaration
|
||||
ErrorSubmittingDeclaration = Erreur lors de la soumission de la déclaration
|
||||
|
||||
Loading…
Reference in New Issue
Block a user