Merge remote-tracking branch 'upstream/develop' into actioncomm_category

This commit is contained in:
Frédéric FRANCE 2019-12-05 21:47:42 +01:00
commit d9bfa62367
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
58 changed files with 374 additions and 161 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 991 KiB

After

Width:  |  Height:  |  Size: 117 KiB

View File

@ -245,18 +245,6 @@ export list="
--ignore-table=$base.llx_c_ticketsup_category
--ignore-table=$base.llx_c_ticketsup_severity
--ignore-table=$base.llx_c_ticketsup_type
--ignore-table=$base.llx_cabinetmed_c_banques
--ignore-table=$base.llx_cabinetmed_c_ccam
--ignore-table=$base.llx_cabinetmed_c_examconclusion
--ignore-table=$base.llx_cabinetmed_cons
--ignore-table=$base.llx_cabinetmed_cons_extrafields
--ignore-table=$base.llx_cabinetmed_diaglec
--ignore-table=$base.llx_cabinetmed_examaut
--ignore-table=$base.llx_cabinetmed_exambio
--ignore-table=$base.llx_cabinetmed_examenprescrit
--ignore-table=$base.llx_cabinetmed_motifcons
--ignore-table=$base.llx_cabinetmed_patient
--ignore-table=$base.llx_cabinetmed_societe
--ignore-table=$base.llx_congespayes
--ignore-table=$base.llx_congespayes_config
--ignore-table=$base.llx_congespayes_events
@ -300,6 +288,7 @@ export list="
--ignore-table=$base.llx_m_extrafields
--ignore-table=$base.llx_monmodule_abcdef
--ignore-table=$base.llx_notes
--ignore-table=$base.llx_packages
--ignore-table=$base.llx_pos_cash
--ignore-table=$base.llx_pos_control_cash
--ignore-table=$base.llx_pos_facture
@ -316,6 +305,7 @@ export list="
--ignore-table=$base.llx_residence_building
--ignore-table=$base.llx_residence_building_links
--ignore-table=$base.llx_societe_rib2
--ignore-table=$base.llx_sellyoursaas_cancellation
--ignore-table=$base.llx_ticketsup
--ignore-table=$base.llx_ultimatepdf
--ignore-table=$base.llx_update_modules

View File

@ -7,6 +7,9 @@
# Usage: txpull.sh (all|xx_XX) [-r dolibarr.file] [-f]
#------------------------------------------------------
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $DIR/../..
# Syntax
if [ "x$1" = "x" ]
then

View File

@ -9,6 +9,9 @@
export project='dolibarr'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $DIR/../..
# Syntax
if [ "x$1" = "x" ]
then

View File

@ -37,7 +37,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
// Load translation files required by the page
$langs->loadLangs(array("users", "companies", "agenda", "commercial"));
$langs->loadLangs(array("users", "companies", "agenda", "commercial", "other"));
$action = GETPOST('action', 'alpha');
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'actioncommlist'; // To manage different context of search

View File

@ -354,7 +354,7 @@ if ($action == 'create')
// Label
print '<tr><td class="fieldrequired">'.$langs->trans("LabelBankCashAccount").'</td>';
print '<td><input size="30" type="text" class="flat" name="label" value="'.dol_escape_htmltag(GETPOST("label", 'alpha')).'"></td></tr>';
print '<td><input type="text" class="flat maxwidth150onsmartphone" name="label" value="'.dol_escape_htmltag(GETPOST("label", 'alpha')).'"></td></tr>';
// Type
print '<tr><td class="fieldrequired">'.$langs->trans("AccountType").'</td>';
@ -375,7 +375,7 @@ if ($action == 'create')
// Status
print '<tr><td class="fieldrequired">'.$langs->trans("Status").'</td>';
print '<td>';
print $form->selectarray("clos", $object->status, (GETPOST("clos", 'int') != '' ?GETPOST("clos", 'int') : $object->clos));
print $form->selectarray("clos", $object->status, (GETPOST("clos", 'int') != '' ?GETPOST("clos", 'int') : $object->clos), 0, 0, 0, '', 0, 0, 0, '', 'maxwidth150onsmartphone');
print '</td></tr>';
// Country
@ -412,7 +412,7 @@ if ($action == 'create')
// Tags-Categories
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_ACCOUNT, '', 'parent', 64, 0, 1);
$arrayselected = array();
@ -429,7 +429,7 @@ if ($action == 'create')
}
// Comment
print '<tr><td class="tdtop">'.$langs->trans("Comment").'</td>';
print '<tr><td>'.$langs->trans("Comment").'</td>';
print '<td>';
// Editor wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
@ -476,31 +476,32 @@ if ($action == 'create')
// If bank account
print '<tr><td class="titlefieldcreate">'.$langs->trans("BankName").'</td>';
print '<td><input size="30" type="text" class="flat" name="bank" value="'.(GETPOST('bank') ?GETPOST('bank', 'alpha') : $object->bank).'"></td>';
print '<td><input type="text" class="flat minwidth150" name="bank" value="'.(GETPOST('bank') ?GETPOST('bank', 'alpha') : $object->bank).'"></td>';
print '</tr>';
// Show fields of bank account
$sizecss = '';
foreach ($object->getFieldsToShow() as $val) {
if ($val == 'BankCode') {
$name = 'code_banque';
$size = 8;
$sizecss = 'minwidth100';
$content = $object->code_banque;
} elseif ($val == 'DeskCode') {
$name = 'code_guichet';
$size = 8;
$sizecss = 'minwidth100';
$content = $object->code_guichet;
} elseif ($val == 'BankAccountNumber') {
$name = 'number';
$size = 18;
$sizecss = 'minwidth200';
$content = $object->number;
} elseif ($val == 'BankAccountNumberKey') {
$name = 'cle_rib';
$size = 3;
$sizecss = 'minwidth50';
$content = $object->cle_rib;
}
print '<td>'.$langs->trans($val).'</td>';
print '<td><input size="'.$size.'" type="text" class="flat" name="'.$name.'" value="'.(GETPOST($name) ?GETPOST($name, 'alpha') : $content).'"></td>';
print '<td><input type="text" class="flat '.$sizecss.'" name="'.$name.'" value="'.(GETPOST($name) ?GETPOST($name, 'alpha') : $content).'"></td>';
print '</tr>';
}
$ibankey = FormBank::getIBANLabel($object);
@ -509,22 +510,22 @@ if ($action == 'create')
// IBAN
print '<tr><td>'.$langs->trans($ibankey).'</td>';
print '<td><input size="34" maxlength="34" type="text" class="flat" name="iban" value="'.(GETPOST('iban') ?GETPOST('iban', 'alpha') : $object->iban).'"></td></tr>';
print '<td><input maxlength="34" type="text" class="flat minwidth300" name="iban" value="'.(GETPOST('iban') ?GETPOST('iban', 'alpha') : $object->iban).'"></td></tr>';
print '<tr><td>'.$langs->trans($bickey).'</td>';
print '<td><input size="11" maxlength="11" type="text" class="flat" name="bic" value="'.(GETPOST('bic') ?GETPOST('bic', 'alpha') : $object->bic).'"></td></tr>';
print '<td><input maxlength="11" type="text" class="flat minwidth150" name="bic" value="'.(GETPOST('bic') ?GETPOST('bic', 'alpha') : $object->bic).'"></td></tr>';
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td>';
print "<textarea class=\"flat\" name=\"domiciliation\" rows=\"2\" cols=\"40\">";
print '<textarea class="flat quatrevingtpercent" name="domiciliation" rows="'.ROWS_2.'">';
print (GETPOST('domiciliation') ?GETPOST('domiciliation') : $object->domiciliation);
print "</textarea></td></tr>";
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
print '<td><input size="30" type="text" class="flat" name="proprio" value="'.(GETPOST('proprio') ?GETPOST('proprio', 'alpha') : $object->proprio).'">';
print '<td><input type="text" class="flat minwidth300" name="proprio" value="'.(GETPOST('proprio') ?GETPOST('proprio', 'alpha') : $object->proprio).'">';
print '</td></tr>';
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerAddress").'</td><td>';
print "<textarea class=\"flat\" name=\"owner_address\" rows=\"2\" cols=\"40\">";
print '<textarea class="flat quatrevingtpercent" name="owner_address" rows="'.ROWS_2.'">';
print (GETPOST('owner_address') ?GETPOST('owner_address', 'alpha') : $object->owner_address);
print "</textarea></td></tr>";

View File

@ -192,6 +192,7 @@ class DolEditor
$out.= '<!-- Output ckeditor $disallowAnyContent='.$disallowAnyContent.' toolbarname='.$this->toolbarname.' -->'."\n";
$out.= '<script type="text/javascript">
$(document).ready(function () {
/* console.log("Run ckeditor"); */
/* if (CKEDITOR.loadFullCore) CKEDITOR.loadFullCore(); */
/* should be editor=CKEDITOR.replace but what if serveral editors ? */
CKEDITOR.replace(\''.$this->htmlname.'\',
@ -225,6 +226,7 @@ class DolEditor
});
}
}';
if ($this->uselocalbrowser)
{
$out.= ','."\n";

View File

@ -3550,7 +3550,7 @@ class Form
$return = '';
$return .= '<select class="flat" id="select_'.$htmlname.'" name="'.$htmlname.'">';
$return .= '<select class="flat maxwidth75" id="select_'.$htmlname.'" name="'.$htmlname.'">';
$options = array(
'HT'=>$langs->trans("HT"),
'TTC'=>$langs->trans("TTC")
@ -3953,10 +3953,11 @@ class Form
* - array (list of categories ids)
* @param int $outputmode 0=HTML select string, 1=Array
* @param int $include [=0] Removed or 1=Keep only
* @param string $morecss More CSS
* @return string
* @see select_categories()
*/
public function select_all_categories($type, $selected = '', $htmlname = "parent", $maxlength = 64, $markafterid = 0, $outputmode = 0, $include = 0)
public function select_all_categories($type, $selected = '', $htmlname = "parent", $maxlength = 64, $markafterid = 0, $outputmode = 0, $include = 0, $morecss = '')
{
// phpcs:enable
global $conf, $langs;
@ -3999,7 +4000,7 @@ class Form
$cate_arbo = $cat->get_full_arbo($type, $markafterid, $include);
}
$output = '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
$output = '<select class="flat'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'" id="'.$htmlname.'">';
$outarray = array();
if (is_array($cate_arbo))
{

View File

@ -1099,7 +1099,7 @@ class FormFile
if ($disablecrop == -1)
{
$disablecrop = 1;
if (in_array($modulepart, array('bank', 'bom', 'expensereport', 'holiday', 'member', 'mrp', 'project', 'product', 'produit', 'service', 'societe', 'tax', 'ticket', 'user'))) $disablecrop = 0;
if (in_array($modulepart, array('bank', 'bom', 'expensereport', 'holiday', 'member', 'mrp', 'project', 'product', 'produit', 'propal', 'service', 'societe', 'tax', 'ticket', 'user'))) $disablecrop = 0;
}
// Define relative path used to store the file

View File

@ -200,7 +200,7 @@ class FormTicket
// Type
print '<tr><td class="titlefield"><span class="fieldrequired"><label for="selecttype_code">'.$langs->trans("TicketTypeRequest").'</span></label></td><td>';
$this->selectTypesTickets((GETPOST('type_code') ? GETPOST('type_code') : $this->type_code), 'type_code', '', '2');
$this->selectTypesTickets((GETPOST('type_code', 'alpha') ? GETPOST('type_code', 'alpha') : $this->type_code), 'type_code', '', '2', 0, 0, 0, 'minwidth150');
print '</td></tr>';
// Severity
@ -225,7 +225,7 @@ class FormTicket
if ($this->withthreadid > 0) {
$subject = $langs->trans('SubjectAnswerToTicket').' '.$this->withthreadid.' : '.$this->topic_title.'';
}
print '<input class="text" size="50" id="subject" name="subject" value="'.(GETPOST('subject', 'alpha') ? GETPOST('subject', 'alpha') : $subject).'" />';
print '<input class="text minwidth300" id="subject" name="subject" value="'.(GETPOST('subject', 'alpha') ? GETPOST('subject', 'alpha') : $subject).'" />';
print '</td></tr>';
}
}
@ -376,8 +376,8 @@ class FormTicket
}
$out = '<tr>';
$out .= '<td width="180">' . $langs->trans("MailFile") . '</td>';
$out .= '<td colspan="2">';
$out .= '<td>' . $langs->trans("MailFile") . '</td>';
$out .= '<td>';
// TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
$out .= '<input type="hidden" class="removedfilehidden" name="removedfile" value="">' . "\n";
$out .= '<script type="text/javascript" language="javascript">';

View File

@ -8372,6 +8372,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
}
$class = 'btnTitle';
// hidden conf keep during button transition TODO: remove this block
if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) {
$class = 'butActionNew';
@ -8446,10 +8447,9 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
$tag = (empty($attr['href']) ? 'span' : 'a');
$button = '<'.$tag.' '.$compiledAttributes.' >';
$button .= '<span class="'.$iconClass.' valignmiddle btnTitle-icon"></span>';
$button .= '<span class="valignmiddle text-plus-circle btnTitle-label">'.$label.'</span>';
$button .= '<span class="valignmiddle text-plus-circle btnTitle-label'.(empty($params['forcenohideoftext']) ? ' hideonsmartphone' : '').'">'.$label.'</span>';
$button .= '</'.$tag.'>';
// hidden conf keep during button transition TODO: remove this block

View File

@ -308,35 +308,94 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0,
*/
function dolRotateImage($file_path)
{
$exif = @exif_read_data($file_path);
if ($exif === false) {
return false;
}
$orientation = intval(@$exif['Orientation']);
if (!in_array($orientation, array(3, 6, 8))) {
return false;
}
$image = @imagecreatefromjpeg($file_path);
switch ($orientation) {
case 3:
$image = @imagerotate($image, 180, 0);
break;
case 6:
$image = @imagerotate($image, 270, 0);
break;
case 8:
$image = @imagerotate($image, 90, 0);
break;
default:
return false;
}
$success = imagejpeg($image, $file_path);
// Free up memory (imagedestroy does not delete files):
@imagedestroy($image);
return $success;
return correctExifImageOrientation($file_path, $file_path);
}
/**
* Add exif orientation correction for image
*
* @param string $fileSource Full path to source image to rotate
* @param string $fileDest string : Full path to image to rotate | false return gd img | null the raw image stream will be outputted directly
* @param int $quality output image quality
* @return bool : true on success or false on failure or gd img if $fileDest is false.
*/
function correctExifImageOrientation($fileSource, $fileDest, $quality = 95)
{
if (function_exists('exif_read_data')) {
$exif = exif_read_data($fileSource);
if ($exif && isset($exif['Orientation'])) {
$infoImg = getimagesize($fileSource); // Get image infos
$orientation = $exif['Orientation'];
if($orientation != 1){
$img = imagecreatefromjpeg($fileSource);
$deg = 0;
switch ($orientation) {
case 3:
$deg = 180;
break;
case 6:
$deg = 270;
break;
case 8:
$deg = 90;
break;
}
if ($deg) {
if($infoImg[2] === 'IMAGETYPE_PNG') // In fact there is no exif on PNG but just in case
{
imagealphablending($img, false);
imagesavealpha($img, true);
$img = imagerotate($img, $deg, imageColorAllocateAlpha($img, 0, 0, 0, 127));
imagealphablending($img, false);
imagesavealpha($img, true);
}
else{
$img = imagerotate($img, $deg, 0);
}
}
// then rewrite the rotated image back to the disk as $fileDest
if($fileDest === false){
return $img;
}
else
{
// In fact there exif is only for JPG but just in case
// Create image on disk
$image = false;
switch($infoImg[2])
{
case IMAGETYPE_GIF: // 1
$image = imagegif($img, $fileDest);
break;
case IMAGETYPE_JPEG: // 2
$image = imagejpeg($img, $fileDest, $quality);
break;
case IMAGETYPE_PNG: // 3
$image = imagepng($img, $fileDest, $quality);
break;
case IMAGETYPE_BMP: // 6
// Not supported by PHP GD
break;
case IMAGETYPE_WBMP: // 15
$image = imagewbmp($img, $fileDest);
break;
}
// Free up memory (imagedestroy does not delete files):
@imagedestroy($img);
return $image;
}
} // if there is some rotation necessary
} // if have the exif orientation info
} // if function exists
return false;
}
/**
* Create a thumbnail from an image file (Supported extensions are gif, jpg, png and bmp).
@ -379,12 +438,12 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small',
dol_syslog('This file '.$file.' does not seem to be an image format file name.', LOG_WARNING);
return 'ErrorBadImageFormat';
}
elseif(!is_numeric($maxWidth) || empty($maxWidth) || $maxWidth < -1){
elseif(!is_numeric($maxWidth) || empty($maxWidth) || $maxWidth < -1) {
// Si la largeur max est incorrecte (n'est pas numerique, est vide, ou est inferieure a 0)
dol_syslog('Wrong value for parameter maxWidth', LOG_ERR);
return 'Error: Wrong value for parameter maxWidth';
}
elseif(!is_numeric($maxHeight) || empty($maxHeight) || $maxHeight < -1){
elseif(!is_numeric($maxHeight) || empty($maxHeight) || $maxHeight < -1) {
// Si la hauteur max est incorrecte (n'est pas numerique, est vide, ou est inferieure a 0)
dol_syslog('Wrong value for parameter maxHeight', LOG_ERR);
return 'Error: Wrong value for parameter maxHeight';
@ -396,6 +455,14 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small',
$imgWidth = $infoImg[0]; // Largeur de l'image
$imgHeight = $infoImg[1]; // Hauteur de l'image
$ort = false;
if (function_exists('exif_read_data')) {
$exif = exif_read_data($filetoread);
if ($exif && !empty($exif['Orientation'])) {
$ort = $exif['Orientation'];
}
}
if ($maxWidth == -1) $maxWidth=$infoImg[0]; // If size is -1, we keep unchanged
if ($maxHeight == -1) $maxHeight=$infoImg[1]; // If size is -1, we keep unchanged
@ -469,6 +536,52 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small',
dol_syslog('Failed to detect type of image. We found infoImg[2]='.$infoImg[2], LOG_WARNING);
return 0;
}
$exifAngle = false;
if ($ort && !empty($conf->global->MAIN_USE_EXIF_ROTATION)) {
switch($ort)
{
case 3: // 180 rotate left
$exifAngle = 180;
break;
case 6: // 90 rotate right
$exifAngle = -90;
// changing sizes
$trueImgWidth = $infoImg[1];
$trueImgHeight = $infoImg[0];
break;
case 8: // 90 rotate left
$exifAngle = 90;
// changing sizes
$trueImgWidth = $infoImg[1]; // Largeur de l'image
$trueImgHeight = $infoImg[0]; // Hauteur de l'image
break;
}
}
if ($exifAngle)
{
$rotated = false;
if($infoImg[2] === 'IMAGETYPE_PNG') // In fact there is no exif on PNG but just in case
{
imagealphablending($img, false);
imagesavealpha($img, true);
$rotated = imagerotate($img, $exifAngle, imageColorAllocateAlpha($img, 0, 0, 0, 127));
imagealphablending($rotated, false);
imagesavealpha($rotated, true);
}
else{
$rotated = imagerotate($img, $exifAngle, 0);
}
// replace image with good orientation
if(!empty($rotated)){
$img = $rotated;
$imgWidth = $trueImgWidth;
$imgHeight = $trueImgHeight;
}
}
// Initialisation des dimensions de la vignette si elles sont superieures a l'original
if($maxWidth > $imgWidth){ $maxWidth = $imgWidth; }

View File

@ -1282,8 +1282,10 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
if (!empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && ($textwasmodified || $translatealsoifmodified)) $note = $prodser->multilangs[$outputlangs->defaultlang]["note"];
}
}
elseif ($object->type == Facture::TYPE_DEPOSIT && $object->element == 'facture') {
$desc = str_replace('(DEPOSIT)', $outputlangs->trans('Deposit'), $desc);
elseif ($object->element == 'facture' || $object->element == 'facturefourn') {
if ($object->type == $object::TYPE_DEPOSIT) {
$desc = str_replace('(DEPOSIT)', $outputlangs->trans('Deposit'), $desc);
}
}
// Description short of product line

View File

@ -119,9 +119,20 @@ elseif ($modulepart == 'project')
{
$result = $object->fetch($id);
if ($result <= 0) dol_print_error($db, 'Failed to load object');
$dir = $conf->projet->dir_output; // By default
$dir = $conf->project->multidir_output[$object->entity]; // By default
}
}
elseif ($modulepart == 'propal')
{
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
$object = new Propal($db);
if ($id > 0)
{
$result = $object->fetch($id);
if ($result <= 0) dol_print_error($db, 'Failed to load object');
$dir = $conf->propal->multidir_output[$object->entity]; // By default
}
}
elseif ($modulepart == 'holiday')
{
require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
@ -243,6 +254,7 @@ if (empty($backtourl))
elseif (in_array($modulepart, array('holiday'))) $backtourl = DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('member'))) $backtourl = DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('project'))) $backtourl = DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('propal'))) $backtourl = DOL_URL_ROOT."/comm/propal/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('societe'))) $backtourl = DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('tax'))) $backtourl = DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('ticket'))) $backtourl = DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($_POST["file"]);

View File

@ -73,6 +73,7 @@ function llxFooter()
require 'main.inc.php'; // Load $user and permissions
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
$encoding = '';
$action=GETPOST('action', 'alpha');
@ -252,11 +253,20 @@ if ($encoding) header('Content-Encoding: '.$encoding);
// Add MIME Content-Disposition from RFC 2183 (inline=automatically displayed, attachment=need user action to open)
if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"');
else header('Content-Disposition: inline; filename="'.$filename.'"');
header('Content-Length: ' . dol_filesize($fullpath_original_file));
// Ajout directives pour resoudre bug IE
header('Cache-Control: Public, must-revalidate');
header('Pragma: public');
$readfile = true;
readfile($fullpath_original_file_osencoded);
// on view document, can output images with good orientation according to exif infos
if (!$attachment && !empty($conf->global->MAIN_USE_EXIF_ROTATION) && image_format_supported($fullpath_original_file_osencoded) == 1) {
$imgres = correctExifImageOrientation($fullpath_original_file_osencoded, null);
$readfile = !$imgres;
}
if($readfile){
header('Content-Length: ' . dol_filesize($fullpath_original_file));
readfile($fullpath_original_file_osencoded);
}
if (is_object($db)) $db->close();

View File

@ -1670,8 +1670,9 @@ CashDesk=Point of Sale
CashDeskSetup=Point of Sales module setup
CashDeskThirdPartyForSell=Default generic third party to use for sales
CashDeskBankAccountForSell=Default account to use to receive cash payments
CashDeskBankAccountForCheque= Default account to use to receive payments by check
CashDeskBankAccountForCB= Default account to use to receive payments by credit cards
CashDeskBankAccountForCheque=Default account to use to receive payments by check
CashDeskBankAccountForCB=Default account to use to receive payments by credit cards
CashDeskBankAccountForSumup=Default bank account to use to receive payments by SumUp
CashDeskDoNotDecreaseStock=Disable stock decrease when a sale is done from Point of Sale (if "no", stock decrease is done for each sale done from POS, irrespective of the option set in module Stock).
CashDeskIdWareHouse=Force and restrict warehouse to use for stock decrease
StockDecreaseForPointOfSaleDisabled=Stock decrease from Point of Sale disabled

View File

@ -56,7 +56,7 @@ NoPageYet=No pages yet
YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template
SyntaxHelp=Help on specific syntax tips
YouCanEditHtmlSourceckeditor=You can edit HTML source code using the "Source" button in editor.
YouCanEditHtmlSource=<br><span class="fa fa-bug"></span> You can include PHP code into this source using tags <strong>&lt;?php ?&gt;</strong>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs.<br><br><span class="fa fa-bug"></span> You can also include content of another Page/Container with the following syntax:<br><strong>&lt;?php includeContainer('alias_of_container_to_include'); ?&gt;</strong><br><br><span class="fa fa-bug"></span> You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):<br><strong>&lt;?php redirectToContainer('alias_of_container_to_redirect_to'); ?&gt;</strong><br><br><span class="fa fa-link"></span> To add a link to another page, use the syntax:<br><strong>&lt;a href="alias_of_page_to_link_to.php"&gt;mylink&lt;a&gt;</strong><br><br><span class="fa fa-download"></span> To include a <strong>link to download</strong> a file stored into the <strong>documents</strong> directory, use the <strong>document.php</strong> wrapper:<br>Example, for a file into documents/ecm (need to be logged), syntax is:<br><strong>&lt;a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext"&gt;</strong><br>For a file into documents/medias (open directory for public access), syntax is:<br><strong>&lt;a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext"&gt;</strong><br>For a file shared with a share link (open access using the sharing hash key of file), syntax is:<br><strong>&lt;a href="/document.php?hashp=publicsharekeyoffile"&gt;</strong><br><br><span class="fa fa-picture-o"></span> To include an <strong>image</strong> stored into the <strong>documents</strong> directory, use the <strong>viewimage.php</strong> wrapper:<br>Example, for an image into documents/medias (open directory for public access), syntax is:<br><strong>&lt;img src="/viewimage.php?modulepart=medias&amp;file=[relative_dir/]filename.ext"&gt;</strong><br>
YouCanEditHtmlSource=<br><span class="fa fa-bug"></span> You can include PHP code into this source using tags <strong>&lt;?php ?&gt;</strong>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs.<br><br><span class="fa fa-bug"></span> You can also include content of another Page/Container with the following syntax:<br><strong>&lt;?php includeContainer('alias_of_container_to_include'); ?&gt;</strong><br><br><span class="fa fa-bug"></span> You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):<br><strong>&lt;?php redirectToContainer('alias_of_container_to_redirect_to'); ?&gt;</strong><br><br><span class="fa fa-link"></span> To add a link to another page, use the syntax:<br><strong>&lt;a href="alias_of_page_to_link_to.php"&gt;mylink&lt;a&gt;</strong><br><br><span class="fa fa-download"></span> To include a <strong>link to download</strong> a file stored into the <strong>documents</strong> directory, use the <strong>document.php</strong> wrapper:<br>Example, for a file into documents/ecm (need to be logged), syntax is:<br><strong>&lt;a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext"&gt;</strong><br>For a file into documents/medias (open directory for public access), syntax is:<br><strong>&lt;a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext"&gt;</strong><br>For a file shared with a share link (open access using the sharing hash key of file), syntax is:<br><strong>&lt;a href="/document.php?hashp=publicsharekeyoffile"&gt;</strong><br><br><span class="fa fa-picture-o"></span> To include an <strong>image</strong> stored into the <strong>documents</strong> directory, use the <strong>viewimage.php</strong> wrapper:<br>Example, for an image into documents/medias (open directory for public access), syntax is:<br><strong>&lt;img src="/viewimage.php?modulepart=medias&amp;file=[relative_dir/]filename.ext"&gt;</strong><br><br>More examples of HTML or dynamic code available on <a href="%s" target="_blank">the wiki documentation</a><br>.
ClonePage=Clone page/container
CloneSite=Clone site
SiteAdded=Website added

View File

@ -232,7 +232,7 @@ require_once 'master.inc.php';
register_shutdown_function('dol_shutdown');
// Load debugbar
if (!empty($conf->debugbar->enabled))
if (!empty($conf->debugbar->enabled) && ! GETPOST('dol_use_jmobile') && empty($_SESSION['dol_use_jmobile']))
{
global $debugbar;
include_once DOL_DOCUMENT_ROOT.'/debugbar/class/DebugBar.php';

View File

@ -1023,7 +1023,9 @@ else
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php';
$formbarcode = new FormBarCode($db);
print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1);
print '</td><td>'.$langs->trans("BarcodeValue").'</td><td>';
print '</td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
print '<td>'.$langs->trans("BarcodeValue").'</td><td>';
$tmpcode = isset($_POST['barcode']) ?GETPOST('barcode') : $object->barcode;
if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type);
print '<input class="maxwidth100" type="text" name="barcode" value="'.dol_escape_htmltag($tmpcode).'">';
@ -1052,10 +1054,13 @@ else
print '<span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddWarehouse").'"></span>';
print '</a>';
print '</td>';
print '</tr>';
// Stock min level
print '<tr><td>'.$form->textwithpicto($langs->trans("StockLimit"), $langs->trans("StockLimitDesc"), 1).'</td><td>';
print '<input name="seuil_stock_alerte" class="maxwidth50" value="'.GETPOST('seuil_stock_alerte').'">';
print '</td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
// Stock desired level
print '<td>'.$form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1).'</td><td>';
print '<input name="desiredstock" class="maxwidth50" value="'.GETPOST('desiredstock').'">';
@ -1094,9 +1099,9 @@ else
if (empty($conf->global->PRODUCT_DISABLE_SIZE))
{
print '<tr><td>'.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").'</td><td colspan="3">';
print '<input name="size" size="4" value="'.GETPOST('size').'"> x ';
print '<input name="sizewidth" size="4" value="'.GETPOST('sizewidth').'"> x ';
print '<input name="sizeheight" size="4" value="'.GETPOST('sizeheight').'">';
print '<input name="size" class="width50" value="'.GETPOST('size').'"> x ';
print '<input name="sizewidth" class="width50" value="'.GETPOST('sizewidth').'"> x ';
print '<input name="sizeheight" class="width50" value="'.GETPOST('sizeheight').'">';
print $formproduct->selectMeasuringUnits("size_units", "size", GETPOSTISSET('size_units') ?GETPOST('size_units', 'alpha') : '0', 0, 2);
print '</td></tr>';
}
@ -1140,8 +1145,10 @@ else
if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO) && empty($type))
{
print '<tr><td>'.$langs->trans("CustomCode").'</td><td><input name="customcode" class="maxwidth100onsmartphone" value="'.GETPOST('customcode').'"></td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
// Origin country
print '<td>'.$langs->trans("CountryOrigin").'</td><td>';
print '<td>'.$langs->trans("CountryOrigin").'</td>';
print '<td>';
print $form->select_country(GETPOST('country_id', 'int'), 'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>';
@ -1178,7 +1185,7 @@ else
print '</table>';
print '<br>';
print '<hr>';
if (!empty($conf->global->PRODUIT_MULTIPRICES))
{
@ -1191,6 +1198,7 @@ else
print $form->load_tva("tva_tx", $defaultva, $mysoc, $mysoc, 0, 0, '', false, 1);
print '</td></tr>';
print '</table>';
print '<br>';
}
else

View File

@ -1201,7 +1201,7 @@ class Product extends CommonObject
}
//We also check if it is a child product
if (!$error && ($prodcomb->fetchByFkProductChild($id) > 0) && ($prodcomb->delete($user) < 0)) {
if (!$error && ($prodcomb->fetchByFkProductChild($this->id) > 0) && ($prodcomb->delete($user) < 0)) {
$error++;
$this->errors[] = 'Error deleting child combination';
}

View File

@ -481,19 +481,21 @@ if ($resql)
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
$newcardbutton = '';
$rightskey = 'produit';
if ($type == Product::TYPE_SERVICE) $rightskey = 'service';
if ($user->rights->{$rightskey}->creer)
if ($type === "") $perm = ($user->rights->produit->creer || $user->rights->service->creer);
elseif ($type == Product::TYPE_SERVICE) $perm = $user->rights->service->creer;
elseif ($type == Product::TYPE_PRODUCT) $perm = $user->rights->produit->creer;
if ($perm)
{
$oldtype = $type;
$params = array();
if ($type === "") $params['forcenohideoftext']=1;
if ($type === "") {
$newcardbutton .= dolGetButtonTitle($langs->trans('NewProduct'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&amp;type=0');
$newcardbutton .= dolGetButtonTitle($langs->trans('NewProduct'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=0', '', 1, $params);
$type = Product::TYPE_SERVICE;
}
$label = 'NewProduct';
if ($type == Product::TYPE_SERVICE) $label = 'NewService';
$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&amp;type='.$type);
$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type='.$type, '', 1, $params);
$type = $oldtype;
}

View File

@ -723,7 +723,9 @@ while ($i < ($limit ? min($num, $limit) : $num))
print '<td class="right"><input type="text" size="4" name="tobuy'.$i.'" value="'.$stocktobuy.'"></td>';
// Supplier
print '<td class="right">'.$form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier).'</td>';
print '<td class="right">';
$form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier);
print '</td>';
// Fields from hook
$parameters = array('objp'=>$objp);

View File

@ -949,7 +949,7 @@ if (!empty($arrayfields['s.import_key']['checked']))
print '</td>';
}
// Action column
print '<td class="liste_titre right">';
print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';

View File

@ -128,6 +128,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="set">';
print '<div class="div-table-responsive">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
@ -244,20 +245,6 @@ print '<td colspan="2">';
print $form->selectyesno("TAKEPOS_DIRECT_PAYMENT", $conf->global->TAKEPOS_DIRECT_PAYMENT, 1);
print "</td></tr>\n";
// Sumup options
if ($conf->global->TAKEPOS_ENABLE_SUMUP) {
print '<tr class="oddeven"><td>';
print $langs->trans("SumupAffiliate");
print '<td colspan="2">';
print '<input type="text" name="TAKEPOS_SUMUP_AFFILIATE" value="'.$conf->global->TAKEPOS_SUMUP_AFFILIATE.'"></input>';
print "</td></tr>\n";
print '<tr class="oddeven"><td>';
print $langs->trans("SumupAppId");
print '<td colspan="2">';
print '<input type="text" name="TAKEPOS_SUMUP_APPID" value="'.$conf->global->TAKEPOS_SUMUP_APPID.'"></input>';
print "</td></tr>\n";
}
// Custom Receipt
print '<tr class="oddeven"><td>';
print $langs->trans('CustomReceipt');
@ -290,6 +277,33 @@ print $form->selectarray('TAKEPOS_EMAIL_TEMPLATE_INVOICE', $arrayofmessagename,
print "</td></tr>\n";
print '</table>';
print '</div>';
// Sumup options
if ($conf->global->TAKEPOS_ENABLE_SUMUP) {
print '<br>';
print '<div class="div-table-responsive">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
print "</tr>\n";
print '<tr class="oddeven"><td>';
print $langs->trans("SumupAffiliate");
print '<td colspan="2">';
print '<input type="text" name="TAKEPOS_SUMUP_AFFILIATE" value="'.$conf->global->TAKEPOS_SUMUP_AFFILIATE.'"></input>';
print "</td></tr>\n";
print '<tr class="oddeven"><td>';
print $langs->trans("SumupAppId");
print '<td colspan="2">';
print '<input type="text" name="TAKEPOS_SUMUP_APPID" value="'.$conf->global->TAKEPOS_SUMUP_APPID.'"></input>';
print "</td></tr>\n";
print '</table>';
print '</div>';
}
print '<br>';

View File

@ -126,6 +126,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'?terminal='.(empty($terminal) ? 1 :
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="set">';
print '<div class="div-table-responsive">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
@ -236,6 +237,7 @@ if (!empty($conf->stock->enabled))
}
print '</table>';
print '</div>';
if ($atleastonefound == 0 && !empty($conf->banque->enabled))
{

View File

@ -26,6 +26,17 @@ button.calcbutton2.poscolordelete {
}
button.calcbutton {
display: inline-block;
position: relative;
padding: 0;
line-height: normal;
cursor: pointer;
vertical-align: middle;
text-align: center;
overflow: visible; /* removes extra width in IE */
width: calc(25% - 2px);
height: 24%;
font-weight: bold;
background-color: #8c907e;
color: #fff;
/* border-color: unset; */
@ -37,9 +48,6 @@ button.calcbutton2 {
color: #fff;
background-color: #5555AA;
border-width: 0px;
}
button.calcbutton {
display: inline-block;
position: relative;
padding: 0;
@ -48,22 +56,8 @@ button.calcbutton {
vertical-align: middle;
text-align: center;
overflow: visible; /* removes extra width in IE */
width:24%;
height:24%;
font-weight: bold;
}
button.calcbutton2 {
display: inline-block;
position: relative;
padding: 0;
line-height: normal;
cursor: pointer;
vertical-align: middle;
text-align: center;
overflow: visible; /* removes extra width in IE */
width:24%;
height:24%;
width: calc(25% - 2px);
height: 24%;
font-weight: bold;
}
@ -77,8 +71,8 @@ button.calcbutton3 {
text-align: center;
font-size:120%;
overflow: visible; /* removes extra width in IE */
width:24%;
height:24%;
width: calc(25% - 2px);
height: 24%;
}
button.actionbutton {
@ -100,6 +94,9 @@ button.actionbutton {
height:24%;
}
.takepospay {
font-size: 1.5em;
}
.fa.fa-trash:before {
font-size: 1.5em;
@ -156,7 +153,7 @@ div.description{
text-align:center;
padding-top: 30px;
background: -webkit-linear-gradient(top, rgba(255,255,255,0), rgba(255,255,255,1), white);
background: -webkit-linear-gradient(top, rgba(255,255,255,0), rgba(255,255,255,0.98), rgba(255,255,255,1));
}
div.catwatermark{
@ -324,6 +321,8 @@ div.description_content {
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
padding-left: 2px;
padding-right: 2px;
}
@media screen and (min-width: 892px) {
@ -380,11 +379,37 @@ div.description_content {
}
}
@media screen and (max-width: 767px){
/* For small screens */
@media screen and (max-width: 767px) {
div.container {
overflow-x: scroll;
}
div.wrapper {
width: 50%;
}
div.wrapper2 {
width: 25%;
}
div.div1, div.div2, div.div3 {
width: 100%;
}
div.row1 {
height: unset;
}
div.div2 {
min-height: unset;
}
button.calcbutton, button.calcbutton2 {
min-height: 30px;
}
.takepospay {
font-size: 1.2em;
}
}

View File

@ -45,6 +45,9 @@ $action = GETPOST('action', 'alpha');
* View
*/
$arrayofcss = array('/takepos/css/pos.css');
$arrayofjs=array();
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
?>
@ -62,13 +65,13 @@ $( document ).ready(function() {
<body>
<br>
<center>
<input type="text" id="desc" name="desc" style="width:40%;font-size: 200%;" placeholder="<?php echo $langs->trans('Description'); ?>">
<input type="text" id="desc" name="desc" class="takepospay" style="width:40%;" placeholder="<?php echo $langs->trans('Description'); ?>">
<?php
if ($action == "freezone") echo '<input type="text" id="number" name="number" style="width:15%;font-size: 200%;" placeholder="'.$langs->trans('Price').'">';
if ($action == "freezone") echo '<input type="text" id="number" name="number" class="takepospay" style="width:15%;" placeholder="'.$langs->trans('Price').'">';
if ($action == "addnote") echo '<input type="hidden" id="number" name="number" value="'.$idline.'">';
?>
<input type="hidden" name="place" value="<?php echo $place; ?>">
<input type="button" class="button" style="width:15%; font-size: 200%;" value="OK" onclick="Save();">
<input type="hidden" name="place" class="takepospay" value="<?php echo $place; ?>">
<input type="button" class="button takepospay clearboth" value="OK" onclick="Save();">
</center>
</body>

View File

@ -67,6 +67,9 @@ else
}
}
$arrayofcss = array('/takepos/css/pos.css');
$arrayofjs=array();
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
$langs->loadLangs(array("main", "bills", "cashdesk"));
@ -178,7 +181,8 @@ else print "var received=0;";
}
function ValidateSumup() {
<?php $_SESSION['SMP_CURRENT_PAYMENT'] = "NEW" ?>
console.log("Launch ValidateSumup");
<?php $_SESSION['SMP_CURRENT_PAYMENT'] = "NEW" ?>
var invoiceid = <?php echo($invoiceid > 0 ? $invoiceid : 0); ?>;
var amountpayed = $("#change1").val();
if (amountpayed > <?php echo $invoice->total_ttc; ?>) {
@ -186,7 +190,7 @@ else print "var received=0;";
}
// Starting sumup app
window.open('sumupmerchant://pay/1.0?affiliate-key=<?php echo dolibarr_get_const($db, "TAKEPOS_SUMUP_AFFILIATE")?>&app-id=<?php echo dolibarr_get_const($db, "TAKEPOS_SUMUP_APPID")?>&total=' + amountpayed + '&currency=EUR&title=' + invoiceid + '&callback=<?php echo DOL_MAIN_URL_ROOT ?>/takepos/smpcb.php');
window.open('sumupmerchant://pay/1.0?affiliate-key=<?php echo $conf->global->TAKEPOS_SUMUP_AFFILIATE ?>&app-id=<?php echo $conf->global->TAKEPOS_SUMUP_APPID ?>&total=' + amountpayed + '&currency=EUR&title=' + invoiceid + '&callback=<?php echo DOL_MAIN_URL_ROOT ?>/takepos/smpcb.php');
var loop = window.setInterval(function () {
$.ajax('/takepos/smpcb.php?status').done(function (data) {
@ -210,23 +214,23 @@ else print "var received=0;";
<div style="position:absolute; top:2%; left:5%; height:30%; width:91%;">
<center>
<div class="paymentbordline paymentbordlinetotal">
<center><span style='font-family: verdana,arial,helvetica; font-size: 200%;'><font color="white"><?php echo $langs->trans('TotalTTC'); ?>: </font><span id="totaldisplay" class="colorwhite"><?php echo price($invoice->total_ttc, 1, '', 1, -1, -1) ?></span></font></span></center>
<center><span class="takepospay"><font color="white"><?php echo $langs->trans('TotalTTC'); ?>: </font><span id="totaldisplay" class="colorwhite"><?php echo price($invoice->total_ttc, 1, '', 1, -1, -1) ?></span></font></span></center>
</div>
<?php if ($remaintopay != $invoice->total_ttc) { ?>
<div class="paymentbordline paymentbordlineremain">
<center><span style='font-family: verdana,arial,helvetica; font-size: 200%;'><font color="white"><?php echo $langs->trans('RemainToPay'); ?>: </font><span id="remaintopaydisplay" class="colorwhite"><?php echo price($remaintopay, 1, '', 1, -1, -1) ?></span></font></span></center>
<center><span class="takepospay"><font color="white"><?php echo $langs->trans('RemainToPay'); ?>: </font><span id="remaintopaydisplay" class="colorwhite"><?php echo price($remaintopay, 1, '', 1, -1, -1) ?></span></font></span></center>
</div>
<?php } ?>
<div class="paymentbordline paymentbordlinereceived">
<center><span style='font-family: verdana,arial,helvetica; font-size: 200%;'><font color="white"><?php echo $langs->trans("Received"); ?>: </font><span class="change1 colorred"><?php echo price(0) ?></span><input type="hidden" id="change1" class="change1" value="0"></font></span></center>
<center><span class="takepospay"><font color="white"><?php echo $langs->trans("Received"); ?>: </font><span class="change1 colorred"><?php echo price(0) ?></span><input type="hidden" id="change1" class="change1" value="0"></font></span></center>
</div>
<div class="paymentbordline paymentbordlinechange">
<center><span style='font-family: verdana,arial,helvetica; font-size: 200%;'><font color="white"><?php echo $langs->trans("Change"); ?>: </font><span class="change2 colorwhite"><?php echo price(0) ?></span><input type="hidden" id="change2" class="change2" value="0"></font></span></center>
<center><span class="takepospay"><font color="white"><?php echo $langs->trans("Change"); ?>: </font><span class="change2 colorwhite"><?php echo price(0) ?></span><input type="hidden" id="change2" class="change2" value="0"></font></span></center>
</div>
</center>
</div>
<div style="position:absolute; top:33%; left:5%; height:55%; width:91%;">
<div style="position:absolute; top:33%; left:5%; height:55%; width:91%; display: inline-table;">
<?php
$action_buttons = array(
array(
@ -299,10 +303,15 @@ while ($i < count($paiements)) {
$i = $i + 1;
}
if ($conf->global->TAKEPOS_ENABLE_SUMUP && !empty(dolibarr_get_const($db, "CASHDESK_ID_BANKACCOUNT_SUMUP".$_SESSION["takeposterminal"]))) {
?>
<button type="button" class="calcbutton2" onclick="ValidateSumup();">Sumup</button>
<?php
$keyforsumupbank = "CASHDESK_ID_BANKACCOUNT_SUMUP".$_SESSION["takeposterminal"];
if ($conf->global->TAKEPOS_ENABLE_SUMUP) {
if (!empty($conf->global->$keyforsumupbank)) {
print '<button type="button" class="calcbutton2" onclick="ValidateSumup();">Sumup</button>';
} else {
$langs->load("errors");
$langs->load("admin");
print '<button type="button" class="calcbutton2 disabled" title="'.$langs->trans("SetupNotComplete").'">Sumup</button>';
}
}
$class = ($i == 3) ? "calcbutton3" : "calcbutton2";

View File

@ -181,12 +181,14 @@ function PrintCategories(first) {
$("#catdesc"+i).text("");
$("#catimg"+i).attr("src","genimg/empty.png");
$("#catwatermark"+i).hide();
$("#catdiv"+i).attr('class', 'wrapper divempty');
continue;
}
$("#catdivdesc"+i).show();
$("#catdesc"+i).text(categories[parseInt(i)+parseInt(first)]['label']);
$("#catimg"+i).attr("src","genimg/index.php?query=cat&id="+categories[parseInt(i)+parseInt(first)]['rowid']);
$("#catdiv"+i).data("rowid",categories[parseInt(i)+parseInt(first)]['rowid']);
$("#catdiv"+i).attr('class', 'wrapper');
$("#catwatermark"+i).show();
}
}
@ -264,6 +266,7 @@ function LoadProducts(position, issubcat) {
$("#proimg"+ishow).attr("title","");
$("#proimg"+ishow).attr("src","genimg/empty.png");
$("#prodiv"+ishow).data("rowid","");
$("#prodiv"+ishow).attr("class","wrapper2 divempty");
$("#prowatermark"+ishow).hide();
ishow++; //Next product to show after print data product
}
@ -275,6 +278,7 @@ function LoadProducts(position, issubcat) {
$("#proimg"+ishow).attr("src", "genimg/index.php?query=pro&id="+data[idata]['id']);
$("#prodiv"+ishow).data("rowid", data[idata]['id']);
$("#prodiv"+ishow).data("iscat", 0);
$("#prodiv"+ishow).attr("class","wrapper2");
$("#prowatermark"+ishow).hide();
ishow++; //Next product to show after print data product
}
@ -797,7 +801,7 @@ $menus[$r++]=array('title'=>'<span class="fa fa-sign-out-alt paddingrightonly"><
<div class="description_content" id="catdesc<?php echo $count; ?>"></div>
</div>
<?php } ?>
<div class="catwatermark" id='catwatermark<?php echo $count; ?>'>+</div>
<div class="catwatermark" id='catwatermark<?php echo $count; ?>'>...</div>
</div>
<?php
$count++;
@ -832,7 +836,7 @@ $menus[$r++]=array('title'=>'<span class="fa fa-sign-out-alt paddingrightonly"><
<div class="description_content" id="prodesc<?php echo $count; ?>"></div>
</div>
<?php } ?>
<div class="catwatermark" id='prowatermark<?php echo $count; ?>'>+</div>
<div class="catwatermark" id='prowatermark<?php echo $count; ?>'>...</div>
</div>
<?php
$count++;

View File

@ -372,6 +372,7 @@ th .button {
}
.maxwidthsearch { /* Max width of column with the search picto */
width: 54px;
min-width: 54px;
}
.valigntop {
vertical-align: top;
@ -529,8 +530,8 @@ body[class*="colorblind-"] .text-success{
.fa-toggle-on, .fa-toggle-off { font-size: 2em; }
.websiteselectionsection .fa-toggle-on, .websiteselectionsection .fa-toggle-off,
.asetresetmodule .fa-toggle-on, .asetresetmodule .fa-toggle-off {
font-size: 1.5em; vertical-align: text-bottom;
.asetresetmodule .fa-toggle-on, .asetresetmodule .fa-toggle-off {
font-size: 1.5em; vertical-align: text-bottom;
}
/* Themes for badges */
@ -5950,14 +5951,13 @@ div.tabsElem a.tab {
font-size: 12px;
}
.text-plus-circle {
display: none;
}
table.table-fiche-title .col-title div.titre{
line-height: unset;
}
input#addedfile {
width: 95%;
}
}
<?php

View File

@ -594,6 +594,7 @@ th .button {
}
.maxwidthsearch { /* Max width of column with the search picto */
width: 54px;
min-width: 54px;
}
.valigntop {
@ -6040,6 +6041,10 @@ border-top-right-radius: 6px;
table.table-fiche-title .col-title div.titre{
line-height: unset;
}
input#addedfile {
width: 95%;
}
}
@ -6060,15 +6065,11 @@ border-top-right-radius: 6px;
<?php if (!defined('DISABLE_FONT_AWSOME')) { ?>
<?php include dol_buildpath($path.'/theme/'.$theme.'/main_menu_fa_icons.inc.php', 0); ?>
<?php }
<?php
include dol_buildpath($path.'/theme/'.$theme.'/dropdown.inc.php', 0);
include dol_buildpath($path.'/theme/'.$theme.'/info-box.inc.php', 0);
include dol_buildpath($path.'/theme/'.$theme.'/progress.inc.php', 0);
include dol_buildpath($path.'/theme/eldy/timeline.inc.php', 0); // actually md use same style as eldy theme
if (is_object($db)) $db->close();

View File

@ -74,8 +74,8 @@ $pagenext = $page + 1;
$object = new Ticket($db);
$extrafields = new ExtraFields($db);
$diroutputmassaction = $conf->ticket->dir_output.'/temp/massgeneration/'.$user->id;
if ($socid > 0) $hookmanager->initHooks(array('thirdpartyticket'));
elseif ($project > 0) $hookmanager->initHooks(array('projectticket'));
if ($socid > 0) $hookmanager->initHooks(array('thirdpartyticket'));
elseif ($projectid > 0) $hookmanager->initHooks(array('projectticket'));
else $hookmanager->initHooks(array('ticketlist'));
// Fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element);
@ -149,6 +149,8 @@ if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; }
if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; }
$parameters = array();
if ($socid > 0) $parameters['socid'] = $socid;
if ($projectid > 0) $parameters['projectid'] = $projectid;
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');

View File

@ -1034,6 +1034,8 @@ class User extends CommonObject
*/
public function setCategories($categories)
{
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$type_categ = Categorie::TYPE_USER;
// Handle single category
@ -1042,7 +1044,6 @@ class User extends CommonObject
}
// Get current categories
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$c = new Categorie($this->db);
$existing = $c->containing($this->id, $type_categ, 'id');
@ -1106,9 +1107,9 @@ class User extends CommonObject
}
// If contact, remove link
if ($this->contact_id)
if ($this->contactid > 0 || $this->contact_id > 0)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET fk_user_creat = null WHERE rowid = ".$this->contact_id;
$sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET fk_user_creat = null WHERE rowid = ".(($this->contactid > 0) ? $this->contactid : $this->contact_id);
if (!$error && !$this->db->query($sql))
{
$error++;

View File

@ -2452,7 +2452,9 @@ if (!GETPOST('hide_websitemenu'))
print '<span class="websitehelp">';
if (GETPOST('editsource', 'alpha') || GETPOST('editcontent', 'alpha'))
{
$htmltext = $langs->transnoentitiesnoconv("YouCanEditHtmlSource").'<br>';
$url = 'https://wiki.dolibarr.org/index.php/Module_Website';
$htmltext = $langs->transnoentitiesnoconv("YouCanEditHtmlSource", $url).'<br>';
if ($conf->browser->layout == 'phone')
{
print $form->textwithpicto('', $htmltext, 1, 'help', 'inline-block', 1, 2, 'tooltipsubstitution');