Conflict
This commit is contained in:
commit
29bb03a25b
@ -27,7 +27,9 @@ Following changes may create regressions for some external modules, but were nec
|
||||
For users:
|
||||
---------------
|
||||
|
||||
NEW: PHP 8.1 compatibility
|
||||
NEW: PHP 8.1 compatibility.
|
||||
Warning: Application works correctly with PHP8 and 8.1 but you may experience a lot of PHP warning into the PHP server log files (depending
|
||||
on the PHP setup). Removal of all PHP warnings on server side is planned for v17.
|
||||
NEW: Support for recurring purchase invoices.
|
||||
NEW: #20292 Include German public holidays
|
||||
NEW: Can show ZATCA QR-Code on PDFs
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2019 Thibault Foucart <support@ptibogxiv.net>
|
||||
* Copyright (C) 2019-2022 Thibault Foucart <support@ptibogxiv.net>
|
||||
* Copyright (C) 2020 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2021 Waël Almoman <info@almoman.com>
|
||||
*
|
||||
@ -141,6 +141,7 @@ if ($action == 'add' && $user->rights->adherent->configurer) {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors');
|
||||
} else {
|
||||
$sql = "SELECT libelle FROM ".MAIN_DB_PREFIX."adherent_type WHERE libelle='".$db->escape($object->label)."'";
|
||||
$sql .= " WHERE entity IN (".getEntity('member_type').")";
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
@ -622,34 +622,33 @@ $sourceList = array();
|
||||
if ($id == 11) {
|
||||
$elementList = array(
|
||||
'' => '',
|
||||
'societe' => $langs->trans('ThirdParty'),
|
||||
'agenda' => img_picto('', 'action', 'class="pictofixedwidth"').$langs->trans('Agenda'),
|
||||
'dolresource' => img_picto('', 'resource', 'class="pictofixedwidth"').$langs->trans('Resource'),
|
||||
'societe' => img_picto('', 'company', 'class="pictofixedwidth"').$langs->trans('ThirdParty'),
|
||||
// 'proposal' => $langs->trans('Proposal'),
|
||||
// 'order' => $langs->trans('Order'),
|
||||
// 'invoice' => $langs->trans('Bill'),
|
||||
'supplier_proposal' => $langs->trans('SupplierProposal'),
|
||||
'order_supplier' => $langs->trans('SupplierOrder'),
|
||||
'invoice_supplier' => $langs->trans('SupplierBill'),
|
||||
// 'intervention' => $langs->trans('InterventionCard'),
|
||||
// 'contract' => $langs->trans('Contract'),
|
||||
'project' => $langs->trans('Project'),
|
||||
'project_task' => $langs->trans('Task'),
|
||||
'ticket' => $langs->trans('Ticket'),
|
||||
'agenda' => $langs->trans('Agenda'),
|
||||
'dolresource' => $langs->trans('Resource'),
|
||||
// old deprecated
|
||||
'propal' => $langs->trans('Proposal'),
|
||||
'commande' => $langs->trans('Order'),
|
||||
'facture' => $langs->trans('Bill'),
|
||||
'fichinter' => $langs->trans('InterventionCard'),
|
||||
'contrat' => $langs->trans('Contract'),
|
||||
'project' => img_picto('', 'project', 'class="pictofixedwidth"').$langs->trans('Project'),
|
||||
'project_task' => img_picto('', 'projecttask', 'class="pictofixedwidth"').$langs->trans('Task'),
|
||||
'propal' => img_picto('', 'propal', 'class="pictofixedwidth"').$langs->trans('Proposal'),
|
||||
'commande' => img_picto('', 'order', 'class="pictofixedwidth"').$langs->trans('Order'),
|
||||
'facture' => img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans('Bill'),
|
||||
'fichinter' => img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterventionCard'),
|
||||
'contrat' => img_picto('', 'contract', 'class="pictofixedwidth"').$langs->trans('Contract'),
|
||||
'ticket' => img_picto('', 'ticket', 'class="pictofixedwidth"').$langs->trans('Ticket'),
|
||||
'supplier_proposal' => img_picto('', 'supplier_proposal', 'class="pictofixedwidth"').$langs->trans('SupplierProposal'),
|
||||
'order_supplier' => img_picto('', 'supplier_order', 'class="pictofixedwidth"').$langs->trans('SupplierOrder'),
|
||||
'invoice_supplier' => img_picto('', 'supplier_invoice', 'class="pictofixedwidth"').$langs->trans('SupplierBill'),
|
||||
);
|
||||
if (!empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) {
|
||||
$elementList["societe"] = $langs->trans('ThirdParty');
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
$elementList['conferenceorbooth'] = img_picto('', 'eventorganization', 'class="pictofixedwidth"').$langs->trans('ConferenceOrBooth');
|
||||
}
|
||||
|
||||
complete_elementList_with_modules($elementList);
|
||||
|
||||
asort($elementList);
|
||||
//asort($elementList);
|
||||
$sourceList = array(
|
||||
'internal' => $langs->trans('Internal'),
|
||||
'external' => $langs->trans('External')
|
||||
@ -1202,7 +1201,6 @@ if (GETPOST('from')) {
|
||||
if ($action == 'delete') {
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'rowid='.urlencode($rowid).'&code='.urlencode($code).$paramwithsearch, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
|
||||
}
|
||||
//var_dump($elementList);
|
||||
|
||||
|
||||
/*
|
||||
@ -1960,7 +1958,7 @@ if ($id > 0) {
|
||||
$valuetoshow = price($valuetoshow);
|
||||
}
|
||||
if ($value == 'private') {
|
||||
$valuetoshow = yn($elementList[$valuetoshow]);
|
||||
$valuetoshow = yn($valuetoshow);
|
||||
} elseif ($value == 'libelle_facture') {
|
||||
$langs->load("bills");
|
||||
$key = $langs->trans("PaymentCondition".strtoupper($obj->code));
|
||||
@ -2375,9 +2373,15 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
|
||||
print '<td>';
|
||||
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang');
|
||||
print '</td>';
|
||||
} elseif (in_array($value, array('element', 'source'))) { //Example: the type and source of the element (for contact types)
|
||||
} elseif (in_array($value, array('element', 'source'))) { // Example: the type and source of the element (for contact types)
|
||||
$tmparray = array();
|
||||
if ($value == 'element') {
|
||||
$tmparray = $elementList;
|
||||
} else {
|
||||
$tmparray = $sourceList;
|
||||
}
|
||||
print '<td>';
|
||||
print $form->selectarray($value, $elementList, (!empty($obj->{$value}) ? $obj->{$value}:''));
|
||||
print $form->selectarray($value, $tmparray, (!empty($obj->{$value}) ? $obj->{$value}:''), 0, 0, 0, '', 0, 0, 0, '', 'maxwidth250');
|
||||
print '</td>';
|
||||
} elseif (in_array($value, array('public', 'use_default'))) {
|
||||
// Fields 0/1 with a combo select Yes/No
|
||||
|
||||
@ -61,14 +61,17 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} elseif ($action == 'updateform') {
|
||||
$res1 = 1; $res2 = 1;
|
||||
$res1 = 1; $res2 = 1; $res3 = 1;
|
||||
if (GETPOSTISSET('MAIN_APPLICATION_TITLE')) {
|
||||
$res1 = dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", GETPOST("MAIN_APPLICATION_TITLE", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (GETPOSTISSET('MAIN_SESSION_TIMEOUT')) {
|
||||
$res2 = dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", GETPOST("MAIN_SESSION_TIMEOUT", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if ($res1 && $res2) {
|
||||
if (GETPOSTISSET('MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT')) {
|
||||
$res3 = dolibarr_set_const($db, "MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT", GETPOST("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT", 'alphanohtml'), 'int', 0, '', $conf->entity);
|
||||
}
|
||||
if ($res1 && $res2 && $res3) {
|
||||
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
@ -174,6 +177,14 @@ print '<input class="flat right width50" name="MAIN_SESSION_TIMEOUT" type="text"
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("MaxNumberOfImagesInGetPost").'</td><td class="right">';
|
||||
print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
print '<input class="flat right width50" name="MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT" type="text" value="'.dol_escape_htmltag($conf->global->MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT).'"> '.strtolower($langs->trans("Images"));
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
/*
|
||||
if (empty($conf->global->MAIN_APPLICATION_TITLE)) {
|
||||
$conf->global->MAIN_APPLICATION_TITLE = "";
|
||||
|
||||
@ -643,7 +643,7 @@ print '</tr>'."\n";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("MainDefaultWarehouse").'</td>';
|
||||
print '<td class="right">';
|
||||
print $formproduct->selectWarehouses($conf->global->MAIN_DEFAULT_WAREHOUSE, 'default_warehouse', '', 1, 0, 0, '', 0, 0, array(), 'left reposition');
|
||||
print $formproduct->selectWarehouses(!empty($conf->global->MAIN_DEFAULT_WAREHOUSE) ? $conf->global->MAIN_DEFAULT_WAREHOUSE : -1, 'default_warehouse', '', 1, 0, 0, '', 0, 0, array(), 'left reposition');
|
||||
print '<input type="submit" class="button button-edit small" value="'.$langs->trans("Modify").'">';
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
@ -168,9 +168,10 @@ print '<td class="liste_titre">';
|
||||
print $langs->trans("DatabaseName").' : <b>'.$dolibarr_main_db_name.'</b><br>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '<tr class="oddeven nohover"><td style="padding-left: 8px" class="nohover">';
|
||||
print '<tr class="oddeven nohover"><td style="class="nohover">';
|
||||
|
||||
print '<table class="centpercent noborderbottom">';
|
||||
|
||||
print '<tr>';
|
||||
print '<td class="tdtop nopaddingleftimp">';
|
||||
|
||||
@ -195,27 +196,31 @@ print '</fieldset>';
|
||||
print '</div>';
|
||||
|
||||
print '</td>';
|
||||
print '<td class="tdtop nopaddingrightimp">';
|
||||
print '</tr>';
|
||||
|
||||
print '<button id="btn" type="button" onclick="hideoptions()">'.$langs->trans("ShowAdvancedOptions").'</button>';
|
||||
print '<tr>';
|
||||
print '<td class="tdtop nopaddingleftimp">';
|
||||
|
||||
print '<div class="centpercent center"><a id="lnk" href="javascript:hideoptions()"> '.$langs->trans("ShowAdvancedOptions").'...</a></div>';
|
||||
|
||||
print '<script type="text/javascript">
|
||||
|
||||
function hideoptions(){
|
||||
const btn = document.getElementById("btn");
|
||||
const lnk = document.getElementById("lnk");
|
||||
const div = document.getElementById("div_container_sub_exportoptions");
|
||||
|
||||
if (div.style.display === "none") {
|
||||
div.style.display = "block";
|
||||
btn.innerText="'.$langs->trans("HideAdvancedoptions").'";
|
||||
lnk.innerText="'.$langs->trans("HideAdvancedoptions").'";
|
||||
} else {
|
||||
div.style.display = "none";
|
||||
btn.innerText="'.$langs->trans("ShowAdvancedOptions").'";
|
||||
lnk.innerText="'.$langs->trans("ShowAdvancedOptions").'...";
|
||||
}
|
||||
}
|
||||
</script>';
|
||||
|
||||
print '<div id="div_container_sub_exportoptions" style="display: none;">';
|
||||
print '<br>';
|
||||
if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
print "<!-- Fieldset mysqldump -->\n";
|
||||
print '<fieldset id="mysql_options"><legend>'.$langs->trans("MySqlExportParameters").'</legend>';
|
||||
|
||||
@ -332,6 +332,7 @@ class Categorie extends CommonObject
|
||||
|
||||
// Check parameters
|
||||
if (empty($id) && empty($label) && empty($ref_ext)) {
|
||||
$this->error = "No category to search for";
|
||||
return -1;
|
||||
}
|
||||
if (!is_null($type) && !is_numeric($type)) {
|
||||
@ -389,6 +390,7 @@ class Categorie extends CommonObject
|
||||
|
||||
return 1;
|
||||
} else {
|
||||
$this->error = "No category found";
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -216,6 +216,9 @@ class CActionComm
|
||||
if ($obj->module == 'shipping' && !empty($conf->expedition->enabled) && !empty($user->rights->expedition->lire)) {
|
||||
$qualified = 1;
|
||||
}
|
||||
if (preg_split("/@/", $obj->module, -1)[1] == 'eventorganization' && !empty($conf->eventorganization->enabled)) {
|
||||
$qualified = 1;
|
||||
}
|
||||
// For the generic case with type = 'module...' and module = 'myobject@mymodule'
|
||||
$regs = array();
|
||||
if (preg_match('/^module/', $obj->type)) {
|
||||
|
||||
@ -120,9 +120,9 @@ $usercanclose = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreat
|
||||
$usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->propal->propal_advance->validate)));
|
||||
$usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->propal->propal_advance->send)));
|
||||
|
||||
$usercancreateorder = $user->rights->commande->creer;
|
||||
$usercancreateinvoice = $user->rights->facture->creer;
|
||||
$usercancreatecontract = $user->rights->contrat->creer;
|
||||
$usercancreateorder = $user->hasRight('commande', 'creer');
|
||||
$usercancreateinvoice = $user->hasRight('facture', 'creer');
|
||||
$usercancreatecontract = $user->hasRight('contrat', 'creer');
|
||||
$usercancreateintervention = $user->hasRight('ficheinter', 'creer');
|
||||
$usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer'));
|
||||
|
||||
|
||||
@ -363,11 +363,11 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter',
|
||||
$search_datelimit_start = '';
|
||||
$search_datelimit_end = '';
|
||||
$search_fac_rec_source_title = '';
|
||||
$option = '';
|
||||
$filter = '';
|
||||
$toselect = array();
|
||||
$search_array_options = array();
|
||||
$search_categ_cus = 0;
|
||||
$option = '';
|
||||
$socid = 0;
|
||||
}
|
||||
|
||||
if (empty($reshook)) {
|
||||
@ -919,7 +919,7 @@ if ($resql) {
|
||||
|
||||
llxHeader('', $langs->trans('CustomersInvoices'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
|
||||
|
||||
if ($socid) {
|
||||
if ($socid > 0) {
|
||||
$soc = new Societe($db);
|
||||
$soc->fetch($socid);
|
||||
if (empty($search_company)) {
|
||||
@ -1151,8 +1151,9 @@ if ($resql) {
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
|
||||
print_barre_liste($langs->trans('BillsCustomers').' '.($socid ? ' '.$soc->name : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bill', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
print_barre_liste($langs->trans('BillsCustomers').' '.($socid > 0 ? ' '.$soc->name : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bill', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$topicmail = "SendBillRef";
|
||||
$modelmail = "facture_send";
|
||||
@ -1329,7 +1330,7 @@ if ($resql) {
|
||||
}
|
||||
// Thirdparty
|
||||
if (!empty($arrayfields['s.nom']['checked'])) {
|
||||
print '<td class="liste_titre"><input class="flat maxwidth75imp" type="text" name="search_company" value="'.$search_company.'"></td>';
|
||||
print '<td class="liste_titre"><input class="flat maxwidth75imp" type="text" name="search_company" value="'.$search_company.'"'.($socid > 0 ? " disabled" : "").'></td>';
|
||||
}
|
||||
// Alias
|
||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||
|
||||
@ -64,11 +64,11 @@ $arrayresult = array();
|
||||
|
||||
// Define $searchform
|
||||
|
||||
if (isModEnabled('adherent') && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->rights->adherent->lire) {
|
||||
if (isModEnabled('adherent') && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->hasRight('adherent', 'lire')) {
|
||||
$arrayresult['searchintomember'] = array('position'=>8, 'shortcut'=>'M', 'img'=>'object_member', 'label'=>$langs->trans("SearchIntoMembers", $search_boxvalue), 'text'=>img_picto('', 'object_member', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
|
||||
if (((!empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))) && empty($conf->global->MAIN_SEARCHFORM_SOCIETE_DISABLED) && $user->rights->societe->lire) {
|
||||
if (((isModEnabled('societe') && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_order') || isModEnabled('supplier_invoice'))) && empty($conf->global->MAIN_SEARCHFORM_SOCIETE_DISABLED) && $user->hasRight('societe', 'lire')) {
|
||||
$arrayresult['searchintothirdparty'] = array('position'=>10, 'shortcut'=>'T', 'img'=>'object_company', 'label'=>$langs->trans("SearchIntoThirdparties", $search_boxvalue), 'text'=>img_picto('', 'object_company', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoThirdparties", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/societe/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ if (isModEnabled('societe') && empty($conf->global->MAIN_SEARCHFORM_CONTACT_DISA
|
||||
$arrayresult['searchintocontact'] = array('position'=>15, 'shortcut'=>'A', 'img'=>'object_contact', 'label'=>$langs->trans("SearchIntoContacts", $search_boxvalue), 'text'=>img_picto('', 'object_contact', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoContacts", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/contact/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
|
||||
if (((!empty($conf->product->enabled) && $user->hasRight('produit', 'lire')) || (!empty($conf->service->enabled) && $user->hasRight('service', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_DISABLED)) {
|
||||
if (((isModEnabled('product') && $user->hasRight('produit', 'lire')) || (isModEnabled('service') && $user->hasRight('service', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_DISABLED)) {
|
||||
$arrayresult['searchintoproduct'] = array('position'=>30, 'shortcut'=>'P', 'img'=>'object_product', 'label'=>$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'text'=>img_picto('', 'object_product', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
|
||||
// search on lot/serial numbers
|
||||
if (isModEnabled('productbatch')) {
|
||||
@ -108,13 +108,13 @@ if (isModEnabled('facture') && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_INV
|
||||
$arrayresult['searchintoinvoice'] = array('position'=>90, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_bill', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/compta/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
|
||||
if (isModEnabled('supplier_proposal') && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED) && $user->rights->supplier_proposal->lire) {
|
||||
if (isModEnabled('supplier_proposal') && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED) && $user->hasRight('supplier_proposal', 'lire')) {
|
||||
$arrayresult['searchintosupplierpropal'] = array('position'=>100, 'img'=>'object_supplier_proposal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_proposal', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->lire) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire)) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED)) {
|
||||
if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') && $user->hasRight('supplier_order', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED)) {
|
||||
$arrayresult['searchintosupplierorder'] = array('position'=>110, 'img'=>'object_supplier_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_order', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED)) {
|
||||
if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'facture', 'lire')) || (isModEnabled('supplier_invoice') && $user->hasRight('supplier_invoice', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED)) {
|
||||
$arrayresult['searchintosupplierinvoice'] = array('position'=>120, 'img'=>'object_supplier_invoice', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_invoice', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ if (isModEnabled('facture') && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_INV
|
||||
}
|
||||
|
||||
// Vendor payments
|
||||
if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED)) {
|
||||
if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'facture', 'lire')) || (isModEnabled('supplier_invoice') && $user->hasRight('supplier_invoice', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED)) {
|
||||
$arrayresult['searchintovendorpayments'] = array(
|
||||
'position'=>175,
|
||||
'img'=>'object_payment',
|
||||
@ -139,7 +139,7 @@ if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_S
|
||||
}
|
||||
|
||||
// Miscellaneous payments
|
||||
if (isModEnabled('banque') && empty($conf->global->MAIN_SEARCHFORM_MISC_PAYMENTS_DISABLED) && $user->rights->banque->lire) {
|
||||
if (isModEnabled('banque') && empty($conf->global->MAIN_SEARCHFORM_MISC_PAYMENTS_DISABLED) && $user->hasRight('banque', 'lire')) {
|
||||
$arrayresult['searchintomiscpayments'] = array(
|
||||
'position'=>180,
|
||||
'img'=>'object_payment',
|
||||
@ -148,24 +148,24 @@ if (isModEnabled('banque') && empty($conf->global->MAIN_SEARCHFORM_MISC_PAYMENTS
|
||||
'url'=>DOL_URL_ROOT.'/compta/bank/various_payment/list.php?leftmenu=tax_various'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
|
||||
if (isModEnabled('contrat') && empty($conf->global->MAIN_SEARCHFORM_CONTRACT_DISABLED) && $user->rights->contrat->lire) {
|
||||
if (isModEnabled('contrat') && empty($conf->global->MAIN_SEARCHFORM_CONTRACT_DISABLED) && $user->hasRight('contrat', 'lire')) {
|
||||
$arrayresult['searchintocontract'] = array('position'=>130, 'img'=>'object_contract', 'label'=>$langs->trans("SearchIntoContracts", $search_boxvalue), 'text'=>img_picto('', 'object_contract', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoContracts", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/contrat/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
if (isModEnabled('ficheinter') && empty($conf->global->MAIN_SEARCHFORM_FICHINTER_DISABLED) && $user->rights->ficheinter->lire) {
|
||||
if (isModEnabled('ficheinter') && empty($conf->global->MAIN_SEARCHFORM_FICHINTER_DISABLED) && $user->hasRight('ficheinter', 'lire')) {
|
||||
$arrayresult['searchintointervention'] = array('position'=>140, 'img'=>'object_intervention', 'label'=>$langs->trans("SearchIntoInterventions", $search_boxvalue), 'text'=>img_picto('', 'object_intervention', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoInterventions", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fichinter/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
if (isModEnabled('ticket') && empty($conf->global->MAIN_SEARCHFORM_TICKET_DISABLED) && $user->rights->ticket->read) {
|
||||
if (isModEnabled('ticket') && empty($conf->global->MAIN_SEARCHFORM_TICKET_DISABLED) && $user->hasRight('ticket', 'read')) {
|
||||
$arrayresult['searchintotickets'] = array('position'=>145, 'img'=>'object_ticket', 'label'=>$langs->trans("SearchIntoTickets", $search_boxvalue), 'text'=>img_picto('', 'object_ticket', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoTickets", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/ticket/list.php?mainmenu=ticket'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
|
||||
// HR
|
||||
if (isModEnabled('user') && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->rights->user->user->lire) {
|
||||
if (isModEnabled('user') && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->hasRight('user', 'user', 'lire')) {
|
||||
$arrayresult['searchintouser'] = array('position'=>200, 'shortcut'=>'U', 'img'=>'object_user', 'label'=>$langs->trans("SearchIntoUsers", $search_boxvalue), 'text'=>img_picto('', 'object_user', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoUsers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/user/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
if (isModEnabled('expensereport') && empty($conf->global->MAIN_SEARCHFORM_EXPENSEREPORT_DISABLED) && $user->rights->expensereport->lire) {
|
||||
if (isModEnabled('expensereport') && empty($conf->global->MAIN_SEARCHFORM_EXPENSEREPORT_DISABLED) && $user->hasRight('expensereport', 'lire')) {
|
||||
$arrayresult['searchintoexpensereport'] = array('position'=>210, 'img'=>'object_trip', 'label'=>$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'text'=>img_picto('', 'object_trip', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
if (isModEnabled('holiday') && empty($conf->global->MAIN_SEARCHFORM_HOLIDAY_DISABLED) && $user->rights->holiday->read) {
|
||||
if (isModEnabled('holiday') && empty($conf->global->MAIN_SEARCHFORM_HOLIDAY_DISABLED) && $user->hasRight('holiday', 'read')) {
|
||||
$arrayresult['searchintoleaves'] = array('position'=>220, 'img'=>'object_holiday', 'label'=>$langs->trans("SearchIntoLeaves", $search_boxvalue), 'text'=>img_picto('', 'object_holiday', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
|
||||
|
||||
@ -85,13 +85,19 @@ class box_birthdays extends ModeleBoxes
|
||||
if ($user->rights->user->user->lire) {
|
||||
$tmparray = dol_getdate(dol_now(), true);
|
||||
|
||||
$sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth, u.email, u.statut as status";
|
||||
$sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth as datea, 'birth' as typea, u.email, u.statut as status";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE u.entity IN (".getEntity('user').")";
|
||||
$sql .= " AND u.statut = 1";
|
||||
$sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0);
|
||||
$sql .= " ORDER BY DAY(u.birth) ASC";
|
||||
$sql .= $this->db->plimit($max, 0);
|
||||
$sql .= ' UNION ';
|
||||
$sql .= "SELECT u.rowid, u.firstname, u.lastname, u.dateemployment as datea, 'employment' as typea, u.email, u.statut as status";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE u.entity IN (".getEntity('user').")";
|
||||
$sql .= " AND u.statut = 1";
|
||||
$sql .= dolSqlDateFilter('u.dateemployment', 0, $tmparray['mon'], 0);
|
||||
|
||||
$sql .= " ORDER BY DAY(datea) ASC";
|
||||
|
||||
dol_syslog(get_class($this)."::loadBox", LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
@ -108,9 +114,13 @@ class box_birthdays extends ModeleBoxes
|
||||
$userstatic->email = $objp->email;
|
||||
$userstatic->statut = $objp->status;
|
||||
|
||||
$dateb = $this->db->jdate($objp->birth);
|
||||
$dateb = $this->db->jdate($objp->datea);
|
||||
$age = date('Y', dol_now()) - date('Y', $dateb);
|
||||
|
||||
$picb = '<i class="fas fa-birthday-cake inline-block"></i>';
|
||||
$pice = '<i class="fas fa-briefcase inline-block"></i>';
|
||||
$typea = ($objp->typea == 'birth') ? $picb : $pice;
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => '',
|
||||
'text' => $userstatic->getNomUrl(1),
|
||||
@ -119,7 +129,18 @@ class box_birthdays extends ModeleBoxes
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="center nowraponall"',
|
||||
'text' => dol_print_date($dateb, "day", 'tzserver').' - '.$age.' '.$langs->trans('DurationYears')
|
||||
'text' => dol_print_date($dateb, "day", 'tzserver')
|
||||
);
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="right nowraponall"',
|
||||
'text' => $age.' '.$langs->trans('DurationYears')
|
||||
);
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="center nowraponall"',
|
||||
'text' => $typea,
|
||||
'asis' => 1
|
||||
);
|
||||
|
||||
/*$this->info_box_contents[$line][] = array(
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2019-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2022 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -548,10 +548,18 @@ class CMailFile
|
||||
}
|
||||
|
||||
if (!empty($this->addr_cc)) {
|
||||
$this->message->setCc($this->getArrayAddress($this->addr_cc));
|
||||
try {
|
||||
$this->message->setCc($this->getArrayAddress($this->addr_cc));
|
||||
} catch (Exception $e) {
|
||||
$this->errors[] = $e->getMessage();
|
||||
}
|
||||
}
|
||||
if (!empty($this->addr_bcc)) {
|
||||
$this->message->setBcc($this->getArrayAddress($this->addr_bcc));
|
||||
try {
|
||||
$this->message->setBcc($this->getArrayAddress($this->addr_bcc));
|
||||
} catch (Exception $e) {
|
||||
$this->errors[] = $e->getMessage();
|
||||
}
|
||||
}
|
||||
//if (! empty($this->errors_to)) $this->message->setErrorsTo($this->getArrayAddress($this->errors_to));
|
||||
if (isset($this->deliveryreceipt) && $this->deliveryreceipt == 1) {
|
||||
|
||||
@ -7765,12 +7765,12 @@ abstract class CommonObject
|
||||
} else {
|
||||
$value = '';
|
||||
}
|
||||
} elseif (preg_match('/^(text|html)/', $type)) {
|
||||
$value = dol_htmlentitiesbr($value);
|
||||
} elseif ($type == 'password') {
|
||||
$value = preg_replace('/./i', '*', $value);
|
||||
} elseif ($type == 'array') {
|
||||
$value = implode('<br>', $value);
|
||||
} else { // text|html|varchar
|
||||
$value = dol_htmlentitiesbr($value);
|
||||
}
|
||||
|
||||
//print $type.'-'.$size.'-'.$value;
|
||||
@ -8451,8 +8451,8 @@ abstract class CommonObject
|
||||
/**
|
||||
* Get buy price to use for margin calculation. This function is called when buy price is unknown.
|
||||
* Set buy price = sell price if ForceBuyingPriceIfNull configured,
|
||||
* else if calculation MARGIN_TYPE = 'costprice' and costprice is defined, use costprice as buyprice
|
||||
* else if calculation MARGIN_TYPE = 'pmp' and pmp is calculated, use pmp as buyprice
|
||||
* elseif calculation MARGIN_TYPE = 'costprice' and costprice is defined, use costprice as buyprice
|
||||
* elseif calculation MARGIN_TYPE = 'pmp' and pmp is calculated, use pmp as buyprice
|
||||
* else set min buy price as buy price
|
||||
*
|
||||
* @param float $unitPrice Product unit price
|
||||
@ -8806,7 +8806,7 @@ abstract class CommonObject
|
||||
public function isInt($info)
|
||||
{
|
||||
if (is_array($info)) {
|
||||
if (isset($info['type']) && ($info['type'] == 'int' || preg_match('/^integer/i', $info['type']))) {
|
||||
if (isset($info['type']) && (preg_match('/(^int|int$)/i', $info['type']))) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@ -9065,6 +9065,8 @@ abstract class CommonObject
|
||||
return 'NULL';
|
||||
} elseif (preg_match('/^(int|double|real|price)/i', $fieldsentry['type'])) {
|
||||
return price2num("$value");
|
||||
} elseif (preg_match('/int$/i', $fieldsentry['type'])) {
|
||||
return (int) $value;
|
||||
} elseif ($fieldsentry['type'] == 'boolean') {
|
||||
if ($value) {
|
||||
return 'true';
|
||||
|
||||
@ -85,7 +85,7 @@ class FormMail extends Form
|
||||
public $toid;
|
||||
|
||||
/**
|
||||
* @var string replyto name
|
||||
* @var string Reply-to name
|
||||
*/
|
||||
public $replytoname;
|
||||
|
||||
@ -95,20 +95,25 @@ class FormMail extends Form
|
||||
public $replytomail;
|
||||
|
||||
/**
|
||||
* @var string to name
|
||||
* @var string To name
|
||||
*/
|
||||
public $toname;
|
||||
|
||||
/**
|
||||
* @var string to email
|
||||
* @var string To email
|
||||
*/
|
||||
public $tomail;
|
||||
|
||||
/**
|
||||
* @var string trackid
|
||||
* @var string Track id
|
||||
*/
|
||||
public $trackid;
|
||||
|
||||
/**
|
||||
* @var string If you know a MSGID of an email and want to send the email in reply to it. Will be added into header as In-Reply-To: <...>
|
||||
*/
|
||||
public $inreplyto;
|
||||
|
||||
public $withsubstit; // Show substitution array
|
||||
public $withfrom;
|
||||
|
||||
@ -449,6 +454,7 @@ class FormMail extends Form
|
||||
$out .= '<input style="display:none" type="submit" id="sendmailhidden" name="sendmail">';
|
||||
$out .= '<input type="hidden" name="token" value="'.newToken().'" />';
|
||||
$out .= '<input type="hidden" name="trackid" value="'.$this->trackid.'" />';
|
||||
$out .= '<input type="hidden" name="inreplyto" value="'.$this->inreplyto.'" />';
|
||||
}
|
||||
if (!empty($this->withfrom)) {
|
||||
if (!empty($this->withfromreadonly)) {
|
||||
@ -458,7 +464,7 @@ class FormMail extends Form
|
||||
}
|
||||
foreach ($this->param as $key => $value) {
|
||||
if (is_array($value)) {
|
||||
$out .= "<!-- param key=".$key." is array, we do not output input filed for it -->\n";
|
||||
$out .= "<!-- param key=".$key." is array, we do not output input field for it -->\n";
|
||||
} else {
|
||||
$out .= '<input type="hidden" id="'.$key.'" name="'.$key.'" value="'.$value.'" />'."\n";
|
||||
}
|
||||
|
||||
@ -1093,6 +1093,7 @@ class FormSetupItem
|
||||
$out.= $this->langs->trans("NorProspectNorCustomer");
|
||||
}
|
||||
} elseif ($this->type == 'product') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
$product = new Product($this->db);
|
||||
$resprod = $product->fetch($this->fieldValue);
|
||||
if ($resprod > 0) {
|
||||
|
||||
@ -119,7 +119,7 @@ class FormTicket
|
||||
|
||||
$this->action = 'add';
|
||||
|
||||
$this->withcompany = $conf->societe->enabled ? 1 : 0;
|
||||
$this->withcompany = isModEnabled("societe");
|
||||
$this->withfromsocid = 0;
|
||||
$this->withfromcontactid = 0;
|
||||
//$this->withreadid=0;
|
||||
@ -169,7 +169,7 @@ class FormTicket
|
||||
print dol_get_fiche_head(null, 'card', '', 0, '');
|
||||
}
|
||||
|
||||
print '<form method="POST" '.($withdolfichehead ? '' : 'style="margin-bottom: 30px;" ').'name="ticket" id="form_create_ticket" enctype="multipart/form-data" action="'.$this->param["returnurl"].'">';
|
||||
print '<form method="POST" '.($withdolfichehead ? '' : 'style="margin-bottom: 30px;" ').'name="ticket" id="form_create_ticket" enctype="multipart/form-data" action="'.(!empty($this->param["returnurl"]) ? $this->param["returnurl"] : "").'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="'.$this->action.'">';
|
||||
foreach ($this->param as $key => $value) {
|
||||
@ -341,10 +341,12 @@ class FormTicket
|
||||
print $langs->trans('SubjectAnswerToTicket').' '.$this->topic_title;
|
||||
print '</td></tr>';
|
||||
} else {
|
||||
if ($this->withreadid > 0) {
|
||||
if (isset($this->withreadid) && $this->withreadid > 0) {
|
||||
$subject = $langs->trans('SubjectAnswerToTicket').' '.$this->withreadid.' : '.$this->topic_title.'';
|
||||
} else {
|
||||
$subject = GETPOST('subject', 'alpha');
|
||||
}
|
||||
print '<input class="text minwidth500" id="subject" name="subject" value="'.(GETPOST('subject', 'alpha') ? GETPOST('subject', 'alpha') : $subject).'" autofocus />';
|
||||
print '<input class="text minwidth500" id="subject" name="subject" value="'.$subject.'" autofocus />';
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
@ -643,7 +645,7 @@ class FormTicket
|
||||
|
||||
print '<br>';
|
||||
|
||||
print $form->buttonsSaveCancel((($this->withreadid > 0) ? "SendResponse" : "CreateTicket"), ($this->withcancel ? "Cancel" : ""));
|
||||
print $form->buttonsSaveCancel(((isset($this->withreadid) && $this->withreadid > 0) ? "SendResponse" : "CreateTicket"), ($this->withcancel ? "Cancel" : ""));
|
||||
|
||||
/*
|
||||
print '<div class="center">';
|
||||
|
||||
@ -637,7 +637,10 @@ class Translate
|
||||
);
|
||||
|
||||
if (strpos($key, 'Format') !== 0) {
|
||||
$str = sprintf($str, $param1, $param2, $param3, $param4); // Replace %s and %d except for FormatXXX strings.
|
||||
try {
|
||||
$str = sprintf($str, $param1, $param2, $param3, $param4); // Replace %s and %d except for FormatXXX strings.
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
// Crypt string into HTML
|
||||
|
||||
@ -218,6 +218,36 @@ function dol_ftp_get($connect_id, $file, $newsection)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload a FTP file
|
||||
*
|
||||
* @param resource $connect_id Connection handler
|
||||
* @param string $file File name
|
||||
* @param string $localfile The path to the local file
|
||||
* @param string $newsection $newsection
|
||||
* @return result
|
||||
*/
|
||||
function dol_ftp_put($connect_id, $file, $localfile, $newsection)
|
||||
{
|
||||
|
||||
global $conf;
|
||||
|
||||
if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) {
|
||||
$newsection = ssh2_sftp_realpath($connect_id, ".").'/./'; // workaround for bug https://bugs.php.net/bug.php?id=64169
|
||||
}
|
||||
|
||||
// Remote file
|
||||
$filename = $file;
|
||||
$remotefile = $newsection.(preg_match('@[\\\/]$@', $newsection) ? '' : '/').$file;
|
||||
$newremotefileiso = utf8_decode($remotefile);
|
||||
|
||||
if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) {
|
||||
return ssh2_scp_send($connect_id, $localfile, $newremotefileiso, 0644);
|
||||
} else {
|
||||
return ftp_put($connect_id, $newremotefileiso, $localfile, FTP_BINARY);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove FTP directory
|
||||
*
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019 Thibault Foucart <support@ptibogxiv.net>
|
||||
* Copyright (C) 2019-2022 Thibault Foucart <support@ptibogxiv.net>
|
||||
* Copyright (C) 2020 Open-Dsi <support@open-dsi.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2022 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
@ -954,6 +954,11 @@ function sanitizeVal($out = '', $check = 'alphanohtml', $filter = null, $options
|
||||
|
||||
// Restore entity ' into ' (restricthtml is for html content so we can use html entity)
|
||||
$out = preg_replace('/'/i', "'", $out);
|
||||
|
||||
preg_match_all('/(<img)/i', $out, $reg);
|
||||
if (count($reg[0]) > getDolGlobalInt("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT", 1000)) {
|
||||
$out = '';
|
||||
}
|
||||
} while ($oldstringtoclean != $out);
|
||||
break;
|
||||
case 'custom':
|
||||
@ -7388,6 +7393,9 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
$substitutionarray['__CONTRACT_LOWEST_EXPIRATION_DATE__'] = 'Lowest data for planned expiration of service';
|
||||
$substitutionarray['__CONTRACT_LOWEST_EXPIRATION_DATETIME__'] = 'Lowest date and hour for planned expiration of service';
|
||||
}
|
||||
if (!empty($conf->propal->enabled) && (!is_object($object) || $object->element == 'propal')) {
|
||||
$substitutionarray['__ONLINE_SIGN_URL__'] = 'ToOfferALinkForOnlineSignature';
|
||||
}
|
||||
$substitutionarray['__ONLINE_PAYMENT_URL__'] = 'UrlToPayOnlineIfApplicable';
|
||||
$substitutionarray['__ONLINE_PAYMENT_TEXT_AND_URL__'] = 'TextAndUrlToPayOnlineIfApplicable';
|
||||
$substitutionarray['__SECUREKEYPAYMENT__'] = 'Security key (if key is not unique per record)';
|
||||
@ -10423,7 +10431,7 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url =
|
||||
global $hookmanager, $action, $object, $langs;
|
||||
|
||||
//var_dump($params);
|
||||
if ($params['isDropdown'])
|
||||
if (!empty($params['isDropdown']))
|
||||
$class = "dropdown-item";
|
||||
else {
|
||||
$class = 'butAction';
|
||||
|
||||
@ -56,7 +56,7 @@ function takepos_admin_prepare_head()
|
||||
$numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS);
|
||||
for ($i = 1; $i <= $numterminals; $i++) {
|
||||
$head[$h][0] = DOL_URL_ROOT.'/takepos/admin/terminal.php?terminal='.$i;
|
||||
$head[$h][1] = $langs->trans("Terminal")." ".$i;
|
||||
$head[$h][1] = getDolGlobalString('TAKEPOS_TERMINAL_NAME_'.$i, $langs->trans("TerminalName", $i));
|
||||
$head[$h][2] = 'terminal'.$i;
|
||||
$h++;
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ function ticket_prepare_head($object)
|
||||
$head[$h][2] = 'tabTicket';
|
||||
$h++;
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && empty($user->socid) && $conf->societe->enabled) {
|
||||
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && empty($user->socid) && isModEnabled("societe")) {
|
||||
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
|
||||
$head[$h][0] = DOL_URL_ROOT.'/ticket/contact.php?track_id='.$object->track_id;
|
||||
$head[$h][1] = $langs->trans('ContactsAddresses');
|
||||
|
||||
@ -1154,7 +1154,7 @@ function get_left_menu_home($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu =
|
||||
if ($user->rights->user->user->lire) {
|
||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "users") {
|
||||
$newmenu->add("", $langs->trans("Users"), 1, $user->rights->user->user->lire || $user->admin);
|
||||
$newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"), 2, ($user->rights->user->user->creer || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE), '', 'home');
|
||||
$newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"), 2, ($user->hasRight("user", "user", "write") || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE), '', 'home');
|
||||
$newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->rights->user->user->lire || $user->admin);
|
||||
$newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->rights->user->user->lire || $user->admin);
|
||||
if (isModEnabled('categorie')) {
|
||||
@ -1162,7 +1162,7 @@ function get_left_menu_home($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu =
|
||||
$newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
}
|
||||
$newmenu->add("", $langs->trans("Groups"), 1, ($user->rights->user->user->lire || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
||||
$newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->rights->user->group_advance->write : $user->rights->user->user->creer) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
||||
$newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->hasRight("user", "group_advance", "create") : $user->hasRight("user", "user", "create")) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
||||
$newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->rights->user->group_advance->read : $user->rights->user->user->lire) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
||||
}
|
||||
}
|
||||
|
||||
@ -284,8 +284,8 @@ class doc_generic_asset_odt extends ModelePDFAsset
|
||||
|
||||
dol_mkdir($conf->asset->dir_temp);
|
||||
if (!is_writable($conf->asset->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->asset->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->asset->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -183,16 +183,16 @@ class modPhpbarcode extends ModeleBarCode
|
||||
*/
|
||||
public function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0)
|
||||
{
|
||||
global $conf, $filebarcode;
|
||||
global $conf, $filebarcode, $langs;
|
||||
|
||||
dol_mkdir($conf->barcode->dir_temp);
|
||||
if (!is_writable($conf->barcode->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->barcode->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->barcode->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
$file = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png';
|
||||
$file = $conf->barcode->dir_temp . '/barcode_' . $code . '_' . $encoding . '.png';
|
||||
|
||||
$filebarcode = $file; // global var to be used in barcode_outimage called by barcode_print in buildBarCode
|
||||
|
||||
|
||||
@ -155,16 +155,16 @@ class modTcpdfbarcode extends ModeleBarCode
|
||||
*/
|
||||
public function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0)
|
||||
{
|
||||
global $conf, $_GET;
|
||||
global $conf, $langs, $_GET;
|
||||
|
||||
dol_mkdir($conf->barcode->dir_temp);
|
||||
if (!is_writable($conf->barcode->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->barcode->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->barcode->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
$file = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png';
|
||||
$file = $conf->barcode->dir_temp . '/barcode_' . $code . '_' . $encoding . '.png';
|
||||
|
||||
$tcpdfEncoding = $this->getTcpdfEncodingType($encoding);
|
||||
if (empty($tcpdfEncoding)) {
|
||||
|
||||
@ -274,7 +274,7 @@ class doc_generic_bom_odt extends ModelePDFBom
|
||||
$newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile);
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -283,11 +283,11 @@ class doc_generic_bom_odt extends ModelePDFBom
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -295,8 +295,8 @@ class doc_generic_bom_odt extends ModelePDFBom
|
||||
|
||||
dol_mkdir($conf->bom->dir_temp);
|
||||
if (!is_writable($conf->bom->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->bom->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->bom->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -280,7 +280,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
$newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile);
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -289,11 +289,11 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -301,8 +301,8 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
|
||||
dol_mkdir($conf->commande->dir_temp);
|
||||
if (!is_writable($conf->commande->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->commande->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->commande->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -266,7 +266,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -275,11 +275,11 @@ class doc_generic_contract_odt extends ModelePDFContract
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -287,8 +287,8 @@ class doc_generic_contract_odt extends ModelePDFContract
|
||||
|
||||
dol_mkdir($conf->contrat->dir_temp);
|
||||
if (!is_writable($conf->contrat->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->contrat->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->contrat->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -278,7 +278,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
$newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile);
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -287,11 +287,11 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -299,8 +299,8 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
|
||||
dol_mkdir($conf->expedition->dir_temp);
|
||||
if (!is_writable($conf->expedition->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->expedition->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->expedition->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -278,7 +278,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -287,11 +287,11 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
@ -300,8 +300,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
|
||||
dol_mkdir($conf->facture->dir_temp);
|
||||
if (!is_writable($conf->facture->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->facture->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->facture->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -115,6 +115,32 @@ class pdf_sponge extends ModelePDFFactures
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
|
||||
/**
|
||||
* @var int heightforinfotot
|
||||
*/
|
||||
public $heightforinfotot;
|
||||
|
||||
/**
|
||||
* @var int heightforfreetext
|
||||
*/
|
||||
public $heightforfreetext;
|
||||
|
||||
/**
|
||||
* @var int heightforfooter
|
||||
*/
|
||||
public $heightforfooter;
|
||||
|
||||
/**
|
||||
* @var int tab_top
|
||||
*/
|
||||
public $tab_top;
|
||||
|
||||
/**
|
||||
* @var int tab_top_newpage
|
||||
*/
|
||||
public $tab_top_newpage;
|
||||
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe Object that emits
|
||||
@ -345,9 +371,9 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||
$pdf->SetAutoPageBreak(1, 0);
|
||||
|
||||
$heightforinfotot = 50 + (4 * $nbpayments); // Height reserved to output the info and total part and payment part
|
||||
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + (empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 12 : 22); // Height reserved to output the footer (value include bottom margin)
|
||||
$this->heightforinfotot = 50 + (4 * $nbpayments); // Height reserved to output the info and total part and payment part
|
||||
$this->heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
|
||||
$this->heightforfooter = $this->marge_basse + (empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 12 : 22); // Height reserved to output the footer (value include bottom margin)
|
||||
|
||||
if (class_exists('TCPDF')) {
|
||||
$pdf->setPrintHeader(false);
|
||||
@ -429,9 +455,9 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
// $pdf->GetY() here can't be used. It is bottom of the second addresse box but first one may be higher
|
||||
|
||||
// $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
|
||||
$tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
// $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
|
||||
$this->tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
|
||||
$this->tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
|
||||
// You can add more thing under header here, if you increase $extra_under_address_shift too.
|
||||
$extra_under_address_shift = 0;
|
||||
@ -452,7 +478,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
'module_width' => 1, // width of a single module in points
|
||||
'module_height' => 1 // height of a single module in points
|
||||
);
|
||||
$pdf->write2DBarcode($qrcodestring, 'QRCODE,M', $this->marge_gauche, $tab_top - 5, 25, 25, $styleQr, 'N');
|
||||
$pdf->write2DBarcode($qrcodestring, 'QRCODE,M', $this->marge_gauche, $this->tab_top - 5, 25, 25, $styleQr, 'N');
|
||||
$extra_under_address_shift += 25;
|
||||
}
|
||||
|
||||
@ -469,32 +495,32 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$extra_under_address_shift += $hookmanager->resArray['extra_under_header_shift'];
|
||||
}
|
||||
|
||||
$tab_top += $extra_under_address_shift;
|
||||
$tab_top_newpage += 0;
|
||||
$this->tab_top += $extra_under_address_shift;
|
||||
$this->tab_top_newpage += 0;
|
||||
|
||||
|
||||
// Define heigth of table for lines (for first page)
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
$tab_height = $this->page_hauteur - $this->tab_top - $this->heightforfooter - $this->heightforfreetext;
|
||||
|
||||
$nexY = $tab_top - 1;
|
||||
$nexY = $this->tab_top - 1;
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$tab_top -= 2;
|
||||
$this->tab_top -= 2;
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top - 1, dol_htmlentitiesbr($desc_incoterms), 0, 1);
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $this->tab_top - 1, dol_htmlentitiesbr($desc_incoterms), 0, 1);
|
||||
$nexY = max($pdf->GetY(), $nexY);
|
||||
$height_incoterms = $nexY - $tab_top;
|
||||
$height_incoterms = $nexY - $this->tab_top;
|
||||
|
||||
// Rect takes a length in 3rd parameter
|
||||
$pdf->SetDrawColor(192, 192, 192);
|
||||
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
|
||||
$pdf->Rect($this->marge_gauche, $this->tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
|
||||
|
||||
$tab_top = $nexY + 6;
|
||||
$this->tab_top = $nexY + 6;
|
||||
$height_incoterms += 4;
|
||||
}
|
||||
}
|
||||
@ -521,7 +547,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
$pagenb = $pdf->getPage();
|
||||
if ($notetoshow) {
|
||||
$tab_top -= 2;
|
||||
$this->tab_top -= 2;
|
||||
|
||||
$tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite;
|
||||
$pageposbeforenote = $pagenb;
|
||||
@ -534,7 +560,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$pdf->startTransaction();
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1);
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $this->tab_top, dol_htmlentitiesbr($notetoshow), 0, 1);
|
||||
// Description
|
||||
$pageposafternote = $pdf->getPage();
|
||||
$posyafter = $pdf->GetY();
|
||||
@ -553,29 +579,29 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
|
||||
}
|
||||
// $this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||
$pdf->setTopMargin($tab_top_newpage);
|
||||
$pdf->setTopMargin($this->tab_top_newpage);
|
||||
// The only function to edit the bottom margin of current page to set it.
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext);
|
||||
$pdf->setPageOrientation('', 1, $this->heightforfooter + $this->heightforfreetext);
|
||||
}
|
||||
|
||||
// back to start
|
||||
$pdf->setPage($pageposbeforenote);
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext);
|
||||
$pdf->setPageOrientation('', 1, $this->heightforfooter + $this->heightforfreetext);
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1);
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $this->tab_top, dol_htmlentitiesbr($notetoshow), 0, 1);
|
||||
$pageposafternote = $pdf->getPage();
|
||||
|
||||
$posyafter = $pdf->GetY();
|
||||
|
||||
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) { // There is no space left for total+free text
|
||||
if ($posyafter > ($this->page_hauteur - ($this->heightforfooter + $this->heightforfreetext + 20))) { // There is no space left for total+free text
|
||||
$pdf->AddPage('', '', true);
|
||||
$pagenb++;
|
||||
$pageposafternote++;
|
||||
$pdf->setPage($pageposafternote);
|
||||
$pdf->setTopMargin($tab_top_newpage);
|
||||
$pdf->setTopMargin($this->tab_top_newpage);
|
||||
// The only function to edit the bottom margin of current page to set it.
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext);
|
||||
//$posyafter = $tab_top_newpage;
|
||||
$pdf->setPageOrientation('', 1, $this->heightforfooter + $this->heightforfreetext);
|
||||
//$posyafter = $this->tab_top_newpage;
|
||||
}
|
||||
|
||||
|
||||
@ -588,11 +614,11 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$pdf->SetDrawColor(128, 128, 128);
|
||||
// Draw note frame
|
||||
if ($i > $pageposbeforenote) {
|
||||
$height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter);
|
||||
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
|
||||
$height_note = $this->page_hauteur - ($this->tab_top_newpage + $this->heightforfooter);
|
||||
$pdf->Rect($this->marge_gauche, $this->tab_top_newpage - 1, $tab_width, $height_note + 1);
|
||||
} else {
|
||||
$height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
|
||||
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
|
||||
$height_note = $this->page_hauteur - ($this->tab_top + $this->heightforfooter);
|
||||
$pdf->Rect($this->marge_gauche, $this->tab_top - 1, $tab_width, $height_note + 1);
|
||||
}
|
||||
|
||||
// Add footer
|
||||
@ -610,17 +636,17 @@ class pdf_sponge extends ModelePDFFactures
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
|
||||
}
|
||||
$height_note = $posyafter - $tab_top_newpage;
|
||||
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
|
||||
$height_note = $posyafter - $this->tab_top_newpage;
|
||||
$pdf->Rect($this->marge_gauche, $this->tab_top_newpage - 1, $tab_width, $height_note + 1);
|
||||
} else {
|
||||
// No pagebreak
|
||||
$pdf->commitTransaction();
|
||||
$posyafter = $pdf->GetY();
|
||||
$height_note = $posyafter - $tab_top;
|
||||
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
|
||||
$height_note = $posyafter - $this->tab_top;
|
||||
$pdf->Rect($this->marge_gauche, $this->tab_top - 1, $tab_width, $height_note + 1);
|
||||
|
||||
|
||||
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) {
|
||||
if ($posyafter > ($this->page_hauteur - ($this->heightforfooter + $this->heightforfreetext + 20))) {
|
||||
// not enough space, need to add page
|
||||
$pdf->AddPage('', '', true);
|
||||
$pagenb++;
|
||||
@ -633,12 +659,12 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
|
||||
}
|
||||
|
||||
$posyafter = $tab_top_newpage;
|
||||
$posyafter = $this->tab_top_newpage;
|
||||
}
|
||||
}
|
||||
|
||||
$tab_height = $tab_height - $height_note;
|
||||
$tab_top = $posyafter + 6;
|
||||
$this->tab_top = $posyafter + 6;
|
||||
} else {
|
||||
$height_note = 0;
|
||||
}
|
||||
@ -648,10 +674,10 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
// Table simulation to know the height of the title line (this set this->tableTitleHeight)
|
||||
$pdf->startTransaction();
|
||||
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
|
||||
$this->pdfTabTitles($pdf, $this->tab_top, $tab_height, $outputlangs, $hidetop);
|
||||
$pdf->rollbackTransaction(true);
|
||||
|
||||
$nexY = $tab_top + $this->tabTitleHeight;
|
||||
$nexY = $this->tab_top + $this->tabTitleHeight;
|
||||
|
||||
// Loop on each lines
|
||||
$pageposbeforeprintlines = $pdf->getPage();
|
||||
@ -667,8 +693,8 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$imglinesize = pdf_getSizeForImage($realpatharray[$i]);
|
||||
}
|
||||
|
||||
$pdf->setTopMargin($tab_top_newpage);
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it.
|
||||
$pdf->setTopMargin($this->tab_top_newpage);
|
||||
$pdf->setPageOrientation('', 1, $this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot); // The only function to edit the bottom margin of current page to set it.
|
||||
$pageposbefore = $pdf->getPage();
|
||||
|
||||
$showpricebeforepagebreak = 1;
|
||||
@ -677,14 +703,14 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
if ($this->getColumnStatus('photo')) {
|
||||
// We start with Photo of product line
|
||||
if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) { // If photo too high, we moved completely on new page
|
||||
if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot))) { // If photo too high, we moved completely on new page
|
||||
$pdf->AddPage('', '', true);
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pdf->setPage($pageposbefore + 1);
|
||||
|
||||
$curY = $tab_top_newpage;
|
||||
$curY = $this->tab_top_newpage;
|
||||
|
||||
// Allows data in the first page if description is long enough to break in multiples pages
|
||||
if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) {
|
||||
@ -711,14 +737,14 @@ class pdf_sponge extends ModelePDFFactures
|
||||
if ($pageposafter > $pageposbefore) { // There is a pagebreak
|
||||
$pdf->rollbackTransaction(true);
|
||||
$pageposafter = $pageposbefore;
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||
$pdf->setPageOrientation('', 1, $this->heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||
|
||||
$this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc);
|
||||
|
||||
$pageposafter = $pdf->getPage();
|
||||
$posyafter = $pdf->GetY();
|
||||
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
|
||||
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) { // There is no space left for total+free text
|
||||
//var_dump($posyafter); var_dump(($this->page_hauteur - ($this->heightforfooter+$this->heightforfreetext+$this->heightforinfotot))); exit;
|
||||
if ($posyafter > ($this->page_hauteur - ($this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot))) { // There is no space left for total+free text
|
||||
if ($i == ($nblines - 1)) { // No more lines, and no space left to show total, so we create a new page
|
||||
$pdf->AddPage('', '', true);
|
||||
if (!empty($tplidx)) {
|
||||
@ -752,7 +778,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
// We suppose that a too long description or photo were moved completely on next page
|
||||
if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) {
|
||||
$pdf->setPage($pageposafter);
|
||||
$curY = $tab_top_newpage;
|
||||
$curY = $this->tab_top_newpage;
|
||||
}
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font
|
||||
@ -923,9 +949,9 @@ class pdf_sponge extends ModelePDFFactures
|
||||
while ($pagenb < $pageposafter) {
|
||||
$pdf->setPage($pagenb);
|
||||
if ($pagenb == $pageposbeforeprintlines) {
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis);
|
||||
$this->_tableau($pdf, $this->tab_top, $this->page_hauteur - $this->tab_top - $this->heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis);
|
||||
} else {
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis);
|
||||
$this->_tableau($pdf, $this->tab_top_newpage, $this->page_hauteur - $this->tab_top_newpage - $this->heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis);
|
||||
}
|
||||
$this->_pagefoot($pdf, $object, $outputlangs, 1);
|
||||
$pagenb++;
|
||||
@ -941,9 +967,9 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||
if ($pagenb == $pageposafter) {
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis);
|
||||
$this->_tableau($pdf, $this->tab_top, $this->page_hauteur - $this->tab_top - $this->heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis);
|
||||
} else {
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis);
|
||||
$this->_tableau($pdf, $this->tab_top_newpage, $this->page_hauteur - $this->tab_top_newpage - $this->heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis);
|
||||
}
|
||||
$this->_pagefoot($pdf, $object, $outputlangs, 1);
|
||||
// New page
|
||||
@ -960,11 +986,11 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
// Show square
|
||||
if ($pagenb == $pageposbeforeprintlines) {
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code, $outputlangsbis);
|
||||
$bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
||||
$this->_tableau($pdf, $this->tab_top, $this->page_hauteur - $this->tab_top - $this->heightforinfotot - $this->heightforfreetext - $this->heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code, $outputlangsbis);
|
||||
$bottomlasttab = $this->page_hauteur - $this->heightforinfotot - $this->heightforfreetext - $this->heightforfooter + 1;
|
||||
} else {
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code, $outputlangsbis);
|
||||
$bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
||||
$this->_tableau($pdf, $this->tab_top_newpage, $this->page_hauteur - $this->tab_top_newpage - $this->heightforinfotot - $this->heightforfreetext - $this->heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code, $outputlangsbis);
|
||||
$bottomlasttab = $this->page_hauteur - $this->heightforinfotot - $this->heightforfreetext - $this->heightforfooter + 1;
|
||||
}
|
||||
|
||||
// Display infos area
|
||||
@ -1432,10 +1458,15 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$posy = $pdf->GetY();
|
||||
|
||||
foreach ($TPreviousIncoice as &$fac) {
|
||||
if ($posy > $this->page_hauteur - 4) {
|
||||
if ($posy > $this->page_hauteur - 4 - $this->heightforfooter) {
|
||||
$this->_pagefoot($pdf, $object, $outputlangs, 1);
|
||||
$pdf->addPage();
|
||||
$pdf->setY($this->marge_haute);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
|
||||
$pdf->setY($this->tab_top_newpage);
|
||||
} else {
|
||||
$pdf->setY($this->marge_haute);
|
||||
}
|
||||
$posy = $pdf->GetY();
|
||||
}
|
||||
|
||||
@ -1495,9 +1526,15 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
$posy += $tab2_hl;
|
||||
|
||||
if ($posy > $this->page_hauteur - 4) {
|
||||
if ($posy > $this->page_hauteur - 4 - $this->heightforfooter) {
|
||||
$pdf->addPage();
|
||||
$pdf->setY($this->marge_haute);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
|
||||
$pdf->setY($this->tab_top_newpage);
|
||||
} else {
|
||||
$pdf->setY($this->marge_haute);
|
||||
}
|
||||
|
||||
$posy = $pdf->GetY();
|
||||
}
|
||||
|
||||
|
||||
@ -268,7 +268,7 @@ class doc_generic_member_odt extends ModelePDFMember
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -277,11 +277,11 @@ class doc_generic_member_odt extends ModelePDFMember
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -289,8 +289,8 @@ class doc_generic_member_odt extends ModelePDFMember
|
||||
|
||||
dol_mkdir($conf->adherent->dir_temp);
|
||||
if (!is_writable($conf->adherent->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->adherent->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->adherent->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -250,7 +250,7 @@ class modAdherent extends DolibarrModules
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 78;
|
||||
$this->rights[$r][1] = 'Read subscriptions';
|
||||
$this->rights[$r][1] = 'Read membership fees';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'cotisation';
|
||||
@ -258,7 +258,7 @@ class modAdherent extends DolibarrModules
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 79;
|
||||
$this->rights[$r][1] = 'Create/modify/remove subscriptions';
|
||||
$this->rights[$r][1] = 'Create/modify/remove membership fees';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'cotisation';
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
* \brief Description and activation file for the EventOrganization
|
||||
*/
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
|
||||
/**
|
||||
* Description and activation class for module EventOrganization
|
||||
@ -257,7 +258,7 @@ class modEventOrganization extends DolibarrModules
|
||||
'fk_menu'=>'fk_mainmenu=project,fk_leftmenu=eventorganization', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left', // This is a Left menu entry
|
||||
'titre'=>'New',
|
||||
'url'=>'/projet/card.php?leftmenu=projects&action=create&usage_organize_event=1',
|
||||
'url'=>'/projet/card.php?leftmenu=projects&action=create&usage_organize_event=1&usage_opportunity=0',
|
||||
'langs'=>'eventorganization@eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>1000+$r,
|
||||
'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
@ -367,7 +368,9 @@ class modEventOrganization extends DolibarrModules
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_init($sql, $options);
|
||||
$init = $this->_init($sql, $options);
|
||||
|
||||
return $init;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -267,7 +267,7 @@ class doc_generic_mo_odt extends ModelePDFMo
|
||||
$newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile);
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -276,11 +276,11 @@ class doc_generic_mo_odt extends ModelePDFMo
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -288,8 +288,8 @@ class doc_generic_mo_odt extends ModelePDFMo
|
||||
|
||||
dol_mkdir($conf->mrp->dir_temp);
|
||||
if (!is_writable($conf->mrp->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->mrp->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->mrp->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -278,7 +278,7 @@ class doc_generic_product_odt extends ModelePDFProduct
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -287,11 +287,11 @@ class doc_generic_product_odt extends ModelePDFProduct
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -299,8 +299,8 @@ class doc_generic_product_odt extends ModelePDFProduct
|
||||
|
||||
dol_mkdir($conf->product->dir_temp);
|
||||
if (!is_writable($conf->product->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->product->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->product->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -556,7 +556,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
$newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile);
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -565,11 +565,11 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -577,8 +577,8 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
|
||||
dol_mkdir($conf->project->dir_temp);
|
||||
if (!is_writable($conf->project->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->project->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->project->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -517,9 +517,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$newfiletmp = preg_replace('/\.(ods|odt)/i', '', $newfile);
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
$file = $dir.'/'.$newfiletmp.'.odt';
|
||||
$file = $dir . '/' . $newfiletmp . '.odt';
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -527,8 +527,8 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
|
||||
dol_mkdir($conf->project->dir_temp);
|
||||
if (!is_writable($conf->project->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->project->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->project->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -311,7 +311,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -320,11 +320,11 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -332,8 +332,8 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
|
||||
dol_mkdir($conf->propal->multidir_temp[$object->entity]);
|
||||
if (!is_writable($conf->propal->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->propal->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->propal->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -271,7 +271,7 @@ class doc_generic_reception_odt extends ModelePdfReception
|
||||
$newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile);
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -280,11 +280,11 @@ class doc_generic_reception_odt extends ModelePdfReception
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -292,8 +292,8 @@ class doc_generic_reception_odt extends ModelePdfReception
|
||||
|
||||
dol_mkdir($conf->reception->dir_temp);
|
||||
if (!is_writable($conf->reception->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->reception->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->reception->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -256,7 +256,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_OBJECT_THIRDPARTY_NAME)) {
|
||||
$newfiletmp = dol_sanitizeFileName(dol_string_nospecial($object->name)).'-'.$newfiletmp;
|
||||
$newfiletmp = dol_sanitizeFileName(dol_string_nospecial($object->name)) . '-' . $newfiletmp;
|
||||
$newfiletmp = preg_replace('/__+/', '_', $newfiletmp); // Replace repeated _ into one _ (to avoid string with substitution syntax)
|
||||
}
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
@ -264,11 +264,11 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
$object->builddoc_filename = $filename; // For triggers
|
||||
//print "newfileformat=".$newfileformat;
|
||||
//print "newdir=".$dir;
|
||||
@ -279,8 +279,8 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
|
||||
dol_mkdir($conf->societe->multidir_temp[$object->entity]);
|
||||
if (!is_writable($conf->societe->multidir_temp[$object->entity])) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->societe->multidir_temp[$object->entity];
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->societe->multidir_temp[$object->entity]);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -279,7 +279,7 @@ class doc_generic_stock_odt extends ModelePDFStock
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -288,11 +288,11 @@ class doc_generic_stock_odt extends ModelePDFStock
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -300,8 +300,8 @@ class doc_generic_stock_odt extends ModelePDFStock
|
||||
|
||||
dol_mkdir($conf->product->dir_temp);
|
||||
if (!is_writable($conf->product->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->product->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->product->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -262,7 +262,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
|
||||
$newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile);
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -271,11 +271,11 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -283,8 +283,8 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
|
||||
|
||||
dol_mkdir($conf->fournisseur->commande->dir_temp);
|
||||
if (!is_writable($conf->fournisseur->commande->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->fournisseur->commande->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->fournisseur->commande->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -297,7 +297,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -306,11 +306,11 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -318,8 +318,8 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
||||
|
||||
dol_mkdir($conf->supplier_proposal->dir_temp);
|
||||
if (!is_writable($conf->supplier_proposal->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->supplier_proposal->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->supplier_proposal->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -266,7 +266,7 @@ class doc_generic_ticket_odt extends ModelePDFTicket
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -275,11 +275,11 @@ class doc_generic_ticket_odt extends ModelePDFTicket
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -287,8 +287,8 @@ class doc_generic_ticket_odt extends ModelePDFTicket
|
||||
|
||||
dol_mkdir($conf->ticket->dir_temp);
|
||||
if (!is_writable($conf->ticket->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->ticket->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->ticket->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -297,7 +297,7 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -306,11 +306,11 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -318,8 +318,8 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
|
||||
dol_mkdir($conf->user->dir_temp);
|
||||
if (!is_writable($conf->user->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->user->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->user->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -281,7 +281,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
$newfiletmp = $objectref . '_' . $newfiletmp;
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
@ -290,11 +290,11 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
//print "newdir=".$dir;
|
||||
//print "newfile=".$newfile;
|
||||
//print "file=".$file;
|
||||
@ -302,8 +302,8 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||
|
||||
dol_mkdir($conf->user->dir_temp);
|
||||
if (!is_writable($conf->user->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->user->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->user->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -147,7 +147,8 @@ if ($action == 'presend') {
|
||||
$formmail->fromtype = 'special';
|
||||
}
|
||||
|
||||
$formmail->trackid = $trackid;
|
||||
$formmail->trackid = empty($trackid) ? '' : $trackid;
|
||||
$formmail->inreplyto = empty($inreplyto) ? '' : $inreplyto;
|
||||
$formmail->withfrom = 1;
|
||||
|
||||
// Fill list of recipient with email inside <>.
|
||||
|
||||
@ -115,7 +115,8 @@ class EmailCollector extends CommonObject
|
||||
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>'Example: My Email collector', 'csslist'=>'tdoverflowmax150'),
|
||||
'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>60, 'notnull'=>-1, 'csslist'=>'small'),
|
||||
'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>90, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com', 'csslist'=>'tdoverflow125'),
|
||||
'hostcharset' => array('type'=>'varchar(16)', 'label'=>'HostCharset', 'visible'=>-1, 'enabled'=>1, 'position'=>91, 'notnull'=>0, 'searchall'=>0, 'comment'=>"IMAP server charset", 'help'=>'Example: "UTF-8" (May be "US-ASCII" with some Office365)'),
|
||||
'port' => array('type'=>'varchar(10)', 'label'=>'EMailHostPort', 'visible'=>1, 'enabled'=>1, 'position'=>91, 'notnull'=>1, 'searchall'=>0, 'comment'=>"IMAP server port", 'help'=>'Example: 993', 'csslist'=>'tdoverflow125', 'default'=>'993'),
|
||||
'hostcharset' => array('type'=>'varchar(16)', 'label'=>'HostCharset', 'visible'=>-1, 'enabled'=>1, 'position'=>92, 'notnull'=>0, 'searchall'=>0, 'comment'=>"IMAP server charset", 'help'=>'Example: "UTF-8" (May be "US-ASCII" with some Office365)', 'default'=>'UTF-8'),
|
||||
'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>-1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myaccount@gmail.com'),
|
||||
'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>-1, 'comment'=>"IMAP password", 'help'=>'WithGMailYouCanCreateADedicatedPassword'),
|
||||
'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox', 'help'=>'Example: INBOX'),
|
||||
@ -193,6 +194,7 @@ class EmailCollector extends CommonObject
|
||||
|
||||
|
||||
public $host;
|
||||
public $port;
|
||||
public $hostcharset;
|
||||
public $login;
|
||||
public $password;
|
||||
@ -746,7 +748,7 @@ class EmailCollector extends CommonObject
|
||||
$flags .= '/authuser='.$partofauth[0].'/user='.$partofauth[1];
|
||||
}
|
||||
|
||||
$connectstringserver = '{'.$this->host.':993'.$flags.'}';
|
||||
$connectstringserver = '{'.$this->host.':'.$this->port.$flags.'}';
|
||||
|
||||
return $connectstringserver;
|
||||
}
|
||||
@ -1854,8 +1856,8 @@ class EmailCollector extends CommonObject
|
||||
$actioncomm->label = $langs->trans("ActionAC_".$actioncode).' - '.$langs->trans("MailFrom").' '.$from;
|
||||
$actioncomm->note_private = $descriptionfull;
|
||||
$actioncomm->fk_project = $projectstatic->id;
|
||||
$actioncomm->datep = $date;
|
||||
$actioncomm->datef = $date;
|
||||
$actioncomm->datep = $date; // date of email
|
||||
$actioncomm->datef = $date; // date of email
|
||||
$actioncomm->percentage = -1; // Not applicable
|
||||
$actioncomm->socid = $thirdpartystatic->id;
|
||||
$actioncomm->contact_id = $contactstatic->id;
|
||||
@ -2102,7 +2104,7 @@ class EmailCollector extends CommonObject
|
||||
$percent_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'percent');
|
||||
|
||||
$projecttocreate->title = $subject;
|
||||
$projecttocreate->date_start = $date;
|
||||
$projecttocreate->date_start = $date; // date of email
|
||||
$projecttocreate->date_end = '';
|
||||
$projecttocreate->opp_status = $id_opp_status;
|
||||
$projecttocreate->opp_percent = $percent_opp_status;
|
||||
@ -2210,12 +2212,13 @@ class EmailCollector extends CommonObject
|
||||
$tickettocreate->severity_code = (!empty($conf->global->MAIN_EMAILCOLLECTOR_TICKET_SEVERITY_CODE) ? $conf->global->MAIN_EMAILCOLLECTOR_TICKET_SEVERITY_CODE : dol_getIdFromCode($this->db, 1, 'c_ticket_severity', 'use_default', 'code', 1));
|
||||
$tickettocreate->origin_email = $from;
|
||||
$tickettocreate->fk_user_create = $user->id;
|
||||
$tickettocreate->datec = $date;
|
||||
$tickettocreate->datec = dol_now();
|
||||
$tickettocreate->fk_project = $projectstatic->id;
|
||||
$tickettocreate->notify_tiers_at_create = 0;
|
||||
$tickettocreate->note_private = $descriptionfull;
|
||||
$tickettocreate->entity = $conf->entity;
|
||||
$tickettocreate->email_msgid = $msgid;
|
||||
$tickettocreate->email_date = $date;
|
||||
//$tickettocreate->fk_contact = $contactstatic->id;
|
||||
|
||||
$savesocid = $tickettocreate->socid;
|
||||
@ -2310,12 +2313,13 @@ class EmailCollector extends CommonObject
|
||||
$candidaturetocreate->email = $from;
|
||||
//$candidaturetocreate->lastname = $langs->trans("Anonymous").' - '.$from;
|
||||
$candidaturetocreate->fk_user_creat = $user->id;
|
||||
$candidaturetocreate->date_creation = $date;
|
||||
$candidaturetocreate->date_creation = dol_now();
|
||||
$candidaturetocreate->fk_project = $projectstatic->id;
|
||||
$candidaturetocreate->description = $description;
|
||||
$candidaturetocreate->note_private = $descriptionfull;
|
||||
$candidaturetocreate->entity = $conf->entity;
|
||||
$candidaturetocreate->email_msgid = $msgid;
|
||||
$candidaturetocreate->email_date = $date; // date of email
|
||||
$candidaturetocreate->status = $candidaturetocreate::STATUS_DRAFT;
|
||||
//$candidaturetocreate->fk_contact = $contactstatic->id;
|
||||
|
||||
|
||||
@ -105,8 +105,8 @@ class ConferenceOrBooth extends ActionComm
|
||||
public $fields = array(
|
||||
'id' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
|
||||
'ref' => array('type'=>'integer', 'label'=>'Ref', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>2, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
|
||||
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'csslist'=>'tdoverflowmax125', 'help'=>"Help text", 'showoncombobox'=>'1',),
|
||||
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty", 'picto'=>'company', 'css'=>'tdoverflowmax150 maxwidth500'),
|
||||
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'csslist'=>'tdoverflowmax125', 'help'=>"OrganizationEvenLabelName", 'showoncombobox'=>'1',),
|
||||
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"OrganizationEventLinkToThirdParty", 'picto'=>'company', 'css'=>'tdoverflowmax150 maxwidth500'),
|
||||
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1:t.usage_organize_event=1', 'label'=>'Project', 'enabled'=>'$conf->project->enabled', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'picto'=>'project', 'css'=>'tdoverflowmax150 maxwidth500'),
|
||||
'note' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1),
|
||||
'fk_action' => array('type'=>'sellist:c_actioncomm:libelle:id::module LIKE (\'%@eventorganization\')', 'label'=>'Format', 'enabled'=>'1', 'position'=>60, 'notnull'=>1, 'visible'=>1, 'css'=>'width300'),
|
||||
|
||||
@ -185,7 +185,9 @@ if (!empty($withproject)) {
|
||||
// Tabs for project
|
||||
$tab = 'eventorganisation';
|
||||
$withProjectUrl = "&withproject=1";
|
||||
|
||||
$head = project_prepare_head($projectstatic);
|
||||
|
||||
print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'), 0, '', '');
|
||||
|
||||
$param = ($mode == 'mine' ? '&mode=mine' : '');
|
||||
@ -468,6 +470,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$res = $object->fetch_optionals();
|
||||
|
||||
$head = conferenceorboothPrepareHead($object, $withproject);
|
||||
|
||||
print dol_get_fiche_head($head, 'card', $langs->trans("ConferenceOrBooth"), -1, $object->picto);
|
||||
|
||||
$formconfirm = '';
|
||||
|
||||
@ -58,7 +58,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa
|
||||
if (empty($page) || $page == -1) {
|
||||
$page = 0;
|
||||
} // If $page is not defined, or '' or -1
|
||||
$offset = $liste_limit * $page;
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (!$sortorder) {
|
||||
|
||||
@ -947,7 +947,7 @@ if ($num == 0) {
|
||||
$colspan++;
|
||||
}
|
||||
}
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -47,12 +47,12 @@ function conferenceorboothPrepareHead($object, $with_project = 0)
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
/*
|
||||
$head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_contact.php?id='.$object->id.$withProjectUrl;
|
||||
$head[$h][1] = $langs->trans("ContactsAddresses");
|
||||
$head[$h][2] = 'contact';
|
||||
$h++;
|
||||
*/
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
$head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_contact.php?id='.$object->id.$withProjectUrl;
|
||||
$head[$h][1] = $langs->trans("ContactsAddresses");
|
||||
$head[$h][2] = 'contact';
|
||||
$h++;
|
||||
}
|
||||
|
||||
/*
|
||||
$head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_list.php?conforboothid='.$object->id.$withProjectUrl;
|
||||
|
||||
@ -1012,7 +1012,7 @@ if ($resql) {
|
||||
}
|
||||
// Thirpdarty
|
||||
if (!empty($arrayfields['s.nom']['checked'])) {
|
||||
print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).'"></td>';
|
||||
print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).'"'.($socid > 0 ? " disabled" : "").'></td>';
|
||||
}
|
||||
// Alias
|
||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||
|
||||
@ -131,6 +131,39 @@ if (GETPOST("sendit") && !empty($conf->global->MAIN_UPLOAD_DOC)) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'uploadfile') {
|
||||
// set up a connection or die
|
||||
if (!$conn_id) {
|
||||
$newsectioniso = utf8_decode($section);
|
||||
$resultarray = dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $newsectioniso, $ftp_passive);
|
||||
$conn_id = $resultarray['conn_id'];
|
||||
$ok = $resultarray['ok'];
|
||||
$mesg = $resultarray['mesg'];
|
||||
}
|
||||
if ($conn_id && $ok && !$mesg) {
|
||||
// var_dump($_FILES['userfile']['name']);
|
||||
$nbfile = count($_FILES['userfile']['name']);
|
||||
$i = 0;
|
||||
for (; $i < $nbfile; $i++) {
|
||||
var_dump($i);
|
||||
$newsection = $newsectioniso;
|
||||
$fileupload = $_FILES['userfile']['name'][$i];
|
||||
$fileuploadpath = $_FILES['userfile']['tmp_name'][$i];
|
||||
$result = dol_ftp_put($conn_id, $fileupload, $fileuploadpath, $newsection);
|
||||
|
||||
if ($result) {
|
||||
setEventMessages($langs->trans("FileWasUpload", $fileupload), null, 'mesgs');
|
||||
} else {
|
||||
dol_syslog("ftp/index.php ftp_delete", LOG_ERR);
|
||||
setEventMessages($langs->trans("FTPFailedToUploadFile", $fileupload), null, 'errors');
|
||||
}
|
||||
}
|
||||
$action = '';
|
||||
} else {
|
||||
dol_print_error('', $mesg);
|
||||
}
|
||||
}
|
||||
|
||||
// Action ajout d'un rep
|
||||
if ($action == 'add' && $user->rights->ftp->setup) {
|
||||
$ecmdir->ref = GETPOST("ref");
|
||||
@ -589,6 +622,18 @@ if (!function_exists('ftp_connect')) {
|
||||
print '</div>';
|
||||
|
||||
print "</form>";
|
||||
if ($user->hasRight('ftp', 'write')) {
|
||||
print load_fiche_titre($langs->trans("AttachANewFile"), null, null);
|
||||
print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="numero_ftp" value="'.$numero_ftp.'">';
|
||||
print '<input type="hidden" name="section" value="'.$section.'">';
|
||||
print '<input type="hidden" name="action" value="uploadfile">';
|
||||
print '<td><input type="file" class="flat" name="userfile[]" multiple></td>';
|
||||
print '<td></td>';
|
||||
print '<td align="center"><button type="submit" class="butAction" name="uploadfile" value="'.$langs->trans("Save").'">'.$langs->trans("Upload").'</button></td>';
|
||||
print '</form>';
|
||||
}
|
||||
} else {
|
||||
$foundsetup = false;
|
||||
$MAXFTP = 20;
|
||||
|
||||
@ -54,7 +54,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa
|
||||
if (empty($page) || $page == -1) {
|
||||
$page = 0;
|
||||
} // If $page is not defined, or '' or -1
|
||||
$offset = $liste_limit * $page;
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (!$sortorder) {
|
||||
|
||||
@ -52,7 +52,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa
|
||||
if (empty($page) || $page == -1) {
|
||||
$page = 0;
|
||||
} // If $page is not defined, or '' or -1
|
||||
$offset = $liste_limit * $page;
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (!$sortorder) {
|
||||
|
||||
@ -53,7 +53,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa
|
||||
if (empty($page) || $page == -1) {
|
||||
$page = 0;
|
||||
} // If $page is not defined, or '' or -1
|
||||
$offset = $liste_limit * $page;
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (!$sortorder) {
|
||||
|
||||
@ -53,7 +53,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa
|
||||
if (empty($page) || $page == -1) {
|
||||
$page = 0;
|
||||
} // If $page is not defined, or '' or -1
|
||||
$offset = $liste_limit * $page;
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (!$sortorder) {
|
||||
|
||||
@ -32,88 +32,89 @@
|
||||
|
||||
--
|
||||
-- The types of contact of an element
|
||||
-- Les types de contact d'un element
|
||||
--
|
||||
-- The unique key is set on (element, source, code)
|
||||
--
|
||||
|
||||
-- Contract / Contrat
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (10, 'contrat', 'internal', 'SALESREPSIGN', 'Commercial signataire du contrat', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (11, 'contrat', 'internal', 'SALESREPFOLL', 'Commercial suivi du contrat', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (20, 'contrat', 'external', 'BILLING', 'Contact client facturation contrat', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (21, 'contrat', 'external', 'CUSTOMER', 'Contact client suivi contrat', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (22, 'contrat', 'external', 'SALESREPSIGN', 'Contact client signataire contrat', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('contrat', 'internal', 'SALESREPSIGN', 'Commercial signataire du contrat', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('contrat', 'internal', 'SALESREPFOLL', 'Commercial suivi du contrat', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('contrat', 'external', 'BILLING', 'Contact client facturation contrat', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('contrat', 'external', 'CUSTOMER', 'Contact client suivi contrat', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('contrat', 'external', 'SALESREPSIGN', 'Contact client signataire contrat', 1);
|
||||
|
||||
-- Proposal / Propal
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (31, 'propal', 'internal', 'SALESREPFOLL', 'Commercial à l''origine de la propale', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (40, 'propal', 'external', 'BILLING', 'Contact client facturation propale', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (41, 'propal', 'external', 'CUSTOMER', 'Contact client suivi propale', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (42, 'propal', 'external', 'SHIPPING', 'Contact client livraison propale', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('propal', 'internal', 'SALESREPFOLL', 'Commercial à l''origine de la propale', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('propal', 'external', 'BILLING', 'Contact client facturation propale', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('propal', 'external', 'CUSTOMER', 'Contact client suivi propale', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('propal', 'external', 'SHIPPING', 'Contact client livraison propale', 1);
|
||||
|
||||
-- Customer Invoice / Facture
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (50, 'facture', 'internal', 'SALESREPFOLL', 'Responsable suivi du paiement', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (60, 'facture', 'external', 'BILLING', 'Contact client facturation', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (61, 'facture', 'external', 'SHIPPING', 'Contact client livraison', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (62, 'facture', 'external', 'SERVICE', 'Contact client prestation', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('facture', 'internal', 'SALESREPFOLL', 'Responsable suivi du paiement', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('facture', 'external', 'BILLING', 'Contact client facturation', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('facture', 'external', 'SHIPPING', 'Contact client livraison', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('facture', 'external', 'SERVICE', 'Contact client prestation', 1);
|
||||
|
||||
-- Supplier Invoice
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (70, 'invoice_supplier', 'internal', 'SALESREPFOLL', 'Responsable suivi du paiement', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (71, 'invoice_supplier', 'external', 'BILLING', 'Contact fournisseur facturation', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (72, 'invoice_supplier', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (73, 'invoice_supplier', 'external', 'SERVICE', 'Contact fournisseur prestation', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('invoice_supplier', 'internal', 'SALESREPFOLL', 'Responsable suivi du paiement', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('invoice_supplier', 'external', 'BILLING', 'Contact fournisseur facturation', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('invoice_supplier', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('invoice_supplier', 'external', 'SERVICE', 'Contact fournisseur prestation', 1);
|
||||
|
||||
-- Agenda
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (80, 'agenda', 'internal', 'ACTOR', 'Responsable', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (81, 'agenda', 'internal', 'GUEST', 'Guest', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (85, 'agenda', 'external', 'ACTOR', 'Responsable', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (86, 'agenda', 'external', 'GUEST', 'Guest', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('agenda', 'internal', 'ACTOR', 'Responsable', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('agenda', 'internal', 'GUEST', 'Guest', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('agenda', 'external', 'ACTOR', 'Responsable', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('agenda', 'external', 'GUEST', 'Guest', 1);
|
||||
|
||||
-- Customer Order / Commande
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (91, 'commande', 'internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (100,'commande', 'external', 'BILLING', 'Contact client facturation commande', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (101,'commande', 'external', 'CUSTOMER', 'Contact client suivi commande', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (102,'commande', 'external', 'SHIPPING', 'Contact client livraison commande', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('commande', 'internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('commande', 'external', 'BILLING', 'Contact client facturation commande', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('commande', 'external', 'CUSTOMER', 'Contact client suivi commande', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('commande', 'external', 'SHIPPING', 'Contact client livraison commande', 1);
|
||||
|
||||
-- Intervention / Fichinter
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (120, 'fichinter', 'internal', 'INTERREPFOLL', 'Responsable suivi de l''intervention', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (121, 'fichinter', 'internal', 'INTERVENING', 'Intervenant', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (130, 'fichinter', 'external', 'BILLING', 'Contact client facturation intervention', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (131, 'fichinter', 'external', 'CUSTOMER', 'Contact client suivi de l''intervention', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('fichinter', 'internal', 'INTERREPFOLL', 'Responsable suivi de l''intervention', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('fichinter', 'internal', 'INTERVENING', 'Intervenant', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('fichinter', 'external', 'BILLING', 'Contact client facturation intervention', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('fichinter', 'external', 'CUSTOMER', 'Contact client suivi de l''intervention', 1);
|
||||
|
||||
-- Supplier Order
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (140, 'order_supplier', 'internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (141, 'order_supplier', 'internal', 'SHIPPING', 'Responsable réception de la commande', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (142, 'order_supplier', 'external', 'BILLING', 'Contact fournisseur facturation commande', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (143, 'order_supplier', 'external', 'CUSTOMER', 'Contact fournisseur suivi commande', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (145, 'order_supplier', 'external', 'SHIPPING', 'Contact fournisseur livraison commande', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('order_supplier', 'internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('order_supplier', 'internal', 'SHIPPING', 'Responsable réception de la commande', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('order_supplier', 'external', 'BILLING', 'Contact fournisseur facturation commande', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('order_supplier', 'external', 'CUSTOMER', 'Contact fournisseur suivi commande', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('order_supplier', 'external', 'SHIPPING', 'Contact fournisseur livraison commande', 1);
|
||||
|
||||
-- Resource
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (150, 'dolresource', 'internal', 'USERINCHARGE', 'In charge of resource', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (151, 'dolresource', 'external', 'THIRDINCHARGE', 'In charge of resource', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('dolresource', 'internal', 'USERINCHARGE', 'In charge of resource', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('dolresource', 'external', 'THIRDINCHARGE', 'In charge of resource', 1);
|
||||
|
||||
-- Tickets
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active, module) values (155, 'ticket', 'internal', 'SUPPORTTEC', 'Utilisateur contact support', 1, NULL);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active, module) values (156, 'ticket', 'internal', 'CONTRIBUTOR', 'Intervenant', 1, NULL);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active, module) values (157, 'ticket', 'external', 'SUPPORTCLI', 'Contact client suivi incident', 1, NULL);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active, module) values (158, 'ticket', 'external', 'CONTRIBUTOR', 'Intervenant', 1, NULL);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active, module) values ('ticket', 'internal', 'SUPPORTTEC', 'Utilisateur contact support', 1, NULL);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active, module) values ('ticket', 'internal', 'CONTRIBUTOR', 'Intervenant', 1, NULL);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active, module) values ('ticket', 'external', 'SUPPORTCLI', 'Contact client suivi incident', 1, NULL);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active, module) values ('ticket', 'external', 'CONTRIBUTOR', 'Intervenant', 1, NULL);
|
||||
|
||||
-- Projects / Projet - All project code can start with 'PROJECT'
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (160, 'project', 'internal', 'PROJECTLEADER', 'Chef de Projet', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (161, 'project', 'internal', 'PROJECTCONTRIBUTOR', 'Intervenant', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (170, 'project', 'external', 'PROJECTLEADER', 'Chef de Projet', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (171, 'project', 'external', 'PROJECTCONTRIBUTOR', 'Intervenant', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project', 'internal', 'PROJECTLEADER', 'Chef de Projet', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project', 'internal', 'PROJECTCONTRIBUTOR', 'Intervenant', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project', 'external', 'PROJECTLEADER', 'Chef de Projet', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project', 'external', 'PROJECTCONTRIBUTOR', 'Intervenant', 1);
|
||||
|
||||
-- Project Tasks - All task code can start with 'TASK'
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (180, 'project_task', 'internal', 'TASKEXECUTIVE', 'Responsable', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (181, 'project_task', 'internal', 'TASKCONTRIBUTOR', 'Intervenant', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (190, 'project_task', 'external', 'TASKEXECUTIVE', 'Responsable', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (191, 'project_task', 'external', 'TASKCONTRIBUTOR', 'Intervenant', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project_task', 'internal', 'TASKEXECUTIVE', 'Responsable', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project_task', 'internal', 'TASKCONTRIBUTOR', 'Intervenant', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project_task', 'external', 'TASKEXECUTIVE', 'Responsable', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project_task', 'external', 'TASKCONTRIBUTOR', 'Intervenant', 1);
|
||||
|
||||
-- Supplier proposal
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (110, 'supplier_proposal', 'internal', 'SALESREPFOLL', 'Responsable suivi de la demande', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (111, 'supplier_proposal', 'external', 'BILLING', 'Contact fournisseur facturation', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (112, 'supplier_proposal', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (113, 'supplier_proposal', 'external', 'SERVICE', 'Contact fournisseur prestation', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('supplier_proposal', 'internal', 'SALESREPFOLL', 'Responsable suivi de la demande', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('supplier_proposal', 'external', 'BILLING', 'Contact fournisseur facturation', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('supplier_proposal', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('supplier_proposal', 'external', 'SERVICE', 'Contact fournisseur prestation', 1);
|
||||
|
||||
-- Event Organization
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (210, 'conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (211, 'conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1);
|
||||
insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (212, 'conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1);
|
||||
|
||||
@ -135,8 +135,28 @@ ALTER TABLE llx_partnership ADD UNIQUE INDEX uk_fk_type_fk_member (fk_type, fk_m
|
||||
ALTER TABLE llx_bank ADD COLUMN amount_main_currency double(24,8) NULL;
|
||||
|
||||
|
||||
|
||||
-- v16
|
||||
|
||||
ALTER TABLE llx_element_contact DROP FOREIGN KEY fk_element_contact_fk_c_type_contact;
|
||||
ALTER TABLE llx_societe_contacts DROP FOREIGN KEY fk_societe_contacts_fk_c_type_contact;
|
||||
|
||||
-- VMYSQL4.3 ALTER TABLE llx_c_type_contact ADD PRIMARY KEY(rowid);
|
||||
-- VMYSQL4.3 ALTER TABLE llx_c_type_contact CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
|
||||
|
||||
-- VPGSQL8.2 CREATE SEQUENCE llx_c_type_contact_rowid_seq OWNED BY llx_c_type_contact.rowid;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_type_contact ADD PRIMARY KEY (rowid);
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_type_contact ALTER COLUMN rowid SET DEFAULT nextval('llx_c_type_contact_rowid_seq');
|
||||
-- VPGSQL8.2 SELECT setval('llx_c_type_contact_rowid_seq', MAX(rowid)) FROM llx_c_type_contact;
|
||||
|
||||
insert into llx_c_type_contact(element, source, code, libelle, active ) values ('conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1);
|
||||
insert into llx_c_type_contact(element, source, code, libelle, active ) values ('conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1);
|
||||
insert into llx_c_type_contact(element, source, code, libelle, active ) values ('conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1);
|
||||
|
||||
ALTER TABLE llx_element_contact ADD CONSTRAINT fk_element_contact_fk_c_type_contact FOREIGN KEY (fk_c_type_contact) REFERENCES llx_c_type_contact(rowid);
|
||||
ALTER TABLE llx_societe_contacts ADD CONSTRAINT fk_societe_contacts_fk_c_type_contact FOREIGN KEY (fk_c_type_contact) REFERENCES llx_c_type_contact(rowid);
|
||||
|
||||
|
||||
DROP TABLE llx_payment_salary_extrafields;
|
||||
DROP TABLE llx_asset_model_extrafields;
|
||||
DROP TABLE llx_asset_type_extrafields;
|
||||
|
||||
@ -47,6 +47,9 @@ ALTER TABLE llx_expedition ADD COLUMN billed smallint DEFAULT 0;
|
||||
|
||||
ALTER TABLE llx_accounting_system MODIFY COLUMN pcg_version varchar(32) NOT NULL;
|
||||
|
||||
ALTER TABLE llx_user DROP COLUMN idpers1;
|
||||
ALTER TABLE llx_user DROP COLUMN idpers2;
|
||||
ALTER TABLE llx_user DROP COLUMN idpers3;
|
||||
|
||||
|
||||
-- v17
|
||||
@ -64,5 +67,13 @@ ALTER TABLE llx_ticket ADD COLUMN ip varchar(250);
|
||||
|
||||
ALTER TABLE llx_societe ADD last_main_doc VARCHAR(255) NULL AFTER model_pdf;
|
||||
|
||||
ALTER TABLE llx_emailcollector_emailcollector ADD COLUMN port varchar(10) DEFAULT '993';
|
||||
|
||||
ALTER TABLE llx_bank ADD COLUMN position integer DEFAULT 0;
|
||||
|
||||
ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_product (fk_product);
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD email_date datetime after email_msgid;
|
||||
ALTER TABLE llx_ticket ADD email_date datetime after email_msgid;
|
||||
|
||||
INSERT INTO llx_const (name, entity, value, type, visible) VALUES ('MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT', 1, 1000, 'int', 0);
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
create table llx_c_type_contact
|
||||
(
|
||||
rowid integer PRIMARY KEY,
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
element varchar(30) NOT NULL,
|
||||
source varchar(8) DEFAULT 'external' NOT NULL,
|
||||
code varchar(32) NOT NULL,
|
||||
|
||||
@ -19,3 +19,4 @@
|
||||
ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_commande (fk_commande);
|
||||
ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_reception (fk_reception);
|
||||
ALTER TABLE llx_commande_fournisseur_dispatch ADD CONSTRAINT fk_commande_fournisseur_dispatch_fk_reception FOREIGN KEY (fk_reception) REFERENCES llx_reception (rowid);
|
||||
ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_product (fk_product);
|
||||
|
||||
@ -22,6 +22,7 @@ CREATE TABLE llx_emailcollector_emailcollector(
|
||||
label varchar(255),
|
||||
description text,
|
||||
host varchar(255),
|
||||
port varchar(10) DEFAULT '993',
|
||||
hostcharset varchar(16) DEFAULT 'UTF-8',
|
||||
login varchar(128),
|
||||
password varchar(128),
|
||||
|
||||
@ -38,6 +38,7 @@ CREATE TABLE llx_recruitment_recruitmentcandidature(
|
||||
remuneration_requested integer,
|
||||
remuneration_proposed integer,
|
||||
email_msgid varchar(175), -- Do not use a too large value, it generates trouble with unique index
|
||||
email_date datetime,
|
||||
fk_recruitment_origin INTEGER NULL
|
||||
-- END MODULEBUILDER FIELDS
|
||||
) ENGINE=innodb;
|
||||
|
||||
@ -34,12 +34,13 @@ CREATE TABLE llx_ticket
|
||||
type_code varchar(32),
|
||||
category_code varchar(32),
|
||||
severity_code varchar(32),
|
||||
datec datetime,
|
||||
datec datetime, -- date of creation of record
|
||||
date_read datetime,
|
||||
date_last_msg_sent datetime,
|
||||
date_close datetime,
|
||||
notify_tiers_at_create tinyint,
|
||||
email_msgid varchar(255), -- if ticket is created by email collector, we store here MSG ID
|
||||
email_date datetime, -- if ticket is created by email collector, we store here Date of message
|
||||
ip varchar(250),
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
import_key varchar(14)
|
||||
|
||||
@ -41,6 +41,7 @@ $ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$socid = GETPOST('socid', 'int');
|
||||
|
||||
if (GETPOST('actioncode', 'array')) {
|
||||
$actioncode = GETPOST('actioncode', 'array', 3);
|
||||
@ -80,7 +81,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->knowledgemanagement->multidir_output[$object->entity]."/".$object->id;
|
||||
$upload_dir = (!empty($conf->knowledgemanagement->multidir_output[$object->entity]) ? $conf->knowledgemanagement->multidir_output[$object->entity] : $conf->knowledgemanagement->dir_output)."/".$object->id;
|
||||
}
|
||||
|
||||
// Security check - Protection if external user
|
||||
|
||||
@ -44,7 +44,7 @@ $cancel = GETPOST('cancel', 'aZ09');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'knowledgerecordcard'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||
//$lineid = GETPOST('lineid', 'int');
|
||||
$lineid = GETPOST('lineid', 'int');
|
||||
|
||||
// Initialize technical objects
|
||||
$object = new KnowledgeRecord($db);
|
||||
|
||||
@ -49,7 +49,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa
|
||||
if (empty($page) || $page == -1) {
|
||||
$page = 0;
|
||||
} // If $page is not defined, or '' or -1
|
||||
$offset = $liste_limit * $page;
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (!$sortorder) {
|
||||
|
||||
@ -51,6 +51,7 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'knowledgerecordlist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
$mode = GETPOST('mode', 'aZ09');
|
||||
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
|
||||
@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Primer heu de configurar el vostre pla
|
||||
ErrorFailedToFindEmailTemplate=No s'ha pogut trobar la plantilla amb el nom de codi %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Durada no definida al servei. No hi ha manera de calcular el preu per hora.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=El propietari de l'usuari és obligatori
|
||||
ErrorActionCommBadType=El tipus d'esdeveniment seleccionat (identificador: %n, codi: %s) no existeix al diccionari del tipus d'esdeveniment
|
||||
ErrorActionCommBadType=El tipus d'esdeveniment seleccionat (identificador: %s, codi: %s) no existeix al diccionari del tipus d'esdeveniment
|
||||
CheckVersionFail=Error de comprovació de versió
|
||||
ErrorWrongFileName=El nom del fitxer no pot contenir __COSA__
|
||||
ErrorNotInDictionaryPaymentConditions=No es troba al Diccionari de condicions de pagament, modifiqueu-lo.
|
||||
|
||||
@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Yn gyntaf rhaid i chi osod eich siart c
|
||||
ErrorFailedToFindEmailTemplate=Wedi methu dod o hyd i dempled gydag enw cod %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Hyd heb ei ddiffinio ar y gwasanaeth. Dim ffordd i gyfrifo'r pris fesul awr.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=Mae angen perchennog y defnyddiwr
|
||||
ErrorActionCommBadType=Nid yw'r math o ddigwyddiad a ddewiswyd (id: %n, cod: %s) yn bodoli mewn geiriadur Math o Ddigwyddiad
|
||||
ErrorActionCommBadType=Nid yw'r math o ddigwyddiad a ddewiswyd (id: %s, cod: %s) yn bodoli mewn geiriadur Math o Ddigwyddiad
|
||||
CheckVersionFail=Fersiwn gwirio yn methu
|
||||
ErrorWrongFileName=Ni all enw'r ffeil fod â __SOMETHING__ ynddi
|
||||
ErrorNotInDictionaryPaymentConditions=Ddim yn y Geiriadur Telerau Talu, addaswch.
|
||||
|
||||
@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Du skal først konfigurere din kontopla
|
||||
ErrorFailedToFindEmailTemplate=Kunne ikke finde skabelon med kodenavn %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Varighed er ikke defineret i tjenesten. Ingen måde at beregne timeprisen på.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=Brugerens ejer kræves
|
||||
ErrorActionCommBadType=Den valgte hændelsestype (id: %n, kode: %s) findes ikke i begivenhedstypeordbogen
|
||||
ErrorActionCommBadType=Den valgte hændelsestype (id: %s, kode: %s) findes ikke i begivenhedstypeordbogen
|
||||
CheckVersionFail=Versionskontrol mislykkedes
|
||||
ErrorWrongFileName=Filens navn kan ikke indeholde __SOMETHING__
|
||||
ErrorNotInDictionaryPaymentConditions=Ikke i ordbogen om betalingsbetingelser, bedes du ændre.
|
||||
@ -322,11 +322,6 @@ WarningAvailableOnlyForHTTPSServers=Kun tilgængelig, hvis du bruger HTTPS-sikre
|
||||
WarningModuleXDisabledSoYouMayMissEventHere=Modul %s er ikke aktiveret. Så du går måske glip af en masse begivenheder her.
|
||||
WarningPaypalPaymentNotCompatibleWithStrict=Værdien 'Strict' gør, at onlinebetalingsfunktionerne ikke fungerer korrekt. Brug 'Lax' i stedet.
|
||||
|
||||
<<<<<<< HOVED
|
||||
=======
|
||||
<<<<<<< HOVED
|
||||
<<<<<<< HOVED
|
||||
>>>>>>> gren '15.0' af git@github.com:Dolibarr/dolibarr.git
|
||||
# Validate
|
||||
RequireValidValue = Værdien er ikke gyldig
|
||||
RequireAtLeastXString = Kræver mindst %s karakter (er)
|
||||
@ -347,12 +342,3 @@ BadSetupOfField = Fejl ved dårlig opsætning af feltet
|
||||
BadSetupOfFieldClassNotFoundForValidation = Fejl ved dårlig opsætning af feltet: Klassen blev ikke fundet til validering
|
||||
BadSetupOfFieldFileNotFound = Fejl ved dårlig opsætning af feltet: Filen blev ikke fundet til inkludering
|
||||
BadSetupOfFieldFetchNotCallable = Fejl dårlig opsætning af felt: Hentning kan ikke kaldes på klassen
|
||||
<<<<<<< HOVED
|
||||
=======
|
||||
=======
|
||||
=======
|
||||
>>>>>>> gren '15.0' af git@github.com:Dolibarr/dolibarr.git
|
||||
>>>>>>> gren '15.0' af git@github.com:Dolibarr/dolibarr.git
|
||||
=======
|
||||
>>>>>>> gren '15.0' af git@github.com:Dolibarr/dolibarr.git
|
||||
>>>>>>> gren '15.0' af git@github.com:Dolibarr/dolibarr.git
|
||||
|
||||
@ -271,7 +271,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Sie müssen zuerst Ihren Kontenplan ein
|
||||
ErrorFailedToFindEmailTemplate=Vorlage mit Codename %s konnte nicht gefunden werden
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Die Dauer für die Leistung ist nicht definiert. Es besteht keine Möglichkeit, den Stundenpreis zu berechnen.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=Der Besitzer des Benutzers ist erforderlich
|
||||
ErrorActionCommBadType=Der ausgewählte Ereignistyp (ID: %n, Code: %s) ist im Wörterbuch für den Ereignistyp nicht vorhanden
|
||||
ErrorActionCommBadType=Der ausgewählte Ereignistyp (ID: %s, Code: %s) ist im Wörterbuch für den Ereignistyp nicht vorhanden
|
||||
CheckVersionFail=Versionsprüfung fehlgeschlagen
|
||||
ErrorWrongFileName=Der Dateiname darf nicht __SOMETHING__ enthalten
|
||||
ErrorNotInDictionaryPaymentConditions=Nicht im Dictionary der Zahlungsbedingungen, bitte ändern.
|
||||
|
||||
@ -271,7 +271,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Πρέπει πρώτα να ρυθμί
|
||||
ErrorFailedToFindEmailTemplate=Αδυναμία εύρεσης προτύπου με κωδικό όνομα %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Η διάρκεια δεν έχει οριστεί στην υπηρεσία. Δεν υπάρχει τρόπος υπολογισμού της ωριαίας τιμής.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=Απαιτείται το owner id του χρήστη
|
||||
ErrorActionCommBadType=Ο επιλεγμένος τύπος συμβάντος (αναγνωριστικό: %n, κωδικός: %s) δεν υπάρχει στο λεξικό Τύπου συμβάντος
|
||||
ErrorActionCommBadType=Ο επιλεγμένος τύπος συμβάντος (αναγνωριστικό: %s, κωδικός: %s) δεν υπάρχει στο λεξικό Τύπου συμβάντος
|
||||
CheckVersionFail=Αποτυχία ελέγχου έκδοσης
|
||||
ErrorWrongFileName=Το όνομα του αρχείου δεν μπορεί να έχει __ΚΑΤΙ__ σε αυτό
|
||||
ErrorNotInDictionaryPaymentConditions=Δεν υπάρχει στο Λεξικό Όρων Πληρωμής, παρακαλώ τροποποιήστε.
|
||||
|
||||
@ -2064,6 +2064,7 @@ EmailCollectors=Email collectors
|
||||
EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads).
|
||||
NewEmailCollector=New Email Collector
|
||||
EMailHost=Host of email IMAP server
|
||||
EMailHostPort=Port of email IMAP server
|
||||
MailboxSourceDirectory=Mailbox source directory
|
||||
MailboxTargetDirectory=Mailbox target directory
|
||||
EmailcollectorOperations=Operations to do by collector
|
||||
@ -2292,4 +2293,7 @@ MAIN_MAIL_SMTPS_OAUTH_SERVICE=OAUTH2 authentication service
|
||||
DontForgetCreateTokenOauthMod=A token with the right permissions must have been created upstream with the OAUTH module
|
||||
MAIN_MAIL_SMTPS_AUTH_TYPE=Authentification method
|
||||
UsePassword=Use a password
|
||||
UseOauth=Use a OAUTH token
|
||||
UseOauth=Use a OAUTH token
|
||||
Images=Images
|
||||
MaxNumberOfImagesInGetPost=Max number of images allowed in GETPOST check
|
||||
CIDLookupURL=The module brings an URL that can be used by an external tool to get the name of a thirdparty or contact from its phone number. URL to use is:
|
||||
|
||||
@ -59,7 +59,7 @@ BillsCoinsPad=Coins and banknotes Pad
|
||||
DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr
|
||||
TakeposNeedsCategories=TakePOS needs at least one product categorie to work
|
||||
TakeposNeedsAtLeastOnSubCategoryIntoParentCategory=TakePOS needs at least 1 product category under the category <b>%s</b> to work
|
||||
OrderNotes=Can add some notes to each ordered items
|
||||
OrderNotes=Can add some notes to each ordered items
|
||||
CashDeskBankAccountFor=Default account to use for payments in
|
||||
NoPaimementModesDefined=No paiment mode defined in TakePOS configuration
|
||||
TicketVatGrouped=Group VAT by rate in tickets|receipts
|
||||
@ -118,7 +118,7 @@ ScanToOrder=Scan QR code to order
|
||||
Appearance=Appearance
|
||||
HideCategoryImages=Hide Category Images
|
||||
HideProductImages=Hide Product Images
|
||||
NumberOfLinesToShow=Number of lines of images to show
|
||||
NumberOfLinesToShow=Number of lines of images to show
|
||||
DefineTablePlan=Define tables plan
|
||||
GiftReceiptButton=Add a "Gift receipt" button
|
||||
GiftReceipt=Gift receipt
|
||||
@ -138,8 +138,10 @@ TakeposBarcodeRuleToInsertProduct=Barcode rule to insert product
|
||||
TakeposBarcodeRuleToInsertProductDesc=Rule to extract the product reference + a quantity from a scanned barcode.<br>If empty (default value), application will use the full barcode scanned to find the product.<br><br>If defined, syntax must be:<br><b>ref:NB+qu:NB+qd:NB+other:NB</b><br>where NB is the number of characters to use to extract data from the scanned barcode with: <ul><li><b>ref</b> : product reference</li><li><b>qu</b> : quantity to set when inserting item (units)<l/i><li><b>qd</b> : quantity to set when inserting item (decimals)</li><li><b>other</b> : others characters</li></ul>
|
||||
AlreadyPrinted=Already printed
|
||||
HideCategories=Hide categories
|
||||
HideStockOnLine=Hide stock on line
|
||||
ShowOnlyProductInStock=Show the products in stock
|
||||
HideStockOnLine=Hide stock on line
|
||||
ShowOnlyProductInStock=Show the products in stock
|
||||
ShowCategoryDescription=Show category description
|
||||
ShowProductReference=Show reference of products
|
||||
UsePriceHT=Use price excl. taxes and not price incl. taxes
|
||||
UsePriceHT=Use price excl. taxes and not price incl. taxes
|
||||
TerminalName=Terminal %s
|
||||
TerminalNameDesc=Terminal name
|
||||
|
||||
@ -271,7 +271,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
@ -289,6 +289,7 @@ ErrorInvoiceLoadThirdPartyKey=Third-party key "%s" no set for invoice "%s"
|
||||
ErrorDeleteLineNotAllowedByObjectStatus=Delete line is not allowed by current object status
|
||||
ErrorAjaxRequestFailed=Request failed
|
||||
ErrorThirpdartyOrMemberidIsMandatory=Third party or Member of partnership is mandatory
|
||||
ErrorFailedToWriteInTempDirectory=Failed to write in temp directory
|
||||
|
||||
# Warnings
|
||||
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
|
||||
|
||||
@ -60,6 +60,8 @@ ConferenceOrBoothTab = Conference Or Booth
|
||||
AmountPaid = Amount paid
|
||||
DateOfRegistration = Date of registration
|
||||
ConferenceOrBoothAttendee = Conference Or Booth Attendee
|
||||
ApplicantOrVisitor=Applicant or visitor
|
||||
Speaker=Speaker
|
||||
|
||||
#
|
||||
# Template Mail
|
||||
@ -139,6 +141,7 @@ OrganizationEventPaymentOfRegistrationWasReceived=Your payment for your event re
|
||||
OrganizationEventBulkMailToAttendees=This is a remind about your participation in the event as an attendee
|
||||
OrganizationEventBulkMailToSpeakers=This is a reminder on your participation in the event as a speaker
|
||||
OrganizationEventLinkToThirdParty=Link to third party (customer, supplier or partner)
|
||||
OrganizationEvenLabelName=Public name of the conference or booth
|
||||
|
||||
NewSuggestionOfBooth=Application for a booth
|
||||
NewSuggestionOfConference=Application for a conference
|
||||
|
||||
@ -1185,4 +1185,6 @@ CommercialAffected=Sales representative affected
|
||||
YourMessage=Your message
|
||||
YourMessageHasBeenReceived=Your message has been received. We will answer or contact you as soon as possible.
|
||||
UrlToCheck=Url to check
|
||||
Automation=Automation
|
||||
Automation=Automation
|
||||
CreatedByEmailCollector=Created by Email collector
|
||||
CreatedByPublicPortal=Created from Public portal
|
||||
|
||||
@ -325,4 +325,6 @@ FTPFailedToRemoveDir=Failed to remove directory <b>%s</b>: check permissions and
|
||||
FTPPassiveMode=Passive mode
|
||||
ChooseAFTPEntryIntoMenu=Choose a FTP/SFTP site from the menu...
|
||||
FailedToGetFile=Failed to get files %s
|
||||
ErrorFTPNodisconnect=Error to disconnect FTP/SFTP server
|
||||
ErrorFTPNodisconnect=Error to disconnect FTP/SFTP server
|
||||
FileWasUpload=File <b>%s</b> was upload
|
||||
FTPFailedToUploadFile=Failed to upload file <b>%s</b>.
|
||||
|
||||
@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Primero debe configurar su plan de cuen
|
||||
ErrorFailedToFindEmailTemplate=No se pudo encontrar la plantilla con el nombre de código %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duración no definida en el servicio. No hay forma de calcular el precio por hora.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=Se requiere el propietario del usuario
|
||||
ErrorActionCommBadType=El tipo de evento seleccionado (id: %n, código: %s) no existe en el diccionario de tipo de evento
|
||||
ErrorActionCommBadType=El tipo de evento seleccionado (id: %s, código: %s) no existe en el diccionario de tipo de evento
|
||||
CheckVersionFail=Error de verificación de versión
|
||||
ErrorWrongFileName=El nombre del archivo no puede contener __SOMETHING__
|
||||
ErrorNotInDictionaryPaymentConditions=No está en el Diccionario de términos de pago, modifíquelo.
|
||||
@ -322,11 +322,6 @@ WarningAvailableOnlyForHTTPSServers=Disponible solo si usa una conexión segura
|
||||
WarningModuleXDisabledSoYouMayMissEventHere=El módulo %s no se ha habilitado. Así que puede perderse muchos eventos aquí.
|
||||
WarningPaypalPaymentNotCompatibleWithStrict=El valor 'Estricto' hace que las funciones de pago en línea no funcionen correctamente. Utilice 'Lax' en su lugar.
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
>>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
# Validate
|
||||
RequireValidValue = Valor no válido
|
||||
RequireAtLeastXString = Requiere al menos %s carácter(es)
|
||||
@ -347,12 +342,3 @@ BadSetupOfField = Error de configuración incorrecta del campo
|
||||
BadSetupOfFieldClassNotFoundForValidation = Error de configuración incorrecta del campo: clase no encontrada para validación
|
||||
BadSetupOfFieldFileNotFound = Error de configuración incorrecta del campo: no se encontró el archivo para su inclusión
|
||||
BadSetupOfFieldFetchNotCallable = Error de configuración incorrecta del campo: la recuperación no se puede llamar en la clase
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
=======
|
||||
=======
|
||||
>>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
>>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
=======
|
||||
>>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
>>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
|
||||
@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco
|
||||
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
|
||||
ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price.
|
||||
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
|
||||
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
|
||||
ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary
|
||||
CheckVersionFail=Version check fail
|
||||
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
|
||||
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user