commit
ca24b45aa9
@ -51,6 +51,8 @@ $action=GETPOST('action','alpha');
|
|||||||
$cancel=GETPOST('cancel','alpha');
|
$cancel=GETPOST('cancel','alpha');
|
||||||
$backtopage=GETPOST('backtopage','alpha');
|
$backtopage=GETPOST('backtopage','alpha');
|
||||||
$contactid=GETPOST('contactid','int');
|
$contactid=GETPOST('contactid','int');
|
||||||
|
$origin=GETPOST('origin','alpha');
|
||||||
|
$originid=GETPOST('originid','int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST('socid','int');
|
$socid = GETPOST('socid','int');
|
||||||
@ -144,6 +146,8 @@ if ($action == 'add_action')
|
|||||||
$actioncomm->location = GETPOST("location");
|
$actioncomm->location = GETPOST("location");
|
||||||
$actioncomm->transparency = (GETPOST("transparency")=='on'?1:0);
|
$actioncomm->transparency = (GETPOST("transparency")=='on'?1:0);
|
||||||
$actioncomm->label = trim(GETPOST('label'));
|
$actioncomm->label = trim(GETPOST('label'));
|
||||||
|
$actioncomm->fk_element = GETPOST("fk_element");
|
||||||
|
$actioncomm->elementtype = GETPOST("elementtype");
|
||||||
if (! GETPOST('label'))
|
if (! GETPOST('label'))
|
||||||
{
|
{
|
||||||
if (GETPOST('actioncode') == 'AC_RDV' && $contact->getFullName($langs))
|
if (GETPOST('actioncode') == 'AC_RDV' && $contact->getFullName($langs))
|
||||||
@ -329,7 +333,8 @@ if ($action == 'update')
|
|||||||
$actioncomm->fk_project = $_POST["projectid"];
|
$actioncomm->fk_project = $_POST["projectid"];
|
||||||
$actioncomm->note = $_POST["note"];
|
$actioncomm->note = $_POST["note"];
|
||||||
$actioncomm->pnote = $_POST["note"];
|
$actioncomm->pnote = $_POST["note"];
|
||||||
|
$actioncomm->fk_element = $_POST["fk_element"];
|
||||||
|
$actioncomm->elementtype = $_POST["elementtype"];
|
||||||
if (! $datef && $percentage == 100)
|
if (! $datef && $percentage == 100)
|
||||||
{
|
{
|
||||||
$error=$langs->trans("ErrorFieldRequired",$langs->trans("DateEnd"));
|
$error=$langs->trans("ErrorFieldRequired",$langs->trans("DateEnd"));
|
||||||
@ -595,6 +600,11 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
if(!empty($origin) && !empty($originid))
|
||||||
|
{
|
||||||
|
print '<input type="hidden" name="fk_element" size="10" value="'.GETPOST('originid').'">';
|
||||||
|
print '<input type="hidden" name="elementtype" size="10" value="'.GETPOST('origin').'">';
|
||||||
|
}
|
||||||
|
|
||||||
if (GETPOST("datep") && preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])$/',GETPOST("datep"),$reg))
|
if (GETPOST("datep") && preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])$/',GETPOST("datep"),$reg))
|
||||||
{
|
{
|
||||||
@ -613,6 +623,7 @@ if ($action == 'create')
|
|||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$actioncomm,$action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$actioncomm,$action); // Note that $action and $object may have been modified by hook
|
||||||
|
|||||||
@ -1655,8 +1655,9 @@ else
|
|||||||
if ($absolute_discount)
|
if ($absolute_discount)
|
||||||
{
|
{
|
||||||
if ($object->statut > 0)
|
if ($object->statut > 0)
|
||||||
{
|
{
|
||||||
print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency));
|
print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency));
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2105,7 +2106,12 @@ else
|
|||||||
if (count($object->lines) > 0) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=validate">'.$langs->trans('Validate').'</a></div>';
|
if (count($object->lines) > 0) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=validate">'.$langs->trans('Validate').'</a></div>';
|
||||||
//else print '<a class="butActionRefused" href="#">'.$langs->trans('Validate').'</a>';
|
//else print '<a class="butActionRefused" href="#">'.$langs->trans('Validate').'</a>';
|
||||||
}
|
}
|
||||||
|
//Creer un evenement
|
||||||
|
if ($conf->agenda->enabled)
|
||||||
|
{
|
||||||
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("AddAction").'</a>';
|
||||||
|
|
||||||
|
}
|
||||||
// Edit
|
// Edit
|
||||||
if ($object->statut == 1 && $user->rights->propal->creer)
|
if ($object->statut == 1 && $user->rights->propal->creer)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2386,13 +2386,17 @@ else
|
|||||||
{
|
{
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=validate">'.$langs->trans('Validate').'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=validate">'.$langs->trans('Validate').'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
if ($object->statut == 1 && $user->rights->commande->creer)
|
if ($object->statut == 1 && $user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="fiche.php?id='.$object->id.'&action=modif">'.$langs->trans('Modify').'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="fiche.php?id='.$object->id.'&action=modif">'.$langs->trans('Modify').'</a></div>';
|
||||||
}
|
}
|
||||||
|
//Creer un evenement
|
||||||
|
if ($conf->agenda->enabled)
|
||||||
|
{
|
||||||
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("AddAction").'</a>';
|
||||||
|
|
||||||
|
}
|
||||||
// Send
|
// Send
|
||||||
if ($object->statut > 0)
|
if ($object->statut > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2622,6 +2622,7 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* This is to show add lines */
|
/* This is to show add lines */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user