restore original rules to be mergeable without errors
This commit is contained in:
parent
a1f0245c79
commit
635306c084
@ -186,7 +186,7 @@
|
|||||||
<!-- Check indent are done with spaces and with correct number -->
|
<!-- Check indent are done with spaces and with correct number -->
|
||||||
<!-- Disabled as this does not support tab -->
|
<!-- Disabled as this does not support tab -->
|
||||||
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
||||||
|
<!-- TODO Enable this
|
||||||
<arg name="tab-width" value="4"/>
|
<arg name="tab-width" value="4"/>
|
||||||
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
||||||
<properties>
|
<properties>
|
||||||
@ -194,7 +194,7 @@
|
|||||||
<property name="tabIndent" value="true"/>
|
<property name="tabIndent" value="true"/>
|
||||||
</properties>
|
</properties>
|
||||||
</rule>
|
</rule>
|
||||||
|
-->
|
||||||
|
|
||||||
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
|
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
|
||||||
|
|
||||||
|
|||||||
@ -164,19 +164,20 @@ if ($id > 0)
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->contrat->creer)
|
if ($user->rights->contrat->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
if ($action == 'classify') {
|
}
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
if ($action == 'classify') {
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<input type="hidden" name="action" value="classin">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
$morehtmlref.='<input type="hidden" name="action" value="classin">';
|
||||||
$morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
$morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
||||||
$morehtmlref.='</form>';
|
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||||
} else {
|
$morehtmlref.='</form>';
|
||||||
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1);
|
} else {
|
||||||
}
|
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (! empty($object->fk_project)) {
|
if (! empty($object->fk_project)) {
|
||||||
$proj = new Project($db);
|
$proj = new Project($db);
|
||||||
|
|||||||
@ -331,9 +331,8 @@ if (empty($reshook))
|
|||||||
|
|
||||||
// Extrafields
|
// Extrafields
|
||||||
$array_options = array();
|
$array_options = array();
|
||||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) // For avoid conflicts if
|
// For avoid conflicts if trigger used
|
||||||
// trigger used
|
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) {
|
||||||
{
|
|
||||||
$lines[$i]->fetch_optionals($lines[$i]->rowid);
|
$lines[$i]->fetch_optionals($lines[$i]->rowid);
|
||||||
$array_options = $lines[$i]->array_options;
|
$array_options = $lines[$i]->array_options;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -705,17 +705,18 @@ while ($i < min($num, $limit))
|
|||||||
// Status
|
// Status
|
||||||
if (! empty($arrayfields['status']['checked']))
|
if (! empty($arrayfields['status']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
if ($obj->cstatut == 0) // If contract is draft, we say line is also draft
|
if ($obj->cstatut == 0)
|
||||||
{
|
{
|
||||||
print $contractstatic->LibStatut(0, 5);
|
// If contract is draft, we say line is also draft
|
||||||
}
|
print $contractstatic->LibStatut(0, 5);
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
print $staticcontratligne->LibStatut($obj->statut, 5, ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < $now)?1:0);
|
{
|
||||||
}
|
print $staticcontratligne->LibStatut($obj->statut, 5, ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < $now)?1:0);
|
||||||
print '</td>';
|
}
|
||||||
if (! $i) $totalarray['nbfield']++;
|
print '</td>';
|
||||||
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="nowrap center">';
|
print '<td class="nowrap center">';
|
||||||
|
|||||||
@ -23,11 +23,9 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
global $user;
|
global $user;
|
||||||
global $noMoreLinkedObjectBlockAfter;
|
global $noMoreLinkedObjectBlockAfter;
|
||||||
@ -45,28 +43,29 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
|
|
||||||
$trclass='oddeven';
|
$trclass='oddeven';
|
||||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo $trclass; ?>">
|
<tr class="<?php echo $trclass; ?>">
|
||||||
<td><?php echo $langs->trans("Contract"); ?></td>
|
<td><?php echo $langs->trans("Contract"); ?></td>
|
||||||
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class="center"><?php echo dol_print_date($objectlink->date_contrat, 'day'); ?></td>
|
<td class="center"><?php echo dol_print_date($objectlink->date_contrat, 'day'); ?></td>
|
||||||
<td class="right"><?php
|
<td class="right"><?php
|
||||||
// Price of contract is not shown by default because a contract is a list of service with
|
// Price of contract is not shown by default because a contract is a list of service with
|
||||||
// start and end date that change with time andd that may be different that the period of reference for price.
|
// start and end date that change with time andd that may be different that the period of reference for price.
|
||||||
// So price of a contract does often means nothing. Prices is on the different invoices done on same contract.
|
// So price of a contract does often means nothing. Prices is on the different invoices done on same contract.
|
||||||
if ($user->rights->contrat->lire && empty($conf->global->CONTRACT_SHOW_TOTAL_OF_PRODUCT_AS_PRICE))
|
if ($user->rights->contrat->lire && empty($conf->global->CONTRACT_SHOW_TOTAL_OF_PRODUCT_AS_PRICE))
|
||||||
{
|
{
|
||||||
$totalcontrat = 0;
|
$totalcontrat = 0;
|
||||||
foreach ($objectlink->lines as $linecontrat) {
|
foreach ($objectlink->lines as $linecontrat) {
|
||||||
$totalcontrat = $totalcontrat + $linecontrat->total_ht;
|
$totalcontrat = $totalcontrat + $linecontrat->total_ht;
|
||||||
$total = $total + $linecontrat->total_ht;
|
$total = $total + $linecontrat->total_ht;
|
||||||
}
|
}
|
||||||
echo price($totalcontrat);
|
echo price($totalcontrat);
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td class="right"><?php echo $objectlink->getLibStatut(7); ?></td>
|
<td class="right"><?php echo $objectlink->getLibStatut(7); ?></td>
|
||||||
<td class="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
<td class="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user