Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2020-04-12 17:01:53 +02:00
commit 78b455e42a
8 changed files with 32 additions and 7 deletions

View File

@ -401,7 +401,7 @@ function getTableColumnFunction(array $functions)
* @param array $loaded A list with all loaded PHP extensions
* @param array $functions A list with all PHP functions to check
*
* @return array
* @return string
*/
function getResultColumn($name, array $activated, array $loaded, array $functions)
{

View File

@ -43,6 +43,11 @@ class FichinterRec extends Fichinter
public $table_element_line = 'fichinter_rec';
public $fk_element = 'fk_fichinter';
/**
* {@inheritdoc}
*/
protected $table_ref_field = 'titre';
/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/

View File

@ -33,7 +33,7 @@ CREATE TABLE llx_blockedlog
signature varchar(100) NOT NULL,
signature_line varchar(100) NOT NULL,
object_data mediumtext,
object_version varchar(32) DEFAULT '';
object_version varchar(32) DEFAULT '',
certified integer
) ENGINE=innodb;

View File

@ -16,9 +16,9 @@
--
-- ============================================================================
ALTER TABLE llx_categorie_website_page ADD PRIMARY KEY pk_categorie_website_page (fk_categorie, fk_websitepage);
ALTER TABLE llx_categorie_website_page ADD PRIMARY KEY pk_categorie_website_page (fk_categorie, fk_website_page);
ALTER TABLE llx_categorie_website_page ADD INDEX idx_categorie_website_page_fk_categorie (fk_categorie);
ALTER TABLE llx_categorie_website_page ADD INDEX idx_categorie_website_page_fk_website_page (fk_websitepage);
ALTER TABLE llx_categorie_website_page ADD INDEX idx_categorie_website_page_fk_website_page (fk_website_page);
ALTER TABLE llx_categorie_website_page ADD CONSTRAINT fk_categorie_websitepage_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
ALTER TABLE llx_categorie_website_page ADD CONSTRAINT fk_categorie_websitepage_website_page_rowid FOREIGN KEY (fk_website_page) REFERENCES llx_website_page (rowid);

View File

@ -155,7 +155,7 @@ print "</tr>\n";
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") {
print '<tr class="oddeven value"><td>';
print $langs->trans("IPAddress").' (<a href="http://en.takepos.com/connector" target="_blank">'.$langs->trans("TakeposConnectorNecesary").'</a>)';
print $langs->trans("URL")." / ".$langs->trans("IPAddress").' (<a href="http://en.takepos.com/connector" target="_blank">'.$langs->trans("TakeposConnectorNecesary").'</a>)';
print '<td colspan="2">';
print '<input type="text" size="20" id="TAKEPOS_PRINT_SERVER" name="TAKEPOS_PRINT_SERVER" value="'.$conf->global->TAKEPOS_PRINT_SERVER.'">';
print '</td></tr>';

View File

@ -31,3 +31,7 @@ tr.selected, tr.selected td {
.topnav{
background: rgb(0,0,0) !important;
}
.fa-trash {
color: #fff !important;
}

View File

@ -874,7 +874,8 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT)
if ($conf->global->TAKEPOS_BAR_RESTAURANT)
{
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") {
$menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'TakeposPrinting(placeid);');
if (filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) $menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'TakeposConnector(placeid);');
else $menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'TakeposPrinting(placeid);');
} elseif ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") {
$menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'DolibarrTakeposPrinting(placeid);');
} else {

View File

@ -590,7 +590,8 @@ if ($action == "valid" || $action == "history")
}
$sectionwithinvoicelink .= '</span>';
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") {
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button>';
if (filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) $sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposConnector('.$placeid.');">'.$langs->trans('PrintTicket').'</button>';
else $sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button>';
} elseif ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") {
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="DolibarrTakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button>';
} else {
@ -708,6 +709,20 @@ function TakeposPrinting(id){
});
});
}
function TakeposConnector(id){
var invoice='<?php
$data=json_encode($invoice);
$data=base64_encode($data);
echo $data;
?>';
$.ajax({
type: "POST",
url: '<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>/print.php',
data: 'invoice='+invoice
});
}
function DolibarrTakeposPrinting(id) {
console.log('Printing invoice ticket ' + id)
$.ajax({