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