';
dol_fiche_end();
- print '';
+ print '
';
print ' ';
print '
';
- print '';
-}
-else
-{
- $book = new BookKeeping($db);
- $result = $book->fetch_per_mvt($piece_num);
- if ($result < 0) {
- setEventMessage($book->errors, 'errors');
- }
- if (! empty($book->piece_num)) {
-
- print_fiche_titre($langs->trans("UpdateMvts"));
-
- print '
';
- print '';
- print '' . $langs->trans("NumMvts") . ' ';
- print '' . $book->piece_num . ' ';
- print ' ';
- print '';
- print '' . $langs->trans("Docdate") . ' ';
- print '' . dol_print_date($book->doc_date, 'daytextshort') . ' ';
- print ' ';
- print '';
- print '' . $langs->trans("Codejournal") . ' ';
- print '' . $book->code_journal . ' ';
- print ' ';
- print '';
- print '' . $langs->trans("Docref") . ' ';
- print '' . $book->doc_ref . ' ';
- print ' ';
- print '';
- print '' . $langs->trans("Doctype") . ' ';
- print '' . $book->doc_type . ' ';
- print ' ';
- print '
';
-
- $result = $book->fetch_all_per_mvt($piece_num);
- if ($result < 0) {
- setEventMessage($book->errors, 'errors');
- } else {
-
- print_fiche_titre($langs->trans("ListeMvts"));
- print "
";
- if (count($book->linesmvt) > 0) {
-
- print '';
-
- print_liste_field_titre($langs->trans("Numerocompte"));
- print_liste_field_titre($langs->trans("Code_tiers"));
- print_liste_field_titre($langs->trans("Labelcompte"));
- print_liste_field_titre($langs->trans("Debit"));
- print_liste_field_titre($langs->trans("Credit"));
- print_liste_field_titre($langs->trans("Amount"));
- print_liste_field_titre($langs->trans("Sens"));
- print_liste_field_titre('');
+ print '';
+} else {
+ $book = new BookKeeping($db);
+ $result = $book->fetch_per_mvt($piece_num);
+ if ($result < 0) {
+ setEventMessage($book->errors, 'errors');
+ }
+ if (! empty($book->piece_num)) {
- print " \n";
-
- foreach ( $book->linesmvt as $line ) {
- $var = ! $var;
- print "";
-
- if ($action == 'update' && $line->id == $id) {
-
- print ' \n";
- }
-
- if ($action == "" || $action == 'add') {
- $var = ! $var;
- print "";
-
- print ' ';
- }
- print '
';
- print '';
- }
- }
- }
- else {
- print_fiche_titre($langs->trans("NoRecords"));
- }
+ print_fiche_titre($langs->trans("UpdateMvts"));
+
+ print '
';
+ print '';
+ print '' . $langs->trans("NumMvts") . ' ';
+ print '' . $book->piece_num . ' ';
+ print ' ';
+ print '';
+ print '' . $langs->trans("Docdate") . ' ';
+ print '' . dol_print_date($book->doc_date, 'daytextshort') . ' ';
+ print ' ';
+ print '';
+ print '' . $langs->trans("Codejournal") . ' ';
+ print '' . $book->code_journal . ' ';
+ print ' ';
+ print '';
+ print '' . $langs->trans("Docref") . ' ';
+ print '' . $book->doc_ref . ' ';
+ print ' ';
+ print '';
+ print '' . $langs->trans("Doctype") . ' ';
+ print '' . $book->doc_type . ' ';
+ print ' ';
+ print '
';
+
+ $result = $book->fetch_all_per_mvt($piece_num);
+ if ($result < 0) {
+ setEventMessage($book->errors, 'errors');
+ } else {
+
+ print_fiche_titre($langs->trans("ListeMvts"));
+ print "
";
+ if (count($book->linesmvt) > 0) {
+
+ print '';
+
+ print_liste_field_titre($langs->trans("Numerocompte"));
+ print_liste_field_titre($langs->trans("Code_tiers"));
+ print_liste_field_titre($langs->trans("Labelcompte"));
+ print_liste_field_titre($langs->trans("Debit"));
+ print_liste_field_titre($langs->trans("Credit"));
+ print_liste_field_titre($langs->trans("Amount"));
+ print_liste_field_titre($langs->trans("Sens"));
+ print_liste_field_titre('');
+
+ print " \n";
+
+ foreach ( $book->linesmvt as $line ) {
+ $var = ! $var;
+ print "";
+
+ if ($action == 'update' && $line->id == $id) {
+
+ print ' \n";
+ }
+
+ if ($action == "" || $action == 'add') {
+ $var = ! $var;
+ print "";
+
+ print ' ';
+ }
+ print '
';
+ print '';
+ }
+ }
+ }
+ else {
+ print_fiche_titre($langs->trans("NoRecords"));
+ }
}
llxFooter();
diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php
index 6c06c2ba3d7..cc90b3873db 100644
--- a/htdocs/accountancy/bookkeeping/list.php
+++ b/htdocs/accountancy/bookkeeping/list.php
@@ -1,7 +1,7 @@
* Copyright (C) 2013-2014 Florian Henry
- * Copyright (C) 2013-2014 Alexandre Spangaro
+ * Copyright (C) 2013-2015 Alexandre Spangaro
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,6 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
+// Langs
+$langs->load("accountancy");
$page = GETPOST("page");
$sortorder = GETPOST("sortorder");
@@ -155,8 +157,6 @@ else {
print '';
- print '' . $langs->trans("NewAccountingMvt") . ' ';
-
print '