Add MO in project overwiew
This commit is contained in:
parent
6555f5d74f
commit
1d760f0e42
@ -104,6 +104,7 @@ ListDonationsAssociatedProject=List of donations related to the project
|
|||||||
ListVariousPaymentsAssociatedProject=List of miscellaneous payments related to the project
|
ListVariousPaymentsAssociatedProject=List of miscellaneous payments related to the project
|
||||||
ListSalariesAssociatedProject=List of payments of salaries related to the project
|
ListSalariesAssociatedProject=List of payments of salaries related to the project
|
||||||
ListActionsAssociatedProject=List of events related to the project
|
ListActionsAssociatedProject=List of events related to the project
|
||||||
|
ListMOAssociatedProject=List of manufacturing orders related to the project
|
||||||
ListTaskTimeUserProject=List of time consumed on tasks of project
|
ListTaskTimeUserProject=List of time consumed on tasks of project
|
||||||
ListTaskTimeForTask=List of time consumed on task
|
ListTaskTimeForTask=List of time consumed on task
|
||||||
ActivityOnProjectToday=Activity on project today
|
ActivityOnProjectToday=Activity on project today
|
||||||
|
|||||||
@ -106,6 +106,7 @@ class Mo extends CommonObject
|
|||||||
'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62, 'notnull'=>-1,),
|
'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62, 'notnull'=>-1,),
|
||||||
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>500, 'notnull'=>1,),
|
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>500, 'notnull'=>1,),
|
||||||
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'position'=>501, 'notnull'=>-1,),
|
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'position'=>501, 'notnull'=>-1,),
|
||||||
|
'date_valid' => array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>2, 'position'=>502,),
|
||||||
'fk_user_creat' => array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'user.rowid',),
|
'fk_user_creat' => array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'user.rowid',),
|
||||||
'fk_user_modif' => array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'position'=>511, 'notnull'=>-1,),
|
'fk_user_modif' => array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'position'=>511, 'notnull'=>-1,),
|
||||||
'date_start_planned' => array('type'=>'datetime', 'label'=>'DateStartPlannedMo', 'enabled'=>1, 'visible'=>1, 'position'=>55, 'notnull'=>-1, 'index'=>1, 'help'=>'KeepEmptyForAsap'),
|
'date_start_planned' => array('type'=>'datetime', 'label'=>'DateStartPlannedMo', 'enabled'=>1, 'visible'=>1, 'position'=>55, 'notnull'=>-1, 'index'=>1, 'help'=>'KeepEmptyForAsap'),
|
||||||
|
|||||||
@ -700,7 +700,7 @@ class Project extends CommonObject
|
|||||||
'propal'=>'fk_projet', 'commande'=>'fk_projet', 'facture'=>'fk_projet',
|
'propal'=>'fk_projet', 'commande'=>'fk_projet', 'facture'=>'fk_projet',
|
||||||
'supplier_proposal'=>'fk_projet', 'commande_fournisseur'=>'fk_projet', 'facture_fourn'=>'fk_projet',
|
'supplier_proposal'=>'fk_projet', 'commande_fournisseur'=>'fk_projet', 'facture_fourn'=>'fk_projet',
|
||||||
'expensereport_det'=>'fk_projet', 'contrat'=>'fk_projet', 'fichinter'=>'fk_projet', 'don'=>'fk_projet',
|
'expensereport_det'=>'fk_projet', 'contrat'=>'fk_projet', 'fichinter'=>'fk_projet', 'don'=>'fk_projet',
|
||||||
'actioncomm'=>'fk_project'
|
'actioncomm'=>'fk_project', 'mo'=>'fk_project'
|
||||||
);
|
);
|
||||||
foreach ($listoftables as $key => $value)
|
foreach ($listoftables as $key => $value)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -55,6 +55,7 @@ if (!empty($conf->tax->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/socia
|
|||||||
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'));
|
||||||
@ -67,6 +68,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');
|
||||||
@ -384,6 +386,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",
|
||||||
@ -829,7 +843,7 @@ foreach ($listofreferent as $key => $value)
|
|||||||
$addform .= '<div class="inline-block valignmiddle">';
|
$addform .= '<div class="inline-block valignmiddle">';
|
||||||
if ($testnew) $addform .= '<a class="buttonxxx" href="'.$urlnew.'"><span class="valignmiddle text-plus-circle">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
if ($testnew) $addform .= '<a class="buttonxxx" href="'.$urlnew.'"><span class="valignmiddle text-plus-circle">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
||||||
elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) {
|
elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) {
|
||||||
$addform .= '<a class="buttonxxx buttonRefused" disabled="disabled" href="#"><span class="valignmiddle text-plus-circle">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
$addform .= '<a class="buttonxxx buttonRefused" disabled="disabled" href="#"><span class="valignmiddle text-plus-circle">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
||||||
}
|
}
|
||||||
$addform .= '<div>';
|
$addform .= '<div>';
|
||||||
}
|
}
|
||||||
@ -1015,10 +1029,13 @@ foreach ($listofreferent as $key => $value)
|
|||||||
elseif ($tablename == 'fichinter') $date = $element->datev; // There is no other date for this
|
elseif ($tablename == 'fichinter') $date = $element->datev; // There is no other date for this
|
||||||
elseif ($tablename == 'projet_task') $date = ''; // We show no date. Showing date of beginning of task make user think it is date of time consumed
|
elseif ($tablename == 'projet_task') $date = ''; // We show no date. Showing date of beginning of task make user think it is date of time consumed
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$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') {
|
||||||
|
|||||||
@ -55,7 +55,7 @@ $theme_bgcoloronglet = array(hexdec('DE'), hexdec('E7'), hexdec('EC'));
|
|||||||
// Colors
|
// Colors
|
||||||
$colorbackhmenu1 = '55,61,90'; // topmenu
|
$colorbackhmenu1 = '55,61,90'; // topmenu
|
||||||
$colorbackvmenu1 = '250,250,250'; // vmenu
|
$colorbackvmenu1 = '250,250,250'; // vmenu
|
||||||
$colortopbordertitle1 = '200,200,200'; // top border of title
|
$colortopbordertitle1 = '215,215,215'; // top border of title
|
||||||
$colorbacktitle1 = '233,234,237'; // title of tables,list
|
$colorbacktitle1 = '233,234,237'; // title of tables,list
|
||||||
$colorbacktabcard1 = '255,255,255'; // card
|
$colorbacktabcard1 = '255,255,255'; // card
|
||||||
$colorbacktabactive = '234,234,234';
|
$colorbacktabactive = '234,234,234';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user