Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop#3

This commit is contained in:
lmarcouiller 2022-05-18 10:31:56 +02:00
commit 7e4070faa5
88 changed files with 586 additions and 346 deletions

View File

@ -41,6 +41,105 @@ Following changes may create regressions for some external modules, but were nec
* Method fetch_all of DolResource has been renamed into fetchAll() to match naming conventions. * Method fetch_all of DolResource has been renamed into fetchAll() to match naming conventions.
* The hook 'upgrade' and 'doUpgrade2" has been renamed 'doUpgradeBefore' and 'doUpgradeAfterDB'. A new trigger 'doUpgradeAfterFiles' has been introduced. * The hook 'upgrade' and 'doUpgrade2" has been renamed 'doUpgradeBefore' and 'doUpgradeAfterDB'. A new trigger 'doUpgradeAfterFiles' has been introduced.
***** ChangeLog for 15.0.2 compared to 15.0.1 *****
FIX: #19777 #20281
FIX: #20140 #20301
FIX: #20279 Accountancy - PostGreSQL - Error on mass update lines already binded
FIX: #20476 migration postgresql 14.0.x to 15.0.x packaging type
FIX: #20733 Inventory: Do not use batch qty even if present if batch module is disabled.
FIX: action comm list: holiday last day not included + handle duration with halfdays
FIX: Add missing entity on salary's payment
FIX: Add 'recruitment' into check array
FIX: add tools to fix bad bank amount in accounting with multicurrency
FIX: assign member cateogry to a member
FIX: backport
FIX: bad bank amount in accounting with multicurrency
FIX: Bad condition on remx
FIX: Bad filter on date on salary list
FIX: bad link to add a customer price (token duplicated)
FIX: bad status of member on widget by type and status
FIX: better error management at product selling price update
FIX: Can't edit bank record
FIX: check mandatory thirdparty fields for mass action
FIX: check thirdparty object loaded and properties exist
FIX: comment
FIX: compatibility for ticket number sharing
FIX: compatibility with multicompany sharings
FIX: contact card: single extrafield update failed
FIX: country not visible into list of states
FIX: Delete an extrafield where type is double
FIX: deprecated module are not more viewed as external modules
FIX: Disable customer type by default if type prospect/customer is disabled
FIX: each time we create a supplier order, we need to give it a ref_supplier
FIX: Error management
FIX: fatal error for $db usage in tpl
FIX: filter into the list of product lots
FIX: Filter on Object Referent page give CRSF page
FIX: Fix default options ($hidedetails, $hidedesc, $hideref) with globales when generate PDF in mass actions
FIX: Fix search by filters
FIX: Fix the adding of lines in the create invoice functions
FIX: forgotten form confirm before various payment delete
FIX: holiday/leave requests: write status change emails in HTML
FIX: include discount price for PMP after a reception (Issue #20029)
FIX: incrementation
FIX: in salary stats and payment list, we must check right perms as well as salary list
FIX: intervention entity missing
FIX: label tax cat trad
FIX: Mass action ship orders
FIX: missing advanced perms
FIX: missing call to executeHooks()
FIX: Missing entity on adding new VAT
FIX: missing hook for row ordering
FIX: missing hook parameter ($possiblelinks)
FIX: missing parenthesis
FIX: missing picto in combo of mass actions of thirdparties.
FIX: missing signature library when ODT model is used
FIX: Missing unset fields after updateline expensereport
FIX: ModuileBuilder - Fix getLinesArray() error reporting
FIX: Move delete task time trigger position
FIX: Navigation between invoices
FIX: No empty line inserted into accounting_bookkeeping
FIX: Numbering of sepa files
FIX: object cloning: set unique extrafield values to null to prevent duplicates
FIX: on update with action reminder in future there is user key error
FIX: originproductline array td identification data-id
FIX: out of memory when more than 100 000 invoices.
FIX: permit access to medias when logged in a different entity
FIX: phpcs
FIX: project creation prevented if PROJECTLEADER contact role renamed, de-activated or deleted
FIX: project timesheet by week: cleanup unused code
FIX: project timesheet: public holidays offset by 1 day
FIX: project timesheets: assume Saturday and Sunday as default weekend days when working days conf is empty or badly formed
FIX: propal list: bad error management when setting "not signed" mass action
FIX: propal list mass action translations and error management (v14 edition)
FIX: propal list: missing not signed massaction translation keys for transifex
FIX: PR returns
FIX: ref_client doesn't exists on supplier invoice, then ref_fourn needs to have a default value when we want to bill several supplier orders
FIX: replenish and manage product stock by warhouse
FIX: sending email on payment of registration of event
FIX: SEPA ICS is not mandatory for bank transfer
FIX: Set datec when add time spent on a project task
FIX: status filter on supplierOrder stats doesn't work
FIX: stickler-ci
FIX: still prevent project creation if PROJECTLEADER role unavailable, but with a specific error message
FIX: Supplier order stats
FIX: Tabulation must be allowed for HTML content
FIX: tool to fix bank account not in main currency for vendor invoice
FIX: translations
FIX: Travis + Update dev
FIX: truncate Customer Reference too long on PDF header (PR #20718)
FIX: uniformize code
FIX: Update of sale price (log not correctly updated)
FIX: user actions rights when mulit-company transverse mode is enabled
FIX: user employee tab: offset in open days messes up holiday length calculation
FIX: We need to have a different default_ref_supplier for each new fourn invoice
FIX: "WHERE" clause missing on resource export
FIX: #yogosha9754
***** ChangeLog for 15.0.1 compared to 15.0.0 ***** ***** ChangeLog for 15.0.1 compared to 15.0.0 *****
FIX: #19777 #20281 FIX: #19777 #20281
FIX: bad position of extrafields for interventions FIX: bad position of extrafields for interventions

View File

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

View File

@ -558,11 +558,11 @@ if ($result) {
} }
/*var_dump($tabpay); //var_dump($tabpay);
var_dump($tabcompany); //var_dump($tabcompany);
var_dump($tabbq); //var_dump($tabbq);
var_dump($tabtp); //var_dump($tabtp);
var_dump($tabtype);*/ //var_dump($tabtype);
// Write bookkeeping // Write bookkeeping
if (!$error && $action == 'writebookkeeping') { if (!$error && $action == 'writebookkeeping') {
@ -594,9 +594,9 @@ if (!$error && $action == 'writebookkeeping') {
$db->begin(); $db->begin();
// Introduce a protection. Total of tabtp must be total of tabbq // Introduce a protection. Total of tabtp must be total of tabbq
/*var_dump($tabpay); //var_dump($tabpay);
var_dump($tabtp); //var_dump($tabtp);
var_dump($tabbq);exit;*/ //var_dump($tabbq);exit;
// Bank // Bank
if (!$errorforline && is_array($tabbq[$key])) { if (!$errorforline && is_array($tabbq[$key])) {
@ -1267,9 +1267,9 @@ if (empty($action) || $action == 'view') {
$accounttoshowsubledger = length_accounta($k); $accounttoshowsubledger = length_accounta($k);
if ($accounttoshow != $accounttoshowsubledger) { if ($accounttoshow != $accounttoshowsubledger) {
if (empty($accounttoshowsubledger) || $accounttoshowsubledger == 'NotDefined') { if (empty($accounttoshowsubledger) || $accounttoshowsubledger == 'NotDefined') {
/*var_dump($tabpay[$key]); //var_dump($tabpay[$key]);
var_dump($tabtype[$key]); //var_dump($tabtype[$key]);
var_dump($tabbq[$key]);*/ //var_dump($tabbq[$key]);
//print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>'; //print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
if (!empty($tabcompany[$key]['code_compta'])) { if (!empty($tabcompany[$key]['code_compta'])) {
if (in_array($tabtype[$key], array('payment_various', 'payment_salary'))) { 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 '<td align="center" width="60">'.$langs->trans("Value").'</td>';
print "</tr>\n"; print "</tr>\n";
/*var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY); //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_FRIDAY);
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY); //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_SUNDAY);
*/
if (!isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY)) { if (!isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY)) {
$conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY = 1; $conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY = 1;
} }
if (!isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY)) { if (!isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY)) {
$conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY = 1; $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_MONDAY);
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY); //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_SATURDAY);
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY); //var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY);
*/
// Set working days // Set working days
print '<tr class="oddeven">'; print '<tr class="oddeven">';

View File

@ -407,10 +407,10 @@ if (empty($error) && !empty($xml)) {
$checksumget = md5(join(',', $checksumconcat)); $checksumget = md5(join(',', $checksumconcat));
$checksumtoget = trim((string) $xml->dolibarr_htdocs_dir_checksum); $checksumtoget = trim((string) $xml->dolibarr_htdocs_dir_checksum);
/*var_dump(count($file_list['added'])); //var_dump(count($file_list['added']));
var_dump($checksumget); //var_dump($checksumget);
var_dump($checksumtoget); //var_dump($checksumtoget);
var_dump($checksumget == $checksumtoget);*/ //var_dump($checksumget == $checksumtoget);
$resultcomment = ''; $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.stat").': '.yn(ini_get('xcache.stat')).'<br>'."\n";
print $langs->trans("xcache.coverager").': '.yn(ini_get('xcache.coverager')).'<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 // End of page
llxFooter(); llxFooter();

View File

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

View File

@ -568,10 +568,9 @@ class Documents extends DolibarrApi
{ {
global $db, $conf; global $db, $conf;
/*var_dump($modulepart); //var_dump($modulepart);
var_dump($filename); //var_dump($filename);
var_dump($filecontent); //var_dump($filecontent);exit;
exit;*/
if (empty($modulepart)) { if (empty($modulepart)) {
throw new RestException(400, 'Modulepart not provided.'); 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 .= '<tr><td>'.($prefix ? $prefix.' > ' : '').$key.'</td>';
$s .= '<td>'; $s .= '<td>';
if (in_array($key, array('date', 'datef', 'dateh', 'datec', 'datem', 'datep'))) { if (in_array($key, array('date', 'datef', 'dateh', 'datec', 'datem', 'datep'))) {
/*var_dump(is_object($val)); //var_dump(is_object($val));
var_dump(is_array($val)); //var_dump(is_array($val));
var_dump(is_array($val)); //var_dump(is_array($val));
var_dump(@get_class($val)); //var_dump(@get_class($val));
var_dump($val);*/ //var_dump($val);
$s .= dol_print_date($val, 'dayhour'); $s .= dol_print_date($val, 'dayhour');
} else { } else {
$s .= $val; $s .= $val;

View File

@ -1191,7 +1191,8 @@ if (count($listofextcals)) {
foreach ($icalevents as $icalevent) { foreach ($icalevents as $icalevent) {
//var_dump($icalevent); //var_dump($icalevent);
//print $icalevent['SUMMARY'].'->'.var_dump($icalevent).'<br>';exit; //print $icalevent['SUMMARY'].'->';
//var_dump($icalevent);exit;
if (!empty($icalevent['RRULE'])) { if (!empty($icalevent['RRULE'])) {
continue; // We found a repeatable event. It was already split into unitary events, so we discard general rule. 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); $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, ... $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 // We are in a particular day for $username, now we scan all events
foreach ($eventarray as $daykey => $notused) { 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 $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, ... $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 // We are in a particular day for $username, now we scan all events
foreach ($eventarray as $daykey => $notused) { foreach ($eventarray as $daykey => $notused) {

View File

@ -634,7 +634,11 @@ if (!empty($conf->societe->enabled) && $user->rights->societe->lire) {
print $s; print $s;
print '</td>'; print '</td>';
print '<td class="right nowrap tddate">'.dol_print_date($db->jdate($objp->tms), 'day').'</td>';
$datem = $db->jdate($objp->tms);
print '<td class="right nowrap tddate" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'">';
print dol_print_date($datem, 'day', 'tzuserrel');
print '</td>';
print '</tr>'; print '</tr>';
$i++; $i++;
@ -725,7 +729,11 @@ if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_S
print $s; print $s;
print '</td>'; print '</td>';
print '<td class="right tddate">'.dol_print_date($db->jdate($objp->dm), 'day').'</td>';
$datem = $db->jdate($objp->dm);
print '<td class="right tddate" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'">';
print dol_print_date($datem, 'day', 'tzuserrel');
print '</td>';
print '</tr>'; print '</tr>';
$i++; $i++;
@ -922,7 +930,10 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire) {
print '</td>'; print '</td>';
print '<td class="nowrap">'.$companystatic->getNomUrl(1, 'customer', 44).'</td>'; print '<td class="nowrap">'.$companystatic->getNomUrl(1, 'customer', 44).'</td>';
print '<td class="right tddate">'.dol_print_date($db->jdate($obj->dp), 'day').'</td>'; $datem = $db->jdate($obj->dp);
print '<td class="center tddate" title="'.dol_escape_htmltag($langs->trans("Date").': '.dol_print_date($datem, 'day', 'tzserver')).'">';
print dol_print_date($datem, 'day', 'tzserver');
print '</td>';
print '<td class="right tdamount amount">'.price(!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT) ? $obj->total_ht : $obj->total_ttc).'</td>'; print '<td class="right tdamount amount">'.price(!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT) ? $obj->total_ht : $obj->total_ttc).'</td>';
print '<td align="center" width="14">'.$propalstatic->LibStatut($obj->fk_statut, 3).'</td>'; print '<td align="center" width="14">'.$propalstatic->LibStatut($obj->fk_statut, 3).'</td>';
@ -1039,7 +1050,11 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
print '</td>'; print '</td>';
print '<td class="nowrap">'.$companystatic->getNomUrl(1, 'customer', 44).'</td>'; print '<td class="nowrap">'.$companystatic->getNomUrl(1, 'customer', 44).'</td>';
print '<td class="right tddate">'.dol_print_date($db->jdate($obj->dv), 'day').'</td>'; $datem = $db->jdate($obj->dv);
print '<td class="center tddate" title="'.dol_escape_htmltag($langs->trans("DateValue").': '.dol_print_date($datem, 'day', 'tzserver')).'">';
print dol_print_date($datem, 'day', 'tzserver');
print '</td>';
print '<td class="right tdamount amount">'.price(!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT) ? $obj->total_ht : $obj->total_ttc).'</td>'; print '<td class="right tdamount amount">'.price(!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT) ? $obj->total_ht : $obj->total_ttc).'</td>';
print '<td align="center" width="14">'.$orderstatic->LibStatut($obj->fk_statut, $obj->billed, 3).'</td>'; print '<td align="center" width="14">'.$orderstatic->LibStatut($obj->fk_statut, $obj->billed, 3).'</td>';

View File

@ -765,12 +765,12 @@ if ($resql) {
if ($socid > 0) { if ($socid > 0) {
$soc = new Societe($db); $soc = new Societe($db);
$soc->fetch($socid); $soc->fetch($socid);
$title = $langs->trans('ListOfProposals').' - '.$soc->name; $title = $langs->trans('Proposals').' - '.$soc->name;
if (empty($search_societe)) { if (empty($search_societe)) {
$search_societe = $soc->name; $search_societe = $soc->name;
} }
} else { } else {
$title = $langs->trans('ListOfProposals'); $title = $langs->trans('Proposals');
} }
$num = $db->num_rows($resql); $num = $db->num_rows($resql);

View File

@ -1733,10 +1733,10 @@ if ($action == 'create' && $usercancreate) {
$form->selectAvailabilityDelay($availability_id, 'availability_id', '', 1, 'maxwidth200 widthcentpercentminusx'); $form->selectAvailabilityDelay($availability_id, 'availability_id', '', 1, 'maxwidth200 widthcentpercentminusx');
print '</td></tr>'; print '</td></tr>';
// Terms of the settlement // Terms of payment
print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>'; print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>';
print img_picto('', 'paiment', 'class="pictofixedwidth"'); print img_picto('', 'payment', 'class="pictofixedwidth"');
$form->select_conditions_paiements($cond_reglement_id, 'cond_reglement_id', 1, 1, 0, '', $deposit_percent); $form->select_conditions_paiements($cond_reglement_id, 'cond_reglement_id', 1, 1, 0, 'maxwidth200 widthcentpercentminusx', $deposit_percent);
print '</td></tr>'; print '</td></tr>';
// Payment mode // Payment mode
@ -1836,7 +1836,7 @@ if ($action == 'create' && $usercancreate) {
print '<tr>'; print '<tr>';
print '<td>'.$form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0).'</td>'; print '<td>'.$form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0).'</td>';
print '<td class="maxwidthonsmartphone">'; print '<td class="maxwidthonsmartphone">';
print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency($currency_code, 'multicurrency_code'); print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency($currency_code, 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx');
print '</td></tr>'; print '</td></tr>';
} }

View File

@ -1015,12 +1015,12 @@ if ($resql) {
if ($socid > 0) { if ($socid > 0) {
$soc = new Societe($db); $soc = new Societe($db);
$soc->fetch($socid); $soc->fetch($socid);
$title = $langs->trans('ListOfOrders').' - '.$soc->name; $title = $langs->trans('CustomersOrders').' - '.$soc->name;
if (empty($search_company)) { if (empty($search_company)) {
$search_company = $soc->name; $search_company = $soc->name;
} }
} else { } else {
$title = $langs->trans('ListOfOrders'); $title = $langs->trans('CustomersOrders');
} }
if (strval($search_status) == '0') { if (strval($search_status) == '0') {
$title .= ' - '.$langs->trans('StatusOrderDraftShort'); $title .= ' - '.$langs->trans('StatusOrderDraftShort');

View File

@ -534,7 +534,7 @@ foreach ($accounts as $key => $type) {
// Ref // Ref
if (!empty($arrayfields['b.ref']['checked'])) { if (!empty($arrayfields['b.ref']['checked'])) {
print '<td class="nowrap">'.$objecttmp->getNomUrl(1).'</td>'; print '<td class="nowraponall">'.$objecttmp->getNomUrl(1).'</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
@ -586,7 +586,7 @@ foreach ($accounts as $key => $type) {
// Accountancy journal // Accountancy journal
if (!empty($arrayfields['b.fk_accountancy_journal']['checked'])) { if (!empty($arrayfields['b.fk_accountancy_journal']['checked'])) {
print '<td>'; print '<td class="tdoverflowmax125">';
if (!empty($conf->accounting->enabled)) { if (!empty($conf->accounting->enabled)) {
if (empty($objecttmp->fk_accountancy_journal)) { if (empty($objecttmp->fk_accountancy_journal)) {
print img_warning($langs->trans("Mandatory")); print img_warning($langs->trans("Mandatory"));
@ -606,7 +606,7 @@ foreach ($accounts as $key => $type) {
// Currency // Currency
if (!empty($arrayfields['b.currency_code']['checked'])) { if (!empty($arrayfields['b.currency_code']['checked'])) {
print '<td class="center">'; print '<td class="center nowraponall">';
print $objecttmp->currency_code; print $objecttmp->currency_code;
print '</td>'; print '</td>';
if (!$i) { if (!$i) {
@ -616,7 +616,7 @@ foreach ($accounts as $key => $type) {
// Transactions to reconcile // Transactions to reconcile
if (!empty($arrayfields['toreconcile']['checked'])) { if (!empty($arrayfields['toreconcile']['checked'])) {
print '<td class="center">'; print '<td class="center tdoverflowmax125">';
$conciliate = $objecttmp->canBeConciliated(); $conciliate = $objecttmp->canBeConciliated();
if ($conciliate == -2) { if ($conciliate == -2) {
@ -663,7 +663,7 @@ foreach ($accounts as $key => $type) {
print $hookmanager->resPrint; print $hookmanager->resPrint;
// Date creation // Date creation
if (!empty($arrayfields['b.datec']['checked'])) { if (!empty($arrayfields['b.datec']['checked'])) {
print '<td class="center">'; print '<td class="center nowraponall">';
print dol_print_date($objecttmp->date_creation, 'dayhour'); print dol_print_date($objecttmp->date_creation, 'dayhour');
print '</td>'; print '</td>';
if (!$i) { if (!$i) {
@ -672,7 +672,7 @@ foreach ($accounts as $key => $type) {
} }
// Date modification // Date modification
if (!empty($arrayfields['b.tms']['checked'])) { if (!empty($arrayfields['b.tms']['checked'])) {
print '<td class="center">'; print '<td class="center nowraponall">';
print dol_print_date($objecttmp->date_update, 'dayhour'); print dol_print_date($objecttmp->date_update, 'dayhour');
print '</td>'; print '</td>';
if (!$i) { if (!$i) {

View File

@ -539,7 +539,7 @@ if ($resql) {
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidthsearch '); print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ');
print '</tr>'; print '</tr>';
@ -656,7 +656,7 @@ if ($resql) {
if ($arrayfields['account']['checked']) { if ($arrayfields['account']['checked']) {
$accountingaccount->fetch('', $obj->accountancy_code, 1); $accountingaccount->fetch('', $obj->accountancy_code, 1);
print '<td>'.$accountingaccount->getNomUrl(0, 1, 1, '', 1).'</td>'; print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->accountancy_code.' '.$obj->accountancy_label).'">'.$accountingaccount->getNomUrl(0, 1, 1, '', 1).'</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
@ -664,7 +664,7 @@ if ($resql) {
// Accounting subledger account // Accounting subledger account
if ($arrayfields['subledger']['checked']) { if ($arrayfields['subledger']['checked']) {
print '<td>'.length_accounta($obj->subledger_account).'</td>'; print '<td class="tdoverflowmax150">'.length_accounta($obj->subledger_account).'</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }

View File

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

View File

@ -361,7 +361,8 @@ if ($result) {
print img_warning($langs->trans("Late")); print img_warning($langs->trans("Late"));
} }
print '</td>'; print '</td>';
print '<td>';
print '<td class="tdoverflowmax150">';
print $staticcompany->getNomUrl(1, '', 20); print $staticcompany->getNomUrl(1, '', 20);
print '</td>'; print '</td>';
print '<td class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'">'; print '<td class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'">';
@ -444,7 +445,7 @@ if ($resql) {
} }
} }
print '</td>'; print '</td>';
print '<td>'; print '<td class="tdoverflowmax125">';
$staticcompany->id = $obj->fk_soc; $staticcompany->id = $obj->fk_soc;
$staticcompany->name = $obj->name; $staticcompany->name = $obj->name;
print $staticcompany->getNomUrl(1, '', 20); print $staticcompany->getNomUrl(1, '', 20);
@ -526,7 +527,7 @@ if ($resql) {
} }
} }
print '</td>'; print '</td>';
print '<td>'; print '<td class="tdoverflowmax125">';
$staticcompany->id = $obj->fk_soc; $staticcompany->id = $obj->fk_soc;
$staticcompany->name = $obj->name; $staticcompany->name = $obj->name;
print $staticcompany->getNomUrl(1, '', 20); print $staticcompany->getNomUrl(1, '', 20);
@ -609,7 +610,7 @@ if ($resql) {
} }
} }
print '</td>'; print '</td>';
print '<td>'; print '<td class="tdoverflowmax125">';
$staticcompany->id = $obj->fk_soc; $staticcompany->id = $obj->fk_soc;
$staticcompany->name = $obj->name; $staticcompany->name = $obj->name;
print $staticcompany->getNomUrl(1, '', 20); print $staticcompany->getNomUrl(1, '', 20);

View File

@ -862,11 +862,11 @@ abstract class CommonInvoice extends CommonObject
$pricewithtax = implode(unpack("H*", price2num($pricewithtaxstring, 2))); $pricewithtax = implode(unpack("H*", price2num($pricewithtaxstring, 2)));
$pricetax = implode(unpack("H*", $pricetaxstring)); $pricetax = implode(unpack("H*", $pricetaxstring));
var_dump(strlen($this->thirdparty->name)); //var_dump(strlen($this->thirdparty->name));
var_dump(str_pad(dechex('9'), 2, '0', STR_PAD_LEFT)); //var_dump(str_pad(dechex('9'), 2, '0', STR_PAD_LEFT));
var_dump($this->thirdparty->name); //var_dump($this->thirdparty->name);
var_dump(implode(unpack("H*", $this->thirdparty->name))); //var_dump(implode(unpack("H*", $this->thirdparty->name)));
var_dump(price($this->total_tva, 0, $tmplang, 0, -1, 2)); //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 = '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; $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) * @param string $deposit_percent < 0 : deposit_percent input makes no sense (for example, in list filters)
* 0 : use default deposit percentage from entry * 0 : use default deposit percentage from entry
* > 0 : force deposit percentage (for example, from company object) * > 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) public function getSelectConditionsPaiements($selected = 0, $htmlname = 'condid', $filtertype = -1, $addempty = 0, $noinfoadmin = 0, $morecss = '', $deposit_percent = -1)
{ {
global $langs, $user, $conf; global $langs, $user, $conf;
$out = ''; $out = '';
dol_syslog(__METHOD__." selected=".$selected.", htmlname=".$htmlname, LOG_DEBUG); dol_syslog(__METHOD__." selected=".$selected.", htmlname=".$htmlname, LOG_DEBUG);
@ -4125,7 +4125,7 @@ class Form
* @param int $active Active or not, -1 = all * @param int $active Active or not, -1 = all
* @param string $morecss Add more CSS on select tag * @param string $morecss Add more CSS on select tag
* @param int $nooutput 1=Return string, do not send to output * @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) public function select_types_paiements($selected = '', $htmlname = 'paiementtype', $filtertype = '', $format = 0, $empty = 1, $noadmininfo = 0, $maxlength = 0, $active = 1, $morecss = '', $nooutput = 0)
{ {
@ -5883,14 +5883,16 @@ class Form
/** /**
* Return array of currencies in user language * Return array of currencies in user language
* *
* @param string $selected preselected currency code * @param string $selected Preselected currency code
* @param string $htmlname name of HTML select list * @param string $htmlname Name of HTML select list
* @param integer $useempty 1=Add empty line * @param integer $useempty 1=Add empty line
* @param string $filter Optional filters criteras (example: 'code <> x', ' in (1,3)') * @param string $filter Optional filters criteras (example: 'code <> x', ' in (1,3)')
* @param bool $excludeConfCurrency false = If company current currency not in table, we add it into list. Should always be available. true = we are in currency_rate update , we don't want to see conf->currency in select * @param bool $excludeConfCurrency false = If company current currency not in table, we add it into list. Should always be available.
* true = we are in currency_rate update , we don't want to see conf->currency in select
* @param string $morecss More css
* @return string * @return string
*/ */
public function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0, $filter = '', $excludeConfCurrency = false) public function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0, $filter = '', $excludeConfCurrency = false, $morecss = '')
{ {
global $conf, $langs; global $conf, $langs;
@ -5911,7 +5913,7 @@ class Form
} }
$out = ''; $out = '';
$out .= '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">'; $out .= '<select class="flat'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'" id="'.$htmlname.'">';
if ($useempty) { if ($useempty) {
$out .= '<option value="">&nbsp;</option>'; $out .= '<option value="">&nbsp;</option>';
} }
@ -8321,9 +8323,9 @@ class Form
$listcheckedstring = ''; $listcheckedstring = '';
foreach ($array as $key => $val) { foreach ($array as $key => $val) {
/* var_dump($val); // var_dump($val);
var_dump(array_key_exists('enabled', $val)); // var_dump(array_key_exists('enabled', $val));
var_dump(!$val['enabled']);*/ // var_dump(!$val['enabled']);
if (array_key_exists('enabled', $val) && isset($val['enabled']) && !$val['enabled']) { if (array_key_exists('enabled', $val) && isset($val['enabled']) && !$val['enabled']) {
unset($array[$key]); // We don't want this field unset($array[$key]); // We don't want this field
continue; continue;

View File

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

View File

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

View File

@ -330,9 +330,9 @@ function completeFileArrayWithDatabaseInfo(&$filearray, $relativedir)
} }
} }
/*var_dump($relativedir); //var_dump($relativedir);
var_dump($filearray); //var_dump($filearray);
var_dump($filearrayindatabase);*/ //var_dump($filearrayindatabase);
// Complete filearray with properties found into $filearrayindatabase // Complete filearray with properties found into $filearrayindatabase
foreach ($filearray as $key => $val) { 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); $url .= '?dol_hide_topmenu=1&dol_hide_leftmenu=1&dol_openinpopup='.urlencode($name);
} }
$out .= ''; $out = '';
$backtopagejsfieldsid = ''; $backtopagejsfieldslabel = ''; $backtopagejsfieldsid = ''; $backtopagejsfieldslabel = '';
if ($backtopagejsfields) { if ($backtopagejsfields) {
@ -1628,7 +1628,7 @@ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $di
close: function (event, ui) { close: function (event, ui) {
returnedid = jQuery("#varforreturndialogid'.$name.'").text(); returnedid = jQuery("#varforreturndialogid'.$name.'").text();
returnedlabel = jQuery("#varforreturndialoglabel'.$name.'").text(); returnedlabel = jQuery("#varforreturndialoglabel'.$name.'").text();
console.log("popup has been closed. returnedid="+returnedid+" returnedlabel="+returnedlabel); console.log("popup has been closed. returnedid (js var defined into parent page)="+returnedid+" returnedlabel="+returnedlabel);
if (returnedid != "" && returnedid != "div for returned id") { if (returnedid != "" && returnedid != "div for returned id") {
jQuery("#'.(empty($backtopagejsfieldsid)?"none":$backtopagejsfieldsid).'").val(returnedid); jQuery("#'.(empty($backtopagejsfieldsid)?"none":$backtopagejsfieldsid).'").val(returnedid);
} }

View File

@ -104,10 +104,9 @@ function dolSessionWrite($sess_id, $val)
global $sessionlastvalueread; global $sessionlastvalueread;
global $sessionidfound; global $sessionidfound;
/*var_dump('write '.$sess_id); //var_dump('write '.$sess_id);
var_dump($val); //var_dump($val);
var_dump('sessionlastvalueread='.$sessionlastvalueread.' sessionidfound='.$sessionidfound); //var_dump('sessionlastvalueread='.$sessionlastvalueread.' sessionidfound='.$sessionidfound);
*/
//$sessionlastvalueread=''; //$sessionlastvalueread='';
if ($sessionlastvalueread != $val) { if ($sessionlastvalueread != $val) {
@ -141,7 +140,7 @@ function dolSessionWrite($sess_id, $val)
$insert_query = "INSERT INTO ".MAIN_DB_PREFIX."session"; $insert_query = "INSERT INTO ".MAIN_DB_PREFIX."session";
$insert_query .= "(session_id, session_variable, last_accessed, fk_user, remote_ip, user_agent)"; $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)."')"; $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); $result = $dbsession->query($insert_query);
if (!$result) { if (!$result) {
dol_print_error($dbsession); dol_print_error($dbsession);

View File

@ -378,7 +378,6 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
$nbko++; $nbko++;
} }
} elseif (!empty($feature) && ($feature != 'user' && $feature != 'usergroup')) { // This is permissions on 1 level } elseif (!empty($feature) && ($feature != 'user' && $feature != 'usergroup')) { // This is permissions on 1 level
var_dump($user->rights);
if (empty($user->rights->$feature->lire) if (empty($user->rights->$feature->lire)
&& empty($user->rights->$feature->read) && empty($user->rights->$feature->read)
&& empty($user->rights->$feature->run)) { && 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 /*TODO Add link to expeditiondet_batch
if (! empty($conf->productbatch->enabled)) if (! empty($conf->productbatch->enabled))
{ {
var_dump($objp->edrowid); //var_dump($objp->edrowid);
$lines[$i]->detail_batch $lines[$i]->detail_batch
if (isset($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 '</td>';
print '</tr>'; print '</tr>';
} else { } else {
/*var_dump($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER); //var_dump($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER);
/*
$default=$langs->trans('No'); $default=$langs->trans('No');
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$langs->trans("MAIN_OPTIMIZEFORTEXTBROWSER").'</td>'; print '<td>'.$langs->trans("MAIN_OPTIMIZEFORTEXTBROWSER").'</td>';
print '<td colspan="'.($colspan-1).'">'; print '<td colspan="'.($colspan-1).'">';
if ($edit) if ($edit) {
{
print $form->selectyesno('MAIN_OPTIMIZEFORTEXTBROWSER', $conf->global->MAIN_OPTIMIZEFORTEXTBROWSER, 1); print $form->selectyesno('MAIN_OPTIMIZEFORTEXTBROWSER', $conf->global->MAIN_OPTIMIZEFORTEXTBROWSER, 1);
} } else {
else
{
print yn($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER); print yn($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER);
} }
print ' &nbsp; wspan class="opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> '; print ' &nbsp; wspan class="opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';

View File

@ -115,7 +115,9 @@ class MenuManager
$this->tabMenu = $tabMenu; $this->tabMenu = $tabMenu;
//var_dump($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 * Menu COMPTA-FINANCIAL
*/ */
if ($mainmenu == 'accountancy') { 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(); $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) 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 // Note: $submenu contains menu entry with substitution not yet done
//if ($tmpmainmenu.'-'.$tmpleftmenu == 'home-all') { var_dump($submenu); exit; } //if ($tmpmainmenu.'-'.$tmpleftmenu == 'home-all') {
//if ($tmpmainmenu=='accountancy') { var_dump($submenu->liste); exit; } //var_dump($submenu); exit;
//}
//if ($tmpmainmenu=='accountancy') {
//var_dump($submenu->liste); exit;
//}
$nexturl = dol_buildpath($submenu->liste[0]['url'], 1); $nexturl = dol_buildpath($submenu->liste[0]['url'], 1);
$canonrelurl = preg_replace('/\?.*$/', '', $relurl); $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/dict.php?mainmenu=home", $langs->trans("DictionarySetup"), 1);
$submenu->add("/admin/const.php?mainmenu=home", $langs->trans("OtherSetup"), 1); $submenu->add("/admin/const.php?mainmenu=home", $langs->trans("OtherSetup"), 1);
//if ($tmpmainmenu.'-'.$tmpleftmenu == 'home-all') { var_dump($submenu); exit; } //if ($tmpmainmenu.'-'.$tmpleftmenu == 'home-all') {
//if ($tmpmainmenu=='accountancy') { var_dump($submenu->liste); exit; } //var_dump($submenu); exit;
//}
//if ($tmpmainmenu=='accountancy') {
//var_dump($submenu->liste); exit;
//}
$nexturl = dol_buildpath($submenu->liste[0]['url'], 1); $nexturl = dol_buildpath($submenu->liste[0]['url'], 1);
$canonrelurl = preg_replace('/\?.*$/', '', $relurl); $canonrelurl = preg_replace('/\?.*$/', '', $relurl);

View File

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

View File

@ -397,11 +397,11 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
} }
/*var_dump($tab_top); //var_dump($tab_top);
var_dump($heightforinfotot); //var_dump($heightforinfotot);
var_dump($heightforfreetext); //var_dump($heightforfreetext);
var_dump($heightforfooter); //var_dump($heightforfooter);
var_dump($bottomlasttab);*/ //var_dump($bottomlasttab);
// Affiche zone infos // Affiche zone infos
$posy = $this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs); $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'; /*include_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancysystem.class.php';
$tmpchartofaccount = new AccountancySystem($this->db); $tmpchartofaccount = new AccountancySystem($this->db);
$tmpchartofaccount->fetch($conf->global->CHARTOFACCOUNTS); $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']) if ((! ($conf->global->CHARTOFACCOUNTS > 0)) || $tmpchartofaccount->ref != $arrayrecord[0]['val'])
{ {
$this->errors[$error]['lib']=$langs->trans('ErrorImportOfChartLimitedToCurrentChart', $tmpchartofaccount->ref); $this->errors[$error]['lib']=$langs->trans('ErrorImportOfChartLimitedToCurrentChart', $tmpchartofaccount->ref);

View File

@ -483,7 +483,7 @@ class ImportXlsx extends ModeleImports
/*include_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancysystem.class.php'; /*include_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancysystem.class.php';
$tmpchartofaccount = new AccountancySystem($this->db); $tmpchartofaccount = new AccountancySystem($this->db);
$tmpchartofaccount->fetch($conf->global->CHARTOFACCOUNTS); $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']) if ((! ($conf->global->CHARTOFACCOUNTS > 0)) || $tmpchartofaccount->ref != $arrayrecord[0]['val'])
{ {
$this->errors[$error]['lib']=$langs->trans('ErrorImportOfChartLimitedToCurrentChart', $tmpchartofaccount->ref); $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) foreach($object->linkedObjects as $objecttype => $objects)
{ {
var_dump($objects);exit; //var_dump($objects);exit;
if ($objecttype == 'commande') if ($objecttype == 'commande')
{ {
$outputlangs->load('orders'); $outputlangs->load('orders');

View File

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

View File

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

View File

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

View File

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

View File

@ -318,7 +318,8 @@ class ConferenceOrBoothAttendee extends CommonObject
foreach ($object->array_options as $key => $option) { foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key); $shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) { 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]); 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 $sub_qty[$j]['id_batch'] = GETPOST($batch, 'int'); // the id into llx_product_batch of stock record to move
$subtotalqty += $sub_qty[$j]['q']; $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++; $j++;
$batch = "batchl".$i."_".$j; $batch = "batchl".$i."_".$j;
@ -325,7 +328,6 @@ if (empty($reshook)) {
//var_dump($batch_line[2]); //var_dump($batch_line[2]);
if ($totalqty > 0) { // There is at least one thing to ship if ($totalqty > 0) { // There is at least one thing to ship
//var_dump($_POST);exit;
for ($i = 0; $i < $num; $i++) { for ($i = 0; $i < $num; $i++) {
$qty = "qtyl".$i; $qty = "qtyl".$i;
if (!isset($batch_line[$i])) { if (!isset($batch_line[$i])) {

View File

@ -102,7 +102,9 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) {
} }
print '<br>'; print '<br>';
$checked = ''; $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 a file was just uploaded, we check to preselect it
if (is_array($_FILES['userfile']['name'])) { if (is_array($_FILES['userfile']['name'])) {
foreach ($_FILES['userfile']['name'] as $tmpfile) { 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. $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 $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 $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($qtydelivered));
var_dump(array_keys($qtywished)); //var_dump(array_keys($qtywished));
var_dump($diff_array); //var_dump($diff_array);
var_dump($keysinwishednotindelivered); //var_dump($keysinwishednotindelivered);
var_dump($keysindeliverednotinwished); //var_dump($keysindeliverednotinwished);
exit;*/ //exit;
if (count($diff_array) == 0 && count($keysinwishednotindelivered) == 0 && count($keysindeliverednotinwished) == 0) { //No diff => mean everythings is received if (count($diff_array) == 0 && count($keysinwishednotindelivered) == 0 && count($keysindeliverednotinwished) == 0) { //No diff => mean everythings is received
if ($closeopenorder) { if ($closeopenorder) {
@ -3491,6 +3491,8 @@ class CommandeFournisseur extends CommonOrder
{ {
$this->receptions = array(); $this->receptions = array();
dol_syslog(get_class($this)."::loadReceptions", LOG_DEBUG);
$sql = 'SELECT cd.rowid, cd.fk_product,'; $sql = 'SELECT cd.rowid, cd.fk_product,';
$sql .= ' sum(cfd.qty) as qty'; $sql .= ' sum(cfd.qty) as qty';
$sql .= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch as cfd,'; $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'; $sql .= ' GROUP BY cd.rowid, cd.fk_product';
$resql = $this->db->query($sql);
dol_syslog(get_class($this)."::loadReceptions", LOG_DEBUG); if ($resql) {
$result = $this->db->query($sql); $num = $this->db->num_rows($resql);
if ($result) {
$num = $this->db->num_rows($result);
$i = 0; $i = 0;
while ($i < $num) { 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; empty($this->receptions[$obj->rowid]) ? $this->receptions[$obj->rowid] = $obj->qty : $this->receptions[$obj->rowid] += $obj->qty;
$i++; $i++;
} }

View File

@ -711,7 +711,7 @@ $formorder = new FormOrder($db);
$formother = new FormOther($db); $formother = new FormOther($db);
$formcompany = new FormCompany($db); $formcompany = new FormCompany($db);
$title = $langs->trans("ListOfSupplierOrders"); $title = $langs->trans("SuppliersOrders");
if ($socid > 0) { if ($socid > 0) {
$fourn = new Fournisseur($db); $fourn = new Fournisseur($db);
$fourn->fetch($socid); $fourn->fetch($socid);

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 $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'); $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($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(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)); //var_dump($db->idate($dateinvoice));
exit;*/ //exit;
// Replacement invoice // Replacement invoice
if (GETPOST('type') == FactureFournisseur::TYPE_REPLACEMENT) { if (GETPOST('type') == FactureFournisseur::TYPE_REPLACEMENT) {

View File

@ -485,7 +485,7 @@ while ($i < min($num, $limit)) {
// No // No
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
print '<td>'.(($offset * $limit) + $i).'</td>'; print '<td class="nowraponall">'.(($offset * $limit) + $i).'</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
@ -493,7 +493,7 @@ while ($i < min($num, $limit)) {
// Ref // Ref
if (!empty($arrayfields['p.ref']['checked'])) { if (!empty($arrayfields['p.ref']['checked'])) {
print '<td class="nowrap">'.$paymentfournstatic->getNomUrl(1).'</td>'; print '<td class="nowraponall">'.$paymentfournstatic->getNomUrl(1).'</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
@ -510,7 +510,7 @@ while ($i < min($num, $limit)) {
// Thirdparty // Thirdparty
if (!empty($arrayfields['s.nom']['checked'])) { if (!empty($arrayfields['s.nom']['checked'])) {
print '<td>'; print '<td class="tdoverflowmax125">';
if ($objp->socid > 0) { if ($objp->socid > 0) {
print $companystatic->getNomUrl(1, '', 24); print $companystatic->getNomUrl(1, '', 24);
} }
@ -539,7 +539,7 @@ while ($i < min($num, $limit)) {
// Bank account // Bank account
if (!empty($arrayfields['ba.label']['checked'])) { if (!empty($arrayfields['ba.label']['checked'])) {
print '<td>'; print '<td class="tdoverflowmax125">';
if ($objp->bid) { if ($objp->bid) {
$accountstatic->id = $objp->bid; $accountstatic->id = $objp->bid;
$accountstatic->ref = $objp->bref; $accountstatic->ref = $objp->bref;

View File

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

View File

@ -1002,7 +1002,7 @@ if ($step == 4 && $datatoimport) {
print $s; print $s;
print '</span> '; print '</span> ';
$htmlother->select_import_model($importmodelid, 'importmodelid', $datatoimport, 1, $user->id); $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 '</div>';
print '</form>'; print '</form>';
@ -1016,7 +1016,7 @@ if ($step == 4 && $datatoimport) {
//var_dump($array_match_file_to_database); //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(); $fieldsplaced = array();
$valforsourcefieldnb = array(); $valforsourcefieldnb = array();
@ -1034,7 +1034,6 @@ if ($step == 4 && $datatoimport) {
foreach ($fieldssource as $key => $val) { foreach ($fieldssource as $key => $val) {
$var = !$var; $var = !$var;
show_elem($fieldssource, $key, $val, $var); // key is field number in source file show_elem($fieldssource, $key, $val, $var); // key is field number in source file
//print '> '.$lefti.'-'.$key.'-'.$val;
$listofkeys[$key] = 1; $listofkeys[$key] = 1;
$fieldsplaced[$key] = 1; $fieldsplaced[$key] = 1;
$valforsourcefieldnb[$lefti] = $key; $valforsourcefieldnb[$lefti] = $key;
@ -1046,37 +1045,26 @@ if ($step == 4 && $datatoimport) {
} }
//var_dump($valforsourcefieldnb); //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 "</div>\n";
print "<!-- End box left container -->\n"; print "<!-- End box left container -->\n";
print '</td><td width="50%">'; print '</td><td width="50%" class="nopaddingrightimp">';
// List of target fields // List of target fields
$optionsnotused = ""; $optionsnotused = "";
$optionsall = array();
foreach ($fieldstarget as $code => $line) { foreach ($fieldstarget as $code => $line) {
$text = '<option value="'.$code.'">';
$text .= $langs->trans($line["label"]);
if ($line["required"]) {
$text .= "*";
}
$text .= '</option>';
if (!$line["imported"]) { if (!$line["imported"]) {
$text = '<option value="'.$code.'">';
$text .= $langs->trans($line["label"]);
if ($line["required"]) {
$text .= "*";
}
$text .= '</option>';
$optionsnotused .= $text; $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 $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', ... $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', ... $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 '<td class="nowraponall" style="font-weight: normal">';
print '<select id="selectorderimport_'.($i+1).'" class="targetselectchange minwidth300" name="select_'.$line["label"].'">'; print '<select id="selectorderimport_'.($i+1).'" class="targetselectchange minwidth300" name="select_'.$line["label"].'">';
if ($line["imported"]) { if ($line["imported"]) {
print '<option value="-1">&nbsp;</option>'; print '<option value="-1">&nbsp;</option>';
print '<option selected="" value="'.$code.'">';
} else { } else {
print '<option selected="" value="-1">&nbsp;</option>'; print '<option selected="" value="-1">&nbsp;</option>';
print '<option value="'.$code.'">';
} }
$more = '';
$text = $langs->trans($line["label"]); $j = 0;
if ($line["required"]) { foreach ($optionsall as $code => $val) {
print '<strong>'.$text.'*</strong>'; $label = $val['required'] ? '<strong>' : '';
} else { $label .= $val['label'];
print $text; $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 '</select>';
//print ajax_combobox('selectorderimport_'.($i+1)); //print ajax_combobox('selectorderimport_'.($i+1));
print "</td>"; print "</td>";
print '<td class="nowraponall" style="font-weight:normal; text-align:right">'; 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 // Source field info
$htmltext = '<b><u>'.$langs->trans("FieldSource").'</u></b><br>'; $htmltext = '<b><u>'.$langs->trans("FieldSource").'</u></b><br>';
if ($filecolumn > count($fieldssource)) { if ($filecolumn > count($fieldssource)) {
$htmltext .= $langs->trans("DataComeFromNoWhere").'<br>'; $htmltext .= $langs->trans("DataComeFromNoWhere").'<br>';
} else { } else {
if (empty($objimport->array_import_convertvalue[0][$code])) { // If source file does not need convertion 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>'; $htmltext .= $langs->trans("DataComeFromFileFieldNb", $filecolumntoshow).'<br>';
} else { } else {
if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') { if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') {
@ -1141,7 +1136,6 @@ if ($step == 4 && $datatoimport) {
} }
} }
// Source required // 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 = !empty($objimport->array_import_examplevalues[0][$code])?$objimport->array_import_examplevalues[0][$code]:"";
// Example // Example
if (empty($objimport->array_import_convertvalue[0][$code])) { // If source file does not need convertion 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>'; $htmltext .= '<br>';
// Target field info // Target field info
$htmltext .= '<b><u>'.$langs->trans("FieldTarget").'</u></b><br>'; $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 if (empty($objimport->array_import_convertvalue[0][$code])) { // If source file does not need convertion
$htmltext .= $langs->trans("DataIsInsertedInto").'<br>'; $htmltext .= $langs->trans("DataIsInsertedInto").'<br>';
} else { } else {
@ -1234,49 +1229,87 @@ if ($step == 4 && $datatoimport) {
print '<script type="text/javascript">'."\n"; print '<script type="text/javascript">'."\n";
print 'var previousselectedvalueimport = "0";'."\n"; print 'var previousselectedvalueimport = "0";'."\n";
print 'var previousselectedlabelimport = "0";'."\n"; print 'var previousselectedlabelimport = "0";'."\n";
print 'var arrayofselectedvalues = [];'."\n";
print '$(document).ready(function () {'."\n"; print '$(document).ready(function () {'."\n";
print 'setOptionsToDisabled();'."\n";
print 'saveSelection();'."\n";
print '$(".targetselectchange").focus(function(){'."\n"; print '$(".targetselectchange").focus(function(){'."\n";
print 'previousselectedvalueimport = $(this).val();'."\n"; print ' previousselectedvalueimport = $(this).val();'."\n";
print 'previousselectedlabelimport = $(this).children("option:selected").text();'."\n"; print ' previousselectedlabelimport = $(this).children("option:selected").text();'."\n";
print 'console.log("previousselectedvalueimport="+previousselectedvalueimport)'."\n"; print ' console.log("previousselectedvalueimport="+previousselectedvalueimport)'."\n";
print '})'."\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 '$(".targetselectchange").change(function(){'."\n";
print 'if(previousselectedlabelimport != "" && previousselectedvalueimport != -1){'."\n"; print ' setOptionsToDisabled();'."\n";
print '$(".targetselectchange").not($(this)).append(new Option(previousselectedlabelimport,previousselectedvalueimport));'."\n";
print 'let valuetochange = $(this).val(); '."\n"; print ' if(previousselectedlabelimport != "" && previousselectedvalueimport != -1) {'."\n";
print '$(".boxtdunused").each(function(){'."\n"; print ' let valuetochange = $(this).val(); '."\n";
print 'if ($(this).text().includes(valuetochange)){'."\n"; print ' $(".boxtdunused").each(function(){'."\n";
print 'arraychild = $(this)[0].childNodes'."\n"; print ' if ($(this).text().includes(valuetochange)){'."\n";
print 'arraytexttomodify = arraychild[0].textContent.split(" ")'."\n"; print ' arraychild = $(this)[0].childNodes'."\n";
print 'arraytexttomodify[1] = previousselectedvalueimport '."\n"; print ' arraytexttomodify = arraychild[0].textContent.split(" ")'."\n";
print 'textmodified = arraytexttomodify.join(" ") '."\n"; print ' arraytexttomodify[1] = previousselectedvalueimport '."\n";
print 'arraychild[0].textContent = textmodified'."\n"; print ' textmodified = arraytexttomodify.join(" ") '."\n";
print 'arraychild[1].innerHTML = previousselectedlabelimport'."\n"; print ' arraychild[0].textContent = textmodified'."\n";
print '}'."\n"; print ' arraychild[1].innerHTML = previousselectedlabelimport'."\n";
print '})'."\n"; print ' }'."\n";
print '}'."\n"; print ' })'."\n";
print 'if($( this ).val() != -1){'."\n"; print ' }'."\n";
print '$(".targetselectchange").not($( this )).find(\'option[value="\'+$( this ).val()+\'"]\').remove();'."\n"; print ' $(this).blur()'."\n";
print '}'."\n";
print '$(this).blur()'."\n"; print ' saveSelection()'."\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 '});'."\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 '})'."\n";
print '</script>'."\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="hexa" value="'.$hexa.'">';
print '<input type="hidden" name="excludefirstline" value="'.$excludefirstline.'">'; print '<input type="hidden" name="excludefirstline" value="'.$excludefirstline.'">';
print '<input type="hidden" name="endatlinenb" value="'.$endatlinenb.'">'; 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($separator).'" name="separator">';
print '<input type="hidden" value="'.dol_escape_htmltag($enclosure).'" name="enclosure">'; 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 $form->selectarray('visibility', $arrayvisibility, 'private');
print '</td>'; print '</td>';
print '<td class="right">'; 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>'; print '</td></tr>';
// List of existing import profils // 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 if (($pos && $pos > count($fieldssource)) && (!isset($fieldssource[$pos]["imported"]))) { // No fields
/*
print '<tr style="height:'.$height.'" class="trimport oddevenimport">'; print '<tr style="height:'.$height.'" class="trimport oddevenimport">';
print '<td class="nocellnopadding" width="16" style="font-weight: normal">'; 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>';
print '<td style="font-weight: normal">'; print '<td style="font-weight: normal">';
print $langs->trans("NoFields"); print $langs->trans("NoFields");
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
*/
} elseif ($key == 'none') { // Empty line } elseif ($key == 'none') { // Empty line
print '<tr style="height:'.$height.'" class="trimport oddevenimport">'; print '<tr style="height:'.$height.'" class="trimport oddevenimport">';
print '<td class="nocellnopadding" width="16" style="font-weight: normal">'; 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">'; 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 // 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("MoveField", $pos), 'grip_title', 'class="boxhandle" style="cursor:move;"');
print img_picto($langs->trans("Field").' '.$pos, 'file', 'class="pictofixedwith"');
print '</td>'; print '</td>';
if (isset($fieldssource[$pos]['imported']) && $fieldssource[$pos]['imported'] == false) { if (isset($fieldssource[$pos]['imported']) && $fieldssource[$pos]['imported'] == false) {
print '<td class="nowraponall boxtdunused" style="font-weight: normal">'; 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)) { if (!utf8_check($example)) {
$example = utf8_encode($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 '</td>';
print '</tr>'; print '</tr>';

View File

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

View File

@ -101,10 +101,10 @@ class KnowledgeRecord extends CommonObject
*/ */
public $fields=array( public $fields=array(
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'visible'=>5, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", "showoncombobox"=>1), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'visible'=>5, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", "csslist"=>"nowraponall", "showoncombobox"=>1),
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>20, 'index'=>1), 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>20, 'index'=>1),
'question' => array('type'=>'text', 'label'=>'Question', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1, 'tdcss'=>'titlefieldcreate nowraponall'), 'question' => array('type'=>'text', 'label'=>'Question', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1, 'tdcss'=>'titlefieldcreate nowraponall'),
'lang' => array('type'=>'varchar(6)', 'label'=>'Language', 'enabled'=>'1', 'position'=>40, 'notnull'=>0, 'visible'=>1, 'tdcss'=>'titlefieldcreate nowraponall'), 'lang' => array('type'=>'varchar(6)', 'label'=>'Language', 'enabled'=>'1', 'position'=>40, 'notnull'=>0, 'visible'=>1, 'tdcss'=>'titlefieldcreate nowraponall', "csslist"=>"tdoverflowmax100"),
'answer' => array('type'=>'html', 'label'=>'Solution', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>3, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1, 'tdcss'=>'titlefieldcreate nowraponall'), 'answer' => array('type'=>'html', 'label'=>'Solution', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>3, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1, 'tdcss'=>'titlefieldcreate nowraponall'),
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,), 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>2,), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>2,),
@ -284,7 +284,8 @@ class KnowledgeRecord extends CommonObject
foreach ($object->array_options as $key => $option) { foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key); $shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) { 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]); unset($object->array_options[$key]);
} }
} }

View File

@ -222,7 +222,7 @@ $now = dol_now();
//$help_url="EN:Module_KnowledgeRecord|FR:Module_KnowledgeRecord_FR|ES:Módulo_KnowledgeRecord"; //$help_url="EN:Module_KnowledgeRecord|FR:Module_KnowledgeRecord_FR|ES:Módulo_KnowledgeRecord";
$help_url = ''; $help_url = '';
$title = $langs->trans('ListKnowledgeRecord'); $title = $langs->trans('KnowledgeRecords');
$morejs = array(); $morejs = array();
$morecss = array(); $morecss = array();

View File

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

View File

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

View File

@ -260,7 +260,7 @@ $now = dol_now();
//$help_url = "EN:Module_MyObject|FR:Module_MyObject_FR|ES:Módulo_MyObject"; //$help_url = "EN:Module_MyObject|FR:Module_MyObject_FR|ES:Módulo_MyObject";
$help_url = ''; $help_url = '';
$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("MyObjects")); $title = $langs->trans("MyObjects");
$morejs = array(); $morejs = array();
$morecss = array(); $morecss = array();

View File

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

View File

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

View File

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

View File

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

View File

@ -84,9 +84,9 @@ $monthofday = GETPOST('addtimemonth');
$dayofday = GETPOST('addtimeday'); $dayofday = GETPOST('addtimeday');
$yearofday = GETPOST('addtimeyear'); $yearofday = GETPOST('addtimeyear');
/*var_dump(GETPOST('remonth')); //var_dump(GETPOST('remonth'));
var_dump(GETPOST('button_search_x')); //var_dump(GETPOST('button_search_x'));
var_dump(GETPOST('button_addtime'));*/ //var_dump(GETPOST('button_addtime'));
$daytoparse = $now; $daytoparse = $now;
if ($year && $month && $day) { 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. if (!$updateoftaskdone) { // Check to update progress if no update were done on task.
$object->fetch($taskid); $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')) { if ($object->progress != GETPOST($taskid.'progress', 'int')) {
$object->progress = GETPOST($taskid.'progress', 'int'); $object->progress = GETPOST($taskid.'progress', 'int');
$result = $object->update($user); $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. if (!$updateoftaskdone) { // Check to update progress if no update were done on task.
$object->fetch($taskid); $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')) { if ($object->progress != GETPOST($taskid.'progress', 'int')) {
$object->progress = GETPOST($taskid.'progress', 'int'); $object->progress = GETPOST($taskid.'progress', 'int');
$result = $object->update($user); $result = $object->update($user);

View File

@ -619,7 +619,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
if (!GETPOSTISSET('backtopage')) { if (!GETPOSTISSET('backtopage')) {
$url = '/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create'); $url = '/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create');
$newbutton = '<span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span>'; $newbutton = '<span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span>';
// TODO @LDR Impletment this // TODO @LDR Implement this
//$tmpbacktopagejsfields = 'socid:search_socid'; //$tmpbacktopagejsfields = 'socid:search_socid';
//print dolButtonToOpenUrlInDialogPopup('addthirdparty', $langs->transnoentitiesnoconv('AddThirdParty'), $newbutton, $url, '', '', $tmpbacktopagejsfields); //print dolButtonToOpenUrlInDialogPopup('addthirdparty', $langs->transnoentitiesnoconv('AddThirdParty'), $newbutton, $url, '', '', $tmpbacktopagejsfields);
print ' <a href="'.DOL_URL_ROOT.$url.'">'.$newbutton.'</a>'; print ' <a href="'.DOL_URL_ROOT.$url.'">'.$newbutton.'</a>';

View File

@ -288,7 +288,10 @@ if ($resql) {
print '</td>'; print '</td>';
// Date // Date
print '<td>'.dol_print_date($db->jdate($obj->datem), 'day').'</td>'; $datem = $db->jdate($obj->datem);
print '<td class="center" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'">';
print dol_print_date($datem, 'day', 'tzuserrel');
print '</td>';
// Status // Status
print '<td class="right">'.$projectstatic->LibStatut($obj->status, 3).'</td>'; print '<td class="right">'.$projectstatic->LibStatut($obj->status, 3).'</td>';

View File

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

View File

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

View File

@ -611,7 +611,8 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
$pageposafter = $pdf->getPage(); $pageposafter = $pdf->getPage();
$posyafter = $pdf->GetY(); $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 ($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 if ($i == ($nblines - 1)) { // No more lines, and no space left to show total, so we create a new page
$pdf->AddPage('', '', true); $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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
$morehtmlref .= '<input type="hidden" name="action" value="classin">'; $morehtmlref .= '<input type="hidden" name="action" value="classin">';
$morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; $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 .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
$morehtmlref .= '</form>'; $morehtmlref .= '</form>';
} else { } else {

View File

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

View File

@ -704,8 +704,14 @@ if (empty($reshook)) {
$url = DOL_URL_ROOT."/fourn/card.php?socid=".$object->id; $url = DOL_URL_ROOT."/fourn/card.php?socid=".$object->id;
} }
header("Location: ".$url); // TODO @LDR
exit; if ($dol_openinpopup && $backtopagejsfields) {
print 'TODO Set js var of parent with id, then close popup.';
exit;
} else {
header("Location: ".$url);
exit;
}
} }
} else { } else {
$db->rollback(); $db->rollback();

View File

@ -421,15 +421,15 @@ $prospectstatic->client = 2;
$prospectstatic->loadCacheOfProspStatus(); $prospectstatic->loadCacheOfProspStatus();
$title = $langs->trans("ListOfThirdParties"); $title = $langs->trans("ThirdParties");
if ($type == 'c' && (empty($search_type) || ($search_type == '1,3'))) { if ($type == 'c' && (empty($search_type) || ($search_type == '1,3'))) {
$title = $langs->trans("ListOfCustomers"); $title = $langs->trans("Customers");
} }
if ($type == 'p' && (empty($search_type) || ($search_type == '2,3'))) { if ($type == 'p' && (empty($search_type) || ($search_type == '2,3'))) {
$title = $langs->trans("ListOfProspects"); $title = $langs->trans("Prospects");
} }
if ($type == 'f' && (empty($search_type) || ($search_type == '4'))) { if ($type == 'f' && (empty($search_type) || ($search_type == '4'))) {
$title = $langs->trans("ListOfSuppliers"); $title = $langs->trans("Suppliers");
} }
// Select every potentiels, and note each potentiels which fit in search parameters // Select every potentiels, and note each potentiels which fit in search parameters
@ -1501,7 +1501,7 @@ while ($i < min($num, $limit)) {
} }
// Address // Address
if (!empty($arrayfields['s.address']['checked'])) { if (!empty($arrayfields['s.address']['checked'])) {
print '<td>'.dol_escape_htmltag($obj->address).'</td>'; print '<td class="tdoverflowmax250" title="'.dol_escape_htmltag($obj->address).'">'.dol_escape_htmltag($obj->address).'</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
@ -1708,7 +1708,7 @@ while ($i < min($num, $limit)) {
print $hookmanager->resPrint; print $hookmanager->resPrint;
// Date creation // Date creation
if (!empty($arrayfields['s.datec']['checked'])) { if (!empty($arrayfields['s.datec']['checked'])) {
print '<td class="center nowrap">'; print '<td class="center nowraponall">';
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
print '</td>'; print '</td>';
if (!$i) { if (!$i) {
@ -1717,7 +1717,7 @@ while ($i < min($num, $limit)) {
} }
// Date modification // Date modification
if (!empty($arrayfields['s.tms']['checked'])) { if (!empty($arrayfields['s.tms']['checked'])) {
print '<td class="center nowrap">'; print '<td class="center nowraponall">';
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
print '</td>'; print '</td>';
if (!$i) { if (!$i) {
@ -1726,7 +1726,7 @@ while ($i < min($num, $limit)) {
} }
// Status // Status
if (!empty($arrayfields['s.status']['checked'])) { if (!empty($arrayfields['s.status']['checked'])) {
print '<td class="center nowrap">'.$companystatic->getLibStatut(5).'</td>'; print '<td class="center nowraponall">'.$companystatic->getLibStatut(5).'</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }

View File

@ -545,7 +545,9 @@ if (empty($reshook)) {
$resql = $db->query($sql); $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) { if (!$error) {
$stripecu = $newcu; $stripecu = $newcu;

View File

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

View File

@ -741,7 +741,9 @@ if (empty($reshook)) {
$date_end $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) { if ($result < 0) {
$error++; $error++;
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');

View File

@ -448,9 +448,9 @@ if ($resql) {
if ($socid > 0) { if ($socid > 0) {
$soc = new Societe($db); $soc = new Societe($db);
$soc->fetch($socid); $soc->fetch($socid);
$title = $langs->trans('ListOfSupplierProposals').' - '.$soc->name; $title = $langs->trans('SupplierProposals').' - '.$soc->name;
} else { } else {
$title = $langs->trans('ListOfSupplierProposals'); $title = $langs->trans('SupplierProposals');
} }
$num = $db->num_rows($resql); $num = $db->num_rows($resql);

View File

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

View File

@ -969,6 +969,12 @@ textarea.centpercent {
.nopaddingright { .nopaddingright {
padding-right: 0; padding-right: 0;
} }
.nopaddingleftimp {
padding-left: 0 !important;
}
.nopaddingrightimp {
padding-right: 0 !important;
}
.paddingleft { .paddingleft {
padding-<?php print $left; ?>: 4px; padding-<?php print $left; ?>: 4px;
} }
@ -1656,7 +1662,7 @@ tr.nobottom td {
.minheight30 { min-height: 30px; } .minheight30 { min-height: 30px; }
.minheight40 { min-height: 40px; } .minheight40 { min-height: 40px; }
.titlefieldcreate { width: 20%; } .titlefieldcreate { width: 20%; }
.titlefield { /* width: 25%; */ width: 250px; } .titlefield { /* width: 25%; */ min-width: 250px; }
.titlefieldmiddle { width: 50%; } .titlefieldmiddle { width: 50%; }
.imgmaxwidth180 { max-width: 180px; } .imgmaxwidth180 { max-width: 180px; }
.imgmaxheight50 { max-height: 50px; } .imgmaxheight50 { max-height: 50px; }
@ -1858,7 +1864,7 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select
.minwidth300imp { min-width: 120px !important; } .minwidth300imp { min-width: 120px !important; }
.minwidth400imp { min-width: 150px !important; } .minwidth400imp { min-width: 150px !important; }
.minwidth500imp { min-width: 250px !important; } .minwidth500imp { min-width: 250px !important; }
.titlefield { width: auto; } .titlefield { width: auto; min-width: unset; }
.titlefieldcreate { width: auto; } .titlefieldcreate { width: auto; }
#tooltip { #tooltip {
@ -4181,7 +4187,7 @@ div.tabBar .noborder {
} }
div .tdtop { div .tdtop {
vertical-align: top !important; vertical-align: top !important;
padding-top: 5px !important; padding-top: 8px !important;
padding-bottom: 0px !important; padding-bottom: 0px !important;
} }
@ -7221,6 +7227,7 @@ div.clipboardCPValue.hidewithsize {
.titlefield { .titlefield {
width: auto !important; /* We want to ignore the 30%, try to use more if you can */ 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 { .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 */ /* 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) { foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key); $shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) { 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]); unset($object->array_options[$key]);
} }
} }

View File

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

View File

@ -333,7 +333,7 @@ $user_temp = new User($db);
$socstatic = new Societe($db); $socstatic = new Societe($db);
$help_url = ''; $help_url = '';
$title = $langs->trans('TicketList'); $title = $langs->trans('Tickets');
$morejs = array(); $morejs = array();
$morecss = array(); $morecss = array();
@ -836,7 +836,9 @@ foreach ($object->fields as $key => $val) {
$arrayofstatus[$key2] = $val2; $arrayofstatus[$key2] = $val2;
} }
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; 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; $selectedarray = null;
if (!empty($search[$key])) { if (!empty($search[$key])) {
$selectedarray = array_values($search[$key]); $selectedarray = array_values($search[$key]);

View File

@ -1707,7 +1707,7 @@ if ($action == 'create' || $action == 'adduserldap') {
print "</td></tr>\n"; print "</td></tr>\n";
// VCard // VCard
print '<tr><td class="tdtop">'.$langs->trans("VCard").'</td>'; print '<tr><td>'.$langs->trans("VCard").'</td>';
print '<td>'; print '<td>';
print '<a href="'.DOL_URL_ROOT.'/user/vcard.php?id='.$object->id.'">'; print '<a href="'.DOL_URL_ROOT.'/user/vcard.php?id='.$object->id.'">';
print img_picto($langs->trans("Download"), 'vcard.png', 'class="paddingrightonly"'); print img_picto($langs->trans("Download"), 'vcard.png', 'class="paddingrightonly"');

View File

@ -56,7 +56,7 @@ dol_syslog("Call method ".$WS_METHOD);
$result = $soapclient->call($WS_METHOD,$parameters); $result = $soapclient->call($WS_METHOD,$parameters);
if (! $result) if (! $result)
{ {
var_dump($soapclient); //var_dump($soapclient);
print '<h2>Erreur SOAP 1</h2>'.$soapclient->error_str; print '<h2>Erreur SOAP 1</h2>'.$soapclient->error_str;
exit; 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. include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit' action when submitting new file.
$backtopage = $savbacktopage; $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' 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'; $action = 'file_manager';

View File

@ -318,7 +318,8 @@ class Workstation extends CommonObject
foreach ($object->array_options as $key => $option) { foreach ($object->array_options as $key => $option) {
$shortkey = preg_replace('/options_/', '', $key); $shortkey = preg_replace('/options_/', '', $key);
if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) { 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]); 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\/.*\/doc\/(doc|pdf)_/', $file['relativename'])
|| preg_match('/modules\/(import|mailings|printing)\//', $file['relativename']) || preg_match('/modules\/(import|mailings|printing)\//', $file['relativename'])
|| in_array($file['name'], array('modules_boxes.php', 'rapport.pdf.php', 'TraceableDB.php'))) { || in_array($file['name'], array('modules_boxes.php', 'rapport.pdf.php', 'TraceableDB.php'))) {
// Check into Class files
if (! in_array($file['name'], array( if (! in_array($file['name'], array(
'api.class.php', 'api.class.php',
'commonobject.class.php', 'commonobject.class.php',
@ -224,6 +225,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase
//exit; //exit;
} }
} else { } else {
// Check into Include files
if (! in_array($file['name'], array( if (! in_array($file['name'], array(
'objectline_view.tpl.php', 'objectline_view.tpl.php',
'extrafieldsinexport.inc.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; $ok=true;
$matches=array(); $matches=array();
preg_match_all('/'.preg_quote('get_class($this)."::".__METHOD__', '/').'/', $filecontent, $matches, PREG_SET_ORDER); preg_match_all('/'.preg_quote('get_class($this)."::".__METHOD__', '/').'/', $filecontent, $matches, PREG_SET_ORDER);