Print payment method
*
* Code which can be placed everywhere
@@ -134,6 +133,12 @@ class dolReceiptPrinter extends Printer
public $printer;
public $template;
+ /**
+ * Number of order printer
+ * @var int
+ */
+ public $orderprinter;
+
/**
* @var string Error code (or message)
*/
@@ -191,8 +196,7 @@ class dolReceiptPrinter extends Printer
'dol_print_object_local_tax',
'dol_print_object_total',
'dol_print_object_number',
- 'dol_print_order_lines_printer1',
- 'dol_print_order_lines_printer2',
+ 'dol_print_order_lines',
'dol_value_customer_firstname',
'dol_value_customer_lastname',
'dol_value_customer_mail',
@@ -726,20 +730,9 @@ class dolReceiptPrinter extends Printer
case 'DOL_BEEP':
$this->printer->getPrintConnector() -> write("\x1e");
break;
- case 'DOL_PRINT_ORDER_LINES_PRINTER1':
+ case 'DOL_PRINT_ORDER_LINES':
foreach ($object->lines as $line) {
- if ($line->special_code == 1)
- {
- $spacestoadd = $nbcharactbyline - strlen($line->ref) - strlen($line->qty) - 10 - 1;
- $spaces = str_repeat(' ', $spacestoadd);
- $this->printer->text($line->ref.$spaces.$line->qty.' '.str_pad(price($line->total_ttc), 10, ' ', STR_PAD_LEFT)."\n");
- $this->printer->text(strip_tags(htmlspecialchars_decode($line->desc))."\n");
- }
- }
- break;
- case 'DOL_PRINT_ORDER_LINES_PRINTER2':
- foreach ($object->lines as $line) {
- if ($line->special_code == 2)
+ if ($line->special_code==$this->orderprinter)
{
$spacestoadd = $nbcharactbyline - strlen($line->ref) - strlen($line->qty) - 10 - 1;
$spaces = str_repeat(' ', $spacestoadd);
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 0c310b92dd6..965bca72824 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -722,6 +722,7 @@ class Form
else
{
jQuery(".massaction").hide();
+ jQuery(".massactionother").hide();
}
}
@@ -743,10 +744,12 @@ class Form
if ($(this).val() != \'0\')
{
jQuery(".massactionconfirmed").prop(\'disabled\', false);
+ jQuery(".massactionother").show();
}
else
{
jQuery(".massactionconfirmed").prop(\'disabled\', true);
+ jQuery(".massactionother").hide();
}
});
});
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index bc8aa3a9b39..8b1469dd446 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1282,7 +1282,7 @@ class FormFile
$sizetoshow = dol_print_size($file['size'], 1, 1);
$sizetoshowbytes = dol_print_size($file['size'], 0, 1);
- print '| ';
+ print ' | ';
if ($sizetoshow == $sizetoshowbytes) print $sizetoshow;
else {
print $form->textwithpicto($sizetoshow, $sizetoshowbytes, -1);
@@ -1317,7 +1317,7 @@ class FormFile
} else {
print '';
}
- print ' ';
+ print ' ';
print '';
}
else print ' ';
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index b40985edff0..de8c73db44a 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3234,7 +3234,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'hrm'=>'bg-infoxbox-adherent', 'group'=>'bg-infoxbox-adherent',
'members'=>'bg-infoxbox-adherent', 'member'=>'bg-infoxbox-adherent', 'user'=>'bg-infoxbox-adherent', 'users'=>'bg-infoxbox-adherent',
'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4',
- 'holiday'=>'bg-infoxbox-holiday', 'resource'=>'bg-infoxbox-action', 'title_hrm'=>'bg-infoxbox-holiday', 'trip'=>'bg-infoxbox-expensereport',
+ 'holiday'=>'bg-infoxbox-holiday', 'project'=>'bg-infoxbox-project', 'resource'=>'bg-infoxbox-action', 'title_hrm'=>'bg-infoxbox-holiday', 'trip'=>'bg-infoxbox-expensereport',
'title_agenda'=>'bg-infoxbox-action',
'list-alt'=>'imgforviewmode', 'calendar'=>'imgforviewmode', 'calendarweek'=>'imgforviewmode', 'calendarmonth'=>'imgforviewmode', 'calendarday'=>'imgforviewmode', 'calendarperuser'=>'imgforviewmode'
);
@@ -4247,7 +4247,7 @@ function load_fiche_titre($titre, $morehtmlright = '', $picto = 'generic', $pict
$return .= "\n";
$return .= ''; // maring bottom must be same than into print_barre_list
$return .= '';
- if ($picto) $return .= '| '.img_picto('', $picto, 'class="valignmiddle widthpictotitle pictotitle"', $pictoisfullpath).' | ';
+ if ($picto) $return .= ''.img_picto('', $picto, 'class="valignmiddle widthpictotitle pictotitle"', $pictoisfullpath).' | ';
$return .= '';
$return .= ' '.$titre.' ';
$return .= ' | ';
@@ -4313,7 +4313,7 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
// Left
- if ($picto && $titre) print ''.img_picto('', $picto, 'class="valignmiddle pictotitle widthpictotitle"', $pictoisfullpath).' | ';
+ if ($picto && $titre) print ''.img_picto('', $picto, 'class="valignmiddle pictotitle widthpictotitle"', $pictoisfullpath).' | ';
print '';
print ''.$titre;
if (!empty($titre) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') print ' ('.$totalnboflines.')';
diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php
index bc20612c747..f3e7cee141d 100644
--- a/htdocs/core/lib/usergroups.lib.php
+++ b/htdocs/core/lib/usergroups.lib.php
@@ -331,7 +331,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
if ($foruserprofile) $colspan = 4;
$thumbsbyrow = 6;
- print ' ';
+ print '';
// Title
if ($foruserprofile)
diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php
index af8840b33ae..770bc3fda88 100644
--- a/htdocs/core/lib/website.lib.php
+++ b/htdocs/core/lib/website.lib.php
@@ -793,7 +793,7 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so
{
$tmpwebsitepage = new WebsitePage($db);
$tmpwebsitepage->fetch($obj->rowid);
- if ($tmpwebsitepage->id > 0) $arrayresult['list'][] = $tmpwebsitepage;
+ if ($tmpwebsitepage->id > 0) $arrayresult['list'][$obj->rowid] = $tmpwebsitepage;
$found++;
}
$i++;
diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php
index ff0fdcae67e..6c4d32bc1cb 100644
--- a/htdocs/core/lib/website2.lib.php
+++ b/htdocs/core/lib/website2.lib.php
@@ -72,6 +72,9 @@ function dolSavePageAlias($filealias, $object, $objectpage)
$aliascontent .= 'else require $dolibarr_main_data_root.\'/website/\'.$website->ref.\'/page'.$objectpage->id.'.tpl.php\';'."\n";
$aliascontent .= '?>'."\n";
$result = file_put_contents($filealias, $aliascontent);
+ if ($result === false) {
+ dol_syslog("Failed to write file ".$filealias, LOG_WARNING);
+ }
if (!empty($conf->global->MAIN_UMASK)) {
@chmod($filealias, octdec($conf->global->MAIN_UMASK));
}
@@ -89,6 +92,9 @@ function dolSavePageAlias($filealias, $object, $objectpage)
$aliascontent .= 'else require $dolibarr_main_data_root.\'/website/\'.$website->ref.\'/page'.$objectpage->id.'.tpl.php\';'."\n";
$aliascontent .= '?>'."\n";
$result = file_put_contents($filealias, $aliascontent);
+ if ($result === false) {
+ dol_syslog("Failed to write file ".$filealias, LOG_WARNING);
+ }
if (!empty($conf->global->MAIN_UMASK)) {
@chmod($filealias, octdec($conf->global->MAIN_UMASK));
}
diff --git a/htdocs/core/modules/modReceiptPrinter.class.php b/htdocs/core/modules/modReceiptPrinter.class.php
index c36d8f2bc77..47f62a21b08 100644
--- a/htdocs/core/modules/modReceiptPrinter.class.php
+++ b/htdocs/core/modules/modReceiptPrinter.class.php
@@ -53,7 +53,7 @@ class modReceiptPrinter extends DolibarrModules
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
$this->description = "ReceiptPrinterDesc";
// Possible values for version are: 'development', 'experimental', 'dolibarr' or 'dolibarr_deprecated' or version
- $this->version = 'development';
+ $this->version = 'experimental';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql
index faa10f15950..91361d76ec6 100644
--- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql
+++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql
@@ -73,6 +73,14 @@ ALTER TABLE llx_holiday_users ADD UNIQUE INDEX uk_holiday_users(fk_user, fk_type
ALTER TABLE llx_ticket ADD COLUMN import_key varchar(14);
+ALTER TABLE llx_ticket ADD UNIQUE uk_ticket_ref (ref, entity);
+ALTER TABLE llx_ticket ADD INDEX idx_ticket_entity (entity);
+ALTER TABLE llx_ticket ADD INDEX idx_ticket_fk_soc (fk_soc);
+ALTER TABLE llx_ticket ADD INDEX idx_ticket_fk_user_assign (fk_user_assign);
+ALTER TABLE llx_ticket ADD INDEX idx_ticket_fk_project (fk_project);
+ALTER TABLE llx_ticket ADD INDEX idx_ticket_fk_statut (fk_statut);
+
+
--ALTER TABLE llx_facturerec DROP COLUMN vat_src_code;
diff --git a/htdocs/install/mysql/tables/llx_societe.key.sql b/htdocs/install/mysql/tables/llx_societe.key.sql
index 29b713b608d..5e5bf73dcac 100644
--- a/htdocs/install/mysql/tables/llx_societe.key.sql
+++ b/htdocs/install/mysql/tables/llx_societe.key.sql
@@ -26,5 +26,14 @@ ALTER TABLE llx_societe ADD UNIQUE INDEX uk_societe_barcode (barcode, fk_barcode
ALTER TABLE llx_societe ADD INDEX idx_societe_user_creat(fk_user_creat);
ALTER TABLE llx_societe ADD INDEX idx_societe_user_modif(fk_user_modif);
+ALTER TABLE llx_societe ADD INDEX idx_societe_stcomm(fk_stcomm);
+ALTER TABLE llx_societe ADD INDEX idx_societe_pays(fk_pays);
+ALTER TABLE llx_societe ADD INDEX idx_societe_account(fk_account);
+ALTER TABLE llx_societe ADD INDEX idx_societe_prospectlevel(fk_prospectlevel);
+ALTER TABLE llx_societe ADD INDEX idx_societe_typent(fk_typent);
+ALTER TABLE llx_societe ADD INDEX idx_societe_forme_juridique(fk_forme_juridique);
+ALTER TABLE llx_societe ADD INDEX idx_societe_shipping_method(fk_shipping_method);
+ALTER TABLE llx_societe ADD INDEX idx_societe_entrepot(fk_entrepot);
-- ALTER TABLE llx_societe ADD FOREIGN KEY fk_prospectlevel llx_c_prospectlevel(code);
+
diff --git a/htdocs/install/mysql/tables/llx_ticket.key.sql b/htdocs/install/mysql/tables/llx_ticket.key.sql
index 948eba45a83..d4805d8a788 100644
--- a/htdocs/install/mysql/tables/llx_ticket.key.sql
+++ b/htdocs/install/mysql/tables/llx_ticket.key.sql
@@ -15,3 +15,9 @@
-- along with this program. If not, see .
ALTER TABLE llx_ticket ADD UNIQUE uk_ticket_track_id (track_id);
+ALTER TABLE llx_ticket ADD UNIQUE uk_ticket_ref (ref, entity);
+ALTER TABLE llx_ticket ADD INDEX idx_ticket_entity (entity);
+ALTER TABLE llx_ticket ADD INDEX idx_ticket_fk_soc (fk_soc);
+ALTER TABLE llx_ticket ADD INDEX idx_ticket_fk_user_assign (fk_user_assign);
+ALTER TABLE llx_ticket ADD INDEX idx_ticket_fk_project (fk_project);
+ALTER TABLE llx_ticket ADD INDEX idx_ticket_fk_statut (fk_statut);
diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index 602b3b9fb53..f31118ab8d7 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -167,7 +167,7 @@ SuppliersPrices=Vendor prices
SuppliersPricesOfProductsOrServices=Vendor prices (of products or services)
CustomCode=Customs / Commodity / HS code
CountryOrigin=Origin country
-Nature=Nature of produt (material/finished)
+Nature=Nature of product (material/finished)
ShortLabel=Short label
Unit=Unit
p=u.
diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang
index 222eeb6df0d..c3e9870266f 100644
--- a/htdocs/langs/en_US/website.lang
+++ b/htdocs/langs/en_US/website.lang
@@ -126,4 +126,5 @@ MainLanguage=Main language
OtherLanguages=Other languages
UseManifest=Provide a manifest.json file
PublicAuthorAlias=Public author alias
-AvailableLanguagesAreDefinedIntoWebsiteProperties=Available languages are defined into website properties
\ No newline at end of file
+AvailableLanguagesAreDefinedIntoWebsiteProperties=Available languages are defined into website properties
+ReplacementDoneInXPages=Replacement done in %s pages or containers
\ No newline at end of file
diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php
index 26dcf788714..17a92e99cd0 100644
--- a/htdocs/projet/index.php
+++ b/htdocs/projet/index.php
@@ -260,8 +260,8 @@ $companystatic = new Societe($db); // We need a clean new object for next loop b
print '';
print ' ';
print '';
-print_liste_field_titre("OpenedProjectsByThirdparties", $_SERVER["PHP_SELF"], "s.nom", "", "", '', $sortfield, $sortorder);
-print_liste_field_titre("NbOfProjects", "", "", "", "", '', $sortfield, $sortorder, 'right ');
+print_liste_field_titre("OpenedProjectsByThirdparties", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder);
+print_liste_field_titre("NbOfProjects", $_SERVER["PHP_SELF"], "nb", "", "", '', $sortfield, $sortorder, 'right ');
print " \n";
$sql = "SELECT COUNT(p.rowid) as nb, SUM(p.opp_amount)";
diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php
index c83f57173e5..10a679615a9 100644
--- a/htdocs/takepos/admin/terminal.php
+++ b/htdocs/takepos/admin/terminal.php
@@ -41,7 +41,7 @@ if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY'.$terminal.'_id']))
// Security check
if (!$user->admin) accessforbidden();
-$langs->loadLangs(array("admin", "cashdesk"));
+$langs->loadLangs(array("admin", "cashdesk", "printing"));
global $db;
@@ -85,6 +85,8 @@ if (GETPOST('action', 'alpha') == 'set')
$res = dolibarr_set_const($db, "CASHDESK_ID_WAREHOUSE".$terminaltouse, (GETPOST('CASHDESK_ID_WAREHOUSE'.$terminaltouse, 'alpha') > 0 ? GETPOST('CASHDESK_ID_WAREHOUSE'.$terminaltouse, 'alpha') : ''), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "CASHDESK_NO_DECREASE_STOCK".$terminaltouse, GETPOST('CASHDESK_NO_DECREASE_STOCK'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_PRINTER_TO_USE".$terminaltouse, GETPOST('TAKEPOS_PRINTER_TO_USE'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
+ $res = dolibarr_set_const($db, "TAKEPOS_ORDER_PRINTER1_TO_USE".$terminaltouse, GETPOST('TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
+ $res = dolibarr_set_const($db, "TAKEPOS_ORDER_PRINTER2_TO_USE".$terminaltouse, GETPOST('TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES".$terminaltouse, GETPOST('TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS".$terminaltouse, GETPOST('TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
@@ -234,9 +236,13 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") {
print $form->selectarray('TAKEPOS_PRINTER_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_PRINTER_TO_USE'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$terminal}), 1);
print '';
if ($conf->global->TAKEPOS_ORDER_PRINTERS) {
- print '| '.$langs->trans("OrderPrinterToUse").' | ';
+ print ' | '.$langs->trans("OrderPrinterToUse").' - '.$langs->trans("Printer").' 1 | ';
print '';
- print $form->selectarray('TAKEPOS_ORDER_PRINTER_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_ORDER_PRINTER_TO_USE'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_ORDER_PRINTER_TO_USE'.$terminal}), 1);
+ print $form->selectarray('TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminal}), 1);
+ print ' | ';
+ print '| '.$langs->trans("OrderPrinterToUse").' - '.$langs->trans("Printer").' 2 | ';
+ print '';
+ print $form->selectarray('TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal}), 1);
print ' | ';
}
$printer->listPrintersTemplates();
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index 2e85f8c2afa..95766802b76 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -526,6 +526,7 @@ if ($action == "order" and $placeid != 0)
$result = array_intersect($catsprinter1, $existing);
$count = count($result);
if ($count > 0) {
+ $linestoprint++;
$sql = "UPDATE ".MAIN_DB_PREFIX."facturedet set special_code='1' where rowid=".$line->id; //Set to print on printer 1
$db->query($sql);
$order_receipt_printer1 .= ''.$line->product_label.'| '.$line->qty;
@@ -533,17 +534,18 @@ if ($action == "order" and $placeid != 0)
$order_receipt_printer1 .= ' | ';
}
}
- if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" && $count > 0) {
+ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" && $linestoprint > 0) {
$invoice->fetch($placeid); //Reload object before send to printer
- $ret = $printer->sendToPrinter($invoice, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$_SESSION["takeposterminal"]}, $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$_SESSION["takeposterminal"]}); // PRINT TO PRINTER 1
+ $printer->orderprinter=1;
+ $ret = $printer->sendToPrinter($invoice, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$_SESSION["takeposterminal"]}, $conf->global->{'TAKEPOS_ORDER_PRINTER1_TO_USE'.$_SESSION["takeposterminal"]}); // PRINT TO PRINTER 1
}
$sql = "UPDATE ".MAIN_DB_PREFIX."facturedet set special_code='4' where special_code='1' and fk_facture=".$invoice->id; // Set as printed
$db->query($sql);
$invoice->fetch($placeid); //Reload object after set lines as printed
+ $linestoprint=0;
foreach ($invoice->lines as $line)
{
- $count=0;
if ($line->special_code == "4") {
continue;
}
@@ -552,6 +554,7 @@ if ($action == "order" and $placeid != 0)
$result = array_intersect($catsprinter2, $existing);
$count = count($result);
if ($count > 0) {
+ $linestoprint++;
$sql = "UPDATE ".MAIN_DB_PREFIX."facturedet set special_code='2' where rowid=".$line->id; //Set to print on printer 2
$db->query($sql);
$order_receipt_printer2 .= ''.$line->product_label.'| '.$line->qty;
@@ -559,9 +562,10 @@ if ($action == "order" and $placeid != 0)
$order_receipt_printer2 .= ' | ';
}
}
- if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" && $count > 0) {
+ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" && $linestoprint > 0) {
$invoice->fetch($placeid); //Reload object before send to printer
- $ret = $printer->sendToPrinter($invoice, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$_SESSION["takeposterminal"]}, $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$_SESSION["takeposterminal"]}); // PRINT TO PRINTER 2
+ $printer->orderprinter=2;
+ $ret = $printer->sendToPrinter($invoice, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$_SESSION["takeposterminal"]}, $conf->global->{'TAKEPOS_ORDER_PRINTER2_TO_USE'.$_SESSION["takeposterminal"]}); // PRINT TO PRINTER 2
}
$sql = "UPDATE ".MAIN_DB_PREFIX."facturedet set special_code='4' where special_code='2' and fk_facture=".$invoice->id; // Set as printed
$db->query($sql);
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 32c1a2d5bfb..4e77fc7fe2d 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -24,7 +24,7 @@
--colortextlink: rgb();
--colortextbackhmenu: #;
--colortextbackvmenu: #;
- --listetotal: #551188;
+ --listetotal: #888888;
--inputbackgroundcolor: #FFF;
--inputbordercolor: rgba(0,0,0,.2);
--tooltipbgcolor: ;
@@ -1455,6 +1455,9 @@ body.onlinepaymentbody div.fiche { /* For online payment page */
div.fiche>table:first-child {
margin-bottom: 15px !important;
}
+div.fiche>table.table-fiche-title {
+ margin-bottom: 7px !important;
+}
div.fichecenter {
width: 100%;
clear: both; /* This is to have div fichecenter that are true rectangles */
@@ -1568,9 +1571,9 @@ div.nopadding {
margin : 0px auto;
}
-td.nobordernopadding.widthpictotitle.opacityhigh.valignmiddle.col-picto {
+td.nobordernopadding.widthpictotitle.col-picto {
color: var(--colortexttitlenotab);
- opacity: 0.6;
+ opacity: 0.7;
}
.pictotitle {
margin-: 8px;
@@ -1724,7 +1727,7 @@ div#id-top {
display:none;
background: var(--colorbackhmenu1);
- background-image: linear-gradient(-45deg, , var(--colorbackhmenu1));
+ /* background-image: linear-gradient(-45deg, , var(--colorbackhmenu1)); */
/* box-shadow: 0px 0px 5px #eee; */
}
@@ -2606,7 +2609,7 @@ div.tabBar {
div.tabBar tr.titre td {
padding-top: 20px;
}
-div.fiche tr.titre td {
+div.fiche table:not(.table-fiche-title) tr.titre td {
padding-top: 10px;
}
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index edc28e7b87e..94f63228126 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -229,6 +229,42 @@ print '*/'."\n";
/* Default styles */
/* ============================================================================== */
+:root {
+ --colorbackhmenu1: rgb();
+ --colorbackvmenu1: rgb();
+ --colorbacktitle1: rgb();
+ --colorbacktabcard1: rgb();
+ --colorbacktabactive: rgb();
+ --colorbacklineimpair1: rgb();
+ --colorbacklineimpair2: rgb();
+ --colorbacklinepair1: rgb();
+ --colorbacklinepair2: rgb();
+ --colorbacklinepairhover: rgb();
+ --colorbacklinepairchecked: rgb();
+ --colorbackbody: rgb();
+ --colortexttitlenotab: rgb();
+ --colortexttitle: rgb();
+ --colortext: rgb();
+ --colortextlink: rgb();
+ --colortextbackhmenu: #;
+ --colortextbackvmenu: #;
+ --listetotal: #551188;
+ --inputbackgroundcolor: #FFF;
+ --inputbordercolor: rgba(0,0,0,.2);
+ --tooltipbgcolor: ;
+ --tooltipfontcolor : ;
+ --oddevencolor: #202020;
+ --colorboxstatsborder: #ddd;
+ --dolgraphbg: rgba(255,255,255,0);
+ --fieldrequiredcolor: #000055;
+ --colortextbacktab: #;
+ --colorboxiconbg: #eee;
+ --refidnocolor:#444;
+ --tableforfieldcolor:#666;
+ --amountremaintopaycolor:#880000;
+ --amountpaymentcomplete:#008800;
+ --amountremaintopaybackcolor:none;
+}
body {
@@ -3846,7 +3882,7 @@ div.titre {
}
div.titre, .secondary {
font-family: ;
- color: rgb();
+ color: var(--colortexttitlenotab);
}
table.centpercent.notopnoleftnoright.table-fiche-title {
diff --git a/htdocs/theme/md/theme_vars.inc.php b/htdocs/theme/md/theme_vars.inc.php
index 106a4b5b854..d15444acb6c 100644
--- a/htdocs/theme/md/theme_vars.inc.php
+++ b/htdocs/theme/md/theme_vars.inc.php
@@ -63,7 +63,7 @@ $colorbacklinepairhover = '230,237,244'; // line hover
$colorbacklinepairchecked = '230,237,244'; // line checked
$colorbacklinebreak = '214,218,220';
$colorbackbody = '248,248,248';
-$colortexttitlenotab = '90,90,90';
+$colortexttitlenotab = '80,71,5';
$colortexttitle = '20,20,20';
$colortext = '0,0,0';
$colortextlink = '0,0,120';
diff --git a/htdocs/website/index.php b/htdocs/website/index.php
index 59da26083ed..629e4b91584 100644
--- a/htdocs/website/index.php
+++ b/htdocs/website/index.php
@@ -52,9 +52,12 @@ $websitekey = GETPOST('website', 'alpha');
$page = GETPOST('page', 'alpha');
$pageid = GETPOST('pageid', 'int');
$pageref = GETPOST('pageref', 'alphanohtml');
+
$action = GETPOST('action', 'aZ09');
+$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
$confirm = GETPOST('confirm', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
+$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bomlist'; // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
@@ -260,6 +263,23 @@ $manifestjsoncontentdefault .= '{
}]
}';
+$listofpages = array();
+
+$algo = '';
+if (GETPOST('optionmeta')) $algo .= 'meta';
+if (GETPOST('optioncontent')) $algo .= 'content';
+if (GETPOST('optionsitefiles')) $algo .= 'sitefiles';
+
+if (empty($sortfield)) {
+ $sortfield = 'pageurl'; $sortorder = 'ASC';
+}
+
+$searchkey = GETPOST('searchstring', 'none');
+
+if ($action == 'replacesiteconfirm') {
+ $listofpages = getPagesFromSearchCriterias('', $algo, $searchkey, 1000, $sortfield, $sortorder);
+}
+
/*
@@ -340,11 +360,70 @@ if ($action == 'unsetshowsubcontainers')
exit;
}
-if (($action == 'replacesite' || $action == 'replacesiteconfirm') && empty(GETPOST('searchstring')))
+if (($action == 'replacesite' || $action == 'replacesiteconfirm') && ! $searchkey)
{
$action = 'replacesite';
}
+// Replacement of string into pages
+if ($massaction == 'replace')
+{
+ $replacestring = GETPOST('replacestring', 'alphanohtml');
+ if (! $replacestring) {
+ setEventMessages("ErrorReplaceStringEmpty", null, 'errors');
+ }
+ else {
+ $nbreplacement = 0;
+
+ foreach($toselect as $keyselected) {
+ $objectpage = $listofpages['list'][$keyselected];
+ if ($objectpage->pageurl) {
+ dol_syslog("Replace string into page ".$objectpage->pageurl);
+
+ if (GETPOST('optioncontent', 'aZ09')) {
+ $objectpage->content = str_replace($searchkey, $replacestring, $objectpage->content);
+ }
+ if (GETPOST('optionmeta', 'aZ09')) {
+ $objectpage->title = str_replace($searchkey, $replacestring, $objectpage->title);
+ $objectpage->description = str_replace($searchkey, $replacestring, $objectpage->description);
+ $objectpage->keywords = str_replace($searchkey, $replacestring, $objectpage->keywords);
+ }
+
+ $filealias = $pathofwebsite.'/'.$objectpage->pageurl.'.php';
+ $filetpl = $pathofwebsite.'/page'.$objectpage->id.'.tpl.php';
+
+ // Save page alias
+ $result = dolSavePageAlias($filealias, $object, $objectpage);
+ if (!$result)
+ {
+ setEventMessages('Failed to write file '.basename($filealias), null, 'errors');
+ }
+
+ // Save page of content
+ $result = dolSavePageContent($filetpl, $object, $objectpage);
+ if ($result)
+ {
+ $nbreplacement++;
+ //var_dump($objectpage->content);exit;
+ $objectpage->update($user);
+ } else {
+ $error++;
+ setEventMessages('Failed to write file '.$filetpl, null, 'errors');
+ $action = 'createcontainer';
+ break;
+ }
+ }
+ }
+
+ if ($nbreplacement > 0) {
+ setEventMessages($langs->trans("ReplacementDoneInXPages", $nbreplacement), null, 'mesgs');
+ }
+
+ // Now we reload list
+ $listofpages = getPagesFromSearchCriterias('', $algo, $searchkey, 1000, $sortfield, $sortorder);
+ }
+}
+
// Add directory
/*
@@ -1765,7 +1844,7 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf
// Now generate the master.inc.php page
$result = dolSaveMasterFile($filemaster);
- if (!$result) setEventMessages('Failed to write file '.$filemaster, null, 'errors');
+ if (!$result) setEventMessages('Failed to write the master file file '.$filemaster, null, 'errors');
// Now generate the alias.php page
@@ -1777,7 +1856,7 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf
// Save page alias
$result = dolSavePageAlias($filealias, $object, $objectpage);
- if (!$result) setEventMessages('Failed to write file '.basename($filealias), null, 'errors');
+ if (!$result) setEventMessages('Failed to write the alias file '.basename($filealias), null, 'errors');
// Save page content
$result = dolSavePageContent($filetpl, $object, $objectpage);
@@ -3397,10 +3476,8 @@ print "\n";
print "\n";
-if ($action == 'replacesite' || $action == 'replacesiteconfirm')
+if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction == 'replace')
{
- $searchkey = GETPOST('searchstring', 'none');
-
print ' | |