mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix creation of thirdparty when module supplier not enabled
NEw can use the clicktoclipboard feature when clicking on value
This commit is contained in:
parent
cffec01451
commit
2e6f4862f9
|
|
@ -230,7 +230,7 @@ print '
|
|||
}
|
||||
);
|
||||
|
||||
jQuery(\'.clipboardCPButton, .clipboardCPValueToPrint\').click(function() {
|
||||
jQuery(\'.clipboardCPValue, .clipboardCPButton, .clipboardCPValueToPrint\').click(function() {
|
||||
/* console.log(this.parentNode); */
|
||||
console.log("We click on a clipboardCPButton or clipboardCPValueToPrint class and we want to copy content of clipboardCPValue class");
|
||||
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ $error = 0; $errors = array();
|
|||
$action = (GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
$socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int');
|
||||
|
|
@ -135,16 +136,6 @@ $upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->
|
|||
// Security check
|
||||
$result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0);
|
||||
|
||||
/*
|
||||
if ($object->id > 0) {
|
||||
if ($object->client == 0 && $object->fournisseur > 0) {
|
||||
if (!empty($user->rights->fournisseur->lire)) {
|
||||
accessforbidden();
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -413,11 +404,11 @@ if (empty($reshook)) {
|
|||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdPartyName")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (GETPOST('client') < 0) {
|
||||
if (GETPOST('client', 'int') && GETPOST('client', 'int') < 0) {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ProspectCustomer")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (GETPOST('fournisseur') < 0) {
|
||||
if (GETPOSTISSET('fournisseur') && GETPOST('fournisseur', 'int') < 0) {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Supplier")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user