Debug v14

This commit is contained in:
Laurent Destailleur 2021-06-26 00:08:19 +02:00
parent c7b03da7e6
commit 6e3647af2c
5 changed files with 13 additions and 14 deletions

View File

@ -193,11 +193,11 @@ if (empty($reshook)) {
$action = "create"; $action = "create";
$error++; $error++;
} }
if ($nb_gen_max === '') { /*if ($nb_gen_max === '') {
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("MaxPeriodNumber")), null, 'errors'); setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("MaxPeriodNumber")), null, 'errors');
$action = "create"; $action = "create";
$error++; $error++;
} }*/
} }
if (!$error) { if (!$error) {
@ -964,7 +964,7 @@ if ($action == 'create') {
// Title // Title
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Title").'</td><td>'; print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Title").'</td><td>';
print '<input class="flat quatrevingtpercent" type="text" name="title" value="'.dol_escape_htmltag(GETPOST("titre", 'alphanohtml')).'">'; print '<input class="flat quatrevingtpercent" type="text" name="title" value="'.dol_escape_htmltag(GETPOST("title", 'alphanohtml')).'">';
print '</td></tr>'; print '</td></tr>';
// Third party // Third party

View File

@ -3061,7 +3061,7 @@ if ($action == 'create') {
} else { } else {
print '<tr><td class="fieldrequired">'.$langs->trans('Customer').'</td>'; print '<tr><td class="fieldrequired">'.$langs->trans('Customer').'</td>';
print '<td colspan="2">'; print '<td colspan="2">';
print img_picto('', 'company').$form->select_company($soc->id, 'socid', '((s.client = 1 OR s.client = 3) AND s.status=1)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); print img_picto('', 'company').$form->select_company($soc->id, 'socid', '((s.client = 1 OR s.client = 3) AND s.status=1)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 widthcentpercentminusxx maxwidth500');
// Option to reload page to retrieve customer informations. // Option to reload page to retrieve customer informations.
if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) { if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) {
print '<script type="text/javascript"> print '<script type="text/javascript">
@ -3782,7 +3782,6 @@ if ($action == 'create') {
// Button "Create Draft" // Button "Create Draft"
print '<div class="center">'; print '<div class="center">';
print '<input type="submit" class="button" name="bouton" value="'.$langs->trans('CreateDraft').'">'; print '<input type="submit" class="button" name="bouton" value="'.$langs->trans('CreateDraft').'">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="button" class="button button-cancel" value="'.$langs->trans("Cancel").'" onClick="javascript:history.go(-1)">'; print '<input type="button" class="button button-cancel" value="'.$langs->trans("Cancel").'" onClick="javascript:history.go(-1)">';
print '</div>'; print '</div>';

View File

@ -495,14 +495,14 @@ if ($user->rights->societe->client->voir || $socid) {
$langs->load("commercial"); $langs->load("commercial");
$moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative'); $tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250'); $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'widthcentpercentminusx maxwidth300');
$moreforfilter .= '</div>'; $moreforfilter .= '</div>';
} }
// If the user can view other users // If the user can view other users
if ($user->rights->user->user->lire) { if ($user->rights->user->user->lire) {
$moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('LinkedToSpecificUsers'); $tmptitle = $langs->trans('LinkedToSpecificUsers');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250'); $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'widthcentpercentminusx maxwidth300');
$moreforfilter .= '</div>'; $moreforfilter .= '</div>';
} }
// If the user can view categories of products // If the user can view categories of products
@ -511,7 +511,7 @@ if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($use
$moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('IncludingProductWithTag'); $tmptitle = $langs->trans('IncludingProductWithTag');
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'widthcentpercentminusx maxwidth300', 1);
$moreforfilter .= '</div>'; $moreforfilter .= '</div>';
} }

View File

@ -847,7 +847,7 @@ class FormFile
} }
// Show file name with link to download // Show file name with link to download
$out .= '<td class="minwidth200">'; $out .= '<td class="minwidth200 tdoverflowmax300">';
$out .= '<a class="documentdownload paddingright" href="'.$documenturl.'?modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).($param ? '&'.$param : '').'"'; $out .= '<a class="documentdownload paddingright" href="'.$documenturl.'?modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).($param ? '&'.$param : '').'"';
$mime = dol_mimetype($relativepath, '', 0); $mime = dol_mimetype($relativepath, '', 0);
@ -870,7 +870,7 @@ class FormFile
$out .= '<td class="nowrap right">'.dol_print_date($date, 'dayhour', 'tzuser').'</td>'; $out .= '<td class="nowrap right">'.dol_print_date($date, 'dayhour', 'tzuser').'</td>';
// Show share link // Show share link
$out .= '<td class="nowrap">'; $out .= '<td class="nowraponall">';
if (!empty($file['share'])) { if (!empty($file['share'])) {
// Define $urlwithroot // Define $urlwithroot
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
@ -890,7 +890,7 @@ class FormFile
$fulllink = $urlwithroot.'/document.php'.($paramlink ? '?'.$paramlink : ''); $fulllink = $urlwithroot.'/document.php'.($paramlink ? '?'.$paramlink : '');
$out .= img_picto($langs->trans("FileSharedViaALink"), 'globe').' '; $out .= img_picto($langs->trans("FileSharedViaALink"), 'globe').' ';
$out .= '<input type="text" class="quatrevingtpercent width75" id="downloadlink'.$file['rowid'].'" name="downloadexternallink" title="'.dol_escape_htmltag($langs->trans("FileSharedViaALink")).'" value="'.dol_escape_htmltag($fulllink).'">'; $out .= '<input type="text" class="quatrevingtpercentminusx width75" id="downloadlink'.$file['rowid'].'" name="downloadexternallink" title="'.dol_escape_htmltag($langs->trans("FileSharedViaALink")).'" value="'.dol_escape_htmltag($fulllink).'">';
$out .= ajax_autoselect('downloadlink'.$file['rowid']); $out .= ajax_autoselect('downloadlink'.$file['rowid']);
} else { } else {
//print '<span class="opacitymedium">'.$langs->trans("FileNotShared").'</span>'; //print '<span class="opacitymedium">'.$langs->trans("FileNotShared").'</span>';

View File

@ -432,15 +432,15 @@ if ($nolinesbefore) {
<select id="fournprice_predef" name="fournprice_predef" class="flat minwidth75imp maxwidth150" style="display: none;"></select> <select id="fournprice_predef" name="fournprice_predef" class="flat minwidth75imp maxwidth150" style="display: none;"></select>
<?php } ?> <?php } ?>
<!-- For free product --> <!-- For free product -->
<input type="text" id="buying_price" name="buying_price" class="flat maxwidth75 maxwidth150 right" value="<?php echo (GETPOSTISSET("buying_price") ? GETPOST("buying_price", 'alpha', 2) : ''); ?>"> <input type="text" id="buying_price" name="buying_price" class="flat maxwidth75 right" value="<?php echo (GETPOSTISSET("buying_price") ? GETPOST("buying_price", 'alpha', 2) : ''); ?>">
</td> </td>
<?php <?php
if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { if (!empty($conf->global->DISPLAY_MARGIN_RATES)) {
echo '<td class="nobottom nowrap margininfos right"><input class="flat right" type="text" size="2" id="np_marginRate" name="np_marginRate" value="'.(GETPOSTISSET("np_marginRate") ? GETPOST("np_marginRate", 'alpha', 2) : '').'"><span class="np_marginRate hideonsmartphone">%</span></td>'; echo '<td class="nobottom nowraponall margininfos right"><input class="flat right" type="text" size="2" id="np_marginRate" name="np_marginRate" value="'.(GETPOSTISSET("np_marginRate") ? GETPOST("np_marginRate", 'alpha', 2) : '').'"><span class="np_marginRate hideonsmartphone">%</span></td>';
$coldisplay++; $coldisplay++;
} }
if (!empty($conf->global->DISPLAY_MARK_RATES)) { if (!empty($conf->global->DISPLAY_MARK_RATES)) {
echo '<td class="nobottom nowrap margininfos right"><input class="flat right" type="text" size="2" id="np_markRate" name="np_markRate" value="'.(GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : '').'"><span class="np_markRate hideonsmartphone">%</span></td>'; echo '<td class="nobottom nowraponall margininfos right"><input class="flat right" type="text" size="2" id="np_markRate" name="np_markRate" value="'.(GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : '').'"><span class="np_markRate hideonsmartphone">%</span></td>';
$coldisplay++; $coldisplay++;
} }
} }