Fix bad support of option WORKFLOW_BILL_ON_SHIPMENT

This commit is contained in:
Laurent Destailleur
2016-02-25 03:04:36 +01:00
parent f1ba81ec66
commit 96305ca00f

View File

@@ -42,6 +42,7 @@ $langs->load('orders');
$langs->load('deliveries');
$langs->load('companies');
$langs->load('compta');
$langs->load('bills');
$orderyear=GETPOST("orderyear","int");
$ordermonth=GETPOST("ordermonth","int");
@@ -352,7 +353,7 @@ if ($resql)
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print_liste_field_titre($langs->trans('Status'),$_SERVER["PHP_SELF"],'c.fk_statut','',$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Billed'),$_SERVER["PHP_SELF"],'c.facture','',$param,'align="center"',$sortfield,$sortorder,'');
if (empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) print_liste_field_titre($langs->trans('Billed'),$_SERVER["PHP_SELF"],'c.facture','',$param,'align="center"',$sortfield,$sortorder,'');
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'',$param,'',$sortfield,$sortorder,'maxwidthsearch ');
print '</tr>';
@@ -392,9 +393,12 @@ if ($resql)
);
print $form->selectarray('viewstatut', $liststatus, $viewstatut, -4);
print '</td>';
print '<td align="center">';
print $form->selectyesno('billed', $billed, 1, 0, 1);
print '</td>';
if (empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))
{
print '<td align="center">';
print $form->selectyesno('billed', $billed, 1, 0, 1);
print '</td>';
}
print '<td class="liste_titre" align="right">';
$searchpitco=$form->showFilterAndCheckAddButtons(0);
print $searchpitco;
@@ -605,7 +609,7 @@ if ($resql)
print '<td align="right" class="nowrap">'.$generic_commande->LibStatut($objp->fk_statut, $objp->billed, 5, 1).'</td>';
// Billed
print '<td align="center">'.yn($objp->billed).'</td>';
if (empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) print '<td align="center">'.yn($objp->billed).'</td>';
print '<td></td>';