Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
This commit is contained in:
commit
bc1724a3aa
@ -1106,12 +1106,12 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Add link between credit note and origin
|
||||
if(! empty($object->fk_facture_source)) {
|
||||
if(! empty($object->fk_facture_source) && $id>0) {
|
||||
$facture_source->fetch($object->fk_facture_source);
|
||||
$facture_source->fetchObjectLinked();
|
||||
|
||||
if(! empty($facture_source->linkedObjectsIds)) {
|
||||
foreach($facture_source->linkedObjectsIds as $sourcetype => $TIds) {
|
||||
if (!empty($facture_source->linkedObjectsIds)) {
|
||||
foreach ($facture_source->linkedObjectsIds as $sourcetype => $TIds) {
|
||||
$object->add_object_linked($sourcetype, current($TIds));
|
||||
}
|
||||
}
|
||||
@ -4835,9 +4835,8 @@ elseif ($id > 0 || ! empty($ref))
|
||||
// Create a credit note
|
||||
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate)
|
||||
{
|
||||
if (! $objectidnext)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?socid=' . $object->socid .'&fac_avoir=' . $object->id . '&action=create&type=2'.($object->fk_project > 0 ? '&projectid='.$object->fk_project : '').'' . ($object->entity > 0 ? '&originentity='.$object->entity : '').'">' . $langs->trans("CreateCreditNote") . '</a></div>';
|
||||
if (! $objectidnext) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?socid=' . $object->socid . '&fac_avoir=' . $object->id . '&action=create&type=2' . ($object->fk_project > 0 ? '&projectid=' . $object->fk_project : '') . ($object->entity > 0 ? '&originentity=' . $object->entity : '') . '">' . $langs->trans("CreateCreditNote") . '</a></div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -36,7 +36,10 @@ $socid = GETPOST('socid', 'int');
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
|
||||
$urladd = '';
|
||||
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
|
||||
if ($limit != $conf->liste_limit) $urladd .= '&limit=' . $limit;
|
||||
|
||||
$sortfield = GETPOST('sortfield', 'alpha');
|
||||
$sortorder = GETPOST('sortorder', 'alpha');
|
||||
$page = GETPOST('page', 'int');
|
||||
@ -102,7 +105,7 @@ if ($result)
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
$urladd= "&statut=".$statut;
|
||||
$urladd .= "&statut=" . $statut;
|
||||
|
||||
$selectedfields='';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user