mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Works on shipping module enhancement
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
@@ -1259,6 +1259,23 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
// 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&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&origin='.$object->origin.'&originid='.$object->origin_id.'&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.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($conf->livraison_bon->enabled && $object->statut == 1 && $user->rights->expedition->livraison->creer && empty($object->linkedObjectsIds))
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=create_delivery">'.$langs->trans("DeliveryOrder").'</a>';
|
||||
|
||||
Reference in New Issue
Block a user