NEW Canceled purchase orders do not qualify for total in project overview (and are hidden)
If purchase order has been canceled then it does not qualify for total amount and is not shown in table. It can be seen by clicking on the "show/hide" button.
This commit is contained in:
parent
fd64f8966b
commit
a58f713f6d
@ -37,6 +37,8 @@ OpportunitiesStatusForOpenedProjects=Leads amount of open projects by status
|
||||
OpportunitiesStatusForProjects=Leads amount of projects by status
|
||||
ShowProject=Show project
|
||||
ShowTask=Show task
|
||||
ShowCanceled=Show canceled
|
||||
HideCanceled=Hide canceled
|
||||
SetProject=Set project
|
||||
NoProject=No project defined or owned
|
||||
NbOfProjects=Number of projects
|
||||
@ -274,4 +276,4 @@ AddPersonToTask=Add also to tasks
|
||||
UsageOrganizeEvent=Usage: Event Organization
|
||||
PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress)
|
||||
PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects.
|
||||
SelectLinesOfTimeSpentToInvoice=Select lines of time spent that are unbilled, then bulk action "Generate Invoice" to bill them
|
||||
SelectLinesOfTimeSpentToInvoice=Select lines of time spent that are unbilled, then bulk action "Generate Invoice" to bill them
|
||||
|
||||
@ -37,6 +37,8 @@ OpportunitiesStatusForOpenedProjects=Importe oportunidades de proyectos por esta
|
||||
OpportunitiesStatusForProjects=Importe oportunidades de proyectos por estado
|
||||
ShowProject=Ver proyecto
|
||||
ShowTask=Ver tarea
|
||||
ShowCanceled=Mostrar cancelados
|
||||
HideCanceled=Ocultar cancelados
|
||||
SetProject=Definir proyecto
|
||||
NoProject=Ningún proyecto definido
|
||||
NbOfProjects=Numero de proyectos
|
||||
|
||||
@ -1048,6 +1048,24 @@ foreach ($listofreferent as $key => $value) {
|
||||
}
|
||||
$addform .= '<div>';
|
||||
}
|
||||
if ($key == "order_supplier") {
|
||||
$addform .= '<a id="btnShow" class="buttonxxx marginleftonly" href="#" onClick="return false;">
|
||||
<span id="textBtnShow" class="valignmiddle text-plus-circle hideonsmartphone">'.$langs->trans("ShowCanceled").'</span><span id="minus-circle" class="fa fa-eye valignmiddle paddingleft" style="padding: 3px 4px 2px 3px"></span>
|
||||
</a>
|
||||
<script>
|
||||
$("#btnShow").on("click", function () {
|
||||
if($("#tr_canceled").css("display") == "none"){
|
||||
$("#tr_canceled").show();
|
||||
$("#textBtnShow").text("'.$langs->trans("HideCanceled").'");
|
||||
$("#minus-circle").removeClass("fa-eye").addClass("fa-eye-slash");
|
||||
} else {
|
||||
$("#tr_canceled").hide();
|
||||
$("#textBtnShow").text("'.$langs->trans("ShowCanceled").'");
|
||||
$("#minus-circle").removeClass("fa-eye-slash").addClass("fa-eye");
|
||||
}
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
|
||||
print load_fiche_titre($langs->trans($title), $addform, '');
|
||||
|
||||
@ -1170,9 +1188,16 @@ foreach ($listofreferent as $key => $value) {
|
||||
if (!empty($element->close_code) && $element->close_code == 'replaced') {
|
||||
$qualifiedfortotal = false; // Replacement invoice, do not include into total
|
||||
}
|
||||
} elseif (($key == 'order_supplier') && ($element->status == 7)) {
|
||||
$qualifiedfortotal = false; // It makes no sense to include canceled orders in the total
|
||||
}
|
||||
|
||||
if (($key == "order_supplier") && ($element->status == 7)) {
|
||||
print '<tr id ="tr_canceled" class="oddeven" style=display:none>';
|
||||
} else {
|
||||
print '<tr class="oddeven" >';
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Remove link
|
||||
print '<td style="width: 24px">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user