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
|
||||
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
|
||||
@ -281,6 +283,6 @@ 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
|
||||
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
|
||||
ShowProject=Ver proyecto
|
||||
ShowTask=Ver tarea
|
||||
ShowCanceled=Mostrar cancelados
|
||||
HideCanceled=Ocultar cancelados
|
||||
SetProject=Definir proyecto
|
||||
NoProject=Ningún proyecto definido
|
||||
NbOfProjects=Numero de proyectos
|
||||
|
||||
@ -1046,6 +1046,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, '');
|
||||
|
||||
@ -1168,9 +1186,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