mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-16 06:21:28 +01:00
Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/comm/propal/list.php htdocs/core/tpl/objectline_view.tpl.php
This commit is contained in:
@@ -259,7 +259,7 @@ llxHeader('', $title);
|
|||||||
|
|
||||||
$linkback = '';
|
$linkback = '';
|
||||||
//$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
|
//$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
|
||||||
print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'accountancy');
|
print load_fiche_titre($title, $linkback, 'accountancy');
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
/* Copyright (C) 2018-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/admin/accounting.php
|
* \file htdocs/admin/accounting.php
|
||||||
* \ingroup accounting
|
* \ingroup accounting
|
||||||
* \brief Setup page to configure accountanting module
|
* \brief Setup page to configure accounting module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
@@ -32,7 +32,7 @@ $action = GETPOST('action', 'aZ09');
|
|||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminaccoutant'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminaccoutant'; // To manage different context of search
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('admin', 'companies'));
|
$langs->loadLangs(array('admin', 'companies', 'accountancy'));
|
||||||
|
|
||||||
if (!$user->admin) {
|
if (!$user->admin) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@@ -52,12 +52,13 @@ $error = 0;
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$title = $langs->trans("ConfigAccountingExpert");
|
||||||
$help_url = '';
|
$help_url = '';
|
||||||
llxHeader('', $langs->trans("ConfigAccountingExpert"), $help_url);
|
llxHeader('', $title, $help_url);
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("ConfigAccountingExpert"), $linkback, 'title_setup');
|
print load_fiche_titre($title, $linkback, 'title_setup');
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print '<span class="opacitymedium">'.$langs->trans("AccountancySetupDoneFromAccountancyMenu", $langs->transnoentitiesnoconv("Accounting").' - '.$langs->transnoentitiesnoconv("Setup"))."</span><br>\n";
|
print '<span class="opacitymedium">'.$langs->trans("AccountancySetupDoneFromAccountancyMenu", $langs->transnoentitiesnoconv("Accounting").' - '.$langs->transnoentitiesnoconv("Setup"))."</span><br>\n";
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ $hookmanager->initHooks(array('admin'));
|
|||||||
// Put here declaration of dictionaries properties
|
// Put here declaration of dictionaries properties
|
||||||
|
|
||||||
// Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this.
|
// Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this.
|
||||||
$taborder = array(9, 0, 4, 3, 2, 0, 1, 8, 19, 16, 39, 27, 40, 38, 0, 5, 11, 0, 6, 0, 29, 0, 33, 34, 32, 24, 28, 17, 35, 36, 0, 10, 23, 12, 13, 7, 0, 14, 0, 22, 20, 18, 21, 41, 0, 15, 30, 0, 37, 42, 0, 43, 0, 25, 0);
|
$taborder = array(9, 15, 30, 0, 4, 3, 2, 0, 1, 8, 19, 16, 39, 27, 40, 38, 0, 5, 11, 0, 6, 24, 0, 29, 0, 33, 34, 32, 28, 17, 35, 36, 0, 10, 23, 12, 13, 7, 0, 14, 0, 22, 20, 18, 21, 41, 0, 37, 42, 0, 43, 0, 25, 0);
|
||||||
|
|
||||||
// Name of SQL tables of dictionaries
|
// Name of SQL tables of dictionaries
|
||||||
$tabname = array();
|
$tabname = array();
|
||||||
@@ -223,7 +223,7 @@ $tabsql[24] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFI
|
|||||||
$tabsql[25] = "SELECT rowid as rowid, code, label, active, module FROM ".MAIN_DB_PREFIX."c_type_container as t WHERE t.entity IN (".getEntity('c_type_container').")";
|
$tabsql[25] = "SELECT rowid as rowid, code, label, active, module FROM ".MAIN_DB_PREFIX."c_type_container as t WHERE t.entity IN (".getEntity('c_type_container').")";
|
||||||
//$tabsql[26]= "SELECT rowid as rowid, code, label, short_label, active FROM ".MAIN_DB_PREFIX."c_units";
|
//$tabsql[26]= "SELECT rowid as rowid, code, label, short_label, active FROM ".MAIN_DB_PREFIX."c_units";
|
||||||
$tabsql[27] = "SELECT id as rowid, code, libelle, picto, active FROM ".MAIN_DB_PREFIX."c_stcomm";
|
$tabsql[27] = "SELECT id as rowid, code, libelle, picto, active FROM ".MAIN_DB_PREFIX."c_stcomm";
|
||||||
$tabsql[28] = "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.newbymonth, h.fk_country as country_id, c.code as country_code, c.label as country, h.active FROM ".MAIN_DB_PREFIX."c_holiday_types as h LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON h.fk_country=c.rowid";
|
$tabsql[28] = "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.newByMonth, h.fk_country as country_id, c.code as country_code, c.label as country, h.active FROM ".MAIN_DB_PREFIX."c_holiday_types as h LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON h.fk_country=c.rowid";
|
||||||
$tabsql[29] = "SELECT rowid as rowid, code, label, percent, position, active FROM ".MAIN_DB_PREFIX."c_lead_status";
|
$tabsql[29] = "SELECT rowid as rowid, code, label, percent, position, active FROM ".MAIN_DB_PREFIX."c_lead_status";
|
||||||
$tabsql[30] = "SELECT rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active FROM ".MAIN_DB_PREFIX."c_format_cards";
|
$tabsql[30] = "SELECT rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active FROM ".MAIN_DB_PREFIX."c_format_cards";
|
||||||
//$tabsql[31]= "SELECT s.rowid as rowid, pcg_version, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s";
|
//$tabsql[31]= "SELECT s.rowid as rowid, pcg_version, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s";
|
||||||
@@ -315,7 +315,7 @@ $tabfield[24] = "code,label";
|
|||||||
$tabfield[25] = "code,label";
|
$tabfield[25] = "code,label";
|
||||||
//$tabfield[26]= "code,label,short_label";
|
//$tabfield[26]= "code,label,short_label";
|
||||||
$tabfield[27] = "code,libelle,picto";
|
$tabfield[27] = "code,libelle,picto";
|
||||||
$tabfield[28] = "code,label,affect,delay,newbymonth,country_id,country";
|
$tabfield[28] = "code,label,affect,delay,newByMonth,country_id,country";
|
||||||
$tabfield[29] = "code,label,percent,position";
|
$tabfield[29] = "code,label,percent,position";
|
||||||
$tabfield[30] = "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
|
$tabfield[30] = "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
|
||||||
//$tabfield[31]= "pcg_version,label";
|
//$tabfield[31]= "pcg_version,label";
|
||||||
@@ -361,7 +361,7 @@ $tabfieldvalue[24] = "code,label";
|
|||||||
$tabfieldvalue[25] = "code,label";
|
$tabfieldvalue[25] = "code,label";
|
||||||
//$tabfieldvalue[26]= "code,label,short_label";
|
//$tabfieldvalue[26]= "code,label,short_label";
|
||||||
$tabfieldvalue[27] = "code,libelle,picto";
|
$tabfieldvalue[27] = "code,libelle,picto";
|
||||||
$tabfieldvalue[28] = "code,label,affect,delay,newbymonth,country";
|
$tabfieldvalue[28] = "code,label,affect,delay,newByMonth,country";
|
||||||
$tabfieldvalue[29] = "code,label,percent,position";
|
$tabfieldvalue[29] = "code,label,percent,position";
|
||||||
$tabfieldvalue[30] = "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
|
$tabfieldvalue[30] = "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
|
||||||
//$tabfieldvalue[31]= "pcg_version,label";
|
//$tabfieldvalue[31]= "pcg_version,label";
|
||||||
@@ -407,7 +407,7 @@ $tabfieldinsert[24] = "code,label";
|
|||||||
$tabfieldinsert[25] = "code,label";
|
$tabfieldinsert[25] = "code,label";
|
||||||
//$tabfieldinsert[26]= "code,label,short_label";
|
//$tabfieldinsert[26]= "code,label,short_label";
|
||||||
$tabfieldinsert[27] = "code,libelle,picto";
|
$tabfieldinsert[27] = "code,libelle,picto";
|
||||||
$tabfieldinsert[28] = "code,label,affect,delay,newbymonth,fk_country";
|
$tabfieldinsert[28] = "code,label,affect,delay,newByMonth,fk_country";
|
||||||
$tabfieldinsert[29] = "code,label,percent,position";
|
$tabfieldinsert[29] = "code,label,percent,position";
|
||||||
$tabfieldinsert[30] = "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
|
$tabfieldinsert[30] = "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
|
||||||
//$tabfieldinsert[31]= "pcg_version,label";
|
//$tabfieldinsert[31]= "pcg_version,label";
|
||||||
@@ -548,7 +548,7 @@ $tabhelp[24] = array('code'=>$langs->trans("EnterAnyCode"));
|
|||||||
$tabhelp[25] = array('code'=>$langs->trans('EnterAnyCode'));
|
$tabhelp[25] = array('code'=>$langs->trans('EnterAnyCode'));
|
||||||
//$tabhelp[26] = array('code'=>$langs->trans("EnterAnyCode"));
|
//$tabhelp[26] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||||
$tabhelp[27] = array('code'=>$langs->trans("EnterAnyCode"), 'picto'=>$langs->trans("PictoHelp"));
|
$tabhelp[27] = array('code'=>$langs->trans("EnterAnyCode"), 'picto'=>$langs->trans("PictoHelp"));
|
||||||
$tabhelp[28] = array('affect'=>$langs->trans("FollowedByACounter"), 'delay'=>$langs->trans("MinimumNoticePeriod"), 'newbymonth'=>$langs->trans("NbAddedAutomatically"));
|
$tabhelp[28] = array('affect'=>$langs->trans("FollowedByACounter"), 'delay'=>$langs->trans("MinimumNoticePeriod"), 'newByMonth'=>$langs->trans("NbAddedAutomatically"));
|
||||||
$tabhelp[29] = array('code'=>$langs->trans("EnterAnyCode"), 'percent'=>$langs->trans("OpportunityPercent"), 'position'=>$langs->trans("PositionIntoComboList"));
|
$tabhelp[29] = array('code'=>$langs->trans("EnterAnyCode"), 'percent'=>$langs->trans("OpportunityPercent"), 'position'=>$langs->trans("PositionIntoComboList"));
|
||||||
$tabhelp[30] = array('code'=>$langs->trans("EnterAnyCode"), 'name'=>$langs->trans("LabelName"), 'paper_size'=>$langs->trans("LabelPaperSize"));
|
$tabhelp[30] = array('code'=>$langs->trans("EnterAnyCode"), 'name'=>$langs->trans("LabelName"), 'paper_size'=>$langs->trans("LabelPaperSize"));
|
||||||
//$tabhelp[31] = array('pcg_version'=>$langs->trans("EnterAnyCode"));
|
//$tabhelp[31] = array('pcg_version'=>$langs->trans("EnterAnyCode"));
|
||||||
@@ -568,8 +568,8 @@ $tabhelp[43] = array('code'=>$langs->trans("EnterAnyCode"));
|
|||||||
// Table to store complete informations (will replace all other table). Key is table name.
|
// Table to store complete informations (will replace all other table). Key is table name.
|
||||||
$tabcomplete = array(
|
$tabcomplete = array(
|
||||||
'c_forme_juridique'=>array('picto'=>'company'),
|
'c_forme_juridique'=>array('picto'=>'company'),
|
||||||
'c_departements'=>array('picto'=>'country'),
|
'c_departements'=>array('picto'=>'state'),
|
||||||
'c_regions'=>array('picto'=>'country'),
|
'c_regions'=>array('picto'=>'region'),
|
||||||
'c_country'=>array('picto'=>'country'),
|
'c_country'=>array('picto'=>'country'),
|
||||||
'c_civility'=>array('picto'=>'contact'),
|
'c_civility'=>array('picto'=>'contact'),
|
||||||
'c_actioncomm'=>array('picto'=>'action'),
|
'c_actioncomm'=>array('picto'=>'action'),
|
||||||
@@ -1389,7 +1389,7 @@ if ($id) {
|
|||||||
if ($value == 'delay') {
|
if ($value == 'delay') {
|
||||||
$valuetoshow = $langs->trans("NoticePeriod");
|
$valuetoshow = $langs->trans("NoticePeriod");
|
||||||
}
|
}
|
||||||
if ($value == 'newbymonth') {
|
if ($value == 'newByMonth') {
|
||||||
$valuetoshow = $langs->trans("NewByMonth");
|
$valuetoshow = $langs->trans("NewByMonth");
|
||||||
}
|
}
|
||||||
if ($value == 'fk_tva') {
|
if ($value == 'fk_tva') {
|
||||||
@@ -1734,7 +1734,7 @@ if ($id) {
|
|||||||
if ($value == 'delay') {
|
if ($value == 'delay') {
|
||||||
$valuetoshow = $langs->trans("NoticePeriod");
|
$valuetoshow = $langs->trans("NoticePeriod");
|
||||||
}
|
}
|
||||||
if ($value == 'newbymonth') {
|
if ($value == 'newByMonth') {
|
||||||
$valuetoshow = $langs->trans("NewByMonth");
|
$valuetoshow = $langs->trans("NewByMonth");
|
||||||
}
|
}
|
||||||
if ($value == 'fk_tva') {
|
if ($value == 'fk_tva') {
|
||||||
|
|||||||
@@ -54,12 +54,12 @@ $arrayofparameters = array(
|
|||||||
'EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1),
|
'EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1),
|
||||||
//'EVENTORGANIZATION_FILTERATTENDEES_CAT'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1),
|
//'EVENTORGANIZATION_FILTERATTENDEES_CAT'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1),
|
||||||
//'EVENTORGANIZATION_FILTERATTENDEES_TYPE'=>array('type'=>'thirdparty_type:', 'enabled'=>1),
|
//'EVENTORGANIZATION_FILTERATTENDEES_TYPE'=>array('type'=>'thirdparty_type:', 'enabled'=>1),
|
||||||
'EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
|
'EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF'=>array('type'=>'emailtemplate:conferenceorbooth', 'enabled'=>1),
|
||||||
'EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
|
'EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH'=>array('type'=>'emailtemplate:conferenceorbooth', 'enabled'=>1),
|
||||||
'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
|
'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH'=>array('type'=>'emailtemplate:conferenceorbooth', 'enabled'=>1),
|
||||||
'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
|
'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT'=>array('type'=>'emailtemplate:conferenceorbooth', 'enabled'=>1),
|
||||||
'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
|
'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER'=>array('type'=>'emailtemplate:conferenceorbooth', 'enabled'=>1),
|
||||||
'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
|
'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES'=>array('type'=>'emailtemplate:conferenceorbooth', 'enabled'=>1),
|
||||||
'EVENTORGANIZATION_SECUREKEY'=>array('type'=>'securekey', 'enabled'=>1),
|
'EVENTORGANIZATION_SECUREKEY'=>array('type'=>'securekey', 'enabled'=>1),
|
||||||
'SERVICE_BOOTH_LOCATION'=>array('type'=>'product', 'enabled'=>1),
|
'SERVICE_BOOTH_LOCATION'=>array('type'=>'product', 'enabled'=>1),
|
||||||
'SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION'=>array('type'=>'product', 'enabled'=>1),
|
'SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION'=>array('type'=>'product', 'enabled'=>1),
|
||||||
|
|||||||
@@ -354,10 +354,10 @@ print '<br>';
|
|||||||
print '<strong>MAIN_ALLOW_SVG_FILES_AS_IMAGES</strong> = '.(empty($conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES) ? '0 <span class="opacitymedium">('.$langs->trans("Recommanded").': 0)</span>' : $conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES)."<br>";
|
print '<strong>MAIN_ALLOW_SVG_FILES_AS_IMAGES</strong> = '.(empty($conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES) ? '0 <span class="opacitymedium">('.$langs->trans("Recommanded").': 0)</span>' : $conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES)."<br>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>MAIN_RESTRICTHTML_ONLY_VALID_HTML</strong> = '.(empty($conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommanded").': 1)</span>' : '')."<br>";
|
print '<strong>MAIN_RESTRICTHTML_ONLY_VALID_HTML</strong> = '.(empty($conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommanded").': 1)</span>' : $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML)."<br>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES</strong> = '.(empty($conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommanded").': 1)</span>' : '')."<br>";
|
print '<strong>MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES</strong> = '.(empty($conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommanded").': 1)</span>' : $conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES)."<br>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>MAIN_EXEC_USE_POPEN</strong> = ';
|
print '<strong>MAIN_EXEC_USE_POPEN</strong> = ';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||||
* Copyright (C) 2006-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2006-2021 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
@@ -257,6 +257,7 @@ if ($user->rights->categorie->creer) {
|
|||||||
|
|
||||||
// Parent category
|
// Parent category
|
||||||
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
|
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
|
||||||
|
print img_picto($langs->trans("ParentCategory"), 'category', 'class="pictofixedwidth"');
|
||||||
print $form->select_all_categories($type, $catorigin, 'parent');
|
print $form->select_all_categories($type, $catorigin, 'parent');
|
||||||
print ajax_combobox('parent');
|
print ajax_combobox('parent');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@@ -220,15 +220,16 @@ $permissiontoread = $user->rights->propal->lire;
|
|||||||
$permissiontoadd = $user->rights->propal->creer;
|
$permissiontoadd = $user->rights->propal->creer;
|
||||||
$permissiontodelete = $user->rights->propal->supprimer;
|
$permissiontodelete = $user->rights->propal->supprimer;
|
||||||
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
|
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
|
||||||
$permissiontovalidate = $user->rights->propale->propal_advance->validate;
|
$permissiontovalidate = $user->rights->propal->propal_advance->validate;
|
||||||
$permissiontoclose = $user->rights->propale->propal_advance->close;
|
$permissiontoclose = $user->rights->propal->propal_advance->close;
|
||||||
$permissiontosendbymail = $user->rights->propale->propal_advance->send;
|
$permissiontosendbymail = $user->rights->propal->propal_advance->send;
|
||||||
} else {
|
} else {
|
||||||
$permissiontovalidate = $user->rights->propal->creer;
|
$permissiontovalidate = $user->rights->propal->creer;
|
||||||
$permissiontoclose = $user->rights->propal->creer;
|
$permissiontoclose = $user->rights->propal->creer;
|
||||||
$permissiontosendbymail = $user->rights->propale->lire;
|
$permissiontosendbymail = $user->rights->propal->lire;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -69,20 +69,11 @@ class box_graph_nb_tickets_type extends ModeleBoxes
|
|||||||
global $theme_datacolor, $badgeStatus8;
|
global $theme_datacolor, $badgeStatus8;
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php";
|
require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php";
|
||||||
|
require_once DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php";
|
||||||
|
|
||||||
|
|
||||||
$badgeStatus0 = '#cbd3d3'; // draft
|
|
||||||
$badgeStatus1 = '#bc9526'; // validated
|
|
||||||
$badgeStatus1b = '#bc9526'; // validated
|
|
||||||
$badgeStatus2 = '#9c9c26'; // approved
|
|
||||||
$badgeStatus3 = '#bca52b';
|
|
||||||
$badgeStatus4 = '#25a580'; // Color ok
|
|
||||||
$badgeStatus4b = '#25a580'; // Color ok
|
|
||||||
$badgeStatus5 = '#cad2d2';
|
|
||||||
$badgeStatus6 = '#cad2d2';
|
|
||||||
$badgeStatus7 = '#baa32b';
|
|
||||||
$badgeStatus8 = '#993013';
|
$badgeStatus8 = '#993013';
|
||||||
$badgeStatus9 = '#e7f0f0';
|
|
||||||
$text = $langs->trans("BoxTicketType");
|
$text = $langs->trans("BoxTicketType");
|
||||||
$this->info_box_head = array(
|
$this->info_box_head = array(
|
||||||
'text' => $text,
|
'text' => $text,
|
||||||
|
|||||||
@@ -444,6 +444,7 @@ class FormAdmin
|
|||||||
}
|
}
|
||||||
$out .= '</select>';
|
$out .= '</select>';
|
||||||
|
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
|
||||||
$out .= ajax_combobox($htmlname);
|
$out .= ajax_combobox($htmlname);
|
||||||
|
|
||||||
return $out;
|
return $out;
|
||||||
|
|||||||
@@ -3548,8 +3548,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'github', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
|
'github', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
|
||||||
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies',
|
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies',
|
||||||
'generic', 'home', 'hrm', 'members', 'products', 'invoicing',
|
'generic', 'home', 'hrm', 'members', 'products', 'invoicing',
|
||||||
'partnership', 'payment', 'pencil-ruler', 'preview', 'project', 'projectpub', 'projecttask', 'question', 'refresh', 'salary', 'shipment',
|
'partnership', 'payment', 'pencil-ruler', 'preview', 'project', 'projectpub', 'projecttask', 'question', 'refresh', 'region',
|
||||||
'state', 'supplier_invoice', 'supplier_invoicea', 'supplier_invoicer', 'supplier_invoiced',
|
'salary', 'shipment', 'state', 'supplier_invoice', 'supplier_invoicea', 'supplier_invoicer', 'supplier_invoiced',
|
||||||
'technic', 'ticket',
|
'technic', 'ticket',
|
||||||
'error', 'warning',
|
'error', 'warning',
|
||||||
'recent', 'reception', 'recruitmentcandidature', 'recruitmentjobposition', 'resource',
|
'recent', 'reception', 'recruitmentcandidature', 'recruitmentjobposition', 'resource',
|
||||||
@@ -3598,8 +3598,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'partnership'=>'handshake', 'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'previous'=>'arrow-alt-circle-left', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell',
|
'partnership'=>'handshake', 'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'previous'=>'arrow-alt-circle-left', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell',
|
||||||
'recent' => 'question', 'reception'=>'dolly', 'recruitmentjobposition'=>'id-card-alt', 'recruitmentcandidature'=>'id-badge',
|
'recent' => 'question', 'reception'=>'dolly', 'recruitmentjobposition'=>'id-card-alt', 'recruitmentcandidature'=>'id-badge',
|
||||||
'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature',
|
'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature',
|
||||||
'refresh'=>'redo', 'resource'=>'laptop-house',
|
'refresh'=>'redo', 'region'=>'map-marked', 'resource'=>'laptop-house',
|
||||||
'state'=>'map-marked', 'security'=>'key', 'salary'=>'wallet', 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'stripe'=>'stripe-s',
|
'state'=>'map-marked-alt', 'security'=>'key', 'salary'=>'wallet', 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'stripe'=>'stripe-s',
|
||||||
'supplier'=>'building', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt',
|
'supplier'=>'building', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt',
|
||||||
'timespent'=>'clock', 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach',
|
'timespent'=>'clock', 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach',
|
||||||
'title_agenda'=>'calendar-alt',
|
'title_agenda'=>'calendar-alt',
|
||||||
@@ -3700,7 +3700,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'partnership'=>'#6c6aa8', 'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'reception'=>'#a69944', 'resize'=>'#444', 'rss'=>'#cba',
|
'partnership'=>'#6c6aa8', 'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'reception'=>'#a69944', 'resize'=>'#444', 'rss'=>'#cba',
|
||||||
//'shipment'=>'#a69944',
|
//'shipment'=>'#a69944',
|
||||||
'security'=>'#999', 'stats'=>'#444', 'switch_off'=>'#999', 'technic'=>'#999', 'timespent'=>'#555',
|
'security'=>'#999', 'stats'=>'#444', 'switch_off'=>'#999', 'technic'=>'#999', 'timespent'=>'#555',
|
||||||
'uncheck'=>'#800', 'uparrow'=>'#555', 'user-cog'=>'#999', 'country'=>'#aaa', 'globe-americas'=>'#aaa', 'state'=>'#aaa',
|
'uncheck'=>'#800', 'uparrow'=>'#555', 'user-cog'=>'#999', 'country'=>'#aaa', 'globe-americas'=>'#aaa', 'region'=>'#aaa', 'state'=>'#aaa',
|
||||||
'website'=>'#304', 'workstation'=>'#a69944'
|
'website'=>'#304', 'workstation'=>'#a69944'
|
||||||
);
|
);
|
||||||
if (isset($arrayconvpictotocolor[$pictowithouttext])) {
|
if (isset($arrayconvpictotocolor[$pictowithouttext])) {
|
||||||
@@ -3983,7 +3983,7 @@ function img_edit($titlealt = 'default', $float = 0, $other = '')
|
|||||||
* @param string $other Add more attributes on img
|
* @param string $other Add more attributes on img
|
||||||
* @return string Return tag img
|
* @return string Return tag img
|
||||||
*/
|
*/
|
||||||
function img_view($titlealt = 'default', $float = 0, $other = '')
|
function img_view($titlealt = 'default', $float = 0, $other = 'class="valignmiddle"')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@@ -5497,7 +5497,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer = "", $thirdparty_sell
|
|||||||
} else {
|
} else {
|
||||||
$sql .= " AND t.recuperableonly = '".$db->escape($vatnpr)."'";
|
$sql .= " AND t.recuperableonly = '".$db->escape($vatnpr)."'";
|
||||||
}
|
}
|
||||||
dol_syslog("get_localtax", LOG_DEBUG);
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
|
|||||||
@@ -1797,11 +1797,11 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
$newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->rights->holiday->write);
|
$newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->rights->holiday->write);
|
||||||
$newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=hrm", $langs->trans("List"), 1, $user->rights->holiday->read);
|
$newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=hrm", $langs->trans("List"), 1, $user->rights->holiday->read);
|
||||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "hrm") {
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "hrm") {
|
||||||
$newmenu->add("/holiday/list.php?search_statut=1&mainmenu=hrm&leftmenu=hrm", $langs->trans("DraftCP"), 2, $user->rights->holiday->read);
|
$newmenu->add("/holiday/list.php?search_status=1&mainmenu=hrm&leftmenu=hrm", $langs->trans("DraftCP"), 2, $user->rights->holiday->read);
|
||||||
$newmenu->add("/holiday/list.php?search_statut=2&mainmenu=hrm&leftmenu=hrm", $langs->trans("ToReviewCP"), 2, $user->rights->holiday->read);
|
$newmenu->add("/holiday/list.php?search_status=2&mainmenu=hrm&leftmenu=hrm", $langs->trans("ToReviewCP"), 2, $user->rights->holiday->read);
|
||||||
$newmenu->add("/holiday/list.php?search_statut=3&mainmenu=hrm&leftmenu=hrm", $langs->trans("ApprovedCP"), 2, $user->rights->holiday->read);
|
$newmenu->add("/holiday/list.php?search_status=3&mainmenu=hrm&leftmenu=hrm", $langs->trans("ApprovedCP"), 2, $user->rights->holiday->read);
|
||||||
$newmenu->add("/holiday/list.php?search_statut=4&mainmenu=hrm&leftmenu=hrm", $langs->trans("CancelCP"), 2, $user->rights->holiday->read);
|
$newmenu->add("/holiday/list.php?search_status=4&mainmenu=hrm&leftmenu=hrm", $langs->trans("CancelCP"), 2, $user->rights->holiday->read);
|
||||||
$newmenu->add("/holiday/list.php?search_statut=5&mainmenu=hrm&leftmenu=hrm", $langs->trans("RefuseCP"), 2, $user->rights->holiday->read);
|
$newmenu->add("/holiday/list.php?search_status=5&mainmenu=hrm&leftmenu=hrm", $langs->trans("RefuseCP"), 2, $user->rights->holiday->read);
|
||||||
}
|
}
|
||||||
$newmenu->add("/holiday/define_holiday.php?mainmenu=hrm&action=request", $langs->trans("MenuConfCP"), 1, $user->rights->holiday->read);
|
$newmenu->add("/holiday/define_holiday.php?mainmenu=hrm&action=request", $langs->trans("MenuConfCP"), 1, $user->rights->holiday->read);
|
||||||
$newmenu->add("/holiday/month_report.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuReportMonth"), 1, $user->rights->holiday->readall);
|
$newmenu->add("/holiday/month_report.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuReportMonth"), 1, $user->rights->holiday->readall);
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class modAccounting extends DolibarrModules
|
|||||||
$this->dirs = array('/accounting/temp');
|
$this->dirs = array('/accounting/temp');
|
||||||
|
|
||||||
// Config pages
|
// Config pages
|
||||||
$this->config_page_url = array('accounting.php');
|
$this->config_page_url = array('accounting.php?mainmenu=accountancy&leftmenu=accountancy_admin');
|
||||||
|
|
||||||
// Dependencies
|
// Dependencies
|
||||||
$this->depends = array("modFacture", "modBanque", "modTax"); // List of modules id that must be enabled if this module is enabled
|
$this->depends = array("modFacture", "modBanque", "modTax"); // List of modules id that must be enabled if this module is enabled
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ if ($outputalsopricetotalwithtax) {
|
|||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->statut == 0 && ($object_rights->creer) && $action != 'selectlines') {
|
if ($this->statut == 0 && !empty($object_rights->creer) && $action != 'selectlines') {
|
||||||
$situationinvoicelinewithparent = 0;
|
$situationinvoicelinewithparent = 0;
|
||||||
if ($line->fk_prev_id != null && in_array($object->element, array('facture', 'facturedet'))) {
|
if ($line->fk_prev_id != null && in_array($object->element, array('facture', 'facturedet'))) {
|
||||||
if ($object->type == $object::TYPE_SITUATION) { // The constant TYPE_SITUATION exists only for object invoice
|
if ($object->type == $object::TYPE_SITUATION) { // The constant TYPE_SITUATION exists only for object invoice
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class ConferenceOrBooth extends ActionComm
|
|||||||
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'help'=>"Help text", 'showoncombobox'=>'1',),
|
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'help'=>"Help text", 'showoncombobox'=>'1',),
|
||||||
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty",),
|
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty",),
|
||||||
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1::eventorganization', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1,),
|
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1::eventorganization', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1,),
|
||||||
'note' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1,),
|
'note' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1),
|
||||||
'fk_action' => array('type'=>'sellist:c_actioncomm:libelle:id::module LIKE (\'%@eventorganization\')', 'label'=>'Format', 'enabled'=>'1', 'position'=>60, 'notnull'=>1, 'visible'=>1,),
|
'fk_action' => array('type'=>'sellist:c_actioncomm:libelle:id::module LIKE (\'%@eventorganization\')', 'label'=>'Format', 'enabled'=>'1', 'position'=>60, 'notnull'=>1, 'visible'=>1,),
|
||||||
'datep' => array('type'=>'datetime', 'label'=>'DateStart', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'2',),
|
'datep' => array('type'=>'datetime', 'label'=>'DateStart', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'2',),
|
||||||
'datep2' => array('type'=>'datetime', 'label'=>'DateEnd', 'enabled'=>'1', 'position'=>71, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'3',),
|
'datep2' => array('type'=>'datetime', 'label'=>'DateEnd', 'enabled'=>'1', 'position'=>71, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'3',),
|
||||||
@@ -118,6 +118,7 @@ class ConferenceOrBooth extends ActionComm
|
|||||||
'fk_user_mod' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
|
'fk_user_mod' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
|
||||||
'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
|
'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
|
||||||
'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'default'=>'0', 'index'=>1, 'arrayofkeyval'=>array('0'=>'EvntOrgDraft', '1'=>'EvntOrgSuggested', '2'=> 'EvntOrgConfirmed', '3' =>'EvntOrgNotQualified', '4' =>'EvntOrgDone', '9'=>'EvntOrgCancelled'),),
|
'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'default'=>'0', 'index'=>1, 'arrayofkeyval'=>array('0'=>'EvntOrgDraft', '1'=>'EvntOrgSuggested', '2'=> 'EvntOrgConfirmed', '3' =>'EvntOrgNotQualified', '4' =>'EvntOrgDone', '9'=>'EvntOrgCancelled'),),
|
||||||
|
'num_vote' => array('type'=>'smallint', 'label'=>'NbVotes', 'enabled'=>'1', 'position'=>1001, 'notnull'=>-1, 'visible'=>5, 'default'=>'0', 'index'=>0),
|
||||||
);
|
);
|
||||||
public $rowid;
|
public $rowid;
|
||||||
public $id;
|
public $id;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2021 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
@@ -132,6 +132,30 @@ foreach ($listoftype as $code => $label) {
|
|||||||
$dataseries[] = array($label, (isset($somme[$code]) ? (int) $somme[$code] : 0));
|
$dataseries[] = array($label, (isset($somme[$code]) ? (int) $somme[$code] : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sort array with most important first
|
||||||
|
$dataseries = dol_sort_array($dataseries, 1, 'desc');
|
||||||
|
|
||||||
|
// Merge all entrie after the $KEEPNFIRST one into one entry called "Other..." (to avoid to have too much entries in graphic).
|
||||||
|
$KEEPNFIRST = 7; // Keep first $KEEPNFIRST one + 1 with the remain
|
||||||
|
$i = 0;
|
||||||
|
if (count($dataseries) > ($KEEPNFIRST + 1)) {
|
||||||
|
foreach ($dataseries as $key => $val) {
|
||||||
|
if ($i < $KEEPNFIRST) {
|
||||||
|
$i++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// Here $key = $KEEPNFIRST
|
||||||
|
$dataseries[$KEEPNFIRST][0] = $langs->trans("Others").'...';
|
||||||
|
if ($key == $KEEPNFIRST) {
|
||||||
|
$i++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$dataseries[$KEEPNFIRST][1] += $dataseries[$key][1];
|
||||||
|
unset($dataseries[$key]);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
print '<tr><td class="center" colspan="4">';
|
print '<tr><td class="center" colspan="4">';
|
||||||
|
|
||||||
@@ -221,10 +245,10 @@ if ($result) {
|
|||||||
$userstatic->photo = $obj->photo;
|
$userstatic->photo = $obj->photo;
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$expensereportstatic->getNomUrl(1).'</td>';
|
print '<td class="tdoverflowmax200">'.$expensereportstatic->getNomUrl(1).'</td>';
|
||||||
print '<td>'.$userstatic->getNomUrl(-1).'</td>';
|
print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(-1).'</td>';
|
||||||
print '<td class="right">'.price($obj->total_ht).'</td>';
|
print '<td class="right amount">'.price($obj->total_ht).'</td>';
|
||||||
print '<td class="right">'.price($obj->total_ttc).'</td>';
|
print '<td class="right amount">'.price($obj->total_ttc).'</td>';
|
||||||
print '<td class="right">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>';
|
print '<td class="right">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>';
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print $expensereportstatic->getLibStatut(3);
|
print $expensereportstatic->getLibStatut(3);
|
||||||
|
|||||||
@@ -2261,7 +2261,7 @@ class Holiday extends CommonObject
|
|||||||
$response->warning_delay = $conf->holiday->approve->warning_delay / 60 / 60 / 24;
|
$response->warning_delay = $conf->holiday->approve->warning_delay / 60 / 60 / 24;
|
||||||
$response->label = $langs->trans("HolidaysToApprove");
|
$response->label = $langs->trans("HolidaysToApprove");
|
||||||
$response->labelShort = $langs->trans("ToApprove");
|
$response->labelShort = $langs->trans("ToApprove");
|
||||||
$response->url = DOL_URL_ROOT.'/holiday/list.php?search_statut=2&mainmenu=hrm&leftmenu=holiday';
|
$response->url = DOL_URL_ROOT.'/holiday/list.php?search_status=2&mainmenu=hrm&leftmenu=holiday';
|
||||||
$response->img = img_object('', "holiday");
|
$response->img = img_object('', "holiday");
|
||||||
|
|
||||||
while ($obj = $this->db->fetch_object($resql)) {
|
while ($obj = $this->db->fetch_object($resql)) {
|
||||||
|
|||||||
@@ -310,11 +310,11 @@ if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire)
|
|||||||
$userstatic->photo = $obj->photo;
|
$userstatic->photo = $obj->photo;
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td class="nowraponall">'.$expensereportstatic->getNomUrl(1).'</td>';
|
print '<td class="tdoverflowmax200">'.$expensereportstatic->getNomUrl(1).'</td>';
|
||||||
print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(-1).'</td>';
|
print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(-1).'</td>';
|
||||||
print '<td class="right">'.price($obj->total_ttc).'</td>';
|
print '<td class="right amount">'.price($obj->total_ttc).'</td>';
|
||||||
print '<td class="right">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>';
|
print '<td class="right">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>';
|
||||||
print '<td class="right nowrap" width="16">'.$expensereportstatic->LibStatut($obj->status, 3).'</td>';
|
print '<td class="right nowraponall" width="16">'.$expensereportstatic->LibStatut($obj->status, 3).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@@ -80,6 +80,10 @@ div.soustitre {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wordbreak {
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
.minwidth100 { min-width: 100px; }
|
.minwidth100 { min-width: 100px; }
|
||||||
.minwidth200 { min-width: 200px; }
|
.minwidth200 { min-width: 200px; }
|
||||||
.minwidth300 { min-width: 300px; }
|
.minwidth300 { min-width: 300px; }
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||||
-- Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
-- Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
-- Copyright (C) 2020 Udo Tamm <dev@dolibit.de>
|
-- Copyright (C) 2020 Udo Tamm <dev@dolibit.de>
|
||||||
|
-- Copyright (C) 2021 Lenin Rivas <lenin@leninrivas.com>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -50,7 +51,7 @@ INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BDT'
|
|||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BYR', '[112,46]', 1, 'Belarus Ruble');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BYR', '[112,46]', 1, 'Belarus Ruble');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BZD', '[66,90,36]', 1, 'Belize Dollar');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BZD', '[66,90,36]', 1, 'Belize Dollar');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BMD', '[36]', 1, 'Bermuda Dollar');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BMD', '[36]', 1, 'Bermuda Dollar');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BOB', '[36,98]', 1, 'Bolivia Boliviano');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BOB', '[66,115]', 1, 'Bolivia Boliviano');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BAM', '[75,77]', 1, 'Bosnia and Herzegovina Convertible Marka');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BAM', '[75,77]', 1, 'Bosnia and Herzegovina Convertible Marka');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BWP', '[80]', 1, 'Botswana Pula');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BWP', '[80]', 1, 'Botswana Pula');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BGN', '[1083,1074]', 1, 'Bulgaria Lev');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'BGN', '[1083,1074]', 1, 'Bulgaria Lev');
|
||||||
@@ -70,6 +71,7 @@ INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'CZK'
|
|||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'DKK', '[107,114]', 1, 'Denmark Krone');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'DKK', '[107,114]', 1, 'Denmark Krone');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'DOP', '[82,68,36]', 1, 'Dominican Republic Peso');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'DOP', '[82,68,36]', 1, 'Dominican Republic Peso');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'XCD', '[36]', 1, 'East Caribbean Dollar');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'XCD', '[36]', 1, 'East Caribbean Dollar');
|
||||||
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'ECS', '[83,47,46]', 1, 'Ecuador Sucre');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'EGP', '[163]', 1, 'Egypt Pound');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'EGP', '[163]', 1, 'Egypt Pound');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'SVC', '[36]', 1, 'El Salvador Colon');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'SVC', '[36]', 1, 'El Salvador Colon');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'EEK', '[107,114]', 1, 'Estonia Kroon');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'EEK', '[107,114]', 1, 'Estonia Kroon');
|
||||||
@@ -126,7 +128,7 @@ INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'OMR'
|
|||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'PKR', '[8360]', 1, 'Pakistan Rupee');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'PKR', '[8360]', 1, 'Pakistan Rupee');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'PAB', '[66,47,46]', 1, 'Panama Balboa');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'PAB', '[66,47,46]', 1, 'Panama Balboa');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'PYG', '[71,115]', 1, 'Paraguay Guarani');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'PYG', '[71,115]', 1, 'Paraguay Guarani');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'PEN', '[83,47,46]', 1, 'Peru Nuevo Sol');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'PEN', '[83,47]', 1, 'Perú Sol');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'PHP', '[8369]', 1, 'Philippines Peso');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'PHP', '[8369]', 1, 'Philippines Peso');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'PLN', '[122,322]', 1, 'Poland Zloty');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'PLN', '[122,322]', 1, 'Poland Zloty');
|
||||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'QAR', '[65020]', 1, 'Qatar Riyal');
|
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'QAR', '[65020]', 1, 'Qatar Riyal');
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private,
|
|||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,<br><br>\n\n__(YourCandidatureAnswerMessage)__<br>__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,<br><br>\n\n__(YourCandidatureAnswerMessage)__<br>__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||||
|
|
||||||
-- Event organization
|
-- Event organization
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailAskConf', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, 'EventOrganizationEmailAskConf', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailAskBooth', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, 'EventOrganizationEmailAskBooth', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailSubsBooth', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, 'EventOrganizationEmailSubsBooth', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailSubsEvent', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__<br /><br />__(Sincerely)__<br /><br />__MYCOMPANY_NAME__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, 'EventOrganizationEmailSubsEvent', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__<br /><br />__(Sincerely)__<br /><br />__MYCOMPANY_NAME__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationMassEmailAttendees', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, 'EventOrganizationMassEmailAttendees', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationMassEmailSpeakers', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, 'EventOrganizationMassEmailSpeakers', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
|
|||||||
@@ -428,6 +428,10 @@ create table llx_eventorganization_conferenceorboothattendee_extrafields
|
|||||||
ALTER TABLE llx_eventorganization_conferenceorboothattendee_extrafields ADD INDEX idx_conferenceorboothattendee_fk_object(fk_object);
|
ALTER TABLE llx_eventorganization_conferenceorboothattendee_extrafields ADD INDEX idx_conferenceorboothattendee_fk_object(fk_object);
|
||||||
|
|
||||||
ALTER TABLE llx_c_ticket_category ADD COLUMN public integer DEFAULT 0;
|
ALTER TABLE llx_c_ticket_category ADD COLUMN public integer DEFAULT 0;
|
||||||
|
|
||||||
|
-- VPGSQL8.2 ALTER TABLE llx_c_ticket_category ALTER COLUMN pos TYPE INTEGER USING pos::INTEGER;
|
||||||
|
-- VPGSQL8.2 ALTER TABLE llx_c_ticket_category ALTER COLUMN pos SET NOT NULL;
|
||||||
|
-- VPGSQL8.2 ALTER TABLE llx_c_ticket_category ALTER COLUMN pos SET DEFAULT 0;
|
||||||
ALTER TABLE llx_c_ticket_category MODIFY COLUMN pos integer DEFAULT 0 NOT NULL;
|
ALTER TABLE llx_c_ticket_category MODIFY COLUMN pos integer DEFAULT 0 NOT NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -448,7 +448,16 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
|
|||||||
migrate_contacts_socialnetworks();
|
migrate_contacts_socialnetworks();
|
||||||
migrate_thirdparties_socialnetworks();
|
migrate_thirdparties_socialnetworks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Scripts for 14.0
|
||||||
|
$afterversionarray = explode('.', '13.0.9');
|
||||||
|
$beforeversionarray = explode('.', '14.0.9');
|
||||||
|
if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) {
|
||||||
|
migrate_export_import_profiles('export');
|
||||||
|
migrate_export_import_profiles('import');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Code executed only if migration is LAST ONE. Must always be done.
|
// Code executed only if migration is LAST ONE. Must always be done.
|
||||||
if (versioncompare($versiontoarray, $versionranarray) >= 0 || versioncompare($versiontoarray, $versionranarray) <= -3) {
|
if (versioncompare($versiontoarray, $versionranarray) >= 0 || versioncompare($versiontoarray, $versionranarray) <= -3) {
|
||||||
@@ -4904,3 +4913,74 @@ function migrate_thirdparties_socialnetworks()
|
|||||||
print '<b>'.$langs->trans('MigrationFieldsSocialNetworks', 'Thirdparties')."</b><br>\n";
|
print '<b>'.$langs->trans('MigrationFieldsSocialNetworks', 'Thirdparties')."</b><br>\n";
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migrate export and import profiles to fix field name that was renamed
|
||||||
|
*
|
||||||
|
* @param string $mode 'export' or 'import'
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function migrate_export_import_profiles($mode = 'export')
|
||||||
|
{
|
||||||
|
global $db, $langs;
|
||||||
|
|
||||||
|
$error = 0;
|
||||||
|
$resultstring = '';
|
||||||
|
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
|
print '<tr class="trforrunsql"><td colspan="4">';
|
||||||
|
$sql = 'SELECT rowid, field';
|
||||||
|
if ($mode == 'export') {
|
||||||
|
$sql .= ', filter';
|
||||||
|
}
|
||||||
|
$sql .= ' FROM '.MAIN_DB_PREFIX.$mode.'_model WHERE';
|
||||||
|
$sql .= " type LIKE 'propale_%' OR type LIKE 'commande_%' OR type LIKE 'facture_%'";
|
||||||
|
//print $sql;
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if ($resql) {
|
||||||
|
while ($obj = $db->fetch_object($resql)) {
|
||||||
|
$oldfield = $obj->field;
|
||||||
|
$newfield = str_replace(array('f.facnumber,', 'f.total,', 'f.tva,'), array('f.ref,', 'f.total_ht,', 'f.total_tva,'), $oldfield);
|
||||||
|
|
||||||
|
if ($mode == 'export') {
|
||||||
|
$oldfilter = $obj->filter;
|
||||||
|
$newfilter = str_replace(array('f.facnumber,', 'f.total,', 'f.tva,'), array('f.ref,', 'f.total_ht,', 'f.total_tva,'), $oldfilter);
|
||||||
|
} else {
|
||||||
|
$oldfilter = '';
|
||||||
|
$newfilter = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($oldfield != $newfield || $oldfilter != $newfilter) {
|
||||||
|
$sqlupd = 'UPDATE '.MAIN_DB_PREFIX.$mode."_model SET field = '".$db->escape($newfield)."'";
|
||||||
|
if ($mode == 'export') {
|
||||||
|
$sql .= ", filter = '".$db->escape($newfilter)."'";
|
||||||
|
}
|
||||||
|
$sqlupd .= ' WHERE rowid='.$obj->rowid;
|
||||||
|
$resultstring .= '<tr class="trforrunsql" style=""><td class="wordbreak" colspan="4">'.$sqlupd."</td></tr>\n";
|
||||||
|
$resqlupd = $db->query($sqlupd);
|
||||||
|
if (!$resqlupd) {
|
||||||
|
dol_print_error($db);
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
if (!$error) {
|
||||||
|
$db->commit();
|
||||||
|
} else {
|
||||||
|
dol_print_error($db);
|
||||||
|
$db->rollback();
|
||||||
|
}
|
||||||
|
print '<b>'.$langs->trans('MigrationImportOrExportProfiles', $mode)."</b><br>\n";
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
if ($resultstring) {
|
||||||
|
print $resultstring;
|
||||||
|
} else {
|
||||||
|
print '<tr class="trforrunsql" style=""><td class="wordbreak" colspan="4">'.$langs->trans("NothingToDo")."</td></tr>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -91,8 +91,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified
|
|||||||
BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified
|
BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified
|
||||||
BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified
|
BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified
|
||||||
BoxTitleLastModifiedPropals=Latest %s modified proposals
|
BoxTitleLastModifiedPropals=Latest %s modified proposals
|
||||||
BoxTitleLatestModifiedJobPositions=Latest %s modified jobs
|
BoxTitleLatestModifiedJobPositions=Latest %s modified job positions
|
||||||
BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures
|
BoxTitleLatestModifiedCandidatures=Latest %s modified job applications
|
||||||
ForCustomersInvoices=Customers invoices
|
ForCustomersInvoices=Customers invoices
|
||||||
ForCustomersOrders=Customers orders
|
ForCustomersOrders=Customers orders
|
||||||
ForProposals=Proposals
|
ForProposals=Proposals
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ DownloadICSLink = Download ICS link
|
|||||||
EVENTORGANIZATION_SECUREKEY = Secure Key of the public registration link to a conference
|
EVENTORGANIZATION_SECUREKEY = Secure Key of the public registration link to a conference
|
||||||
SERVICE_BOOTH_LOCATION = Service used for the invoice row about a booth location
|
SERVICE_BOOTH_LOCATION = Service used for the invoice row about a booth location
|
||||||
SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION = Service used for the invoice row about an attendee subscription to a conference
|
SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION = Service used for the invoice row about an attendee subscription to a conference
|
||||||
|
NbVotes=Number of votes
|
||||||
#
|
#
|
||||||
# Status
|
# Status
|
||||||
#
|
#
|
||||||
@@ -115,6 +116,9 @@ EvntOrgDuration = This conference starts on %s and ends on %s.
|
|||||||
ConferenceAttendeeFee = Conference attendee fee for the event : '%s' occurring from %s to %s.
|
ConferenceAttendeeFee = Conference attendee fee for the event : '%s' occurring from %s to %s.
|
||||||
BoothLocationFee = Booth location for the event : '%s' occurring from %s to %s
|
BoothLocationFee = Booth location for the event : '%s' occurring from %s to %s
|
||||||
EventType = Event type
|
EventType = Event type
|
||||||
|
LabelOfBooth=Booth label
|
||||||
|
LabelOfconference=Conference label
|
||||||
|
ConferenceIsNotConfirmed=Subcription not available, conference is not confirmed yet
|
||||||
|
|
||||||
#
|
#
|
||||||
# Vote page
|
# Vote page
|
||||||
|
|||||||
@@ -206,6 +206,7 @@ MigrationUserPhotoPath=Migration of photo paths for users
|
|||||||
MigrationFieldsSocialNetworks=Migration of users fields social networks (%s)
|
MigrationFieldsSocialNetworks=Migration of users fields social networks (%s)
|
||||||
MigrationReloadModule=Reload module %s
|
MigrationReloadModule=Reload module %s
|
||||||
MigrationResetBlockedLog=Reset module BlockedLog for v7 algorithm
|
MigrationResetBlockedLog=Reset module BlockedLog for v7 algorithm
|
||||||
|
MigrationImportOrExportProfiles=Migration of import or export profiles (%s)
|
||||||
ShowNotAvailableOptions=Show unavailable options
|
ShowNotAvailableOptions=Show unavailable options
|
||||||
HideNotAvailableOptions=Hide unavailable options
|
HideNotAvailableOptions=Hide unavailable options
|
||||||
ErrorFoundDuringMigration=Error(s) were reported during the migration process so next step is not available. To ignore errors, you can <a href="%s">click here</a>, but the application or some features may not work correctly until the errors are resolved.
|
ErrorFoundDuringMigration=Error(s) were reported during the migration process so next step is not available. To ignore errors, you can <a href="%s">click here</a>, but the application or some features may not work correctly until the errors are resolved.
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ if ($reshook < 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Action called when page is submitted
|
// Action called when page is submitted
|
||||||
if (empty($reshook) && $action == 'add') {
|
if (empty($reshook) && $action == 'add' && $conference->status==2) {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$urlback = '';
|
$urlback = '';
|
||||||
@@ -473,25 +473,27 @@ print $langs->trans("EvntOrgWelcomeMessage", $conference->label);
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
print $langs->trans("EvntOrgDuration", dol_print_date($conference->datep), dol_print_date($conference->datef));
|
print $langs->trans("EvntOrgDuration", dol_print_date($conference->datep), dol_print_date($conference->datef));
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
dol_htmloutput_errors($errmsg);
|
dol_htmloutput_errors($errmsg);
|
||||||
|
|
||||||
// Print form
|
if ($conference->status!=2) {
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="newmember">'."\n";
|
print $langs->trans("ConferenceIsNotConfirmed");
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'" / >';
|
} else {
|
||||||
print '<input type="hidden" name="entity" value="'.$entity.'" />';
|
// Print form
|
||||||
print '<input type="hidden" name="action" value="add" />';
|
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST" name="newmember">' . "\n";
|
||||||
print '<input type="hidden" name="id" value="'.$id.'" />';
|
print '<input type="hidden" name="token" value="' . newToken() . '" / >';
|
||||||
print '<input type="hidden" name="securekey" value="'.$securekeyreceived.'" />';
|
print '<input type="hidden" name="entity" value="' . $entity . '" />';
|
||||||
|
print '<input type="hidden" name="action" value="add" />';
|
||||||
|
print '<input type="hidden" name="id" value="' . $id . '" />';
|
||||||
|
print '<input type="hidden" name="securekey" value="' . $securekeyreceived . '" />';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<br><span class="opacitymedium">'.$langs->trans("FieldsWithAreMandatory", '*').'</span><br>';
|
print '<br><span class="opacitymedium">' . $langs->trans("FieldsWithAreMandatory", '*') . '</span><br>';
|
||||||
//print $langs->trans("FieldsWithIsForPublic",'**').'<br>';
|
//print $langs->trans("FieldsWithIsForPublic",'**').'<br>';
|
||||||
|
|
||||||
print dol_get_fiche_head('');
|
print dol_get_fiche_head('');
|
||||||
|
|
||||||
print '<script type="text/javascript">
|
print '<script type="text/javascript">
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
jQuery("#selectcountry_id").change(function() {
|
jQuery("#selectcountry_id").change(function() {
|
||||||
@@ -502,32 +504,32 @@ jQuery(document).ready(function () {
|
|||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n";
|
print '<table class="border" summary="form to subscribe" id="tablesubscribe">' . "\n";
|
||||||
|
|
||||||
// Email
|
// Email
|
||||||
print '<tr><td>'.$langs->trans("Email").'<FONT COLOR="red">*</FONT></td><td><input type="text" name="email" maxlength="255" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('email')).'"></td></tr>'."\n";
|
print '<tr><td>' . $langs->trans("Email") . '<FONT COLOR="red">*</FONT></td><td><input type="text" name="email" maxlength="255" class="minwidth150" value="' . dol_escape_htmltag(GETPOST('email')) . '"></td></tr>' . "\n";
|
||||||
// Company
|
// Company
|
||||||
print '<tr id="trcompany" class="trcompany"><td>'.$langs->trans("Company");
|
print '<tr id="trcompany" class="trcompany"><td>' . $langs->trans("Company");
|
||||||
if (!empty(floatval($project->price_registration))) {
|
if (!empty(floatval($project->price_registration))) {
|
||||||
print '<FONT COLOR="red">*</FONT>';
|
print '<FONT COLOR="red">*</FONT>';
|
||||||
}
|
}
|
||||||
print ' </td><td><input type="text" name="societe" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('societe')).'"></td></tr>'."\n";
|
print ' </td><td><input type="text" name="societe" class="minwidth150" value="' . dol_escape_htmltag(GETPOST('societe')) . '"></td></tr>' . "\n";
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td>'.$langs->trans("Address").'</td><td>'."\n";
|
print '<tr><td>' . $langs->trans("Address") . '</td><td>' . "\n";
|
||||||
print '<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n";
|
print '<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="' . ROWS_3 . '">' . dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1) . '</textarea></td></tr>' . "\n";
|
||||||
// Zip / Town
|
// Zip / Town
|
||||||
print '<tr><td>'.$langs->trans('Zip').' / '.$langs->trans('Town').'</td><td>';
|
print '<tr><td>' . $langs->trans('Zip') . ' / ' . $langs->trans('Town') . '</td><td>';
|
||||||
print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6, 1);
|
print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6, 1);
|
||||||
print ' / ';
|
print ' / ';
|
||||||
print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1);
|
print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// Country
|
// Country
|
||||||
print '<tr><td>'.$langs->trans('Country').'<FONT COLOR="red">*</FONT></td><td>';
|
print '<tr><td>' . $langs->trans('Country') . '<FONT COLOR="red">*</FONT></td><td>';
|
||||||
$country_id = GETPOST('country_id');
|
$country_id = GETPOST('country_id');
|
||||||
if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
|
if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
|
||||||
$country_id = getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
|
$country_id = getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
|
||||||
}
|
}
|
||||||
if (!$country_id && !empty($conf->geoipmaxmind->enabled)) {
|
if (!$country_id && !empty($conf->geoipmaxmind->enabled)) {
|
||||||
$country_code = dol_user_country();
|
$country_code = dol_user_country();
|
||||||
//print $country_code;
|
//print $country_code;
|
||||||
if ($country_code) {
|
if ($country_code) {
|
||||||
@@ -537,39 +539,39 @@ if (!$country_id && !empty($conf->geoipmaxmind->enabled)) {
|
|||||||
$country_id = $new_country_id;
|
$country_id = $new_country_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$country_code = getCountry($country_id, 2, $db, $langs);
|
$country_code = getCountry($country_id, 2, $db, $langs);
|
||||||
print $form->select_country($country_id, 'country_id');
|
print $form->select_country($country_id, 'country_id');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// State
|
// State
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
|
if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
|
||||||
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
print '<tr><td>' . $langs->trans('State') . '</td><td>';
|
||||||
if ($country_code) {
|
if ($country_code) {
|
||||||
print $formcompany->select_state(GETPOST("state_id"), $country_code);
|
print $formcompany->select_state(GETPOST("state_id"), $country_code);
|
||||||
} else {
|
} else {
|
||||||
print '';
|
print '';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print "</table>\n";
|
||||||
|
|
||||||
|
print dol_get_fiche_end();
|
||||||
|
|
||||||
|
// Save
|
||||||
|
print '<div class="center">';
|
||||||
|
print '<input type="submit" value="' . $langs->trans("Submit") . '" id="submitsave" class="button">';
|
||||||
|
if (!empty($backtopage)) {
|
||||||
|
print ' <input type="submit" value="' . $langs->trans("Cancel") . '" id="submitcancel" class="button button-cancel">';
|
||||||
|
}
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
print "</form>\n";
|
||||||
|
print "<br>";
|
||||||
|
print '</div></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>\n";
|
|
||||||
|
|
||||||
print dol_get_fiche_end();
|
|
||||||
|
|
||||||
// Save
|
|
||||||
print '<div class="center">';
|
|
||||||
print '<input type="submit" value="'.$langs->trans("Submit").'" id="submitsave" class="button">';
|
|
||||||
if (!empty($backtopage)) {
|
|
||||||
print ' <input type="submit" value="'.$langs->trans("Cancel").'" id="submitcancel" class="button button-cancel">';
|
|
||||||
}
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
|
|
||||||
print "</form>\n";
|
|
||||||
print "<br>";
|
|
||||||
print '</div></div>';
|
|
||||||
|
|
||||||
|
|
||||||
llxFooterVierge();
|
llxFooterVierge();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@@ -1302,6 +1302,12 @@ if ($ispaymentok) {
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
// End call triggers
|
// End call triggers
|
||||||
|
} elseif (get_class($object) == 'stdClass') {
|
||||||
|
//In some case $object is not instanciate (for paiement on custom object) We need to deal with payment
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
|
$paiement = new Paiement($db);
|
||||||
|
$result = $paiement->call_trigger('PAYMENTONLINE_PAYMENT_OK', $user);
|
||||||
|
if ($result < 0) $error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print $langs->trans("YourPaymentHasBeenRecorded")."<br>\n";
|
print $langs->trans("YourPaymentHasBeenRecorded")."<br>\n";
|
||||||
|
|||||||
@@ -405,6 +405,7 @@ if (empty($reshook) && $action == 'add') {
|
|||||||
$facture->paye = 0;
|
$facture->paye = 0;
|
||||||
$facture->date = dol_now();
|
$facture->date = dol_now();
|
||||||
$facture->cond_reglement_id = $contact->cond_reglement_id;
|
$facture->cond_reglement_id = $contact->cond_reglement_id;
|
||||||
|
$facture->fk_project = $project->id;
|
||||||
|
|
||||||
if (empty($facture->cond_reglement_id)) {
|
if (empty($facture->cond_reglement_id)) {
|
||||||
$paymenttermstatic = new PaymentTerm($contact->db);
|
$paymenttermstatic = new PaymentTerm($contact->db);
|
||||||
@@ -469,7 +470,7 @@ if (empty($reshook) && $action == 'add') {
|
|||||||
|
|
||||||
$labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH;
|
$labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH;
|
||||||
if (!empty($labeltouse)) {
|
if (!empty($labeltouse)) {
|
||||||
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, '');
|
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'conferenceorbooth', $user, $outputlangs, $labeltouse, 1, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
|
if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
|
||||||
@@ -569,7 +570,7 @@ jQuery(document).ready(function () {
|
|||||||
print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n";
|
print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n";
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
print '<tr><td><label for="lastname">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'<FONT COLOR="red">*</FONT></label></td>';
|
print '<tr><td><label for="lastname">'.$langs->trans("Lastname").'<FONT COLOR="red">*</FONT></label></td>';
|
||||||
print '<td colspan="3"><input name="lastname" id="lastname" type="text" class="maxwidth100onsmartphone" maxlength="80" value="'.dol_escape_htmltag(GETPOST("lastname", 'alpha') ?GETPOST("lastname", 'alpha') : $object->lastname).'" autofocus="autofocus"></td>';
|
print '<td colspan="3"><input name="lastname" id="lastname" type="text" class="maxwidth100onsmartphone" maxlength="80" value="'.dol_escape_htmltag(GETPOST("lastname", 'alpha') ?GETPOST("lastname", 'alpha') : $object->lastname).'" autofocus="autofocus"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
// Email
|
// Email
|
||||||
@@ -577,21 +578,6 @@ print '<tr><td>'.$langs->trans("Email").'<FONT COLOR="red">*</FONT></td><td><inp
|
|||||||
// Company
|
// Company
|
||||||
print '<tr id="trcompany" class="trcompany"><td>'.$langs->trans("Company").'<FONT COLOR="red">*</FONT>';
|
print '<tr id="trcompany" class="trcompany"><td>'.$langs->trans("Company").'<FONT COLOR="red">*</FONT>';
|
||||||
print ' </td><td><input type="text" name="societe" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('societe')).'"></td></tr>'."\n";
|
print ' </td><td><input type="text" name="societe" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('societe')).'"></td></tr>'."\n";
|
||||||
// Type of event
|
|
||||||
print '<tr><td>'.$langs->trans("EventType").'<FONT COLOR="red">*</FONT></td>'."\n";
|
|
||||||
print '<td>'.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).'</td>';
|
|
||||||
// Label
|
|
||||||
print '<tr><td>'.$langs->trans("Label").'<FONT COLOR="red">*</FONT></td>'."\n";
|
|
||||||
print '</td><td><input type="text" name="label" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('label')).'"></td></tr>'."\n";
|
|
||||||
// Note
|
|
||||||
print '<tr><td>'.$langs->trans("Note").'<FONT COLOR="red">*</FONT></td>'."\n";
|
|
||||||
print '<td><input type="text" name="note" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('note')).'"></td></tr>'."\n";
|
|
||||||
// Start Date
|
|
||||||
print '<tr><td>'.$langs->trans("DateStart").'<FONT COLOR="red">*</FONT></td>'."\n";
|
|
||||||
print '<td><input type="date" name="datestart" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('datestart')).'"></td></tr>'."\n";
|
|
||||||
// End Date
|
|
||||||
print '<tr><td>'.$langs->trans("DateEnd").'<FONT COLOR="red">*</FONT></td>'."\n";
|
|
||||||
print '<td><input type="date" name="dateend" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('dateend')).'"></td></tr>'."\n";
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td>'.$langs->trans("Address").'</td><td>'."\n";
|
print '<tr><td>'.$langs->trans("Address").'</td><td>'."\n";
|
||||||
print '<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n";
|
print '<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n";
|
||||||
@@ -603,9 +589,8 @@ print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'se
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// Country
|
// Country
|
||||||
print '<tr><td>'.$langs->trans('Country');
|
print '<tr><td>'.$langs->trans('Country');
|
||||||
if (!empty(floatval($project->price_booth))) {
|
print '<span style="color:red">*</span>';
|
||||||
print '<FONT COLOR="red">*</FONT>';
|
|
||||||
}
|
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
$country_id = GETPOST('country_id');
|
$country_id = GETPOST('country_id');
|
||||||
if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
|
if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
|
||||||
@@ -635,6 +620,22 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
// Type of event
|
||||||
|
print '<tr><td>'.$langs->trans("EventType").'<FONT COLOR="red">*</FONT></td>'."\n";
|
||||||
|
print '<td>'.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).'</td>';
|
||||||
|
// Label
|
||||||
|
print '<tr><td>'.$langs->trans("LabelOfBooth").'<FONT COLOR="red">*</FONT></td>'."\n";
|
||||||
|
print '</td><td><input type="text" name="label" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('label')).'"></td></tr>'."\n";
|
||||||
|
// Note
|
||||||
|
print '<tr><td>'.$langs->trans("Description").'<FONT COLOR="red">*</FONT></td>'."\n";
|
||||||
|
print '<td><textarea name="note" id="note" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('note', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n";
|
||||||
|
// Start Date
|
||||||
|
print '<tr><td>'.$langs->trans("DateStart").'<FONT COLOR="red">*</FONT></td>'."\n";
|
||||||
|
print '<td><input type="date" name="datestart" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('datestart')).'"></td></tr>'."\n";
|
||||||
|
// End Date
|
||||||
|
print '<tr><td>'.$langs->trans("DateEnd").'<FONT COLOR="red">*</FONT></td>'."\n";
|
||||||
|
print '<td><input type="date" name="dateend" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('dateend')).'"></td></tr>'."\n";
|
||||||
|
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
|
|||||||
@@ -409,7 +409,7 @@ if (empty($reshook) && $action == 'add') {
|
|||||||
|
|
||||||
$labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF;
|
$labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF;
|
||||||
if (!empty($labeltouse)) {
|
if (!empty($labeltouse)) {
|
||||||
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, '');
|
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'conferenceorbooth', $user, $outputlangs, $labeltouse, 1, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
|
if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
|
||||||
@@ -508,11 +508,11 @@ jQuery(document).ready(function () {
|
|||||||
print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n";
|
print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n";
|
||||||
|
|
||||||
// Last Name
|
// Last Name
|
||||||
print '<tr><td><label for="lastname">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'<FONT COLOR="red">*</FONT></label></td>';
|
print '<tr><td><label for="lastname">'.$langs->trans("Lastname").'<FONT COLOR="red">*</FONT></label></td>';
|
||||||
print '<td colspan="3"><input name="lastname" id="lastname" type="text" class="maxwidth100onsmartphone" maxlength="80" value="'.dol_escape_htmltag(GETPOST("lastname", 'alpha') ?GETPOST("lastname", 'alpha') : $object->lastname).'" autofocus="autofocus"></td>';
|
print '<td colspan="3"><input name="lastname" id="lastname" type="text" class="maxwidth100onsmartphone" maxlength="80" value="'.dol_escape_htmltag(GETPOST("lastname", 'alpha') ?GETPOST("lastname", 'alpha') : $object->lastname).'" autofocus="autofocus"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
// First Name
|
// First Name
|
||||||
print '<tr><td><label for="firstname">'.$langs->trans("Firstname").' / '.$langs->trans("Label").'<FONT COLOR="red">*</FONT></label></td>';
|
print '<tr><td><label for="firstname">'.$langs->trans("Firstname").'<FONT COLOR="red">*</FONT></label></td>';
|
||||||
print '<td colspan="3"><input name="firstname" id="firstname" type="text" class="maxwidth100onsmartphone" maxlength="80" value="'.dol_escape_htmltag(GETPOST("firstname", 'alpha') ?GETPOST("firstname", 'alpha') : $object->firstname).'" autofocus="autofocus"></td>';
|
print '<td colspan="3"><input name="firstname" id="firstname" type="text" class="maxwidth100onsmartphone" maxlength="80" value="'.dol_escape_htmltag(GETPOST("firstname", 'alpha') ?GETPOST("firstname", 'alpha') : $object->firstname).'" autofocus="autofocus"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
// Email
|
// Email
|
||||||
@@ -520,21 +520,6 @@ print '<tr><td>'.$langs->trans("Email").'<FONT COLOR="red">*</FONT></td><td><inp
|
|||||||
// Company
|
// Company
|
||||||
print '<tr id="trcompany" class="trcompany"><td>'.$langs->trans("Company").'<FONT COLOR="red">*</FONT>';
|
print '<tr id="trcompany" class="trcompany"><td>'.$langs->trans("Company").'<FONT COLOR="red">*</FONT>';
|
||||||
print ' </td><td><input type="text" name="societe" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('societe')).'"></td></tr>'."\n";
|
print ' </td><td><input type="text" name="societe" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('societe')).'"></td></tr>'."\n";
|
||||||
// Type of event
|
|
||||||
print '<tr><td>'.$langs->trans("EventType").'<FONT COLOR="red">*</FONT></td>'."\n";
|
|
||||||
print '<td>'.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).'</td>';
|
|
||||||
// Label
|
|
||||||
print '<tr><td>'.$langs->trans("Label").'<FONT COLOR="red">*</FONT></td>'."\n";
|
|
||||||
print '</td><td><input type="text" name="label" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('label')).'"></td></tr>'."\n";
|
|
||||||
// Note
|
|
||||||
print '<tr><td>'.$langs->trans("Note").'<FONT COLOR="red">*</FONT></td>'."\n";
|
|
||||||
print '<td><input type="text" name="note" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('note')).'"></td></tr>'."\n";
|
|
||||||
// Start Date
|
|
||||||
print '<tr><td>'.$langs->trans("DateStart").'</td>'."\n";
|
|
||||||
print '<td><input type="date" name="datestart" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('datestart')).'"></td></tr>'."\n";
|
|
||||||
// End Date
|
|
||||||
print '<tr><td>'.$langs->trans("DateEnd").'</td>'."\n";
|
|
||||||
print '<td><input type="date" name="dateend" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('dateend')).'"></td></tr>'."\n";
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td>'.$langs->trans("Address").'</td><td>'."\n";
|
print '<tr><td>'.$langs->trans("Address").'</td><td>'."\n";
|
||||||
print '<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n";
|
print '<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n";
|
||||||
@@ -574,6 +559,22 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
// Type of event
|
||||||
|
print '<tr><td>'.$langs->trans("EventType").'<FONT COLOR="red">*</FONT></td>'."\n";
|
||||||
|
print '<td>'.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).'</td>';
|
||||||
|
// Label
|
||||||
|
print '<tr><td>'.$langs->trans("LabelOfconference").'<FONT COLOR="red">*</FONT></td>'."\n";
|
||||||
|
print '</td><td><input type="text" name="label" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('label')).'"></td></tr>'."\n";
|
||||||
|
// Note
|
||||||
|
print '<tr><td>'.$langs->trans("Description").'<FONT COLOR="red">*</FONT></td>'."\n";
|
||||||
|
print '<td><textarea name="note" id="note" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('note', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n";
|
||||||
|
// Start Date
|
||||||
|
print '<tr><td>'.$langs->trans("DateStart").'</td>'."\n";
|
||||||
|
print '<td><input type="date" name="datestart" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('datestart')).'"></td></tr>'."\n";
|
||||||
|
// End Date
|
||||||
|
print '<tr><td>'.$langs->trans("DateEnd").'</td>'."\n";
|
||||||
|
print '<td><input type="date" name="dateend" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('dateend')).'"></td></tr>'."\n";
|
||||||
|
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ if ($conf->use_javascript_ajax) {
|
|||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder nohover centpercent">';
|
print '<table class="noborder nohover centpercent">';
|
||||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Candidatures").'</th></tr>'."\n";
|
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("RecruitmentCandidatures").'</th></tr>'."\n";
|
||||||
$listofstatus = array(0, 1, 3, 5, 8, 9);
|
$listofstatus = array(0, 1, 3, 5, 8, 9);
|
||||||
foreach ($listofstatus as $status) {
|
foreach ($listofstatus as $status) {
|
||||||
$dataseries[] = array(dol_html_entity_decode($staticrecruitmentcandidature->LibStatut($status, 1), ENT_QUOTES | ENT_HTML5), (isset($vals[$status]) ? (int) $vals[$status] : 0));
|
$dataseries[] = array(dol_html_entity_decode($staticrecruitmentcandidature->LibStatut($status, 1), ENT_QUOTES | ENT_HTML5), (isset($vals[$status]) ? (int) $vals[$status] : 0));
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ if ($setterminal > 0) {
|
|||||||
|
|
||||||
if ($setcurrency != "") {
|
if ($setcurrency != "") {
|
||||||
$_SESSION["takeposcustomercurrency"] = $setcurrency;
|
$_SESSION["takeposcustomercurrency"] = $setcurrency;
|
||||||
|
// We will recalculate amount for foreign currency at next call of invoice.php when $_SESSION["takeposcustomercurrency"] differs from invoice->multicurrency_code.
|
||||||
}
|
}
|
||||||
|
|
||||||
$_SESSION["urlfrom"] = '/takepos/index.php';
|
$_SESSION["urlfrom"] = '/takepos/index.php';
|
||||||
|
|||||||
@@ -163,6 +163,14 @@ if ($invoice->socid > 0) {
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Change the currency of invoice if it was modified
|
||||||
|
if (!empty($conf->multicurrency->enabled) && $_SESSION["takeposcustomercurrency"] != "") {
|
||||||
|
if ($invoice->multicurrency_code != $_SESSION["takeposcustomercurrency"]) {
|
||||||
|
$invoice->setMulticurrencyCode($_SESSION["takeposcustomercurrency"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Action to record a payment on a TakePOS invoice
|
// Action to record a payment on a TakePOS invoice
|
||||||
if ($action == 'valid' && $user->rights->facture->creer) {
|
if ($action == 'valid' && $user->rights->facture->creer) {
|
||||||
$bankaccount = 0;
|
$bankaccount = 0;
|
||||||
@@ -311,7 +319,7 @@ if ($action == 'valid' && $user->rights->facture->creer) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'creditnote') {
|
if ($action == 'creditnote' && $user->rights->facture->creer) {
|
||||||
$creditnote = new Facture($db);
|
$creditnote = new Facture($db);
|
||||||
$creditnote->socid = $invoice->socid;
|
$creditnote->socid = $invoice->socid;
|
||||||
$creditnote->date = dol_now();
|
$creditnote->date = dol_now();
|
||||||
@@ -459,10 +467,6 @@ if ($action == 'history' || $action == 'creditnote') {
|
|||||||
$invoice->fetch($placeid);
|
$invoice->fetch($placeid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->multicurrency->enabled) && $_SESSION["takeposcustomercurrency"] != "") {
|
|
||||||
$invoice->setMulticurrencyCode($_SESSION["takeposcustomercurrency"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (($action == "addline" || $action == "freezone") && $placeid == 0) {
|
if (($action == "addline" || $action == "freezone") && $placeid == 0) {
|
||||||
$invoice->socid = $conf->global->$constforcompanyid;
|
$invoice->socid = $conf->global->$constforcompanyid;
|
||||||
$invoice->date = dol_now();
|
$invoice->date = dol_now();
|
||||||
@@ -631,8 +635,11 @@ if ($action == "delete") {
|
|||||||
if ($action == "updateqty") {
|
if ($action == "updateqty") {
|
||||||
foreach ($invoice->lines as $line) {
|
foreach ($invoice->lines as $line) {
|
||||||
if ($line->id == $idline) {
|
if ($line->id == $idline) {
|
||||||
if (!$user->rights->takepos->editlines || (!$user->rights->takepos->editorderedlines && $line->special_code == "4")) dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos"), null, 1);
|
if (!$user->rights->takepos->editlines || (!$user->rights->takepos->editorderedlines && $line->special_code == "4")) {
|
||||||
else $result = $invoice->updateline($line->id, $line->desc, $line->subprice, $number, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
|
dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos"), null, 1);
|
||||||
|
} else {
|
||||||
|
$result = $invoice->updateline($line->id, $line->desc, $line->subprice, $number, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -640,12 +647,13 @@ if ($action == "updateqty") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($action == "updateprice") {
|
if ($action == "updateprice") {
|
||||||
|
$customer = new Societe($db);
|
||||||
|
$customer->fetch($invoice->socid);
|
||||||
|
|
||||||
foreach ($invoice->lines as $line) {
|
foreach ($invoice->lines as $line) {
|
||||||
if ($line->id == $idline) {
|
if ($line->id == $idline) {
|
||||||
$prod = new Product($db);
|
$prod = new Product($db);
|
||||||
$prod->fetch($line->fk_product);
|
$prod->fetch($line->fk_product);
|
||||||
$customer = new Societe($db);
|
|
||||||
$customer->fetch($invoice->socid);
|
|
||||||
$datapriceofproduct = $prod->getSellPrice($mysoc, $customer, 0);
|
$datapriceofproduct = $prod->getSellPrice($mysoc, $customer, 0);
|
||||||
$price_min = $datapriceofproduct['price_min'];
|
$price_min = $datapriceofproduct['price_min'];
|
||||||
$usercanproductignorepricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS));
|
$usercanproductignorepricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS));
|
||||||
@@ -654,34 +662,50 @@ if ($action == "updateprice") {
|
|||||||
if ($usercanproductignorepricemin && (!empty($price_min) && (price2num($pu_ht) * (1 - price2num($line->remise_percent) / 100) < price2num($price_min)))) {
|
if ($usercanproductignorepricemin && (!empty($price_min) && (price2num($pu_ht) * (1 - price2num($line->remise_percent) / 100) < price2num($price_min)))) {
|
||||||
echo $langs->trans("CantBeLessThanMinPrice");
|
echo $langs->trans("CantBeLessThanMinPrice");
|
||||||
} else {
|
} else {
|
||||||
if (!$user->rights->takepos->editlines || (!$user->rights->takepos->editorderedlines && $line->special_code == "4")) dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos"), null, 1);
|
if (empty($user->rights->takepos->editlines) || (empty($user->rights->takepos->editorderedlines) && $line->special_code == "4")) {
|
||||||
else $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'TTC', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
|
dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos"), null, 1);
|
||||||
|
} else {
|
||||||
|
$result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'TTC', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reload data
|
||||||
$invoice->fetch($placeid);
|
$invoice->fetch($placeid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == "updatereduction") {
|
if ($action == "updatereduction") {
|
||||||
foreach ($invoice->lines as $line) {
|
|
||||||
if ($line->id == $idline) {
|
|
||||||
$prod = new Product($db);
|
|
||||||
$prod->fetch($line->fk_product);
|
|
||||||
$customer = new Societe($db);
|
$customer = new Societe($db);
|
||||||
$customer->fetch($invoice->socid);
|
$customer->fetch($invoice->socid);
|
||||||
|
|
||||||
|
foreach ($invoice->lines as $line) {
|
||||||
|
if ($line->id == $idline) {
|
||||||
|
dol_syslog("updatereduction Process line ".$line->id.' to apply discount of '.$number.'%');
|
||||||
|
|
||||||
|
$prod = new Product($db);
|
||||||
|
$prod->fetch($line->fk_product);
|
||||||
|
|
||||||
$datapriceofproduct = $prod->getSellPrice($mysoc, $customer, 0);
|
$datapriceofproduct = $prod->getSellPrice($mysoc, $customer, 0);
|
||||||
$price_min = $datapriceofproduct['price_min'];
|
$price_min = $datapriceofproduct['price_min'];
|
||||||
$usercanproductignorepricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS));
|
$usercanproductignorepricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS));
|
||||||
$pu_ht = price2num($line->multicurrency_subprice / (1 + ($line->tva_tx / 100)), 'MU');
|
|
||||||
//Check min price
|
$pu_ht = price2num($line->subprice / (1 + ($line->tva_tx / 100)), 'MU');
|
||||||
if ($usercanproductignorepricemin && (!empty($price_min) && (price2num($line->multicurrency_subprice) * (1 - price2num($number) / 100) < price2num($price_min)))) {
|
|
||||||
|
// Check min price
|
||||||
|
if ($usercanproductignorepricemin && (!empty($price_min) && (price2num($line->subprice) * (1 - price2num($number) / 100) < price2num($price_min)))) {
|
||||||
echo $langs->trans("CantBeLessThanMinPrice");
|
echo $langs->trans("CantBeLessThanMinPrice");
|
||||||
} else {
|
} else {
|
||||||
if (!$user->rights->takepos->editlines || (!$user->rights->takepos->editorderedlines && $line->special_code == "4")) dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos"), null, 1);
|
if (empty($user->rights->takepos->editlines) || (empty($user->rights->takepos->editorderedlines) && $line->special_code == "4")) {
|
||||||
else $result = $invoice->updateline($line->id, $line->desc, $line->multicurrency_subprice, $line->qty, $number, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
|
dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos"), null, 1);
|
||||||
|
} else {
|
||||||
|
$result = $invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty, $number, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reload data
|
||||||
$invoice->fetch($placeid);
|
$invoice->fetch($placeid);
|
||||||
} elseif ($action == 'update_reduction_global') {
|
} elseif ($action == 'update_reduction_global') {
|
||||||
foreach ($invoice->lines as $line) {
|
foreach ($invoice->lines as $line) {
|
||||||
@@ -709,6 +733,7 @@ if ($action == "order" and $placeid != 0) {
|
|||||||
$catsprinter1 = explode(';', $conf->global->TAKEPOS_PRINTED_CATEGORIES_1);
|
$catsprinter1 = explode(';', $conf->global->TAKEPOS_PRINTED_CATEGORIES_1);
|
||||||
$catsprinter2 = explode(';', $conf->global->TAKEPOS_PRINTED_CATEGORIES_2);
|
$catsprinter2 = explode(';', $conf->global->TAKEPOS_PRINTED_CATEGORIES_2);
|
||||||
$catsprinter3 = explode(';', $conf->global->TAKEPOS_PRINTED_CATEGORIES_3);
|
$catsprinter3 = explode(';', $conf->global->TAKEPOS_PRINTED_CATEGORIES_3);
|
||||||
|
$linestoprint = 0;
|
||||||
foreach ($invoice->lines as $line) {
|
foreach ($invoice->lines as $line) {
|
||||||
if ($line->special_code == "4") {
|
if ($line->special_code == "4") {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user