2
0
forked from Wavyzz/dolibarr

Merge remote-tracking branch 'upstream/develop' into 11.0_fa_icon

This commit is contained in:
Alexandre SPANGARO
2019-09-28 06:09:40 +02:00
216 changed files with 2445 additions and 733 deletions

View File

@@ -74,6 +74,7 @@ If you don't have time to install it yourself, you can try some commercial 'read
## UPGRADING ## UPGRADING
- At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package. - Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
- At first next access, Dolibarr will redirect your to the "install/" page to follow the upgrade process. - At first next access, Dolibarr will redirect your to the "install/" page to follow the upgrade process.
 If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").  If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
@@ -90,18 +91,19 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
### Main application/modules (all optional) ### Main application/modules (all optional)
- Customers, Prospects and/or Suppliers directory - Customers, Prospects (Leads) and/or Suppliers directory
- Products and/or Services catalog - Products and/or Services catalog
- Commercial proposals management - Commercial proposals management
- Customer and Supplier Orders management - Customer and Supplier Orders management
- Invoices and payment management - Invoices and payment management
- Standing orders management (European SEPA) - Standing orders management (European SEPA)
- Bank accounts management - Bank accounts management
- Accounting management
- Shared calendar/agenda (with ical and vcal export for third party tools integration) - Shared calendar/agenda (with ical and vcal export for third party tools integration)
- Opportunities and/or project management - Opportunities and/or project management
- Projects management - Projects management
- Contracts management - Contracts management
- Stock management - Warehouse/Stock management
- Shipping management - Shipping management
- Interventions management - Interventions management
- Employee's leave requests management - Employee's leave requests management
@@ -111,7 +113,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Foundations members management - Foundations members management
- Mass emailing - Mass emailing
- Surveys - Surveys
- Point of Sale - Point of Sale (POS)
- -
### Other application/modules ### Other application/modules
@@ -131,15 +133,15 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
### Other general features ### Other general features
- Localization in most major languages. - Localization in most major languages
- Multi-Users and groups with finely grained rights. - Multi-Users and groups with finely grained rights
- Multi-currency. - Multi-currency
- Multi-company by adding of an external module. - Multi-company by adding of an external module
- Very user friendly and easy to use. - Very user friendly and easy to use
- customizable Dashboard
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one) - Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites. - APIs
- APIs.
- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture) - An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
- Support a lot of country specific features: - Support a lot of country specific features:
- Spanish Tax RE and ISPF - Spanish Tax RE and ISPF
@@ -153,6 +155,12 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- PDF or ODT generation for invoice, proposals, orders... - PDF or ODT generation for invoice, proposals, orders...
- -
### System Environment / Requirements
- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
### Extending ### Extending
Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com). Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).

View File

@@ -23,3 +23,6 @@ The URL to go to the Dolibarr is :
The URL to go to PhpMyAdmin is (login/password is root/root) : The URL to go to PhpMyAdmin is (login/password is root/root) :
http://0.0.0.0:8080 http://0.0.0.0:8080
Setup the database connection during the installation process, please use mariad
b (name of the database container) as database host.

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 991 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -50,7 +50,7 @@ fi
# ----------------------------- if no params on command line # ----------------------------- if no params on command line
if [ "x$passwd" = "x" ] if [ "x$passwd" = "x" ]
then then
export dumpfile=`ls $mydir/mysqldump_dolibarr_*.sql | sort | tail -n 1` export dumpfile=`ls -v $mydir/mysqldump_dolibarr_*.sql | tail -n 1`
export dumpfile=`basename $dumpfile` export dumpfile=`basename $dumpfile`
# ----------------------------- input file # ----------------------------- input file

File diff suppressed because one or more lines are too long

View File

@@ -38,7 +38,7 @@ passwd=$5;
# ----------------------------- if no params on command line # ----------------------------- if no params on command line
if [ "x$passwd" = "x" ] if [ "x$passwd" = "x" ]
then then
export dumpfile=`ls $mydir/mysqldump_dolibarr_*.sql | sort | tail -n 1` export dumpfile=`ls -v $mydir/mysqldump_dolibarr_*.sql | tail -n 1`
export dumpfile=`basename $dumpfile` export dumpfile=`basename $dumpfile`
# ----------------------------- input file # ----------------------------- input file

View File

@@ -79,7 +79,7 @@ if ($action == 'updateall')
} }
} }
// Action mise a jour ou ajout d'une constante // Action to update or add a constant
if ($action == 'update' || $action == 'add') if ($action == 'update' || $action == 'add')
{ {
$constname=GETPOST('constname', 'alpha'); $constname=GETPOST('constname', 'alpha');
@@ -108,7 +108,7 @@ if ($action == 'update' || $action == 'add')
} }
} }
// Action activation d'un sous module du module adherent // Action to enable of a submodule of the adherent module
if ($action == 'set') if ($action == 'set')
{ {
$result=dolibarr_set_const($db, GETPOST('name', 'alpha'), GETPOST('value'), '', 0, '', $conf->entity); $result=dolibarr_set_const($db, GETPOST('name', 'alpha'), GETPOST('value'), '', 0, '', $conf->entity);
@@ -118,7 +118,7 @@ if ($action == 'set')
} }
} }
// Action desactivation d'un sous module du module adherent // Action to disable a submodule of the adherent module
if ($action == 'unset') if ($action == 'unset')
{ {
$result=dolibarr_del_const($db, GETPOST('name', 'alpha'), $conf->entity); $result=dolibarr_del_const($db, GETPOST('name', 'alpha'), $conf->entity);
@@ -220,9 +220,9 @@ if ($conf->facture->enabled)
print '</table>'; print '</table>';
print '<center>'; print '<div class="center">';
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">'; print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
print '</center>'; print '</div>';
print '</form>'; print '</form>';
@@ -230,7 +230,7 @@ print '<br>';
/* /*
* Edition info modele document * Edit info of model document
*/ */
$constantes=array( $constantes=array(
'ADHERENT_CARD_TYPE', 'ADHERENT_CARD_TYPE',
@@ -254,7 +254,7 @@ print '<br>';
/* /*
* Edition info modele document * Edit info of model document
*/ */
$constantes=array('ADHERENT_ETIQUETTE_TYPE','ADHERENT_ETIQUETTE_TEXT'); $constantes=array('ADHERENT_ETIQUETTE_TYPE','ADHERENT_ETIQUETTE_TEXT');

View File

@@ -82,7 +82,7 @@ if ($action == 'updateall')
} }
} }
// Action mise a jour ou ajout d'une constante // Action to update or add a constant
if ($action == 'update' || $action == 'add') if ($action == 'update' || $action == 'add')
{ {
$constlineid = GETPOST('rowid', 'int'); $constlineid = GETPOST('rowid', 'int');
@@ -108,7 +108,7 @@ if ($action == 'update' || $action == 'add')
} }
} }
// Action activation d'un sous module du module adherent // Action to enable a submodule of the adherent module
if ($action == 'set') if ($action == 'set')
{ {
$result=dolibarr_set_const($db, GETPOST('name', 'alpha'), GETPOST('value'), '', 0, '', $conf->entity); $result=dolibarr_set_const($db, GETPOST('name', 'alpha'), GETPOST('value'), '', 0, '', $conf->entity);
@@ -118,7 +118,7 @@ if ($action == 'set')
} }
} }
// Action desactivation d'un sous module du module adherent // Action to disable a submodule of the adherent module
if ($action == 'unset') if ($action == 'unset')
{ {
$result=dolibarr_del_const($db, GETPOST('name', 'alpha'), $conf->entity); $result=dolibarr_del_const($db, GETPOST('name', 'alpha'), $conf->entity);

View File

@@ -22,7 +22,6 @@
* \file htdocs/adherents/admin/website.php * \file htdocs/adherents/admin/website.php
* \ingroup member * \ingroup member
* \brief File of main public page for member module * \brief File of main public page for member module
* \author Laurent Destailleur
*/ */
require '../../main.inc.php'; require '../../main.inc.php';
@@ -211,9 +210,9 @@ if (! empty($conf->global->MEMBER_ENABLE_PUBLIC))
print '</table>'; print '</table>';
print '<center>'; print '<div class="center">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print '</center>'; print '</div>';
} }

View File

@@ -19,11 +19,11 @@
/** /**
* \file htdocs/adherents/canvas/actions_adherentcard_common.class.php * \file htdocs/adherents/canvas/actions_adherentcard_common.class.php
* \ingroup adherent * \ingroup adherent
* \brief Fichier de la classe Adherent card controller (common) * \brief File of class Thirdparty member card controller (common)
*/ */
/** /**
* Class to maage members using default canvas * Class to manage members using default canvas
*/ */
abstract class ActionsAdherentCardCommon abstract class ActionsAdherentCardCommon
{ {
@@ -170,7 +170,6 @@ abstract class ActionsAdherentCardCommon
$this->tpl['nb_emailing'] = $this->object->getNbOfEMailings(); $this->tpl['nb_emailing'] = $this->object->getNbOfEMailings();
} }
// Dolibarr user // Dolibarr user
if ($this->object->user_id) if ($this->object->user_id)
{ {

View File

@@ -638,7 +638,7 @@ if (empty($reshook))
// Set output language // Set output language
$outputlangs = new Translate('', $conf); $outputlangs = new Translate('', $conf);
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
// Load traductions files requiredby by page // Load traductions files required by page
$outputlangs->loadLangs(array("main", "members")); $outputlangs->loadLangs(array("main", "members"));
// Get email content from template // Get email content from template
$arraydefaultmessage=null; $arraydefaultmessage=null;
@@ -719,7 +719,7 @@ if (empty($reshook))
// Set output language // Set output language
$outputlangs = new Translate('', $conf); $outputlangs = new Translate('', $conf);
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
// Load traductions files requiredby by page // Load traductions files required by page
$outputlangs->loadLangs(array("main", "members")); $outputlangs->loadLangs(array("main", "members"));
// Get email content from template // Get email content from template
$arraydefaultmessage=null; $arraydefaultmessage=null;
@@ -1483,7 +1483,7 @@ else
// Set output language // Set output language
$outputlangs = new Translate('', $conf); $outputlangs = new Translate('', $conf);
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
// Load traductions files requiredby by page // Load traductions files required by page
$outputlangs->loadLangs(array("main", "members")); $outputlangs->loadLangs(array("main", "members"));
// Get email content from template // Get email content from template
$arraydefaultmessage=null; $arraydefaultmessage=null;
@@ -1544,7 +1544,7 @@ else
// Set output language // Set output language
$outputlangs = new Translate('', $conf); $outputlangs = new Translate('', $conf);
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
// Load traductions files requiredby by page // Load traductions files required by page
$outputlangs->loadLangs(array("main", "members")); $outputlangs->loadLangs(array("main", "members"));
// Get email content from template // Get email content from template
$arraydefaultmessage=null; $arraydefaultmessage=null;

View File

@@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/printsheet/modules_labels.php';
$langs->loadLangs(array("members","errors")); $langs->loadLangs(array("members","errors"));
// Choix de l'annee d'impression ou annee courante. // Choice of printing year or current year.
$now = dol_now(); $now = dol_now();
$year=dol_print_date($now, '%Y'); $year=dol_print_date($now, '%Y');
$month=dol_print_date($now, '%m'); $month=dol_print_date($now, '%m');
@@ -47,7 +47,7 @@ $adherentstatic=new Adherent($db);
$object=new Adherent($db); $object=new Adherent($db);
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
// fetch optionals attributes and labels // Fetch optionals attributes and labels
$extralabels = $extrafields->fetch_name_optionals_label('adherent'); $extralabels = $extrafields->fetch_name_optionals_label('adherent');
@@ -97,7 +97,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
$adherentstatic->lastname=$objp->lastname; $adherentstatic->lastname=$objp->lastname;
$adherentstatic->firstname=$objp->firstname; $adherentstatic->firstname=$objp->firstname;
// format extrafiled so they can be parsed in function complete_substitutions_array // Format extrafield so they can be parsed in function complete_substitutions_array
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']))
{ {
$adherentstatic->array_options = array(); $adherentstatic->array_options = array();

View File

@@ -2688,12 +2688,12 @@ class Adherent extends CommonObject
// Process // Process
foreach ($to_del as $del) { foreach ($to_del as $del) {
if ($c->fetch($del) > 0) { if ($c->fetch($del) > 0) {
$c->del_type($this, 'member'); $c->del_type($this, Categorie::TYPE_MEMBER);
} }
} }
foreach ($to_add as $add) { foreach ($to_add as $add) {
if ($c->fetch($add) > 0) { if ($c->fetch($add) > 0) {
$c->add_type($this, 'member'); $c->add_type($this, Categorie::TYPE_MEMBER);
} }
} }

View File

@@ -83,7 +83,7 @@ class AdherentStats extends Stats
* Return the number of proposition by month for a given year * Return the number of proposition by month for a given year
* *
* @param int $year Year * @param int $year Year
* @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array Array of nb each month * @return array Array of nb each month
*/ */
public function getNbByMonth($year, $format = 0) public function getNbByMonth($year, $format = 0)
@@ -124,7 +124,7 @@ class AdherentStats extends Stats
* Return the number of subscriptions by month for a given year * Return the number of subscriptions by month for a given year
* *
* @param int $year Year * @param int $year Year
* @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array Array of amount each month * @return array Array of amount each month
*/ */
public function getAmountByMonth($year, $format = 0) public function getAmountByMonth($year, $format = 0)

View File

@@ -20,8 +20,7 @@
/** /**
* \file htdocs/adherents/htpasswd.php * \file htdocs/adherents/htpasswd.php
* \ingroup member * \ingroup member
* \brief Page d'export htpasswd du fichier des adherents * \brief Export page htpasswd of the membership file
* \author Rodolphe Quiedeville
*/ */
require '../main.inc.php'; require '../main.inc.php';

View File

@@ -360,7 +360,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
// Set output language // Set output language
$outputlangs = new Translate('', $conf); $outputlangs = new Translate('', $conf);
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
// Load traductions files requiredby by page // Load traductions files required by page
$outputlangs->loadLangs(array("main", "members")); $outputlangs->loadLangs(array("main", "members"));
// Get email content from template // Get email content from template
@@ -1093,7 +1093,7 @@ if ($rowid > 0)
// Set output language // Set output language
$outputlangs = new Translate('', $conf); $outputlangs = new Translate('', $conf);
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
// Load traductions files requiredby by page // Load traductions files required by page
$outputlangs->loadLangs(array("main", "members")); $outputlangs->loadLangs(array("main", "members"));
// Get email content from template // Get email content from template
$arraydefaultmessage=null; $arraydefaultmessage=null;

View File

@@ -68,7 +68,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include,
if ($user->rights->adherent->cotisation->creer && $action == 'update' && ! $cancel) if ($user->rights->adherent->cotisation->creer && $action == 'update' && ! $cancel)
{ {
// Charge objet actuel // Load current object
$result=$object->fetch($rowid); $result=$object->fetch($rowid);
if ($result > 0) if ($result > 0)
{ {
@@ -101,7 +101,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'update' && ! $canc
if (! $errmsg) if (! $errmsg)
{ {
// Modifie valeures // Modify values
$object->dateh=dol_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']); $object->dateh=dol_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']);
$object->datef=dol_mktime($_POST['datesubendhour'], $_POST['datesubendmin'], 0, $_POST['datesubendmonth'], $_POST['datesubendday'], $_POST['datesubendyear']); $object->datef=dol_mktime($_POST['datesubendhour'], $_POST['datesubendmin'], 0, $_POST['datesubendmonth'], $_POST['datesubendday'], $_POST['datesubendyear']);
$object->fk_type=$_POST["typeid"]; $object->fk_type=$_POST["typeid"];
@@ -389,7 +389,7 @@ if ($rowid && $action != 'edit')
} }
} }
// Supprimer // Delete
if ($user->rights->adherent->cotisation->creer) if ($user->rights->adherent->cotisation->creer)
{ {
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"]."?rowid=".$object->id."&action=delete\">".$langs->trans("Delete")."</a></div>\n"; print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"]."?rowid=".$object->id."&action=delete\">".$langs->trans("Delete")."</a></div>\n";

View File

@@ -112,56 +112,56 @@ if ($action == 'edit' || $action == 'updateedit')
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n"; print '<tr class="oddeven liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
// Name // Name
print '<tr class="oddeven"><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>'; print '<tr><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
print '<input name="nom" id="name" class="minwidth200" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_NAME?$conf->global->MAIN_INFO_ACCOUNTANT_NAME: GETPOST("nom", 'nohtml')) . '" autofocus="autofocus"></td></tr>'."\n"; print '<input name="nom" id="name" class="minwidth200" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_NAME?$conf->global->MAIN_INFO_ACCOUNTANT_NAME: GETPOST("nom", 'nohtml')) . '" autofocus="autofocus"></td></tr>'."\n";
// Address // Address
print '<tr class="oddeven"><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>'; print '<tr><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>';
print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'. ($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS?$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS: GETPOST("address", 'nohtml')) . '</textarea></td></tr>'."\n"; print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'. ($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS?$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS: GETPOST("address", 'nohtml')) . '</textarea></td></tr>'."\n";
print '<tr class="oddeven"><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>'; print '<tr><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
print '<input class="minwidth100" name="zipcode" id="zipcode" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_ZIP?$conf->global->MAIN_INFO_ACCOUNTANT_ZIP: GETPOST("zipcode", 'alpha')) . '"></td></tr>'."\n"; print '<input class="minwidth100" name="zipcode" id="zipcode" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_ZIP?$conf->global->MAIN_INFO_ACCOUNTANT_ZIP: GETPOST("zipcode", 'alpha')) . '"></td></tr>'."\n";
print '<tr class="oddeven"><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>'; print '<tr><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
print '<input name="town" class="minwidth100" id="town" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_TOWN?$conf->global->MAIN_INFO_ACCOUNTANT_TOWN: GETPOST("town", 'nohtml')) . '"></td></tr>'."\n"; print '<input name="town" class="minwidth100" id="town" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_TOWN?$conf->global->MAIN_INFO_ACCOUNTANT_TOWN: GETPOST("town", 'nohtml')) . '"></td></tr>'."\n";
// Country // Country
print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">'; print '<tr><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization
print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id'); print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>'."\n"; print '</td></tr>'."\n";
print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">'; print '<tr><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
$formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id'); $formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id');
print '</td></tr>'."\n"; print '</td></tr>'."\n";
print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>'; print '<tr><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
print '<input name="tel" id="phone" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_PHONE . '"></td></tr>'; print '<input name="tel" id="phone" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_PHONE . '"></td></tr>';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>'; print '<tr><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
print '<input name="fax" id="fax" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_FAX . '"></td></tr>'; print '<input name="fax" id="fax" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_FAX . '"></td></tr>';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>'; print '<tr><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
print '<input name="mail" id="email" class="minwidth200" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_MAIL . '"></td></tr>'; print '<input name="mail" id="email" class="minwidth200" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_MAIL . '"></td></tr>';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
// Web // Web
print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>'; print '<tr><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
print '<input name="web" id="web" class="minwidth300" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_WEB . '"></td></tr>'; print '<input name="web" id="web" class="minwidth300" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_WEB . '"></td></tr>';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
// Code // Code
print '<tr class="oddeven"><td><label for="code">'.$langs->trans("AccountantFileNumber").'</label></td><td>'; print '<tr><td><label for="code">'.$langs->trans("AccountantFileNumber").'</label></td><td>';
print '<input name="code" id="code" class="minwidth100" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_CODE?$conf->global->MAIN_INFO_ACCOUNTANT_CODE: GETPOST("code", 'nohtml')) . '" autofocus="autofocus"></td></tr>'."\n"; print '<input name="code" id="code" class="minwidth100" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_CODE?$conf->global->MAIN_INFO_ACCOUNTANT_CODE: GETPOST("code", 'nohtml')) . '" autofocus="autofocus"></td></tr>'."\n";
// Note // Note
print '<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>'; print '<tr><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOST('note', 'none') ? GETPOST('note', 'none') : $conf->global->MAIN_INFO_ACCOUNTANT_NOTE).'</textarea></td></tr>'; print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOST('note', 'none') ? GETPOST('note', 'none') : $conf->global->MAIN_INFO_ACCOUNTANT_NOTE).'</textarea></td></tr>';
print '</td></tr>'; print '</td></tr>';
@@ -189,24 +189,24 @@ else
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td>'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>'; print '<tr class="oddeven liste_titre"><td>'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>';
print '<tr class="oddeven"><td class="titlefield wordbreak">'.$langs->trans("CompanyName").'</td><td>'; print '<tr><td class="titlefield wordbreak">'.$langs->trans("CompanyName").'</td><td>';
print $conf->global->MAIN_INFO_ACCOUNTANT_NAME; print $conf->global->MAIN_INFO_ACCOUNTANT_NAME;
print '</td></tr>'; print '</td></tr>';
print '<tr class="oddeven"><td>'.$langs->trans("CompanyAddress").'</td><td>' . nl2br(empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) . '</td></tr>'; print '<tr><td>'.$langs->trans("CompanyAddress").'</td><td>' . nl2br(empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) . '</td></tr>';
print '<tr class="oddeven"><td>'.$langs->trans("CompanyZip").'</td><td>' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ZIP) . '</td></tr>'; print '<tr><td>'.$langs->trans("CompanyZip").'</td><td>' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ZIP) . '</td></tr>';
print '<tr class="oddeven"><td>'.$langs->trans("CompanyTown").'</td><td>' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN)?'':$conf->global->MAIN_INFO_ACCOUNTANT_TOWN) . '</td></tr>'; print '<tr><td>'.$langs->trans("CompanyTown").'</td><td>' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN)?'':$conf->global->MAIN_INFO_ACCOUNTANT_TOWN) . '</td></tr>';
print '<tr class="oddeven"><td>'.$langs->trans("CompanyCountry").'</td><td>'; print '<tr><td>'.$langs->trans("CompanyCountry").'</td><td>';
if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY)) if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY))
{ {
$code = getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 2); $code = getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 2);
@@ -217,23 +217,23 @@ else
print '</td></tr>'; print '</td></tr>';
if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print '<tr class="oddeven"><td>'.$langs->trans("Region-State").'</td><td>'; if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print '<tr><td>'.$langs->trans("Region-State").'</td><td>';
else print '<tr class="oddeven"><td>'.$langs->trans("State").'</td><td>'; else print '<tr><td>'.$langs->trans("State").'</td><td>';
if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE)) print getState($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_SHOW_STATE_CODE, 0, $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT); if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE)) print getState($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_SHOW_STATE_CODE, 0, $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT);
else print '&nbsp;'; else print '&nbsp;';
print '</td></tr>'; print '</td></tr>';
print '<tr class="oddeven"><td>'.$langs->trans("Phone").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_PHONE, $mysoc->country_code) . '</td></tr>'; print '<tr><td>'.$langs->trans("Phone").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_PHONE, $mysoc->country_code) . '</td></tr>';
print '<tr class="oddeven"><td>'.$langs->trans("Fax").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_FAX, $mysoc->country_code) . '</td></tr>'; print '<tr><td>'.$langs->trans("Fax").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_FAX, $mysoc->country_code) . '</td></tr>';
print '<tr class="oddeven"><td>'.$langs->trans("Mail").'</td><td>' . dol_print_email($conf->global->MAIN_INFO_ACCOUNTANT_MAIL, 0, 0, 0, 80) . '</td></tr>'; print '<tr><td>'.$langs->trans("Mail").'</td><td>' . dol_print_email($conf->global->MAIN_INFO_ACCOUNTANT_MAIL, 0, 0, 0, 80) . '</td></tr>';
print '<tr class="oddeven"><td>'.$langs->trans("Web").'</td><td>' . dol_print_url($conf->global->MAIN_INFO_ACCOUNTANT_WEB, '_blank', 80) . '</td></tr>'; print '<tr><td>'.$langs->trans("Web").'</td><td>' . dol_print_url($conf->global->MAIN_INFO_ACCOUNTANT_WEB, '_blank', 80) . '</td></tr>';
print '<tr class="oddeven"><td>'.$langs->trans("AccountantFileNumber").'</td><td>' . $conf->global->MAIN_INFO_ACCOUNTANT_CODE . '</td></tr>'; print '<tr><td>'.$langs->trans("AccountantFileNumber").'</td><td>' . $conf->global->MAIN_INFO_ACCOUNTANT_CODE . '</td></tr>';
print '<tr class="oddeven"><td class="tdtop">'.$langs->trans("Note").'</td><td>' . (! empty($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) ? nl2br($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) : '') . '</td></tr>'; print '<tr><td class="tdtop">'.$langs->trans("Note").'</td><td>' . (! empty($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) ? nl2br($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) : '') . '</td></tr>';
print '</table>'; print '</table>';
print "</div>"; print "</div>";

View File

@@ -148,8 +148,8 @@ elseif ($action == 'setdoc')
{ {
if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity))
{ {
// La constante qui a ete lue en avant du nouveau set // The constant that has been read in front of the new set
// on passe donc par une variable pour avoir un affichage coherent // is therefore passed through a variable to have a coherent display
$conf->global->ACTION_EVENT_ADDON_PDF = $value; $conf->global->ACTION_EVENT_ADDON_PDF = $value;
} }

View File

@@ -49,7 +49,7 @@ $type = 'bankaccount';
* Actions * Actions
*/ */
//Order display of bank account // Order display of bank account
if ($action == 'setbankorder') { if ($action == 'setbankorder') {
if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity) > 0) if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity) > 0)
{ {

View File

@@ -63,7 +63,7 @@ if ($action == 'add') {
{ {
$pos = $boxid['pos']; $pos = $boxid['pos'];
// Initialize distinct fkuser with all already existing values of fk_user (user that use a personalized view of boxes for page "pos") // Initialize distinct fk_user with all already existing values of fk_user (user that use a personalized view of boxes for page "pos")
$distinctfkuser=array(); $distinctfkuser=array();
if (! $error) if (! $error)
{ {
@@ -225,8 +225,8 @@ print load_fiche_titre($langs->trans("Boxes"), '', 'title_setup');
print $langs->trans("BoxesDesc")." ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n"; print $langs->trans("BoxesDesc")." ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n";
/* /*
* Recherche des boites actives par defaut pour chaque position possible * Search for the default active boxes for each possible position
* On stocke les boites actives par defaut dans $boxes[position][id_boite]=1 * We store the active boxes by default in $boxes[position][id_boite]=1
*/ */
$actives = array(); $actives = array();
@@ -257,7 +257,7 @@ if ($resql)
array_push($actives, $obj->box_id); array_push($actives, $obj->box_id);
if ($obj->box_order == '' || $obj->box_order == '0' || $decalage) $decalage++; if ($obj->box_order == '' || $obj->box_order == '0' || $decalage) $decalage++;
// On renumerote l'ordre des boites si l'une d'elle est a '' // We renumber the order of the boxes if one of them is in ''
// This occurs just after an insert. // This occurs just after an insert.
if ($decalage) if ($decalage)
{ {
@@ -268,7 +268,7 @@ if ($resql)
if ($decalage) if ($decalage)
{ {
// Si on a renumerote, on corrige champ box_order // If we have renumbered, we correct the field box_order
// This occurs just after an insert. // This occurs just after an insert.
$sql = "SELECT box_order"; $sql = "SELECT box_order";
$sql.= " FROM ".MAIN_DB_PREFIX."boxes"; $sql.= " FROM ".MAIN_DB_PREFIX."boxes";
@@ -366,7 +366,7 @@ foreach($boxtoadd as $box)
print '</td>'."\n"; print '</td>'."\n";
print '<td>' . $box->sourcefile . '</td>'."\n"; print '<td>' . $box->sourcefile . '</td>'."\n";
// Pour chaque position possible, on affiche un lien d'activation si boite non deja active pour cette position // For each possible position, an activation link is displayed if the box is not already active for that position
print '<td class="center">'; print '<td class="center">';
print $form->selectarray("boxid[".$box->box_id."][pos]", $pos_name, 0, 1, 0, 0, '', 1)."\n"; print $form->selectarray("boxid[".$box->box_id."][pos]", $pos_name, 0, 1, 0, 0, '', 1)."\n";
print '<input type="hidden" name="boxid['.$box->box_id.'][value]" value="'.$box->box_id.'">'."\n"; print '<input type="hidden" name="boxid['.$box->box_id.'][value]" value="'.$box->box_id.'">'."\n";
@@ -483,7 +483,9 @@ if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIV
print '</table>'; print '</table>';
print '<br>';
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'" name="Button"></div>'; print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'" name="Button"></div>';
print '<br>';
print '</form>'; print '</form>';
print "\n".'<!-- End Other Const -->'."\n"; print "\n".'<!-- End Other Const -->'."\n";

View File

@@ -91,7 +91,7 @@ if ($action == 'set_BANK_CHEQUERECEIPT_FREE_TEXT')
} }
/* /*
* view * View
*/ */
$dirmodels=array_merge(array('/'), (array) $conf->modules_parts['models']); $dirmodels=array_merge(array('/'), (array) $conf->modules_parts['models']);
@@ -233,7 +233,6 @@ print '<br>';
/* /*
* Other options * Other options
*
*/ */
print load_fiche_titre($langs->trans("OtherOptions"), '', ''); print load_fiche_titre($langs->trans("OtherOptions"), '', '');

View File

@@ -222,7 +222,7 @@ if ($action == 'edit')
else else
{ {
/* /*
* Affichage des parametres * Show parameters
*/ */
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';

View File

@@ -251,7 +251,7 @@ $tabsqlsort[35]="c.label ASC";
$tabsqlsort[36]="r.fk_c_exp_tax_cat ASC, r.range_ik ASC"; $tabsqlsort[36]="r.fk_c_exp_tax_cat ASC, r.range_ik ASC";
$tabsqlsort[37]="r.unit_type ASC, r.scale ASC, r.code ASC"; $tabsqlsort[37]="r.unit_type ASC, r.scale ASC, r.code ASC";
// Nom des champs en resultat de select pour affichage du dictionnaire // Field names in select result for dictionary display
$tabfield=array(); $tabfield=array();
$tabfield[1] = "code,libelle,country"; $tabfield[1] = "code,libelle,country";
$tabfield[2] = "code,libelle,region_id,region,country"; // "code,libelle,region,country_code-country" $tabfield[2] = "code,libelle,region_id,region,country"; // "code,libelle,region,country_code-country"
@@ -291,7 +291,7 @@ $tabfield[35]= "label";
$tabfield[36]= "range_ik,fk_c_exp_tax_cat"; $tabfield[36]= "range_ik,fk_c_exp_tax_cat";
$tabfield[37]= "code,label,short_label,unit_type,scale"; $tabfield[37]= "code,label,short_label,unit_type,scale";
// Nom des champs d'edition pour modification d'un enregistrement // Edit field names for editing a record
$tabfieldvalue=array(); $tabfieldvalue=array();
$tabfieldvalue[1] = "code,libelle,country"; $tabfieldvalue[1] = "code,libelle,country";
$tabfieldvalue[2] = "code,libelle,region"; // "code,libelle,region" $tabfieldvalue[2] = "code,libelle,region"; // "code,libelle,region"
@@ -331,7 +331,7 @@ $tabfieldvalue[35]= "label";
$tabfieldvalue[36]= "range_ik,fk_c_exp_tax_cat"; $tabfieldvalue[36]= "range_ik,fk_c_exp_tax_cat";
$tabfieldvalue[37]= "code,label,short_label,unit_type,scale"; $tabfieldvalue[37]= "code,label,short_label,unit_type,scale";
// Nom des champs dans la table pour insertion d'un enregistrement // Field names in the table for inserting a record
$tabfieldinsert=array(); $tabfieldinsert=array();
$tabfieldinsert[1] = "code,libelle,fk_pays"; $tabfieldinsert[1] = "code,libelle,fk_pays";
$tabfieldinsert[2] = "code_departement,nom,fk_region"; $tabfieldinsert[2] = "code_departement,nom,fk_region";
@@ -979,7 +979,7 @@ if ($sortfield) $paramwithsearch.= '&sortfield='.urlencode($sortfield);
if (GETPOST('from')) $paramwithsearch.= '&from='.urlencode(GETPOST('from', 'alpha')); if (GETPOST('from')) $paramwithsearch.= '&from='.urlencode(GETPOST('from', 'alpha'));
// Confirmation de la suppression de la ligne // Confirmation of the deletion of the line
if ($action == 'delete') if ($action == 'delete')
{ {
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'rowid='.urlencode($rowid).'&code='.urlencode($code).$paramwithsearch, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1); print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'rowid='.urlencode($rowid).'&code='.urlencode($code).$paramwithsearch, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
@@ -991,7 +991,7 @@ if ($action == 'delete')
*/ */
if ($id) if ($id)
{ {
// Complete requete recherche valeurs avec critere de tri // Complete search values request with sort criteria
$sql=$tabsql[$id]; $sql=$tabsql[$id];
if (! preg_match('/ WHERE /', $sql)) $sql.= " WHERE 1 = 1"; if (! preg_match('/ WHERE /', $sql)) $sql.= " WHERE 1 = 1";
@@ -1283,8 +1283,8 @@ if ($id)
{ {
if ($fieldlist[$field] == 'entity') continue; if ($fieldlist[$field] == 'entity') continue;
// Determine le nom du champ par rapport aux noms possibles // Determines the name of the field in relation to the possible names
// dans les dictionnaires de donnees // in data dictionaries
$showfield=1; // By defaut $showfield=1; // By defaut
$align="left"; $align="left";
$cssprefix=''; $cssprefix='';
@@ -1850,14 +1850,14 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang'); print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang');
print '</td>'; print '</td>';
} }
// Le type de l'element (pour les type de contact) // The type of the element (for contact types)
elseif ($fieldlist[$field] == 'element') elseif ($fieldlist[$field] == 'element')
{ {
print '<td>'; print '<td>';
print $form->selectarray('element', $elementList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); print $form->selectarray('element', $elementList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
print '</td>'; print '</td>';
} }
// La source de l'element (pour les type de contact) // The source of the element (for contact types)
elseif ($fieldlist[$field] == 'source') elseif ($fieldlist[$field] == 'source')
{ {
print '<td>'; print '<td>';

View File

@@ -36,7 +36,7 @@ include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php';
if (!$user->admin) accessforbidden(); if (!$user->admin) accessforbidden();
if (empty($conf->emailcollector->enabled)) accessforbidden(); if (empty($conf->emailcollector->enabled)) accessforbidden();
// Load traductions files requiredby by page // Load traductions files required by page
$langs->loadLangs(array("admin", "mails", "other")); $langs->loadLangs(array("admin", "mails", "other"));
// Get parameters // Get parameters

View File

@@ -34,7 +34,7 @@ dol_include_once('/emailcollector/class/emailcollector.class.php');
if (!$user->admin) accessforbidden(); if (!$user->admin) accessforbidden();
if (empty($conf->emailcollector->enabled)) accessforbidden(); if (empty($conf->emailcollector->enabled)) accessforbidden();
// Load traductions files requiredby by page // Load traductions files required by page
$langs->loadLangs(array("admin", "other")); $langs->loadLangs(array("admin", "other"));
$action = GETPOST('action', 'aZ09')?GETPOST('action', 'aZ09'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $action = GETPOST('action', 'aZ09')?GETPOST('action', 'aZ09'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...

View File

@@ -496,7 +496,7 @@ else
} }
print '</td></tr>'."\n"; print '</td></tr>'."\n";
//Use draft Watermark // Use draft Watermark
print '<tr class="oddeven"><td colspan="2">'; print '<tr class="oddeven"><td colspan="2">';
print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>'; print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';

View File

@@ -432,11 +432,13 @@ if ($action == 'edit') // Edit
print '</table>'."\n"; print '</table>'."\n";
print '<br><div class="center">'; print '<br>';
print '<div class="center">';
print '<input class="button" type="submit" name="submit" value="'.$langs->trans("Save").'">'; print '<input class="button" type="submit" name="submit" value="'.$langs->trans("Save").'">';
print ' &nbsp; '; print '&nbsp;&nbsp;&nbsp;';
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">'; print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</div>'; print '</div>';
print '<br>';
print '</form>'; print '</form>';
} }

View File

@@ -102,7 +102,7 @@ if ($action == 'edit')
clearstatcache(); clearstatcache();
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td></tr>';
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
@@ -110,23 +110,25 @@ if ($action == 'edit')
print '</td><td><input class="flat" name="MAIN_MAX_DECIMALS_UNIT" size="3" value="' . $conf->global->MAIN_MAX_DECIMALS_UNIT . '"></td></tr>'; print '</td><td><input class="flat" name="MAIN_MAX_DECIMALS_UNIT" size="3" value="' . $conf->global->MAIN_MAX_DECIMALS_UNIT . '"></td></tr>';
print '<tr class="oddeven"><td>'; print '<tr><td>';
print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"), $langs->trans("ParameterActiveForNextInputOnly")); print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"), $langs->trans("ParameterActiveForNextInputOnly"));
print '</td><td><input class="flat" name="MAIN_MAX_DECIMALS_TOT" size="3" value="' . $conf->global->MAIN_MAX_DECIMALS_TOT . '"></td></tr>'; print '</td><td><input class="flat" name="MAIN_MAX_DECIMALS_TOT" size="3" value="' . $conf->global->MAIN_MAX_DECIMALS_TOT . '"></td></tr>';
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").'</td><td><input class="flat" name="MAIN_MAX_DECIMALS_SHOWN" size="3" value="' . $conf->global->MAIN_MAX_DECIMALS_SHOWN . '"></td></tr>'; print '<tr><td>'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").'</td><td><input class="flat" name="MAIN_MAX_DECIMALS_SHOWN" size="3" value="' . $conf->global->MAIN_MAX_DECIMALS_SHOWN . '"></td></tr>';
print '<tr class="oddeven"><td>'; print '<tr><td>';
print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly")); print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly"));
print '</td><td><input class="flat" name="MAIN_ROUNDING_RULE_TOT" size="3" value="' . $conf->global->MAIN_ROUNDING_RULE_TOT . '"></td></tr>'; print '</td><td><input class="flat" name="MAIN_ROUNDING_RULE_TOT" size="3" value="' . $conf->global->MAIN_ROUNDING_RULE_TOT . '"></td></tr>';
print '</table>'; print '</table>';
print '<br><div class="center">'; print '<br>';
print '<div class="center">';
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">'; print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
print '</div>'; print '</div>';
print '<br>';
print '</form>'; print '</form>';
print '<br>'; print '<br>';
@@ -142,21 +144,21 @@ else
print '</td><td class="right">'.$conf->global->MAIN_MAX_DECIMALS_UNIT.'</td></tr>'; print '</td><td class="right">'.$conf->global->MAIN_MAX_DECIMALS_UNIT.'</td></tr>';
print '<tr class="oddeven"><td>'; print '<tr><td>';
print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"), $langs->trans("ParameterActiveForNextInputOnly")); print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"), $langs->trans("ParameterActiveForNextInputOnly"));
print '</td><td class="right">'.$conf->global->MAIN_MAX_DECIMALS_TOT.'</td></tr>'; print '</td><td class="right">'.$conf->global->MAIN_MAX_DECIMALS_TOT.'</td></tr>';
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").'</td><td class="right">'.$conf->global->MAIN_MAX_DECIMALS_SHOWN.'</td></tr>'; print '<tr><td>'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").'</td><td class="right">'.$conf->global->MAIN_MAX_DECIMALS_SHOWN.'</td></tr>';
print '<tr class="oddeven"><td>'; print '<tr><td>';
print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly")); print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly"));
print '</td><td class="right">'.$conf->global->MAIN_ROUNDING_RULE_TOT.'</td></tr>'; print '</td><td class="right">'.$conf->global->MAIN_ROUNDING_RULE_TOT.'</td></tr>';
print '</table>'; print '</table>';
print '<div class="tabsAction">'; print '<div class="tabsAction tabsActionNoBottom">';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>'; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
print '</div>'; print '</div>';
} }

View File

@@ -252,14 +252,16 @@ print "</td></tr>\n";
print '</table>'; print '</table>';
print '<center>'; dol_fiche_end();
print '<br>';
print '<div class="center">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />'; print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
print '</center>'; print '</div>';
print '<br>';
print '</form>'; print '</form>';
dol_fiche_end();
// End of page // End of page
llxFooter(); llxFooter();
$db->close(); $db->close();

View File

@@ -53,6 +53,7 @@ class Categorie extends CommonObject
const TYPE_PROJECT = 'project'; const TYPE_PROJECT = 'project';
const TYPE_ACCOUNT = 'bank_account'; const TYPE_ACCOUNT = 'bank_account';
const TYPE_BANK_LINE = 'bank_line'; const TYPE_BANK_LINE = 'bank_line';
const TYPE_WAREHOUSE = 'warehouse';
/** /**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
@@ -75,6 +76,7 @@ class Categorie extends CommonObject
'project' => 6, 'project' => 6,
'user' => 7, 'user' => 7,
'bank_line' => 8, 'bank_line' => 8,
'warehouse' => 9,
); );
/** /**
@@ -90,12 +92,13 @@ class Categorie extends CommonObject
6 => 'project', 6 => 'project',
7 => 'user', 7 => 'user',
8 => 'bank_line', 8 => 'bank_line',
9 => 'warehouse',
); );
/** /**
* @var array Foreign keys mapping from type string * @var array Foreign keys mapping from type string
* *
* @note Move to const array when PHP 5.6 will be our minimum target * @TODO Move to const array when PHP 5.6 will be our minimum target
*/ */
protected $MAP_CAT_FK = array( protected $MAP_CAT_FK = array(
'product' => 'product', 'product' => 'product',
@@ -104,13 +107,14 @@ class Categorie extends CommonObject
'member' => 'member', 'member' => 'member',
'contact' => 'socpeople', 'contact' => 'socpeople',
'user' => 'user', 'user' => 'user',
'account' => 'account', // old for bank_account 'account' => 'account', // old key for bank_account
'bank_account' => 'account', 'bank_account' => 'account',
'project' => 'project', 'project' => 'project',
'warehouse'=> 'warehouse',
); );
/** /**
* @var array Category tables mapping from type string * @var array Category tables mapping from type string (llx_categorie_...)
* *
* @note Move to const array when PHP 5.6 will be our minimum target * @note Move to const array when PHP 5.6 will be our minimum target
*/ */
@@ -121,9 +125,10 @@ class Categorie extends CommonObject
'member' => 'member', 'member' => 'member',
'contact' => 'contact', 'contact' => 'contact',
'user' => 'user', 'user' => 'user',
'account' => 'account', // old for bank_account 'account' => 'account', // old key for bank_account
'bank_account'=> 'account', 'bank_account'=> 'account',
'project' => 'project', 'project' => 'project',
'warehouse'=> 'warehouse',
); );
/** /**
@@ -141,10 +146,11 @@ class Categorie extends CommonObject
'account' => 'Account', // old for bank account 'account' => 'Account', // old for bank account
'bank_account' => 'Account', 'bank_account' => 'Account',
'project' => 'Project', 'project' => 'Project',
'warehouse'=> 'Entrepot',
); );
/** /**
* @var array Object table mapping from type string * @var array Object table mapping from type string (table llx_...)
* *
* @note Move to const array when PHP 5.6 will be our minimum target * @note Move to const array when PHP 5.6 will be our minimum target
*/ */
@@ -157,6 +163,7 @@ class Categorie extends CommonObject
'user' => 'user', 'user' => 'user',
'account' => 'bank_account', 'account' => 'bank_account',
'project' => 'projet', 'project' => 'projet',
'warehouse'=> 'entrepot',
); );
/** /**
@@ -197,14 +204,16 @@ class Categorie extends CommonObject
/** /**
* @var string Category type * @var string Category type
* *
* @see Categorie::TYPE_ACCOUNT
* @see Categorie::TYPE_PRODUCT * @see Categorie::TYPE_PRODUCT
* @see Categorie::TYPE_SUPPLIER * @see Categorie::TYPE_SUPPLIER
* @see Categorie::TYPE_CUSTOMER * @see Categorie::TYPE_CUSTOMER
* @see Categorie::TYPE_MEMBER * @see Categorie::TYPE_MEMBER
* @see Categorie::TYPE_CONTACT * @see Categorie::TYPE_CONTACT
* @see Categorie::TYPE_USER * @see Categorie::TYPE_USER
* @see Categorie::TYPE_ACCOUNT
* @see Categorie::TYPE_PROJECT * @see Categorie::TYPE_PROJECT
* @see Categorie::TYPE_BANK_LINE
* @see Categorie::TYPE_WAREHOUSE
*/ */
public $type; public $type;

View File

@@ -58,6 +58,7 @@ elseif ($type == Categorie::TYPE_CONTACT) { $title=$langs->trans("ContactsCate
elseif ($type == Categorie::TYPE_ACCOUNT) { $title=$langs->trans("AccountsCategoriesArea"); $typetext='bank_account'; } elseif ($type == Categorie::TYPE_ACCOUNT) { $title=$langs->trans("AccountsCategoriesArea"); $typetext='bank_account'; }
elseif ($type == Categorie::TYPE_PROJECT) { $title=$langs->trans("ProjectsCategoriesArea"); $typetext='project'; } elseif ($type == Categorie::TYPE_PROJECT) { $title=$langs->trans("ProjectsCategoriesArea"); $typetext='project'; }
elseif ($type == Categorie::TYPE_USER) { $title=$langs->trans("UsersCategoriesArea"); $typetext='user'; } elseif ($type == Categorie::TYPE_USER) { $title=$langs->trans("UsersCategoriesArea"); $typetext='user'; }
elseif ($type == Categorie::TYPE_WAREHOUSE) { $title=$langs->trans("StocksCategoriesArea"); $typetext='warehouse'; }
else { $title=$langs->trans("CategoriesArea"); $typetext='unknown'; } else { $title=$langs->trans("CategoriesArea"); $typetext='unknown'; }
$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js'); $arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');

View File

@@ -86,6 +86,18 @@ $form = new Form($db);
$formfile = new FormFile($db); $formfile = new FormFile($db);
$formactions = new FormActions($db); $formactions = new FormActions($db);
// Load object
if ($id > 0 && $action!='add') {
$ret = $object->fetch($id);
if ($ret > 0) {
$ret = $object->fetch_optionals();
$ret1 = $object->fetch_userassigned();
}
if ($ret < 0 || $ret1 < 0) {
dol_print_error('', $object->error);
}
}
// fetch optionals attributes and labels // fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
@@ -94,6 +106,9 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('actioncard','globalcard')); $hookmanager->initHooks(array('actioncard','globalcard'));
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
/* /*
* Actions * Actions
@@ -101,7 +116,7 @@ $hookmanager->initHooks(array('actioncard','globalcard'));
$listUserAssignedUpdated = false; $listUserAssignedUpdated = false;
// Remove user to assigned list // Remove user to assigned list
if (GETPOST('removedassigned') || GETPOST('removedassigned') == '0') if (empty($reshook) && (GETPOST('removedassigned') || GETPOST('removedassigned') == '0'))
{ {
$idtoremove=GETPOST('removedassigned'); $idtoremove=GETPOST('removedassigned');
@@ -122,7 +137,7 @@ if (GETPOST('removedassigned') || GETPOST('removedassigned') == '0')
} }
// Add user to assigned list // Add user to assigned list
if (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser')) if (empty($reshook) && (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser')))
{ {
// Add a new user // Add a new user
if (GETPOST('assignedtouser') > 0) if (GETPOST('assignedtouser') > 0)
@@ -143,15 +158,15 @@ if (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser'))
} }
// Link to a project // Link to a project
if ($action == 'classin' && ($user->rights->agenda->allactions->create || if (empty($reshook) && $action == 'classin' && ($user->rights->agenda->allactions->create ||
(($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create))) (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create)))
{ {
$object->fetch($id); //$object->fetch($id);
$object->setProject(GETPOST('projectid', 'int')); $object->setProject(GETPOST('projectid', 'int'));
} }
// Action clone object // Action clone object
if ($action == 'confirm_clone' && $confirm == 'yes') if (empty($reshook) && $action == 'confirm_clone' && $confirm == 'yes')
{ {
if (1 == 0 && ! GETPOST('clone_content') && ! GETPOST('clone_receivers')) if (1 == 0 && ! GETPOST('clone_content') && ! GETPOST('clone_receivers'))
{ {
@@ -160,7 +175,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes')
else else
{ {
if ($id > 0) { if ($id > 0) {
$object->fetch($id); //$object->fetch($id);
if (!empty($object->socpeopleassigned)) { if (!empty($object->socpeopleassigned)) {
reset($object->socpeopleassigned); reset($object->socpeopleassigned);
$object->contactid = key($object->socpeopleassigned); $object->contactid = key($object->socpeopleassigned);
@@ -178,7 +193,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes')
} }
// Add event // Add event
if ($action == 'add') if (empty($reshook) && $action == 'add')
{ {
$error=0; $error=0;
@@ -403,7 +418,7 @@ if ($action == 'add')
/* /*
* Action update event * Action update event
*/ */
if ($action == 'update') if (empty($reshook) && $action == 'update')
{ {
if (empty($cancel)) if (empty($cancel))
{ {
@@ -421,7 +436,9 @@ if ($action == 'update')
if ($p2min == -1) $p2min='0'; if ($p2min == -1) $p2min='0';
$object->fetch($id); $object->fetch($id);
$object->fetch_optionals();
$object->fetch_userassigned(); $object->fetch_userassigned();
$object->oldcopy = clone $object;
$datep=dol_mktime($fulldayevent?'00':$aphour, $fulldayevent?'00':$apmin, 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]); $datep=dol_mktime($fulldayevent?'00':$aphour, $fulldayevent?'00':$apmin, 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]);
$datef=dol_mktime($fulldayevent?'23':$p2hour, $fulldayevent?'59':$p2min, $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]); $datef=dol_mktime($fulldayevent?'23':$p2hour, $fulldayevent?'59':$p2min, $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]);
@@ -605,9 +622,12 @@ if ($action == 'update')
/* /*
* delete event * delete event
*/ */
if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes') if (empty($reshook) && $action == 'confirm_delete' && GETPOST("confirm") == 'yes')
{ {
$object->fetch($id); $object->fetch($id);
$object->fetch_optionals();
$object->fetch_userassigned();
$object->oldcopy = clone $object;
if ($user->rights->agenda->myactions->delete if ($user->rights->agenda->myactions->delete
|| $user->rights->agenda->allactions->delete) || $user->rights->agenda->allactions->delete)
@@ -630,10 +650,9 @@ if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes')
* Action move update, used when user move an event in calendar by drag'n drop * Action move update, used when user move an event in calendar by drag'n drop
* TODO Move this into page comm/action/index that trigger this call by the drag and drop of event. * TODO Move this into page comm/action/index that trigger this call by the drag and drop of event.
*/ */
if (GETPOST('actionmove', 'alpha') == 'mupdate') if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate')
{ {
$object->fetch($id); $error = 0;
$object->fetch_userassigned();
$shour = dol_print_date($object->datep, "%H"); $shour = dol_print_date($object->datep, "%H");
$smin = dol_print_date($object->datep, "%M"); $smin = dol_print_date($object->datep, "%M");
@@ -653,10 +672,76 @@ if (GETPOST('actionmove', 'alpha') == 'mupdate')
$object->datef+=$datep-$object->datep; $object->datef+=$datep-$object->datep;
} }
$object->datep=$datep; $object->datep=$datep;
$result=$object->update($user);
if ($result < 0) if (!$error) {
{ // check if an event resource is already in use
setEventMessages($object->error, $object->errors, 'errors'); if (!empty($conf->global->RESOURCE_USED_IN_EVENT_CHECK) && $object->element == 'action') {
$eventDateStart = $object->datep;
$eventDateEnd = $object->datef;
$sql = "SELECT er.rowid, r.ref as r_ref, ac.id as ac_id, ac.label as ac_label";
$sql .= " FROM " . MAIN_DB_PREFIX . "element_resources as er";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "resource as r ON r.rowid = er.resource_id AND er.resource_type = 'dolresource'";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "actioncomm as ac ON ac.id = er.element_id AND er.element_type = '" . $db->escape($object->element) . "'";
$sql .= " WHERE ac.id != " . $object->id;
$sql .= " AND er.resource_id IN (";
$sql .= " SELECT resource_id FROM " . MAIN_DB_PREFIX . "element_resources";
$sql .= " WHERE element_id = " . $object->id;
$sql .= " AND element_type = '" . $db->escape($object->element) . "'";
$sql .= " AND busy = 1";
$sql .= ")";
$sql .= " AND er.busy = 1";
$sql .= " AND (";
// event date start between ac.datep and ac.datep2 (if datep2 is null we consider there is no end)
$sql .= " (ac.datep <= '" . $db->idate($eventDateStart) . "' AND (ac.datep2 IS NULL OR ac.datep2 >= '" . $db->idate($eventDateStart) . "'))";
// event date end between ac.datep and ac.datep2
if (!empty($eventDateEnd)) {
$sql .= " OR (ac.datep <= '" . $db->idate($eventDateEnd) . "' AND (ac.datep2 >= '" . $db->idate($eventDateEnd) . "'))";
}
// event date start before ac.datep and event date end after ac.datep2
$sql .= " OR (";
$sql .= "ac.datep >= '" . $db->idate($eventDateStart) . "'";
if (!empty($eventDateEnd)) {
$sql .= " AND (ac.datep2 IS NOT NULL AND ac.datep2 <= '" . $db->idate($eventDateEnd) . "')";
}
$sql .= ")";
$sql .= ")";
$resql = $db->query($sql);
if (!$resql) {
$error++;
$object->error = $db->lasterror();
$object->errors[] = $object->error;
} else {
if ($db->num_rows($resql) > 0) {
// already in use
$error++;
$object->error = $langs->trans('ErrorResourcesAlreadyInUse') . ' : ';
while ($obj = $db->fetch_object($resql)) {
$object->error .= '<br> - ' . $langs->trans('ErrorResourceUseInEvent', $obj->r_ref, $obj->ac_label . ' [' . $obj->ac_id . ']');
}
$object->errors[] = $object->error;
}
$db->free($resql);
}
if ($error) {
setEventMessages($object->error, $object->errors, 'errors');
}
}
}
if (!$error) {
$db->begin();
$result = $object->update($user);
if ($result < 0) {
$error++;
setEventMessages($object->error, $object->errors, 'errors');
$db->rollback();
} else {
$db->commit();
}
} }
} }
if (! empty($backtopage)) if (! empty($backtopage))
@@ -673,7 +758,9 @@ if (GETPOST('actionmove', 'alpha') == 'mupdate')
// Actions to delete doc // Actions to delete doc
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref); $upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref);
$permissioncreate = ($user->rights->agenda->allactions->create || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->read)); $permissioncreate = ($user->rights->agenda->allactions->create || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->read));
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; if (empty($reshook)) {
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
}
/* /*

View File

@@ -237,6 +237,11 @@ class AgendaEvents extends DolibarrApi
} }
$result = $this->actioncomm->fetch($id); $result = $this->actioncomm->fetch($id);
if ($result) {
$this->actioncomm->fetch_optionals();
$this->actioncomm->fetch_userassigned();
$this->actioncomm->oldcopy = clone $this->actioncomm;
}
if ( ! $result ) { if ( ! $result ) {
throw new RestException(404, 'actioncomm not found'); throw new RestException(404, 'actioncomm not found');
} }
@@ -270,6 +275,11 @@ class AgendaEvents extends DolibarrApi
} }
$result = $this->actioncomm->fetch($id); $result = $this->actioncomm->fetch($id);
if ($result) {
$this->actioncomm->fetch_optionals();
$this->actioncomm->fetch_userassigned();
$this->actioncomm->oldcopy = clone $this->actioncomm;
}
if(! DolibarrApiAccess::$user->rights->agenda->allactions->delete && DolibarrApiAccess::$user->id != $this->actioncomm->userownerid) { if(! DolibarrApiAccess::$user->rights->agenda->allactions->delete && DolibarrApiAccess::$user->id != $this->actioncomm->userownerid) {
throw new RestException(401, "Insuffisant rights to delete an Agenda Event of owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id); throw new RestException(401, "Insuffisant rights to delete an Agenda Event of owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id);

View File

@@ -103,7 +103,7 @@ class PropaleStats extends Stats
* Return propals number by month for a year * Return propals number by month for a year
* *
* @param int $year Year to scan * @param int $year Year to scan
* @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array Array with number by month * @return array Array with number by month
*/ */
public function getNbByMonth($year, $format = 0) public function getNbByMonth($year, $format = 0)
@@ -146,7 +146,7 @@ class PropaleStats extends Stats
* Return the propals amount by month for a year * Return the propals amount by month for a year
* *
* @param int $year Year to scan * @param int $year Year to scan
* @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array Array with amount by month * @return array Array with amount by month
*/ */
public function getAmountByMonth($year, $format) public function getAmountByMonth($year, $format)

View File

@@ -98,7 +98,7 @@ class CommandeStats extends Stats
* Return orders number by month for a year * Return orders number by month for a year
* *
* @param int $year Year to scan * @param int $year Year to scan
* @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array Array with number by month * @return array Array with number by month
*/ */
public function getNbByMonth($year, $format = 0) public function getNbByMonth($year, $format = 0)
@@ -141,7 +141,7 @@ class CommandeStats extends Stats
* Return the orders amount by month for a year * Return the orders amount by month for a year
* *
* @param int $year Year to scan * @param int $year Year to scan
* @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array Array with amount by month * @return array Array with amount by month
*/ */
public function getAmountByMonth($year, $format = 0) public function getAmountByMonth($year, $format = 0)

View File

@@ -989,12 +989,12 @@ class Account extends CommonObject
// Process // Process
foreach($to_del as $del) { foreach($to_del as $del) {
if ($c->fetch($del) > 0) { if ($c->fetch($del) > 0) {
$c->del_type($this, 'account'); $c->del_type($this, Categorie::TYPE_ACCOUNT);
} }
} }
foreach ($to_add as $add) { foreach ($to_add as $add) {
if ($c->fetch($add) > 0) { if ($c->fetch($add) > 0) {
$c->add_type($this, 'account'); $c->add_type($this, Categorie::TYPE_ACCOUNT);
} }
} }

View File

@@ -93,7 +93,7 @@ class DeplacementStats extends Stats
* Renvoie le nombre de facture par mois pour une annee donnee * Renvoie le nombre de facture par mois pour une annee donnee
* *
* @param string $year Year to scan * @param string $year Year to scan
* @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array Array of values * @return array Array of values
*/ */
public function getNbByMonth($year, $format = 0) public function getNbByMonth($year, $format = 0)
@@ -115,7 +115,7 @@ class DeplacementStats extends Stats
* Renvoie le montant de facture par mois pour une annee donnee * Renvoie le montant de facture par mois pour une annee donnee
* *
* @param int $year Year to scan * @param int $year Year to scan
* @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array Array of values * @return array Array of values
*/ */
public function getAmountByMonth($year, $format = 0) public function getAmountByMonth($year, $format = 0)

View File

@@ -12,7 +12,7 @@
* Copyright (C) 2013 Jean-Francois FERRY <jfefe@aternatik.fr> * Copyright (C) 2013 Jean-Francois FERRY <jfefe@aternatik.fr>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2014-2018 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2014-2019 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* *
@@ -2862,49 +2862,6 @@ if ($action == 'create')
} }
} }
// Type de facture
$facids = $facturestatic->list_replacable_invoices($soc->id);
if ($facids < 0) {
dol_print_error($db, $facturestatic);
exit();
}
$options = "";
foreach ($facids as $facparam)
{
$options .= '<option value="' . $facparam ['id'] . '"';
if ($facparam ['id'] == $_POST['fac_replacement'])
$options .= ' selected';
$options .= '>' . $facparam ['ref'];
$options .= ' (' . $facturestatic->LibStatut(0, $facparam ['status']) . ')';
$options .= '</option>';
}
// Show link for credit note
$facids=$facturestatic->list_qualified_avoir_invoices($soc->id);
if ($facids < 0)
{
dol_print_error($db, $facturestatic);
exit;
}
$optionsav = "";
$newinvoice_static = new Facture($db);
foreach ($facids as $key => $valarray)
{
$newinvoice_static->id = $key;
$newinvoice_static->ref = $valarray ['ref'];
$newinvoice_static->statut = $valarray ['status'];
$newinvoice_static->type = $valarray ['type'];
$newinvoice_static->paye = $valarray ['paye'];
$optionsav .= '<option value="' . $key . '"';
if ($key == GETPOST('fac_avoir'))
$optionsav .= ' selected';
$optionsav .= '>';
$optionsav .= $newinvoice_static->ref;
$optionsav .= ' (' . $newinvoice_static->getLibStatut(1, $valarray ['paymentornot']) . ')';
$optionsav .= '</option>';
}
print '<tr><td class="tdtop fieldrequired">' . $langs->trans('Type') . '</td><td colspan="2">'; print '<tr><td class="tdtop fieldrequired">' . $langs->trans('Type') . '</td><td colspan="2">';
print '<div class="tagtable">' . "\n"; print '<div class="tagtable">' . "\n";
@@ -2981,6 +2938,23 @@ if ($action == 'create')
// Replacement // Replacement
if (empty($conf->global->INVOICE_DISABLE_REPLACEMENT)) if (empty($conf->global->INVOICE_DISABLE_REPLACEMENT))
{ {
// Type de facture
$facids = $facturestatic->list_replacable_invoices($soc->id);
if ($facids < 0) {
dol_print_error($db, $facturestatic);
exit();
}
$options = "";
foreach ($facids as $facparam)
{
$options .= '<option value="' . $facparam ['id'] . '"';
if ($facparam ['id'] == $_POST['fac_replacement'])
$options .= ' selected';
$options .= '>' . $facparam ['ref'];
$options .= ' (' . $facturestatic->LibStatut(0, $facparam ['status']) . ')';
$options .= '</option>';
}
print '<!-- replacement line -->'; print '<!-- replacement line -->';
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" name="type" id="radio_replacement" value="1"' . (GETPOST('type') == 1 ? ' checked' : ''); $tmp='<input type="radio" name="type" id="radio_replacement" value="1"' . (GETPOST('type') == 1 ? ' checked' : '');
@@ -3048,6 +3022,32 @@ if ($action == 'create')
// Credit note // Credit note
if (empty($conf->global->INVOICE_DISABLE_CREDIT_NOTE)) if (empty($conf->global->INVOICE_DISABLE_CREDIT_NOTE))
{ {
// Show link for credit note
$facids=$facturestatic->list_qualified_avoir_invoices($soc->id);
if ($facids < 0)
{
dol_print_error($db, $facturestatic);
exit;
}
$optionsav = "";
$newinvoice_static = new Facture($db);
foreach ($facids as $key => $valarray)
{
$newinvoice_static->id = $key;
$newinvoice_static->ref = $valarray ['ref'];
$newinvoice_static->statut = $valarray ['status'];
$newinvoice_static->type = $valarray ['type'];
$newinvoice_static->paye = $valarray ['paye'];
$optionsav .= '<option value="' . $key . '"';
if ($key == GETPOST('fac_avoir'))
$optionsav .= ' selected';
$optionsav .= '>';
$optionsav .= $newinvoice_static->ref;
$optionsav .= ' (' . $newinvoice_static->getLibStatut(1, $valarray ['paymentornot']) . ')';
$optionsav .= '</option>';
}
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" id="radio_creditnote" name="type" value="2"' . (GETPOST('type') == 2 ? ' checked' : ''); $tmp='<input type="radio" id="radio_creditnote" name="type" value="2"' . (GETPOST('type') == 2 ? ' checked' : '');
if (! $optionsav) $tmp.=' disabled'; if (! $optionsav) $tmp.=' disabled';

View File

@@ -97,7 +97,7 @@ class FactureStats extends Stats
* Return orders number by month for a year * Return orders number by month for a year
* *
* @param int $year Year to scan * @param int $year Year to scan
* @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array Array of values * @return array Array of values
*/ */
public function getNbByMonth($year, $format = 0) public function getNbByMonth($year, $format = 0)
@@ -142,7 +142,7 @@ class FactureStats extends Stats
* Return the invoices amount by month for a year * Return the invoices amount by month for a year
* *
* @param int $year Year to scan * @param int $year Year to scan
* @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array Array with amount by month * @return array Array with amount by month
*/ */
public function getAmountByMonth($year, $format = 0) public function getAmountByMonth($year, $format = 0)

View File

@@ -19,7 +19,6 @@
* \file compta/facture/class/paymentterm.class.php * \file compta/facture/class/paymentterm.class.php
* \ingroup facture * \ingroup facture
* \brief This file is an example for a CRUD class file (Create/Read/Update/Delete) * \brief This file is an example for a CRUD class file (Create/Read/Update/Delete)
* \author Put author name here
*/ */

View File

@@ -18,7 +18,6 @@
/** /**
* \file htdocs/compta/localtax/class/localtax.class.php * \file htdocs/compta/localtax/class/localtax.class.php
* \ingroup tax * \ingroup tax
* \author Laurent Destailleur
*/ */
require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';

View File

@@ -71,7 +71,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm=='yes
$error++; $error++;
$action = 'create'; $action = 'create';
} }
if (! empty($conf->banque->enabled) && ! $_POST["accountid"] > 0) if (! empty($conf->banque->enabled) && ! ($_POST["accountid"] > 0))
{ {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToCredit")), null, 'errors'); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToCredit")), null, 'errors');
$error++; $error++;

View File

@@ -22,7 +22,6 @@
/** /**
* \file htdocs/compta/tva/class/tva.class.php * \file htdocs/compta/tva/class/tva.class.php
* \ingroup tax * \ingroup tax
* \author Laurent Destailleur
*/ */
// Put here all includes required by your class file // Put here all includes required by your class file

View File

@@ -530,7 +530,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
} }
// Blank line // Blank line
print '<tr><td colspan="'.($span+1).'">&nbsp;</td></tr>'; print '<tr><td colspan="'.($span+2).'">&nbsp;</td></tr>';
// Print table headers for this quadri - expenses now // Print table headers for this quadri - expenses now
print '<tr class="liste_titre liste_titre_topborder">'; print '<tr class="liste_titre liste_titre_topborder">';

Some files were not shown because too many files have changed in this diff Show More