New: Can create contract from an order.

This commit is contained in:
Laurent Destailleur 2014-01-28 15:26:20 +01:00
parent 954cd74ffb
commit 5657bd7793
3 changed files with 15 additions and 3 deletions

View File

@ -4,6 +4,7 @@ English Dolibarr ChangeLog
***** ChangeLog for 3.6 compared to 3.5.* *****
For users:
- New: Can create contract from an order.
- New: Add list of orders products in tab "consumption" on thirdparties.
- New: Add graph stats for suppliers orders in tab "stats" on products.
- New: Add option MAIN_HIDE_INACTIVETAB_ON_PRINT to hide inactive tabs when you

View File

@ -2168,7 +2168,7 @@ else
}
// Create an order
if (! empty($conf->commande->enabled) && $object->statut == 2 && $user->societe_id == 0)
if (! empty($conf->commande->enabled) && $object->statut == 2)
{
if ($user->rights->commande->creer)
{
@ -2177,7 +2177,7 @@ else
}
// Create contract
if ($conf->contrat->enabled && $object->statut == 2 && $user->societe_id == 0)
if ($conf->contrat->enabled && $object->statut == 2)
{
$langs->load("contracts");
@ -2188,7 +2188,7 @@ else
}
// Create an invoice and classify billed
if ($object->statut == 2 && $user->societe_id == 0)
if ($object->statut == 2)
{
if (! empty($conf->facture->enabled) && $user->rights->facture->creer)
{

View File

@ -2477,6 +2477,17 @@ else
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=reopen">'.$langs->trans('ReOpen').'</a></div>';
}
// Create contract
if ($conf->contrat->enabled && ($object->statut == 1 || $object->statut == 2))
{
$langs->load("contracts");
if ($user->rights->contrat->creer)
{
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/contrat/fiche.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans('AddContract').'</a></div>';
}
}
// Create bill and Classify billed
// Note: Even if module invoice is not enabled, we should be able to use button "Classified billed"
if ($object->statut > 0 && ! $object->billed)