Merge pull request #10545 from frederic34/patch-18

Update consumption.php
This commit is contained in:
Laurent Destailleur 2019-02-12 13:45:49 +01:00 committed by GitHub
commit 17bb5a3c4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -322,18 +322,15 @@ if (!empty($sql_select))
$sql.=")"; $sql.=")";
} }
$sql.= $db->order($sortfield, $sortorder); $sql.= $db->order($sortfield, $sortorder);
//print ($sql);exit;
$resql=$db->query($sql); $resql=$db->query($sql);
$totalnboflines = $db->num_rows($resql); $totalnboflines = $db->num_rows($resql);
$sql.= $db->plimit($limit + 1, $offset); $sql.= $db->plimit($limit + 1, $offset);
//print $sql;
} }
$disabled=0; $disabled=0;
$showempty=2; $showempty=2;
if (empty($elementTypeArray) && ! $object->client && ! $object->fournisseur) if (empty($elementTypeArray) && ! $object->thirdparty->client && ! $object->thirdparty->fournisseur) {
{
$showempty=$langs->trans("ThirdpartyNotCustomerNotSupplierSoNoRef"); $showempty=$langs->trans("ThirdpartyNotCustomerNotSupplierSoNoRef");
$disabled=1; $disabled=1;
} }
@ -491,9 +488,8 @@ if ($sql_select)
$description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($objp->description)); $description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($objp->description));
} }
if (($objp->info_bits & 2) == 2) { ?> if (($objp->info_bits & 2) == 2) {
<a href="<?php echo DOL_URL_ROOT.'/comm/remx.php?id='.$object->id; ?>"> print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->id.'">';
<?php
$txt=''; $txt='';
print img_object($langs->trans("ShowReduc"), 'reduc').' '; print img_object($langs->trans("ShowReduc"), 'reduc').' ';
if ($objp->description == '(DEPOSIT)') $txt=$langs->trans("Deposit"); if ($objp->description == '(DEPOSIT)') $txt=$langs->trans("Deposit");
@ -501,9 +497,7 @@ if ($sql_select)
elseif ($objp->description == '(EXCESS PAID)') $txt=$langs->trans("ExcessPaid"); elseif ($objp->description == '(EXCESS PAID)') $txt=$langs->trans("ExcessPaid");
//else $txt=$langs->trans("Discount"); //else $txt=$langs->trans("Discount");
print $txt; print $txt;
?> print '</a>';
</a>
<?php
if ($objp->description) if ($objp->description)
{ {
if ($objp->description == '(CREDIT_NOTE)' && $objp->fk_remise_except > 0) if ($objp->description == '(CREDIT_NOTE)' && $objp->fk_remise_except > 0)