Merge remote-tracking branch 'upstream/develop' into free_email
This commit is contained in:
commit
b9a082f774
@ -298,11 +298,12 @@ if ($action != 'export_csv')
|
|||||||
|
|
||||||
if (!empty($show_subgroup))
|
if (!empty($show_subgroup))
|
||||||
{
|
{
|
||||||
// Permet d'afficher le compte comptable
|
// Show accounting account
|
||||||
if (empty($displayed_account) || $root_account_description != $displayed_account) {
|
if (empty($displayed_account) || $root_account_description != $displayed_account) {
|
||||||
// Affiche un Sous-Total par compte comptable
|
// Show subtotal per accounting account
|
||||||
if ($displayed_account != "") {
|
if ($displayed_account != "") {
|
||||||
print '<tr class="liste_total"><td class="right" colspan="3">' . $langs->trans("SubTotal") . ':</td>';
|
print '<tr class="liste_total">';
|
||||||
|
print '<td class="right" colspan="3">'.$langs->trans("SubTotal").':</td>';
|
||||||
print '<td class="nowrap right">'.price($sous_total_debit).'</td>';
|
print '<td class="nowrap right">'.price($sous_total_debit).'</td>';
|
||||||
print '<td class="nowrap right">'.price($sous_total_credit).'</td>';
|
print '<td class="nowrap right">'.price($sous_total_credit).'</td>';
|
||||||
print '<td class="nowrap right">'.price(price2num($sous_total_credit - $sous_total_debit)).'</td>';
|
print '<td class="nowrap right">'.price(price2num($sous_total_credit - $sous_total_debit)).'</td>';
|
||||||
|
|||||||
@ -8,7 +8,7 @@ CACHE MANIFEST
|
|||||||
# Files listed under CACHE will be ALWAYS cached after they are loaded.
|
# Files listed under CACHE will be ALWAYS cached after they are loaded.
|
||||||
# And they will be always used from Cache after (even after refresh).
|
# And they will be always used from Cache after (even after refresh).
|
||||||
CACHE:
|
CACHE:
|
||||||
theme/dolibarr_logo.png
|
theme/dolibarr_logo.svg
|
||||||
support/
|
support/
|
||||||
support/index.php
|
support/index.php
|
||||||
|
|
||||||
|
|||||||
@ -672,27 +672,27 @@ if (!empty($date_start) && !empty($date_stop))
|
|||||||
} elseif ($data['item'] == 'ExpenseReport') {
|
} elseif ($data['item'] == 'ExpenseReport') {
|
||||||
$expensereport->id = $data['id'];
|
$expensereport->id = $data['id'];
|
||||||
$expensereport->ref = $data['ref'];
|
$expensereport->ref = $data['ref'];
|
||||||
print $expensereport->getNomUrl(1, '', 0, 0, '', 0, 0, 0);
|
print $expensereport->getNomUrl(1, 0, 0, '', 0, 0);
|
||||||
} elseif ($data['item'] == 'SalaryPayment') {
|
} elseif ($data['item'] == 'SalaryPayment') {
|
||||||
$salary_payment->id = $data['id'];
|
$salary_payment->id = $data['id'];
|
||||||
$salary_payment->ref = $data['ref'];
|
$salary_payment->ref = $data['ref'];
|
||||||
print $salary_payment->getNomUrl(1, '', 0, 0, '', 0, 0, 0);
|
print $salary_payment->getNomUrl(1, '', 0, '', 0);
|
||||||
} elseif ($data['item'] == 'Donation') {
|
} elseif ($data['item'] == 'Donation') {
|
||||||
$don->id = $data['id'];
|
$don->id = $data['id'];
|
||||||
$don->ref = $data['ref'];
|
$don->ref = $data['ref'];
|
||||||
print $don->getNomUrl(1, '', 0, 0, '', 0, 0, 0);
|
print $don->getNomUrl(1, 0, '', 0);
|
||||||
} elseif ($data['item'] == 'SocialContributions') {
|
} elseif ($data['item'] == 'SocialContributions') {
|
||||||
$charge_sociales->id = $data['id'];
|
$charge_sociales->id = $data['id'];
|
||||||
$charge_sociales->ref = $data['ref'];
|
$charge_sociales->ref = $data['ref'];
|
||||||
print $charge_sociales->getNomUrl(1, '', 0, 0, '', 0, 0, 0);
|
print $charge_sociales->getNomUrl(1, 0, 0, 0, 0);
|
||||||
} elseif ($data['item'] == 'VariousPayment') {
|
} elseif ($data['item'] == 'VariousPayment') {
|
||||||
$various_payment->id = $data['id'];
|
$various_payment->id = $data['id'];
|
||||||
$various_payment->ref = $data['ref'];
|
$various_payment->ref = $data['ref'];
|
||||||
print $various_payment->getNomUrl(1, '', 0, 0, '', 0, 0, 0);
|
print $various_payment->getNomUrl(1, '', 0, 0);
|
||||||
} elseif ($data['item'] == 'LoanPayment') {
|
} elseif ($data['item'] == 'LoanPayment') {
|
||||||
$payment_loan->id = $data['id'];
|
$payment_loan->id = $data['id'];
|
||||||
$payment_loan->ref = $data['ref'];
|
$payment_loan->ref = $data['ref'];
|
||||||
print $payment_loan->getNomUrl(1, '', 0, 0, '', 0, 0, 0);
|
print $payment_loan->getNomUrl(1, 0, 0, '', 0);
|
||||||
} else {
|
} else {
|
||||||
print $data['ref'];
|
print $data['ref'];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -665,16 +665,18 @@ class Form
|
|||||||
* @param string $selected Value auto selected when at least one record is selected. Not a preselected value. Use '0' by default.
|
* @param string $selected Value auto selected when at least one record is selected. Not a preselected value. Use '0' by default.
|
||||||
* @param array $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action.
|
* @param array $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action.
|
||||||
* @param int $alwaysvisible 1=select button always visible
|
* @param int $alwaysvisible 1=select button always visible
|
||||||
|
* @param string $name Name for massaction
|
||||||
|
* @param string $cssclass CSS class used to check for select
|
||||||
* @return string|void Select list
|
* @return string|void Select list
|
||||||
*/
|
*/
|
||||||
public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0)
|
public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0, $name = 'massaction', $cssclass = 'checkforselect')
|
||||||
{
|
{
|
||||||
global $conf, $langs, $hookmanager;
|
global $conf, $langs, $hookmanager;
|
||||||
|
|
||||||
|
|
||||||
$disabled = 0;
|
$disabled = 0;
|
||||||
$ret = '<div class="centpercent center">';
|
$ret = '<div class="centpercent center">';
|
||||||
$ret .= '<select class="flat'.(empty($conf->use_javascript_ajax) ? '' : ' hideobject').' massaction massactionselect valignmiddle" name="massaction"'.($disabled ? ' disabled="disabled"' : '').'>';
|
$ret .= '<select class="flat'.(empty($conf->use_javascript_ajax) ? '' : ' hideobject').' ' . $name . ' ' . $name . 'select valignmiddle" name="' . $name . '"'.($disabled ? ' disabled="disabled"' : '').'>';
|
||||||
|
|
||||||
// Complete list with data from external modules. THe module can use $_SERVER['PHP_SELF'] to know on which page we are, or use the $parameters['currentcontext'] completed by executeHooks.
|
// Complete list with data from external modules. THe module can use $_SERVER['PHP_SELF'] to know on which page we are, or use the $parameters['currentcontext'] completed by executeHooks.
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
@ -693,46 +695,46 @@ class Form
|
|||||||
|
|
||||||
$ret .= '</select>';
|
$ret .= '</select>';
|
||||||
|
|
||||||
if (empty($conf->dol_optimize_smallscreen)) $ret .= ajax_combobox('.massactionselect');
|
if (empty($conf->dol_optimize_smallscreen)) $ret .= ajax_combobox('.' . $name . 'select');
|
||||||
|
|
||||||
// Warning: if you set submit button to disabled, post using 'Enter' will no more work if there is no another input submit. So we add a hidden button
|
// Warning: if you set submit button to disabled, post using 'Enter' will no more work if there is no another input submit. So we add a hidden button
|
||||||
$ret .= '<input type="submit" name="confirmmassactioninvisible" style="display: none" tabindex="-1">'; // Hidden button BEFORE so it is the one used when we submit with ENTER.
|
$ret .= '<input type="submit" name="confirmmassactioninvisible" style="display: none" tabindex="-1">'; // Hidden button BEFORE so it is the one used when we submit with ENTER.
|
||||||
$ret .= '<input type="submit" disabled name="confirmmassaction" class="button'.(empty($conf->use_javascript_ajax) ? '' : ' hideobject').' massaction massactionconfirmed" value="'.dol_escape_htmltag($langs->trans("Confirm")).'">';
|
$ret .= '<input type="submit" disabled name="confirmmassaction" class="button'.(empty($conf->use_javascript_ajax) ? '' : ' hideobject').' ' . $name . ' ' . $name . 'confirmed" value="'.dol_escape_htmltag($langs->trans("Confirm")).'">';
|
||||||
$ret .= '</div>';
|
$ret .= '</div>';
|
||||||
|
|
||||||
if (!empty($conf->use_javascript_ajax))
|
if (!empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
$ret .= '<!-- JS CODE TO ENABLE mass action select -->
|
$ret .= '<!-- JS CODE TO ENABLE mass action select -->
|
||||||
<script>
|
<script>
|
||||||
function initCheckForSelect(mode) /* mode is 0 during init of page or click all, 1 when we click on 1 checkbox */
|
function initCheckForSelect(mode, name, cssclass) /* mode is 0 during init of page or click all, 1 when we click on 1 checkboxi, "name" refers to the class of the massaction button, "cssclass" to the class of the checkfor select boxes */
|
||||||
{
|
{
|
||||||
atleastoneselected=0;
|
atleastoneselected=0;
|
||||||
jQuery(".checkforselect").each(function( index ) {
|
jQuery("."+cssclass).each(function( index ) {
|
||||||
/* console.log( index + ": " + $( this ).text() ); */
|
/* console.log( index + ": " + $( this ).text() ); */
|
||||||
if ($(this).is(\':checked\')) atleastoneselected++;
|
if ($(this).is(\':checked\')) atleastoneselected++;
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("initCheckForSelect mode="+mode+" atleastoneselected="+atleastoneselected);
|
console.log("initCheckForSelect mode="+mode+" name="+name+" cssclass="+cssclass+" atleastoneselected="+atleastoneselected);
|
||||||
|
|
||||||
if (atleastoneselected || '.$alwaysvisible.')
|
if (atleastoneselected || '.$alwaysvisible.')
|
||||||
{
|
{
|
||||||
jQuery(".massaction").show();
|
jQuery("."+name).show();
|
||||||
'.($selected ? 'if (atleastoneselected) { jQuery(".massactionselect").val("'.$selected.'").trigger(\'change\'); jQuery(".massactionconfirmed").prop(\'disabled\', false); }' : '').'
|
'.($selected ? 'if (atleastoneselected) { jQuery("."+name+"select").val("'.$selected.'").trigger(\'change\'); jQuery("."+name+"confirmed").prop(\'disabled\', false); }' : '').'
|
||||||
'.($selected ? 'if (! atleastoneselected) { jQuery(".massactionselect").val("0").trigger(\'change\'); jQuery(".massactionconfirmed").prop(\'disabled\', true); } ' : '').'
|
'.($selected ? 'if (! atleastoneselected) { jQuery("."+name+"select").val("0").trigger(\'change\'); jQuery("."+name+"confirmed").prop(\'disabled\', true); } ' : '').'
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
jQuery(".massaction").hide();
|
jQuery("."+name).hide();
|
||||||
jQuery(".massactionother").hide();
|
jQuery("."+name+"other").hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
initCheckForSelect(0);
|
initCheckForSelect(0, "' . $name . '", "' . $cssclass . '");
|
||||||
jQuery(".checkforselect").click(function() {
|
jQuery(".' . $cssclass . '").click(function() {
|
||||||
initCheckForSelect(1);
|
initCheckForSelect(1, "'.$name.'", "' . $cssclass . '");
|
||||||
});
|
});
|
||||||
jQuery(".massactionselect").change(function() {
|
jQuery(".' . $name . 'select").change(function() {
|
||||||
var massaction = $( this ).val();
|
var massaction = $( this ).val();
|
||||||
var urlform = $( this ).closest("form").attr("action").replace("#show_files","");
|
var urlform = $( this ).closest("form").attr("action").replace("#show_files","");
|
||||||
if (massaction == "builddoc")
|
if (massaction == "builddoc")
|
||||||
@ -744,13 +746,13 @@ class Form
|
|||||||
/* Warning: if you set submit button to disabled, post using Enter will no more work if there is no other button */
|
/* Warning: if you set submit button to disabled, post using Enter will no more work if there is no other button */
|
||||||
if ($(this).val() != \'0\')
|
if ($(this).val() != \'0\')
|
||||||
{
|
{
|
||||||
jQuery(".massactionconfirmed").prop(\'disabled\', false);
|
jQuery(".' . $name . 'confirmed").prop(\'disabled\', false);
|
||||||
jQuery(".massactionother").show();
|
jQuery(".' . $name . 'other").show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
jQuery(".massactionconfirmed").prop(\'disabled\', true);
|
jQuery(".' . $name . 'confirmed").prop(\'disabled\', true);
|
||||||
jQuery(".massactionother").hide();
|
jQuery(".' . $name . 'other").hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -7824,18 +7826,19 @@ class Form
|
|||||||
*
|
*
|
||||||
* @param string $cssclass CSS class
|
* @param string $cssclass CSS class
|
||||||
* @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes
|
* @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes
|
||||||
|
* @param string $massactionname Mass action button name that will launch an action on the selected items
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function showCheckAddButtons($cssclass = 'checkforaction', $calljsfunction = 0)
|
public function showCheckAddButtons($cssclass = 'checkforaction', $calljsfunction = 0, $massactionname = "massaction")
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$out = '';
|
$out = '';
|
||||||
$id = uniqid();
|
$id = uniqid();
|
||||||
if (!empty($conf->use_javascript_ajax)) $out .= '<div class="inline-block checkallactions"><input type="checkbox" id="checkallactions'.$id.'" name="checkallactions" class="checkallactions"></div>';
|
if (!empty($conf->use_javascript_ajax)) $out .= '<div class="inline-block checkallactions"><input type="checkbox" id="' . $cssclass . 's" name="' . $cssclass . 's" class="checkallactions"></div>';
|
||||||
$out .= '<script>
|
$out .= '<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#checkallactions'.$id.'").click(function() {
|
$("#' . $cssclass . 's").click(function() {
|
||||||
if($(this).is(\':checked\')){
|
if($(this).is(\':checked\')){
|
||||||
console.log("We check all '.$cssclass.'");
|
console.log("We check all '.$cssclass.'");
|
||||||
$(".'.$cssclass.'").prop(\'checked\', true).trigger(\'change\');
|
$(".'.$cssclass.'").prop(\'checked\', true).trigger(\'change\');
|
||||||
@ -7845,10 +7848,10 @@ class Form
|
|||||||
console.log("We uncheck all");
|
console.log("We uncheck all");
|
||||||
$(".'.$cssclass.'").prop(\'checked\', false).trigger(\'change\');
|
$(".'.$cssclass.'").prop(\'checked\', false).trigger(\'change\');
|
||||||
}'."\n";
|
}'."\n";
|
||||||
if ($calljsfunction) $out .= 'if (typeof initCheckForSelect == \'function\') { initCheckForSelect(0); } else { console.log("No function initCheckForSelect found. Call won\'t be done."); }';
|
if ($calljsfunction) $out .= 'if (typeof initCheckForSelect == \'function\') { initCheckForSelect(0, "' . $massactionname . '", "' . $cssclass . '"); } else { console.log("No function initCheckForSelect found. Call won\'t be done."); }';
|
||||||
$out .= ' });
|
$out .= ' });
|
||||||
|
|
||||||
$(".checkforselect").change(function() {
|
$(".' . $cssclass . '").change(function() {
|
||||||
$(this).closest("tr").toggleClass("highlight", this.checked);
|
$(this).closest("tr").toggleClass("highlight", this.checked);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -7864,14 +7867,15 @@ class Form
|
|||||||
* @param int $addcheckuncheckall Add the check all/uncheck all checkbox (use javascript) and code to manage this
|
* @param int $addcheckuncheckall Add the check all/uncheck all checkbox (use javascript) and code to manage this
|
||||||
* @param string $cssclass CSS class
|
* @param string $cssclass CSS class
|
||||||
* @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes
|
* @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes
|
||||||
|
* @param string $massactionname Mass action name
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function showFilterAndCheckAddButtons($addcheckuncheckall = 0, $cssclass = 'checkforaction', $calljsfunction = 0)
|
public function showFilterAndCheckAddButtons($addcheckuncheckall = 0, $cssclass = 'checkforaction', $calljsfunction = 0, $massactionname = "massaction")
|
||||||
{
|
{
|
||||||
$out = $this->showFilterButtons();
|
$out = $this->showFilterButtons();
|
||||||
if ($addcheckuncheckall)
|
if ($addcheckuncheckall)
|
||||||
{
|
{
|
||||||
$out .= $this->showCheckAddButtons($cssclass, $calljsfunction);
|
$out .= $this->showCheckAddButtons($cssclass, $calljsfunction, $massactionname);
|
||||||
}
|
}
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -620,11 +620,12 @@ class FormProjets
|
|||||||
* @param int $showallnone Add choice "All" and "None"
|
* @param int $showallnone Add choice "All" and "None"
|
||||||
* @param int $showpercent Show default probability for status
|
* @param int $showpercent Show default probability for status
|
||||||
* @param string $morecss Add more css
|
* @param string $morecss Add more css
|
||||||
|
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
|
||||||
* @return int|string The HTML select list of element or '' if nothing or -1 if KO
|
* @return int|string The HTML select list of element or '' if nothing or -1 if KO
|
||||||
*/
|
*/
|
||||||
public function selectOpportunityStatus($htmlname, $preselected = '-1', $showempty = 1, $useshortlabel = 0, $showallnone = 0, $showpercent = 0, $morecss = '')
|
public function selectOpportunityStatus($htmlname, $preselected = '-1', $showempty = 1, $useshortlabel = 0, $showallnone = 0, $showpercent = 0, $morecss = '', $noadmininfo = 0)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs, $user;
|
||||||
|
|
||||||
$sql = "SELECT rowid, code, label, percent";
|
$sql = "SELECT rowid, code, label, percent";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX.'c_lead_status';
|
$sql .= " FROM ".MAIN_DB_PREFIX.'c_lead_status';
|
||||||
@ -670,6 +671,7 @@ class FormProjets
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$sellist .= '</select>';
|
$sellist .= '</select>';
|
||||||
|
if ($user->admin && !$noadmininfo) $sellist .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
}
|
}
|
||||||
/*else
|
/*else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -328,6 +328,8 @@ class Interfaces
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$text = '';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$objMod = new $modName($db);
|
$objMod = new $modName($db);
|
||||||
|
|
||||||
|
|||||||
@ -3149,7 +3149,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
if (empty($srconly) && in_array($pictowithouttext, array(
|
if (empty($srconly) && in_array($pictowithouttext, array(
|
||||||
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
|
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
|
||||||
'accountancy', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'bookmark', 'bom', 'building',
|
'accountancy', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'bookmark', 'bom', 'building',
|
||||||
'cash-register', 'check', 'close_title', 'company', 'contact', 'contract', 'cubes',
|
'cash-register', 'category', 'check', 'close_title', 'company', 'contact', 'contract', 'cubes',
|
||||||
'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'external-link-alt', 'external-link-square-alt',
|
'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'external-link-alt', 'external-link-square-alt',
|
||||||
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'help',
|
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'help',
|
||||||
'intervention', 'label', 'language', 'list', 'listlight', 'lot',
|
'intervention', 'label', 'language', 'list', 'listlight', 'lot',
|
||||||
|
|||||||
@ -2226,10 +2226,10 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $projectstatic->getNomUrl(1);
|
print $projectstatic->getNomUrl(1, '', 0, '', '-', 0 , -1, 'nowraponall');
|
||||||
if (!in_array('projectlabel', $hiddenfields)) print '<br><span class="opacitymedium">'.dol_trunc($objp->title, 24).'</span>';
|
if (!in_array('projectlabel', $hiddenfields)) print '<br><span class="opacitymedium">'.dol_trunc($objp->title, 24).'</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td class="nowraponall tdoverflowmax100">';
|
||||||
if ($objp->fk_soc > 0)
|
if ($objp->fk_soc > 0)
|
||||||
{
|
{
|
||||||
$thirdpartystatic->id = $objp->fk_soc;
|
$thirdpartystatic->id = $objp->fk_soc;
|
||||||
|
|||||||
@ -230,8 +230,8 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $
|
|||||||
} elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) {
|
} elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) {
|
||||||
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$mysoc->logo);
|
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$mysoc->logo);
|
||||||
$width = 150;
|
$width = 150;
|
||||||
} elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png')) {
|
} elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) {
|
||||||
$urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.png';
|
$urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -254,7 +254,7 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $
|
|||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
||||||
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.png" width="80px"></a></div>';
|
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>';
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -470,15 +470,15 @@ class DataPolicyCron
|
|||||||
{
|
{
|
||||||
$sql = sprintf($params['sql'], (int) $conf->entity, (int) $conf->global->$key, (int) $conf->global->$key);
|
$sql = sprintf($params['sql'], (int) $conf->entity, (int) $conf->global->$key, (int) $conf->global->$key);
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
if ($resql && $db->num_rows($resql) > 0)
|
if ($resql && $this->db->num_rows($resql) > 0)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
require_once $params['file'];
|
require_once $params['file'];
|
||||||
$object = new $params['class']($db);
|
$object = new $params['class']($this->db);
|
||||||
|
|
||||||
while ($i < $num && !$error)
|
while ($i < $num && !$error)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -918,9 +918,11 @@ class Don extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||||
* @param int $notooltip 1=Disable tooltip
|
* @param int $notooltip 1=Disable tooltip
|
||||||
|
* @param string $moretitle Add more text to title tooltip
|
||||||
|
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||||
* @return string Chaine avec URL
|
* @return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
public function getNomUrl($withpicto = 0, $notooltip = 0)
|
public function getNomUrl($withpicto = 0, $notooltip = 0, $moretitle = '', $save_lastsearch_value = -1)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
@ -928,10 +930,18 @@ class Don extends CommonObject
|
|||||||
|
|
||||||
$result = '';
|
$result = '';
|
||||||
$label = '<u>'.$langs->trans("Donation").'</u>';
|
$label = '<u>'.$langs->trans("Donation").'</u>';
|
||||||
if (!empty($this->id))
|
if (!empty($this->id)) {
|
||||||
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->id;
|
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->id;
|
||||||
|
}
|
||||||
|
if ($moretitle) $label .= ' - '.$moretitle;
|
||||||
|
|
||||||
$linkstart = '<a href="'.DOL_URL_ROOT.'/don/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
$url = DOL_URL_ROOT.'/don/card.php?id='.$this->id;
|
||||||
|
|
||||||
|
$add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
|
||||||
|
if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1;
|
||||||
|
if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1';
|
||||||
|
|
||||||
|
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
$linkend = '</a>';
|
$linkend = '</a>';
|
||||||
|
|
||||||
$result .= $linkstart;
|
$result .= $linkstart;
|
||||||
|
|||||||
@ -234,6 +234,7 @@ ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Third-party unkno
|
|||||||
ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Third-party account not defined or third party unknown. Blocking error.
|
ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Third-party account not defined or third party unknown. Blocking error.
|
||||||
UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Unknown third-party account and waiting account not defined. Blocking error
|
UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Unknown third-party account and waiting account not defined. Blocking error
|
||||||
PaymentsNotLinkedToProduct=Payment not linked to any product / service
|
PaymentsNotLinkedToProduct=Payment not linked to any product / service
|
||||||
|
OpeningBalance=Opening balance
|
||||||
ShowOpeningBalance=Show opening balance
|
ShowOpeningBalance=Show opening balance
|
||||||
HideOpeningBalance=Hide opening balance
|
HideOpeningBalance=Hide opening balance
|
||||||
ShowSubtotalByGroup=Show subtotal by group
|
ShowSubtotalByGroup=Show subtotal by group
|
||||||
|
|||||||
@ -255,7 +255,7 @@ ServiceToUseOnLines=Service to use on lines
|
|||||||
InvoiceGeneratedFromTimeSpent=Invoice %s has been generated from time spent on project
|
InvoiceGeneratedFromTimeSpent=Invoice %s has been generated from time spent on project
|
||||||
ProjectBillTimeDescription=Check if you enter timesheet on tasks of project AND you plan to generate invoice(s) from the timesheet to bill the customer of the project (do not check if you plan to create invoice that is not based on entered timesheets). Note: To generate invoice, go on tab 'Time spent' of the project and select lines to include.
|
ProjectBillTimeDescription=Check if you enter timesheet on tasks of project AND you plan to generate invoice(s) from the timesheet to bill the customer of the project (do not check if you plan to create invoice that is not based on entered timesheets). Note: To generate invoice, go on tab 'Time spent' of the project and select lines to include.
|
||||||
ProjectFollowOpportunity=Follow opportunity
|
ProjectFollowOpportunity=Follow opportunity
|
||||||
ProjectFollowTasks=Follow tasks
|
ProjectFollowTasks=Follow tasks or time spent
|
||||||
Usage=Usage
|
Usage=Usage
|
||||||
UsageOpportunity=Usage: Opportunity
|
UsageOpportunity=Usage: Opportunity
|
||||||
UsageTasks=Usage: Tasks
|
UsageTasks=Usage: Tasks
|
||||||
|
|||||||
@ -509,23 +509,37 @@ class PaymentLoan extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=No picto
|
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=No picto
|
||||||
* @param int $maxlen Max length label
|
* @param int $maxlen Max length label
|
||||||
* @return string Chaine with URL
|
* @param int $notooltip 1=Disable tooltip
|
||||||
|
* @param string $moretitle Add more text to title tooltip
|
||||||
|
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||||
|
* @return string String with URL
|
||||||
*/
|
*/
|
||||||
public function getNomUrl($withpicto = 0, $maxlen = 0)
|
public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $moretitle = '', $save_lastsearch_value = -1)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs, $conf;
|
||||||
|
|
||||||
|
if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips
|
||||||
|
|
||||||
$result = '';
|
$result = '';
|
||||||
|
$label = '<u>'.$langs->trans("Loan").'</u>';
|
||||||
|
if (!empty($this->id)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->id;
|
||||||
|
}
|
||||||
|
if ($moretitle) $label .= ' - '.$moretitle;
|
||||||
|
|
||||||
if (!empty($this->id))
|
$url = DOL_URL_ROOT.'/loan/payment/card.php?id='.$this->id;
|
||||||
{
|
|
||||||
$link = '<a href="'.DOL_URL_ROOT.'/loan/payment/card.php?id='.$this->id.'">';
|
$add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
|
||||||
|
if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1;
|
||||||
|
if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1';
|
||||||
|
|
||||||
|
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
$linkend = '</a>';
|
$linkend = '</a>';
|
||||||
|
|
||||||
if ($withpicto) $result .= ($link.img_object($langs->trans("ShowPayment").': '.$this->ref, 'payment').$linkend.' ');
|
$result .= $linkstart;
|
||||||
if ($withpicto && $withpicto != 2) $result .= ' ';
|
if ($withpicto) $result .= img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
|
||||||
if ($withpicto != 2) $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend;
|
if ($withpicto != 2) $result .= $this->ref;
|
||||||
}
|
$result .= $linkend;
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -440,7 +440,7 @@ class MyObject extends CommonObject
|
|||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < min($limit, $num))
|
while ($i < ($limit ? min($limit, $num) : $num))
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
|
|||||||
@ -121,7 +121,7 @@ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $
|
|||||||
print '>';
|
print '>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
||||||
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.png" width="80px"></a></div>';
|
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>';
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1015,7 +1015,7 @@ class Product extends CommonObject
|
|||||||
$sql .= ", volume = ".($this->volume != '' ? "'".$this->db->escape($this->volume)."'" : 'null');
|
$sql .= ", volume = ".($this->volume != '' ? "'".$this->db->escape($this->volume)."'" : 'null');
|
||||||
$sql .= ", volume_units = ".($this->volume_units != '' ? "'".$this->db->escape($this->volume_units)."'" : 'null');
|
$sql .= ", volume_units = ".($this->volume_units != '' ? "'".$this->db->escape($this->volume_units)."'" : 'null');
|
||||||
$sql .= ", fk_default_warehouse = ".($this->fk_default_warehouse > 0 ? $this->db->escape($this->fk_default_warehouse) : 'null');
|
$sql .= ", fk_default_warehouse = ".($this->fk_default_warehouse > 0 ? $this->db->escape($this->fk_default_warehouse) : 'null');
|
||||||
$sql .= ", seuil_stock_alerte = ".((isset($this->seuil_stock_alerte) && $this->seuil_stock_alerte != '') ? "'".$this->db->escape($this->seuil_stock_alerte)."'" : "null");
|
$sql .= ", seuil_stock_alerte = ".((isset($this->seuil_stock_alerte) && is_numeric($this->seuil_stock_alerte)) ? (int) $this->seuil_stock_alerte : 'null');
|
||||||
$sql .= ", description = '".$this->db->escape($this->description)."'";
|
$sql .= ", description = '".$this->db->escape($this->description)."'";
|
||||||
$sql .= ", url = ".($this->url ? "'".$this->db->escape($this->url)."'" : 'null');
|
$sql .= ", url = ".($this->url ? "'".$this->db->escape($this->url)."'" : 'null');
|
||||||
$sql .= ", customcode = '".$this->db->escape($this->customcode)."'";
|
$sql .= ", customcode = '".$this->db->escape($this->customcode)."'";
|
||||||
|
|||||||
@ -558,6 +558,19 @@ if ($action == 'create' && $user->rights->projet->creer)
|
|||||||
print '<input type="checkbox" id="usage_opportunity" name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ' checked="checked"').'"> ';
|
print '<input type="checkbox" id="usage_opportunity" name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ' checked="checked"').'"> ';
|
||||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||||
|
print '<script>';
|
||||||
|
print '$( document ).ready(function() {
|
||||||
|
jQuery("#usage_opportunity").change(function() {
|
||||||
|
if (jQuery("#usage_opportunity").prop("checked")) {
|
||||||
|
console.log("Show opportunities fields");
|
||||||
|
jQuery(".classuseopportunity").show();
|
||||||
|
} else {
|
||||||
|
console.log("Hide opportunities fields "+jQuery("#usage_opportunity").prop("checked"));
|
||||||
|
jQuery(".classuseopportunity").hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});';
|
||||||
|
print '</script>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
@ -591,7 +604,7 @@ if ($action == 'create' && $user->rights->projet->creer)
|
|||||||
print '</td><td class="maxwidthonsmartphone">';
|
print '</td><td class="maxwidthonsmartphone">';
|
||||||
$filteronlist = '';
|
$filteronlist = '';
|
||||||
if (!empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist = $conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST;
|
if (!empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist = $conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST;
|
||||||
$text = $form->select_company(GETPOST('socid', 'int'), 'socid', $filteronlist, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300');
|
$text = img_picto('', 'company').$form->select_company(GETPOST('socid', 'int'), 'socid', $filteronlist, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 widthcentpercentminusx');
|
||||||
if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile))
|
if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile))
|
||||||
{
|
{
|
||||||
$texthelp = $langs->trans("IfNeedToUseOtherObjectKeepEmpty");
|
$texthelp = $langs->trans("IfNeedToUseOtherObjectKeepEmpty");
|
||||||
@ -632,27 +645,27 @@ if ($action == 'create' && $user->rights->projet->creer)
|
|||||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||||
{
|
{
|
||||||
// Opportunity status
|
// Opportunity status
|
||||||
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td>';
|
print '<tr class="classuseopportunity"><td>'.$langs->trans("OpportunityStatus").'</td>';
|
||||||
print '<td class="maxwidthonsmartphone">';
|
print '<td class="maxwidthonsmartphone">';
|
||||||
print $formproject->selectOpportunityStatus('opp_status', GETPOST('opp_status') ?GETPOST('opp_status') : $object->opp_status);
|
print $formproject->selectOpportunityStatus('opp_status', GETPOST('opp_status') ?GETPOST('opp_status') : $object->opp_status);
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Opportunity probability
|
// Opportunity probability
|
||||||
print '<tr><td>'.$langs->trans("OpportunityProbability").'</td>';
|
print '<tr class="classuseopportunity"><td>'.$langs->trans("OpportunityProbability").'</td>';
|
||||||
print '<td><input size="5" type="text" id="opp_percent" name="opp_percent" value="'.dol_escape_htmltag(GETPOST('opp_percent') != '' ?GETPOST('opp_percent') : '').'"><span class="hideonsmartphone"> %</span>';
|
print '<td><input size="5" type="text" id="opp_percent" name="opp_percent" value="'.dol_escape_htmltag(GETPOSTISSET('opp_percent') ? GETPOST('opp_percent') : '').'"><span class="hideonsmartphone"> %</span>';
|
||||||
print '<input type="hidden" name="opp_percent_not_set" id="opp_percent_not_set" value="'.dol_escape_htmltag(GETPOST('opp_percent') != '' ? '0' : '1').'">';
|
print '<input type="hidden" name="opp_percent_not_set" id="opp_percent_not_set" value="'.dol_escape_htmltag(GETPOSTISSET('opp_percent') ? '0' : '1').'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Opportunity amount
|
// Opportunity amount
|
||||||
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td>';
|
print '<tr class="classuseopportunity"><td>'.$langs->trans("OpportunityAmount").'</td>';
|
||||||
print '<td><input size="5" type="text" name="opp_amount" value="'.dol_escape_htmltag(GETPOST('opp_amount') != '' ?GETPOST('opp_amount') : '').'"></td>';
|
print '<td><input size="5" type="text" name="opp_amount" value="'.dol_escape_htmltag(GETPOSTISSET('opp_amount') ? GETPOST('opp_amount') : '').'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Budget
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td>';
|
||||||
print '<td><input size="5" type="text" name="budget_amount" value="'.dol_escape_htmltag(GETPOST('budget_amount') != '' ?GETPOST('budget_amount') : '').'"></td>';
|
print '<td><input size="5" type="text" name="budget_amount" value="'.dol_escape_htmltag(GETPOSTISSET('budget_amount') ? GETPOST('budget_amount') : '').'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
@ -667,7 +680,7 @@ if ($action == 'create' && $user->rights->projet->creer)
|
|||||||
print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1);
|
||||||
$arrayselected = GETPOST('categories', 'array');
|
$arrayselected = GETPOST('categories', 'array');
|
||||||
print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%');
|
print img_picto('', 'category').$form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -833,9 +846,22 @@ elseif ($object->id > 0)
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" id="usage_opportunity" name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||||
|
print '<script>';
|
||||||
|
print '$( document ).ready(function() {
|
||||||
|
jQuery("#usage_opportunity").change(function() {
|
||||||
|
if (jQuery("#usage_opportunity").prop("checked")) {
|
||||||
|
console.log("Show opportunities fields");
|
||||||
|
jQuery(".classuseopportunity").show();
|
||||||
|
} else {
|
||||||
|
console.log("Hide opportunities fields "+jQuery("#usage_opportunity").prop("checked"));
|
||||||
|
jQuery(".classuseopportunity").hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});';
|
||||||
|
print '</script>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
@ -884,8 +910,9 @@ elseif ($object->id > 0)
|
|||||||
|
|
||||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||||
{
|
{
|
||||||
|
$classfortr = ($object->usage_opportunity ? '' : ' hideobject');
|
||||||
// Opportunity status
|
// Opportunity status
|
||||||
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td>';
|
print '<tr class="classuseopportunity'.$classfortr.'"><td>'.$langs->trans("OpportunityStatus").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $formproject->selectOpportunityStatus('opp_status', $object->opp_status, 1, 0, 0, 0, 'inline-block valignmiddle');
|
print $formproject->selectOpportunityStatus('opp_status', $object->opp_status, 1, 0, 0, 0, 'inline-block valignmiddle');
|
||||||
print '<div id="divtocloseproject" class="inline-block valign" style="display: none;"> ';
|
print '<div id="divtocloseproject" class="inline-block valign" style="display: none;"> ';
|
||||||
@ -896,15 +923,15 @@ elseif ($object->id > 0)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Opportunity probability
|
// Opportunity probability
|
||||||
print '<tr><td>'.$langs->trans("OpportunityProbability").'</td>';
|
print '<tr class="classuseopportunity'.$classfortr.'"><td>'.$langs->trans("OpportunityProbability").'</td>';
|
||||||
print '<td><input size="5" type="text" id="opp_percent" name="opp_percent" value="'.(isset($_POST['opp_percent']) ?GETPOST('opp_percent') : (strcmp($object->opp_percent, '') ?vatrate($object->opp_percent) : '')).'"> %';
|
print '<td><input size="5" type="text" id="opp_percent" name="opp_percent" value="'.(GETPOSTISSET('opp_percent') ? GETPOST('opp_percent') : (strcmp($object->opp_percent, '') ?vatrate($object->opp_percent) : '')).'"> %';
|
||||||
print '<span id="oldopppercent"></span>';
|
print '<span id="oldopppercent"></span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Opportunity amount
|
// Opportunity amount
|
||||||
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td>';
|
print '<tr class="classuseopportunity'.$classfortr.'"><td>'.$langs->trans("OpportunityAmount").'</td>';
|
||||||
print '<td><input size="5" type="text" name="opp_amount" value="'.(isset($_POST['opp_amount']) ?GETPOST('opp_amount') : (strcmp($object->opp_amount, '') ?price2num($object->opp_amount) : '')).'"></td>';
|
print '<td><input size="5" type="text" name="opp_amount" value="'.(GETPOSTISSET('opp_amount') ? GETPOST('opp_amount') : (strcmp($object->opp_amount, '') ? price2num($object->opp_amount) : '')).'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -923,7 +950,7 @@ elseif ($object->id > 0)
|
|||||||
|
|
||||||
// Budget
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td>';
|
||||||
print '<td><input size="5" type="text" name="budget_amount" value="'.(isset($_POST['budget_amount']) ?GETPOST('budget_amount') : (strcmp($object->budget_amount, '') ?price($object->budget_amount, 0, $langs, 1, 0) : '')).'"></td>';
|
print '<td><input size="5" type="text" name="budget_amount" value="'.(GETPOSTISSET('budget_amount') ? GETPOST('budget_amount') : (strcmp($object->budget_amount, '') ? price2num($object->budget_amount) : '')).'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
@ -936,14 +963,14 @@ elseif ($object->id > 0)
|
|||||||
// Tags-Categories
|
// Tags-Categories
|
||||||
if ($conf->categorie->enabled)
|
if ($conf->categorie->enabled)
|
||||||
{
|
{
|
||||||
print '<tr><td class="tdtop">'.$langs->trans("Categories").'</td><td>';
|
print '<tr><td>'.$langs->trans("Categories").'</td><td>';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1);
|
||||||
$c = new Categorie($db);
|
$c = new Categorie($db);
|
||||||
$cats = $c->containing($object->id, Categorie::TYPE_PROJECT);
|
$cats = $c->containing($object->id, Categorie::TYPE_PROJECT);
|
||||||
foreach ($cats as $cat) {
|
foreach ($cats as $cat) {
|
||||||
$arrayselected[] = $cat->id;
|
$arrayselected[] = $cat->id;
|
||||||
}
|
}
|
||||||
print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%');
|
print img_picto('', 'category').$form->multiselectarray('categories', $cate_arbo, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, '0');
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1026,18 +1026,19 @@ class Project extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return clicable name (with picto eventually)
|
* Return clickable name (with picto eventually)
|
||||||
*
|
*
|
||||||
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||||
* @param string $option Variant ('', 'nolink')
|
* @param string $option Variant where the link point to ('', 'nolink')
|
||||||
* @param int $addlabel 0=Default, 1=Add label into string, >1=Add first chars into string
|
* @param int $addlabel 0=Default, 1=Add label into string, >1=Add first chars into string
|
||||||
* @param string $moreinpopup Text to add into popup
|
* @param string $moreinpopup Text to add into popup
|
||||||
* @param string $sep Separator between ref and label if option addlabel is set
|
* @param string $sep Separator between ref and label if option addlabel is set
|
||||||
* @param int $notooltip 1=Disable tooltip
|
* @param int $notooltip 1=Disable tooltip
|
||||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||||
|
* @param string $morecss More css on a link
|
||||||
* @return string String with URL
|
* @return string String with URL
|
||||||
*/
|
*/
|
||||||
public function getNomUrl($withpicto = 0, $option = '', $addlabel = 0, $moreinpopup = '', $sep = ' - ', $notooltip = 0, $save_lastsearch_value = -1)
|
public function getNomUrl($withpicto = 0, $option = '', $addlabel = 0, $moreinpopup = '', $sep = ' - ', $notooltip = 0, $save_lastsearch_value = -1, $morecss = '')
|
||||||
{
|
{
|
||||||
global $conf, $langs, $user, $hookmanager;
|
global $conf, $langs, $user, $hookmanager;
|
||||||
|
|
||||||
@ -1115,6 +1116,7 @@ class Project extends CommonObject
|
|||||||
if (!$this->public) $picto = 'project';
|
if (!$this->public) $picto = 'project';
|
||||||
|
|
||||||
$linkstart = '<a href="'.$url.'"';
|
$linkstart = '<a href="'.$url.'"';
|
||||||
|
$linkstart .= ($morecss ? ' class="'.$morecss.'"' : '');
|
||||||
$linkstart .= $linkclose.'>';
|
$linkstart .= $linkclose.'>';
|
||||||
$linkend = '</a>';
|
$linkend = '</a>';
|
||||||
|
|
||||||
|
|||||||
@ -318,7 +318,7 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowraponall tdoverflowmax100">';
|
||||||
if ($obj->socid)
|
if ($obj->socid)
|
||||||
{
|
{
|
||||||
$companystatic->id = $obj->socid;
|
$companystatic->id = $obj->socid;
|
||||||
|
|||||||
@ -105,8 +105,11 @@ img.demothumb {
|
|||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
height: 140px;
|
height: 140px;
|
||||||
background-position-y: bottom;
|
background-position-y: bottom;
|
||||||
|
background-position-x: right;
|
||||||
|
}
|
||||||
|
.demologo {
|
||||||
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@media only screen and (max-width: 767px)
|
@media only screen and (max-width: 767px)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -274,13 +274,13 @@ print "\n";
|
|||||||
|
|
||||||
print '<div class="demoban demobackground">';
|
print '<div class="demoban demobackground">';
|
||||||
print '<div class="right" style="padding-right: 30px; padding-top: 30px;">';
|
print '<div class="right" style="padding-right: 30px; padding-top: 30px;">';
|
||||||
print '<a alt="Official portal of your ERP CRM application" targe="_blank" href="https://www.dolibarr.org"><img class="demologo" src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.png" alt="Dolibarr logo"></a>';
|
print '<a alt="Official portal of your ERP CRM application" targe="_blank" href="https://www.dolibarr.org"><img class="demologo" src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" alt="Dolibarr logo"></a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '<div class="demobantext" style="max-width: 1024px;">';
|
print '<div class="demobantext" style="max-width: 1024px;">';
|
||||||
print '<div style="font-size: 20px; padding: 40px;">';
|
print '<div style="font-size: 20px; padding: 40px;">';
|
||||||
print '<div style="text-align: justify;">'.$langs->trans("DemoDesc").'</div><br>';
|
print '<div class="hideonsmartphone" style="text-align: justify;">'.$langs->trans("DemoDesc").'</div><br>';
|
||||||
print '<div class="titre"><font style="font-size: 20px">'.$langs->trans("ChooseYourDemoProfil").'</font></div>';
|
print '<div class="titre"><font style="font-size: 20px">'.$langs->trans("ChooseYourDemoProfil").'</font></div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -113,9 +113,9 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $
|
|||||||
$urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo);
|
$urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo);
|
||||||
$width = 150;
|
$width = 150;
|
||||||
}
|
}
|
||||||
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))
|
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg'))
|
||||||
{
|
{
|
||||||
$urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.png';
|
$urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg';
|
||||||
$width = 150;
|
$width = 150;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $
|
|||||||
print '>';
|
print '>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
||||||
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.png" width="80px"></a></div>';
|
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>';
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -191,7 +191,7 @@ if ($urllogo)
|
|||||||
print '>';
|
print '>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
||||||
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.png" width="80px"></a></div>';
|
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>';
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -793,7 +793,7 @@ if ($urllogo)
|
|||||||
print '>';
|
print '>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
||||||
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.png" width="80px"></a></div>';
|
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>';
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -245,7 +245,7 @@ if ($urllogo)
|
|||||||
print '>';
|
print '>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
||||||
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.png" width="80px"></a></div>';
|
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>';
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -181,7 +181,7 @@ if ($urllogo)
|
|||||||
print '>';
|
print '>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
||||||
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.png" width="80px"></a></div>';
|
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>';
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1331,7 +1331,7 @@ else
|
|||||||
// Country
|
// Country
|
||||||
print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">';
|
print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">';
|
||||||
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
|
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
|
||||||
print $form->select_country((GETPOST('country_id') != '' ?GETPOST('country_id') : $object->country_id));
|
print $form->select_country((GETPOST('country_id') != '' ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 widthcentpercentminusx');
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -1354,16 +1354,16 @@ else
|
|||||||
|
|
||||||
// Phone / Fax
|
// Phone / Fax
|
||||||
print '<tr><td>'.$form->editfieldkey('Phone', 'phone', '', $object, 0).'</td>';
|
print '<tr><td>'.$form->editfieldkey('Phone', 'phone', '', $object, 0).'</td>';
|
||||||
print '<td'.($conf->browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning').' <input type="text" name="phone" id="phone" class="maxwidth200" value="'.(GETPOSTISSET('phone') ?GETPOST('phone', 'alpha') : $object->phone).'"></td>';
|
print '<td'.($conf->browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning').' <input type="text" name="phone" id="phone" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('phone') ?GETPOST('phone', 'alpha') : $object->phone).'"></td>';
|
||||||
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||||
print '<td>'.$form->editfieldkey('Fax', 'fax', '', $object, 0).'</td>';
|
print '<td>'.$form->editfieldkey('Fax', 'fax', '', $object, 0).'</td>';
|
||||||
print '<td'.($conf->browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning_fax').' <input type="text" name="fax" id="fax" class="maxwidth200" value="'.(GETPOSTISSET('fax') ?GETPOST('fax', 'alpha') : $object->fax).'"></td></tr>';
|
print '<td'.($conf->browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning_fax').' <input type="text" name="fax" id="fax" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('fax') ?GETPOST('fax', 'alpha') : $object->fax).'"></td></tr>';
|
||||||
|
|
||||||
// Email / Web
|
// Email / Web
|
||||||
print '<tr><td>'.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', $conf->global->SOCIETE_EMAIL_MANDATORY).'</td>';
|
print '<tr><td>'.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', $conf->global->SOCIETE_EMAIL_MANDATORY).'</td>';
|
||||||
print '<td colspan="3">'.img_picto('', 'object_email').' <input type="text" name="email" id="email" value="'.$object->email.'"></td></tr>';
|
print '<td colspan="3">'.img_picto('', 'object_email').' <input type="text" class="widthcentpercentminusx" name="email" id="email" value="'.$object->email.'"></td></tr>';
|
||||||
print '<tr><td>'.$form->editfieldkey('Web', 'url', '', $object, 0).'</td>';
|
print '<tr><td>'.$form->editfieldkey('Web', 'url', '', $object, 0).'</td>';
|
||||||
print '<td colspan="3">'.img_picto('', 'globe').' <input type="text" name="url" id="url" value="'.$object->url.'"></td></tr>';
|
print '<td colspan="3">'.img_picto('', 'globe').' <input type="text" class="widthcentpercentminusx" name="url" id="url" value="'.$object->url.'"></td></tr>';
|
||||||
|
|
||||||
if (!empty($conf->socialnetworks->enabled)) {
|
if (!empty($conf->socialnetworks->enabled)) {
|
||||||
foreach ($socialnetworks as $key => $value) {
|
foreach ($socialnetworks as $key => $value) {
|
||||||
@ -1380,42 +1380,6 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (! empty($conf->socialnetworks->enabled))
|
|
||||||
// {
|
|
||||||
// // Skype
|
|
||||||
// if (! empty($conf->global->SOCIALNETWORKS_SKYPE))
|
|
||||||
// {
|
|
||||||
// print '<tr><td>'.$form->editfieldkey('Skype', 'skype', '', $object, 0).'</td>';
|
|
||||||
// print '<td colspan="3">';
|
|
||||||
// print '<input type="text" name="skype" class="minwidth100" maxlength="80" id="skype" value="'.dol_escape_htmltag(GETPOSTISSET("skype")?GETPOST("skype", 'alpha'):$object->skype).'">';
|
|
||||||
// print '</td></tr>';
|
|
||||||
// }
|
|
||||||
// // Twitter
|
|
||||||
// if (! empty($conf->global->SOCIALNETWORKS_TWITTER))
|
|
||||||
// {
|
|
||||||
// print '<tr><td>'.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).'</td>';
|
|
||||||
// print '<td colspan="3">';
|
|
||||||
// print '<input type="text" name="twitter" class="minwidth100" maxlength="80" id="twitter" value="'.dol_escape_htmltag(GETPOSTISSET("twitter")?GETPOST("twitter", 'alpha'):$object->twitter).'">';
|
|
||||||
// print '</td></tr>';
|
|
||||||
// }
|
|
||||||
// // Facebook
|
|
||||||
// if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK))
|
|
||||||
// {
|
|
||||||
// print '<tr><td>'.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).'</td>';
|
|
||||||
// print '<td colspan="3">';
|
|
||||||
// print '<input type="text" name="facebook" class="minwidth100" maxlength="80" id="facebook" value="'.dol_escape_htmltag(GETPOSTISSET("facebook")?GETPOST("facebook", 'alpha'):$object->facebook).'">';
|
|
||||||
// print '</td></tr>';
|
|
||||||
// }
|
|
||||||
// // LinkedIn
|
|
||||||
// if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN))
|
|
||||||
// {
|
|
||||||
// print '<tr><td>'.$form->editfieldkey('LinkedIn', 'linkedin', '', $object, 0).'</td>';
|
|
||||||
// print '<td colspan="3">';
|
|
||||||
// print '<input type="text" name="linkedin" class="minwidth100" maxlength="80" id="linkedin" value="'.dol_escape_htmltag(GETPOSTISSET("linkedin")?GETPOST("linkedin", 'alpha'):$object->linkedin).'">';
|
|
||||||
// print '</td></tr>';
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Prof ids
|
// Prof ids
|
||||||
$i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2);
|
$i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2);
|
||||||
while ($i <= 6)
|
while ($i <= 6)
|
||||||
@ -1432,7 +1396,7 @@ else
|
|||||||
|
|
||||||
print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code);
|
print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (($j % 2) == 1) print '</tr>';
|
if (($j % $NBCOLS) == ($NBCOLS - 1)) print '</tr>';
|
||||||
$j++;
|
$j++;
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
@ -1481,9 +1445,11 @@ else
|
|||||||
//TODO: Place into a function to control showing by country or study better option
|
//TODO: Place into a function to control showing by country or study better option
|
||||||
if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1")
|
if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1")
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>';
|
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td colspan="3">';
|
||||||
print $form->selectyesno('localtax1assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1 : 0), 1);
|
print $form->selectyesno('localtax1assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1 : 0), 1);
|
||||||
print '</td><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>';
|
print '</td></tr>';
|
||||||
|
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||||
|
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td colspan="3">';
|
||||||
print $form->selectyesno('localtax2assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2 : 0), 1);
|
print $form->selectyesno('localtax2assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2 : 0), 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
@ -1883,6 +1849,7 @@ else
|
|||||||
print '<td class="maxwidthonsmartphone">';
|
print '<td class="maxwidthonsmartphone">';
|
||||||
print $formcompany->selectProspectCustomerType($object->client);
|
print $formcompany->selectProspectCustomerType($object->client);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||||
print '<td>'.$form->editfieldkey('CustomerCode', 'customer_code', '', $object, 0).'</td><td>';
|
print '<td>'.$form->editfieldkey('CustomerCode', 'customer_code', '', $object, 0).'</td><td>';
|
||||||
|
|
||||||
print '<table class="nobordernopadding"><tr><td>';
|
print '<table class="nobordernopadding"><tr><td>';
|
||||||
@ -1914,15 +1881,18 @@ else
|
|||||||
|| (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire)))
|
|| (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire)))
|
||||||
{
|
{
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).'</td><td class="maxwidthonsmartphone">';
|
print '<td>'.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).'</td>';
|
||||||
|
print '<td class="maxwidthonsmartphone">';
|
||||||
print $form->selectyesno("fournisseur", $object->fournisseur, 1);
|
print $form->selectyesno("fournisseur", $object->fournisseur, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire))
|
if (!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire))
|
||||||
{
|
{
|
||||||
print $form->editfieldkey('SupplierCode', 'supplier_code', '', $object, 0);
|
print $form->editfieldkey('SupplierCode', 'supplier_code', '', $object, 0);
|
||||||
}
|
}
|
||||||
print '</td><td>';
|
print '</td>';
|
||||||
|
print '<td>';
|
||||||
print '<table class="nobordernopadding"><tr><td>';
|
print '<table class="nobordernopadding"><tr><td>';
|
||||||
if ((!$object->code_fournisseur || $object->code_fournisseur == -1) && $modCodeFournisseur->code_auto)
|
if ((!$object->code_fournisseur || $object->code_fournisseur == -1) && $modCodeFournisseur->code_auto)
|
||||||
{
|
{
|
||||||
@ -1971,7 +1941,9 @@ else
|
|||||||
// Zip / Town
|
// Zip / Town
|
||||||
print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td>';
|
print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td>';
|
||||||
print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth50onsmartphone');
|
print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth50onsmartphone');
|
||||||
print '</td><td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td>';
|
print '</td>';
|
||||||
|
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||||
|
print '<td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td>';
|
||||||
print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
||||||
print $form->widgetForTranslation("town", $object, $permissiontoadd, 'string', 'alphanohtml', 'maxwidth100 quatrevingtpercent');
|
print $form->widgetForTranslation("town", $object, $permissiontoadd, 'string', 'alphanohtml', 'maxwidth100 quatrevingtpercent');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -1979,7 +1951,7 @@ else
|
|||||||
// Country
|
// Country
|
||||||
print '<tr><td>'.$form->editfieldkey('Country', 'selectcounty_id', '', $object, 0).'</td><td colspan="3">';
|
print '<tr><td>'.$form->editfieldkey('Country', 'selectcounty_id', '', $object, 0).'</td><td colspan="3">';
|
||||||
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
|
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
|
||||||
print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id');
|
print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 widthcentpercentminusx');
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -2001,15 +1973,16 @@ else
|
|||||||
|
|
||||||
// Phone / Fax
|
// Phone / Fax
|
||||||
print '<tr><td>'.$form->editfieldkey('Phone', 'phone', GETPOST('phone', 'alpha'), $object, 0).'</td>';
|
print '<tr><td>'.$form->editfieldkey('Phone', 'phone', GETPOST('phone', 'alpha'), $object, 0).'</td>';
|
||||||
print '<td>'.img_picto('', 'object_phoning').' <input type="text" name="phone" id="phone" class="maxwidth200" value="'.(GETPOSTISSET('phone') ?GETPOST('phone', 'alpha') : $object->phone).'"></td>';
|
print '<td>'.img_picto('', 'object_phoning').' <input type="text" name="phone" id="phone" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('phone') ?GETPOST('phone', 'alpha') : $object->phone).'"></td>';
|
||||||
|
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||||
print '<td>'.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).'</td>';
|
print '<td>'.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).'</td>';
|
||||||
print '<td>'.img_picto('', 'object_phoning_fax').' <input type="text" name="fax" id="fax" class="maxwidth200" value="'.(GETPOSTISSET('fax') ?GETPOST('fax', 'alpha') : $object->fax).'"></td></tr>';
|
print '<td>'.img_picto('', 'object_phoning_fax').' <input type="text" name="fax" id="fax" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('fax') ?GETPOST('fax', 'alpha') : $object->fax).'"></td></tr>';
|
||||||
|
|
||||||
// EMail / Web
|
// EMail / Web
|
||||||
print '<tr><td>'.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).'</td>';
|
print '<tr><td>'.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).'</td>';
|
||||||
print '<td colspan="3">'.img_picto('', 'object_email').' <input type="text" name="email" id="email" class="maxwidth100onsmartphone quatrevingtpercent" value="'.(GETPOSTISSET('email') ?GETPOST('email', 'alpha') : $object->email).'"></td></tr>';
|
print '<td colspan="3">'.img_picto('', 'object_email').' <input type="text" name="email" id="email" class="maxwidth200onsmartphone widthcentpercentminusx" value="'.(GETPOSTISSET('email') ?GETPOST('email', 'alpha') : $object->email).'"></td></tr>';
|
||||||
print '<tr><td>'.$form->editfieldkey('Web', 'url', GETPOST('url', 'alpha'), $object, 0).'</td>';
|
print '<tr><td>'.$form->editfieldkey('Web', 'url', GETPOST('url', 'alpha'), $object, 0).'</td>';
|
||||||
print '<td colspan="3">'.img_picto('', 'globe').' <input type="text" name="url" id="url" class="maxwidth100onsmartphone quatrevingtpercent" value="'.(GETPOSTISSET('url') ?GETPOST('url', 'alpha') : $object->url).'"></td></tr>';
|
print '<td colspan="3">'.img_picto('', 'globe').' <input type="text" name="url" id="url" class="maxwidth200onsmartphone widthcentpercentminusx " value="'.(GETPOSTISSET('url') ?GETPOST('url', 'alpha') : $object->url).'"></td></tr>';
|
||||||
|
|
||||||
if (!empty($conf->socialnetworks->enabled)) {
|
if (!empty($conf->socialnetworks->enabled)) {
|
||||||
foreach ($socialnetworks as $key => $value) {
|
foreach ($socialnetworks as $key => $value) {
|
||||||
@ -2025,36 +1998,9 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if (! empty($conf->socialnetworks->enabled))
|
|
||||||
// {
|
|
||||||
// // Skype
|
|
||||||
// if (! empty($conf->global->SOCIALNETWORKS_SKYPE))
|
|
||||||
// {
|
|
||||||
// print '<tr><td>'.$form->editfieldkey('Skype', 'skype', '', $object, 0).'</td>';
|
|
||||||
// print '<td colspan="3"><input type="text" name="skype" id="skype" value="'.$object->skype.'"></td></tr>';
|
|
||||||
// }
|
|
||||||
// // Twitter
|
|
||||||
// if (! empty($conf->global->SOCIALNETWORKS_TWITTER))
|
|
||||||
// {
|
|
||||||
// print '<tr><td>'.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).'</td>';
|
|
||||||
// print '<td colspan="3"><input type="text" name="twitter" id="twitter" value="'.$object->twitter.'"></td></tr>';
|
|
||||||
// }
|
|
||||||
// // Facebook
|
|
||||||
// if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK))
|
|
||||||
// {
|
|
||||||
// print '<tr><td>'.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).'</td>';
|
|
||||||
// print '<td colspan="3"><input type="text" name="facebook" id="facebook" value="'.$object->facebook.'"></td></tr>';
|
|
||||||
// }
|
|
||||||
// // LinkedIn
|
|
||||||
// if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN))
|
|
||||||
// {
|
|
||||||
// print '<tr><td>'.$form->editfieldkey('LinkedIn', 'linkedin', '', $object, 0).'</td>';
|
|
||||||
// print '<td colspan="3"><input type="text" name="linkedin" id="linkedin" value="'.$object->linkedin.'"></td></tr>';
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Prof ids
|
// Prof ids
|
||||||
$i = 1; $j = 0;
|
$i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2);
|
||||||
while ($i <= 6)
|
while ($i <= 6)
|
||||||
{
|
{
|
||||||
$idprof = $langs->transcountry('ProfId'.$i, $object->country_code);
|
$idprof = $langs->transcountry('ProfId'.$i, $object->country_code);
|
||||||
@ -2062,13 +2008,13 @@ else
|
|||||||
{
|
{
|
||||||
$key = 'idprof'.$i;
|
$key = 'idprof'.$i;
|
||||||
|
|
||||||
if (($j % 2) == 0) print '<tr>';
|
if (($j % $NBCOLS) == 0) print '<tr>';
|
||||||
|
|
||||||
$idprof_mandatory = 'SOCIETE_IDPROF'.($i).'_MANDATORY';
|
$idprof_mandatory = 'SOCIETE_IDPROF'.($i).'_MANDATORY';
|
||||||
print '<td>'.$form->editfieldkey($idprof, $key, '', $object, 0, 'string', '', !(empty($conf->global->$idprof_mandatory) || !$object->isACompany())).'</td><td>';
|
print '<td>'.$form->editfieldkey($idprof, $key, '', $object, 0, 'string', '', !(empty($conf->global->$idprof_mandatory) || !$object->isACompany())).'</td><td>';
|
||||||
print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code);
|
print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (($j % 2) == 1) print '</tr>';
|
if (($j % $NBCOLS) == ($NBCOLS - 1)) print '</tr>';
|
||||||
$j++;
|
$j++;
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
@ -2093,7 +2039,7 @@ else
|
|||||||
print '</span>';
|
print '</span>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||||
print '<td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td>';
|
print '<td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td>';
|
||||||
print $form->selectyesno('localtax2assuj_value', $object->localtax2_assuj, 1);
|
print $form->selectyesno('localtax2assuj_value', $object->localtax2_assuj, 1);
|
||||||
if (!isOnlyOneLocalTax(2))
|
if (!isOnlyOneLocalTax(2))
|
||||||
@ -2167,6 +2113,7 @@ else
|
|||||||
print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT));
|
print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT));
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||||
print '<td>'.$form->editfieldkey('Staff', 'effectif_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">';
|
print '<td>'.$form->editfieldkey('Staff', 'effectif_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">';
|
||||||
print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id);
|
print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id);
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
|
|||||||
@ -34,7 +34,6 @@ $WS_DOL_URL_WSDL = 'https://ec.europa.eu/taxation_customs/vies/checkVatService.w
|
|||||||
$WS_METHOD = 'checkVat';
|
$WS_METHOD = 'checkVat';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$conf->dol_hide_topmenu = 1;
|
$conf->dol_hide_topmenu = 1;
|
||||||
$conf->dol_hide_leftmenu = 1;
|
$conf->dol_hide_leftmenu = 1;
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1');
|
|||||||
if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1');
|
if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1');
|
||||||
if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
|
if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
|
||||||
|
|
||||||
require '../../main.inc.php'; // Load $user and permissions
|
if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../../main.inc.php'; // Load $user and permissions
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$w = GETPOST('w', 'int');
|
$w = GETPOST('w', 'int');
|
||||||
@ -72,12 +72,12 @@ elseif ($query == "pro")
|
|||||||
|
|
||||||
$objProd = new Product($db);
|
$objProd = new Product($db);
|
||||||
$objProd->fetch($id);
|
$objProd->fetch($id);
|
||||||
$image = $objProd->show_photos('product', $conf->product->multidir_output[$entity], 'small', 1);
|
$image = $objProd->show_photos('product', $conf->product->multidir_output[$objProd->entity], 'small', 1);
|
||||||
|
|
||||||
preg_match('@src="([^"]+)"@', $image, $match);
|
preg_match('@src="([^"]+)"@', $image, $match);
|
||||||
$file = array_pop($match);
|
$file = array_pop($match);
|
||||||
if ($file == "") header('Location: ../../public/theme/common/nophoto.png');
|
if ($file == "") header('Location: ../../public/theme/common/nophoto.png');
|
||||||
else header('Location: '.$file.'&cache=1');
|
else header('Location: '.$file.'&cache=1&publictakepos=1&modulepart=product');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -77,7 +77,7 @@ if ($action=="productinfo"){
|
|||||||
$prod = new Product($db);
|
$prod = new Product($db);
|
||||||
$prod->fetch($idproduct);
|
$prod->fetch($idproduct);
|
||||||
print "<b>".$prod->label."</b><br>";
|
print "<b>".$prod->label."</b><br>";
|
||||||
print '<img class="imgwrapper" width="60%" src="'.DOL_URL_ROOT.'/takepos/genimg/index.php?query=pro&id='.$idproduct.'">';
|
print '<img class="imgwrapper" width="60%" src="'.DOL_URL_ROOT.'/takepos/public/auto_order.php?genimg=pro&query=pro&id='.$idproduct.'">';
|
||||||
print "<br>".$prod->description;
|
print "<br>".$prod->description;
|
||||||
print "<br><b>".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency)."</b>";
|
print "<br><b>".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency)."</b>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -95,7 +95,7 @@ elseif ($action=="editline"){
|
|||||||
$prod = new Product($db);
|
$prod = new Product($db);
|
||||||
$prod->fetch($line->fk_product);
|
$prod->fetch($line->fk_product);
|
||||||
print "<b>".$prod->label."</b><br>";
|
print "<b>".$prod->label."</b><br>";
|
||||||
print '<img class="imgwrapper" width="60%" src="genimg/index.php?query=pro&id='.$line->fk_product.'">';
|
print '<img class="imgwrapper" width="60%" src="'.DOL_URL_ROOT.'/takepos/public/auto_order.php?genimg=pro&query=pro&id='.$line->fk_product.'">';
|
||||||
print "<br>".$prod->description;
|
print "<br>".$prod->description;
|
||||||
print "<br><b>".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency)."</b>";
|
print "<br><b>".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency)."</b>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -33,4 +33,5 @@ $_SESSION["takeposterminal"] = 1;
|
|||||||
|
|
||||||
define('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE', 1);
|
define('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE', 1);
|
||||||
if (GETPOSTISSET("mobilepage")) require '../invoice.php';
|
if (GETPOSTISSET("mobilepage")) require '../invoice.php';
|
||||||
|
elseif (GETPOSTISSET("genimg")) require DOL_DOCUMENT_ROOT.'/takepos/genimg/index.php';
|
||||||
else require '../phone.php';
|
else require '../phone.php';
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 14 KiB |
@ -17,6 +17,7 @@
|
|||||||
--colorbacklinepair2: rgb(<?php print $colorbacklinepair2; ?>);
|
--colorbacklinepair2: rgb(<?php print $colorbacklinepair2; ?>);
|
||||||
--colorbacklinepairhover: rgb(<?php print $colorbacklinepairhover; ?>);
|
--colorbacklinepairhover: rgb(<?php print $colorbacklinepairhover; ?>);
|
||||||
--colorbacklinepairchecked: rgb(<?php print $colorbacklinepairchecked; ?>);
|
--colorbacklinepairchecked: rgb(<?php print $colorbacklinepairchecked; ?>);
|
||||||
|
--colorbacklinebreak: rgb(<?php print $colorbacklinebreak; ?>);
|
||||||
--colorbackbody: rgb(<?php print $colorbackbody; ?>);
|
--colorbackbody: rgb(<?php print $colorbackbody; ?>);
|
||||||
--colortexttitlenotab: rgb(<?php print $colortexttitlenotab; ?>);
|
--colortexttitlenotab: rgb(<?php print $colortexttitlenotab; ?>);
|
||||||
--colortexttitle: rgb(<?php print $colortexttitle; ?>);
|
--colortexttitle: rgb(<?php print $colortexttitle; ?>);
|
||||||
@ -3289,7 +3290,7 @@ td.evenodd, tr.nohoverpair td, #trlinefordates td {
|
|||||||
.trforbreak td {
|
.trforbreak td {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
border-bottom: 1pt solid black !important;
|
border-bottom: 1pt solid black !important;
|
||||||
/* background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklinebreak)); ?> !important; */
|
background-color: var(--colorbacklinebreak) !important; !important;
|
||||||
}
|
}
|
||||||
.trforbreak.nobold td a, .trforbreak.nobold span.secondary {
|
.trforbreak.nobold td a, .trforbreak.nobold span.secondary {
|
||||||
font-weight: normal !important;
|
font-weight: normal !important;
|
||||||
|
|||||||
@ -65,7 +65,7 @@ $colorbacklinepair1 = '251,251,251'; // line pair
|
|||||||
$colorbacklinepair2 = '251,251,251'; // line pair
|
$colorbacklinepair2 = '251,251,251'; // line pair
|
||||||
$colorbacklinepairhover = '230,237,244'; // line hover
|
$colorbacklinepairhover = '230,237,244'; // line hover
|
||||||
$colorbacklinepairchecked = '230,237,244'; // line checked
|
$colorbacklinepairchecked = '230,237,244'; // line checked
|
||||||
$colorbacklinebreak = '233,228,230'; // line break
|
$colorbacklinebreak = '253,251,250'; // line break
|
||||||
$colorbackbody = '255,255,255';
|
$colorbackbody = '255,255,255';
|
||||||
$colortexttitlenotab = '0,113,120'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,113,120, violet: 0,50,120
|
$colortexttitlenotab = '0,113,120'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,113,120, violet: 0,50,120
|
||||||
$colortexttitle = '0,0,0';
|
$colortexttitle = '0,0,0';
|
||||||
|
|||||||
@ -242,6 +242,7 @@ print '*/'."\n";
|
|||||||
--colorbacklinepair2: rgb(<?php print $colorbacklinepair2; ?>);
|
--colorbacklinepair2: rgb(<?php print $colorbacklinepair2; ?>);
|
||||||
--colorbacklinepairhover: rgb(<?php print $colorbacklinepairhover; ?>);
|
--colorbacklinepairhover: rgb(<?php print $colorbacklinepairhover; ?>);
|
||||||
--colorbacklinepairchecked: rgb(<?php print $colorbacklinepairchecked; ?>);
|
--colorbacklinepairchecked: rgb(<?php print $colorbacklinepairchecked; ?>);
|
||||||
|
--colorbacklinebreak: rgb(<?php print $colorbacklinebreak; ?>);
|
||||||
--colorbackbody: rgb(<?php print $colorbackbody; ?>);
|
--colorbackbody: rgb(<?php print $colorbackbody; ?>);
|
||||||
--colortexttitlenotab: rgb(<?php print $colortexttitlenotab; ?>);
|
--colortexttitlenotab: rgb(<?php print $colortexttitlenotab; ?>);
|
||||||
--colortexttitle: rgb(<?php print $colortexttitle; ?>);
|
--colortexttitle: rgb(<?php print $colortexttitle; ?>);
|
||||||
@ -3284,10 +3285,10 @@ ul.noborder li:nth-child(odd):not(.liste_titre) {
|
|||||||
}
|
}
|
||||||
.impair, .nohover .impair:hover, tr.impair td.nohover
|
.impair, .nohover .impair:hover, tr.impair td.nohover
|
||||||
{
|
{
|
||||||
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
|
background: var(--colorbacklineimpair1);
|
||||||
}
|
}
|
||||||
#GanttChartDIV {
|
#GanttChartDIV {
|
||||||
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
|
background-color: var(--colorbacklineimpair1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.oddeven, .evenodd, .pair, .nohover .pair:hover, tr.pair td.nohover, .tagtr.oddeven {
|
.oddeven, .evenodd, .pair, .nohover .pair:hover, tr.pair td.nohover, .tagtr.oddeven {
|
||||||
@ -3296,25 +3297,26 @@ ul.noborder li:nth-child(odd):not(.liste_titre) {
|
|||||||
color: #202020;
|
color: #202020;
|
||||||
}
|
}
|
||||||
.pair, .nohover .pair:hover, tr.pair td.nohover {
|
.pair, .nohover .pair:hover, tr.pair td.nohover {
|
||||||
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklinepair1)); ?>;
|
background-color: var(--colorbacklinepair1);
|
||||||
}
|
}
|
||||||
|
|
||||||
table.dataTable tr.oddeven {
|
table.dataTable tr.oddeven {
|
||||||
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklinepair1)); ?> !important;
|
background-color: var(--colorbacklinepair1) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For no hover style */
|
/* For no hover style */
|
||||||
td.oddeven, table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td, tr.nohover td, form.nohover, form.nohover:hover {
|
td.oddeven, table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td, tr.nohover td, form.nohover, form.nohover:hover {
|
||||||
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
|
background-color: var(--colorbacklineimpair1) !important; !important;
|
||||||
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
|
background: var(--colorbacklineimpair1) !important; !important;
|
||||||
}
|
}
|
||||||
td.evenodd, tr.nohoverpair td, #trlinefordates td {
|
td.evenodd, tr.nohoverpair td, #trlinefordates td {
|
||||||
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklinepair1)); ?> !important;
|
background-color: var(--colorbacklinepair1) !important; !important;
|
||||||
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklinepair1)); ?> !important;
|
background: var(--colorbacklinepair1) !important; !important;
|
||||||
}
|
}
|
||||||
.trforbreak td {
|
.trforbreak td {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border-bottom: 1pt solid black !important;
|
border-bottom: 1pt solid black !important;
|
||||||
/* background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklinebreak)); ?> !important; */
|
background-color: var(--colorbacklinebreak) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.dataTable td {
|
table.dataTable td {
|
||||||
|
|||||||
@ -61,7 +61,7 @@ $colorbacklinepair1 = '248,248,248'; // line pair
|
|||||||
$colorbacklinepair2 = '246,246,246'; // line pair
|
$colorbacklinepair2 = '246,246,246'; // line pair
|
||||||
$colorbacklinepairhover = '230,237,244'; // line hover
|
$colorbacklinepairhover = '230,237,244'; // line hover
|
||||||
$colorbacklinepairchecked = '230,237,244'; // line checked
|
$colorbacklinepairchecked = '230,237,244'; // line checked
|
||||||
$colorbacklinebreak = '214,218,220';
|
$colorbacklinebreak = '250,246,251';
|
||||||
$colorbackbody = '248,248,248';
|
$colorbackbody = '248,248,248';
|
||||||
$colortexttitlenotab = '80,71,5';
|
$colortexttitlenotab = '80,71,5';
|
||||||
$colortexttitle = '20,20,20';
|
$colortexttitle = '20,20,20';
|
||||||
|
|||||||
@ -192,13 +192,13 @@ elseif (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'
|
|||||||
$urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo);
|
$urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo);
|
||||||
$width = 128;
|
$width = 128;
|
||||||
}
|
}
|
||||||
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png'))
|
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.svg'))
|
||||||
{
|
{
|
||||||
$urllogo = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png';
|
$urllogo = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.svg';
|
||||||
}
|
}
|
||||||
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))
|
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg'))
|
||||||
{
|
{
|
||||||
$urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.png';
|
$urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Security graphical code
|
// Security graphical code
|
||||||
|
|||||||
@ -52,7 +52,15 @@ if (isset($_GET["hashp"]) && !defined("NOLOGIN"))
|
|||||||
if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip
|
if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip
|
||||||
}
|
}
|
||||||
// Some value of modulepart can be used to get resources that are public so no login are required.
|
// Some value of modulepart can be used to get resources that are public so no login are required.
|
||||||
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias'))
|
if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias')
|
||||||
|
{
|
||||||
|
if (!defined("NOLOGIN")) define("NOLOGIN", 1);
|
||||||
|
if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
|
||||||
|
if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip
|
||||||
|
}
|
||||||
|
|
||||||
|
// Used by TakePOS Auto Order
|
||||||
|
if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'product' && isset($_GET["publictakepos"]))
|
||||||
{
|
{
|
||||||
if (!defined("NOLOGIN")) define("NOLOGIN", 1);
|
if (!defined("NOLOGIN")) define("NOLOGIN", 1);
|
||||||
if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
|
if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
|
||||||
@ -195,6 +203,12 @@ if (!empty($hashp))
|
|||||||
$accessallowed = 1; // When using hashp, link is public so we force $accessallowed
|
$accessallowed = 1; // When using hashp, link is public so we force $accessallowed
|
||||||
$sqlprotectagainstexternals = '';
|
$sqlprotectagainstexternals = '';
|
||||||
}
|
}
|
||||||
|
elseif (isset($_GET["publictakepos"]))
|
||||||
|
{
|
||||||
|
if (! empty($conf->global->TAKEPOS_AUTO_ORDER)) {
|
||||||
|
$accessallowed = 1; // Only if TakePOS Public Auto Order is enabled and received publictakepos variable
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Basic protection (against external users only)
|
// Basic protection (against external users only)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user