Align actions buttons
This commit is contained in:
parent
a794033dae
commit
77eaa635fe
@ -2623,7 +2623,7 @@ else
|
|||||||
// Modify a validated invoice with no payments
|
// Modify a validated invoice with no payments
|
||||||
if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $action != 'edit' && $object->getSommePaiement() == 0 && $user->rights->fournisseur->facture->creer)
|
if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $action != 'edit' && $object->getSommePaiement() == 0 && $user->rights->fournisseur->facture->creer)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit">'.$langs->trans('Modify').'</a>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit">'.$langs->trans('Modify').'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reopen a standard paid invoice
|
// Reopen a standard paid invoice
|
||||||
@ -2631,11 +2631,11 @@ else
|
|||||||
{
|
{
|
||||||
if (! $facidnext && $object->close_code != 'replaced') // Not replaced by another invoice
|
if (! $facidnext && $object->close_code != 'replaced') // Not replaced by another invoice
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen">'.$langs->trans('ReOpen').'</a>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen">'.$langs->trans('ReOpen').'</a></div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<span class="butActionRefused" title="'.$langs->trans("DisabledBecauseReplacedInvoice").'">'.$langs->trans('ReOpen').'</span>';
|
print '<div class="inline-block divButAction"><span class="butActionRefused" title="'.$langs->trans("DisabledBecauseReplacedInvoice").'">'.$langs->trans('ReOpen').'</span></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2644,22 +2644,22 @@ else
|
|||||||
{
|
{
|
||||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->fournisseur->supplier_invoice_advance->send)
|
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->fournisseur->supplier_invoice_advance->send)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=presend&mode=init">'.$langs->trans('SendByMail').'</a>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=presend&mode=init">'.$langs->trans('SendByMail').'</a></div>';
|
||||||
}
|
}
|
||||||
else print '<a class="butActionRefused" href="#">'.$langs->trans('SendByMail').'</a>';
|
else print '<div class="inline-block divButAction"><span class="butActionRefused">'.$langs->trans('SendByMail').'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make payments
|
// Make payments
|
||||||
if ($action != 'edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0)
|
if ($action != 'edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="paiement.php?facid='.$object->id.'&action=create'.($object->fk_account>0?'&accountid='.$object->fk_account:'').'">'.$langs->trans('DoPayment').'</a>'; // must use facid because id is for payment id not invoice
|
print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid='.$object->id.'&action=create'.($object->fk_account>0?'&accountid='.$object->fk_account:'').'">'.$langs->trans('DoPayment').'</a></div>'; // must use facid because id is for payment id not invoice
|
||||||
}
|
}
|
||||||
|
|
||||||
// Classify paid
|
// Classify paid
|
||||||
if ($action != 'edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0)
|
if ($action != 'edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=paid"';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=paid"';
|
||||||
print '>'.$langs->trans('ClassifyPaid').'</a>';
|
print '>'.$langs->trans('ClassifyPaid').'</a></div>';
|
||||||
|
|
||||||
//print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=paid">'.$langs->trans('ClassifyPaid').'</a>';
|
//print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=paid">'.$langs->trans('ClassifyPaid').'</a>';
|
||||||
}
|
}
|
||||||
@ -2672,13 +2672,13 @@ else
|
|||||||
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->fournisseur->facture->creer))
|
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->fournisseur->facture->creer))
|
||||||
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->fournisseur->supplier_invoice_advance->validate)))
|
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->fournisseur->supplier_invoice_advance->validate)))
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid"';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid"';
|
||||||
print '>'.$langs->trans('Validate').'</a>';
|
print '>'.$langs->trans('Validate').'</a></div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'"';
|
print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'"';
|
||||||
print '>'.$langs->trans('Validate').'</a>';
|
print '>'.$langs->trans('Validate').'</a></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2692,7 +2692,7 @@ else
|
|||||||
// Clone
|
// Clone
|
||||||
if ($action != 'edit' && $user->rights->fournisseur->facture->creer)
|
if ($action != 'edit' && $user->rights->fournisseur->facture->creer)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=clone&socid='.$object->socid.'">'.$langs->trans('ToClone').'</a>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=clone&socid='.$object->socid.'">'.$langs->trans('ToClone').'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a credit note
|
// Create a credit note
|
||||||
@ -2710,7 +2710,7 @@ else
|
|||||||
if ($object->getSommePaiement()) {
|
if ($object->getSommePaiement()) {
|
||||||
print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="' . $langs->trans("DisabledBecausePayments") . '">' . $langs->trans('Delete') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="' . $langs->trans("DisabledBecausePayments") . '">' . $langs->trans('Delete') . '</a></div>';
|
||||||
} else {
|
} else {
|
||||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>';
|
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user