diff --git a/htdocs/core/modules/modBlockedLog.class.php b/htdocs/core/modules/modBlockedLog.class.php index 340c808871e..ef9b533c80a 100644 --- a/htdocs/core/modules/modBlockedLog.class.php +++ b/htdocs/core/modules/modBlockedLog.class.php @@ -209,7 +209,7 @@ class modBlockedLog extends DolibarrModules */ public function remove($options = '') { - global $conf, $user; + global $conf, $langs, $user; $sql = array(); @@ -233,6 +233,8 @@ class modBlockedLog extends DolibarrModules if ($b->alreadyUsed(1)) { $res = $b->create($user, '0000000000'); // If already used for something else than SET or UNSET, we log with error + //$this->error = $langs->trans('DisablingBlockedLogIsNotallowedOnceUsedExceptOnFullreset', $langs->transnoentitiesnoconv('BlockedLog')); + return 0; } else { $res = $b->create($user); } diff --git a/htdocs/langs/en_US/blockedlog.lang b/htdocs/langs/en_US/blockedlog.lang index c05b2623c52..852ff5c247f 100644 --- a/htdocs/langs/en_US/blockedlog.lang +++ b/htdocs/langs/en_US/blockedlog.lang @@ -36,6 +36,7 @@ LinkHasBeenDisabledForPerformancePurpose=For performance purpose, direct link to SavedOnLine=Saved on line UnlaterableDataOfEvent=Unalterable data of event YourCountryCode=Your country code +DisablingBlockedLogIsNotallowedOnceUsedExceptOnFullreset=Disabling %s module is not allowed once it has been used, except for a full database reset. Ask your integrator or reseller if you need such a reset. ## logTypes logBILL_DELETE=Customer invoice logically deleted diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index 2847000bd20..1a28512a3ad 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -63,6 +63,7 @@ if (!isset($action)) { * @var User $user */ include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +include_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php'; $langs->loadLangs(array("main", "bills", "cashdesk", "companies")); @@ -166,7 +167,14 @@ if (isALNERunningVersion()) {
trans('Date')." ".dol_print_date($object->date, 'day').'
';
+print $langs->trans('Date')." ".dol_print_date($object->date ? $object->date : dol_now(), 'day').'
';
if (getDolGlobalString('TAKEPOS_RECEIPT_NAME')) {
print getDolGlobalString('TAKEPOS_RECEIPT_NAME') . " ";
} else {
@@ -217,14 +223,14 @@ if ($object->status == Facture::STATUS_DRAFT || empty($facid) || GETPOST('specim
// Printing ticket is not allowed if invoice not yet validate.
// Reaching this code may happen for specimen or if a feature to validate invoice and print it before paying is implemented.
if (empty($facid) || GETPOST('specimen')) {
- print 'Specimen';
+ print '99999';
} else {
print $object->ref;
}
} else {
print $object->ref;
}
-print '
'.$langs->trans("Terminal").' '.$object->pos_source;
+print '
'.$langs->trans("Terminal").' '.(GETPOST('specimen') ? '99' : $object->pos_source);
if (getDolGlobalString('TAKEPOS_SHOW_CUSTOMER')) {
if ($object->socid != getDolGlobalInt('CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"])) {
$soc = new Societe($db);