Merge pull request #19166 from polkiko/canceled_orders
NEW Canceled purchase orders do not qualify for total and are hidden
This commit is contained in:
commit
c6463c9a83
@ -37,6 +37,8 @@ OpportunitiesStatusForOpenedProjects=Leads amount of open projects by status
|
|||||||
OpportunitiesStatusForProjects=Leads amount of projects by status
|
OpportunitiesStatusForProjects=Leads amount of projects by status
|
||||||
ShowProject=Show project
|
ShowProject=Show project
|
||||||
ShowTask=Show task
|
ShowTask=Show task
|
||||||
|
ShowCanceled=Show canceled
|
||||||
|
HideCanceled=Hide canceled
|
||||||
SetProject=Set project
|
SetProject=Set project
|
||||||
NoProject=No project defined or owned
|
NoProject=No project defined or owned
|
||||||
NbOfProjects=Number of projects
|
NbOfProjects=Number of projects
|
||||||
@ -281,6 +283,6 @@ AddPersonToTask=Add also to tasks
|
|||||||
UsageOrganizeEvent=Usage: Event Organization
|
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=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.
|
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
|
||||||
ProjectTasksWithoutTimeSpent=Project tasks without time spent
|
ProjectTasksWithoutTimeSpent=Project tasks without time spent
|
||||||
FormForNewLeadDesc=Thanks to fill the following form to contact us. You can also send us an email directly to <b>%s</b>.
|
FormForNewLeadDesc=Thanks to fill the following form to contact us. You can also send us an email directly to <b>%s</b>.
|
||||||
|
|||||||
@ -37,6 +37,8 @@ OpportunitiesStatusForOpenedProjects=Importe oportunidades de proyectos por esta
|
|||||||
OpportunitiesStatusForProjects=Importe oportunidades de proyectos por estado
|
OpportunitiesStatusForProjects=Importe oportunidades de proyectos por estado
|
||||||
ShowProject=Ver proyecto
|
ShowProject=Ver proyecto
|
||||||
ShowTask=Ver tarea
|
ShowTask=Ver tarea
|
||||||
|
ShowCanceled=Mostrar cancelados
|
||||||
|
HideCanceled=Ocultar cancelados
|
||||||
SetProject=Definir proyecto
|
SetProject=Definir proyecto
|
||||||
NoProject=Ningún proyecto definido
|
NoProject=Ningún proyecto definido
|
||||||
NbOfProjects=Numero de proyectos
|
NbOfProjects=Numero de proyectos
|
||||||
|
|||||||
@ -1046,6 +1046,24 @@ foreach ($listofreferent as $key => $value) {
|
|||||||
}
|
}
|
||||||
$addform .= '<div>';
|
$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, '');
|
print load_fiche_titre($langs->trans($title), $addform, '');
|
||||||
|
|
||||||
@ -1168,9 +1186,16 @@ foreach ($listofreferent as $key => $value) {
|
|||||||
if (!empty($element->close_code) && $element->close_code == 'replaced') {
|
if (!empty($element->close_code) && $element->close_code == 'replaced') {
|
||||||
$qualifiedfortotal = false; // Replacement invoice, do not include into total
|
$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
|
// Remove link
|
||||||
print '<td style="width: 24px">';
|
print '<td style="width: 24px">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user