Add create button on predefined invoice details
Check invoice creation right
This commit is contained in:
parent
dddafacad9
commit
86d8870939
@ -18,6 +18,7 @@ For users:
|
||||
- Fix: Iban was used instead of Bic into SEPA file.
|
||||
- Fix: Must unaccent strings into SEPA file.
|
||||
- Fix: Extrafield feature select from table should try to translate multiple column when not needed
|
||||
- New: Direct invoice creation from predefined invoice
|
||||
|
||||
***** ChangeLog for 3.6 compared to 3.5.* *****
|
||||
For users:
|
||||
|
||||
@ -507,9 +507,14 @@ else
|
||||
*/
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($object->statut == 0 && $user->rights->facture->creer)
|
||||
{
|
||||
echo '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&socid='.$object->thirdparty->id.'&fac_rec='.$object->id.'">'.$langs->trans("CreateBill").'</a></div>';
|
||||
}
|
||||
|
||||
if ($object->statut == 0 && $user->rights->facture->supprimer)
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=delete&id='.$object->id.'">'.$langs->trans('Delete').'</a>';
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=delete&id='.$object->id.'">'.$langs->trans('Delete').'</a></div>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
@ -569,23 +574,18 @@ else
|
||||
|
||||
print '<td align="right">'.price($objp->total).'</td>'."\n";
|
||||
|
||||
if (! $objp->paye)
|
||||
echo '<td align="center">';
|
||||
|
||||
if ($user->rights->facture->creer)
|
||||
{
|
||||
if ($objp->fk_statut == 0)
|
||||
{
|
||||
print '<td align="right">'.$langs->trans("Draft").'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right"><a href="'.DOL_URL_ROOT.'/compta/facture/list.php?filtre=paye:0,fk_statut:1">'.$langs->trans("Validated").'</a></td>';
|
||||
}
|
||||
echo '<a href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&socid='.$objp->socid.'&fac_rec='.$objp->facid.'">';
|
||||
echo $langs->trans("CreateBill"),'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td> </td>';
|
||||
echo " ";
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
echo "</td></tr>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user