mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug v13
This commit is contained in:
parent
bd9158ec50
commit
ed8a0093ff
|
|
@ -738,19 +738,17 @@ class BOM extends CommonObject
|
|||
public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
|
||||
{
|
||||
global $db, $conf, $langs, $hookmanager;
|
||||
global $dolibarr_main_authentication, $dolibarr_main_demo;
|
||||
global $menumanager;
|
||||
|
||||
if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips
|
||||
|
||||
$result = '';
|
||||
|
||||
$label = img_picto('', $this->picto).' <u>'.$langs->trans("BillOfMaterials").'</u>';
|
||||
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("BillOfMaterials").'</u>';
|
||||
if (isset($this->status)) {
|
||||
$label .= ' '.$this->getLibStatut(5);
|
||||
}
|
||||
$label .= '<br>';
|
||||
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
if (isset($this->status)) {
|
||||
$label .= '<br><b>'.$langs->trans("Status").":</b> ".$this->getLibStatut(5);
|
||||
}
|
||||
|
||||
$url = dol_buildpath('/bom/bom_card.php', 1).'?id='.$this->id;
|
||||
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||
$facturestatic->total_tva = $obj->total_tva;
|
||||
$facturestatic->total_ttc = $obj->total_ttc;
|
||||
$facturestatic->ref_client = $obj->ref_client;
|
||||
$facturestatic->statut =
|
||||
|
||||
$companystatic->id = $obj->socid;
|
||||
$companystatic->name = $obj->name;
|
||||
|
|
@ -600,7 +601,7 @@ if (!empty($conf->don->enabled) && $user->rights->don->lire)
|
|||
$langs->load("boxes");
|
||||
$donationstatic = new Don($db);
|
||||
|
||||
$sql = "SELECT d.rowid, d.lastname, d.firstname, d.societe, d.datedon as date, d.tms as dm, d.amount, d.fk_statut";
|
||||
$sql = "SELECT d.rowid, d.lastname, d.firstname, d.societe, d.datedon as date, d.tms as dm, d.amount, d.fk_statut as status";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."don as d";
|
||||
$sql .= " WHERE d.entity IN (".getEntity('donation').")";
|
||||
// Add where from hooks
|
||||
|
|
@ -648,6 +649,9 @@ if (!empty($conf->don->enabled) && $user->rights->don->lire)
|
|||
$donationstatic->ref = $objp->rowid;
|
||||
$donationstatic->lastname = $objp->lastname;
|
||||
$donationstatic->firstname = $objp->firstname;
|
||||
$donationstatic->date = $objp->date;
|
||||
$donationstatic->statut = $objp->status;
|
||||
$donationstatic->status = $objp->status;
|
||||
|
||||
$label = $donationstatic->getFullName($langs);
|
||||
if ($objp->societe) $label .= ($label ? ' - ' : '').$objp->societe;
|
||||
|
|
@ -657,7 +661,7 @@ if (!empty($conf->don->enabled) && $user->rights->don->lire)
|
|||
print '<td>'.$label.'</td>';
|
||||
print '<td class="nowrap right">'.price($objp->amount).'</td>';
|
||||
print '<td class="right">'.dol_print_date($db->jdate($objp->dm), 'day').'</td>';
|
||||
print '<td>'.$donationstatic->LibStatut($objp->fk_statut, 3).'</td>';
|
||||
print '<td>'.$donationstatic->getLibStatut(3).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$i++;
|
||||
|
|
@ -737,6 +741,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||
$chargestatic->ref = $obj->rowid;
|
||||
$chargestatic->label = $obj->label;
|
||||
$chargestatic->paye = $obj->paye;
|
||||
$chargestatic->status = $obj->paye;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowraponall">'.$chargestatic->getNomUrl(1).'</td>';
|
||||
|
|
@ -860,6 +865,7 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user
|
|||
|
||||
$commandestatic->id = $obj->rowid;
|
||||
$commandestatic->ref = $obj->ref;
|
||||
$commandestatic->statut = $obj->fk_statut;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap">';
|
||||
|
|
|
|||
|
|
@ -538,10 +538,12 @@ class ChargeSociales extends CommonObject
|
|||
if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1';
|
||||
}
|
||||
|
||||
|
||||
if (empty($this->ref)) $this->ref = $this->label;
|
||||
|
||||
$label = '<u>'.$langs->trans("SocialContribution").'</u>';
|
||||
$label = img_picto('', 'tax').'<u class="paddingrightonly">'.$langs->trans("SocialContribution").'</u>';
|
||||
if (isset($this->paye)) {
|
||||
$label .= ' '.$this->getLibStatut(5);
|
||||
}
|
||||
if (!empty($this->ref))
|
||||
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
if (!empty($this->label))
|
||||
|
|
|
|||
|
|
@ -1335,7 +1335,8 @@ class Contact extends CommonObject
|
|||
$label .= '</div><div style="clear: both;"></div>';
|
||||
}
|
||||
|
||||
$label .= img_picto('', $this->picto).' <u>'.$langs->trans("Contact").'</u>';
|
||||
$label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Contact").'</u>';
|
||||
$label .= ' '.$this->getLibStatut(4);
|
||||
$label .= '<br><b>'.$langs->trans("Name").':</b> '.$this->getFullName($langs);
|
||||
//if ($this->civility_id) $label.= '<br><b>' . $langs->trans("Civility") . ':</b> '.$this->civility_id; // TODO Translate cibilty_id code
|
||||
if (!empty($this->poste)) $label .= '<br><b>'.$langs->trans("Poste").':</b> '.$this->poste;
|
||||
|
|
|
|||
|
|
@ -891,7 +891,7 @@ while ($i < min($num, $limit))
|
|||
if (!empty($arrayfields['p.lastname']['checked']))
|
||||
{
|
||||
print '<td class="middle tdoverflowmax200">';
|
||||
print $contactstatic->getNomUrl(1, '', 0);
|
||||
print $contactstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,8 +152,8 @@ class Don extends CommonObject
|
|||
/**
|
||||
* Returns the donation status label (draft, valid, abandoned, paid)
|
||||
*
|
||||
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long
|
||||
* @return string Libelle
|
||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
|
||||
* @return string Label of status
|
||||
*/
|
||||
public function getLibStatut($mode = 0)
|
||||
{
|
||||
|
|
@ -164,9 +164,9 @@ class Don extends CommonObject
|
|||
/**
|
||||
* Return the label of a given status
|
||||
*
|
||||
* @param int $status Id statut
|
||||
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
||||
* @return string Libelle du statut
|
||||
* @param int $status Id statut
|
||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
|
||||
* @return string Label of status
|
||||
*/
|
||||
public function LibStatut($status, $mode = 0)
|
||||
{
|
||||
|
|
@ -922,7 +922,10 @@ class Don extends CommonObject
|
|||
if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips
|
||||
|
||||
$result = '';
|
||||
$label = img_picto('', $this->picto).' <u>'.$langs->trans("Donation").'</u>';
|
||||
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Donation").'</u>';
|
||||
if (isset($this->status)) {
|
||||
$label .= ' '.$this->getLibStatut(5);
|
||||
}
|
||||
if (!empty($this->id)) {
|
||||
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->id;
|
||||
$label .= '<br><b>'.$langs->trans('Date').':</b> '.dol_print_date($this->date, 'day');
|
||||
|
|
|
|||
|
|
@ -294,6 +294,7 @@ if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire)
|
|||
$expensereportstatic->id = $obj->rowid;
|
||||
$expensereportstatic->ref = $obj->ref;
|
||||
$expensereportstatic->statut = $obj->status;
|
||||
$expensereportstatic->status = $obj->status;
|
||||
|
||||
$userstatic->id = $obj->uid;
|
||||
$userstatic->lastname = $obj->lastname;
|
||||
|
|
|
|||
|
|
@ -987,12 +987,12 @@ class Mo extends CommonObject
|
|||
|
||||
$result = '';
|
||||
|
||||
$label = img_picto('', $this->picto).' <u>'.$langs->trans("ManufacturingOrder").'</u>';
|
||||
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("ManufacturingOrder").'</u>';
|
||||
if (isset($this->status)) {
|
||||
$label .= ' '.$this->getLibStatut(5);
|
||||
}
|
||||
$label .= '<br>';
|
||||
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
if (isset($this->status)) {
|
||||
$label .= '<br><b>'.$langs->trans("Status").":</b> ".$this->getLibStatut(5);
|
||||
}
|
||||
|
||||
$url = dol_buildpath('/mrp/mo_card.php', 1).'?id='.$this->id;
|
||||
if ($option == 'production') $url = dol_buildpath('/mrp/mo_production.php', 1).'?id='.$this->id;
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ $langs->loadLangs(array("mrp", "other"));
|
|||
|
||||
// Get parameters
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'mocard'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ class FormProduct
|
|||
/**
|
||||
* Return list of warehouses
|
||||
*
|
||||
* @param string|int $selected Id of preselected warehouse ('' for no value, 'ifone'=select value if one value otherwise no value)
|
||||
* @param string|int $selected Id of preselected warehouse ('' or '-1' for no value, 'ifone'=select value if one value otherwise no value, '-2' to use the default value from setup)
|
||||
* @param string $htmlname Name of html select html
|
||||
* @param string $filterstatus warehouse status filter, following comma separated filter options can be used
|
||||
* 'warehouseopen' = select products from open warehouses,
|
||||
|
|
@ -250,10 +250,10 @@ class FormProduct
|
|||
|
||||
if (strpos($htmlname, 'search_') !== 0) {
|
||||
if (empty($user->fk_warehouse) || $user->fk_warehouse == -1) {
|
||||
if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE;
|
||||
if (($selected == '-2' || $selected == 'ifone') && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE;
|
||||
}
|
||||
else {
|
||||
if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse;
|
||||
if (($selected == '-2' || $selected == 'ifone') && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ if ($action == 'create')
|
|||
|
||||
// Parent entrepot
|
||||
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
|
||||
print $formproduct->selectWarehouses('ifone', 'fk_parent', '', 1);
|
||||
print img_picto('', 'stock').$formproduct->selectWarehouses((GETPOSTISSET('fk_parent') ? GETPOST('fk_parent', 'int') : 'ifone'), 'fk_parent', '', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Description
|
||||
|
|
@ -690,7 +690,7 @@ if ($action == 'create')
|
|||
// Ref
|
||||
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td><input name="libelle" size="20" value="'.$object->label.'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("LocationSummary").'</td><td><input name="lieu" size="40" value="'.$object->lieu.'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("LocationSummary").'</td><td><input name="lieu" class="minwidth300" value="'.$object->lieu.'"></td></tr>';
|
||||
|
||||
// Parent entrepot
|
||||
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
|
||||
|
|
|
|||
|
|
@ -707,14 +707,14 @@ class Entrepot extends CommonObject
|
|||
|
||||
$result = '';
|
||||
|
||||
$label = img_picto('', $this->picto).' <u>'.$langs->trans("Warehouse").'</u>';
|
||||
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Warehouse").'</u>';
|
||||
if (isset($this->statut)) {
|
||||
$label .= ' '.$this->getLibStatut(5);
|
||||
}
|
||||
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.(empty($this->ref) ? (empty($this->label) ? $this->libelle : $this->label) : $this->ref);
|
||||
if (!empty($this->lieu)) {
|
||||
$label .= '<br><b>'.$langs->trans('LocationSummary').':</b> '.$this->lieu;
|
||||
}
|
||||
if (isset($this->statut)) {
|
||||
$label .= '<br><b>'.$langs->trans("Status").":</b> ".$this->getLibStatut(5);
|
||||
}
|
||||
|
||||
$url = DOL_URL_ROOT.'/product/stock/card.php?id='.$this->id;
|
||||
|
||||
|
|
|
|||
|
|
@ -530,7 +530,6 @@ if ($num)
|
|||
$warehouse->{$key} = $obj->{$key};
|
||||
}
|
||||
|
||||
|
||||
// Show here line of result
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ print ' <span class="clearbothonsmartphone marginleftonly paddingleftonly margin
|
|||
$form->select_produits($productid, 'productid', '', 0, 0, -1, 2, '', 0, array(), 0, '1', 0, 'maxwidth300');
|
||||
|
||||
print ' <span class="clearbothonsmartphone marginleftonly paddingleftonly marginrightonly paddinrightonly"> </span> '.$langs->trans('Warehouse').'</span> ';
|
||||
print $formproduct->selectWarehouses($fk_warehouse, 'fk_warehouse', '', 1);
|
||||
print $formproduct->selectWarehouses((GETPOSTISSET('fk_warehouse') ? $fk_warehouse : 'ifone'), 'fk_warehouse', '', 1);
|
||||
print '</div>';
|
||||
|
||||
$parameters = array();
|
||||
|
|
|
|||
|
|
@ -713,14 +713,14 @@ class RecruitmentCandidature extends CommonObject
|
|||
|
||||
$result = '';
|
||||
|
||||
$label = img_picto('', $this->picto).' <u>'.$langs->trans("RecruitmentCandidature").'</u>';
|
||||
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("RecruitmentCandidature").'</u>';
|
||||
if (isset($this->status)) {
|
||||
$label .= ' '.$this->getLibStatut(5);
|
||||
}
|
||||
$label .= '<br>';
|
||||
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
$label .= '<br><b>'.$langs->trans('Email').':</b> '.$this->email;
|
||||
$label .= '<br><b>'.$langs->trans('Name').':</b> '.$this->getFullName($langs);
|
||||
if (isset($this->status)) {
|
||||
$label .= '<br><b>'.$langs->trans("Status").":</b> ".$this->getLibStatut(5);
|
||||
}
|
||||
|
||||
$url = dol_buildpath('/recruitment/recruitmentcandidature_card.php', 1).'?id='.$this->id;
|
||||
|
||||
|
|
|
|||
|
|
@ -816,13 +816,13 @@ class RecruitmentJobPosition extends CommonObject
|
|||
|
||||
$result = '';
|
||||
|
||||
$label = img_picto('', $this->picto).' <u>'.$langs->trans("PositionToBeFilled").'</u>';
|
||||
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("PositionToBeFilled").'</u>';
|
||||
if (isset($this->status)) {
|
||||
$label .= ' '.$this->getLibStatut(5);
|
||||
}
|
||||
$label .= '<br>';
|
||||
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
$label .= '<br><b>'.$langs->trans('Label').':</b> '.$this->label;
|
||||
if (isset($this->status)) {
|
||||
$label .= '<br><b>'.$langs->trans("Status").":</b> ".$this->getLibStatut(5);
|
||||
}
|
||||
|
||||
$url = dol_buildpath('/recruitment/recruitmentjobposition_card.php', 1).'?id='.$this->id;
|
||||
|
||||
|
|
|
|||
|
|
@ -1272,11 +1272,11 @@ table[summary="list_of_modules"] .fa-cog {
|
|||
.minwidth500imp { min-width: 250px !important; }
|
||||
}
|
||||
|
||||
.widthcentpercentminusx {
|
||||
width: calc(100% - 50px) !important;
|
||||
select.widthcentpercentminusx, input.widthcentpercentminusx {
|
||||
width: calc(100% - 52px) !important;
|
||||
display: inline-block;
|
||||
}
|
||||
.widthcentpercentminusxx {
|
||||
select.widthcentpercentminusxx, input.widthcentpercentminusxx {
|
||||
width: calc(100% - 70px) !important;
|
||||
display: inline-block;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -690,12 +690,6 @@ llxHeader('', $langs->trans("UserCard"));
|
|||
|
||||
if ($action == 'create' || $action == 'adduserldap')
|
||||
{
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Affichage fiche en mode creation */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
print load_fiche_titre($langs->trans("NewUser"), '', 'user');
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("CreateInternalUserDesc")."</span><br>\n";
|
||||
|
|
@ -704,11 +698,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
|||
|
||||
if (!empty($conf->ldap->enabled) && (isset($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr'))
|
||||
{
|
||||
/*
|
||||
* Affiche formulaire d'ajout d'un compte depuis LDAP
|
||||
* si on est en synchro LDAP vers Dolibarr
|
||||
*/
|
||||
|
||||
// Show form to add an account from LDAP if sync LDAP -> Dolibarr is set
|
||||
$ldap = new Ldap();
|
||||
$result = $ldap->connect_bind();
|
||||
if ($result >= 0)
|
||||
|
|
@ -1272,12 +1262,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
|||
|
||||
print "</form>";
|
||||
} else {
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* View and edition */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
// View and edit mode
|
||||
if ($id > 0)
|
||||
{
|
||||
$object->fetch($id, '', '', 1);
|
||||
|
|
@ -1576,10 +1561,12 @@ if ($action == 'create' || $action == 'adduserldap')
|
|||
if (!empty($conf->stock->enabled) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
||||
$warehousestatic = new Entrepot($db);
|
||||
$warehousestatic->fetch($object->fk_warehouse);
|
||||
print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>';
|
||||
print $warehousestatic->getNomUrl(1);
|
||||
if ($object->fk_warehouse > 0) {
|
||||
$warehousestatic = new Entrepot($db);
|
||||
$warehousestatic->fetch($object->fk_warehouse);
|
||||
print $warehousestatic->getNomUrl(1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user