mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix missing header
This commit is contained in:
parent
6e6aa29ff3
commit
9eaefcfdbf
|
|
@ -396,6 +396,8 @@ if ($action == 'getProducts') {
|
|||
echo 'Failed to search product : '.$db->lasterror();
|
||||
}
|
||||
} elseif ($action == "opendrawer" && $term != '') {
|
||||
top_httphead('application/html');
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php';
|
||||
$printer = new dolReceiptPrinter($db);
|
||||
// check printer for terminal
|
||||
|
|
@ -406,6 +408,8 @@ if ($action == 'getProducts') {
|
|||
$printer->close();
|
||||
}
|
||||
} elseif ($action == "printinvoiceticket" && $term != '' && $id > 0 && $user->hasRight('facture', 'lire')) {
|
||||
top_httphead('application/html');
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$printer = new dolReceiptPrinter($db);
|
||||
|
|
@ -427,6 +431,8 @@ if ($action == 'getProducts') {
|
|||
|
||||
echo json_encode($object);
|
||||
} elseif ($action == 'thecheck') {
|
||||
top_httphead('application/html');
|
||||
|
||||
$place = GETPOST('place', 'alpha');
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php';
|
||||
|
|
|
|||
|
|
@ -1287,12 +1287,15 @@ function TakeposConnector(id){
|
|||
return true;
|
||||
}
|
||||
|
||||
// Call the ajax to execute the print.
|
||||
// With some external module another method may be called.
|
||||
function DolibarrTakeposPrinting(id) {
|
||||
console.log("DolibarrTakeposPrinting Printing invoice ticket " + id)
|
||||
console.log("DolibarrTakeposPrinting Printing invoice ticket " + id);
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
data: { token: '<?php echo currentToken(); ?>' },
|
||||
url: "<?php print DOL_URL_ROOT.'/takepos/ajax/ajax.php?action=printinvoiceticket&token='.newToken().'&term='.urlencode(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '').'&id='; ?>" + id,
|
||||
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user