Fix: Can delete a price when date is in future to fix corrupted data
This commit is contained in:
parent
dd70d68b4c
commit
9d285ea232
@ -1617,13 +1617,13 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul
|
|||||||
elseif ($i > 0) $candelete = 1;
|
elseif ($i > 0) $candelete = 1;
|
||||||
|
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
if ($candelete)
|
if ($candelete || $db->jdate($objp->dp >= dol_now())) { // Test on date is to be able to delete a corrupted record
|
||||||
{
|
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete&id='.$object->id.'&lineid='.$objp->rowid.'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete&id='.$object->id.'&lineid='.$objp->rowid.'">';
|
||||||
print img_delete();
|
print img_delete();
|
||||||
print '</a>';
|
print '</a>';
|
||||||
} else
|
} else {
|
||||||
print ' '; // Can not delete last price (it's current price)
|
print ' '; // Can not delete last price (it's current price)
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user