Fixing style errors.
This commit is contained in:
parent
4e45011e45
commit
4700fd467f
@ -374,13 +374,12 @@ class Partnership extends CommonObject
|
|||||||
if ($ref) {
|
if ($ref) {
|
||||||
$sql .= " AND p.ref='".$this->db->escape($ref)."'";
|
$sql .= " AND p.ref='".$this->db->escape($ref)."'";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($fk_soc_or_member){
|
if ($fk_soc_or_member) {
|
||||||
$sql .= ' AND';
|
$sql .= ' AND';
|
||||||
if($conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'member')
|
if ($conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'member')
|
||||||
$sql .= ' p.fk_member = ';
|
$sql .= ' p.fk_member = ';
|
||||||
else
|
else $sql .= ' p.fk_soc = ';
|
||||||
$sql .= ' p.fk_soc = ';
|
|
||||||
$sql .= $fk_soc_or_member;
|
$sql .= $fk_soc_or_member;
|
||||||
$sql .= ' ORDER BY p.date_partnership_end DESC';
|
$sql .= ' ORDER BY p.date_partnership_end DESC';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -144,12 +144,12 @@ if (empty($permissiontoread)) accessforbidden();
|
|||||||
if ($action == 'edit' && empty($permissiontoadd)) accessforbidden();
|
if ($action == 'edit' && empty($permissiontoadd)) accessforbidden();
|
||||||
|
|
||||||
$partnershipid = $object->fetch(0, "", $socid);
|
$partnershipid = $object->fetch(0, "", $socid);
|
||||||
if(empty($action) && empty($partnershipid)){
|
if (empty($action) && empty($partnershipid)) {
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
}
|
}
|
||||||
if (($action == 'update' || $action == 'edit') && $object->status != $object::STATUS_DRAFT && !empty($user->socid)) accessforbidden();
|
if (($action == 'update' || $action == 'edit') && $object->status != $object::STATUS_DRAFT && !empty($user->socid)) accessforbidden();
|
||||||
|
|
||||||
if(empty($socid) && $object){
|
if (empty($socid) && $object) {
|
||||||
$socid = $object->fk_soc;
|
$socid = $object->fk_soc;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -262,7 +262,7 @@ if (empty($reshook)) {
|
|||||||
header("Location: ".$_SERVER['PHP_SELF']."?socid=".$socid);
|
header("Location: ".$_SERVER['PHP_SELF']."?socid=".$socid);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actions when linking object each other
|
// Actions when linking object each other
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
|
||||||
|
|
||||||
@ -352,7 +352,6 @@ if ($socid) {
|
|||||||
$newcardbutton .= dolGetButtonTitle($langs->trans("NewProject"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/card.php?action=create&socid='.$societe->id.'&backtopage='.urlencode($backtopage), '', 1, $params);
|
$newcardbutton .= dolGetButtonTitle($langs->trans("NewProject"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/card.php?action=create&socid='.$societe->id.'&backtopage='.urlencode($backtopage), '', 1, $params);
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
dol_print_error('', 'Parameter socid not defined');
|
dol_print_error('', 'Parameter socid not defined');
|
||||||
}
|
}
|
||||||
@ -442,8 +441,6 @@ if (($partnershipid || $ref) && $action == 'edit') {
|
|||||||
|
|
||||||
// Part to show record
|
// Part to show record
|
||||||
if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
|
if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
|
||||||
|
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("PartnershipDedicatedToThisThirdParty", $langs->transnoentitiesnoconv("Partnership")), '', '');
|
print load_fiche_titre($langs->trans("PartnershipDedicatedToThisThirdParty", $langs->transnoentitiesnoconv("Partnership")), '', '');
|
||||||
|
|
||||||
$res = $object->fetch_optionals();
|
$res = $object->fetch_optionals();
|
||||||
@ -536,7 +533,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
|
|
||||||
if ($object->status == $object::STATUS_DRAFT) {
|
if ($object->status == $object::STATUS_DRAFT) {
|
||||||
print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?socid='.$socid.'&action=edit', '', $permissiontoadd);
|
print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?socid='.$socid.'&action=edit', '', $permissiontoadd);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user