2
0
forked from Wavyzz/dolibarr

Merge pull request #5707 from aspangaro/5.0-p12

Fix Presentation of fiscal year
This commit is contained in:
Juanjo Menent
2016-09-07 17:06:58 +02:00
committed by GitHub
4 changed files with 81 additions and 75 deletions

View File

@@ -80,8 +80,8 @@ $max = 100;
$form = new Form($db);
$title = $langs->trans('FiscalYears');
llxHeader('', $title, LOG_ERR);
$helpurl = "";
llxHeader('', $title, $helpurl);
$sql = "SELECT f.rowid, f.label, f.date_start, f.date_end, f.statut, f.entity";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_fiscalyear as f";
@@ -137,7 +137,6 @@ if ($result) {
} else {
print '<tr ' . $bc[$var] . '><td colspan="5" class="opacitymedium">' . $langs->trans("None") . '</td></tr>';
}
print '</table>';
} else {
dol_print_error($db);

View File

@@ -28,7 +28,9 @@ $langs->load("admin");
$langs->load("compta");
// Security check
if (! $user->admin)
if ($user->societe_id > 0)
accessforbidden();
if (! $user->rights->accounting->fiscalyear)
accessforbidden();
$error = 0;
@@ -139,8 +141,9 @@ else if ($action == 'update') {
/*
* View
*/
llxHeader();
$title = $langs->trans("Fiscalyear") . " - " . $langs->trans("Card");
$helpurl = "";
llxHeader("",$title,$helpurl);
$form = new Form($db);
@@ -157,7 +160,7 @@ if ($action == 'create')
print '<table class="border" width="100%">';
// Label
print '<tr><td class="fieldrequired">' . $langs->trans("Label") . '</td><td><input name="label" size="32" value="' . GETPOST("label") . '"></td></tr>';
print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans("Label") . '</td><td><input name="label" size="32" value="' . GETPOST("label") . '"></td></tr>';
// Date start
print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>';
@@ -193,7 +196,7 @@ if ($action == 'create')
$head = fiscalyear_prepare_head($object);
if ($action == 'edit') {
dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron');
dol_fiche_head($head, 'card', $langs->trans("Fiscalyear"), 0, 'cron');
print '<form name="update" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
@@ -204,7 +207,7 @@ if ($action == 'create')
// Ref
print "<tr>";
print '<td class="titlefield">' . $langs->trans("Ref") . '</td><td>';
print '<td class="titlefieldcreate titlefield">' . $langs->trans("Ref") . '</td><td>';
print $object->ref;
print '</td></tr>';
@@ -247,16 +250,16 @@ if ($action == 'create')
print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $id, $langs->trans("DeleteFiscalYear"), $langs->trans("ConfirmDeleteFiscalYear"), "confirm_delete");
}
dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron');
dol_fiche_head($head, 'card', $langs->trans("Fiscalyear"), 0, 'cron');
print '<table class="border" width="100%">';
$linkback = '<a href="' . DOL_URL_ROOT . '/accountancy/admin/fiscalyear.php">' . $langs->trans("BackToList") . '</a>';
// Ref
print '<tr><td width="25%">' . $langs->trans("Ref") . '</td><td width="50%">';
print '<tr><td class="titlefield">' . $langs->trans("Ref") . '</td><td width="50%">';
print $object->ref;
print '</td><td width="25%">';
print '</td><td>';
print $linkback;
print '</td></tr>';
@@ -291,7 +294,6 @@ if ($action == 'create')
/*
* Barre d'actions
*/
print '<div class="tabsAction">';
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=edit&id=' . $id . '">' . $langs->trans('Modify') . '</a>';

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
*
* 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
@@ -29,13 +29,17 @@ $langs->load("admin");
$langs->load("compta");
// Security check
if (! $user->admin)
if ($user->societe_id > 0)
accessforbidden();
if (! $user->rights->accounting->fiscalyear)
accessforbidden();
$id = GETPOST('id', 'int');
// View
llxHeader();
$title = $langs->trans("Fiscalyear") . " - " . $langs->trans("Info");
$helpurl = "";
llxHeader("",$title,$helpurl);
if ($id) {
$object = new Fiscalyear($db);
@@ -44,7 +48,7 @@ if ($id) {
$head = fiscalyear_prepare_head($object);
dol_fiche_head($head, 'info', $langs->trans("FiscalYearCard"), 0, 'cron');
dol_fiche_head($head, 'info', $langs->trans("Fiscalyear"), 0, 'cron');
print '<table width="100%"><tr><td>';
dol_print_object_info($object);

View File

@@ -49,7 +49,7 @@ ErrorDecimalLargerThanAreForbidden=Error, a precision higher than <b>%s</b> is n
DictionarySetup=Dictionary setup
Dictionary=Dictionaries
Chartofaccounts=Chart of accounts
Fiscalyear=Fiscal years
Fiscalyear=Fiscal year
ErrorReservedTypeSystemSystemAuto=Value 'system' and 'systemauto' for type is reserved. You can use 'user' as value to add your own record
ErrorCodeCantContainZero=Code can't contain value 0
DisableJavascript=Disable JavaScript and Ajax functions (Recommended for blind person or text browsers)
@@ -1522,6 +1522,7 @@ OpenFiscalYear=Open fiscal year
CloseFiscalYear=Close fiscal year
DeleteFiscalYear=Delete fiscal year
ConfirmDeleteFiscalYear=Are you sure to delete this fiscal year ?
ShowFiscalYear=Show fiscal year
AlwaysEditable=Can always be edited
MAIN_APPLICATION_TITLE=Force visible name of application (warning: setting your own name here may break autofill login feature when using DoliDroid mobile application)
NbMajMin=Minimum number of uppercase characters