commit
bb3241b70b
@ -1649,7 +1649,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->facture-
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
||||
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||
$result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||
}
|
||||
|
||||
if ($result >= 0)
|
||||
|
||||
@ -57,7 +57,7 @@ if ($action == 'addcontact' && $user->rights->contrat->creer)
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
||||
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||
$result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||
}
|
||||
|
||||
if ($result >= 0)
|
||||
|
||||
@ -208,8 +208,8 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
||||
}
|
||||
if ((GETPOST('price_ht') == '' || ! GETPOST('dp_desc')) && ! GETPOST('idprod'))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Description")),'errors');
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Description")),'errors');
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
@ -355,13 +355,13 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
||||
}
|
||||
*/
|
||||
|
||||
unset($_POST['qty']);
|
||||
unset($_POST['type']);
|
||||
unset($_POST['idprod']);
|
||||
unset($_POST['remise_percent']);
|
||||
unset($_POST['price_ht']);
|
||||
unset($_POST['tva_tx']);
|
||||
unset($_POST['dp_desc']);
|
||||
unset($_POST['qty']);
|
||||
unset($_POST['type']);
|
||||
unset($_POST['idprod']);
|
||||
unset($_POST['remise_percent']);
|
||||
unset($_POST['price_ht']);
|
||||
unset($_POST['tva_tx']);
|
||||
unset($_POST['dp_desc']);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -514,7 +514,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->contrat-
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
||||
$result = $result = $object->add_contact($contactid, GETPOST('type'), GETPOST('source'));
|
||||
$result = $object->add_contact($contactid, GETPOST('type'), GETPOST('source'));
|
||||
}
|
||||
|
||||
if ($result >= 0)
|
||||
@ -1017,13 +1017,13 @@ else
|
||||
print $objp->label?$objp->label.'<br>':'';
|
||||
}
|
||||
|
||||
// editeur wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$nbrows=ROWS_2;
|
||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||
$enable=(isset($conf->global->FCKEDITOR_ENABLE_DETAILS)?$conf->global->FCKEDITOR_ENABLE_DETAILS:0);
|
||||
$doleditor=new DolEditor('product_desc',$objp->description,'',92,'dolibarr_details','',false,true,$enable,$nbrows,70);
|
||||
$doleditor->Create();
|
||||
// editeur wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$nbrows=ROWS_2;
|
||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||
$enable=(isset($conf->global->FCKEDITOR_ENABLE_DETAILS)?$conf->global->FCKEDITOR_ENABLE_DETAILS:0);
|
||||
$doleditor=new DolEditor('product_desc',$objp->description,'',92,'dolibarr_details','',false,true,$enable,$nbrows,70);
|
||||
$doleditor->Create();
|
||||
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
@ -1292,32 +1292,32 @@ else
|
||||
$savproductenabled=$conf->product->enabled;
|
||||
$conf->product->enabled = 0;
|
||||
|
||||
// Form to add new line
|
||||
if ($action != 'editline')
|
||||
{
|
||||
$var=true;
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
|
||||
{
|
||||
// Add free or predefined products/services
|
||||
$object->formAddObjectLine($dateSelector,$mysoc,$object->thirdparty,$hookmanager);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add free products/services
|
||||
$object->formAddFreeProduct($dateSelector,$mysoc,$object->thirdparty,$hookmanager);
|
||||
|
||||
// Add predefined products/services
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
$object->formAddPredefinedProduct($dateSelector,$mysoc,$object->thirdparty,$hookmanager);
|
||||
}
|
||||
}
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formAddObjectLine',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
}
|
||||
// Form to add new line
|
||||
if ($action != 'editline')
|
||||
{
|
||||
$var=true;
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
|
||||
{
|
||||
// Add free or predefined products/services
|
||||
$object->formAddObjectLine($dateSelector,$mysoc,$object->thirdparty,$hookmanager);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add free products/services
|
||||
$object->formAddFreeProduct($dateSelector,$mysoc,$object->thirdparty,$hookmanager);
|
||||
|
||||
// Add predefined products/services
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
$object->formAddPredefinedProduct($dateSelector,$mysoc,$object->thirdparty,$hookmanager);
|
||||
}
|
||||
}
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formAddObjectLine',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
}
|
||||
|
||||
// Restore correct setup
|
||||
$conf->product->enabled = $savproductenabled;
|
||||
@ -1373,7 +1373,7 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans("Delete").'</a>';
|
||||
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
|
||||
@ -56,7 +56,7 @@ if ($action == 'addcontact' && $user->rights->fournisseur->commande->creer)
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
||||
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||
$result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||
}
|
||||
|
||||
if ($result >= 0)
|
||||
|
||||
@ -1677,8 +1677,6 @@ if (! empty($object->id))
|
||||
print $formfile->showdocuments('commande_fournisseur',$comfournref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,0,0,'','','',$object->thirdparty->default_lang);
|
||||
$somethingshown=$formfile->numoffiles;
|
||||
|
||||
$object=$object;
|
||||
|
||||
/*
|
||||
* Linked object block
|
||||
*/
|
||||
|
||||
@ -56,7 +56,7 @@ if ($action == 'addcontact' && $user->rights->fournisseur->facture->creer)
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
||||
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||
$result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||
}
|
||||
|
||||
if ($result >= 0)
|
||||
|
||||
@ -281,9 +281,9 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer)
|
||||
if ($element == 'order_supplier') {
|
||||
$element = 'fourn'; $subelement = 'fournisseur.commande';
|
||||
}
|
||||
if ($element == 'project')
|
||||
{
|
||||
$element = 'projet';
|
||||
if ($element == 'project')
|
||||
{
|
||||
$element = 'projet';
|
||||
}
|
||||
$object->origin = $_POST['origin'];
|
||||
$object->origin_id = $_POST['originid'];
|
||||
@ -867,7 +867,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->fourniss
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
||||
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||
$result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||
}
|
||||
|
||||
if ($result >= 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user