Debug v17
This commit is contained in:
parent
8dc89e9a9a
commit
751f79b672
@ -2871,8 +2871,8 @@ class Adherent extends CommonObject
|
||||
* Adds it to non existing supplied categories.
|
||||
* Existing categories are left untouch.
|
||||
*
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return void
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setCategories($categories)
|
||||
{
|
||||
|
||||
@ -211,7 +211,7 @@ foreach ($dirmodels as $reldir) {
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
|
||||
if ($conf->global->CHEQUERECEIPTS_ADDON.'.php' == $file) { // If module is the one used, we show existing errors
|
||||
if (getDolGlobalString('CHEQUERECEIPTS_ADDON').'.php' == $file) { // If module is the one used, we show existing errors
|
||||
if (!empty($module->error)) {
|
||||
dol_htmloutput_mesg($module->error, '', 'error', 1);
|
||||
}
|
||||
|
||||
@ -1800,8 +1800,8 @@ class ActionComm extends CommonObject
|
||||
* Adds it to non existing supplied categories.
|
||||
* Existing categories are left untouch.
|
||||
*
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return void
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setCategories($categories)
|
||||
{
|
||||
@ -1835,7 +1835,7 @@ class ActionComm extends CommonObject
|
||||
$c->add_type($this, Categorie::TYPE_ACTIONCOMM);
|
||||
}
|
||||
}
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
|
||||
@ -1830,7 +1830,7 @@ if ($action == 'create') {
|
||||
}
|
||||
print '<tr class="field_shipping_method_id"><td class="titlefieldcreate">'.$langs->trans('SendingMethod').'</td><td class="valuefieldcreate">';
|
||||
print img_picto('', 'object_dollyrevert', 'class="pictofixedwidth"');
|
||||
print $form->selectShippingMethod($shipping_method_id, 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx');
|
||||
$form->selectShippingMethod($shipping_method_id, 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -2776,7 +2776,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
if (!empty($object->lines)) {
|
||||
$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
|
||||
$object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
|
||||
}
|
||||
|
||||
// Form to add new line
|
||||
|
||||
@ -1833,7 +1833,8 @@ if ($action == 'create' && $usercancreate) {
|
||||
// Shipping Method
|
||||
if (isModEnabled('expedition')) {
|
||||
print '<tr><td>'.$langs->trans('SendingMethod').'</td><td>';
|
||||
print img_picto('', 'object_dolly', 'class="pictofixedwidth"').$form->selectShippingMethod($shipping_method_id, 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx');
|
||||
print img_picto('', 'object_dolly', 'class="pictofixedwidth"');
|
||||
$form->selectShippingMethod($shipping_method_id, 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -2736,7 +2737,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
|
||||
// Show object lines
|
||||
if (!empty($object->lines)) {
|
||||
$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
|
||||
$object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
|
||||
}
|
||||
|
||||
$numlines = count($object->lines);
|
||||
|
||||
@ -1060,8 +1060,8 @@ class Account extends CommonObject
|
||||
* Adds it to non existing supplied categories.
|
||||
* Existing categories are left untouch.
|
||||
*
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return void
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setCategories($categories)
|
||||
{
|
||||
|
||||
@ -1635,7 +1635,7 @@ if ($action == 'create') {
|
||||
// Show object lines
|
||||
if (!empty($object->lines)) {
|
||||
$canchangeproduct = 1;
|
||||
$ret = $object->printObjectLines($action, $mysoc, $object->thirdparty, $lineid, 0); // No date selector for template invoice
|
||||
$object->printObjectLines($action, $mysoc, $object->thirdparty, $lineid, 0); // No date selector for template invoice
|
||||
}
|
||||
|
||||
// Form to add new line
|
||||
|
||||
@ -5423,7 +5423,7 @@ if ($action == 'create') {
|
||||
|
||||
// Show object lines
|
||||
if (!empty($object->lines)) {
|
||||
$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
|
||||
$object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
|
||||
}
|
||||
|
||||
// Form to add new line
|
||||
|
||||
@ -1700,8 +1700,8 @@ class Contact extends CommonObject
|
||||
* Adds it to non existing supplied categories.
|
||||
* Existing categories are left untouch.
|
||||
*
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return void
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setCategories($categories)
|
||||
{
|
||||
|
||||
@ -1701,7 +1701,7 @@ if ($action == 'create') {
|
||||
if (empty($senderissupplier)) {
|
||||
print $form->select_produits((!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0), 'idprod');
|
||||
} else {
|
||||
print $form->select_produits_fournisseurs((!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0), 'idprod');
|
||||
$form->select_produits_fournisseurs((!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0), 'idprod');
|
||||
}
|
||||
}
|
||||
print '<br>';
|
||||
|
||||
@ -9957,7 +9957,7 @@ abstract class CommonObject
|
||||
* @param int[]|int $categories Category ID or array of Categories IDs
|
||||
* @param string $type_categ Category type ('customer', 'supplier', 'website_page', ...) definied into const class Categorie type
|
||||
* @param boolean $remove_existing True: Remove existings categories from Object if not supplies by $categories, False: let them
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setCategoriesCommon($categories, $type_categ = '', $remove_existing = true)
|
||||
{
|
||||
|
||||
@ -3256,7 +3256,7 @@ class Form
|
||||
* @param string $morecss Add more CSS
|
||||
* @param int $showstockinlist Show stock information (slower).
|
||||
* @param string $placeholder Placeholder
|
||||
* @return array Array of keys for json
|
||||
* @return array|string Array of keys for json or HTML component
|
||||
*/
|
||||
public function select_produits_fournisseurs_list($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $filterkey = '', $statut = -1, $outputmode = 0, $limit = 100, $alsoproductwithnosupplierprice = 0, $morecss = '', $showstockinlist = 0, $placeholder = '')
|
||||
{
|
||||
@ -3658,14 +3658,14 @@ class Form
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
|
||||
$out .= ajax_combobox($htmlname);
|
||||
|
||||
if (empty($outputmode)) {
|
||||
return $out;
|
||||
}
|
||||
return $outarray;
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
if (empty($outputmode)) {
|
||||
return $out;
|
||||
}
|
||||
return $outarray;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
|
||||
@ -53,7 +53,7 @@ top_httphead();
|
||||
-->
|
||||
<?php
|
||||
//$arrayofjs=array('js/common.js');
|
||||
//echo top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers
|
||||
//top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
@ -723,7 +723,11 @@ function restrictedArea(User $user, $features, $object = 0, $tableandshare = '',
|
||||
if ($mode) {
|
||||
return $ok ? 1 : 0;
|
||||
} else {
|
||||
return $ok ? 1 : accessforbidden('', 1, 1, 0, $params);
|
||||
if ($ok) {
|
||||
return 1;
|
||||
} else {
|
||||
accessforbidden('', 1, 1, 0, $params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -98,7 +98,7 @@ if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$disablenofollow = 0;
|
||||
}
|
||||
|
||||
print top_htmlhead('', $titleofloginpage, 0, 0, $arrayofjs, array(), 1, $disablenofollow);
|
||||
top_htmlhead('', $titleofloginpage, 0, 0, $arrayofjs, array(), 1, $disablenofollow);
|
||||
|
||||
|
||||
$colorbackhmenu1 = '60,70,100'; // topmenu
|
||||
|
||||
@ -214,7 +214,7 @@ if ($nolinesbefore) {
|
||||
echo ' ';
|
||||
}
|
||||
}
|
||||
echo $form->select_type_of_lines(GETPOSTISSET("type") ? GETPOST("type", 'alpha', 2) : -1, 'type', 1, 1, $forceall);
|
||||
$form->select_type_of_lines(GETPOSTISSET("type") ? GETPOST("type", 'alpha', 2) : -1, 'type', 1, 1, $forceall);
|
||||
echo '</span>';
|
||||
}
|
||||
// Predefined product/service
|
||||
|
||||
@ -120,7 +120,7 @@ $coldisplay++;
|
||||
print '<input type="hidden" id="product_id" name="productid" value="'.(!empty($line->fk_product) ? $line->fk_product : 0).'">';
|
||||
} else {
|
||||
if ($senderissupplier) {
|
||||
print $form->select_produits_fournisseurs(!empty($line->fk_product) ? $line->fk_product : 0, 'productid');
|
||||
$form->select_produits_fournisseurs(!empty($line->fk_product) ? $line->fk_product : 0, 'productid');
|
||||
} else {
|
||||
print $form->select_produits(!empty($line->fk_product) ? $line->fk_product : 0, 'productid');
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$disablenofollow = 0;
|
||||
}
|
||||
|
||||
print top_htmlhead('', $titleofpage, 0, 0, $arrayofjs, array(), 1, $disablenofollow);
|
||||
top_htmlhead('', $titleofpage, 0, 0, $arrayofjs, array(), 1, $disablenofollow);
|
||||
|
||||
|
||||
$colorbackhmenu1 = '60,70,100'; // topmenu
|
||||
@ -253,7 +253,7 @@ if ($mode == 'dolibarr' || !$disabled) {
|
||||
|
||||
<?php if (!empty($message)) { ?>
|
||||
<div class="center login_main_message">
|
||||
<?php echo dol_htmloutput_mesg($message, '', '', 1); ?>
|
||||
<?php dol_htmloutput_mesg($message, '', '', 1); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$disablenofollow = 0;
|
||||
}
|
||||
|
||||
print top_htmlhead('', $titleofpage, 0, 0, $arrayofjs, array(), 1, $disablenofollow);
|
||||
top_htmlhead('', $titleofpage, 0, 0, $arrayofjs, array(), 1, $disablenofollow);
|
||||
|
||||
|
||||
$colorbackhmenu1 = '60,70,100'; // topmenu
|
||||
@ -292,7 +292,7 @@ if ($mode == 'dolibarr' || !$disabled) {
|
||||
|
||||
<?php if (!empty($message)) { ?>
|
||||
<div class="center login_main_message">
|
||||
<?php echo dol_htmloutput_mesg($message, '', '', 1); ?>
|
||||
<?php dol_htmloutput_mesg($message, '', '', 1); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -329,7 +329,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')";
|
||||
}
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans('Discounts').'</td><td colspan="3">';
|
||||
print '<tr><td class="titlefield">'.$langs->trans('Discounts').'</td><td colspan="2">';
|
||||
|
||||
$absolute_discount = $soc->getAvailableDiscounts('', $filterabsolutediscount);
|
||||
$absolute_creditnote = $soc->getAvailableDiscounts('', $filtercreditnote);
|
||||
@ -393,7 +393,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editavailability&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetAvailability'), 1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
print '</td><td colspan="2">';
|
||||
if ($action == 'editavailability') {
|
||||
$form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'availability_id', 1);
|
||||
} else {
|
||||
@ -450,7 +450,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdemandreason&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetDemandReason'), 1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
print '</td><td colspan="2">';
|
||||
if ($action == 'editdemandreason') {
|
||||
$form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'demand_reason_id', 1);
|
||||
} else {
|
||||
@ -500,11 +500,11 @@ if ($id > 0 || !empty($ref)) {
|
||||
$totalVolume = $tmparray['volume'];
|
||||
if ($totalWeight || $totalVolume) {
|
||||
print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>';
|
||||
print '<td>';
|
||||
print '<td colspan="2">';
|
||||
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no');
|
||||
print '</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
|
||||
print '<td>';
|
||||
print '<td colspan="2">';
|
||||
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no');
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -524,7 +524,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
}
|
||||
print '</td></tr></table>';
|
||||
print '</td>';
|
||||
print '<td colspan="3">';
|
||||
print '<td colspan="2">';
|
||||
if ($action != 'editincoterm') {
|
||||
print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1);
|
||||
} else {
|
||||
|
||||
@ -2415,7 +2415,7 @@ if ($action == 'create') {
|
||||
|
||||
// Show object lines
|
||||
if (!empty($object->lines)) {
|
||||
$ret = $object->printObjectLines($action, $societe, $mysoc, $lineid, 1);
|
||||
$object->printObjectLines($action, $societe, $mysoc, $lineid, 1);
|
||||
}
|
||||
|
||||
$num = count($object->lines);
|
||||
|
||||
@ -3628,7 +3628,7 @@ if ($action == 'create') {
|
||||
|
||||
// Show object lines
|
||||
if (!empty($object->lines)) {
|
||||
$ret = $object->printObjectLines($action, $societe, $mysoc, $lineid, 1);
|
||||
$object->printObjectLines($action, $societe, $mysoc, $lineid, 1);
|
||||
}
|
||||
|
||||
$num = count($object->lines);
|
||||
|
||||
@ -1058,8 +1058,8 @@ class KnowledgeRecord extends CommonObject
|
||||
* Adds it to non existing supplied categories.
|
||||
* Existing categories are left untouch.
|
||||
*
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return void
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setCategories($categories)
|
||||
{
|
||||
|
||||
@ -6111,8 +6111,8 @@ class Product extends CommonObject
|
||||
* Adds it to non existing supplied categories.
|
||||
* Existing categories are left untouch.
|
||||
*
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return void
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setCategories($categories)
|
||||
{
|
||||
|
||||
@ -895,8 +895,8 @@ class Entrepot extends CommonObject
|
||||
* Adds it to non existing supplied categories.
|
||||
* Existing categories are left untouch.
|
||||
*
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return void
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setCategories($categories)
|
||||
{
|
||||
|
||||
@ -2289,8 +2289,8 @@ class Project extends CommonObject
|
||||
* Adds it to non existing supplied categories.
|
||||
* Existing categories are left untouch.
|
||||
*
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return void
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setCategories($categories)
|
||||
{
|
||||
|
||||
@ -4886,7 +4886,7 @@ class Societe extends CommonObject
|
||||
* Existing categories are left untouch.
|
||||
*
|
||||
* @param int[]|int $categories Category ID or array of Categories IDs
|
||||
* @param string $type_categ Category type ('customer' or 'supplier')
|
||||
* @param string $type_categ Category type ('customer' or 'supplier')
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setCategories($categories, $type_categ)
|
||||
|
||||
@ -1322,7 +1322,8 @@ if ($action == 'create') {
|
||||
// Shipping Method
|
||||
if (isModEnabled("expedition")) {
|
||||
print '<tr><td>'.$langs->trans('SendingMethod').'</td><td colspan="2">';
|
||||
print $form->selectShippingMethod(GETPOST('shipping_method_id') > 0 ? GETPOST('shipping_method_id', 'int') : "", 'shipping_method_id', '', 1);
|
||||
print img_picto('', 'object_dollyrevert', 'class="pictofixedwidth"');
|
||||
$form->selectShippingMethod(GETPOST('shipping_method_id') > 0 ? GETPOST('shipping_method_id', 'int') : "", 'shipping_method_id', '', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -1902,7 +1903,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
if (!empty($object->lines)) {
|
||||
$ret = $object->printObjectLines($action, $soc, $mysoc, $lineid, $dateSelector);
|
||||
$object->printObjectLines($action, $soc, $mysoc, $lineid, $dateSelector);
|
||||
}
|
||||
|
||||
// Form to add new line
|
||||
|
||||
@ -2318,8 +2318,8 @@ class Ticket extends CommonObject
|
||||
* Adds it to non existing supplied categories.
|
||||
* Existing categories are left untouch.
|
||||
*
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return void
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setCategories($categories)
|
||||
{
|
||||
|
||||
@ -1390,8 +1390,8 @@ class User extends CommonObject
|
||||
* Adds it to non existing supplied categories.
|
||||
* Existing categories are left untouch.
|
||||
*
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return void
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setCategories($categories)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user