Merge pull request #9441 from grandoc/new_branch_09_09_2018

New branch 09 09 2018
This commit is contained in:
Laurent Destailleur 2018-09-12 18:24:34 +02:00 committed by GitHub
commit de8496773d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 43 additions and 55 deletions

View File

@ -36,9 +36,8 @@ if ( $_SESSION['uid'] <= 0 )
exit; exit;
} }
$langs->load("companies"); // Load translation files required by the page
$langs->load("compta"); $langs->loadLangs(array("companies","compta","cashdesk"));
$langs->load("cashdesk");
/* /*

View File

@ -28,8 +28,8 @@
require_once '../main.inc.php'; require_once '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("cashdesk"); $langs->loadLangs(array("admin","cashdesk"));
// Test if user logged // Test if user logged
if ( $_SESSION['uid'] > 0 ) if ( $_SESSION['uid'] > 0 )

View File

@ -30,9 +30,8 @@ include '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php'; require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Auth.class.php'; require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Auth.class.php';
$langs->load("main"); // Load translation files required by the page
$langs->load("admin"); $langs->loadLangs(array("main","admin","cashdesk"));
$langs->load("cashdesk");
$username = GETPOST("txtUsername"); $username = GETPOST("txtUsername");
$password = GETPOST("pwdPassword"); $password = GETPOST("pwdPassword");
@ -119,7 +118,7 @@ if ( $retour >= 0 )
$_SESSION['firstname'] = $tab['firstname']; $_SESSION['firstname'] = $tab['firstname'];
$_SESSION['CASHDESK_ID_THIRDPARTY'] = ($thirdpartyid > 0 ? $thirdpartyid : ''); $_SESSION['CASHDESK_ID_THIRDPARTY'] = ($thirdpartyid > 0 ? $thirdpartyid : '');
$_SESSION['CASHDESK_ID_WAREHOUSE'] = ($warehouseid > 0 ? $warehouseid : ''); $_SESSION['CASHDESK_ID_WAREHOUSE'] = ($warehouseid > 0 ? $warehouseid : '');
$_SESSION['CASHDESK_ID_BANKACCOUNT_CASH'] = ($bankid_cash > 0 ? $bankid_cash : ''); $_SESSION['CASHDESK_ID_BANKACCOUNT_CASH'] = ($bankid_cash > 0 ? $bankid_cash : '');
$_SESSION['CASHDESK_ID_BANKACCOUNT_CHEQUE'] = ($bankid_cheque > 0 ? $bankid_cheque : ''); $_SESSION['CASHDESK_ID_BANKACCOUNT_CHEQUE'] = ($bankid_cheque > 0 ? $bankid_cheque : '');
$_SESSION['CASHDESK_ID_BANKACCOUNT_CB'] = ($bankid_cb > 0 ? $bankid_cb : ''); $_SESSION['CASHDESK_ID_BANKACCOUNT_CB'] = ($bankid_cb > 0 ? $bankid_cb : '');
@ -135,8 +134,8 @@ if ( $retour >= 0 )
} }
else else
{ {
$langs->load("errors"); // Load translation files required by the page
$langs->load("other"); $langs->loadLangs(array("other","errors"));
$retour=$langs->trans("ErrorBadLoginPassword"); $retour=$langs->trans("ErrorBadLoginPassword");
header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid); header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid);
exit; exit;

View File

@ -26,10 +26,8 @@ if (empty($langs) || ! is_object($langs))
exit; exit;
} }
// Load translation files required by the page
$langs->load("main"); $langs->loadLangs(array("main","bills","cashdesk"));
$langs->load("bills");
$langs->load("cashdesk");
// Object $form must de defined // Object $form must de defined

View File

@ -28,9 +28,8 @@ if (empty($langs) || ! is_object($langs))
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$langs->load("main"); // Load translation files required by the page
$langs->load("bills"); $langs->loadLangs(array("main","bills","cashdesk"));
$langs->load("cashdesk");
?> ?>

View File

@ -63,9 +63,8 @@ if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled)
$warehouseLink = $warehouse->getNomUrl(1); $warehouseLink = $warehouse->getNomUrl(1);
} }
// Load translation files required by the page
$langs->load("cashdesk"); $langs->loadLangs(array("main","cashdesk"));
$langs->load("main");
print "\n".'<!-- menu.tpl.php -->'."\n"; print "\n".'<!-- menu.tpl.php -->'."\n";
print '<div class="menu_bloc">'; print '<div class="menu_bloc">';

View File

@ -27,8 +27,8 @@ if (empty($langs) || ! is_object($langs))
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$langs->load("main"); // Load translation files required by the page
$langs->load('cashdesk'); $langs->loadLangs(array("main","cashdesk"));
top_httphead('text/html'); top_httphead('text/html');

View File

@ -23,10 +23,8 @@ if (empty($langs) || ! is_object($langs))
exit; exit;
} }
// Load translation files required by the page
$langs->load("main"); $langs->loadLangs(array("main","bills","banks"));
$langs->load("bills");
$langs->load("banks");
// Object $form must de defined // Object $form must de defined

View File

@ -24,9 +24,8 @@ if (empty($langs) || ! is_object($langs))
exit; exit;
} }
// Load translation files required by the page
$langs->load("main"); $langs->loadLangs(array("main","bills"));
$langs->load("bills");
?> ?>

View File

@ -28,9 +28,8 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("other"); $langs->loadLangs(array("admin","other","website"));
$langs->load("website");
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -1003,8 +1003,8 @@ class FactureRec extends CommonInvoice
$error=0; $error=0;
$langs->load("bills"); // Load translation files required by the page
$langs->load('main'); $langs->loadLangs(array("main","bills"));
$nb_create=0; $nb_create=0;

View File

@ -30,15 +30,11 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array('banks', 'categories')); $langs->loadLangs(array('banks', 'categories','bills','withdrawals'));
if (!$user->rights->prelevement->bons->lire) if (!$user->rights->prelevement->bons->lire)
accessforbidden(); accessforbidden();
$langs->load("bills");
$langs->load("withdrawals");
// Security check // Security check
if ($user->societe_id > 0) accessforbidden(); if ($user->societe_id > 0) accessforbidden();

View File

@ -93,8 +93,8 @@ if ($time >= $_SESSION['auto_check_events_not_before'])
while ($obj = $db->fetch_object($resql)) while ($obj = $db->fetch_object($resql))
{ {
$langs->load("agenda"); // Load translation files required by the page
$langs->load("commercial"); $langs->loadLangs(array('agenda', 'commercial'));
$actionmod->fetch($obj->id); $actionmod->fetch($obj->id);

View File

@ -31,21 +31,21 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php";
*/ */
class box_task extends ModeleBoxes class box_task extends ModeleBoxes
{ {
var $boxcode="projet"; public $boxcode="projet";
var $boximg="object_projecttask"; public $boximg="object_projecttask";
var $boxlabel; public $boxlabel;
//var $depends = array("projet"); //public $depends = array("projet");
/** /**
* @var DoliDB Database handler. * @var DoliDB Database handler.
*/ */
public $db; public $db;
var $param;
var $enabled = 0; // Disabled because bugged.
var $info_box_head = array(); public $param;
var $info_box_contents = array(); public $enabled = 0; // Disabled because bugged.
public $info_box_head = array();
public $info_box_contents = array();
/** /**
@ -57,8 +57,10 @@ class box_task extends ModeleBoxes
function __construct($db,$param='') function __construct($db,$param='')
{ {
global $user, $langs; global $user, $langs;
$langs->load("boxes");
$langs->load("projects"); // Load translation files required by the page
$langs->loadLangs(array('boxes', 'projects'));
$this->boxlabel="Tasks"; $this->boxlabel="Tasks";
$this->db = $db; $this->db = $db;
@ -131,7 +133,7 @@ class box_task extends ModeleBoxes
} }
// Add the sum à the bottom of the boxes // Add the sum at the bottom of the boxes
$this->info_box_contents[$i][] = array('tr' => 'class="liste_total"', 'td' => '', 'text' => $langs->trans("Total")."&nbsp;".$textHead); $this->info_box_contents[$i][] = array('tr' => 'class="liste_total"', 'td' => '', 'text' => $langs->trans("Total")."&nbsp;".$textHead);
$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')."&nbsp;".$langs->trans("Tasks")); $this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')."&nbsp;".$langs->trans("Tasks"));
$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot,'all',25200,5)); $this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot,'all',25200,5));