Fix minor bugs
This commit is contained in:
parent
2dcc578b88
commit
46a0f3dab0
@ -457,6 +457,7 @@ if ($id > 0)
|
|||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||||
|
$langs->load("categories");
|
||||||
print '<tr><td>' . $langs->trans("CustomersCategoriesShort") . '</td>';
|
print '<tr><td>' . $langs->trans("CustomersCategoriesShort") . '</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print $form->showCategories( $object->id, 'customer', 1 );
|
print $form->showCategories( $object->id, 'customer', 1 );
|
||||||
|
|||||||
@ -163,7 +163,7 @@ function societe_prepare_head(Societe $object)
|
|||||||
if(!empty($object->note_private)) $nbNote++;
|
if(!empty($object->note_private)) $nbNote++;
|
||||||
if(!empty($object->note_public)) $nbNote++;
|
if(!empty($object->note_public)) $nbNote++;
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/societe/note.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/societe/note.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Note");
|
$head[$h][1] = $langs->trans("Notes");
|
||||||
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
|
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
|
||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
$h++;
|
$h++;
|
||||||
|
|||||||
@ -718,8 +718,8 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
|
|||||||
{
|
{
|
||||||
$limittitle=30;
|
$limittitle=30;
|
||||||
$out.='<a class="tabTitle">';
|
$out.='<a class="tabTitle">';
|
||||||
if ($picto) $out.=img_picto('',($pictoisfullpath?'':'object_').$picto,'',$pictoisfullpath).' ';
|
if ($picto) $out.=img_picto($title,($pictoisfullpath?'':'object_').$picto,'',$pictoisfullpath).' ';
|
||||||
$out.=dol_trunc($title,$limittitle);
|
//$out.='<span class="tabTitleText">'.dol_trunc($title,$limittitle).'</span>';
|
||||||
$out.='</a>';
|
$out.='</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -276,17 +276,19 @@ if ($type_element == 'contract')
|
|||||||
$thirdTypeSelect='customer';
|
$thirdTypeSelect='customer';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = $sql_select;
|
if ($sql_select)
|
||||||
$sql.= ' d.description as description,';
|
{
|
||||||
if ($type_element != 'fichinter' && $type_element != 'contract') $sql.= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_start, d.date_end, d.qty, d.qty as prod_qty,';
|
$sql = $sql_select;
|
||||||
if ($type_element == 'contract') $sql.= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_ouverture as date_start, d.date_cloture as date_end, d.qty, d.qty as prod_qty,';
|
$sql.= ' d.description as description,';
|
||||||
if ($type_element != 'fichinter') $sql.= ' p.ref as ref, p.rowid as prod_id, p.rowid as fk_product, p.fk_product_type as prod_type, p.fk_product_type as fk_product_type, p.entity as pentity,';
|
if ($type_element != 'fichinter' && $type_element != 'contract') $sql.= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_start, d.date_end, d.qty, d.qty as prod_qty,';
|
||||||
$sql.= " s.rowid as socid ";
|
if ($type_element == 'contract') $sql.= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_ouverture as date_start, d.date_cloture as date_end, d.qty, d.qty as prod_qty,';
|
||||||
if ($type_element != 'fichinter') $sql.= ", p.ref as prod_ref, p.label as product_label";
|
if ($type_element != 'fichinter') $sql.= ' p.ref as ref, p.rowid as prod_id, p.rowid as fk_product, p.fk_product_type as prod_type, p.fk_product_type as fk_product_type, p.entity as pentity,';
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".$tables_from;
|
$sql.= " s.rowid as socid ";
|
||||||
if ($type_element != 'fichinter') $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON d.fk_product = p.rowid ';
|
if ($type_element != 'fichinter') $sql.= ", p.ref as prod_ref, p.label as product_label";
|
||||||
$sql.= $where;
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".$tables_from;
|
||||||
if ($month > 0) {
|
if ($type_element != 'fichinter') $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON d.fk_product = p.rowid ';
|
||||||
|
$sql.= $where;
|
||||||
|
if ($month > 0) {
|
||||||
if ($year > 0) {
|
if ($year > 0) {
|
||||||
$start = dol_mktime(0, 0, 0, $month, 1, $year);
|
$start = dol_mktime(0, 0, 0, $month, 1, $year);
|
||||||
$end = dol_time_plus_duree($start,1,'m') - 1;
|
$end = dol_time_plus_duree($start,1,'m') - 1;
|
||||||
@ -294,26 +296,27 @@ if ($month > 0) {
|
|||||||
} else {
|
} else {
|
||||||
$sql.= " AND date_format(".$dateprint.", '%m') = '".sprintf('%02d',$month)."'";
|
$sql.= " AND date_format(".$dateprint.", '%m') = '".sprintf('%02d',$month)."'";
|
||||||
}
|
}
|
||||||
} else if ($year > 0) {
|
} else if ($year > 0) {
|
||||||
$start = dol_mktime(0, 0, 0, 1, 1, $year);
|
$start = dol_mktime(0, 0, 0, 1, 1, $year);
|
||||||
$end = dol_time_plus_duree($start,1,'y') - 1;
|
$end = dol_time_plus_duree($start,1,'y') - 1;
|
||||||
$sql.= " AND ".$dateprint." BETWEEN '".$db->idate($start)."' AND '".$db->idate($end)."'";
|
$sql.= " AND ".$dateprint." BETWEEN '".$db->idate($start)."' AND '".$db->idate($end)."'";
|
||||||
}
|
}
|
||||||
if ($sref) $sql.= " AND ".$doc_number." LIKE '%".$db->escape($sref)."%'";
|
if ($sref) $sql.= " AND ".$doc_number." LIKE '%".$db->escape($sref)."%'";
|
||||||
if ($sprod_fulldescr)
|
if ($sprod_fulldescr)
|
||||||
{
|
{
|
||||||
$sql.= " AND (d.description LIKE '%".$db->escape($sprod_fulldescr)."%'";
|
$sql.= " AND (d.description LIKE '%".$db->escape($sprod_fulldescr)."%'";
|
||||||
if (GETPOST('type_element') != 'fichinter') $sql.= " OR p.ref LIKE '%".$db->escape($sprod_fulldescr)."%'";
|
if (GETPOST('type_element') != 'fichinter') $sql.= " OR p.ref LIKE '%".$db->escape($sprod_fulldescr)."%'";
|
||||||
if (GETPOST('type_element') != 'fichinter') $sql.= " OR p.label LIKE '%".$db->escape($sprod_fulldescr)."%'";
|
if (GETPOST('type_element') != 'fichinter') $sql.= " OR p.label LIKE '%".$db->escape($sprod_fulldescr)."%'";
|
||||||
$sql.=")";
|
$sql.=")";
|
||||||
|
}
|
||||||
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
|
|
||||||
|
$resql=$db->query($sql);
|
||||||
|
$totalnboflines = $db->num_rows($resql);
|
||||||
|
|
||||||
|
$sql.= $db->plimit($limit + 1, $offset);
|
||||||
|
//print $sql;
|
||||||
}
|
}
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
|
||||||
$totalnboflines = $db->num_rows($resql);
|
|
||||||
|
|
||||||
$sql.= $db->plimit($limit + 1, $offset);
|
|
||||||
//print $sql;
|
|
||||||
|
|
||||||
// Define type of elements
|
// Define type of elements
|
||||||
$typeElementString = $form->selectarray("type_element", $elementTypeArray, GETPOST('type_element'), 2);
|
$typeElementString = $form->selectarray("type_element", $elementTypeArray, GETPOST('type_element'), 2);
|
||||||
|
|||||||
@ -162,11 +162,6 @@ if ($result > 0)
|
|||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
// Alias names (commercial, trademark or alias names)
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">';
|
|
||||||
print $object->name_alias;
|
|
||||||
print "</td></tr>";
|
|
||||||
|
|
||||||
// Prefix
|
// Prefix
|
||||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||||
{
|
{
|
||||||
@ -258,7 +253,7 @@ if ($result > 0)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr '.$bc[$var].'><td colspan="4">';
|
print '<tr '.$bc[$var].'><td colspan="4" class="opacitymedium">';
|
||||||
print $langs->trans("YouMustCreateContactFirst");
|
print $langs->trans("YouMustCreateContactFirst");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -158,11 +158,6 @@ print '<div class="fichecenter">';
|
|||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
// Alias names (commercial, trademark or alias names)
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">';
|
|
||||||
print $object->name_alias;
|
|
||||||
print "</td></tr>";
|
|
||||||
|
|
||||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||||
{
|
{
|
||||||
print '<tr><td>' . $langs->trans('Prefix') . '</td><td colspan="3">' . $object->prefix_comm . '</td></tr>';
|
print '<tr><td>' . $langs->trans('Prefix') . '</td><td colspan="3">' . $object->prefix_comm . '</td></tr>';
|
||||||
|
|||||||
@ -307,7 +307,7 @@ span.timesheetalreadyrecorded input {
|
|||||||
select.flat, form.flat select {
|
select.flat, form.flat select {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
.optiongrey {
|
.optiongrey, .opacitymedium {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
.opacityhigh {
|
.opacityhigh {
|
||||||
@ -588,6 +588,13 @@ div.myavailability {
|
|||||||
.titlefield { width: 25%; }
|
.titlefield { width: 25%; }
|
||||||
.titlefieldcreate { width: 20%; }
|
.titlefieldcreate { width: 20%; }
|
||||||
|
|
||||||
|
/* Force values for small screen */
|
||||||
|
@media only screen and (max-width: 1400px)
|
||||||
|
{
|
||||||
|
.titlefield { width: 30% !important; }
|
||||||
|
.titlefieldcreate { width: 30% !important; }
|
||||||
|
}
|
||||||
|
|
||||||
/* Force values for small screen */
|
/* Force values for small screen */
|
||||||
@media only screen and (max-width: 570px)
|
@media only screen and (max-width: 570px)
|
||||||
{
|
{
|
||||||
@ -1779,7 +1786,7 @@ a.tabTitle {
|
|||||||
|
|
||||||
a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||||
font-family: <?php print $fontlist ?>;
|
font-family: <?php print $fontlist ?>;
|
||||||
padding: 7px 12px 7px;
|
padding: 7px 9px 7px;
|
||||||
margin: 0em 0.2em;
|
margin: 0em 0.2em;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|||||||
@ -306,7 +306,7 @@ select.flat, form.flat select {
|
|||||||
input:disabled {
|
input:disabled {
|
||||||
background:#f4f4f4;
|
background:#f4f4f4;
|
||||||
}
|
}
|
||||||
.optiongrey {
|
.optiongrey, .opacitymedium {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
.opacityhigh {
|
.opacityhigh {
|
||||||
@ -587,6 +587,13 @@ div.myavailability {
|
|||||||
.titlefield { width: 30%; }
|
.titlefield { width: 30%; }
|
||||||
.titlefieldcreate { width: 20%; }
|
.titlefieldcreate { width: 20%; }
|
||||||
|
|
||||||
|
/* Force values for small screen */
|
||||||
|
@media only screen and (max-width: 1400px)
|
||||||
|
{
|
||||||
|
.titlefield { width: 30% !important; }
|
||||||
|
.titlefieldcreate { width: 30% !important; }
|
||||||
|
}
|
||||||
|
|
||||||
/* Force values for small screen */
|
/* Force values for small screen */
|
||||||
@media only screen and (max-width: 570px)
|
@media only screen and (max-width: 570px)
|
||||||
{
|
{
|
||||||
@ -1788,7 +1795,7 @@ a.tabTitle {
|
|||||||
|
|
||||||
a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||||
font-family: <?php print $fontlist ?>;
|
font-family: <?php print $fontlist ?>;
|
||||||
padding: 7px 12px 7px;
|
padding: 7px 9px 7px;
|
||||||
margin: 0em 0.2em;
|
margin: 0em 0.2em;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user