Skip to content

Commit

Permalink
Fix Debug and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 20, 2016
1 parent 8356dd1 commit 10f2d7c
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 38 deletions.
14 changes: 7 additions & 7 deletions htdocs/categories/viewcat.php
Expand Up @@ -297,7 +297,7 @@
}
else
{
print "<tr ".$bc[false].'><td colspan="3">'.$langs->trans("NoSubCat")."</td></tr>";
print "<tr ".$bc[false].'><td colspan="3" class="opacitymedium">'.$langs->trans("NoSubCat")."</td></tr>";
}
print "</table>\n";
}
Expand Down Expand Up @@ -371,7 +371,7 @@
}
else
{
print "<tr ".$bc[false].'><td colspan="2">'.$langs->trans("ThisCategoryHasNoProduct")."</td></tr>";
print "<tr ".$bc[false].'><td colspan="2" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoProduct")."</td></tr>";
}
print "</table>\n";
}
Expand Down Expand Up @@ -422,7 +422,7 @@
}
else
{
print "<tr ".$bc[false]."><td>".$langs->trans("ThisCategoryHasNoSupplier")."</td></tr>";
print '<tr '.$bc[false].'><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoSupplier").'</td></tr>';
}
print "</table>\n";
}
Expand Down Expand Up @@ -475,7 +475,7 @@
}
else
{
print "<tr ".$bc[false]."><td>".$langs->trans("ThisCategoryHasNoCustomer")."</td></tr>";
print '<tr '.$bc[false].'><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoCustomer").'</td></tr>';
}
print "</table>\n";
}
Expand Down Expand Up @@ -529,7 +529,7 @@
}
else
{
print "<tr ".$bc[false].'><td colspan="3">'.$langs->trans("ThisCategoryHasNoMember")."</td></tr>";
print '<tr '.$bc[false].'><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoMember").'</td></tr>';
}
print "</table>\n";
}
Expand Down Expand Up @@ -582,7 +582,7 @@
}
else
{
print "<tr ".$bc[false]."><td>".$langs->trans("ThisCategoryHasNoContact")."</td></tr>";
print '<tr '.$bc[false].'><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoContact").'</td></tr>';
}
print "</table>\n";
}
Expand Down Expand Up @@ -636,7 +636,7 @@
}
else
{
print "<tr ".$bc[false].'><td colspan="3">'.$langs->trans("ThisCategoryHasNoAccount")."</td></tr>";
print '<tr '.$bc[false].'><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoAccount").'</td></tr>';
}
print "</table>\n";
}
Expand Down
5 changes: 5 additions & 0 deletions htdocs/core/ajax/selectsearchbox.php
Expand Up @@ -111,10 +111,15 @@
{
$arrayresult['searchintointervention']=array('text'=>img_picto('','object_intervention').' '.$langs->trans("SearchIntoInterventions", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fichinter/list.php?sall='.urlencode($search_boxvalue));
}
// HR
if (! empty($conf->expensereport->enabled) && empty($conf->global->MAIN_SEARCHFORM_EXPENSEREPORT_DISABLED) && $user->rights->expensereport->lire)
{
$arrayresult['searchintoexpensereport']=array('text'=>img_picto('','object_trip').' '.$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expensereport/list.php?sall='.urlencode($search_boxvalue));
}
if (! empty($conf->holiday->enabled) && empty($conf->global->MAIN_SEARCHFORM_HOLIDAY_DISABLED) && $user->rights->holiday->read)
{
$arrayresult['searchintoleaves']=array('text'=>img_picto('','object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?sall='.urlencode($search_boxvalue));
}


/* Do we really need this. We already have a select for users, and we should be able to filter into user list on employee flag
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/menus/standard/eldy.lib.php
Expand Up @@ -1155,8 +1155,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire);
$newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire);

if ($conf->supplier_order->enabled) $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire);
$newmenu->add("/product/stock/massstockmove.php", $langs->trans("MassStockTransferShort"), 1, $user->rights->stock->mouvement->creer);
if ($conf->supplier_order->enabled) $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire);
}

// Expeditions
Expand Down
4 changes: 3 additions & 1 deletion htdocs/holiday/list.php
Expand Up @@ -85,6 +85,8 @@
$fieldstosearchall = array(
'cp.rowid'=>'Ref',
'cp.description'=>'Description',
'uu.lastname'=>'EmployeeLastname',
'uu.firstname'=>'EmployeeFirstname'
);


Expand Down Expand Up @@ -428,7 +430,7 @@
if($holiday_payes == '2')
{
print '<tr>';
print '<td colspan="10" '.$bc[false].'">'.$langs->trans('None').'</td>';
print '<td colspan="10" class="opacitymedium">'.$langs->trans('NoRecordFound').'</td>';
print '</tr>';
}

Expand Down
2 changes: 2 additions & 0 deletions htdocs/langs/en_US/holiday.lang
Expand Up @@ -76,6 +76,8 @@ BoxTitleLastLeaveRequests=Latest %s modified leave requests
HolidaysMonthlyUpdate=Monthly update
ManualUpdate=Manual update
HolidaysCancelation=Leave request cancelation
EmployeeLastname=Employee lastname
EmployeeFirstname=Employee firstname

## Configuration du Module ##
LastUpdateCP=Latest automatic update of leaves allocation
Expand Down
3 changes: 2 additions & 1 deletion htdocs/langs/en_US/main.lang
Expand Up @@ -751,5 +751,6 @@ SearchIntoCustomerProposals=Customer proposals
SearchIntoSupplierProposals=Supplier proposals
SearchIntoInterventions=Interventions
SearchIntoContracts=Contracts
SearchIntoExpenseReports=Expense reports
SearchIntoCustomerShipments=Customer shipments
SearchIntoExpenseReports=Expense reports
SearchIntoLeaves=Leaves
8 changes: 4 additions & 4 deletions htdocs/product/stats/card.php
Expand Up @@ -146,23 +146,23 @@
// Choice of type of product
if (! empty($conf->dol_use_jmobile)) print "\n".'<div class="fichecenter"><div class="nowrap">'."\n";

if ((string) $type != '0') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).'&type=0">';
if ((string) $type != '0') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).'&type=0'.($mode?'&mode='.$mode:'').'">';
else print img_picto('','tick').' ';
print $langs->trans("Products");
if ((string) $type != '0') print '</a>';

if (! empty($conf->dol_use_jmobile)) print '</div>'."\n".'<div class="nowrap">'."\n";
else print ' &nbsp; / &nbsp; ';

if ((string) $type != '1') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).'&type=1">';
if ((string) $type != '1') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).'&type=1'.($mode?'&mode='.$mode:'').'">';
else print img_picto('','tick').' ';
print $langs->trans("Services");
if ((string) $type != '1') print '</a>';

if (! empty($conf->dol_use_jmobile)) print '</div>'."\n".'<div class="nowrap">'."\n";
else print ' &nbsp; / &nbsp; ';

if ((string) $type == '0' || (string) $type == '1') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).'">';
if ((string) $type == '0' || (string) $type == '1') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).($mode?'&mode='.$mode:'').'">';
else print img_picto('','tick').' ';
print $langs->trans("ProductsAndServices");
if ((string) $type == '0' || (string) $type == '1') print '</a>';
Expand All @@ -172,7 +172,7 @@
print '<br>';
}

// Choice of stats
// Choice of stats mode (byunit or bynumber)
if (! empty($conf->dol_use_jmobile)) print "\n".'<div class="fichecenter"><div class="nowrap">'."\n";

if ($mode == 'bynumber') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).($type != '' ? '&type='.$type:'').'&mode=byunit">';
Expand Down
25 changes: 14 additions & 11 deletions htdocs/projet/contact.php
Expand Up @@ -196,17 +196,20 @@
print dol_print_date($object->date_end,'day');
print '</td></tr>';

// Opportunity status
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
if ($code) print $langs->trans("OppStatus".$code);
print '</td></tr>';

// Opportunity Amount
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
print '</td></tr>';

if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
{
// Opportunity status
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
if ($code) print $langs->trans("OppStatus".$code);
print '</td></tr>';

// Opportunity Amount
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
print '</td></tr>';
}

// Budget
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
Expand Down
23 changes: 13 additions & 10 deletions htdocs/projet/element.php
Expand Up @@ -157,16 +157,19 @@
print dol_print_date($object->date_end,'day');
print '</td></tr>';

// Opportunity status
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
if ($code) print $langs->trans("OppStatus".$code);
print '</td></tr>';

// Opportunity Amount
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
print '</td></tr>';
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
{
// Opportunity status
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
if ($code) print $langs->trans("OppStatus".$code);
print '</td></tr>';

// Opportunity Amount
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
print '</td></tr>';
}

// Budget
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
Expand Down
8 changes: 6 additions & 2 deletions htdocs/projet/ganttview.php
Expand Up @@ -142,7 +142,11 @@
print dol_print_date($object->date_end,'day');
print '</td></tr>';


// Budget
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
print '</td></tr>';

print '</table>';

print '</div>';
Expand Down Expand Up @@ -263,7 +267,7 @@
}
else
{
print $langs->trans("NoTasks");
print '<div class="opacitymedium">'.$langs->trans("NoTasks").'</div>';
}


Expand Down
5 changes: 5 additions & 0 deletions htdocs/projet/note.php
Expand Up @@ -122,6 +122,11 @@
print dol_print_date($object->date_end,'day');
print '</td></tr>';

// Budget
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
print '</td></tr>';

print "</table>";

print '<br>';
Expand Down
7 changes: 6 additions & 1 deletion htdocs/projet/tasks.php
Expand Up @@ -248,6 +248,11 @@
print dol_print_date($object->date_end,'day');
print '</td></tr>';

// Budget
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
print '</td></tr>';

// Other options
$parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
Expand Down Expand Up @@ -444,7 +449,7 @@
}
else
{
print '<tr '.$bc[false].'><td colspan="9">'.$langs->trans("NoTasks").'</td></tr>';
print '<tr '.$bc[false].'><td colspan="9" class="opacitymedium">'.$langs->trans("NoTasks").'</td></tr>';
}
print "</table>";

Expand Down

0 comments on commit 10f2d7c

Please sign in to comment.