';
diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php
index 4eb833c7d3b..139ac5245d4 100644
--- a/htdocs/core/class/commoninvoice.class.php
+++ b/htdocs/core/class/commoninvoice.class.php
@@ -689,6 +689,29 @@ abstract class CommonInvoice extends CommonObject
return $retarray;
}
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ /**
+ * Return if an invoice can be set back to draft.
+ * Rule is:
+ * If invoice is draft and has a temporary ref -> yes (1)
+ * If hidden option INVOICE_CAN_NEVER_BE_REMOVED is 1 -> no (0)
+ * If invoice is transferred in bookkeeping -> no (-1)
+ * If invoice has a definitive ref, is not last in ref -> no (-2)
+ * If invoice has a definitive ref, is not last in a situation cycle -> no (-3)
+ * If there is one payment -> no (-4)
+ * If already sent by email -> no (-5)
+ * If already printed -> no (-6)
+ * If running a LNE version and customer invoice was validated -> no (-7)
+ * Otherwise -> yes (2)
+ *
+ * @return int Return integer <=0 if no, >0 if yes
+ */
+ public function isEditable()
+ {
+ $test = $this->is_erasable();
+
+ return $test;
+ }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
@@ -702,6 +725,7 @@ abstract class CommonInvoice extends CommonObject
* If there is one payment -> no (-4)
* If already sent by email -> no (-5)
* If already printed -> no (-6)
+ * If running a LNE version and customer invoice was validated -> no (-7)
* Otherwise -> yes (2)
*
* @return int Return integer <=0 if no, >0 if yes
@@ -734,6 +758,11 @@ abstract class CommonInvoice extends CommonObject
if ((int) $this->pos_print_counter > 0) {
return -6;
}
+
+ include_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php';
+ if (isALNERunningVersion()) {
+ return -7;
+ }
}
// If in accountancy, we refuse
@@ -748,6 +777,7 @@ abstract class CommonInvoice extends CommonObject
$this->fetch_thirdparty(); // We need to have this->thirdparty defined, in case of the numbering rule uses tags that depend on thirdparty (like {t} tag).
}
$maxref = $this->getNextNumRef($this->thirdparty, 'last');
+ // $maxref can be '' (means not found) if there is no invoice yet, but also if there is no invoice for the new period when there is a reset at each period
// If invoice to delete is not the last one, we refuse
if ($maxref != '' && $maxref != $this->ref) {
diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php
index 189c17fdc88..766413fe4f4 100644
--- a/htdocs/core/class/conf.class.php
+++ b/htdocs/core/class/conf.class.php
@@ -987,6 +987,12 @@ class Conf extends stdClass
if (!isset($this->global->MAIN_ENABLE_AJAX_TOOLTIP)) {
$this->global->MAIN_ENABLE_AJAX_TOOLTIP = 1; // Try to have it enabled by default with v21+
}
+ if (!isset($this->global->THEME_SHOW_BORDER_ON_INPUT)) {
+ $this->global->THEME_SHOW_BORDER_ON_INPUT = 1;
+ }
+ if (!isset($this->global->THEME_ELDY_BORDER_RADIUS)) {
+ $this->global->THEME_ELDY_BORDER_RADIUS = 6;
+ }
// By default, suppliers objects can be linked to all projects
if (!isset($this->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)) {
diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php
index 4644e1c04d0..03731dbb97f 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -938,10 +938,10 @@ class FormOther
);
});
';
- $out .= '';
+ $out .= '';
} else {
$color = ($set_color !== '' ? $set_color : ($default !== '' ? $default : 'FFFFFF'));
- $out .= '';
+ $out .= '';
$out .= '';
}
- $out .= '
';
if (!$i) {
$totalarray['nbfield']++;
}
diff --git a/htdocs/install/mysql/migration/22.0.0-23.0.0.sql b/htdocs/install/mysql/migration/22.0.0-23.0.0.sql
index 5960940831d..1046685add2 100644
--- a/htdocs/install/mysql/migration/22.0.0-23.0.0.sql
+++ b/htdocs/install/mysql/migration/22.0.0-23.0.0.sql
@@ -320,7 +320,7 @@ ALTER TABLE llx_oauth_token ADD COLUMN expire_at datetime NULL AFTER lastaccess;
ALTER TABLE llx_blockedlog ADD COLUMN linktoref varchar(255);
ALTER TABLE llx_blockedlog ADD COLUMN linktype varchar(16);
-ALTER TABLE llx_blockedlog ADD COLUMN vat double(24,8) DEFAULT NULL;
+ALTER TABLE llx_blockedlog ADD COLUMN amounts_taxexcl double(24,8) DEFAULT NULL AFTER amounts;
-- Incoterms 2025 and specific terms
diff --git a/htdocs/install/mysql/tables/llx_blockedlog.sql b/htdocs/install/mysql/tables/llx_blockedlog.sql
index ca58d0b1b35..6028e2c8b8f 100644
--- a/htdocs/install/mysql/tables/llx_blockedlog.sql
+++ b/htdocs/install/mysql/tables/llx_blockedlog.sql
@@ -24,6 +24,7 @@ CREATE TABLE llx_blockedlog
date_creation datetime, -- field included into line signature
action varchar(50), -- The type of event. field included into line signature
amounts double(24,8) NOT NULL, -- field included into line signature (denormalized data from object_data)
+ amounts_taxexcl double(24,8) NULL, -- field included into line signature (denormalized data from object_data)
ref_object varchar(255), -- field included into line signature (denormalized data from object_data)
date_object datetime, -- field included into line signature (denormalized data from object_data)
user_fullname varchar(255), -- field included into line signature (denormalized data from object_data)
@@ -37,6 +38,7 @@ CREATE TABLE llx_blockedlog
fk_user integer,
fk_object integer,
object_version varchar(32) DEFAULT '', -- in which version did the line was recorded
+ object_format varchar(16) DEFAULT 'V1', -- format of data stored in object_data
certified integer, -- not used, reserved for future use
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
debuginfo mediumtext
diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index 7b79975a204..ccd07ac2483 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -3864,7 +3864,7 @@ function migrate_reset_blocked_log($db, $langs, $conf)
$object->date = dol_now();
$b = new BlockedLog($db);
- $b->setObjectData($object, 'MODULE_SET', 0);
+ $b->setObjectData($object, 'MODULE_SET', 0, $user, null);
$res = $b->create($user);
if ($res <= 0) {
diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang
index 1f7e69e1a12..da698abe169 100644
--- a/htdocs/langs/en_US/bills.lang
+++ b/htdocs/langs/en_US/bills.lang
@@ -14,8 +14,11 @@ BillsStatisticsSuppliers=Vendors invoices statistics
DisabledBecauseDispatchedInBookkeeping=Disabled because invoice was dispatched into bookkeeping
DisabledBecauseNotLastInvoice=Disabled because invoice is not erasable. Some invoices were recorded after this one and it will create holes in the counter.
DisabledBecauseNotLastSituationInvoice=Disabled because invoice is not erasable. This invoice is not the last one in situation invoice cycle.
-DisabledBecauseAlreadyPrintedOnce=Disabled because invoice has already been printed at least once
+DisabledBecauseThereIsAPayment=Disabled because invoice has already some payments.
+DisabledBecauseAlreadyPrintedOnce=Disabled because invoice has already been downloaded or printed at least once
DisabledBecauseAlreadySentByEmail=Disabled because invoice has already been sent by email at least once
+DisabledBecauseVersionProtected=Disabled because invoice has already been validated and you are using version secured against deletion of invoices
+DisabledBecauseNotDraft=Disabled because invoice is not in draft status
DisabledBecauseNotErasable=Disabled because cannot be erased (unknown reason)
InvoiceStandard=Standard invoice
InvoiceStandardAsk=Standard invoice
diff --git a/htdocs/langs/en_US/blockedlog.lang b/htdocs/langs/en_US/blockedlog.lang
index af54a1e22d7..69328bf32d2 100644
--- a/htdocs/langs/en_US/blockedlog.lang
+++ b/htdocs/langs/en_US/blockedlog.lang
@@ -12,7 +12,7 @@ CompanyInitialKey=Company initial key (hash of genesis block)
BrowseBlockedLog=Unalterable logs
ShowAllFingerPrintsMightBeTooLong=Show all archived unlaterable logs (might be long)
ShowAllFingerPrintsErrorsMightBeTooLong=Show all non-valid unalterable logs (might be long)
-DownloadBlockChain=Download fingerprints
+DownloadBlockChain=Download blockchain
KoCheckFingerprintValidity=Archived log entry is not valid. It means someone (a hacker?) has modified some data of this record after it was recorded, OR has erased the previous archived record (check that the line with previous # exists) OR has modified the checksum of the previous record.
OkCheckFingerprintValidity=Archived log record is valid. The data on this line was not modified and the entry follows the previous one.
OkCheckFingerprintValidityButChainIsKo=Archived log seems valid compared to previous one but the chain was corrupted previously.
@@ -22,10 +22,10 @@ BlockedLogBillDownload=Customer invoice download
BlockedLogBillPreview=Customer invoice preview
BlockedlogInfoDialog=Log Details
ListOfTrackedEvents=List of tracked events
-Fingerprint=Fingerprint
-FingerprintExport=Fingerprint export
-FingerprintExportHMAC=Fingerprint export HMAC
-FingerprintFormat=Fingerprint format
+Fingerprint=Signature
+FingerprintDatabase=Signature in database
+FingerprintExport=Signature export
+FingerprintExportHMAC=Signature export HMAC
DownloadLogCSV=Export unalterable logs (CSV)
DataOfArchivedEvent=Complete data of archived event
DataOfArchivedEventHelp=This field contains the complementary data that was archived on real time. Even if some parent business event could have been canceled or modified, the data stored here is the original data, and it can't be modified.
@@ -83,4 +83,7 @@ logPAYMENT_VARIOUS_DELETE=Payment (not assigned to an invoice) logical deletion
logPAYMENT_VARIOUS_MODIFY=Payment (not assigned to an invoice) modified
logBLOCKEDLOG_EXPORT=Export of unalterable logs into a file
DebugInfo=Debug info
-PreviousFingerprint=Previous fingerprint
+PreviousFingerprint=Previous signature
+PaymentOf=Payment of
+ReplacedBy=Replaced by
+VersionSignature=Version signature
diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang
index e583cb5d095..8dd0523463e 100644
--- a/htdocs/langs/en_US/cashdesk.lang
+++ b/htdocs/langs/en_US/cashdesk.lang
@@ -173,3 +173,6 @@ SentToPrinter=Sent to printer
FailedToSendToPrinter=Failed to send to printer
TemporaryReceipt=Temporary
SignatureID=Signature ID
+CashRegisterAlertFR=Warning: According to French law, when using a Point Of Sale system, you must make a cash control every day, every month and every year. Cash controls are done manually from the menu %s - %s.
+CashRegisterAlertFR2=Every cash control is recorded into the Unalterable Log.
+KitchenPrinter=Kitchen printer
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index 05319e52d9b..bf2c9629a9c 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -374,6 +374,7 @@ ErrorBlockLogNeedElement=The unalterbale log object needs element type to be set
ErrorBlockLogNeedObject=The unalterbale log object needs object to be set
ErrorBadParameterWhenCallingCreateOfBlockedLog=Bad parameter when calling create of blocked log
ErrorMaxDecimalsShownTooLowComparedToUnitOrTotal=Value for 'Max. decimals for prices shown on screen' (%s) must be equal to or greater than both 'Max. decimals for unit prices' (%s) and 'Max. decimals for total prices' (%s). This is required to prevent rounding inconsistencies on documents.
+ErrorOnlyDraftStatusCanBeDeletedInMassAction=Only elements in draft status can be deleted in mass action
# Warnings
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
diff --git a/htdocs/langs/en_US/trips.lang b/htdocs/langs/en_US/trips.lang
index bba49dfd54a..9b36906da8e 100644
--- a/htdocs/langs/en_US/trips.lang
+++ b/htdocs/langs/en_US/trips.lang
@@ -121,7 +121,6 @@ ValideTrip=Approve expense report
ExpenseReportPayments=Expense report payments
TaxUndefinedForThisCategory = Tax is undefined for this category
errorComputeTtcOnMileageExpense=Error on computing mileage expense
-ErrorOnlyDraftStatusCanBeDeletedInMassAction=Only elements in draft status can be deleted in mass action
## Dictionary
EX_BRE=Breakfast
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 6209ffeb7da..eb12bd1db70 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -2370,8 +2370,9 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
$nophoto = '/public/theme/common/user_woman.png';
}
- $userImage = '';
- $userDropDownImage = '';
+ $userImage = img_picto('', 'user', 'class="photo photouserphoto userphoto"');
+ //$userImage = '';
+ $userDropDownImage = '';
}
$dropdownBody = '';
@@ -2404,7 +2405,8 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
}
}
$dropdownBody .= ' '.$langs->trans("VATIntraShort").': '.dol_print_profids(getDolGlobalString("MAIN_INFO_TVAINTRA"), 'VAT').'';
- $dropdownBody .= ' '.$langs->trans("Country").': '.($mysoc->country_code ? $langs->trans("Country".$mysoc->country_code) : '').'';
+ $langFlag = picto_from_langcode($langs->getDefaultLang(), 'class="none"');
+ $dropdownBody .= ' '.$langs->trans("Country").': '.($mysoc->country_code ? $langs->trans("Country".$mysoc->country_code).' '.$langFlag : '').'';
if (isModEnabled('multicurrency')) {
$dropdownBody .= ' '.$langs->trans("Currency").': '.getDolCurrency().'';
}
@@ -2416,7 +2418,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
// login infos
if (!empty($user->admin)) {
- $dropdownBody .= ' '.$langs->trans("Administrator").': '.yn($user->admin);
+ $dropdownBody .= ' '.$langs->trans("Administrator").': '.yn($user->admin).($user->admin ? ' '.img_picto('', 'admin') : '');
}
$company = '';
if (!empty($user->socid)) { // Add third party for external users
@@ -2441,8 +2443,8 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
$dropdownBody .= ' '.$langs->trans("CurrentTheme").': '.$conf->theme;
// @phan-suppress-next-line PhanRedefinedClassReference
$dropdownBody .= ' '.$langs->trans("CurrentMenuManager").': '.(isset($menumanager) ? $menumanager->name : 'unknown');
- $langFlag = picto_from_langcode($langs->getDefaultLang());
- $dropdownBody .= ' '.$langs->trans("CurrentUserLanguage").': '.($langFlag ? $langFlag.' ' : '').$langs->getDefaultLang();
+ $langFlag = picto_from_langcode($langs->getDefaultLang(), 'class="none"');
+ $dropdownBody .= ' '.$langs->trans("CurrentUserLanguage").': '.$langs->getDefaultLang().($langFlag ? ' '.$langFlag : '');;
$tz = (int) $_SESSION['dol_tz'] + (int) $_SESSION['dol_dst'];
$dropdownBody .= ' '.$langs->trans("ClientTZ").': '.($tz ? ($tz >= 0 ? '+' : '').$tz : '');
@@ -2487,7 +2489,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
$profilName = $user->getFullName($langs).' ('.$user->login.')';
if (!empty($user->admin)) {
- $profilName = ' '.$profilName;
+ $profilName = img_picto($langs->trans("Administrator"), 'admin').' '.$profilName;
}
// Define version to show
diff --git a/htdocs/takepos/admin/appearance.php b/htdocs/takepos/admin/appearance.php
index 2b9ad9e153c..7369a45ad49 100644
--- a/htdocs/takepos/admin/appearance.php
+++ b/htdocs/takepos/admin/appearance.php
@@ -85,7 +85,8 @@ $formproduct = new FormProduct($db);
llxHeader('', $langs->trans("CashDeskSetup"), '', '', 0, 0, '', '', '', 'mod-takepos page-admin_appearance');
-$linkback = ''.$langs->trans("BackToModuleList").'';
+$linkback = ''.img_picto($langs->trans("GoBack"), 'back', 'class="pictofixedwidth"').''.$langs->trans("GoBack").'';
+
print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup');
$head = takepos_admin_prepare_head();
print dol_get_fiche_head($head, 'appearance', 'TakePOS', -1, 'cash-register');
diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php
index 1de9516dcd4..c317d3d2c33 100644
--- a/htdocs/takepos/admin/bar.php
+++ b/htdocs/takepos/admin/bar.php
@@ -96,7 +96,8 @@ $arrayofcss = array("/takepos/css/colorbox.css");
llxHeader('', $langs->trans("CashDeskSetup"), '', '', 0, 0, $arrayofjs, $arrayofcss, '', 'mod-takepos page-admin_bar');
-$linkback = ''.$langs->trans("BackToModuleList").'';
+$linkback = ''.img_picto($langs->trans("GoBack"), 'back', 'class="pictofixedwidth"').''.$langs->trans("GoBack").'';
+
print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup');
$head = takepos_admin_prepare_head();
print dol_get_fiche_head($head, 'bar', 'TakePOS', -1, 'cash-register');
diff --git a/htdocs/takepos/admin/orderprinters.php b/htdocs/takepos/admin/orderprinters.php
index c5c283ebdb4..6ce9f83ecf7 100644
--- a/htdocs/takepos/admin/orderprinters.php
+++ b/htdocs/takepos/admin/orderprinters.php
@@ -30,11 +30,6 @@
// Load Dolibarr environment
require '../../main.inc.php'; // Load $user and permissions
-require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
-require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
-
/**
* @var Conf $conf
* @var DoliDB $db
@@ -42,6 +37,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
* @var Translate $langs
* @var User $user
*/
+require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
$langs->loadLangs(array("main", "categories", "takepos", "printing"));
diff --git a/htdocs/takepos/admin/other.php b/htdocs/takepos/admin/other.php
deleted file mode 100644
index 8f64863c9dc..00000000000
--- a/htdocs/takepos/admin/other.php
+++ /dev/null
@@ -1,159 +0,0 @@
-
- * Copyright (C) 2011-2017 Juanjo Menent
- * Copyright (C) 2024 Frédéric France
- *
- * 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
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-/**
- * \file htdocs/takepos/admin/other.php
- * \ingroup takepos
- * \brief Setup page for TakePos module
- */
-require '../../main.inc.php'; // Load $user and permissions
-require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
-require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
-require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php";
-
-// If socid provided by ajax company selector
-if (GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha')) {
- $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ?
- $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ?
- $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ?
-}
-
-/**
- * @var Conf $conf
- * @var DoliDB $db
- * @var HookManager $hookmanager
- * @var Translate $langs
- * @var User $user
- */
-
-// Security check
-if (!$user->admin) {
- accessforbidden();
-}
-
-$langs->loadLangs(array("admin", "cashdesk"));
-
-global $db;
-
-$sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement";
-$sql .= " WHERE entity IN (".getEntity('c_paiement').")";
-$sql .= " AND active = 1";
-$sql .= " ORDER BY libelle";
-$resql = $db->query($sql);
-$paiements = array();
-if ($resql) {
- while ($obj = $db->fetch_object($resql)) {
- array_push($paiements, $obj);
- }
-}
-
-
-/*
- * Actions
- */
-
-// Nothing
-
-
-/*
- * View
- */
-
-llxHeader('', $langs->trans("CashDeskSetup"), '', '', 0, 0, '', '', '', 'mod-takepos page-admin_other');
-
-$linkback = ''.$langs->trans("BackToModuleList").'';
-print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup');
-$head = takepos_admin_prepare_head();
-
-print dol_get_fiche_head($head, 'other', 'TakePOS', -1, 'cash-register');
-print ' ';
-
-
-// Mode
-print '';
-
-print dol_get_fiche_end();
-
-
-llxFooter();
-$db->close();
diff --git a/htdocs/takepos/admin/receipt.php b/htdocs/takepos/admin/receipt.php
index 62194e541c5..421bd2a1507 100644
--- a/htdocs/takepos/admin/receipt.php
+++ b/htdocs/takepos/admin/receipt.php
@@ -28,11 +28,6 @@
// Load Dolibarr environment
require '../../main.inc.php'; // Load $user and permissions
-require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
-require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
-require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php";
-
/**
* @var Conf $conf
* @var DoliDB $db
@@ -40,6 +35,10 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php";
* @var Translate $langs
* @var User $user
*/
+require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
+require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php";
// Security check
if (!$user->admin) {
@@ -90,16 +89,17 @@ if (GETPOST('action', 'alpha') == 'set') {
*/
$form = new Form($db);
-$formproduct = new FormProduct($db);
llxHeader('', $langs->trans("CashDeskSetup"), '', '', 0, 0, '', '', '', 'mod-takepos page-admin_receipt');
-$linkback = ''.$langs->trans("BackToModuleList").'';
+$linkback = ''.img_picto($langs->trans("GoBack"), 'back', 'class="pictofixedwidth"').''.$langs->trans("GoBack").'';
+
print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup');
+
$head = takepos_admin_prepare_head();
print dol_get_fiche_head($head, 'receipt', 'TakePOS', -1, 'cash-register');
-print '