Skip to content
Snippets Groups Projects
Commit be395afb authored by Regis Houssin's avatar Regis Houssin
Browse files

Works on shipping module enhancement

parent fcd55987
No related branches found
No related tags found
No related merge requests found
......@@ -1434,6 +1434,7 @@ if ($action == 'create')
if ($element == 'order' || $element == 'commande') { $element = $subelement = 'commande'; }
if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; }
if ($element == 'contract') { $element = $subelement = 'contrat'; }
if ($element == 'shipping') { $element = $subelement = 'expedition'; }
dol_include_once('/'.$element.'/class/'.$subelement.'.class.php');
......
......@@ -1258,6 +1258,23 @@ else
else print '<a class="butActionRefused" href="#">'.$langs->trans('SendByMail').'</a>';
}
}
// Create bill and Classify billed
if ($conf->facture->enabled && $object->statut > 0 && ! $object->billed)
{
if ($user->rights->facture->creer)
{
// TODO until the module is autonomous
//print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&amp;origin='.$object->origin.'&amp;originid='.$object->origin_id.'&amp;socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
}
// TODO add alternative status
if ($user->rights->expedition->creer && $object->statut > 2)
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
}
}
if ($conf->livraison_bon->enabled && $object->statut == 1 && $user->rights->expedition->livraison->creer && empty($object->linkedObjectsIds))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment