Merge remote-tracking branch 'Dolibarr/develop' into MassClose

This commit is contained in:
Inovea Conseil 2018-11-30 15:00:25 +01:00
commit 46f5e7b06b
46 changed files with 419 additions and 146 deletions

View File

@ -289,7 +289,7 @@ script:
# Ensure we catch errors
set -e
#parallel-lint --exclude htdocs/includes --blame .
parallel-lint --exclude htdocs/includes/sabre --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
parallel-lint --exclude htdocs/includes/sabre --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
set +e
echo

103
ChangeLog
View File

@ -5,20 +5,111 @@ English Dolibarr ChangeLog
***** ChangeLog for 9.0.0 compared to 8.0.0 *****
For Users:
NEW: Stable module: Website
NEW: Stable module: WebDAV
NEW: Stable module: Module Builder
NEW: Stable module: DAV (WebDAV only for the moment)
NEW: Stable module "Skype" has been replaced with module "Social Networks" to support more services.
NEW: Stable module "Module Builder"
NEW: Stable module: Website
NEW: Experimental module "TakePos"
NEW: Experimental module "Ticket"
NEW: Experimental module "Data Privacy"
NEW: Experimental module "Email Collector"
NEW: Dolibarr can provide information in page title when multicompany is enabled of not, making
Android application like DoliDroid able to provide native features for multicompany module.
NEW: Compatibility with PHP 7.3
NEW: Compatibility with PHP 7.3 =>
NEW: Add admin page for modulebuilder
NEW: Add civility in list of members. Close #9251
NEW: Add configuration to disable "customer/prospect" thirdparty type
NEW: Add CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY and CONTRACT_HIDE_UNSELECTABLES by SELECT_HIDE_UNSELECTABLES
NEW: Add __DAY_TEXT__ and __MONTH_TEXT__ substitutions vars
NEW: Add due date column in payment lists
NEW: Add email in event history, for reminder email of expired subsription
NEW: Add event tab on resource record
NEW: Add FEC Export in accountancy
NEW: Add filter on staff range in list of thirdparties
NEW: Add a first complete template of website
NEW: Add format code into exported filename of ledger
NEW: Add hidden option EXPENSEREPORT_DEFAULT_VALIDATOR_UNCHANGEABLE
NEW: Add hidden option MAIN_DOCUMENTS_DESCRIPTION_FIRST
NEW: Add link to inventory code
NEW: Add more common social networks fields for business
NEW: Add option PDF_DISABLE_MYCOMPANY_LOGO to disable logo on PDF
NEW: add option PROPOSAL_AUTO_ADD_AUTHOR_AS_CONTACT
NEW: Add option to display thirdparty adress in combolist
NEW: Add option to swap sender/recipient address on PDF
NEW: Add option to display thirdparty adress in combolist
NEW: Add project on pament of salaries
NEW: Add SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME and
NEW: Add somes hooks in bank planned entries
NEW: Add supplier ref in item reception page
NEW: Advanced permission to ignore price min
NEW: Allow to enter a timespent with a numeric value
NEW: Automatic position of scroll when creating an extrafield
NEW: Can add autorefresh=X in any URLs to refresh page after X seconds
NEW: can add project's task to agenda on create event form
NEW: Can delete a website in experimental website module
NEW: Can disable meteo on smartphone only
NEW: Can export/import a website template
NEW: Can filter on EEC, not EEC, etc... in binding step of accountancy
NEW: Can mix offset before and after with rules for due date of invoices
NEW: Can record the supplier product description
NEW: Can select several prospect level in thirdparty filter.
NEW: Can set 2 url in url field of thirdparty
NEW: Can set if a field is mandatory on form level.
NEW: Can set the default focus of each page.
NEW: Add category filter on user list
NEW: Change forgotten password link in general parameters
NEW: Child label of variants change if parent label changes
NEW: Compatibility with new Paybox HMAC requirement
NEW: Each user can set its prefered default calendar page
NEW: Enhancement in process to make manual bank conciliation
NEW: Enhancement in the generic file manager
NEW: Extrafield totalizable
NEW: Hidden conf INVOICE_USE_DEFAULT_DOCUMENT
NEW: hidden conf to search product by supplier ref
NEW: hidden constant to be able to use a thirdparty for donation
NEW: hidden option to define an invoice template for each invoice type
NEW: Highlight lines on lists when they are checked
NEW: Notification module support expense report+holiday validation and approval
NEW: On customer/supplier card, add simple tooltip to amount boxes
NEW: Page to check if the operations/items created between two dates have attached item(s) and possibility to download all attachements
NEW: possibility to add all rights of all modules in one time
NEW: redirect if only one result on global search on card
NEW: Permission to ignore price min
NEW: Can build an archive of full documents directory from backup page
NEW: tag odt line_product_ref_fourn for supplier doc lines
NEW: The binding step in accountancy has a country filter with autocompletion
NEW: Top menu is always on screen with MD theme.
NEW: Withdraw request massaction can include already partially paid invoices
For developers:
* Code changes to be more compatible with PSR2
* Removed trigger USER_LOGOUT, USER_LOGIN, USER_LOGIN_FAILED (Some hooks are already dedicated for that)
NEW: Add lib for multiselect with checkboxes
NEW: Add function isValidMXRecord
NEW: Add hook changeRoundingMode in update_price
NEW: Add hook formconfirm to contractcard
NEW: Add hook for virtual stock
NEW: ADD url to see the last version of a external module
NEW: Can enable a module, even external module, from command line
NEW: Can set a tooltip help text on extrafields
NEW: Add product search from barcode via REST api
NEW: can add documents on agenda events using API REST
NEW: Can set the datestart and dateend of cron job into module descriptor
NEW: Close #9296 Add field ref_ext into llx_categorie
NEW: move ticket dictionary in API /setup
NEW: PHPUnitTest on Loan class #3163
NEW: Code changes to be more compatible with PSR2
NEW: Removed trigger USER_LOGOUT, USER_LOGIN, USER_LOGIN_FAILED (Some hooks are already dedicated for that)
NEW: Add agenda documents in API REST
NEW: Add "checked" field for new list engine compatibility
NEW: REST API improvements
NEW: Save external payment IDs into table of payment
NEW: triggers add commercial and del commercial
NEW: #9236 Allow to import shipment lines via API
NEW: ADD civility list in API
NEW: support selllist in the module builder
NEW: optional param to show a specific extrafield
NEW: hook formConfirm always called if hooked
NEW: hook on dispatch order fourn
WARNING:

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -41,6 +41,7 @@ $id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$rowid = GETPOST('rowid', 'int');
$cancel = GETPOST('cancel','alpha');
$accountingaccount = GETPOST('accountingaccount','alpha');
// Security check
@ -229,7 +230,7 @@ if ($action == 'create') {
// Account number
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>';
print '<td><input name="account_number" size="30" value="' . $object->account_number . '"></td></tr>';
print '<td><input name="account_number" size="30" value="' . $accountingaccount . '"></td></tr>';
// Label
print '<tr><td><span class="fieldrequired">' . $langs->trans("Label") . '</span></td>';

View File

@ -266,7 +266,7 @@ if ($action != 'export_csv')
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
$root_account_description = $object->get_compte_racine($line->numero_compte);
if (empty($description)) {
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
$link = '<a href="../admin/card.php?action=create&accountingaccount=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
}
print '<tr class="oddeven">';

View File

@ -129,4 +129,4 @@ print '</form>';
// End of page
llxFooter();
$db->close();;
$db->close();

View File

@ -234,7 +234,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
$sql = "SELECT";
if ($usergroup > 0) $sql.=" DISTINCT";
$sql.= " s.nom as societe, s.rowid as socid, s.client,";
$sql.= " s.nom as societe, s.rowid as socid, s.client, s.email as socemail,";
$sql.= " a.id, a.label, a.datep as dp, a.datep2 as dp2,";
$sql.= ' a.fk_user_author,a.fk_user_action,';
$sql.= " a.fk_contact, a.note, a.percent as percent,";
@ -605,11 +605,13 @@ if ($resql)
// Third party
if (! empty($arrayfields['s.nom']['checked'])) {
print '<td class="tdoverflowmax100">';
if ($obj->socid)
if ($obj->socid > 0)
{
$societestatic->id=$obj->socid;
$societestatic->client=$obj->client;
$societestatic->name=$obj->societe;
$societestatic->email=$obj->socemail;
print $societestatic->getNomUrl(1,'',28);
}
else print '&nbsp;';

View File

@ -11,7 +11,7 @@
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016-2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2017 Charlene Benke <charlie@patas-monkey.com>
* Copyright (C) 2017-2018 Charlene Benke <charlie@patas-monkey.com>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
*
* This program is free software; you can redistribute it and/or modify
@ -175,9 +175,6 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
}
}
$object = new Propal($db); // To be passed as parameter of executeHooks that need
/*
* Actions
*/

View File

@ -589,7 +589,7 @@ else
// Localtax
print '<td class="nowrap" align="right">';
$temp_vat=($local==1?$fields['localtax1']:$fields['localtax2'])*$ratiopaymentinvoice;;
$temp_vat=($local==1?$fields['localtax1']:$fields['localtax2'])*$ratiopaymentinvoice;
print price(price2num($temp_vat,'MT'),1);
//print price($fields['vat']);
print '</td>';

View File

@ -63,7 +63,7 @@ $hookmanager->initHooks(array('salarycard','globalcard'));
if ($cancel)
{
header("Location: index.php");
header("Location: list.php");
exit;
}
@ -139,7 +139,7 @@ if ($action == 'add' && empty($cancel))
if ($ret > 0)
{
$db->commit();
header("Location: index.php");
header("Location: list.php");
exit;
}
else

View File

@ -29,7 +29,7 @@ $mesg=array();
$extrasize=GETPOST('size','int');
$type=GETPOST('type','alpha');
$param=GETPOST('param','alpha');;
$param=GETPOST('param','alpha');
if ($type=='double' && strpos($extrasize,',')===false) $extrasize='24,8';
if ($type=='date') $extrasize='';

View File

@ -1108,7 +1108,7 @@ class DolGraph
// Background color
$color1=sprintf("%02x%02x%02x",$this->bgcolorgrid[0],$this->bgcolorgrid[0],$this->bgcolorgrid[2]);
$color2=sprintf("%02x%02x%02x",$this->bgcolorgrid[0],$this->bgcolorgrid[1],$this->bgcolorgrid[2]);
$this->stringtoshow.=', grid: { hoverable: true, backgroundColor: { colors: ["#'.$color1.'", "#'.$color2.'"] }, borderWidth: 1, borderColor: \'#eee\', tickColor : \'#f3f3f3\' }'."\n";
$this->stringtoshow.=', grid: { hoverable: true, backgroundColor: { colors: ["#'.$color1.'", "#'.$color2.'"] }, borderWidth: 1, borderColor: \'#e6e6e6\', tickColor : \'#e6e6e6\' }'."\n";
//$this->stringtoshow.=', shadowSize: 20'."\n"; TODO Uncommet this
$this->stringtoshow.='});'."\n";
$this->stringtoshow.='}'."\n";

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2005-2014 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2005-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
@ -46,33 +46,33 @@ else header('Cache-Control: no-cache');
// Define tradMonths javascript array (we define this in datepicker AND in parent page to avoid errors with IE8)
$tradMonths=array(
dol_escape_js($langs->transnoentitiesnoconv("January")),
dol_escape_js($langs->transnoentitiesnoconv("February")),
dol_escape_js($langs->transnoentitiesnoconv("March")),
dol_escape_js($langs->transnoentitiesnoconv("April")),
dol_escape_js($langs->transnoentitiesnoconv("May")),
dol_escape_js($langs->transnoentitiesnoconv("June")),
dol_escape_js($langs->transnoentitiesnoconv("July")),
dol_escape_js($langs->transnoentitiesnoconv("August")),
dol_escape_js($langs->transnoentitiesnoconv("September")),
dol_escape_js($langs->transnoentitiesnoconv("October")),
dol_escape_js($langs->transnoentitiesnoconv("November")),
dol_escape_js($langs->transnoentitiesnoconv("December"))
dol_escape_js($langs->transnoentitiesnoconv("Month01")),
dol_escape_js($langs->transnoentitiesnoconv("Month02")),
dol_escape_js($langs->transnoentitiesnoconv("Month03")),
dol_escape_js($langs->transnoentitiesnoconv("Month04")),
dol_escape_js($langs->transnoentitiesnoconv("Month05")),
dol_escape_js($langs->transnoentitiesnoconv("Month06")),
dol_escape_js($langs->transnoentitiesnoconv("Month07")),
dol_escape_js($langs->transnoentitiesnoconv("Month08")),
dol_escape_js($langs->transnoentitiesnoconv("Month09")),
dol_escape_js($langs->transnoentitiesnoconv("Month10")),
dol_escape_js($langs->transnoentitiesnoconv("Month11")),
dol_escape_js($langs->transnoentitiesnoconv("Month12"))
);
$tradMonthsShort=array(
$langs->trans("JanuaryMin"),
$langs->trans("FebruaryMin"),
$langs->trans("MarchMin"),
$langs->trans("AprilMin"),
$langs->trans("MayMin"),
$langs->trans("JuneMin"),
$langs->trans("JulyMin"),
$langs->trans("AugustMin"),
$langs->trans("SeptemberMin"),
$langs->trans("OctoberMin"),
$langs->trans("NovemberMin"),
$langs->trans("DecemberMin")
$langs->trans("MonthShort01"),
$langs->trans("MonthShort02"),
$langs->trans("MonthShort03"),
$langs->trans("MonthShort04"),
$langs->trans("MonthShort05"),
$langs->trans("MonthShort06"),
$langs->trans("MonthShort07"),
$langs->trans("MonthShort08"),
$langs->trans("MonthShort09"),
$langs->trans("MonthShort10"),
$langs->trans("MonthShort11"),
$langs->trans("MonthShort12")
);
$tradDays=array(

View File

@ -1344,7 +1344,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql.= ", ".MAIN_DB_PREFIX."product as o";
$sql.= " WHERE a.entity IN (".getEntity('agenda').")";
if (is_object($filterobj) && get_class($filterobj) == 'Societe' && $filterobj->id) $sql.= " AND a.fk_soc = ".$filterobj->id;
if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur')) && $filterobj->id) $sql.= " AND a.fk_soc = ".$filterobj->id;
elseif (is_object($filterobj) && get_class($filterobj) == 'Project' && $filterobj->id) $sql.= " AND a.fk_project = ".$filterobj->id;
elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent')
{
@ -1386,6 +1386,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
if (is_array($filters) && $filters['search_agenda_label']) $sql.= natural_search('a.label', $filters['search_agenda_label']);
//TODO Add limit for thirdparty in contexte very all result
$sql.= $db->order($sortfield, $sortorder);
dol_syslog("company.lib::show_actions_done", LOG_DEBUG);
$resql=$db->query($sql);

View File

@ -91,7 +91,7 @@ function report_header($reportname,$notused,$period,$periodlink,$description,$bu
print '<td>'.$langs->trans("ReportPeriod").'</td>';
print '<td>';
if ($period) print $period;
if ($variante) print '<td>'.$periodlink.'</td>';
if ($variante) print '<td class="nowraponall">'.$periodlink.'</td>';
print '</td>';
print '</tr>';

View File

@ -822,22 +822,22 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
//print ' &nbsp; ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
if ($edit)
{
if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color='edf4fb';
if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color='e6edf0';
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER,array()),'');
print $formother->selectColor($color,'THEME_ELDY_USE_HOVER','formcolor',1).' ';
}
else
{
if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color='edf4fb';
if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color='e6edf0';
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER,array()),'');
if ($color)
{
if ($color != 'edf4fb') print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
if ($color != 'e6edf0') print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
else print $langs->trans("Default");
}
else print $langs->trans("None");
}
print ' &nbsp; <span class="nowraponall">('.$langs->trans("Default").': <strong>edf4fb</strong>) ';
print ' &nbsp; <span class="nowraponall">('.$langs->trans("Default").': <strong>e6edf0</strong>) ';
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
print '</span>';
print '</td>';
@ -866,22 +866,22 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
//print ' &nbsp; ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
if ($edit)
{
if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color='ffefbb';
if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color='e6edf0';
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_CHECKED,array()),'');
print $formother->selectColor($color,'THEME_ELDY_USE_CHECKED','formcolor',1).' ';
}
else
{
if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color='ffefbb';
if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color='e6edf0';
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_CHECKED,array()),'');
if ($color)
{
if ($color != 'ffefbb') print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
if ($color != 'e6edf0') print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
else print $langs->trans("Default");
}
else print $langs->trans("None");
}
print ' &nbsp; <span class="nowraponall">('.$langs->trans("Default").': <strong>ffefbb</strong>) ';
print ' &nbsp; <span class="nowraponall">('.$langs->trans("Default").': <strong>e6edf0</strong>) ';
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
print '</span>';
print '</td>';

View File

@ -80,7 +80,7 @@ class modAccounting extends DolibarrModules
"MAIN_COMPANY_CODE_ALWAYS_REQUIRED",
"chaine",
"1",
"With this constants on, third party code is always required whatever is numbering module behaviour", 0, 'current', 0
"With this constants on, third party code is always required whatever is numbering module behaviour", 0, 'current', 1
);
$this->const[2] = array(
"MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED",

View File

@ -97,7 +97,7 @@ class modCashDesk extends DolibarrModules
// This is to declare the Top Menu entry:
$this->menu[$r]=array( 'fk_menu'=>0, // Put 0 if this is a top menu
'type'=>'top', // This is a Top menu entry
'titre'=>'CashDeskMenu',
'titre'=>'PointOfSaleShort',
'mainmenu'=>'cashdesk',
'url'=>'/cashdesk/index.php?user=__LOGIN__',
'langs'=>'cashdesk', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.

View File

@ -102,7 +102,7 @@ class modTakePos extends DolibarrModules
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->langfiles = array("cashdesk");
$this->phpmin = array(5,43); // Minimum version of PHP required by module
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(4,0); // Minimum version of Dolibarr required by module
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
$this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
@ -226,7 +226,7 @@ class modTakePos extends DolibarrModules
/* BEGIN MODULEBUILDER TOPMENU */
$this->menu[$r++]=array('fk_menu'=>'', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'top', // This is a Top menu entry
'titre'=>'PointOfSale',
'titre'=>'PointOfSaleShort',
'mainmenu'=>'takepos',
'leftmenu'=>'',
'url'=>'/takepos/takepos.php',

View File

@ -167,7 +167,7 @@ class modWebsite extends DolibarrModules
if ($result < 0)
{
$langs->load("errors");
$this->error=$langs->trans('ErrorFailToCopyDirectory',$src,$dest);
$this->error=$langs->trans('ErrorFailToCopyDir',$src,$dest);
return 0;
}
}

View File

@ -796,7 +796,7 @@ class doc_generic_project_odt extends ModelePDFProjects
if (!empty($row['thm'])) {
$row['amountht']=($row['task_duration'] / 3600) * $row['thm'];
$defaultvat = get_default_tva($mysoc, $mysoc);
$row['amountttc']=price2num($row['amountht'] * (1 + ($defaultvat / 100)),'MT');;
$row['amountttc']=price2num($row['amountht'] * (1 + ($defaultvat / 100)),'MT');
} else {
$row['amountht']=0;
$row['amountttc']=0;

View File

@ -150,7 +150,7 @@ class pdf_stdmovement extends ModelePDFMovement
// Define position of columns
$this->wref = 15;
$this->posxidref = $this->marge_gauche;
$this->posxdatemouv = $this->marge_gauche+8;;
$this->posxdatemouv = $this->marge_gauche+8;
$this->posxdesc=37;
$this->posxlabel=50;
$this->posxtva=80;

View File

@ -711,8 +711,20 @@ class Don extends CommonObject
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
/**
* Validate a intervention
*
* @param User $user User that validate
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
function setValid($user, $notrigger=0)
{
return $this->valid_promesse($this->id, $user->id, $notrigger);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Validate a promise of donation
*
* @param int $id id of donation
@ -720,9 +732,9 @@ class Don extends CommonObject
* @param int $notrigger Disable triggers
* @return int <0 if KO, >0 if OK
*/
function valid_promesse($id, $userid, $notrigger=0)
{
// phpcs:enable
function valid_promesse($id, $userid, $notrigger=0)
{
// phpcs:enable
global $langs, $user;
$error=0;

View File

@ -83,7 +83,7 @@ class EmailCollectorAction extends CommonObject
*/
public $fields=array(
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",),
'fk_emailcollector' => array('type'=>'integer', 'label'=>'Id of emailcollector', 'foreignkey'=>'emailcollecotr.rowid'),
'fk_emailcollector' => array('type'=>'integer', 'label'=>'Id of emailcollector', 'foreignkey'=>'emailcollector.rowid'),
'type' => array('type'=>'varchar(128)', 'label'=>'Type', 'enabled'=>1, 'visible'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1),
'actionparam' => array('type'=>'varchar(255)', 'label'=>'ParamForAction', 'enabled'=>1, 'visible'=>1, 'position'=>40, 'notnull'=>-1),
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>500, 'notnull'=>1,),

View File

@ -1925,7 +1925,7 @@ else
print $paymentexpensereportstatic->getNomUrl(1);
print '</td>';
print '<td>'.dol_print_date($db->jdate($objp->dp),'day')."</td>\n";
$labeltype=$langs->trans("PaymentType".$objp->p_code)!=("PaymentType".$objp->p_code)?$langs->trans("PaymentType".$objp->p_code):$objp->fk_typepayment;
$labeltype=$langs->trans("PaymentType".$objp->p_code)!=("PaymentType".$objp->p_code)?$langs->trans("PaymentType".$objp->p_code):$objp->payment_type;
print "<td>".$labeltype.' '.$objp->num_payment."</td>\n";
if (! empty($conf->banque->enabled))
{

View File

@ -315,7 +315,6 @@ class Fichinter extends CommonObject
*/
function update($user, $notrigger=0)
{
global $conf;
if (! is_numeric($this->duration)) {
$this->duration = 0;
}

View File

@ -904,7 +904,7 @@ if (empty($reshook))
// FIXME Missing special_code into addline and updateline methods
$object->special_code = $lines[$i]->special_code;
// FIXME Missing $lines[$i]->ref_supplier and $lines[$i]->label into addline and updateline methods. They are filled when coming from order for example.
$result = $object->addline(
$desc,
@ -2717,7 +2717,7 @@ else
$paymentstatic->id=$objp->rowid;
$paymentstatic->datepaye=$db->jdate($objp->dp);
$paymentstatic->ref=($objp->ref ? $objp->ref : $objp->rowid);;
$paymentstatic->ref=($objp->ref ? $objp->ref : $objp->rowid);
$paymentstatic->num_paiement=$objp->num_paiement;
$paymentstatic->payment_code=$objp->payment_code;

View File

@ -305,7 +305,7 @@ ModuleFamilyTechnic=Multi-modules tools
ModuleFamilyExperimental=Experimental modules
ModuleFamilyFinancial=Financial Modules (Accounting/Treasury)
ModuleFamilyECM=Electronic Content Management (ECM)
ModuleFamilyPortal=Web sites and other frontal application
ModuleFamilyPortal=Websites and other frontal application
ModuleFamilyInterface=Interfaces with external systems
MenuHandlers=Menu handlers
MenuAdmin=Menu editor
@ -1843,6 +1843,7 @@ LoadThirdPartyFromName=Load thirdparty from name (load only)
LoadThirdPartyFromNameOrCreate=Load thirdparty from name (create if not found)
WithDolTrackingID=Dolibarr Tracking ID found
WithoutDolTrackingID=Dolibarr Tracking ID not found
FormatZip=Zip
##### Resource ####
ResourceSetup=Configuration du module Resource
UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list).

View File

@ -33,6 +33,7 @@ FilterRefOrLabelOrBC=Search (Ref/Label)
UserNeedPermissionToEditStockToUsePos=You ask to decrease stock on invoice creation, so user that uses POS needs to have permission to edit stock.
DolibarrReceiptPrinter=Dolibarr Receipt Printer
PointOfSale=Point of sales
PointOfSaleShort=POS
CloseBill=Close Bill
Floors=Floors
Floor=Floor

View File

@ -848,9 +848,9 @@ ModuleBuilder=Module Builder
SetMultiCurrencyCode=Set currency
BulkActions=Bulk actions
ClickToShowHelp=Click to show tooltip help
WebSite=Web site
WebSites=Web sites
WebSiteAccounts=Web site accounts
WebSite=Website
WebSites=Websites
WebSiteAccounts=Website accounts
ExpenseReport=Expense report
ExpenseReports=Expense reports
HR=HR

View File

@ -13,7 +13,7 @@ WEBSITE_CSS_INLINE=CSS file content (common to all pages)
WEBSITE_JS_INLINE=Javascript file content (common to all pages)
WEBSITE_HTML_HEADER=Addition at bottom of HTML Header (common to all pages)
WEBSITE_ROBOT=Robot file (robots.txt)
WEBSITE_HTACCESS=Web site .htaccess file
WEBSITE_HTACCESS=Website .htaccess file
HtmlHeaderPage=HTML header (specific to this page only)
PageNameAliasHelp=Name or alias of the page.<br>This alias is also used to forge a SEO URL when website is ran from a Virtual host of a Web server (like Apacke, Nginx, ...). Use the button "<strong>%s</strong>" to edit this alias.
EditTheWebSiteForACommonHeader=Note: If you want to define a personalized header for all pages, edit the header on the site level instead of on the page/container.
@ -54,7 +54,7 @@ YouCanEditHtmlSourceckeditor=You can edit HTML source code using the "Source" bu
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>
ClonePage=Clone page/container
CloneSite=Clone site
SiteAdded=Web site added
SiteAdded=Website added
ConfirmClonePage=Please enter code/alias of new page and if it is a translation of the cloned page.
PageIsANewTranslation=The new page is a translation of the current page ?
LanguageMustNotBeSameThanClonedPage=You clone a page as a translation. The language of the new page must be different than language of source page.
@ -68,8 +68,8 @@ ImportSite=Import website template
IDOfPage=Id of page
Banner=Banner
BlogPost=Blog post
WebsiteAccount=Web site account
WebsiteAccounts=Web site accounts
WebsiteAccount=Website account
WebsiteAccounts=Website accounts
AddWebsiteAccount=Create web site account
BackToListOfThirdParty=Back to list for Third Party
DisableSiteFirst=Disable website first
@ -78,7 +78,7 @@ AnotherContainer=Another container
WEBSITE_USE_WEBSITE_ACCOUNTS=Enable the web site account table
WEBSITE_USE_WEBSITE_ACCOUNTSTooltip=Enable the table to store web site accounts (login/pass) for each website / thirdparty
YouMustDefineTheHomePage=You must first define the default Home page
OnlyEditionOfSourceForGrabbedContentFuture=Warning: Creating a web page by importing an external web page is reserved to experienced user. Depending on the complexity of source page, the result of importation may differs once imported from original. Also if the source page use common CSS style or not compatible javascript, it may break the look or features of the Web site editor when working on this page. This method is faster way to have a page but it is recommanded to create your new page from scratch or from a suggested page template.<br>Note also that only edition of HTML source will be possible when a page content has been initialized by grabbing it from an external page ("Online" editor will NOT be available)
OnlyEditionOfSourceForGrabbedContentFuture=Warning: Creating a web page by importing an external web page is reserved to experienced user. Depending on the complexity of source page, the result of importation may differs once imported from original. Also if the source page use common CSS style or not compatible javascript, it may break the look or features of the Website editor when working on this page. This method is faster way to have a page but it is recommanded to create your new page from scratch or from a suggested page template.<br>Note also that only edition of HTML source will be possible when a page content has been initialized by grabbing it from an external page ("Online" editor will NOT be available)
OnlyEditionOfSourceForGrabbedContent=Only edition of HTML source is possible when content was grabbed from an external site
GrabImagesInto=Grab also images found into css and page.
ImagesShouldBeSavedInto=Images should be saved into directory

View File

@ -104,7 +104,7 @@ WriteBookKeeping=Registrar movimientos en el Libro Mayor
Bookkeeping=Libro Mayor
AccountBalance=Saldo de la cuenta
ObjectsRef=Referencia de objeto origen
CAHTF=Total purchase supplier before tax
CAHTF=Total compras a proveedor antes de impuestos
TotalExpenseReport=Total informe de gastos
InvoiceLines=Líneas de facturas a contabilizar
InvoiceLinesDone=Líneas de facturas contabilizadas

View File

@ -60,8 +60,8 @@ ActionAC_CLO=Cierre
ActionAC_EMAILING=Envío mailing masivo
ActionAC_COM=Envío pedido de cliente por correo
ActionAC_SHIP=Envío expedición por correo
ActionAC_SUP_ORD=Send purchase order by mail
ActionAC_SUP_INV=Send vendor invoice by mail
ActionAC_SUP_ORD=Envío pedido a proveedor por correo
ActionAC_SUP_INV=Envío de factura de proveedor por correo
ActionAC_OTH=Otra
ActionAC_OTH_AUTO=Eventos creados automáticamente
ActionAC_MANUAL=Eventos creados manualmente

View File

@ -1,6 +1,6 @@
# Dolibarr language file - Source file is en_US - orders
OrdersArea=Área pedidos de clientes
SuppliersOrdersArea=Purchase orders area
SuppliersOrdersArea=Área pedidos a proveedores
OrderCard=Ficha pedido
OrderId=Id pedido
Order=Pedido
@ -13,9 +13,9 @@ OrderToProcess=Pedido a procesar
NewOrder=Nuevo pedido
ToOrder=Realizar pedido
MakeOrder=Realizar pedido
SupplierOrder=Purchase order
SuppliersOrders=Purchase orders
SuppliersOrdersRunning=Current purchase orders
SupplierOrder=Pedido a proveedor
SuppliersOrders=Pedidos a proveedores
SuppliersOrdersRunning=Pedidos a proveedores actuales
CustomerOrder=Cuenta bloqueada
CustomersOrders=Pedidos de clientes
CustomersOrdersRunning=Pedidos de clientes en curso
@ -24,7 +24,7 @@ OrdersDeliveredToBill=Pedidos de clientes enviados a facturar
OrdersToBill=Pedidos de clientes enviados
OrdersInProcess=Pedidos de clientes en proceso
OrdersToProcess=Pedidos de clientes a procesar
SuppliersOrdersToProcess=Purchase orders to process
SuppliersOrdersToProcess=Pedidos a proveedores a procesar
StatusOrderCanceledShort=Anulado
StatusOrderDraftShort=Borrador
StatusOrderValidatedShort=Validado

View File

@ -21,20 +21,20 @@ SupplierPayment=Vendor payment
SuppliersArea=Vendor area
RefSupplierShort=Ref. vendor
Availability=Disponibilidad
ExportDataset_fournisseur_1=Vendor invoices list and invoice lines
ExportDataset_fournisseur_2=Vendor invoices and payments
ExportDataset_fournisseur_3=Purchase orders and order lines
ExportDataset_fournisseur_1=Facturas de proveedor y líneas de factura
ExportDataset_fournisseur_2=Facturas de proveedor y pagos
ExportDataset_fournisseur_3=Pedidos a proveedor y líneas de pedido
ApproveThisOrder=Aprobar este pedido
ConfirmApproveThisOrder=Está seguro de querer aprobar el pedido a proveedor <b>%s</b>?
DenyingThisOrder=Denegar este pedido
ConfirmDenyingThisOrder=¿Está seguro de querer denegar el pedido a proveedor <b>%s</b>?
ConfirmCancelThisOrder=¿Está seguro de querer cancelar el pedido a proveedor <b>%s</b>?
AddSupplierOrder=Create Purchase Order
AddSupplierInvoice=Create vendor invoice
AddSupplierOrder=Crear pedido a proveedor
AddSupplierInvoice=Crear factura de proveedor
ListOfSupplierProductForSupplier=List of products and prices for vendor <b>%s</b>
SentToSuppliers=Sent to vendors
ListOfSupplierOrders=List of purchase orders
MenuOrdersSupplierToBill=Purchase orders to invoice
ListOfSupplierOrders=Listado de pedidos a proveedor
MenuOrdersSupplierToBill=Pedidos a proveedor a facturar
NbDaysToDelivery=Tiempo de entrega en días
DescNbDaysToDelivery=El mayor retraso en las entregas de productos de este pedido
SupplierReputation=Vendor reputation

View File

@ -868,7 +868,7 @@ if (! $variants) {
print '<td align="right">';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($object->price * $obj->reel, 'MT'), 1) . '</td>';
else print $langs->trans("Variable");
print '</tr>';;
print '</tr>';
$total += $obj->reel;
if (price2num($object->pmp)) $totalwithpmp += $obj->reel;
$totalvalue = $totalvalue + ($object->pmp * $obj->reel);

View File

@ -544,7 +544,7 @@ print '<td class="center">'.$langs->trans("Note").'</td>';
print '<td class="center"></td>';
print "</tr>\n";
$colspan = 6+(empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)?0:2);;
$colspan = 6+(empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)?0:2);
if ($conf->use_javascript_ajax)
{

View File

@ -642,7 +642,7 @@ if ($source && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_r
dol_print_error_email('BADREFINPAYMENTFORM', $langs->trans("ErrorBadLinkSourceSetButBadValueForRef", $source, $ref));
// End of page
llxFooter();
$db->close();;
$db->close();
exit;
}
@ -1423,7 +1423,150 @@ if ($source == 'membersubscription')
print '<input type="hidden" name="desc" value="'.dol_escape_htmltag($labeldesc).'">'."\n";
}
// Payment on donation
if ($source == 'donation')
{
$found=true;
$langs->load("don");
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
$don=new Don($db);
$result=$don->fetch($ref);
if ($result <= 0)
{
$mesg=$don->error;
$error++;
}
else
{
$don->fetch_thirdparty();
$object = $don;
}
if ($action != 'dopayment') // Do not change amount if we just click on first dopayment
{
$amount=$subscription->total_ttc;
if (GETPOST("amount",'int')) $amount=GETPOST("amount",'int');
$amount=price2num($amount);
}
$fulltag='DON='.$don->ref.'.DAT='.dol_print_date(dol_now(),'%Y%m%d%H%M');
if (! empty($TAG)) { $tag=$TAG; $fulltag.='.TAG='.$TAG; }
$fulltag=dol_string_unaccent($fulltag);
// Creditor
print '<tr class="CTableRow'.($var?'1':'2').'"><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("Creditor");
print '</td><td class="CTableRow'.($var?'1':'2').'"><b>'.$creditor.'</b>';
print '<input type="hidden" name="creditor" value="'.$creditor.'">';
print '</td></tr>'."\n";
// Debitor
print '<tr class="CTableRow'.($var?'1':'2').'"><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("Member");
print '</td><td class="CTableRow'.($var?'1':'2').'"><b>';
if ($don->morphy == 'mor' && ! empty($don->societe)) print $don->societe;
else print $don->getFullName($langs);
print '</b>';
// Object
$text='<b>'.$langs->trans("PaymentDonation").'</b>';
if (GETPOST('desc','alpha')) $text='<b>'.$langs->trans(GETPOST('desc','alpha')).'</b>';
print '<tr class="CTableRow'.($var?'1':'2').'"><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("Designation");
print '</td><td class="CTableRow'.($var?'1':'2').'">'.$text;
print '<input type="hidden" name="source" value="'.dol_escape_htmltag($source).'">';
print '<input type="hidden" name="ref" value="'.dol_escape_htmltag($don->ref).'">';
print '</td></tr>'."\n";
// Amount
print '<tr class="CTableRow'.($var?'1':'2').'"><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("Amount");
if (empty($amount))
{
if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) print ' ('.$langs->trans("ToComplete");
if (! empty($conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO)) print ' - <a href="'.$conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO.'" rel="external" target="_blank">'.$langs->trans("SeeHere").'</a>';
if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) print ')';
}
print '</td><td class="CTableRow'.($var?'1':'2').'">';
$valtoshow='';
if (empty($amount) || ! is_numeric($amount))
{
$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT');
// force default subscription amount to value defined into constant...
if (empty($valtoshow))
{
if (! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) {
if (! empty($conf->global->MEMBER_NEWFORM_AMOUNT)) {
$valtoshow = $conf->global->MEMBER_NEWFORM_AMOUNT;
}
}
else {
if (! empty($conf->global->MEMBER_NEWFORM_AMOUNT)) {
$amount = $conf->global->MEMBER_NEWFORM_AMOUNT;
}
}
}
}
if (empty($amount) || ! is_numeric($amount))
{
//$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT');
if (! empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow=max($conf->global->MEMBER_MIN_AMOUNT,$valtoshow);
print '<input type="hidden" name="amount" value="'.GETPOST("amount",'int').'">';
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.$valtoshow.'">';
}
else {
$valtoshow=$amount;
if (! empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow=max($conf->global->MEMBER_MIN_AMOUNT,$valtoshow);
print '<b>'.price($valtoshow).'</b>';
print '<input type="hidden" name="amount" value="'.$valtoshow.'">';
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
}
// Currency
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
print '<input type="hidden" name="currency" value="'.$currency.'">';
print '</td></tr>'."\n";
// Tag
print '<tr class="CTableRow'.($var?'1':'2').'"><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("PaymentCode");
print '</td><td class="CTableRow'.($var?'1':'2').'"><b style="word-break: break-all;">'.$fulltag.'</b>';
print '<input type="hidden" name="tag" value="'.$tag.'">';
print '<input type="hidden" name="fulltag" value="'.$fulltag.'">';
print '</td></tr>'."\n";
// Shipping address
$shipToName=$don->getFullName($langs);
$shipToStreet=$don->address;
$shipToCity=$don->town;
$shipToState=$don->state_code;
$shipToCountryCode=$don->country_code;
$shipToZip=$don->zip;
$shipToStreet2='';
$phoneNum=$don->phone;
if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip)
{
print '<!-- Shipping address information -->';
print '<input type="hidden" name="shipToName" value="'.$shipToName.'">'."\n";
print '<input type="hidden" name="shipToStreet" value="'.$shipToStreet.'">'."\n";
print '<input type="hidden" name="shipToCity" value="'.$shipToCity.'">'."\n";
print '<input type="hidden" name="shipToState" value="'.$shipToState.'">'."\n";
print '<input type="hidden" name="shipToCountryCode" value="'.$shipToCountryCode.'">'."\n";
print '<input type="hidden" name="shipToZip" value="'.$shipToZip.'">'."\n";
print '<input type="hidden" name="shipToStreet2" value="'.$shipToStreet2.'">'."\n";
print '<input type="hidden" name="phoneNum" value="'.$phoneNum.'">'."\n";
}
else
{
print '<!-- Shipping address not complete, so we don t use it -->'."\n";
}
if (is_object($don->thirdparty)) print '<input type="hidden" name="thirdparty_id" value="'.$don->thirdparty->id.'">'."\n";
print '<input type="hidden" name="email" value="'.$don->email.'">'."\n";
$labeldesc = $langs->trans("PaymentSubscription");
if (GETPOST('desc','alpha')) $labeldesc=GETPOST('desc','alpha');
print '<input type="hidden" name="desc" value="'.dol_escape_htmltag($labeldesc).'">'."\n";
}
if (! $found && ! $mesg) $mesg=$langs->trans("ErrorBadParameters");

View File

@ -57,7 +57,7 @@ else
$vatNumber = preg_replace('/\^\w/', '', $vatNumber);
$countryCode=substr($vatNumber,0,2);
$vatNumber=substr($vatNumber,2);
print '<b>'.$langs->trans("Country").'</b>: '.$countryCode.'<br>';
print '<b>'.$langs->trans("VATIntraShort").'</b>: '.$vatNumber.'<br>';
print '<br>';
@ -176,4 +176,4 @@ if ($messagetoshow)
// End of page
llxFooter();
$db->close();;
$db->close();

View File

@ -25,7 +25,7 @@
* \ingroup stripe
* \brief File Class actionsstripeconnect
*/
require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';;
require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
$langs->load("stripe@stripe");
@ -44,8 +44,8 @@ class ActionsStripeconnect
private $config=array();
// For Hookmanager return
var $resprints;
var $results=array();
public $resprints;
public $results=array();
/**

View File

@ -237,7 +237,7 @@ function Print(id){
function TakeposPrinting(id){
var receipt;
$.get("receipt.php?facid="+id, function(data, status){
receipt=data.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '');;
receipt=data.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '');
$.ajax({
type: "POST",
url: 'http://<?php print $conf->global->TAKEPOS_PRINT_SERVER;?>:8111/print',

View File

@ -47,7 +47,7 @@ $colorbacklineimpair1='255,255,255'; // line impair
$colorbacklineimpair2='255,255,255'; // line impair
$colorbacklinepair1='250,250,250'; // line pair
$colorbacklinepair2='250,250,250'; // line pair
$colorbacklinepairhover='238,246,252'; // line pair
$colorbacklinepairhover='230,237,244'; // line hover
$colorbacklinebreak='214,218,220'; // line break
$colorbackbody='255,255,255';
$colortexttitlenotab='100,60,20';
@ -144,12 +144,12 @@ $fontsize =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty(
$fontsizesmaller =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_FONT_SIZE2) ?$fontsize:$conf->global->THEME_ELDY_FONT_SIZE2) :(empty($user->conf->THEME_ELDY_FONT_SIZE2)?$fontsize:$user->conf->THEME_ELDY_FONT_SIZE2);
// Hover color
$colorbacklinepairhover=((! isset($conf->global->THEME_ELDY_USE_HOVER) || (string) $conf->global->THEME_ELDY_USE_HOVER === '0')?'':($conf->global->THEME_ELDY_USE_HOVER === '1'?'edf4fb':$conf->global->THEME_ELDY_USE_HOVER));
$colorbacklinepairchecked=((! isset($conf->global->THEME_ELDY_USE_CHECKED) || (string) $conf->global->THEME_ELDY_USE_CHECKED === '0')?'':($conf->global->THEME_ELDY_USE_CHECKED === '1'?'edf4fb':$conf->global->THEME_ELDY_USE_CHECKED));
$colorbacklinepairhover=((! isset($conf->global->THEME_ELDY_USE_HOVER) || (string) $conf->global->THEME_ELDY_USE_HOVER === '0')?'':($conf->global->THEME_ELDY_USE_HOVER === '1'?'e6edf0':$conf->global->THEME_ELDY_USE_HOVER));
$colorbacklinepairchecked=((! isset($conf->global->THEME_ELDY_USE_CHECKED) || (string) $conf->global->THEME_ELDY_USE_CHECKED === '0')?'':($conf->global->THEME_ELDY_USE_CHECKED === '1'?'e6edf0':$conf->global->THEME_ELDY_USE_CHECKED));
if (! empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED))
{
$colorbacklinepairhover=((! isset($user->conf->THEME_ELDY_USE_HOVER) || $user->conf->THEME_ELDY_USE_HOVER === '0')?'':($user->conf->THEME_ELDY_USE_HOVER === '1'?'edf4fb':$user->conf->THEME_ELDY_USE_HOVER));
$colorbacklinepairchecked=((! isset($user->conf->THEME_ELDY_USE_CHECKED) || $user->conf->THEME_ELDY_USE_CHECKED === '0')?'':($user->conf->THEME_ELDY_USE_CHECKED === '1'?'edf4fb':$user->conf->THEME_ELDY_USE_CHECKED));
$colorbacklinepairhover=((! isset($user->conf->THEME_ELDY_USE_HOVER) || $user->conf->THEME_ELDY_USE_HOVER === '0')?'':($user->conf->THEME_ELDY_USE_HOVER === '1'?'e6edf0':$user->conf->THEME_ELDY_USE_HOVER));
$colorbacklinepairchecked=((! isset($user->conf->THEME_ELDY_USE_CHECKED) || $user->conf->THEME_ELDY_USE_CHECKED === '0')?'':($user->conf->THEME_ELDY_USE_CHECKED === '1'?'e6edf0':$user->conf->THEME_ELDY_USE_CHECKED));
}
//$colortopbordertitle1=$colorbackhmenu1;
@ -2306,7 +2306,6 @@ div.tabs {
padding-right: 6px !important;
clear:both;
height:100%;
/* background-image: linear-gradient(to top,#f6f6f6 0,#fff 8px); */
}
div.tabsElem {
margin-top: 1px;
@ -2464,7 +2463,7 @@ span.butAction, span.butActionDelete {
}
.butAction {
background: rgb(230, 236, 230)
background: rgb(225, 231, 225)
/* background: rgb(230, 232, 239); */
}
.butActionRefused, .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active {
@ -2522,7 +2521,7 @@ a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-ci
}
.butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete {
background: rgb(239, 232, 230);
background: rgb(234, 228, 225);
/* border: 1px solid #633; */
color: #633;
}
@ -3410,7 +3409,7 @@ table.noborder.boxtable tr td {
border-bottom-width: 0 !important;
}
.boxtable .fichehalfright, .boxtable .fichehalfleft {
min-width: 300px;
min-width: 275px; /* increasing this, make chart on box not side by side on laptops */
}
.tdboxstats {
text-align: center;
@ -3885,7 +3884,7 @@ tr.visible {
}
.websitebar {
border-bottom: 1px solid #ccc;
background: #eee;
background: #e6e6e6;
display: inline-block;
}
.websitebar .buttonDelete, .websitebar .button {

View File

@ -48,7 +48,7 @@ $colorbacklineimpair1='255,255,255'; // line impair
$colorbacklineimpair2='255,255,255'; // line impair
$colorbacklinepair1='248,248,248'; // line pair
$colorbacklinepair2='246,246,246'; // line pair
$colorbacklinepairhover='244,244,244'; // line pair
$colorbacklinepairhover='230,237,244'; // line pair
$colorbacklinebreak='214,218,220';
$colorbackbody='248,248,248';
$colortexttitlenotab='90,90,90';
@ -3323,7 +3323,7 @@ span.dashboardlineko {
/* border-bottom-width: 0 !important; */
}
.boxtable .fichehalfright, .boxtable .fichehalfleft {
min-width: 300px;
min-width: 275px;
}
.tdboxstats {
text-align: center;
@ -4705,7 +4705,7 @@ a span.select2-chosen
/* Special case for the select2 add widget */
#addbox .select2-container .select2-choice > .select2-chosen, #actionbookmark .select2-container .select2-choice > .select2-chosen {
text-align: <?php echo $left; ?>;;
text-align: <?php echo $left; ?>;
opacity: 0.3;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {

View File

@ -2283,7 +2283,7 @@ class User extends CommonObject
$label.= '<br><b>'.$langs->trans("Browser").':</b> '.$conf->browser->name.($conf->browser->version?' '.$conf->browser->version:'').' ('.$_SERVER['HTTP_USER_AGENT'].')';
$label.= '<br><b>'.$langs->trans("Layout").':</b> '.$conf->browser->layout;
$label.= '<br><b>'.$langs->trans("Screen").':</b> '.$_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight'];
if ($conf->browser->layout == 'phone') $label.= '<br><b>'.$langs->trans("Phone").':</b> '.$langs->trans("Yes");;
if ($conf->browser->layout == 'phone') $label.= '<br><b>'.$langs->trans("Phone").':</b> '.$langs->trans("Yes");
if (! empty($_SESSION["disablemodules"])) $label.= '<br><b>'.$langs->trans("DisabledModules").':</b> <br>'.join(', ',explode(',',$_SESSION["disablemodules"]));
}
if ($infologin < 0) $label='';

View File

@ -300,4 +300,4 @@ if ($action == 'edit') { ?>
// End of page
llxFooter();
$db->close();;
$db->close();

View File

@ -348,20 +348,30 @@ if ($action == 'addcontainer')
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
// Clean url to grab, so url can be
// http://www.example.com/ or http://www.example.com/dir1/ or http://www.example.com/dir1/aaa
$urltograbwithoutdomainandparam = preg_replace('/^https?:\/\/[^\/]+\/?/i', '', $urltograb);
$urltograbwithoutdomainandparam = preg_replace('/\?.*$/', '', $urltograbwithoutdomainandparam);
if (empty($urltograbwithoutdomainandparam) && ! preg_match('/\/$/', $urltograb))
if (! preg_match('/^http/', $urltograb))
{
$urltograb.='/';
$error++;
setEventMessages('Error URL must start with http:// or https://', null, 'errors');
$action = 'createcontainer';
}
$pageurl = dol_sanitizeFileName(preg_replace('/[\/\.]/','-', preg_replace('/\/+$/', '', $urltograbwithoutdomainandparam)));
$urltograbdirwithoutslash = dirname($urltograb.'.');
$urltograbdirrootwithoutslash = getRootURLFromURL($urltograbdirwithoutslash);
// Exemple, now $urltograbdirwithoutslash is https://www.dolimed.com/screenshots
// and $urltograbdirrootwithoutslash is https://www.dolimed.com
if (! $error)
{
// Clean url to grab, so url can be
// http://www.example.com/ or http://www.example.com/dir1/ or http://www.example.com/dir1/aaa
$urltograbwithoutdomainandparam = preg_replace('/^https?:\/\/[^\/]+\/?/i', '', $urltograb);
$urltograbwithoutdomainandparam = preg_replace('/\?.*$/', '', $urltograbwithoutdomainandparam);
if (empty($urltograbwithoutdomainandparam) && ! preg_match('/\/$/', $urltograb))
{
$urltograb.='/';
}
$pageurl = dol_sanitizeFileName(preg_replace('/[\/\.]/','-', preg_replace('/\/+$/', '', $urltograbwithoutdomainandparam)));
$urltograbdirwithoutslash = dirname($urltograb.'.');
$urltograbdirrootwithoutslash = getRootURLFromURL($urltograbdirwithoutslash);
// Exemple, now $urltograbdirwithoutslash is https://www.dolimed.com/screenshots
// and $urltograbdirrootwithoutslash is https://www.dolimed.com
}
// Check pageurl is not already used
if ($pageurl)
@ -465,6 +475,7 @@ if ($action == 'addcontainer')
$tmp = $objectpage->htmlheader;
preg_match_all('/<script([^\.>]+)src=["\']([^"\'>]+)["\']([^>]*)><\/script>/i', $objectpage->htmlheader, $regs);
$errorforsubresource = 0;
foreach ($regs[0] as $key => $val)
{
dol_syslog("We will grab the resource found into script tag ".$regs[2][$key]);
@ -500,13 +511,15 @@ if ($action == 'addcontainer')
if ($tmpgeturl['curl_error_no'])
{
$error++;
setEventMessages('Error getting '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors');
setEventMessages('Error getting script url '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors');
$errorforsubresource++;
$action='createcontainer';
}
elseif ($tmpgeturl['http_code'] != '200')
{
$error++;
setEventMessages('Error getting '.$urltograbbis.': '.$tmpgeturl['http_code'], null, 'errors');
setEventMessages('Error getting script url '.$urltograbbis.': '.$tmpgeturl['http_code'], null, 'errors');
$errorforsubresource++;
$action='createcontainer';
}
else
@ -531,9 +544,10 @@ if ($action == 'addcontainer')
$pagecsscontent = "\n".'<style>'."\n";
preg_match_all('/<link([^\.>]+)href=["\']([^"\'>]+\.css[^"\'>]*)["\']([^>]*)>/i', $objectpage->htmlheader, $regs);
$errorforsubresource = 0;
foreach ($regs[0] as $key => $val)
{
dol_syslog("We will grab the resource found into link tag ".$regs[2][$key]);
dol_syslog("We will grab the resources found into link tag ".$regs[2][$key]);
$linkwithoutdomain = $regs[2][$key];
if (preg_match('/^\//', $regs[2][$key]))
@ -564,14 +578,16 @@ if ($action == 'addcontainer')
$tmpgeturl = getURLContent($urltograbbis);
if ($tmpgeturl['curl_error_no'])
{
$error++;
setEventMessages('Error getting '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors');
$errorforsubresource++;
setEventMessages('Error getting link tag url '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors');
dol_syslog('Error getting '.$urltograbbis.': '.$tmpgeturl['curl_error_msg']);
$action='createcontainer';
}
elseif ($tmpgeturl['http_code'] != '200')
{
$error++;
setEventMessages('Error getting '.$urltograbbis.': '.$tmpgeturl['http_code'], null, 'errors');
$errorforsubresource++;
setEventMessages('Error getting link tag url'.$urltograbbis.': '.$tmpgeturl['http_code'], null, 'errors');
dol_syslog('Error getting '.$urltograbbis.': '.$tmpgeturl['curl_error_msg']);
$action='createcontainer';
}
else
@ -694,14 +710,11 @@ if ($action == 'addcontainer')
if ($result)
{
setEventMessages($langs->trans("Saved"), null, 'mesgs');
//header("Location: ".$_SERVER["PHP_SELF"].'?website='.$websitekey.'&pageid='.$pageid);
//exit;
}
else
{
setEventMessages('Failed to write file '.$filetpl, null, 'errors');
//header("Location: ".$_SERVER["PHP_SELF"].'?website='.$websitekey.'&pageid='.$pageid);
//exit;
$action = 'createcontainer';
}
}
}
@ -852,6 +865,18 @@ if ($action == 'updatecss')
$res = $object->fetch(0, $websitekey);
$website = $object;
// Save master.inc.php file
$filemaster=$pathofwebsite.'/master.inc.php';
dol_syslog("Save master file ".$filemaster);
dol_mkdir($pathofwebsite);
// Now generate the master.inc.php page
$result = dolSaveMasterFile($filemaster);
if (! $result) setEventMessages('Failed to write file '.$filemaster, null, 'errors');
// Html header file
$htmlheadercontent ='';