Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into dev_new_add_ref_clinet_intervention

This commit is contained in:
Florian HENRY 2022-05-17 22:49:26 +02:00
commit ecd0d2a7e2
70 changed files with 397 additions and 287 deletions

View File

@ -1,7 +1,7 @@
<?php
/*spl_autoload_register(function ($class_name) {
var_dump('class='.$class_name);
//var_dump('class='.$class_name);
require $class_name;
});
*/

View File

@ -558,11 +558,11 @@ if ($result) {
}
/*var_dump($tabpay);
var_dump($tabcompany);
var_dump($tabbq);
var_dump($tabtp);
var_dump($tabtype);*/
//var_dump($tabpay);
//var_dump($tabcompany);
//var_dump($tabbq);
//var_dump($tabtp);
//var_dump($tabtype);
// Write bookkeeping
if (!$error && $action == 'writebookkeeping') {
@ -594,9 +594,9 @@ if (!$error && $action == 'writebookkeeping') {
$db->begin();
// Introduce a protection. Total of tabtp must be total of tabbq
/*var_dump($tabpay);
var_dump($tabtp);
var_dump($tabbq);exit;*/
//var_dump($tabpay);
//var_dump($tabtp);
//var_dump($tabbq);exit;
// Bank
if (!$errorforline && is_array($tabbq[$key])) {
@ -1267,9 +1267,9 @@ if (empty($action) || $action == 'view') {
$accounttoshowsubledger = length_accounta($k);
if ($accounttoshow != $accounttoshowsubledger) {
if (empty($accounttoshowsubledger) || $accounttoshowsubledger == 'NotDefined') {
/*var_dump($tabpay[$key]);
var_dump($tabtype[$key]);
var_dump($tabbq[$key]);*/
//var_dump($tabpay[$key]);
//var_dump($tabtype[$key]);
//var_dump($tabbq[$key]);
//print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
if (!empty($tabcompany[$key]['code_compta'])) {
if (in_array($tabtype[$key], array('payment_various', 'payment_salary'))) {

View File

@ -442,23 +442,23 @@ print '<td>'.$langs->trans("Parameter").'</td>';
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
print "</tr>\n";
/*var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY);
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY);
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY);
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY);
*/
//var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY);
//var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY);
//var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY);
//var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY);
if (!isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY)) {
$conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY = 1;
}
if (!isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY)) {
$conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY = 1;
}
/*
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY);
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY);
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY);
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY);
*/
//var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY);
//var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY);
//var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY);
//var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY);
// Set working days
print '<tr class="oddeven">';

View File

@ -407,10 +407,10 @@ if (empty($error) && !empty($xml)) {
$checksumget = md5(join(',', $checksumconcat));
$checksumtoget = trim((string) $xml->dolibarr_htdocs_dir_checksum);
/*var_dump(count($file_list['added']));
var_dump($checksumget);
var_dump($checksumtoget);
var_dump($checksumget == $checksumtoget);*/
//var_dump(count($file_list['added']));
//var_dump($checksumget);
//var_dump($checksumtoget);
//var_dump($checksumget == $checksumtoget);
$resultcomment = '';

View File

@ -58,23 +58,6 @@ print $langs->trans("xcache.optimizer").': '.yn(ini_get('xcache.optimizer')).' (
print $langs->trans("xcache.stat").': '.yn(ini_get('xcache.stat')).'<br>'."\n";
print $langs->trans("xcache.coverager").': '.yn(ini_get('xcache.coverager')).'<br>'."\n";
//print xcache_get();
/*
$cacheinfos = array();
for ($i = 0; $i < 10; $i ++)
{
$data = xcache_info(XC_TYPE_PHP, $i);
$data['cacheid'] = $i;
$cacheinfos[] = $data;
}
var_dump($cacheinfos);
if ($action == 'clear')
{
xcache_clear_cache();
}
*/
// End of page
llxFooter();

View File

@ -444,9 +444,9 @@ if ($mode == 'overwrite') {
if ($mode == 'searchkey') {
$nbempty = 0;
/*var_dump($langcode);
var_dump($transkey);
var_dump($transvalue);*/
//var_dump($langcode);
//var_dump($transkey);
//var_dump($transvalue);
if (empty($langcode) || $langcode == '-1') {
$nbempty++;
}

View File

@ -568,10 +568,9 @@ class Documents extends DolibarrApi
{
global $db, $conf;
/*var_dump($modulepart);
var_dump($filename);
var_dump($filecontent);
exit;*/
//var_dump($modulepart);
//var_dump($filename);
//var_dump($filecontent);exit;
if (empty($modulepart)) {
throw new RestException(400, 'Modulepart not provided.');

View File

@ -92,11 +92,11 @@ function formatObject($objtoshow, $prefix)
$s .= '<tr><td>'.($prefix ? $prefix.' > ' : '').$key.'</td>';
$s .= '<td>';
if (in_array($key, array('date', 'datef', 'dateh', 'datec', 'datem', 'datep'))) {
/*var_dump(is_object($val));
var_dump(is_array($val));
var_dump(is_array($val));
var_dump(@get_class($val));
var_dump($val);*/
//var_dump(is_object($val));
//var_dump(is_array($val));
//var_dump(is_array($val));
//var_dump(@get_class($val));
//var_dump($val);
$s .= dol_print_date($val, 'dayhour');
} else {
$s .= $val;

View File

@ -1191,7 +1191,8 @@ if (count($listofextcals)) {
foreach ($icalevents as $icalevent) {
//var_dump($icalevent);
//print $icalevent['SUMMARY'].'->'.var_dump($icalevent).'<br>';exit;
//print $icalevent['SUMMARY'].'->';
//var_dump($icalevent);exit;
if (!empty($icalevent['RRULE'])) {
continue; // We found a repeatable event. It was already split into unitary events, so we discard general rule.
}

View File

@ -961,7 +961,9 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
$ymd = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $day);
$nextindextouse = count($colorindexused); // At first run, this is 0, so fist user has 0, next 1, ...
//if ($username->id && $day==1) var_dump($eventarray);
//if ($username->id && $day==1) {
//var_dump($eventarray);
//}
// We are in a particular day for $username, now we scan all events
foreach ($eventarray as $daykey => $notused) {

View File

@ -1130,7 +1130,9 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
$colorindexused[$user->id] = 0; // Color index for current user (user->id) is always 0
$nextindextouse = count($colorindexused); // At first run this is 0, so first user has 0, next 1, ...
//if ($username->id && $day==1) var_dump($eventarray);
//if ($username->id && $day==1) {
//var_dump($eventarray);
//}
// We are in a particular day for $username, now we scan all events
foreach ($eventarray as $daykey => $notused) {

View File

@ -1066,8 +1066,8 @@ class BonPrelevement extends CommonObject
// This also set the property $this->total with amount that is included into file
$result = $this->generate($format, $executiondate, $type);
if ($result < 0) {
/*var_dump($this->error);
var_dump($this->invoice_in_error); */
//var_dump($this->error);
//var_dump($this->invoice_in_error);
$error++;
}
}

View File

@ -862,11 +862,11 @@ abstract class CommonInvoice extends CommonObject
$pricewithtax = implode(unpack("H*", price2num($pricewithtaxstring, 2)));
$pricetax = implode(unpack("H*", $pricetaxstring));
var_dump(strlen($this->thirdparty->name));
var_dump(str_pad(dechex('9'), 2, '0', STR_PAD_LEFT));
var_dump($this->thirdparty->name);
var_dump(implode(unpack("H*", $this->thirdparty->name)));
var_dump(price($this->total_tva, 0, $tmplang, 0, -1, 2));
//var_dump(strlen($this->thirdparty->name));
//var_dump(str_pad(dechex('9'), 2, '0', STR_PAD_LEFT));
//var_dump($this->thirdparty->name);
//var_dump(implode(unpack("H*", $this->thirdparty->name)));
//var_dump(price($this->total_tva, 0, $tmplang, 0, -1, 2));
$s = '01'.str_pad(dechex(strlen($this->thirdparty->name)), 2, '0', STR_PAD_LEFT).$name;
$s .= '02'.str_pad(dechex(strlen($this->thirdparty->tva_intra)), 2, '0', STR_PAD_LEFT).$vatnumber;

View File

@ -4033,12 +4033,12 @@ class Form
* @param string $deposit_percent < 0 : deposit_percent input makes no sense (for example, in list filters)
* 0 : use default deposit percentage from entry
* > 0 : force deposit percentage (for example, from company object)
* @return string
* @return string String for the HTML select component
*/
public function getSelectConditionsPaiements($selected = 0, $htmlname = 'condid', $filtertype = -1, $addempty = 0, $noinfoadmin = 0, $morecss = '', $deposit_percent = -1)
{
global $langs, $user, $conf;
$out = '';
dol_syslog(__METHOD__." selected=".$selected.", htmlname=".$htmlname, LOG_DEBUG);
@ -4125,7 +4125,7 @@ class Form
* @param int $active Active or not, -1 = all
* @param string $morecss Add more CSS on select tag
* @param int $nooutput 1=Return string, do not send to output
* @return void
* @return string|void String for the HTML select component
*/
public function select_types_paiements($selected = '', $htmlname = 'paiementtype', $filtertype = '', $format = 0, $empty = 1, $noadmininfo = 0, $maxlength = 0, $active = 1, $morecss = '', $nooutput = 0)
{
@ -8321,9 +8321,9 @@ class Form
$listcheckedstring = '';
foreach ($array as $key => $val) {
/* var_dump($val);
var_dump(array_key_exists('enabled', $val));
var_dump(!$val['enabled']);*/
// var_dump($val);
// var_dump(array_key_exists('enabled', $val));
// var_dump(!$val['enabled']);
if (array_key_exists('enabled', $val) && isset($val['enabled']) && !$val['enabled']) {
unset($array[$key]); // We don't want this field
continue;

View File

@ -880,8 +880,8 @@ if ($mode == 'graph') {
$px1 = new DolGraph();
$mesg = $px1->isGraphKo();
if (!$mesg) {
/*var_dump($legend);
var_dump($data);*/
//var_dump($legend);
//var_dump($data);
$px1->SetData($data);
unset($data);

View File

@ -210,8 +210,8 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle
if (!empty($reg[2])) {
if (is_numeric($reg[2])) { // This is a version
$versionrequest = explode('.', $reg[2]);
//print var_dump($versionrequest);
//print var_dump($versionarray);
//var_dump($versionrequest);
//var_dump($versionarray);
if (!count($versionrequest) || !count($versionarray) || versioncompare($versionrequest, $versionarray) > 0) {
$qualified = 0;
}

View File

@ -330,9 +330,9 @@ function completeFileArrayWithDatabaseInfo(&$filearray, $relativedir)
}
}
/*var_dump($relativedir);
var_dump($filearray);
var_dump($filearrayindatabase);*/
//var_dump($relativedir);
//var_dump($filearray);
//var_dump($filearrayindatabase);
// Complete filearray with properties found into $filearrayindatabase
foreach ($filearray as $key => $val) {

View File

@ -1593,7 +1593,7 @@ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $di
$url .= '?dol_hide_topmenu=1&dol_hide_leftmenu=1&dol_openinpopup='.urlencode($name);
}
$out .= '';
$out = '';
$backtopagejsfieldsid = ''; $backtopagejsfieldslabel = '';
if ($backtopagejsfields) {

View File

@ -104,10 +104,9 @@ function dolSessionWrite($sess_id, $val)
global $sessionlastvalueread;
global $sessionidfound;
/*var_dump('write '.$sess_id);
var_dump($val);
var_dump('sessionlastvalueread='.$sessionlastvalueread.' sessionidfound='.$sessionidfound);
*/
//var_dump('write '.$sess_id);
//var_dump($val);
//var_dump('sessionlastvalueread='.$sessionlastvalueread.' sessionidfound='.$sessionidfound);
//$sessionlastvalueread='';
if ($sessionlastvalueread != $val) {
@ -141,7 +140,7 @@ function dolSessionWrite($sess_id, $val)
$insert_query = "INSERT INTO ".MAIN_DB_PREFIX."session";
$insert_query .= "(session_id, session_variable, last_accessed, fk_user, remote_ip, user_agent)";
$insert_query .= " VALUES ('".$dbsession->escape($sess_id)."', '".$dbsession->escape($val)."', '".$dbsession->idate($time_stamp)."', 0, '".$dbsession->escape(getUserRemoteIP())."', '".$dbsession->escape(substr($_SERVER['HTTP_USER_AGENT'], 0, 255)."')";
var_dump($insert_query);
//var_dump($insert_query);
$result = $dbsession->query($insert_query);
if (!$result) {
dol_print_error($dbsession);

View File

@ -378,7 +378,6 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
$nbko++;
}
} elseif (!empty($feature) && ($feature != 'user' && $feature != 'usergroup')) { // This is permissions on 1 level
var_dump($user->rights);
if (empty($user->rights->$feature->lire)
&& empty($user->rights->$feature->read)
&& empty($user->rights->$feature->run)) {

View File

@ -398,7 +398,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '')
/*TODO Add link to expeditiondet_batch
if (! empty($conf->productbatch->enabled))
{
var_dump($objp->edrowid);
//var_dump($objp->edrowid);
$lines[$i]->detail_batch
if (isset($lines[$i]->detail_batch))
{

View File

@ -1048,17 +1048,15 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '</td>';
print '</tr>';
} else {
/*var_dump($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER);
//var_dump($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER);
/*
$default=$langs->trans('No');
print '<tr class="oddeven">';
print '<td>'.$langs->trans("MAIN_OPTIMIZEFORTEXTBROWSER").'</td>';
print '<td colspan="'.($colspan-1).'">';
if ($edit)
{
if ($edit) {
print $form->selectyesno('MAIN_OPTIMIZEFORTEXTBROWSER', $conf->global->MAIN_OPTIMIZEFORTEXTBROWSER, 1);
}
else
{
} else {
print yn($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER);
}
print ' &nbsp; wspan class="opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';

View File

@ -115,7 +115,9 @@ class MenuManager
$this->tabMenu = $tabMenu;
//var_dump($tabMenu);
//if ($forcemainmenu == 'all') { var_dump($this->tabMenu); exit; }
//if ($forcemainmenu == 'all') {
//var_dump($this->tabMenu);
//}
}

View File

@ -770,7 +770,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
* Menu COMPTA-FINANCIAL
*/
if ($mainmenu == 'accountancy') {
get_left_menu_accountancy($mainmenu, $newmenu, $usemenuhider, $leftmenu, $type_user, $db);
get_left_menu_accountancy($mainmenu, $newmenu, $usemenuhider, $leftmenu, $type_user);
}
/*

View File

@ -198,8 +198,12 @@ class MenuManager
$submenu = new Menu();
print_left_eldy_menu($this->db, $this->menu_array, $this->menu_array_after, $this->tabMenu, $submenu, 1, $tmpmainmenu, $tmpleftmenu, null, $this->type_user); // Fill $submenu (example with tmpmainmenu='home' tmpleftmenu='all', return left menu tree of Home)
// Note: $submenu contains menu entry with substitution not yet done
//if ($tmpmainmenu.'-'.$tmpleftmenu == 'home-all') { var_dump($submenu); exit; }
//if ($tmpmainmenu=='accountancy') { var_dump($submenu->liste); exit; }
//if ($tmpmainmenu.'-'.$tmpleftmenu == 'home-all') {
//var_dump($submenu); exit;
//}
//if ($tmpmainmenu=='accountancy') {
//var_dump($submenu->liste); exit;
//}
$nexturl = dol_buildpath($submenu->liste[0]['url'], 1);
$canonrelurl = preg_replace('/\?.*$/', '', $relurl);

View File

@ -208,8 +208,12 @@ class MenuManager
$submenu->add("/admin/dict.php?mainmenu=home", $langs->trans("DictionarySetup"), 1);
$submenu->add("/admin/const.php?mainmenu=home", $langs->trans("OtherSetup"), 1);
//if ($tmpmainmenu.'-'.$tmpleftmenu == 'home-all') { var_dump($submenu); exit; }
//if ($tmpmainmenu=='accountancy') { var_dump($submenu->liste); exit; }
//if ($tmpmainmenu.'-'.$tmpleftmenu == 'home-all') {
//var_dump($submenu); exit;
//}
//if ($tmpmainmenu=='accountancy') {
//var_dump($submenu->liste); exit;
//}
$nexturl = dol_buildpath($submenu->liste[0]['url'], 1);
$canonrelurl = preg_replace('/\?.*$/', '', $relurl);

View File

@ -356,7 +356,7 @@ class pdf_ban extends ModeleBankAccountDoc
foreach($object->linkedObjects as $objecttype => $objects)
{
var_dump($objects);exit;
//var_dump($objects);exit;
if ($objecttype == 'commande')
{
$outputlangs->load('orders');

View File

@ -397,11 +397,11 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
}
/*var_dump($tab_top);
var_dump($heightforinfotot);
var_dump($heightforfreetext);
var_dump($heightforfooter);
var_dump($bottomlasttab);*/
//var_dump($tab_top);
//var_dump($heightforinfotot);
//var_dump($heightforfreetext);
//var_dump($heightforfooter);
//var_dump($bottomlasttab);
// Affiche zone infos
$posy = $this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs);

View File

@ -439,7 +439,7 @@ class ImportCsv extends ModeleImports
/*include_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancysystem.class.php';
$tmpchartofaccount = new AccountancySystem($this->db);
$tmpchartofaccount->fetch($conf->global->CHARTOFACCOUNTS);
var_dump($tmpchartofaccount->ref.' - '.$arrayrecord[0]['val']);
//var_dump($tmpchartofaccount->ref.' - '.$arrayrecord[0]['val']);
if ((! ($conf->global->CHARTOFACCOUNTS > 0)) || $tmpchartofaccount->ref != $arrayrecord[0]['val'])
{
$this->errors[$error]['lib']=$langs->trans('ErrorImportOfChartLimitedToCurrentChart', $tmpchartofaccount->ref);

View File

@ -481,7 +481,7 @@ class ImportXlsx extends ModeleImports
/*include_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancysystem.class.php';
$tmpchartofaccount = new AccountancySystem($this->db);
$tmpchartofaccount->fetch($conf->global->CHARTOFACCOUNTS);
var_dump($tmpchartofaccount->ref.' - '.$arrayrecord[0]['val']);
//var_dump($tmpchartofaccount->ref.' - '.$arrayrecord[0]['val']);
if ((! ($conf->global->CHARTOFACCOUNTS > 0)) || $tmpchartofaccount->ref != $arrayrecord[0]['val'])
{
$this->errors[$error]['lib']=$langs->trans('ErrorImportOfChartLimitedToCurrentChart', $tmpchartofaccount->ref);

View File

@ -662,7 +662,7 @@ class pdf_baleine extends ModelePDFProjects
foreach($object->linkedObjects as $objecttype => $objects)
{
var_dump($objects);exit;
//var_dump($objects);exit;
if ($objecttype == 'commande')
{
$outputlangs->load('orders');

View File

@ -658,7 +658,7 @@ class pdf_timespent extends ModelePDFProjects
foreach($object->linkedObjects as $objecttype => $objects)
{
var_dump($objects);exit;
//var_dump($objects);exit;
if ($objecttype == 'commande')
{
$outputlangs->load('orders');

View File

@ -1228,7 +1228,8 @@ class EmailCollector extends CommonObject
$header = imap_fetchheader($connection, $imapemail, 0);
$overview = imap_fetch_overview($connection, $imapemail, 0);
/* print $header; var_dump($overview); */
// print $header;
// var_dump($overview);
// Process $header of email
$header = preg_replace('/\r\n\s+/m', ' ', $header); // When a header line is on several lines, merge lines
@ -1336,19 +1337,20 @@ class EmailCollector extends CommonObject
$this->getmsg($connection, $imapemail);
//print $plainmsg; var_dump($plainmsg); exit;
//print $plainmsg;
//var_dump($plainmsg); exit;
//$htmlmsg,$plainmsg,$charset,$attachments
$messagetext = $plainmsg ? $plainmsg : dol_string_nohtmltag($htmlmsg, 0);
// Removed emojis
$messagetext = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $messagetext);
/*var_dump($plainmsg);
var_dump($htmlmsg);
var_dump($messagetext);*/
/*var_dump($charset);
var_dump($attachments);
exit;*/
//var_dump($plainmsg);
//var_dump($htmlmsg);
//var_dump($messagetext);
//var_dump($charset);
//var_dump($attachments);
//exit;
// Parse IMAP email structure
/*
@ -1381,11 +1383,13 @@ class EmailCollector extends CommonObject
}
}
}
//var_dump($result); var_dump($partplain); var_dump($parthtml);
//var_dump($result);
//var_dump($partplain);
//var_dump($parthtml);
var_dump($structure);
var_dump($parthtml);
var_dump($partplain);
//var_dump($structure);
//var_dump($parthtml);
//var_dump($partplain);
$messagetext = imap_fetchbody($connection, $imapemail, ($parthtml != '-1' ? $parthtml : ($partplain != '-1' ? $partplain : 1)), FT_PEEK);
*/
@ -1891,12 +1895,12 @@ class EmailCollector extends CommonObject
// Overwrite values with values extracted from source email
$errorforthisaction = $this->overwritePropertiesOfObject($actioncomm, $operation['actionparam'], $messagetext, $subject, $header);
/*var_dump($fk_element_id);
var_dump($fk_element_type);
var_dump($alreadycreated);
var_dump($operation['type']);
var_dump($actioncomm);
exit;*/
//var_dump($fk_element_id);
//var_dump($fk_element_type);
//var_dump($alreadycreated);
//var_dump($operation['type']);
//var_dump($actioncomm);
//exit;
if ($errorforthisaction) {
$errorforactions++;

View File

@ -233,7 +233,8 @@ class EmailCollectorAction extends CommonObject
foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->element]['unique'][$shortkey])) {
//var_dump($key); var_dump($clonedObj->array_options[$key]); exit;
//var_dump($key);
//var_dump($clonedObj->array_options[$key]); exit;
unset($object->array_options[$key]);
}
}

View File

@ -207,7 +207,8 @@ class EmailCollectorFilter extends CommonObject
foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->element]['unique'][$shortkey])) {
//var_dump($key); var_dump($clonedObj->array_options[$key]); exit;
//var_dump($key);
//var_dump($clonedObj->array_options[$key]); exit;
unset($object->array_options[$key]);
}
}

View File

@ -318,7 +318,8 @@ class ConferenceOrBoothAttendee extends CommonObject
foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) {
//var_dump($key); var_dump($clonedObj->array_options[$key]); exit;
//var_dump($key);
//var_dump($clonedObj->array_options[$key]); exit;
unset($object->array_options[$key]);
}
}

View File

@ -268,7 +268,10 @@ if (empty($reshook)) {
$sub_qty[$j]['id_batch'] = GETPOST($batch, 'int'); // the id into llx_product_batch of stock record to move
$subtotalqty += $sub_qty[$j]['q'];
//var_dump($qty);var_dump($batch);var_dump($sub_qty[$j]['q']);var_dump($sub_qty[$j]['id_batch']);
//var_dump($qty);
//var_dump($batch);
//var_dump($sub_qty[$j]['q']);
//var_dump($sub_qty[$j]['id_batch']);
$j++;
$batch = "batchl".$i."_".$j;
@ -325,7 +328,6 @@ if (empty($reshook)) {
//var_dump($batch_line[2]);
if ($totalqty > 0) { // There is at least one thing to ship
//var_dump($_POST);exit;
for ($i = 0; $i < $num; $i++) {
$qty = "qtyl".$i;
if (!isset($batch_line[$i])) {

View File

@ -102,7 +102,9 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) {
}
print '<br>';
$checked = '';
//var_dump(GETPOST($file['relativename'])); var_dump($file['relativename']); var_dump($_FILES['userfile']['name']);
//var_dump(GETPOST($file['relativename']));
//var_dump($file['relativename']);
//var_dump($_FILES['userfile']['name']);
// If a file was just uploaded, we check to preselect it
if (is_array($_FILES['userfile']['name'])) {
foreach ($_FILES['userfile']['name'] as $tmpfile) {

View File

@ -3399,12 +3399,12 @@ class CommandeFournisseur extends CommonOrder
$diff_array = array_diff_assoc($qtydelivered, $qtywished); // Warning: $diff_array is done only on common keys.
$keysinwishednotindelivered = array_diff(array_keys($qtywished), array_keys($qtydelivered)); // To check we also have same number of keys
$keysindeliverednotinwished = array_diff(array_keys($qtydelivered), array_keys($qtywished)); // To check we also have same number of keys
/*var_dump(array_keys($qtydelivered));
var_dump(array_keys($qtywished));
var_dump($diff_array);
var_dump($keysinwishednotindelivered);
var_dump($keysindeliverednotinwished);
exit;*/
//var_dump(array_keys($qtydelivered));
//var_dump(array_keys($qtywished));
//var_dump($diff_array);
//var_dump($keysinwishednotindelivered);
//var_dump($keysindeliverednotinwished);
//exit;
if (count($diff_array) == 0 && count($keysinwishednotindelivered) == 0 && count($keysindeliverednotinwished) == 0) { //No diff => mean everythings is received
if ($closeopenorder) {
@ -3491,6 +3491,8 @@ class CommandeFournisseur extends CommonOrder
{
$this->receptions = array();
dol_syslog(get_class($this)."::loadReceptions", LOG_DEBUG);
$sql = 'SELECT cd.rowid, cd.fk_product,';
$sql .= ' sum(cfd.qty) as qty';
$sql .= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch as cfd,';
@ -3512,14 +3514,12 @@ class CommandeFournisseur extends CommonOrder
}
$sql .= ' GROUP BY cd.rowid, cd.fk_product';
dol_syslog(get_class($this)."::loadReceptions", LOG_DEBUG);
$result = $this->db->query($sql);
if ($result) {
$num = $this->db->num_rows($result);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
$i = 0;
while ($i < $num) {
$obj = $this->db->fetch_object($result);
$obj = $this->db->fetch_object($resql);
empty($this->receptions[$obj->rowid]) ? $this->receptions[$obj->rowid] = $obj->qty : $this->receptions[$obj->rowid] += $obj->qty;
$i++;
}

View File

@ -714,10 +714,10 @@ if (empty($reshook)) {
$dateinvoice = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server
$datedue = dol_mktime(0, 0, 0, GETPOST('echmonth', 'int'), GETPOST('echday', 'int'), GETPOST('echyear', 'int'), 'tzserver');
/*var_dump($dateinvoice.' '.dol_print_date($dateinvoice, 'dayhour'));
var_dump(dol_now('tzuserrel').' '.dol_get_last_hour(dol_now('tzuserrel')).' '.dol_print_date(dol_now('tzuserrel'),'dayhour').' '.dol_print_date(dol_get_last_hour(dol_now('tzuserrel')), 'dayhour'));
var_dump($db->idate($dateinvoice));
exit;*/
//var_dump($dateinvoice.' '.dol_print_date($dateinvoice, 'dayhour'));
//var_dump(dol_now('tzuserrel').' '.dol_get_last_hour(dol_now('tzuserrel')).' '.dol_print_date(dol_now('tzuserrel'),'dayhour').' '.dol_print_date(dol_get_last_hour(dol_now('tzuserrel')), 'dayhour'));
//var_dump($db->idate($dateinvoice));
//exit;
// Replacement invoice
if (GETPOST('type') == FactureFournisseur::TYPE_REPLACEMENT) {

View File

@ -1117,11 +1117,9 @@ class Holiday extends CommonObject
if ($infos_CP['statut'] == 5) {
continue; // ignore not validated holidays
}
/*
var_dump("--");
var_dump("old: ".dol_print_date($infos_CP['date_debut'],'dayhour').' '.dol_print_date($infos_CP['date_fin'],'dayhour').' '.$infos_CP['halfday']);
var_dump("new: ".dol_print_date($dateStart,'dayhour').' '.dol_print_date($dateEnd,'dayhour').' '.$halfday);
*/
//var_dump("--");
//var_dump("old: ".dol_print_date($infos_CP['date_debut'],'dayhour').' '.dol_print_date($infos_CP['date_fin'],'dayhour').' '.$infos_CP['halfday']);
//var_dump("new: ".dol_print_date($dateStart,'dayhour').' '.dol_print_date($dateEnd,'dayhour').' '.$halfday);
if ($halfday == 0) {
if ($dateStart >= $infos_CP['date_debut'] && $dateStart <= $infos_CP['date_fin']) {

View File

@ -1002,7 +1002,7 @@ if ($step == 4 && $datatoimport) {
print $s;
print '</span> ';
$htmlother->select_import_model($importmodelid, 'importmodelid', $datatoimport, 1, $user->id);
print '<input type="submit" class="button" value="'.$langs->trans("Select").'">';
print '<input type="submit" class="button small reposition" value="'.$langs->trans("Select").'">';
print '</div>';
print '</form>';
@ -1016,7 +1016,7 @@ if ($step == 4 && $datatoimport) {
//var_dump($array_match_file_to_database);
print '<tr valign="top"><td width="50%">';
print '<tr valign="top"><td width="50%" class="nopaddingleftimp">';
$fieldsplaced = array();
$valforsourcefieldnb = array();
@ -1034,7 +1034,6 @@ if ($step == 4 && $datatoimport) {
foreach ($fieldssource as $key => $val) {
$var = !$var;
show_elem($fieldssource, $key, $val, $var); // key is field number in source file
//print '> '.$lefti.'-'.$key.'-'.$val;
$listofkeys[$key] = 1;
$fieldsplaced[$key] = 1;
$valforsourcefieldnb[$lefti] = $key;
@ -1046,37 +1045,26 @@ if ($step == 4 && $datatoimport) {
}
//var_dump($valforsourcefieldnb);
// Complete source fields from count($fieldssource)+1 to count($fieldstarget)
$more = 1;
$num = count($fieldssource);
while ($lefti <= $num) {
$var = !$var;
$newkey = getnewkey($fieldssource, $listofkeys);
show_elem($fieldssource, $newkey, '', $var); // key start after field number in source file
//print '> '.$lefti.'-'.$newkey;
$listofkeys[$key] = 1;
$lefti++;
$more++;
}
print "</div>\n";
print "<!-- End box left container -->\n";
print '</td><td width="50%">';
print '</td><td width="50%" class="nopaddingrightimp">';
// List of target fields
$optionsnotused = "";
$optionsall = array();
foreach ($fieldstarget as $code => $line) {
$text = '<option value="'.$code.'">';
$text .= $langs->trans($line["label"]);
if ($line["required"]) {
$text .= "*";
}
$text .= '</option>';
if (!$line["imported"]) {
$text = '<option value="'.$code.'">';
$text .= $langs->trans($line["label"]);
if ($line["required"]) {
$text .= "*";
}
$text .= '</option>';
$optionsnotused .= $text;
}
$optionsall[$code] = array('label'=>$langs->trans($line["label"]), 'required'=>(empty($line["required"]) ? 0 : 1));
}
$height = '32px'; //needs px for css height attribute below
@ -1097,39 +1085,46 @@ if ($step == 4 && $datatoimport) {
$entityicon = !empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity; // $entityicon must string name of picto of the field like 'project', 'company', 'contact', 'modulename', ...
$entitylang = $entitytolang[$entity] ? $entitytolang[$entity] : $objimport->array_import_label[0]; // $entitylang must be a translation key to describe object the field is related to, like 'Company', 'Contact', 'MyModyle', ...
print '<td class="nowraponall" style="font-weight: normal">=> '.img_object('', $entityicon).' '.$langs->trans($entitylang).'</td>';
//print '<td class="nowraponall" style="font-weight: normal">=> '.img_object('', $entityicon).' '.$langs->trans($entitylang).'</td>';
print '<td class="nowraponall" style="font-weight: normal">=> </td>';
print '<td class="nowraponall" style="font-weight: normal">';
print '<select id="selectorderimport_'.($i+1).'" class="targetselectchange minwidth300" name="select_'.$line["label"].'">';
if ($line["imported"]) {
print '<option value="-1">&nbsp;</option>';
print '<option selected="" value="'.$code.'">';
} else {
print '<option selected="" value="-1">&nbsp;</option>';
print '<option value="'.$code.'">';
}
$more = '';
$text = $langs->trans($line["label"]);
if ($line["required"]) {
print '<strong>'.$text.'*</strong>';
} else {
print $text;
$j = 0;
foreach ($optionsall as $code => $val) {
$label = $val['required'] ? '<strong>' : '';
$label .= $val['label'];
$label .= $val['required'] ? '*</strong>' : '';
print '<option value="'.$code.'"';
if ($j == $i) {
print ' selected';
}
print " data-html='".dol_escape_htmltag($label)."'";
print '>';
print $label;
print '</options>';
$j++;
}
print '</option>';
print $optionsnotused;
print '</select>';
//print ajax_combobox('selectorderimport_'.($i+1));
print "</td>";
print '<td class="nowraponall" style="font-weight:normal; text-align:right">';
$filecolumn = !empty($array_match_database_to_file[$code])?$array_match_database_to_file[$code]:0;
$filecolumn = ($i + 1);
// Source field info
$htmltext = '<b><u>'.$langs->trans("FieldSource").'</u></b><br>';
if ($filecolumn > count($fieldssource)) {
$htmltext .= $langs->trans("DataComeFromNoWhere").'<br>';
} else {
if (empty($objimport->array_import_convertvalue[0][$code])) { // If source file does not need convertion
$filecolumntoshow = $filecolumn;
$filecolumntoshow = $i + 1;
$htmltext .= $langs->trans("DataComeFromFileFieldNb", $filecolumntoshow).'<br>';
} else {
if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') {
@ -1141,7 +1136,6 @@ if ($step == 4 && $datatoimport) {
}
}
// Source required
$htmltext .= $langs->trans("SourceRequired").': <b>'.yn($line["label"]).'</b><br>';
$example = !empty($objimport->array_import_examplevalues[0][$code])?$objimport->array_import_examplevalues[0][$code]:"";
// Example
if (empty($objimport->array_import_convertvalue[0][$code])) { // If source file does not need convertion
@ -1164,6 +1158,7 @@ if ($step == 4 && $datatoimport) {
$htmltext .= '<br>';
// Target field info
$htmltext .= '<b><u>'.$langs->trans("FieldTarget").'</u></b><br>';
//$htmltext .= $langs->trans("SourceRequired").': <b>'.yn($line["label"]).'</b><br>';
if (empty($objimport->array_import_convertvalue[0][$code])) { // If source file does not need convertion
$htmltext .= $langs->trans("DataIsInsertedInto").'<br>';
} else {
@ -1234,49 +1229,87 @@ if ($step == 4 && $datatoimport) {
print '<script type="text/javascript">'."\n";
print 'var previousselectedvalueimport = "0";'."\n";
print 'var previousselectedlabelimport = "0";'."\n";
print 'var arrayofselectedvalues = [];'."\n";
print '$(document).ready(function () {'."\n";
print 'setOptionsToDisabled();'."\n";
print 'saveSelection();'."\n";
print '$(".targetselectchange").focus(function(){'."\n";
print 'previousselectedvalueimport = $(this).val();'."\n";
print 'previousselectedlabelimport = $(this).children("option:selected").text();'."\n";
print 'console.log("previousselectedvalueimport="+previousselectedvalueimport)'."\n";
print ' previousselectedvalueimport = $(this).val();'."\n";
print ' previousselectedlabelimport = $(this).children("option:selected").text();'."\n";
print ' console.log("previousselectedvalueimport="+previousselectedvalueimport)'."\n";
print '})'."\n";
// Function to set the disabled flag
// - We set all option to "enabled"
// - Then we scan all combo to get the value currently selected and save them into the array arrayofselectedvalues
// - Then we set to disabled all fields that are selected
print 'function setOptionsToDisabled() {'."\n";
print ' console.log("Remove the disabled flag everywhere");'."\n";
print ' $(".targetselectchange").not($( this )).find(\'option\').prop("disabled", false);'."\n";
print ' arrayofselectedvalues = [];'."\n";
print ' $(".targetselectchange").each(function(){'."\n";
print ' value = $(this).val()'."\n";
print ' arrayofselectedvalues.push(value);'."\n";
print ' });'."\n";
print ' console.log("List of all selected values");'."\n";
print ' console.log(arrayofselectedvalues);'."\n";
print ' console.log("Set the disabled flag for every entry in arrayofselectedvalues");'."\n";
print ' $.each( arrayofselectedvalues, function( key, value ) {'."\n";
print ' if (value != -1) {'."\n";
print ' console.log("Process key="+key+" value="+value);'."\n";
print ' $(".targetselectchange").find(\'option[value="\'+value+\'"]\').prop("disabled", true);'."\n";
print ' }'."\n";
print ' });'."\n";
print '};'."\n";
// Function to save the selection
print 'function saveSelection() {'."\n";
print ' arrayselectedfields = [];'."\n";
print ' arrayselectedfields.push("0");'."\n";
print ' $.each( arrayofselectedvalues, function( key, value ) {'."\n";
print ' if (value != -1) {'."\n";
print ' arrayselectedfields.push(value);'."\n";
print ' } else {'."\n";
print ' arrayselectedfields.push(0);'."\n";
print ' }'."\n";
print ' });'."\n";
print " $.ajax({\n";
print " type: 'POST',\n";
print " dataType: 'json',\n";
print " url: '".dol_escape_js($_SERVER["PHP_SELF"])."?action=saveselectorder&token=".newToken()."',\n";
print " data: 'selectorder='+arrayselectedfields.toString(),\n";
print " success: function(){\n";
print " console.log('Select order saved');\n";
print " },\n";
print ' });'."\n";
print '};'."\n";
// If we make a change on a selectbox
print '$(".targetselectchange").change(function(){'."\n";
print 'if(previousselectedlabelimport != "" && previousselectedvalueimport != -1){'."\n";
print '$(".targetselectchange").not($(this)).append(new Option(previousselectedlabelimport,previousselectedvalueimport));'."\n";
print 'let valuetochange = $(this).val(); '."\n";
print '$(".boxtdunused").each(function(){'."\n";
print 'if ($(this).text().includes(valuetochange)){'."\n";
print 'arraychild = $(this)[0].childNodes'."\n";
print 'arraytexttomodify = arraychild[0].textContent.split(" ")'."\n";
print 'arraytexttomodify[1] = previousselectedvalueimport '."\n";
print 'textmodified = arraytexttomodify.join(" ") '."\n";
print 'arraychild[0].textContent = textmodified'."\n";
print 'arraychild[1].innerHTML = previousselectedlabelimport'."\n";
print '}'."\n";
print '})'."\n";
print '}'."\n";
print 'if($( this ).val() != -1){'."\n";
print '$(".targetselectchange").not($( this )).find(\'option[value="\'+$( this ).val()+\'"]\').remove();'."\n";
print '}'."\n";
print '$(this).blur()'."\n";
print 'arrayselectedfields = [];'."\n";
print 'arrayselectedfields.push("0");'."\n";
print '$(".targetselectchange").each(function(){'."\n";
print 'value = $(this).val()'."\n";
print 'arrayselectedfields.push(value);'."\n";
print ' setOptionsToDisabled();'."\n";
print ' if(previousselectedlabelimport != "" && previousselectedvalueimport != -1) {'."\n";
print ' let valuetochange = $(this).val(); '."\n";
print ' $(".boxtdunused").each(function(){'."\n";
print ' if ($(this).text().includes(valuetochange)){'."\n";
print ' arraychild = $(this)[0].childNodes'."\n";
print ' arraytexttomodify = arraychild[0].textContent.split(" ")'."\n";
print ' arraytexttomodify[1] = previousselectedvalueimport '."\n";
print ' textmodified = arraytexttomodify.join(" ") '."\n";
print ' arraychild[0].textContent = textmodified'."\n";
print ' arraychild[1].innerHTML = previousselectedlabelimport'."\n";
print ' }'."\n";
print ' })'."\n";
print ' }'."\n";
print ' $(this).blur()'."\n";
print ' saveSelection()'."\n";
print '});'."\n";
print "$.ajax({\n";
print " type: 'POST',\n";
print " dataType: 'json',\n";
print " url: '".dol_escape_js($_SERVER["PHP_SELF"])."?action=saveselectorder&token=".newToken()."',\n";
print " data: 'selectorder='+arrayselectedfields.toString(),\n";
print " success: function(){\n";
print " console.log('Select order saved');\n";
print " },\n";
print '});'."\n";
print '});'."\n";
print '})'."\n";
print '</script>'."\n";
}
@ -1313,6 +1346,7 @@ if ($step == 4 && $datatoimport) {
print '<input type="hidden" name="hexa" value="'.$hexa.'">';
print '<input type="hidden" name="excludefirstline" value="'.$excludefirstline.'">';
print '<input type="hidden" name="endatlinenb" value="'.$endatlinenb.'">';
print '<input type="hidden" name="page_y" value="">';
print '<input type="hidden" value="'.dol_escape_htmltag($separator).'" name="separator">';
print '<input type="hidden" value="'.dol_escape_htmltag($enclosure).'" name="enclosure">';
@ -1331,7 +1365,7 @@ if ($step == 4 && $datatoimport) {
print $form->selectarray('visibility', $arrayvisibility, 'private');
print '</td>';
print '<td class="right">';
print '<input type="submit" class="button" value="'.$langs->trans("SaveImportProfile").'">';
print '<input type="submit" class="button small reposition" value="'.$langs->trans("SaveImportProfile").'">';
print '</td></tr>';
// List of existing import profils
@ -2199,14 +2233,15 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '')
}
if (($pos && $pos > count($fieldssource)) && (!isset($fieldssource[$pos]["imported"]))) { // No fields
/*
print '<tr style="height:'.$height.'" class="trimport oddevenimport">';
print '<td class="nocellnopadding" width="16" style="font-weight: normal">';
//print img_picto(($pos > 0 ? $langs->trans("MoveField", $pos) : ''), 'grip_title', 'class="boxhandle" style="cursor:move;"');
print '</td>';
print '<td style="font-weight: normal">';
print $langs->trans("NoFields");
print '</td>';
print '</tr>';
*/
} elseif ($key == 'none') { // Empty line
print '<tr style="height:'.$height.'" class="trimport oddevenimport">';
print '<td class="nocellnopadding" width="16" style="font-weight: normal">';
@ -2222,6 +2257,7 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '')
print '<td class="nocellnopadding" width="16" style="font-weight: normal">';
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
//print img_picto($langs->trans("MoveField", $pos), 'grip_title', 'class="boxhandle" style="cursor:move;"');
print img_picto($langs->trans("Field").' '.$pos, 'file', 'class="pictofixedwith"');
print '</td>';
if (isset($fieldssource[$pos]['imported']) && $fieldssource[$pos]['imported'] == false) {
print '<td class="nowraponall boxtdunused" style="font-weight: normal">';
@ -2238,7 +2274,9 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '')
if (!utf8_check($example)) {
$example = utf8_encode($example);
}
print ' (<i>'.$example.'</i>)';
print ' - ';
//print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ExampleOnFirstLine").': </span>';
print '<i class="opacitymedium">'.$example.'</i>';
}
print '</td>';
print '</tr>';

View File

@ -295,8 +295,8 @@ if ($action == "set") {
// MySQL
if ($choix == 1 && preg_match('/^--\sV([0-9\.]+)/i', $buf, $reg)) {
$versioncommande = explode('.', $reg[1]);
//print var_dump($versioncommande);
//print var_dump($versionarray);
//var_dump($versioncommande);
//var_dump($versionarray);
if (count($versioncommande) && count($versionarray)
&& versioncompare($versioncommande, $versionarray) <= 0) {
// Version qualified, delete SQL comments
@ -307,8 +307,8 @@ if ($action == "set") {
// PGSQL
if ($choix == 2 && preg_match('/^--\sPOSTGRESQL\sV([0-9\.]+)/i', $buf, $reg)) {
$versioncommande = explode('.', $reg[1]);
//print var_dump($versioncommande);
//print var_dump($versionarray);
//var_dump($versioncommande);
//var_dump($versionarray);
if (count($versioncommande) && count($versionarray)
&& versioncompare($versioncommande, $versionarray) <= 0) {
// Version qualified, delete SQL comments

View File

@ -284,7 +284,8 @@ class KnowledgeRecord extends CommonObject
foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) {
//var_dump($key); var_dump($clonedObj->array_options[$key]); exit;
//var_dump($key);
//var_dump($clonedObj->array_options[$key]); exit;
unset($object->array_options[$key]);
}
}

View File

@ -393,7 +393,8 @@ if ($dirins && in_array($action, array('initapi', 'initphpunit', 'initpagecontac
$varnametoupdate = 'showtabofpageagenda';
}
//var_dump($srcfile);var_dump($destfile);
//var_dump($srcfile);
//var_dump($destfile);
$result = dol_copy($srcfile, $destfile, 0, 0);
if ($result > 0) {
@ -437,11 +438,13 @@ if ($dirins && $action == 'initsqlextrafields' && !empty($module)) {
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
$srcfile1 = $srcdir.'/sql/llx_mymodule_myobject_extrafields.sql';
$destfile1 = $dirins.'/'.strtolower($module).'/sql/llx_'.strtolower($module).'_'.strtolower($objectname).'_extrafields.sql';
//var_dump($srcfile);var_dump($destfile);
//var_dump($srcfile);
//var_dump($destfile);
$result1 = dol_copy($srcfile1, $destfile1, 0, 0);
$srcfile2 = $srcdir.'/sql/llx_mymodule_myobject_extrafields.key.sql';
$destfile2 = $dirins.'/'.strtolower($module).'/sql/llx_'.strtolower($module).'_'.strtolower($objectname).'_extrafields.key.sql';
//var_dump($srcfile);var_dump($destfile);
//var_dump($srcfile);
//var_dump($destfile);
$result2 = dol_copy($srcfile2, $destfile2, 0, 0);
if ($result1 > 0 && $result2 > 0) {
@ -489,7 +492,8 @@ if ($dirins && $action == 'inithook' && !empty($module)) {
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
$srcfile = $srcdir.'/class/actions_mymodule.class.php';
$destfile = $dirins.'/'.strtolower($module).'/class/actions_'.strtolower($module).'.class.php';
//var_dump($srcfile);var_dump($destfile);
//var_dump($srcfile);
//var_dump($destfile);
$result = dol_copy($srcfile, $destfile, 0, 0);
if ($result > 0) {
@ -522,7 +526,8 @@ if ($dirins && $action == 'inittrigger' && !empty($module)) {
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
$srcfile = $srcdir.'/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php';
$destfile = $dirins.'/'.strtolower($module).'/core/triggers/interface_99_mod'.$module.'_'.$module.'Triggers.class.php';
//var_dump($srcfile);var_dump($destfile);
//var_dump($srcfile);
//var_dump($destfile);
$result = dol_copy($srcfile, $destfile, 0, 0);
if ($result > 0) {
@ -555,7 +560,8 @@ if ($dirins && $action == 'initwidget' && !empty($module)) {
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
$srcfile = $srcdir.'/core/boxes/mymodulewidget1.php';
$destfile = $dirins.'/'.strtolower($module).'/core/boxes/'.strtolower($module).'widget1.php';
//var_dump($srcfile);var_dump($destfile);
//var_dump($srcfile);
//var_dump($destfile);
$result = dol_copy($srcfile, $destfile, 0, 0);
if ($result > 0) {
@ -588,7 +594,8 @@ if ($dirins && $action == 'initcss' && !empty($module)) {
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
$srcfile = $srcdir.'/css/mymodule.css.php';
$destfile = $dirins.'/'.strtolower($module).'/css/'.strtolower($module).'.css.php';
//var_dump($srcfile);var_dump($destfile);
//var_dump($srcfile);
//var_dump($destfile);
$result = dol_copy($srcfile, $destfile, 0, 0);
if ($result > 0) {
@ -626,7 +633,8 @@ if ($dirins && $action == 'initjs' && !empty($module)) {
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
$srcfile = $srcdir.'/js/mymodule.js.php';
$destfile = $dirins.'/'.strtolower($module).'/js/'.strtolower($module).'.js.php';
//var_dump($srcfile);var_dump($destfile);
//var_dump($srcfile);
//var_dump($destfile);
$result = dol_copy($srcfile, $destfile, 0, 0);
if ($result > 0) {
@ -664,7 +672,8 @@ if ($dirins && $action == 'initcli' && !empty($module)) {
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
$srcfile = $srcdir.'/scripts/mymodule.php';
$destfile = $dirins.'/'.strtolower($module).'/scripts/'.strtolower($module).'.php';
//var_dump($srcfile);var_dump($destfile);
//var_dump($srcfile);
//var_dump($destfile);
$result = dol_copy($srcfile, $destfile, 0, 0);
if ($result > 0) {
@ -702,7 +711,8 @@ if ($dirins && $action == 'initdoc' && !empty($module)) {
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
$srcfile = $srcdir.'/doc/Documentation.asciidoc';
$destfile = $dirins.'/'.strtolower($module).'/doc/Documentation.asciidoc';
//var_dump($srcfile);var_dump($destfile);
//var_dump($srcfile);
//var_dump($destfile);
$result = dol_copy($srcfile, $destfile, 0, 0);
if ($result > 0) {
@ -2632,7 +2642,8 @@ if ($module == 'initmodule') {
$pathtoobjlib = strtolower($module).'/lib/'.strtolower($module).'_'.strtolower($tabobj).'.lib.php';
$pathtopicto = strtolower($module).'/img/object_'.strtolower($tabobj).'.png';
//var_dump($pathtoclass); var_dump($dirread);
//var_dump($pathtoclass);
//var_dump($dirread);
$realpathtoclass = $dirread.'/'.$pathtoclass;
$realpathtoapi = $dirread.'/'.$pathtoapi;
$realpathtoagenda = $dirread.'/'.$pathtoagenda;

View File

@ -338,7 +338,8 @@ class MyObject extends CommonObject
foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) {
//var_dump($key); var_dump($clonedObj->array_options[$key]); exit;
//var_dump($key);
//var_dump($clonedObj->array_options[$key]); exit;
unset($object->array_options[$key]);
}
}

View File

@ -342,7 +342,8 @@ class Mo extends CommonObject
foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->element]['unique'][$shortkey])) {
//var_dump($key); var_dump($clonedObj->array_options[$key]); exit;
//var_dump($key);
//var_dump($clonedObj->array_options[$key]); exit;
unset($object->array_options[$key]);
}
}

View File

@ -311,7 +311,8 @@ class Partnership extends CommonObject
foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) {
//var_dump($key); var_dump($clonedObj->array_options[$key]); exit;
//var_dump($key);
//var_dump($clonedObj->array_options[$key]); exit;
unset($object->array_options[$key]);
}
}

View File

@ -244,7 +244,8 @@ class ProductFournisseurPrice extends CommonObject
foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) {
//var_dump($key); var_dump($clonedObj->array_options[$key]); exit;
//var_dump($key);
//var_dump($clonedObj->array_options[$key]); exit;
unset($object->array_options[$key]);
}
}

View File

@ -232,7 +232,11 @@ if ($action == 'createmovements' && !empty($user->rights->stock->mouvement->cree
$firstrecord = array_shift($arraybatchinfo);
$dlc = $firstrecord['eatby'];
$dluo = $firstrecord['sellby'];
//var_dump($batch); var_dump($arraybatchinfo); var_dump($firstrecord); var_dump($dlc); var_dump($dluo); exit;
//var_dump($batch);
//var_dump($arraybatchinfo);
//var_dump($firstrecord);
//var_dump($dlc);
//var_dump($dluo); exit;
} else {
$dlc = '';
$dluo = '';

View File

@ -84,9 +84,9 @@ $monthofday = GETPOST('addtimemonth');
$dayofday = GETPOST('addtimeday');
$yearofday = GETPOST('addtimeyear');
/*var_dump(GETPOST('remonth'));
var_dump(GETPOST('button_search_x'));
var_dump(GETPOST('button_addtime'));*/
//var_dump(GETPOST('remonth'));
//var_dump(GETPOST('button_search_x'));
//var_dump(GETPOST('button_addtime'));
$daytoparse = $now;
if ($year && $month && $day) {

View File

@ -239,7 +239,8 @@ if ($action == 'addtime' && $user->rights->projet->lire) {
if (!$updateoftaskdone) { // Check to update progress if no update were done on task.
$object->fetch($taskid);
//var_dump($object->progress);var_dump(GETPOST($taskid . 'progress', 'int')); exit;
//var_dump($object->progress);
//var_dump(GETPOST($taskid . 'progress', 'int')); exit;
if ($object->progress != GETPOST($taskid.'progress', 'int')) {
$object->progress = GETPOST($taskid.'progress', 'int');
$result = $object->update($user);

View File

@ -308,7 +308,8 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac
if (!$updateoftaskdone) { // Check to update progress if no update were done on task.
$object->fetch($taskid);
//var_dump($object->progress);var_dump(GETPOST($taskid . 'progress', 'int')); exit;
//var_dump($object->progress);
//var_dump(GETPOST($taskid . 'progress', 'int')); exit;
if ($object->progress != GETPOST($taskid.'progress', 'int')) {
$object->progress = GETPOST($taskid.'progress', 'int');
$result = $object->update($user);

View File

@ -270,7 +270,8 @@ class RecruitmentCandidature extends CommonObject
foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) {
//var_dump($key); var_dump($clonedObj->array_options[$key]); exit;
//var_dump($key);
//var_dump($clonedObj->array_options[$key]); exit;
unset($object->array_options[$key]);
}
}

View File

@ -279,7 +279,8 @@ class RecruitmentJobPosition extends CommonObject
foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->element]['unique'][$shortkey])) {
//var_dump($key); var_dump($clonedObj->array_options[$key]); exit;
//var_dump($key);
//var_dump($clonedObj->array_options[$key]); exit;
unset($object->array_options[$key]);
}
}

View File

@ -611,7 +611,8 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
$pageposafter = $pdf->getPage();
$posyafter = $pdf->GetY();
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
//var_dump($posyafter);
//var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) { // There is no space left for total+free text
if ($i == ($nblines - 1)) { // No more lines, and no space left to show total, so we create a new page
$pdf->AddPage('', '', true);

View File

@ -450,7 +450,7 @@ if ($jobposition->id > 0 && (empty($action) || ($action != 'edit' && $action !=
$morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
$morehtmlref .= '<input type="hidden" name="action" value="classin">';
$morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">';
$morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
$morehtmlref .= $formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
$morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
$morehtmlref .= '</form>';
} else {

View File

@ -135,8 +135,8 @@ if (empty($reshook)) {
}
if ($cancel) {
/*var_dump($cancel);
var_dump($backtopage);exit;*/
//var_dump($cancel);
//var_dump($backtopage);exit;
if (!empty($backtopageforcancel)) {
header("Location: ".$backtopageforcancel);
exit;

View File

@ -545,7 +545,9 @@ if (empty($reshook)) {
$resql = $db->query($sql);
}
}
//var_dump($sql); var_dump($newcu); var_dump($num); exit;
//var_dump($sql);
//var_dump($newcu);
//var_dump($num); exit;
if (!$error) {
$stripecu = $newcu;

View File

@ -531,12 +531,12 @@ class Stripe extends CommonObject
$this->code = $e->getStripeCode();
$this->declinecode = $e->getDeclineCode();
} catch (Exception $e) {
/*var_dump($dataforintent);
var_dump($description);
var_dump($key);
var_dump($paymentintent);
var_dump($e->getMessage());
var_dump($e);*/
//var_dump($dataforintent);
//var_dump($description);
//var_dump($key);
//var_dump($paymentintent);
//var_dump($e->getMessage());
//var_dump($e);
$error++;
$this->error = $e->getMessage();
$this->code = '';
@ -695,11 +695,11 @@ class Stripe extends CommonObject
$_SESSION["stripe_setup_intent"] = $setupintent;
}*/
} catch (Exception $e) {
/*var_dump($dataforintent);
var_dump($description);
var_dump($key);
var_dump($setupintent);
var_dump($e->getMessage());*/
//var_dump($dataforintent);
//var_dump($description);
//var_dump($key);
//var_dump($setupintent);
//var_dump($e->getMessage());
$error++;
$this->error = $e->getMessage();
}
@ -780,7 +780,8 @@ class Stripe extends CommonObject
);
//$a = \Stripe\Stripe::getApiKey();
//var_dump($a);var_dump($stripeacc);exit;
//var_dump($a);
//var_dump($stripeacc);exit;
try {
if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage
if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) {

View File

@ -741,7 +741,9 @@ if (empty($reshook)) {
$date_end
);
//var_dump($tva_tx);var_dump($productsupplier->fourn_pu);var_dump($price_base_type);exit;
//var_dump($tva_tx);
//var_dump($productsupplier->fourn_pu);
//var_dump($price_base_type);exit;
if ($result < 0) {
$error++;
setEventMessages($object->error, $object->errors, 'errors');

View File

@ -818,6 +818,12 @@ textarea.centpercent {
.nopaddingright {
padding-right: 0;
}
.nopaddingleftimp {
padding-left: 0 !important;
}
.nopaddingrightimp {
padding-right: 0 !important;
}
.paddingleft {
padding-<?php print $left; ?>: 4px;
}
@ -1567,7 +1573,7 @@ table[summary="list_of_modules"] .fa-cog {
.minheight30 { min-height: 30px; }
.minheight40 { min-height: 40px; }
.titlefieldcreate { width: 20%; }
.titlefield { /* width: 25%; */ width: 250px; }
.titlefield { /* width: 25%; */ min-width: 250px; }
.titlefieldmiddle { width: 45%; }
.titlefieldmax45 { max-width: 45%; }
.imgmaxwidth180 { max-width: 180px; }
@ -1773,7 +1779,7 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select
.minwidth300imp { min-width: 120px !important; }
.minwidth400imp { min-width: 150px !important; }
.minwidth500imp { min-width: 250px !important; }
.titlefield { width: auto; }
.titlefield { width: auto; min-width: unset; }
.titlefieldcreate { width: auto; }
#tooltip {

View File

@ -969,6 +969,12 @@ textarea.centpercent {
.nopaddingright {
padding-right: 0;
}
.nopaddingleftimp {
padding-left: 0 !important;
}
.nopaddingrightimp {
padding-right: 0 !important;
}
.paddingleft {
padding-<?php print $left; ?>: 4px;
}
@ -1656,7 +1662,7 @@ tr.nobottom td {
.minheight30 { min-height: 30px; }
.minheight40 { min-height: 40px; }
.titlefieldcreate { width: 20%; }
.titlefield { /* width: 25%; */ width: 250px; }
.titlefield { /* width: 25%; */ min-width: 250px; }
.titlefieldmiddle { width: 50%; }
.imgmaxwidth180 { max-width: 180px; }
.imgmaxheight50 { max-height: 50px; }
@ -1858,7 +1864,7 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select
.minwidth300imp { min-width: 120px !important; }
.minwidth400imp { min-width: 150px !important; }
.minwidth500imp { min-width: 250px !important; }
.titlefield { width: auto; }
.titlefield { width: auto; min-width: unset; }
.titlefieldcreate { width: auto; }
#tooltip {
@ -7221,6 +7227,7 @@ div.clipboardCPValue.hidewithsize {
.titlefield {
width: auto !important; /* We want to ignore the 30%, try to use more if you can */
min-width: unset;
}
.tableforfield>tr>td:first-child, .tableforfield>tbody>tr>td:first-child, div.tableforfield div.tagtr>div.tagtd:first-of-type {
/* max-width: 100px; */ /* but no more than 100px */

View File

@ -290,7 +290,8 @@ class CTicketCategory extends CommonObject
foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) {
//var_dump($key); var_dump($clonedObj->array_options[$key]); exit;
//var_dump($key);
//var_dump($clonedObj->array_options[$key]); exit;
unset($object->array_options[$key]);
}
}

View File

@ -2494,7 +2494,8 @@ class Ticket extends CommonObject
if (!$error && $id > 0) {
setEventMessages($langs->trans('TicketMessageSuccessfullyAdded'), null, 'mesgs');
//var_dump($_SESSION); var_dump($listofpaths);exit;
//var_dump($_SESSION);
//var_dump($listofpaths);exit;
/*
* Public area

View File

@ -836,7 +836,9 @@ foreach ($object->fields as $key => $val) {
$arrayofstatus[$key2] = $val2;
}
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
//var_dump($arrayofstatus);var_dump($search['fk_statut']);var_dump(array_values($search[$key]));
//var_dump($arrayofstatus);
//var_dump($search['fk_statut']);
//var_dump(array_values($search[$key]));
$selectedarray = null;
if (!empty($search[$key])) {
$selectedarray = array_values($search[$key]);

View File

@ -56,7 +56,7 @@ dol_syslog("Call method ".$WS_METHOD);
$result = $soapclient->call($WS_METHOD,$parameters);
if (! $result)
{
var_dump($soapclient);
//var_dump($soapclient);
print '<h2>Erreur SOAP 1</h2>'.$soapclient->error_str;
exit;
}

View File

@ -410,7 +410,8 @@ if ($sortorder) {
include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit' action when submitting new file.
$backtopage = $savbacktopage;
//var_dump($backtopage); var_dump($action);
//var_dump($backtopage);
//var_dump($action);
if ($action == 'renamefile') { // Must be after include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; If action were renamefile, we set it to 'file_manager'
$action = 'file_manager';

View File

@ -318,7 +318,8 @@ class Workstation extends CommonObject
foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) {
//var_dump($key); var_dump($clonedObj->array_options[$key]); exit;
//var_dump($key);
//var_dump($clonedObj->array_options[$key]); exit;
unset($object->array_options[$key]);
}
}

View File

@ -199,6 +199,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase
|| preg_match('/modules\/.*\/doc\/(doc|pdf)_/', $file['relativename'])
|| preg_match('/modules\/(import|mailings|printing)\//', $file['relativename'])
|| in_array($file['name'], array('modules_boxes.php', 'rapport.pdf.php', 'TraceableDB.php'))) {
// Check into Class files
if (! in_array($file['name'], array(
'api.class.php',
'commonobject.class.php',
@ -224,6 +225,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase
//exit;
}
} else {
// Check into Include files
if (! in_array($file['name'], array(
'objectline_view.tpl.php',
'extrafieldsinexport.inc.php',
@ -245,6 +247,25 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase
}
}
// Check if a var_dump has been forgotten
if (!preg_match('/test\/phpunit/', $file['fullname'])) {
$ok=true;
$matches=array();
preg_match_all('/(.)\s*var_dump/', $filecontent, $matches, PREG_SET_ORDER);
//var_dump($matches);
foreach ($matches as $key => $val) {
if ($val[1] != '/' && $val[1] != '*') {
$ok=false;
break;
}
break;
}
//print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n";
$this->assertTrue($ok, 'Found string var_dump that is not just after /* or // in '.$file['relativename']);
//exit;
}
// Check get_class followed by __METHOD__
$ok=true;
$matches=array();
preg_match_all('/'.preg_quote('get_class($this)."::".__METHOD__', '/').'/', $filecontent, $matches, PREG_SET_ORDER);