loadLangs

This commit is contained in:
Alexandre SPANGARO 2018-05-19 08:06:52 +02:00
parent 1af4a857be
commit 0b581fc507
10 changed files with 32 additions and 47 deletions

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@zendsi.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

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2014-2017 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
*
@ -32,9 +32,7 @@ if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accoun
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
$langs->load("compta");
$langs->load("bills");
$langs->load("loan");
$langs->loadLangs(array("compta","bills","loan"));
$id=GETPOST('id','int');
$action=GETPOST('action','aZ09');
@ -308,7 +306,7 @@ if ($action == 'create')
$formproject=new FormProjets($db);
// Projet associe
$langs->load("projects");
$langs->loadLangs(array("projects"));
print '<tr><td>'.$langs->trans("Project").'</td><td>';
@ -444,7 +442,7 @@ if ($id > 0)
// Project
if (! empty($conf->projet->enabled))
{
$langs->load("projects");
$langs->loadLangs(array("projects"));
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
if ($user->rights->loan->write)
{

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -369,8 +369,7 @@ class Loan extends CommonObject
function LibStatut($statut,$mode=0,$alreadypaid=-1)
{
global $langs;
$langs->load('customers');
$langs->load('bills');
$langs->loadLangs(array("customers","bills"));
if ($mode == 0)
{

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2017 Franck Moreau <franck.moreau@theobald.com>
/* Copyright (C) 2017 Franck Moreau <franck.moreau@theobald.com>
* Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.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
@ -16,9 +17,9 @@
*/
/**
* \file htdocs/loan/createecheancier.php
* \ingroup loan
* \brief Schedule card
* \file htdocs/loan/createschedule.php
* \ingroup loan
* \brief Schedule card
*/
require '../main.inc.php';
@ -33,7 +34,7 @@ $action = GETPOST('action','aZ09');
$object = new Loan($db);
$object->fetch($loanid);
$langs->load('loan');
$langs->loadLangs(array("loan"));
if ($action == 'createecheancier') {

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
*
* 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
@ -32,11 +32,7 @@ if (! empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
}
$langs->load("other");
$langs->load("companies");
$langs->load("compta");
$langs->load("bills");
$langs->load("loan");
$langs->loadLangs(array("other","companies","compta","bills","loan"));
$id = GETPOST('id','int');
$action = GETPOST('action','aZ09');

View File

@ -1,8 +1,8 @@
<?php
/* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -27,10 +27,7 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
$langs->load("loan");
$langs->load("compta");
$langs->load("banks");
$langs->load("bills");
$langs->loadLangs(array("loan","compta","banks","bills"));
// Security check
$socid = GETPOST('socid', 'int');

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
*
* 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
@ -30,9 +30,7 @@ if (! empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
}
$langs->load("compta");
$langs->load("bills");
$langs->load("loan");
$langs->loadLangs(array("compta","bills","loan"));
$id=GETPOST('id','int');
$action=GETPOST('action','aZ09');

View File

@ -4,8 +4,8 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
*
* 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
@ -36,7 +36,7 @@ if (! empty($conf->projet->enabled)) {
$action = GETPOST('action','aZ09');
$langs->load('loan');
$langs->loadLangs(array("loan"));
// Security check
$id = GETPOST('id','int');
@ -82,7 +82,7 @@ if ($id > 0)
$morehtmlref.=$form->editfieldval("Label", 'label', $object->label, $object, 0, 'string', '', null, null, '', 1);
// Project
if (! empty($conf->projet->enabled)) {
$langs->load("projects");
$langs->loadLangs(array("projects"));
$morehtmlref .= '<br>' . $langs->trans('Project') . ' : ';
if ($user->rights->loan->write) {
//if ($action != 'classify')

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.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
@ -26,10 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.php';
if (! empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$langs->load('bills');
$langs->load('banks');
$langs->load('companies');
$langs->load('loan');
$langs->loadLangs(array("bills","banks","companies","loan"));
// Security check
$id=GETPOST("id",'int');

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -27,8 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$langs->load("bills");
$langs->load("loan");
$langs->loadLangs(array("bills","loan"));
$chid=GETPOST('id','int');
$action=GETPOST('action','aZ09');