Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 13.0
This commit is contained in:
commit
71e6d20cb5
@ -155,11 +155,12 @@ if ($action == 'add_payment')
|
||||
$payment->chid = $chid;
|
||||
$payment->datep = $datepaid;
|
||||
$payment->label = $loan->label;
|
||||
$payment->amount_capital = $pay_amount_capital;
|
||||
$payment->amount_insurance = $pay_amount_interest;
|
||||
$payment->amount_interest = $pay_amount_insurance;
|
||||
$payment->amount_capital = $pay_amount_capital;
|
||||
$payment->amount_insurance = $pay_amount_insurance;
|
||||
$payment->amount_interest = $pay_amount_interest;
|
||||
$payment->fk_bank = GETPOST('accountid', 'int');
|
||||
$payment->paymenttype = GETPOST('paymenttype', 'int');
|
||||
$payment->num_payment = GETPOST('num_payment');
|
||||
$payment->num_payment = GETPOST('num_payment');
|
||||
$payment->note_private = GETPOST('note_private', 'restricthtml');
|
||||
$payment->note_public = GETPOST('note_public', 'restricthtml');
|
||||
|
||||
|
||||
@ -697,7 +697,7 @@ class MyObject extends CommonObject
|
||||
return -1;
|
||||
}*/
|
||||
|
||||
return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'MYOBJECT_CLOSE');
|
||||
return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'MYOBJECT_CANCEL');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -158,7 +158,7 @@ if ($object->id > 0)
|
||||
$head = myobjectPrepareHead($object);
|
||||
|
||||
|
||||
print dol_get_fiche_head($head, 'agenda', $langs->trans("MyObject"), -1, 'object_'.$object->picto);
|
||||
print dol_get_fiche_head($head, 'agenda', $langs->trans("MyObject"), -1, $object->picto);
|
||||
|
||||
// Object card
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@ -466,40 +466,29 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
{
|
||||
// Send
|
||||
if (empty($user->socid)) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n";
|
||||
print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle');
|
||||
}
|
||||
|
||||
// Back to draft
|
||||
if ($object->status == $object::STATUS_VALIDATED) {
|
||||
if ($permissiontoadd) {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes">'.$langs->trans("SetToDraft").'</a>';
|
||||
}
|
||||
print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes', '', $permissiontoadd);
|
||||
}
|
||||
|
||||
// Modify
|
||||
if ($permissiontoadd) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>'."\n";
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Modify').'</a>'."\n";
|
||||
}
|
||||
print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit', '', $permissiontoadd);
|
||||
|
||||
// Validate
|
||||
if ($object->status == $object::STATUS_DRAFT) {
|
||||
if ($permissiontoadd) {
|
||||
if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0))
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes">'.$langs->trans("Validate").'</a>';
|
||||
} else {
|
||||
$langs->load("errors");
|
||||
print '<a class="butActionRefused" href="" title="'.$langs->trans("ErrorAddAtLeastOneLineFirst").'">'.$langs->trans("Validate").'</a>';
|
||||
}
|
||||
if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) {
|
||||
print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes', '', $permissiontoadd);
|
||||
} else {
|
||||
$langs->load("errors");
|
||||
//print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes', '', 0);
|
||||
print '<a class="butActionRefused" href="" title="'.$langs->trans("ErrorAddAtLeastOneLineFirst").'">'.$langs->trans("Validate").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
// Clone
|
||||
if ($permissiontoadd) {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=myobject">'.$langs->trans("ToClone").'</a>'."\n";
|
||||
}
|
||||
print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=scrumsprint', '', $permissiontoadd);
|
||||
|
||||
/*
|
||||
if ($permissiontoadd)
|
||||
@ -521,12 +510,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
*/
|
||||
|
||||
// Delete (need delete permission, or if draft, just need create/modify permission)
|
||||
if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd))
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans('Delete').'</a>'."\n";
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Delete').'</a>'."\n";
|
||||
}
|
||||
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete', '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
|
||||
}
|
||||
print '</div>'."\n";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user