Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 14.0
This commit is contained in:
commit
f0394c42d5
31
ChangeLog
31
ChangeLog
@ -358,6 +358,37 @@ Following changes may create regressions for some external modules, but were nec
|
|||||||
* v14 seems to work correctly on PHP v8 but it generates a lot of verbose warnings. Currently, v14 i snot yet officialy supported with PHP 8.
|
* v14 seems to work correctly on PHP v8 but it generates a lot of verbose warnings. Currently, v14 i snot yet officialy supported with PHP 8.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 13.0.5 compared to 13.0.4 *****
|
||||||
|
|
||||||
|
FIX: 13.0: class CommandeFournisseurDispatch provides trigger for UPDATE but not for CREATE / DELETE
|
||||||
|
FIX: #18389 Accountancy - Bug on LDcompta10 export for supplier invoice
|
||||||
|
FIX: #18591 : Remove double quotes of SQL Queries for postgresql compatibility
|
||||||
|
FIX: Accountancy - Debug Export Sage50 / CIEL Compta / CIEL Compta Evo (Format XIMPORT)
|
||||||
|
FIX: Accountancy - Some problems of length with general & subledger account
|
||||||
|
FIX: add DISTINCT
|
||||||
|
FIX: an approved holiday can be canceled by an admin.
|
||||||
|
FIX: autocalculation of the supplier price in main currency.
|
||||||
|
FIX: better sql request
|
||||||
|
FIX: cannot add time spend when column ref is not displayed
|
||||||
|
FIX: compatibility postgre sql
|
||||||
|
FIX: holiday card: hooks uninitialized
|
||||||
|
FIX: Invoice - Missing button to reopen an abandoned situation invoice
|
||||||
|
FIX: invoice validation: when checking if any VAT rate has a negative amount, prevent false positives with -1.0E-14 amounts
|
||||||
|
FIX: list of categories in stats of supplier invoices
|
||||||
|
FIX: Manage credit note on situation invoice for calculate margin
|
||||||
|
FIX: method_exists needs object at first param
|
||||||
|
FIX: move fetch_optionnal into $ac_static->fetch()
|
||||||
|
FIX: multicompany transverse mode compatibility
|
||||||
|
FIX: on supplier order, JOIN with product fourn price table must be done with fk_soc too to avoid display several times a same line (because of same supplier product ref)
|
||||||
|
FIX: postgre filter select search extrafield
|
||||||
|
FIX: products/services card: hidden extrafields were overridden
|
||||||
|
FIX: shipping validation workflow: 'ORDER_NEW' trigger called from wrong object
|
||||||
|
FIX: task time: can't filter by user with pgsql + show error message
|
||||||
|
FIX: task time: keep on using natural_search
|
||||||
|
FIX: wrong users count in multicompany transverse mode
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 13.0.4 compared to 13.0.3 *****
|
***** ChangeLog for 13.0.4 compared to 13.0.3 *****
|
||||||
|
|
||||||
FIX: Allow disabling of a module (not a dangerous action) even if there is problem with token (due to bugged modules).
|
FIX: Allow disabling of a module (not a dangerous action) even if there is problem with token (due to bugged modules).
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2011-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
|
||||||
@ -91,19 +91,19 @@ $tabsql[32] = "SELECT a.rowid as rowid, a.code as code, a.label, a.range_account
|
|||||||
$tabsqlsort = array();
|
$tabsqlsort = array();
|
||||||
$tabsqlsort[32] = "position ASC";
|
$tabsqlsort[32] = "position ASC";
|
||||||
|
|
||||||
// Nom des champs en resultat de select pour affichage du dictionnaire
|
// Name of the fields in the result of select to display the dictionary
|
||||||
$tabfield = array();
|
$tabfield = array();
|
||||||
$tabfield[32] = "code,label,range_account,category_type,formula,position,country";
|
$tabfield[32] = "code,label,range_account,category_type,formula,position,country";
|
||||||
|
|
||||||
// Nom des champs d'edition pour modification d'un enregistrement
|
// Name of editing fields for record modification
|
||||||
$tabfieldvalue = array();
|
$tabfieldvalue = array();
|
||||||
$tabfieldvalue[32] = "code,label,range_account,category_type,formula,position,country_id";
|
$tabfieldvalue[32] = "code,label,range_account,category_type,formula,position,country_id";
|
||||||
|
|
||||||
// Nom des champs dans la table pour insertion d'un enregistrement
|
// Name of the fields in the table for inserting a record
|
||||||
$tabfieldinsert = array();
|
$tabfieldinsert = array();
|
||||||
$tabfieldinsert[32] = "code,label,range_account,category_type,formula,position,fk_country";
|
$tabfieldinsert[32] = "code,label,range_account,category_type,formula,position,fk_country";
|
||||||
|
|
||||||
// Nom du rowid si le champ n'est pas de type autoincrement
|
// Name of the rowid if the field is not of type autoincrement
|
||||||
// Example: "" if id field is "rowid" and has autoincrement on
|
// Example: "" if id field is "rowid" and has autoincrement on
|
||||||
// "nameoffield" if id field is not "rowid" or has not autoincrement on
|
// "nameoffield" if id field is not "rowid" or has not autoincrement on
|
||||||
$tabrowid = array();
|
$tabrowid = array();
|
||||||
@ -151,7 +151,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
|||||||
if ($value == 'range_account' && empty($_POST['range_account'])) {
|
if ($value == 'range_account' && empty($_POST['range_account'])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($value == 'country' || $value == 'country_id') {
|
if (($value == 'country' || $value == 'country_id') && (!empty($_POST['country_id']))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!GETPOSTISSET($value) || GETPOST($value) == '') {
|
if (!GETPOSTISSET($value) || GETPOST($value) == '') {
|
||||||
@ -176,6 +176,9 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
|||||||
if ($fieldnamekey == 'category_type') {
|
if ($fieldnamekey == 'category_type') {
|
||||||
$fieldnamekey = 'Calculated';
|
$fieldnamekey = 'Calculated';
|
||||||
}
|
}
|
||||||
|
if ($fieldnamekey == 'country') {
|
||||||
|
$fieldnamekey = 'Country';
|
||||||
|
}
|
||||||
|
|
||||||
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
|
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
|
||||||
}
|
}
|
||||||
@ -263,7 +266,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si verif ok et action modify, on modifie la ligne
|
// If check ok and action modify, we modify the line
|
||||||
if ($ok && GETPOST('actionmodify', 'alpha')) {
|
if ($ok && GETPOST('actionmodify', 'alpha')) {
|
||||||
if ($tabrowid[$id]) {
|
if ($tabrowid[$id]) {
|
||||||
$rowidcol = $tabrowid[$id];
|
$rowidcol = $tabrowid[$id];
|
||||||
@ -430,12 +433,12 @@ print load_fiche_titre($titre, $linkback, $titlepicto);
|
|||||||
|
|
||||||
print '<span class="opacitymedium">'.$langs->trans("AccountingAccountGroupsDesc", $langs->transnoentitiesnoconv("ByPersonalizedAccountGroups")).'</span><br><br>';
|
print '<span class="opacitymedium">'.$langs->trans("AccountingAccountGroupsDesc", $langs->transnoentitiesnoconv("ByPersonalizedAccountGroups")).'</span><br><br>';
|
||||||
|
|
||||||
// Confirmation de la suppression de la ligne
|
// Confirmation of the deletion of the line
|
||||||
if ($action == 'delete') {
|
if ($action == 'delete') {
|
||||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id.($search_country_id > 0 ? '&search_country_id='.$search_country_id : ''), $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
|
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id.($search_country_id > 0 ? '&search_country_id='.$search_country_id : ''), $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Complete requete recherche valeurs avec critere de tri
|
// Complete search query with sorting criteria
|
||||||
$sql = $tabsql[$id];
|
$sql = $tabsql[$id];
|
||||||
|
|
||||||
if ($search_country_id > 0) {
|
if ($search_country_id > 0) {
|
||||||
@ -634,14 +637,14 @@ if ($resql) {
|
|||||||
// Title of lines
|
// Title of lines
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
foreach ($fieldlist as $field => $value) {
|
foreach ($fieldlist as $field => $value) {
|
||||||
// Determine le nom du champ par rapport aux noms possibles
|
// Determines the name of the field in relation to the possible names
|
||||||
// dans les dictionnaires de donnees
|
// in data dictionaries
|
||||||
$showfield = 1; // By defaut
|
$showfield = 1; // By default
|
||||||
$class = "left";
|
$class = "left";
|
||||||
$sortable = 1;
|
$sortable = 1;
|
||||||
$valuetoshow = '';
|
$valuetoshow = '';
|
||||||
|
|
||||||
$valuetoshow = ucfirst($fieldlist[$field]); // By defaut
|
$valuetoshow = ucfirst($fieldlist[$field]); // By default
|
||||||
$valuetoshow = $langs->trans($valuetoshow); // try to translate
|
$valuetoshow = $langs->trans($valuetoshow); // try to translate
|
||||||
if ($fieldlist[$field] == 'source') {
|
if ($fieldlist[$field] == 'source') {
|
||||||
$valuetoshow = $langs->trans("Contact");
|
$valuetoshow = $langs->trans("Contact");
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
@ -260,6 +260,22 @@ $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($title, $linkback, 'accountancy');
|
print load_fiche_titre($title, $linkback, 'accountancy');
|
||||||
|
|
||||||
|
// Show message if accountancy hidden options are activated to help to resolve some problems
|
||||||
|
if (!$user->admin) {
|
||||||
|
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
|
print '<div class="info">' . $langs->trans("ConstantIsOn", "FACTURE_DEPOSITS_ARE_JUST_PAYMENTS") . '</div>';
|
||||||
|
}
|
||||||
|
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
|
||||||
|
print '<div class="info">' . $langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY") . '</div>';
|
||||||
|
}
|
||||||
|
if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) {
|
||||||
|
print '<div class="info">' . $langs->trans("ConstantIsOn", "MAIN_COMPANY_PERENTITY_SHARED") . '</div>';
|
||||||
|
}
|
||||||
|
if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
|
||||||
|
print '<div class="info">' . $langs->trans("ConstantIsOn", "MAIN_PRODUCT_PERENTITY_SHARED") . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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().'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
|
|||||||
@ -937,7 +937,6 @@ class BookKeeping extends CommonObject
|
|||||||
$line->piece_num = $obj->piece_num;
|
$line->piece_num = $obj->piece_num;
|
||||||
$line->date_creation = $this->db->jdate($obj->date_creation);
|
$line->date_creation = $this->db->jdate($obj->date_creation);
|
||||||
$line->date_export = $this->db->jdate($obj->date_export);
|
$line->date_export = $this->db->jdate($obj->date_export);
|
||||||
$line->date_validation = $this->db->jdate($obj->date_validated);
|
|
||||||
$line->date_validation = $this->db->jdate($obj->date_validation);
|
$line->date_validation = $this->db->jdate($obj->date_validation);
|
||||||
|
|
||||||
$this->lines[] = $line;
|
$this->lines[] = $line;
|
||||||
@ -1090,7 +1089,6 @@ class BookKeeping extends CommonObject
|
|||||||
$line->date_lim_reglement = $this->db->jdate($obj->date_lim_reglement);
|
$line->date_lim_reglement = $this->db->jdate($obj->date_lim_reglement);
|
||||||
$line->date_modification = $this->db->jdate($obj->date_modification);
|
$line->date_modification = $this->db->jdate($obj->date_modification);
|
||||||
$line->date_export = $this->db->jdate($obj->date_export);
|
$line->date_export = $this->db->jdate($obj->date_export);
|
||||||
$line->date_validation = $this->db->jdate($obj->date_validated);
|
|
||||||
$line->date_validation = $this->db->jdate($obj->date_validation);
|
$line->date_validation = $this->db->jdate($obj->date_validation);
|
||||||
|
|
||||||
$this->lines[] = $line;
|
$this->lines[] = $line;
|
||||||
@ -1751,7 +1749,6 @@ class BookKeeping extends CommonObject
|
|||||||
$line->date_creation = $obj->date_creation;
|
$line->date_creation = $obj->date_creation;
|
||||||
$line->date_modification = $obj->date_modification;
|
$line->date_modification = $obj->date_modification;
|
||||||
$line->date_export = $obj->date_export;
|
$line->date_export = $obj->date_export;
|
||||||
$line->date_validation = $obj->date_validated;
|
|
||||||
$line->date_validation = $obj->date_validation;
|
$line->date_validation = $obj->date_validation;
|
||||||
|
|
||||||
$this->linesmvt[] = $line;
|
$this->linesmvt[] = $line;
|
||||||
@ -1816,7 +1813,6 @@ class BookKeeping extends CommonObject
|
|||||||
$line->sens = $obj->sens;
|
$line->sens = $obj->sens;
|
||||||
$line->code_journal = $obj->code_journal;
|
$line->code_journal = $obj->code_journal;
|
||||||
$line->piece_num = $obj->piece_num;
|
$line->piece_num = $obj->piece_num;
|
||||||
$line->date_validation = $obj->date_validated;
|
|
||||||
$line->date_validation = $obj->date_validation;
|
$line->date_validation = $obj->date_validation;
|
||||||
|
|
||||||
$this->linesexport[] = $line;
|
$this->linesexport[] = $line;
|
||||||
|
|||||||
@ -228,7 +228,7 @@ print "</td></tr>\n";
|
|||||||
// Allow members to change type on renewal forms
|
// Allow members to change type on renewal forms
|
||||||
/* To test during next beta
|
/* To test during next beta
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("MemberAllowchangeOfType").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("MemberAllowchangeOfType").'</td><td>';
|
||||||
print $form->selectyesno('ADHERENT_LOGIN_NOT_REQUIRED', (!empty($conf->global->MEMBER_ALLOW_CHANGE_OF_TYPE) ? 0 : 1), 1);
|
print $form->selectyesno('MEMBER_ALLOW_CHANGE_OF_TYPE', (!empty($conf->global->MEMBER_ALLOW_CHANGE_OF_TYPE) ? 0 : 1), 1);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@ -921,12 +921,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($socid)) {
|
if (!empty($socid)) {
|
||||||
$object = new Societe($db);
|
$soc = new Societe($db);
|
||||||
if ($socid > 0) {
|
if ($socid > 0) {
|
||||||
$object->fetch($socid);
|
$soc->fetch($socid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!($object->id > 0)) {
|
if (!($soc->id > 0)) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
print($langs->trans('ErrorRecordNotFound'));
|
print($langs->trans('ErrorRecordNotFound'));
|
||||||
exit;
|
exit;
|
||||||
@ -1009,7 +1009,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Company
|
// Company
|
||||||
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET('societe') ? GETPOST('societe', 'alphanohtml') : $object->company).'"></td></tr>';
|
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET('societe') ? GETPOST('societe', 'alphanohtml') : $soc->name).'"></td></tr>';
|
||||||
|
|
||||||
// Civility
|
// Civility
|
||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
||||||
@ -1033,7 +1033,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
// EMail
|
// EMail
|
||||||
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED ? '<span class="fieldrequired">' : '').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED ? '</span>' : '').'</td>';
|
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED ? '<span class="fieldrequired">' : '').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED ? '</span>' : '').'</td>';
|
||||||
print '<td>'.img_picto('', 'object_email').' <input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOSTISSET('member_email') ? GETPOST('member_email', 'alpha') : $object->email).'"></td></tr>';
|
print '<td>'.img_picto('', 'object_email').' <input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOSTISSET('member_email') ? GETPOST('member_email', 'alpha') : $soc->email).'"></td></tr>';
|
||||||
|
|
||||||
// Website
|
// Website
|
||||||
print '<tr><td>'.$form->editfieldkey('Web', 'member_url', '', $object, 0).'</td>';
|
print '<tr><td>'.$form->editfieldkey('Web', 'member_url', '', $object, 0).'</td>';
|
||||||
@ -1041,21 +1041,25 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td class="tdtop">'.$langs->trans("Address").'</td><td>';
|
print '<tr><td class="tdtop">'.$langs->trans("Address").'</td><td>';
|
||||||
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOSTISSET('address') ?GETPOST('address', 'alphanohtml') : $object->address).'</textarea>';
|
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOSTISSET('address') ?GETPOST('address', 'alphanohtml') : $soc->address).'</textarea>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// 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((GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
|
print $formcompany->select_ziptown((GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : $soc->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
|
||||||
print ' ';
|
print ' ';
|
||||||
print $formcompany->select_ziptown((GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
print $formcompany->select_ziptown((GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : $soc->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
$object->country_id = $object->country_id ? $object->country_id : $mysoc->country_id;
|
if (empty($soc->country_id)) {
|
||||||
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td>';
|
$soc->country_id = $mysoc->country_id;
|
||||||
|
$soc->country_code = $mysoc->country_code;
|
||||||
|
$soc->state_id = $mysoc->state_id;
|
||||||
|
}
|
||||||
|
print '<tr><td>'.$langs->trans('Country').'</td><td>';
|
||||||
print img_picto('', 'country', 'class="pictofixedwidth"');
|
print img_picto('', 'country', 'class="pictofixedwidth"');
|
||||||
print $form->select_country(GETPOSTISSET('country_id') ? GETPOST('country_id', 'alpha') : $object->country_id, 'country_id');
|
print $form->select_country(GETPOSTISSET('country_id') ? GETPOST('country_id', 'alpha') : $soc->country_id, 'country_id');
|
||||||
if ($user->admin) {
|
if ($user->admin) {
|
||||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
}
|
}
|
||||||
@ -1064,9 +1068,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
// State
|
// State
|
||||||
if (empty($conf->global->MEMBER_DISABLE_STATE)) {
|
if (empty($conf->global->MEMBER_DISABLE_STATE)) {
|
||||||
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
||||||
if ($object->country_id) {
|
if ($soc->country_id) {
|
||||||
print img_picto('', 'state', 'class="pictofixedwidth"');
|
print img_picto('', 'state', 'class="pictofixedwidth"');
|
||||||
print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : $object->state_id, $object->country_code);
|
print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : $soc->state_id, $soc->country_code);
|
||||||
} else {
|
} else {
|
||||||
print $countrynotdefined;
|
print $countrynotdefined;
|
||||||
}
|
}
|
||||||
@ -1075,7 +1079,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
// Pro phone
|
// Pro phone
|
||||||
print '<tr><td>'.$langs->trans("PhonePro").'</td>';
|
print '<tr><td>'.$langs->trans("PhonePro").'</td>';
|
||||||
print '<td>'.img_picto('', 'object_phoning').' <input type="text" name="phone" size="20" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $object->phone).'"></td></tr>';
|
print '<td>'.img_picto('', 'object_phoning').' <input type="text" name="phone" size="20" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $soc->phone).'"></td></tr>';
|
||||||
|
|
||||||
// Personal phone
|
// Personal phone
|
||||||
print '<tr><td>'.$langs->trans("PhonePerso").'</td>';
|
print '<tr><td>'.$langs->trans("PhonePerso").'</td>';
|
||||||
|
|||||||
@ -961,7 +961,7 @@ while ($i < min($num, $limit)) {
|
|||||||
// Firstname
|
// Firstname
|
||||||
if (!empty($arrayfields['d.firstname']['checked'])) {
|
if (!empty($arrayfields['d.firstname']['checked'])) {
|
||||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->firstname).'">';
|
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->firstname).'">';
|
||||||
print $memberstatic->getNomUrl(0, 0, 'card', 'fistname');
|
print $memberstatic->getNomUrl(0, 0, 'card', 'firstname');
|
||||||
//print $obj->firstname;
|
//print $obj->firstname;
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
|
|||||||
@ -963,7 +963,7 @@ if ($rowid > 0) {
|
|||||||
|
|
||||||
if ($adht->subscription) {
|
if ($adht->subscription) {
|
||||||
// Amount
|
// Amount
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="subscription" size="6" value="'.GETPOST('subscription').'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="subscription" size="6" value="'. price(GETPOSTISSET('subscription') ? GETPOST('subscription') : $adht->amount).'"> '.$langs->trans("Currency".$conf->currency) .'</td></tr>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||||
|
|||||||
@ -115,7 +115,7 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
|
|||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
|
|
||||||
print '<table class="noborder centpercent editmode">';
|
print '<table class="noborder centpercent editmode">';
|
||||||
print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
print '<tr class="liste_titre"><th class="titlefieldcreate wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
print '<tr class="oddeven"><td><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
||||||
|
|||||||
@ -104,13 +104,11 @@ print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
|||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
|
|
||||||
// Social networks
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent editmode">';
|
print '<table class="noborder centpercent editmode">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="titlefield">'.$langs->trans("SocialNetworksInformation").'</td><td>'.$langs->trans("Url").'</td><td>'.$langs->trans("SocialNetworkId").'</td><td></td>';
|
print '<td class="titlefieldcreate">'.$langs->trans("SocialNetworksInformation").'</td><td>'.$langs->trans("Url").'</td><td>'.$langs->trans("SocialNetworkId").'</td><td></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -220,7 +220,7 @@ $tabsql[21] = "SELECT c.rowid as rowid, c.code, c.label, c.active, c.position FR
|
|||||||
$tabsql[22] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_input_reason";
|
$tabsql[22] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_input_reason";
|
||||||
$tabsql[23] = "SELECT t.rowid as rowid, t.taux, t.revenuestamp_type, c.label as country, c.code as country_code, t.fk_pays as country_id, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_revenuestamp as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid";
|
$tabsql[23] = "SELECT t.rowid as rowid, t.taux, t.revenuestamp_type, c.label as country, c.code as country_code, t.fk_pays as country_id, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_revenuestamp as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid";
|
||||||
$tabsql[24] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_type_resource";
|
$tabsql[24] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_type_resource";
|
||||||
$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 = ".getEntity($tabname[25]);
|
||||||
//$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";
|
||||||
@ -233,7 +233,7 @@ $tabsql[34] = "SELECT rowid, pos, code, label, c_level, active FROM ".MAIN_DB_PR
|
|||||||
$tabsql[35] = "SELECT c.rowid, c.label, c.active, c.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_cat c";
|
$tabsql[35] = "SELECT c.rowid, c.label, c.active, c.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_cat c";
|
||||||
$tabsql[36] = "SELECT r.rowid, r.fk_c_exp_tax_cat, r.range_ik, r.active, r.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_range r";
|
$tabsql[36] = "SELECT r.rowid, r.fk_c_exp_tax_cat, r.range_ik, r.active, r.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_range r";
|
||||||
$tabsql[37] = "SELECT r.rowid, r.code, r.label, r.short_label, r.unit_type, r.scale, r.active FROM ".MAIN_DB_PREFIX."c_units r";
|
$tabsql[37] = "SELECT r.rowid, r.code, r.label, r.short_label, r.unit_type, r.scale, r.active FROM ".MAIN_DB_PREFIX."c_units r";
|
||||||
$tabsql[38] = "SELECT rowid, entity, code, label, url, icon, active FROM ".MAIN_DB_PREFIX."c_socialnetworks";
|
$tabsql[38] = "SELECT s.rowid, s.entity, s.code, s.label, s.url, s.icon, s.active FROM ".MAIN_DB_PREFIX."c_socialnetworks as s WHERE s.entity = ".getEntity($tabname[38]);
|
||||||
$tabsql[39] = "SELECT code, label as libelle, sortorder, active FROM ".MAIN_DB_PREFIX."c_prospectcontactlevel";
|
$tabsql[39] = "SELECT code, label as libelle, sortorder, active FROM ".MAIN_DB_PREFIX."c_prospectcontactlevel";
|
||||||
$tabsql[40] = "SELECT id as rowid, code, libelle, picto, active FROM ".MAIN_DB_PREFIX."c_stcommcontact";
|
$tabsql[40] = "SELECT id as rowid, code, libelle, picto, active FROM ".MAIN_DB_PREFIX."c_stcommcontact";
|
||||||
$tabsql[41] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_transport_mode";
|
$tabsql[41] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_transport_mode";
|
||||||
@ -1454,6 +1454,10 @@ if ($id) {
|
|||||||
print $tdsoffields;
|
print $tdsoffields;
|
||||||
|
|
||||||
|
|
||||||
|
// Line to enter new values
|
||||||
|
print '<!-- line to add new entry -->';
|
||||||
|
print '<tr class="oddeven nodrag nodrop nohover">';
|
||||||
|
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
// If data was already input, we define them in obj to populate input fields.
|
// If data was already input, we define them in obj to populate input fields.
|
||||||
if (GETPOST('actionadd')) {
|
if (GETPOST('actionadd')) {
|
||||||
@ -1473,9 +1477,6 @@ if ($id) {
|
|||||||
unset($fieldlist[2]); // Remove field ??? if dictionary Regions
|
unset($fieldlist[2]); // Remove field ??? if dictionary Regions
|
||||||
}
|
}
|
||||||
|
|
||||||
// Line to enter new values
|
|
||||||
print '<!-- line to add new entry -->';
|
|
||||||
print '<tr class="oddeven nodrag nodrop nohover">';
|
|
||||||
|
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
fieldList($fieldlist, $obj, $tabname[$id], 'add');
|
fieldList($fieldlist, $obj, $tabname[$id], 'add');
|
||||||
|
|||||||
@ -92,7 +92,7 @@ if (empty($action) || $action == 'edit' || $action == 'updateedit') {
|
|||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
|
|
||||||
print '<table class="noborder centpercent editmode">';
|
print '<table class="noborder centpercent editmode">';
|
||||||
print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("Day").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
print '<tr class="liste_titre"><th class="titlefieldcreate wordbreak">'.$langs->trans("Day").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("Monday"), $langs->trans("OpeningHoursFormatDesc"));
|
print $form->textwithpicto($langs->trans("Monday"), $langs->trans("OpeningHoursFormatDesc"));
|
||||||
|
|||||||
@ -389,7 +389,7 @@ if ($action == 'create') {
|
|||||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||||
}
|
}
|
||||||
print '<tbody>';
|
print '<tbody>';
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|||||||
@ -266,7 +266,7 @@ if ($user->rights->categorie->creer) {
|
|||||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -75,8 +75,13 @@ if ($complete == 'na' || $complete == -2) {
|
|||||||
$complete = -1;
|
$complete = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$datep = dol_mktime($fulldayevent ? '00' : $aphour, $fulldayevent ? '00' : $apmin, 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'));
|
if ($fulldayevent) {
|
||||||
$datef = dol_mktime($fulldayevent ? '23' : $p2hour, $fulldayevent ? '59' : $p2min, $fulldayevent ? '59' : '0', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'));
|
$datep = dol_mktime('00', '00', 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'));
|
||||||
|
$datef = dol_mktime('23', '59', '59', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'));
|
||||||
|
} else {
|
||||||
|
$datep = dol_mktime($aphour, $apmin, 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'));
|
||||||
|
$datef = dol_mktime($p2hour, $p2min, '59', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'));
|
||||||
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
@ -1262,7 +1267,7 @@ if ($action == 'create') {
|
|||||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -484,7 +484,7 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
|
|||||||
$viewmode = '';
|
$viewmode = '';
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||||
|
|
||||||
|
|||||||
@ -608,7 +608,7 @@ if ($resql) {
|
|||||||
$viewmode = '';
|
$viewmode = '';
|
||||||
$viewmode .= '<a class="btnTitle btnTitleSelected reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
$viewmode .= '<a class="btnTitle btnTitleSelected reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||||
|
|
||||||
|
|||||||
@ -416,7 +416,7 @@ $massactionbutton = '';
|
|||||||
$viewmode = '';
|
$viewmode = '';
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||||
|
|
||||||
|
|||||||
@ -426,7 +426,7 @@ $massactionbutton = '';
|
|||||||
$viewmode = '';
|
$viewmode = '';
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||||
|
|
||||||
|
|||||||
@ -726,7 +726,7 @@ if ($action == 'create') {
|
|||||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
print $object->showOptionals($extrafields, 'edit');
|
print $object->showOptionals($extrafields, 'create');
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -2563,8 +2563,13 @@ class Propal extends CommonObject
|
|||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs->setDefaultLang($newlang);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PDF
|
||||||
|
$hidedetails = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0);
|
||||||
|
$hidedesc = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0);
|
||||||
|
$hideref = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0);
|
||||||
|
|
||||||
//$ret=$object->fetch($id); // Reload to get new records
|
//$ret=$object->fetch($id); // Reload to get new records
|
||||||
$this->generateDocument($modelpdf, $outputlangs);
|
$this->generateDocument($modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
@ -2651,8 +2656,13 @@ class Propal extends CommonObject
|
|||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs->setDefaultLang($newlang);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PDF
|
||||||
|
$hidedetails = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0);
|
||||||
|
$hidedesc = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0);
|
||||||
|
$hideref = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0);
|
||||||
|
|
||||||
//$ret=$object->fetch($id); // Reload to get new records
|
//$ret=$object->fetch($id); // Reload to get new records
|
||||||
$this->generateDocument($modelpdf, $outputlangs);
|
$this->generateDocument($modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->oldcopy = clone $this;
|
$this->oldcopy = clone $this;
|
||||||
|
|||||||
@ -1721,7 +1721,7 @@ if ($action == 'create' && $usercancreate) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Template to use by default
|
// Template to use by default
|
||||||
|
|||||||
@ -444,7 +444,7 @@ if ($action == 'create') {
|
|||||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -3636,7 +3636,7 @@ if ($action == 'create') {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Template to use by default
|
// Template to use by default
|
||||||
@ -3845,6 +3845,15 @@ if ($action == 'create') {
|
|||||||
// $resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
// $resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||||
$resteapayer = price2num($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT');
|
$resteapayer = price2num($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT');
|
||||||
|
|
||||||
|
// Multicurrency
|
||||||
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
|
$multicurrency_totalpaye = $object->getSommePaiement(1);
|
||||||
|
$multicurrency_totalcreditnotes = $object->getSumCreditNotesUsed(1);
|
||||||
|
$multicurrency_totaldeposits = $object->getSumDepositsUsed(1);
|
||||||
|
$multicurrency_resteapayer = price2num($object->multicurrency_total_ttc - $multicurrency_totalpaye - $multicurrency_totalcreditnotes - $multicurrency_totaldeposits, 'MT');
|
||||||
|
$resteapayer = price2num($multicurrency_resteapayer / $object->multicurrency_tx, 'MT');
|
||||||
|
}
|
||||||
|
|
||||||
if ($object->paye) {
|
if ($object->paye) {
|
||||||
$resteapayer = 0;
|
$resteapayer = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -110,6 +110,10 @@ if ($mode == 'supplier') {
|
|||||||
if ($object_status != '' && $object_status >= 0) {
|
if ($object_status != '' && $object_status >= 0) {
|
||||||
$stats->where .= ' AND f.fk_statut IN ('.$db->sanitize($object_status).')';
|
$stats->where .= ' AND f.fk_statut IN ('.$db->sanitize($object_status).')';
|
||||||
}
|
}
|
||||||
|
if (is_array($custcats) && !empty($custcats)) {
|
||||||
|
$stats->from .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_fournisseur as cat ON (f.fk_soc = cat.fk_soc)';
|
||||||
|
$stats->where .= ' AND cat.fk_categorie IN ('.$db->sanitize(implode(',', $custcats)).')';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build graphic number of object
|
// Build graphic number of object
|
||||||
|
|||||||
@ -64,7 +64,7 @@ if ($cancel && !$id) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'add' && $cancel) {
|
if ($action == 'add' && !$cancel) {
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$datev = dol_mktime(12, 0, 0, GETPOST("datevmonth"), GETPOST("datevday"), GETPOST("datevyear"));
|
$datev = dol_mktime(12, 0, 0, GETPOST("datevmonth"), GETPOST("datevday"), GETPOST("datevyear"));
|
||||||
|
|||||||
@ -2225,6 +2225,13 @@ class ExtraFields
|
|||||||
} else {
|
} else {
|
||||||
$value_key = $value_arr;
|
$value_key = $value_arr;
|
||||||
}
|
}
|
||||||
|
} elseif (in_array($key_type, array('boolean'))) {
|
||||||
|
if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) {
|
||||||
|
$value_key = '';
|
||||||
|
} else {
|
||||||
|
$value_arr = GETPOST($keysuffix."options_".$key.$keyprefix);
|
||||||
|
$value_key = $value_arr;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) {
|
if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) {
|
||||||
continue; // Value was not provided, we should not set it.
|
continue; // Value was not provided, we should not set it.
|
||||||
|
|||||||
@ -309,7 +309,7 @@ class FormActions
|
|||||||
$tmpa = dol_getdate($actioncomm->datep);
|
$tmpa = dol_getdate($actioncomm->datep);
|
||||||
$tmpb = dol_getdate($actioncomm->datef);
|
$tmpb = dol_getdate($actioncomm->datef);
|
||||||
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) {
|
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) {
|
||||||
if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes'] && $tmpa['seconds'] != $tmpb['seconds']) {
|
if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes']) {
|
||||||
print '-'.dol_print_date($actioncomm->datef, 'hour', 'tzuserrel');
|
print '-'.dol_print_date($actioncomm->datef, 'hour', 'tzuserrel');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -792,6 +792,7 @@ class FormMail extends Form
|
|||||||
if (count($listofpaths)) {
|
if (count($listofpaths)) {
|
||||||
foreach ($listofpaths as $key => $val) {
|
foreach ($listofpaths as $key => $val) {
|
||||||
$relativepathtofile = substr($val, (strlen(DOL_DATA_ROOT) - strlen($val)));
|
$relativepathtofile = substr($val, (strlen(DOL_DATA_ROOT) - strlen($val)));
|
||||||
|
|
||||||
if ($conf->entity > 1) {
|
if ($conf->entity > 1) {
|
||||||
$relativepathtofile = str_replace($conf->entity.'/', '', $relativepathtofile);
|
$relativepathtofile = str_replace($conf->entity.'/', '', $relativepathtofile);
|
||||||
}
|
}
|
||||||
@ -802,6 +803,7 @@ class FormMail extends Form
|
|||||||
$out .= '<div id="attachfile_'.$key.'">';
|
$out .= '<div id="attachfile_'.$key.'">';
|
||||||
// Preview of attachment
|
// Preview of attachment
|
||||||
$out .= img_mime($listofnames[$key]).' '.$listofnames[$key];
|
$out .= img_mime($listofnames[$key]).' '.$listofnames[$key];
|
||||||
|
|
||||||
$out .= $formfile->showPreview(array(), $formfile_params[2], $formfile_params[4]);
|
$out .= $formfile->showPreview(array(), $formfile_params[2], $formfile_params[4]);
|
||||||
if (!$this->withfilereadonly) {
|
if (!$this->withfilereadonly) {
|
||||||
$out .= ' <input type="image" style="border: 0px;" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/delete.png" value="'.($key + 1).'" class="removedfile" id="removedfile_'.$key.'" name="removedfile_'.$key.'" />';
|
$out .= ' <input type="image" style="border: 0px;" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/delete.png" value="'.($key + 1).'" class="removedfile" id="removedfile_'.$key.'" name="removedfile_'.$key.'" />';
|
||||||
|
|||||||
@ -103,7 +103,7 @@ function length_accountg($account)
|
|||||||
return $account;
|
return $account;
|
||||||
}
|
}
|
||||||
|
|
||||||
$g = $conf->global->ACCOUNTING_LENGTH_GACCOUNT;
|
$g = getDolGlobalInt('ACCOUNTING_LENGTH_GACCOUNT');
|
||||||
if (!is_empty($g)) {
|
if (!is_empty($g)) {
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$i = strlen($account);
|
$i = strlen($account);
|
||||||
@ -142,7 +142,7 @@ function length_accounta($accounta)
|
|||||||
return $accounta;
|
return $accounta;
|
||||||
}
|
}
|
||||||
|
|
||||||
$a = $conf->global->ACCOUNTING_LENGTH_AACCOUNT;
|
$a = getDolGlobalInt('ACCOUNTING_LENGTH_AACCOUNT');
|
||||||
if (!is_empty($a)) {
|
if (!is_empty($a)) {
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$i = strlen($accounta);
|
$i = strlen($accounta);
|
||||||
|
|||||||
@ -2707,13 +2707,14 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|||||||
if ($fuser->rights->expedition->{$lire} || preg_match('/^specimen/i', $original_file)) {
|
if ($fuser->rights->expedition->{$lire} || preg_match('/^specimen/i', $original_file)) {
|
||||||
$accessallowed = 1;
|
$accessallowed = 1;
|
||||||
}
|
}
|
||||||
$original_file = $conf->expedition->dir_output."/sending/".$original_file;
|
$original_file = $conf->expedition->dir_output."/".(strpos('sending/', $original_file) === 0 ? '' : 'sending/').$original_file;
|
||||||
|
//$original_file = $conf->expedition->dir_output."/".$original_file;
|
||||||
} elseif (($modulepart == 'livraison' || $modulepart == 'delivery') && !empty($conf->expedition->dir_output)) {
|
} elseif (($modulepart == 'livraison' || $modulepart == 'delivery') && !empty($conf->expedition->dir_output)) {
|
||||||
// Delivery Note Wrapping
|
// Delivery Note Wrapping
|
||||||
if ($fuser->rights->expedition->delivery->{$lire} || preg_match('/^specimen/i', $original_file)) {
|
if ($fuser->rights->expedition->delivery->{$lire} || preg_match('/^specimen/i', $original_file)) {
|
||||||
$accessallowed = 1;
|
$accessallowed = 1;
|
||||||
}
|
}
|
||||||
$original_file = $conf->expedition->dir_output."/receipt/".$original_file;
|
$original_file = $conf->expedition->dir_output."/".(strpos('receipt/', $original_file) === 0 ? '' : 'receipt/').$original_file;
|
||||||
} elseif ($modulepart == 'actions' && !empty($conf->agenda->dir_output)) {
|
} elseif ($modulepart == 'actions' && !empty($conf->agenda->dir_output)) {
|
||||||
// Wrapping pour les actions
|
// Wrapping pour les actions
|
||||||
if ($fuser->rights->agenda->myactions->{$read} || preg_match('/^specimen/i', $original_file)) {
|
if ($fuser->rights->agenda->myactions->{$read} || preg_match('/^specimen/i', $original_file)) {
|
||||||
|
|||||||
@ -1055,7 +1055,7 @@ function dol_size($size, $type = '')
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean a string to use it as a file name.
|
* Clean a string to use it as a file name.
|
||||||
* Replace also '--' and ' -' strings, they are used for parameters separation.
|
* Replace also '--' and ' -' strings, they are used for parameters separation (Note: ' - ' is allowed).
|
||||||
*
|
*
|
||||||
* @param string $str String to clean
|
* @param string $str String to clean
|
||||||
* @param string $newstr String to replace bad chars with.
|
* @param string $newstr String to replace bad chars with.
|
||||||
@ -1073,13 +1073,13 @@ function dol_sanitizeFileName($str, $newstr = '_', $unaccent = 1)
|
|||||||
$filesystem_forbidden_chars = array('<', '>', '/', '\\', '?', '*', '|', '"', ':', '°', '$', ';');
|
$filesystem_forbidden_chars = array('<', '>', '/', '\\', '?', '*', '|', '"', ':', '°', '$', ';');
|
||||||
$tmp = dol_string_nospecial($unaccent ? dol_string_unaccent($str) : $str, $newstr, $filesystem_forbidden_chars);
|
$tmp = dol_string_nospecial($unaccent ? dol_string_unaccent($str) : $str, $newstr, $filesystem_forbidden_chars);
|
||||||
$tmp = preg_replace('/\-\-+/', '_', $tmp);
|
$tmp = preg_replace('/\-\-+/', '_', $tmp);
|
||||||
$tmp = preg_replace('/\s+\-/', ' _', $tmp);
|
$tmp = preg_replace('/\s+\-([^\s])/', ' _$1', $tmp);
|
||||||
return $tmp;
|
return $tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean a string to use it as a path name.
|
* Clean a string to use it as a path name.
|
||||||
* Replace also '--' and ' -' strings, they are used for parameters separation.
|
* Replace also '--' and ' -' strings, they are used for parameters separation (Note: ' - ' is allowed).
|
||||||
*
|
*
|
||||||
* @param string $str String to clean
|
* @param string $str String to clean
|
||||||
* @param string $newstr String to replace bad chars with
|
* @param string $newstr String to replace bad chars with
|
||||||
@ -1093,7 +1093,7 @@ function dol_sanitizePathName($str, $newstr = '_', $unaccent = 1)
|
|||||||
$filesystem_forbidden_chars = array('<', '>', '?', '*', '|', '"', '°');
|
$filesystem_forbidden_chars = array('<', '>', '?', '*', '|', '"', '°');
|
||||||
$tmp = dol_string_nospecial($unaccent ? dol_string_unaccent($str) : $str, $newstr, $filesystem_forbidden_chars);
|
$tmp = dol_string_nospecial($unaccent ? dol_string_unaccent($str) : $str, $newstr, $filesystem_forbidden_chars);
|
||||||
$tmp = preg_replace('/\-\-+/', '_', $tmp);
|
$tmp = preg_replace('/\-\-+/', '_', $tmp);
|
||||||
$tmp = preg_replace('/\s+\-/', ' _', $tmp);
|
$tmp = preg_replace('/\s+\-([^\s])/', ' _$1', $tmp);
|
||||||
return $tmp;
|
return $tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2284,11 +2284,20 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs =
|
|||||||
} elseif ($tzoutput == 'tzuser' || $tzoutput == 'tzuserrel') {
|
} elseif ($tzoutput == 'tzuser' || $tzoutput == 'tzuserrel') {
|
||||||
$to_gmt = true;
|
$to_gmt = true;
|
||||||
$offsettzstring = (empty($_SESSION['dol_tz_string']) ? 'UTC' : $_SESSION['dol_tz_string']); // Example 'Europe/Berlin' or 'Indian/Reunion'
|
$offsettzstring = (empty($_SESSION['dol_tz_string']) ? 'UTC' : $_SESSION['dol_tz_string']); // Example 'Europe/Berlin' or 'Indian/Reunion'
|
||||||
|
|
||||||
|
if (class_exists('DateTimeZone')) {
|
||||||
|
$user_date_tz = new DateTimeZone($offsettzstring);
|
||||||
|
$user_dt = new DateTime();
|
||||||
|
$user_dt->setTimezone($user_date_tz);
|
||||||
|
$user_dt->setTimestamp($tzoutput == 'tzuser' ? dol_now() : $time);
|
||||||
|
$offsettz = $user_dt->getOffset();
|
||||||
|
} else { // old method (The 'tzuser' was processed like the 'tzuserrel')
|
||||||
$offsettz = (empty($_SESSION['dol_tz']) ? 0 : $_SESSION['dol_tz']) * 60 * 60; // Will not be used anymore
|
$offsettz = (empty($_SESSION['dol_tz']) ? 0 : $_SESSION['dol_tz']) * 60 * 60; // Will not be used anymore
|
||||||
$offsetdst = (empty($_SESSION['dol_dst']) ? 0 : $_SESSION['dol_dst']) * 60 * 60; // Will not be used anymore
|
$offsetdst = (empty($_SESSION['dol_dst']) ? 0 : $_SESSION['dol_dst']) * 60 * 60; // Will not be used anymore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!is_object($outputlangs)) {
|
if (!is_object($outputlangs)) {
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,12 +99,9 @@ if ($massaction == 'presend') {
|
|||||||
|
|
||||||
print '<input type="hidden" name="massaction" value="confirm_presend">';
|
print '<input type="hidden" name="massaction" value="confirm_presend">';
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
|
||||||
$formmail = new FormMail($db);
|
|
||||||
|
|
||||||
print dol_get_fiche_head(null, '', '');
|
print dol_get_fiche_head(null, '', '');
|
||||||
|
|
||||||
// Cree l'objet formulaire mail
|
// Create mail form
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->withform = -1;
|
$formmail->withform = -1;
|
||||||
|
|||||||
@ -296,7 +296,8 @@ $coldisplay++;
|
|||||||
echo '<td class="right nowrap margininfos"><input class="right maxwidth75" type="text" name="np_marginRate" value="'.$margin_rate.'"><span class="hideonsmartphone">%</span></td>';
|
echo '<td class="right nowrap margininfos"><input class="right maxwidth75" type="text" name="np_marginRate" value="'.$margin_rate.'"><span class="hideonsmartphone">%</span></td>';
|
||||||
}
|
}
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
} elseif (!empty($conf->global->DISPLAY_MARK_RATES)) {
|
}
|
||||||
|
if (!empty($conf->global->DISPLAY_MARK_RATES)) {
|
||||||
$mark_rate = (GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : price($line->marque_tx));
|
$mark_rate = (GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : price($line->marque_tx));
|
||||||
// if credit note, dont allow to modify margin
|
// if credit note, dont allow to modify margin
|
||||||
if ($line->subprice < 0) {
|
if ($line->subprice < 0) {
|
||||||
|
|||||||
@ -133,7 +133,7 @@ class ActionsDatapolicy
|
|||||||
header('Content-Disposition: attachment; filename=datapolicy_portabilite.csv');
|
header('Content-Disposition: attachment; filename=datapolicy_portabilite.csv');
|
||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
$object->fetch(GETPOST('socid'));
|
$object->fetch(GETPOST('socid'));
|
||||||
echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL;
|
echo 'Name;Firstname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL;
|
||||||
echo $object->name.';';
|
echo $object->name.';';
|
||||||
echo ';';
|
echo ';';
|
||||||
echo ';';
|
echo ';';
|
||||||
@ -157,7 +157,7 @@ class ActionsDatapolicy
|
|||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
$soc = $object->fetch_thirdparty();
|
$soc = $object->fetch_thirdparty();
|
||||||
|
|
||||||
echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL;
|
echo 'Name;Firstname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL;
|
||||||
echo $object->lastname.';';
|
echo $object->lastname.';';
|
||||||
echo $object->firstname.';';
|
echo $object->firstname.';';
|
||||||
echo $object->getCivilityLabel().';';
|
echo $object->getCivilityLabel().';';
|
||||||
@ -181,7 +181,7 @@ class ActionsDatapolicy
|
|||||||
header('Content-Disposition: attachment; filename=datapolicy_portabilite.csv');
|
header('Content-Disposition: attachment; filename=datapolicy_portabilite.csv');
|
||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
$soc = $object->fetch_thirdparty();
|
$soc = $object->fetch_thirdparty();
|
||||||
echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL;
|
echo 'Name;Firstname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL;
|
||||||
echo $object->lastname.';';
|
echo $object->lastname.';';
|
||||||
echo $object->firstname.';';
|
echo $object->firstname.';';
|
||||||
echo $object->getCivilityLabel().';';
|
echo $object->getCivilityLabel().';';
|
||||||
|
|||||||
@ -492,7 +492,7 @@ if ($action == 'create') {
|
|||||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</tbody>';
|
print '</tbody>';
|
||||||
|
|||||||
@ -67,7 +67,7 @@ if (!$section) {
|
|||||||
dol_print_error('', 'Error, section parameter missing');
|
dol_print_error('', 'Error, section parameter missing');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$urlfile = (string) dol_sanitizePathName(GETPOST("urlfile"));
|
$urlfile = (string) dol_sanitizePathName(GETPOST("urlfile"), '_', 0);
|
||||||
if (!$urlfile) {
|
if (!$urlfile) {
|
||||||
dol_print_error('', "ErrorParamNotDefined");
|
dol_print_error('', "ErrorParamNotDefined");
|
||||||
exit;
|
exit;
|
||||||
@ -131,7 +131,7 @@ if ($action == 'update' && $permtoadd) {
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$oldlabel = GETPOST('urlfile', 'alpha');
|
$oldlabel = GETPOST('urlfile', 'alpha');
|
||||||
$newlabel = dol_sanitizeFileName(GETPOST('label', 'alpha'));
|
$newlabel = dol_sanitizeFileName(GETPOST('label', 'alpha'), '_', 0);
|
||||||
$shareenabled = GETPOST('shareenabled', 'alpha');
|
$shareenabled = GETPOST('shareenabled', 'alpha');
|
||||||
|
|
||||||
//$db->begin();
|
//$db->begin();
|
||||||
|
|||||||
@ -2552,8 +2552,8 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
// Presend form
|
// Presend form
|
||||||
$modelmail = 'shipping_send';
|
$modelmail = 'shipping_send';
|
||||||
$defaulttopic = 'SendShippingRef';
|
$defaulttopic = $langs->trans('SendShippingRef');
|
||||||
$diroutput = $conf->expedition->dir_output;
|
$diroutput = $conf->expedition->dir_output.'/sending';
|
||||||
$trackid = 'shi'.$object->id;
|
$trackid = 'shi'.$object->id;
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2015-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
@ -1421,7 +1421,7 @@ if ($action == 'create') {
|
|||||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tbody>';
|
print '<tbody>';
|
||||||
@ -2282,7 +2282,7 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
// Quantity
|
// Quantity
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print '<input type="number" min="0" class="right maxwidth50" name="qty" value="'.dol_escape_htmltag($line->qty).'" />';
|
print '<input type="text" min="0" class="right maxwidth50" name="qty" value="'.dol_escape_htmltag($line->qty).'" />'; // We must be able to enter decimal qty
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
//print '<td class="right">'.$langs->trans('AmountHT').'</td>';
|
//print '<td class="right">'.$langs->trans('AmountHT').'</td>';
|
||||||
@ -2524,7 +2524,7 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($action != 'create' && $action != 'edit') {
|
if ($action != 'create' && $action != 'edit' && $action != 'editline') {
|
||||||
$object = new ExpenseReport($db);
|
$object = new ExpenseReport($db);
|
||||||
$object->fetch($id, $ref);
|
$object->fetch($id, $ref);
|
||||||
|
|
||||||
|
|||||||
@ -379,13 +379,13 @@ class Export
|
|||||||
*/
|
*/
|
||||||
public function conditionDate($Field, $Value, $Sens)
|
public function conditionDate($Field, $Value, $Sens)
|
||||||
{
|
{
|
||||||
// TODO date_format is forbidden, not performant and not portable. Use instead BETWEEN
|
// TODO date_format is forbidden, not performant and not portable. Use instead $Value to forge the range date.
|
||||||
if (strlen($Value) == 4) {
|
if (strlen($Value) == 4) {
|
||||||
$Condition = " date_format(".$Field.",'%Y') ".$Sens." '".$Value."'";
|
$Condition = " date_format(".$Field.",'%Y') ".$Sens." '".$this->db->escape($Value)."'";
|
||||||
} elseif (strlen($Value) == 6) {
|
} elseif (strlen($Value) == 6) {
|
||||||
$Condition = " date_format(".$Field.",'%Y%m') ".$Sens." '".$Value."'";
|
$Condition = " date_format(".$Field.",'%Y%m') ".$Sens." '".$this->db->escape($Value)."'";
|
||||||
} else {
|
} else {
|
||||||
$Condition = " date_format(".$Field.",'%Y%m%d') ".$Sens." ".$Value;
|
$Condition = " date_format(".$Field.",'%Y%m%d') ".$Sens." '".$this->db->escape($Value)."'";
|
||||||
}
|
}
|
||||||
return $Condition;
|
return $Condition;
|
||||||
}
|
}
|
||||||
@ -416,7 +416,7 @@ class Export
|
|||||||
case 'Duree':
|
case 'Duree':
|
||||||
case 'Numeric':
|
case 'Numeric':
|
||||||
case 'Number':
|
case 'Number':
|
||||||
// Must be a string text to allow to use comparison strings like "<= 999"
|
// Must be a string text to allow to use comparison strings like "<= 99.9"
|
||||||
$szFilterField = '<input type="text" size="6" name="'.$NameField.'" value="'.$ValueField.'">';
|
$szFilterField = '<input type="text" size="6" name="'.$NameField.'" value="'.$ValueField.'">';
|
||||||
break;
|
break;
|
||||||
case 'Status':
|
case 'Status':
|
||||||
|
|||||||
@ -930,7 +930,7 @@ if ($action == 'create') {
|
|||||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
print $object->showOptionals($extrafields, 'edit');
|
print $object->showOptionals($extrafields, 'create');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show link to origin object
|
// Show link to origin object
|
||||||
|
|||||||
@ -176,6 +176,8 @@ if (empty($dolibarr_strict_mode)) {
|
|||||||
$dolibarr_strict_mode = 0; // For debug in php strict mode
|
$dolibarr_strict_mode = 0; // For debug in php strict mode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root); // Filesystem core php (htdocs)
|
||||||
|
|
||||||
// Security: CSRF protection
|
// Security: CSRF protection
|
||||||
// This test check if referrer ($_SERVER['HTTP_REFERER']) is same web site than Dolibarr ($_SERVER['HTTP_HOST'])
|
// This test check if referrer ($_SERVER['HTTP_REFERER']) is same web site than Dolibarr ($_SERVER['HTTP_HOST'])
|
||||||
// when we post forms (we allow GET and HEAD to accept direct link from a particular page).
|
// when we post forms (we allow GET and HEAD to accept direct link from a particular page).
|
||||||
@ -196,6 +198,7 @@ if (!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck)) {
|
|||||||
if ($csrfattack) {
|
if ($csrfattack) {
|
||||||
//print 'NOCSRFCHECK='.defined('NOCSRFCHECK').' REQUEST_METHOD='.$_SERVER['REQUEST_METHOD'].' HTTP_HOST='.$_SERVER['HTTP_HOST'].' HTTP_REFERER='.$_SERVER['HTTP_REFERER'];
|
//print 'NOCSRFCHECK='.defined('NOCSRFCHECK').' REQUEST_METHOD='.$_SERVER['REQUEST_METHOD'].' HTTP_HOST='.$_SERVER['HTTP_HOST'].' HTTP_REFERER='.$_SERVER['HTTP_REFERER'];
|
||||||
// Note: We can't use dol_escape_htmltag here to escape output because lib functions.lib.ph is not yet loaded.
|
// Note: We can't use dol_escape_htmltag here to escape output because lib functions.lib.ph is not yet loaded.
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
|
||||||
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRF protection (Bad referer).", LOG_WARNING);
|
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRF protection (Bad referer).", LOG_WARNING);
|
||||||
print "Access refused by CSRF protection in main.inc.php. Referer of form (".htmlentities($_SERVER['HTTP_REFERER'], ENT_COMPAT, 'UTF-8').") is outside the server that serve this page (with method = ".htmlentities($_SERVER['REQUEST_METHOD'], ENT_COMPAT, 'UTF-8').").\n";
|
print "Access refused by CSRF protection in main.inc.php. Referer of form (".htmlentities($_SERVER['HTTP_REFERER'], ENT_COMPAT, 'UTF-8').") is outside the server that serve this page (with method = ".htmlentities($_SERVER['REQUEST_METHOD'], ENT_COMPAT, 'UTF-8').").\n";
|
||||||
print "If you access your server behind a proxy using url rewriting, you might check that all HTTP headers are propagated (or add the line \$dolibarr_nocsrfcheck=1 into your conf.php file to remove this security check).\n";
|
print "If you access your server behind a proxy using url rewriting, you might check that all HTTP headers are propagated (or add the line \$dolibarr_nocsrfcheck=1 into your conf.php file to remove this security check).\n";
|
||||||
@ -228,7 +231,6 @@ if (empty($dolibarr_main_data_root)) {
|
|||||||
// Define some constants
|
// Define some constants
|
||||||
define('DOL_CLASS_PATH', 'class/'); // Filesystem path to class dir (defined only for some code that want to be compatible with old versions without this parameter)
|
define('DOL_CLASS_PATH', 'class/'); // Filesystem path to class dir (defined only for some code that want to be compatible with old versions without this parameter)
|
||||||
define('DOL_DATA_ROOT', $dolibarr_main_data_root); // Filesystem data (documents)
|
define('DOL_DATA_ROOT', $dolibarr_main_data_root); // Filesystem data (documents)
|
||||||
define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root); // Filesystem core php (htdocs)
|
|
||||||
// Try to autodetect DOL_MAIN_URL_ROOT and DOL_URL_ROOT.
|
// Try to autodetect DOL_MAIN_URL_ROOT and DOL_URL_ROOT.
|
||||||
// Note: autodetect works only in case 1, 2, 3 and 4 of phpunit test CoreTest.php. For case 5, 6, only setting value into conf.php will works.
|
// Note: autodetect works only in case 1, 2, 3 and 4 of phpunit test CoreTest.php. For case 5, 6, only setting value into conf.php will works.
|
||||||
$tmp = '';
|
$tmp = '';
|
||||||
|
|||||||
@ -2927,11 +2927,11 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$this->user_approve_id2 = $obj->fk_user_approve2;
|
$this->user_approve_id2 = $obj->fk_user_approve2;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->date_creation = $this->db->idate($obj->datec);
|
$this->date_creation = $this->db->jdate($obj->datec);
|
||||||
$this->date_modification = $this->db->idate($obj->datem);
|
$this->date_modification = $this->db->jdate($obj->datem);
|
||||||
$this->date_approve = $this->db->idate($obj->datea);
|
$this->date_approve = $this->db->jdate($obj->datea);
|
||||||
$this->date_approve2 = $this->db->idate($obj->datea2);
|
$this->date_approve2 = $this->db->jdate($obj->datea2);
|
||||||
$this->date_validation = $this->db->idate($obj->date_validation);
|
$this->date_validation = $this->db->jdate($obj->date_validation);
|
||||||
}
|
}
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1760,7 +1760,7 @@ if ($action == 'create') {
|
|||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
print $object->showOptionals($extrafields, 'edit');
|
print $object->showOptionals($extrafields, 'create');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bouton "Create Draft"
|
// Bouton "Create Draft"
|
||||||
|
|||||||
@ -1219,7 +1219,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
// Qty
|
// Qty
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
if ($action == 'editline' && $lineid == $objp->dispatchlineid) {
|
if ($action == 'editline' && $lineid == $objp->dispatchlineid) {
|
||||||
print '<input style="width: 50px;" type="number" min="1" name="qty" value="'.$objp->qty.'" />';
|
print '<input style="width: 50px;" type="text" min="1" name="qty" value="'.$objp->qty.'" />';
|
||||||
} else {
|
} else {
|
||||||
print $objp->qty;
|
print $objp->qty;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2270,7 +2270,7 @@ if ($action == 'create') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
print $object->showOptionals($extrafields, 'edit');
|
print $object->showOptionals($extrafields, 'create');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Public note
|
// Public note
|
||||||
@ -2406,6 +2406,15 @@ if ($action == 'create') {
|
|||||||
// $resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
// $resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||||
$resteapayer = price2num($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT');
|
$resteapayer = price2num($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT');
|
||||||
|
|
||||||
|
// Multicurrency
|
||||||
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
|
$multicurrency_totalpaye = $object->getSommePaiement(1);
|
||||||
|
$multicurrency_totalcreditnotes = $object->getSumCreditNotesUsed(1);
|
||||||
|
$multicurrency_totaldeposits = $object->getSumDepositsUsed(1);
|
||||||
|
$multicurrency_resteapayer = price2num($object->multicurrency_total_ttc - $multicurrency_totalpaye - $multicurrency_totalcreditnotes - $multicurrency_totaldeposits, 'MT');
|
||||||
|
$resteapayer = price2num($multicurrency_resteapayer / $object->multicurrency_tx, 'MT');
|
||||||
|
}
|
||||||
|
|
||||||
if ($object->paye) {
|
if ($object->paye) {
|
||||||
$resteapayer = 0;
|
$resteapayer = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -642,13 +642,19 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
|
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) {
|
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) {
|
||||||
print price($objp->multicurrency_am);
|
print price($sign * $multicurrency_payment);
|
||||||
|
if ($multicurrency_creditnotes) {
|
||||||
|
print '+'.price($multicurrency_creditnotes);
|
||||||
|
}
|
||||||
|
if ($multicurrency_deposits) {
|
||||||
|
print '+'.price($multicurrency_deposits);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) {
|
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) {
|
||||||
print price($objp->multicurrency_total_ttc - $objp->multicurrency_am);
|
print price($sign * $multicurrency_remaintopay);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -627,3 +627,5 @@ CREATE TABLE llx_onlinesignature
|
|||||||
|
|
||||||
ALTER TABLE llx_facture_fourn CHANGE COLUMN fk_mode_transport fk_transport_mode integer;
|
ALTER TABLE llx_facture_fourn CHANGE COLUMN fk_mode_transport fk_transport_mode integer;
|
||||||
|
|
||||||
|
ALTER TABLE llx_c_socialnetworks DROP INDEX idx_c_socialnetworks_code;
|
||||||
|
ALTER TABLE llx_c_socialnetworks ADD UNIQUE INDEX idx_c_socialnetworks_code_entity (code, entity);
|
||||||
|
|||||||
@ -16,4 +16,4 @@
|
|||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE llx_c_socialnetworks ADD UNIQUE INDEX idx_c_socialnetworks_code (code);
|
ALTER TABLE llx_c_socialnetworks ADD UNIQUE INDEX idx_c_socialnetworks_code_entity (code, entity);
|
||||||
|
|||||||
@ -565,7 +565,7 @@ if ($ok && GETPOST('restore_user_pictures', 'alpha')) {
|
|||||||
$filetotestsmall = $dolibarr_main_data_root.'/users/'.substr(sprintf('%08d', $obj->rowid), -1, 1).'/'.substr(sprintf('%08d', $obj->rowid), -2, 1).'/thumbs/'.$name.'_small'.$ext;
|
$filetotestsmall = $dolibarr_main_data_root.'/users/'.substr(sprintf('%08d', $obj->rowid), -1, 1).'/'.substr(sprintf('%08d', $obj->rowid), -2, 1).'/thumbs/'.$name.'_small'.$ext;
|
||||||
$filetotestmini = $dolibarr_main_data_root.'/users/'.substr(sprintf('%08d', $obj->rowid), -1, 1).'/'.substr(sprintf('%08d', $obj->rowid), -2, 1).'/thumbs/'.$name.'_mini'.$ext;
|
$filetotestmini = $dolibarr_main_data_root.'/users/'.substr(sprintf('%08d', $obj->rowid), -1, 1).'/'.substr(sprintf('%08d', $obj->rowid), -2, 1).'/thumbs/'.$name.'_mini'.$ext;
|
||||||
$exists = dol_is_file($filetotest);
|
$exists = dol_is_file($filetotest);
|
||||||
print 'Check user '.$obj->rowid.' lastname='.$obj->lastname.' fistname='.$obj->firstname.' photo='.$obj->photo.' file '.$filetotest." exists=".$exists."<br>\n";
|
print 'Check user '.$obj->rowid.' lastname='.$obj->lastname.' firstname='.$obj->firstname.' photo='.$obj->photo.' file '.$filetotest." exists=".$exists."<br>\n";
|
||||||
if ($exists) {
|
if ($exists) {
|
||||||
$filetarget = $dolibarr_main_data_root.'/users/'.$obj->rowid.'/'.$name.$ext;
|
$filetarget = $dolibarr_main_data_root.'/users/'.$obj->rowid.'/'.$name.$ext;
|
||||||
$filetargetsmall = $dolibarr_main_data_root.'/users/'.$obj->rowid.'/thumbs/'.$name.'_small'.$ext;
|
$filetargetsmall = $dolibarr_main_data_root.'/users/'.$obj->rowid.'/thumbs/'.$name.'_small'.$ext;
|
||||||
|
|||||||
@ -530,7 +530,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
|
|||||||
|
|
||||||
// Can call a dedicated external upgrade process
|
// Can call a dedicated external upgrade process
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$parameters = array('versionfrom'=>$versionfrom, 'versionto='.$versionto);
|
$parameters = array('versionfrom' => $versionfrom, 'versionto' => $versionto);
|
||||||
$object = new stdClass();
|
$object = new stdClass();
|
||||||
$action = "upgrade";
|
$action = "upgrade";
|
||||||
$reshook = $hookmanager->executeHooks('doUpgrade2', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks('doUpgrade2', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|||||||
@ -182,3 +182,4 @@ BankColorizeMovementName2=Background color for credit movement
|
|||||||
IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning.
|
IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning.
|
||||||
NoBankAccountDefined=No bank account defined
|
NoBankAccountDefined=No bank account defined
|
||||||
NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled.
|
NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled.
|
||||||
|
AlreadyOneBankAccount=Already one bank account defined
|
||||||
|
|||||||
@ -1296,21 +1296,33 @@ if ($dirins && $action == 'addproperty' && empty($cancel) && !empty($module) &&
|
|||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$addfieldentry = array(
|
$addfieldentry = array(
|
||||||
'name'=>GETPOST('propname', 'aZ09'), 'label'=>GETPOST('proplabel', 'alpha'), 'type'=>GETPOST('proptype', 'alpha'),
|
'name'=>GETPOST('propname', 'aZ09'),
|
||||||
|
'label'=>GETPOST('proplabel', 'alpha'),
|
||||||
|
'type'=>GETPOST('proptype', 'alpha'),
|
||||||
'arrayofkeyval'=>GETPOST('proparrayofkeyval', 'restricthtml'), // Example json string '{"0":"Draft","1":"Active","-1":"Cancel"}'
|
'arrayofkeyval'=>GETPOST('proparrayofkeyval', 'restricthtml'), // Example json string '{"0":"Draft","1":"Active","-1":"Cancel"}'
|
||||||
'visible'=>GETPOST('propvisible', 'int'), 'enabled'=>GETPOST('propenabled', 'int'),
|
'visible'=>GETPOST('propvisible', 'int'),
|
||||||
'position'=>GETPOST('propposition', 'int'), 'notnull'=>GETPOST('propnotnull', 'int'), 'index'=>GETPOST('propindex', 'int'), 'searchall'=>GETPOST('propsearchall', 'int'),
|
'enabled'=>GETPOST('propenabled', 'int'),
|
||||||
'isameasure'=>GETPOST('propisameasure', 'int'), 'comment'=>GETPOST('propcomment', 'alpha'), 'help'=>GETPOST('prophelp', 'alpha'),
|
'position'=>GETPOST('propposition', 'int'),
|
||||||
'css'=>GETPOST('propcss', 'aZ09'), 'cssview'=>GETPOST('propcssview', 'aZ09'), 'csslist'=>GETPOST('propcsslist', 'aZ09')
|
'notnull'=>GETPOST('propnotnull', 'int'),
|
||||||
|
'index'=>GETPOST('propindex', 'int'),
|
||||||
|
'searchall'=>GETPOST('propsearchall', 'int'),
|
||||||
|
'isameasure'=>GETPOST('propisameasure', 'int'),
|
||||||
|
'comment'=>GETPOST('propcomment', 'alpha'),
|
||||||
|
'help'=>GETPOST('prophelp', 'alpha'),
|
||||||
|
'css'=>GETPOST('propcss', 'aZ09'),
|
||||||
|
'cssview'=>GETPOST('propcssview', 'aZ09'),
|
||||||
|
'csslist'=>GETPOST('propcsslist', 'aZ09'),
|
||||||
|
'default'=>GETPOST('propdefault', 'restricthtml'),
|
||||||
|
'noteditable'=>intval(GETPOST('propnoteditable', 'int')),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!empty($addfieldentry['arrayofkeyval']) && !is_array($addfieldentry['arrayofkeyval'])) {
|
if (!empty($addfieldentry['arrayofkeyval']) && !is_array($addfieldentry['arrayofkeyval'])) {
|
||||||
$addfieldentry['arrayofkeyval'] = json_decode($addfieldentry['arrayofkeyval'], true);
|
$addfieldentry['arrayofkeyval'] = json_decode($addfieldentry['arrayofkeyval'], true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*if (GETPOST('regeneratemissing'))
|
/*if (GETPOST('regeneratemissing'))
|
||||||
{
|
{
|
||||||
@ -2800,7 +2812,7 @@ if ($module == 'initmodule') {
|
|||||||
print '<input class="center" name="propvisible" size="2" value="'.dol_escape_htmltag($propvisible).'">';
|
print '<input class="center" name="propvisible" size="2" value="'.dol_escape_htmltag($propvisible).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input class="center" name="propnoeditable" size="2" value="'.dol_escape_htmltag($propnoteditable).'">';
|
print '<input class="center" name="propnoteditable" size="2" value="'.dol_escape_htmltag($propnoteditable).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input class="center" name="propsearchall" size="2" value="'.dol_escape_htmltag($propsearchall).'">';
|
print '<input class="center" name="propsearchall" size="2" value="'.dol_escape_htmltag($propsearchall).'">';
|
||||||
|
|||||||
@ -479,7 +479,7 @@ if ($resql) {
|
|||||||
// var_dump($obj);
|
// var_dump($obj);
|
||||||
print ' <td><input class="minwidth200" name="dateinput" value="'. date('Y-m-d', dol_stringtotime($obj->date_sync)) .'" type="date"></td>';
|
print ' <td><input class="minwidth200" name="dateinput" value="'. date('Y-m-d', dol_stringtotime($obj->date_sync)) .'" type="date"></td>';
|
||||||
print '<td>' . $form->selectMultiCurrency($obj->code, 'multicurrency_code', 1, " code != '".$conf->currency."'", true) . '</td>';
|
print '<td>' . $form->selectMultiCurrency($obj->code, 'multicurrency_code', 1, " code != '".$conf->currency."'", true) . '</td>';
|
||||||
print ' <td><input type="number" min ="0" step="any" class="minwidth200" name="rateinput" value="' . dol_escape_htmltag($obj->rate) . '"></td>';
|
print ' <td><input type="text" min ="0" step="any" class="minwidth200" name="rateinput" value="' . dol_escape_htmltag($obj->rate) . '"></td>';
|
||||||
|
|
||||||
print '<td class="center nowrap ">';
|
print '<td class="center nowrap ">';
|
||||||
print '<input type="hidden" name="page" value="'.dol_escape_htmltag($page).'">';
|
print '<input type="hidden" name="page" value="'.dol_escape_htmltag($page).'">';
|
||||||
|
|||||||
@ -1334,7 +1334,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note (private, no output on invoices, propales...)
|
// Note (private, no output on invoices, propales...)
|
||||||
|
|||||||
@ -1617,7 +1617,7 @@ class Products extends DolibarrApi
|
|||||||
$combinations[$key]->attributes = $prodc2vp->fetchByFkCombination((int) $combination->id);
|
$combinations[$key]->attributes = $prodc2vp->fetchByFkCombination((int) $combination->id);
|
||||||
$combinations[$key] = $this->_cleanObjectDatas($combinations[$key]);
|
$combinations[$key] = $this->_cleanObjectDatas($combinations[$key]);
|
||||||
|
|
||||||
if ($includestock==1) {
|
if ($includestock==1 && DolibarrApiAccess::$user->rights->stock->lire) {
|
||||||
$productModel = new Product($this->db);
|
$productModel = new Product($this->db);
|
||||||
$productModel->fetch((int) $combination->fk_product_child);
|
$productModel->fetch((int) $combination->fk_product_child);
|
||||||
$productModel->load_stock();
|
$productModel->load_stock();
|
||||||
@ -1859,7 +1859,7 @@ class Products extends DolibarrApi
|
|||||||
public function getStock($id, $selected_warehouse_id = null)
|
public function getStock($id, $selected_warehouse_id = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!DolibarrApiAccess::$user->rights->produit->lire) {
|
if (!DolibarrApiAccess::$user->rights->produit->lire || !DolibarrApiAccess::$user->rights->stock->lire) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1945,6 +1945,10 @@ class Products extends DolibarrApi
|
|||||||
|
|
||||||
unset($object->supplierprices); // Mut use another API to get them
|
unset($object->supplierprices); // Mut use another API to get them
|
||||||
|
|
||||||
|
if(!DolibarrApiAccess::$user->rights->stock->lire){
|
||||||
|
unset($object->stock_reel);
|
||||||
|
unset($object->stock_theorique);
|
||||||
|
}
|
||||||
|
|
||||||
return $object;
|
return $object;
|
||||||
}
|
}
|
||||||
@ -2008,7 +2012,7 @@ class Products extends DolibarrApi
|
|||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($includestockdata) {
|
if ($includestockdata && DolibarrApiAccess::$user->rights->stock->lire) {
|
||||||
$this->product->load_stock();
|
$this->product->load_stock();
|
||||||
|
|
||||||
if (is_array($this->product->stock_warehouse)) {
|
if (is_array($this->product->stock_warehouse)) {
|
||||||
|
|||||||
@ -5271,7 +5271,7 @@ class Product extends CommonObject
|
|||||||
$stock_sending_client = $this->stats_expedition['qty'];
|
$stock_sending_client = $this->stats_expedition['qty'];
|
||||||
}
|
}
|
||||||
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) {
|
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) {
|
||||||
$filterStatus = empty($conf->global->SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK) ? '2,3,4' : $conf->global->SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK;
|
$filterStatus = empty($conf->global->SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK) ? '3,4' : $conf->global->SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK;
|
||||||
if (isset($includedraftpoforvirtual)) {
|
if (isset($includedraftpoforvirtual)) {
|
||||||
$filterStatus = '0,1,2,'.$filterStatus; // 1,2 may have already been inside $filterStatus but it is better to have twice than missing $filterStatus does not include them
|
$filterStatus = '0,1,2,'.$filterStatus; // 1,2 may have already been inside $filterStatus but it is better to have twice than missing $filterStatus does not include them
|
||||||
}
|
}
|
||||||
@ -5281,7 +5281,7 @@ class Product extends CommonObject
|
|||||||
}
|
}
|
||||||
$stock_commande_fournisseur = $this->stats_commande_fournisseur['qty'];
|
$stock_commande_fournisseur = $this->stats_commande_fournisseur['qty'];
|
||||||
}
|
}
|
||||||
if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && empty($conf->reception->enabled)) {
|
if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && !empty($conf->reception->enabled)) {
|
||||||
$filterStatus = '4';
|
$filterStatus = '4';
|
||||||
if (isset($includedraftpoforvirtual)) {
|
if (isset($includedraftpoforvirtual)) {
|
||||||
$filterStatus = '0,'.$filterStatus;
|
$filterStatus = '0,'.$filterStatus;
|
||||||
|
|||||||
@ -523,6 +523,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="newmember">'.
|
|||||||
print '<input type="hidden" name="token" value="'.newToken().'" / >';
|
print '<input type="hidden" name="token" value="'.newToken().'" / >';
|
||||||
print '<input type="hidden" name="entity" value="'.$entity.'" />';
|
print '<input type="hidden" name="entity" value="'.$entity.'" />';
|
||||||
print '<input type="hidden" name="action" value="add" />';
|
print '<input type="hidden" name="action" value="add" />';
|
||||||
|
print '<input type="hidden" name="page_y" value="" />';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
@ -596,7 +597,7 @@ if (empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY)) {
|
|||||||
// Company
|
// Company
|
||||||
print '<tr id="trcompany" class="trcompany"><td>'.$langs->trans("Company").'</td><td>';
|
print '<tr id="trcompany" class="trcompany"><td>'.$langs->trans("Company").'</td><td>';
|
||||||
print img_picto('', 'company', 'class="pictofixedwidth"');
|
print img_picto('', 'company', 'class="pictofixedwidth"');
|
||||||
print '<input type="text" name="societe" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('societe')).'"></td></tr>'."\n";
|
print '<input type="text" name="societe" class="minwidth150 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOST('societe')).'"></td></tr>'."\n";
|
||||||
// Title
|
// Title
|
||||||
print '<tr><td class="titlefield">'.$langs->trans('UserTitle').'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans('UserTitle').'</td><td>';
|
||||||
print $formcompany->select_civility(GETPOST('civility_id'), 'civility_id').'</td></tr>'."\n";
|
print $formcompany->select_civility(GETPOST('civility_id'), 'civility_id').'</td></tr>'."\n";
|
||||||
@ -625,7 +626,7 @@ 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'), 0, 1, '', 'width75');
|
||||||
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>';
|
||||||
|
|||||||
@ -869,7 +869,7 @@ if ($action == 'create') {
|
|||||||
if ($objectsrc->fetch_optionals() > 0) {
|
if ($objectsrc->fetch_optionals() > 0) {
|
||||||
$recept->array_options = array_merge($recept->array_options, $objectsrc->array_options);
|
$recept->array_options = array_merge($recept->array_options, $objectsrc->array_options);
|
||||||
}
|
}
|
||||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Incoterms
|
// Incoterms
|
||||||
|
|||||||
@ -698,8 +698,14 @@ class RecruitmentJobPosition extends CommonObject
|
|||||||
$newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $this->thirdparty->default_lang);
|
$newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $this->thirdparty->default_lang);
|
||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs->setDefaultLang($newlang);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PDF
|
||||||
|
$hidedetails = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0);
|
||||||
|
$hidedesc = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0);
|
||||||
|
$hideref = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0);
|
||||||
|
|
||||||
//$ret=$object->fetch($id); // Reload to get new records
|
//$ret=$object->fetch($id); // Reload to get new records
|
||||||
$this->generateDocument($modelpdf, $outputlangs);
|
$this->generateDocument($modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
|
|||||||
@ -576,7 +576,7 @@ if ($action == 'create') {
|
|||||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
print $object->showOptionals($extrafields, 'edit');
|
print $object->showOptionals($extrafields, 'create');
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -1151,6 +1151,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
$("#typent_id").change();
|
$("#typent_id").change();
|
||||||
$("#effectif_id").val(id_ef15);
|
$("#effectif_id").val(id_ef15);
|
||||||
$("#effectif_id").change();
|
$("#effectif_id").change();
|
||||||
|
/* Force to recompute the width of a select2 field when it was hidden and then shown programatically */
|
||||||
|
if ($("#civility_id").data("select2")) {
|
||||||
|
$("#civility_id").select2({width: "resolve"});
|
||||||
|
}
|
||||||
$("#TypeName").html(document.formsoc.LastName.value);
|
$("#TypeName").html(document.formsoc.LastName.value);
|
||||||
document.formsoc.private.value=1;
|
document.formsoc.private.value=1;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1233,7 +1233,7 @@ if ($action == 'create') {
|
|||||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
print $object->showOptionals($extrafields, 'create', $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -37,9 +37,9 @@ if (!defined('NOREQUIREMENU')) {
|
|||||||
if (!defined('NOREQUIREHTML')) {
|
if (!defined('NOREQUIREHTML')) {
|
||||||
define('NOREQUIREHTML', '1');
|
define('NOREQUIREHTML', '1');
|
||||||
}
|
}
|
||||||
if (!defined('NOREQUIREAJAX')) {
|
//if (!defined('NOREQUIREAJAX')) {
|
||||||
define('NOREQUIREAJAX', '1');
|
// define('NOREQUIREAJAX', '1');
|
||||||
}
|
//}
|
||||||
|
|
||||||
require '../main.inc.php'; // Load $user and permissions
|
require '../main.inc.php'; // Load $user and permissions
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
@ -258,38 +258,34 @@ if ($conf->global->TAKEPOS_NUMPAD == 0) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div style="position:relative; padding-top: 20px; left:5%; height:150px; width:90%;">
|
<div style="position:relative; padding-top: 20px; left:5%; height:150px; width:90%;">
|
||||||
|
<div class="paymentbordline paymentbordlinetotal center">
|
||||||
<div class="paymentbordline paymentbordlinetotal">
|
<span class="takepospay colorwhite"><?php echo $langs->trans('TotalTTC'); ?>: <span id="totaldisplay" class="colorwhite"><?php echo price($invoice->total_ttc, 1, '', 1, -1, -1, $invoice->multicurrency_code); ?></span></span>
|
||||||
<center><span class="takepospay"><font color="white"><?php echo $langs->trans('TotalTTC'); ?>: </font><span id="totaldisplay" class="colorwhite"><?php echo price($invoice->total_ttc, 1, '', 1, -1, -1, $invoice->multicurrency_code); ?></span></span></center>
|
|
||||||
</div>
|
</div>
|
||||||
<?php if ($remaintopay != $invoice->total_ttc) { ?>
|
<?php if ($remaintopay != $invoice->total_ttc) { ?>
|
||||||
<div class="paymentbordline paymentbordlineremain">
|
<div class="paymentbordline paymentbordlineremain center">
|
||||||
<center><span class="takepospay"><font color="white"><?php echo $langs->trans('RemainToPay'); ?>: </font><span id="remaintopaydisplay" class="colorwhite"><?php echo price($remaintopay, 1, '', 1, -1, -1, $invoice->multicurrency_code); ?></span></span></center>
|
<span class="takepospay colorwhite"><?php echo $langs->trans('RemainToPay'); ?>: <span id="remaintopaydisplay" class="colorwhite"><?php echo price($remaintopay, 1, '', 1, -1, -1, $invoice->multicurrency_code); ?></span></span>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<div class="paymentbordline paymentbordlinereceived">
|
<div class="paymentbordline paymentbordlinereceived center">
|
||||||
<center><span class="takepospay"><font color="white"><?php echo $langs->trans("Received"); ?>: </font><span class="change1 colorred"><?php echo price(0, 1, '', 1, -1, -1, $invoice->multicurrency_code); ?></span><input type="hidden" id="change1" class="change1" value="0"></span></center>
|
<span class="takepospay colorwhite"><?php echo $langs->trans("Received"); ?>: <span class="change1 colorred"><?php echo price(0, 1, '', 1, -1, -1, $invoice->multicurrency_code); ?></span><input type="hidden" id="change1" class="change1" value="0"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="paymentbordline paymentbordlinechange">
|
<div class="paymentbordline paymentbordlinechange center">
|
||||||
<center><span class="takepospay"><font color="white"><?php echo $langs->trans("Change"); ?>: </font><span class="change2 colorwhite"><?php echo price(0, 1, '', 1, -1, -1, $invoice->multicurrency_code); ?></span><input type="hidden" id="change2" class="change2" value="0"></span></center>
|
<span class="takepospay colorwhite"><?php echo $langs->trans("Change"); ?>: <span class="change2 colorwhite"><?php echo price(0, 1, '', 1, -1, -1, $invoice->multicurrency_code); ?></span><input type="hidden" id="change2" class="change2" value="0"></span>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($conf->global->TAKEPOS_CAN_FORCE_BANK_ACCOUNT_DURING_PAYMENT)) {
|
if (!empty($conf->global->TAKEPOS_CAN_FORCE_BANK_ACCOUNT_DURING_PAYMENT)) {
|
||||||
print '<div class="paymentbordline paddingtop paddingbottom">
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||||
<center>';
|
print '<div class="paymentbordline paddingtop paddingbottom center">';
|
||||||
$filter = '';
|
$filter = '';
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
print '<span class="takepospay"><font color="white">'.$langs->trans("BankAccount").': </font></span>';
|
print '<span class="takepospay colorwhite">'.$langs->trans("BankAccount").': </span>';
|
||||||
$form->select_comptes(0, 'accountid', 0, $filter, 1, '');
|
$form->select_comptes(0, 'accountid', 0, $filter, 1, '');
|
||||||
print ajax_combobox('selectaccountid');
|
print ajax_combobox('selectaccountid');
|
||||||
print '</center>
|
print '</div>';
|
||||||
</div>';
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div style="position:absolute; left:5%; height:52%; width:90%;">
|
<div style="position:absolute; left:5%; height:52%; width:90%;">
|
||||||
<?php
|
<?php
|
||||||
$action_buttons = array(
|
$action_buttons = array(
|
||||||
|
|||||||
@ -1549,7 +1549,7 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select
|
|||||||
height: 64px !important;
|
height: 64px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.divmainbodylarge { margin-left: 20px !important; margin-right: 20px !important; }
|
.divmainbodylarge { margin-left: 10px !important; margin-right: 10px !important; }
|
||||||
|
|
||||||
.tdoverflowonsmartphone {
|
.tdoverflowonsmartphone {
|
||||||
max-width: 0;
|
max-width: 0;
|
||||||
|
|||||||
@ -1576,7 +1576,7 @@ table[summary="list_of_modules"] .fa-cog {
|
|||||||
min-width: 150px !important;
|
min-width: 150px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.divmainbodylarge { margin-left: 20px; margin-right: 20px; }
|
.divmainbodylarge { margin-left: 10px; margin-right: 10px; }
|
||||||
|
|
||||||
.tdoverflowonsmartphone {
|
.tdoverflowonsmartphone {
|
||||||
max-width: 0;
|
max-width: 0;
|
||||||
|
|||||||
@ -1671,7 +1671,7 @@ class Ticket extends CommonObject
|
|||||||
$actioncomm->userassigned = array($user->id);
|
$actioncomm->userassigned = array($user->id);
|
||||||
$actioncomm->userownerid = $user->id;
|
$actioncomm->userownerid = $user->id;
|
||||||
$actioncomm->datep = $now;
|
$actioncomm->datep = $now;
|
||||||
$actioncomm->percentage = 100;
|
$actioncomm->percentage = -1; // percentage is not relevant for punctual events
|
||||||
$actioncomm->elementtype = 'ticket';
|
$actioncomm->elementtype = 'ticket';
|
||||||
$actioncomm->fk_element = $this->id;
|
$actioncomm->fk_element = $this->id;
|
||||||
|
|
||||||
|
|||||||
@ -324,7 +324,8 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
|
|||||||
$ret .= '</form>';
|
$ret .= '</form>';
|
||||||
print $ret;
|
print $ret;
|
||||||
} else {
|
} else {
|
||||||
print dol_getIdFromCode($db, $object->default_c_exp_tax_cat, 'c_exp_tax_cat', 'rowid', 'label');
|
$label_exp_tax_cat = dol_getIdFromCode($db, $object->default_c_exp_tax_cat, 'c_exp_tax_cat', 'rowid', 'label');
|
||||||
|
print $langs->trans($label_exp_tax_cat);
|
||||||
//print $form->editfieldval("DefaultCategoryCar", 'default_c_exp_tax_cat', $object->default_c_exp_tax_cat, $object, $user->rights->user->user->creer, 'string', ($object->default_c_exp_tax_cat != '' ? $object->default_c_exp_tax_cat : ''));
|
//print $form->editfieldval("DefaultCategoryCar", 'default_c_exp_tax_cat', $object->default_c_exp_tax_cat, $object, $user->rights->user->user->creer, 'string', ($object->default_c_exp_tax_cat != '' ? $object->default_c_exp_tax_cat : ''));
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -356,7 +357,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
|
|||||||
|
|
||||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
// Nbre max d'elements des petites listes
|
// Max number of elements in small lists
|
||||||
$MAXLIST = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
|
$MAXLIST = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
|
||||||
|
|
||||||
// Latest payments of salaries
|
// Latest payments of salaries
|
||||||
|
|||||||
@ -76,9 +76,6 @@ $userlogin = $argv[2];
|
|||||||
$version = DOL_VERSION;
|
$version = DOL_VERSION;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
// Language Management
|
|
||||||
$langs->loadLangs(array('main', 'admin', 'cron', 'dict'));
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
@ -125,7 +122,7 @@ if ($userlogin == 'firstadmin') {
|
|||||||
|
|
||||||
// Check user login
|
// Check user login
|
||||||
$user = new User($db);
|
$user = new User($db);
|
||||||
$result = $user->fetch('', $userlogin);
|
$result = $user->fetch('', $userlogin, '', 1);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
echo "User Error: ".$user->error;
|
echo "User Error: ".$user->error;
|
||||||
dol_syslog("cron_run_jobs.php:: User Error:".$user->error, LOG_ERR);
|
dol_syslog("cron_run_jobs.php:: User Error:".$user->error, LOG_ERR);
|
||||||
@ -137,6 +134,19 @@ if ($result < 0) {
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reload langs
|
||||||
|
$langcode = (empty($conf->global->MAIN_LANG_DEFAULT) ? 'auto' : $conf->global->MAIN_LANG_DEFAULT);
|
||||||
|
if (!empty($user->conf->MAIN_LANG_DEFAULT)) {
|
||||||
|
$langcode = $user->conf->MAIN_LANG_DEFAULT;
|
||||||
|
}
|
||||||
|
if ($langs->getDefaultLang() != $langcode) {
|
||||||
|
$langs->setDefaultLang($langcode);
|
||||||
|
$langs->tab_translate = array();
|
||||||
|
}
|
||||||
|
// Language Management
|
||||||
|
$langs->loadLangs(array('main', 'admin', 'cron', 'dict'));
|
||||||
|
|
||||||
$user->getrights();
|
$user->getrights();
|
||||||
|
|
||||||
if (isset($argv[3]) && $argv[3]) {
|
if (isset($argv[3]) && $argv[3]) {
|
||||||
@ -195,8 +205,8 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) {
|
|||||||
$mysoc->setMysoc($conf);
|
$mysoc->setMysoc($conf);
|
||||||
|
|
||||||
// Force recheck that user is ok for the entity to process and reload permission for entity
|
// Force recheck that user is ok for the entity to process and reload permission for entity
|
||||||
if ($conf->entity != $user->entity && $user->entity != 0) {
|
if ($conf->entity != $user->entity) {
|
||||||
$result = $user->fetch('', $userlogin, '', 0, $conf->entity);
|
$result = $user->fetch('', $userlogin, '', 1);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
echo "\nUser Error: ".$user->error."\n";
|
echo "\nUser Error: ".$user->error."\n";
|
||||||
dol_syslog("cron_run_jobs.php:: User Error:".$user->error, LOG_ERR);
|
dol_syslog("cron_run_jobs.php:: User Error:".$user->error, LOG_ERR);
|
||||||
@ -218,6 +228,8 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) {
|
|||||||
}
|
}
|
||||||
if ($langs->getDefaultLang() != $langcode) {
|
if ($langs->getDefaultLang() != $langcode) {
|
||||||
$langs->setDefaultLang($langcode);
|
$langs->setDefaultLang($langcode);
|
||||||
|
$langs->tab_translate = array();
|
||||||
|
$langs->loadLangs(array('main', 'admin', 'cron', 'dict'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user