Fix wrong merge (new MRP things was missing)
This commit is contained in:
parent
a155409bc2
commit
05e76ba122
@ -56,6 +56,7 @@ if (! empty($conf->tax->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/soci
|
|||||||
if (!empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
|
if (!empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
|
||||||
if (!empty($conf->salaries->enabled)) require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php';
|
if (!empty($conf->salaries->enabled)) require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php';
|
||||||
if (!empty($conf->categorie->enabled)) require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
if (!empty($conf->categorie->enabled)) require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
|
if (!empty($conf->mrp->enabled)) require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('projects', 'companies', 'suppliers', 'compta'));
|
$langs->loadLangs(array('projects', 'companies', 'suppliers', 'compta'));
|
||||||
@ -68,6 +69,7 @@ if (! empty($conf->expensereport->enabled)) $langs->load("trips");
|
|||||||
if (!empty($conf->don->enabled)) $langs->load("donations");
|
if (!empty($conf->don->enabled)) $langs->load("donations");
|
||||||
if (!empty($conf->loan->enabled)) $langs->load("loan");
|
if (!empty($conf->loan->enabled)) $langs->load("loan");
|
||||||
if (!empty($conf->salaries->enabled)) $langs->load("salaries");
|
if (!empty($conf->salaries->enabled)) $langs->load("salaries");
|
||||||
|
if (!empty($conf->mrp->enabled)) $langs->load("mrp");
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
@ -250,7 +252,7 @@ print '</td></tr>';
|
|||||||
// Categories
|
// Categories
|
||||||
if ($conf->categorie->enabled) {
|
if ($conf->categorie->enabled) {
|
||||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||||
print $form->showCategories($object->id, 'project', 1);
|
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,6 +387,18 @@ $listofreferent = array(
|
|||||||
'buttonnew'=>'CreateShipment',
|
'buttonnew'=>'CreateShipment',
|
||||||
'testnew'=>0,
|
'testnew'=>0,
|
||||||
'test'=>$conf->expedition->enabled && $user->rights->expedition->lire),
|
'test'=>$conf->expedition->enabled && $user->rights->expedition->lire),
|
||||||
|
'mrp'=>array(
|
||||||
|
'name'=>"MO",
|
||||||
|
'title'=>"ListMOAssociatedProject",
|
||||||
|
'class'=>'Mo',
|
||||||
|
'table'=>'mrp_mo',
|
||||||
|
'datefieldname'=>'date_valid',
|
||||||
|
'urlnew'=>DOL_URL_ROOT.'/mrp/mo_card.php?action=create&origin=project&originid='.$id.'&socid='.$socid,
|
||||||
|
'lang'=>'mrp',
|
||||||
|
'buttonnew'=>'CreateMO',
|
||||||
|
'testnew'=>'$user->rights->mrp->write',
|
||||||
|
'project_field'=>'fk_project',
|
||||||
|
'test'=>$conf->mrp->enabled && $user->rights->mrp->read),
|
||||||
'trip'=>array(
|
'trip'=>array(
|
||||||
'name'=>"TripsAndExpenses",
|
'name'=>"TripsAndExpenses",
|
||||||
'title'=>"ListExpenseReportsAssociatedProject",
|
'title'=>"ListExpenseReportsAssociatedProject",
|
||||||
@ -607,7 +621,7 @@ foreach ($listofreferent as $key => $value)
|
|||||||
|
|
||||||
$elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee, !empty($project_field)?$project_field:'fk_projet');
|
$elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee, !empty($project_field)?$project_field:'fk_projet');
|
||||||
|
|
||||||
if (count($elementarray)>0 && is_array($elementarray))
|
if (is_array($elementarray) && count($elementarray) > 0)
|
||||||
{
|
{
|
||||||
$total_ht = 0;
|
$total_ht = 0;
|
||||||
$total_ttc = 0;
|
$total_ttc = 0;
|
||||||
@ -762,7 +776,6 @@ print "</table>";
|
|||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// TODO: FOR TESTING
|
|
||||||
$param = 'id='.$object->id.'&mainmenu=home';
|
$param = 'id='.$object->id.'&mainmenu=home';
|
||||||
$sortfield = GETPOST("sortfield", "alpha");
|
$sortfield = GETPOST("sortfield", "alpha");
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
@ -1026,6 +1039,9 @@ foreach ($listofreferent as $key => $value)
|
|||||||
$date = $element->date; // invoice, ...
|
$date = $element->date; // invoice, ...
|
||||||
if (empty($date)) $date = $element->date_contrat;
|
if (empty($date)) $date = $element->date_contrat;
|
||||||
if (empty($date)) $date = $element->datev;
|
if (empty($date)) $date = $element->datev;
|
||||||
|
if (empty($date) && !empty($datefieldname)) {
|
||||||
|
$date = $element->$datefieldname;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($key == 'loan')
|
elseif ($key == 'loan')
|
||||||
@ -1268,7 +1284,6 @@ foreach ($listofreferent as $key => $value)
|
|||||||
|
|
||||||
if($sortfield == "user")
|
if($sortfield == "user")
|
||||||
{
|
{
|
||||||
|
|
||||||
if($sortorder == "asc")
|
if($sortorder == "asc")
|
||||||
{
|
{
|
||||||
usort($sortable_table, "sort_by_user_asc");
|
usort($sortable_table, "sort_by_user_asc");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user