FIX: Fix link of the button to create a credit note and fix the awareness of a error happen when to create a credit note
This commit is contained in:
parent
ab82797dfc
commit
a4800f7b9b
@ -1182,7 +1182,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add link between credit note and origin
|
// 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->fetch($object->fk_facture_source);
|
||||||
$facture_source->fetchObjectLinked();
|
$facture_source->fetchObjectLinked();
|
||||||
|
|
||||||
@ -5130,7 +5130,7 @@ if ($action == 'create')
|
|||||||
{
|
{
|
||||||
if (!$objectidnext)
|
if (!$objectidnext)
|
||||||
{
|
{
|
||||||
print '<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>';
|
print '<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>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user