fixed same bug
This commit is contained in:
+7
-7
@@ -4,7 +4,7 @@
|
||||
Desc. : JS Class Printer & Printer POS
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 27th, 2007.
|
||||
Last Modified : August 21st, 2026.
|
||||
Last Modified : September 21st, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -35,11 +35,10 @@ var cPRINTER = function(url, options){
|
||||
console.warn(vars.param + ", cek url php!");
|
||||
return false;
|
||||
}
|
||||
vars.data = FoniaJS.RequestParam(vars.param);
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: vars.url,
|
||||
data: (vars.data).join('&'),
|
||||
data: FoniaJS.RequestParam(vars.param),
|
||||
success: (txt) => {
|
||||
var $printData = $('#dataPrint');
|
||||
if (!$printData.length) {
|
||||
@@ -54,11 +53,10 @@ var cPRINTER = function(url, options){
|
||||
};
|
||||
this.doPreview = function(){
|
||||
if (!vars.url) console.warn(vars.param + ", cek url php!");
|
||||
vars.data = FoniaJS.RequestParam(vars.param);
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: vars.url,
|
||||
data: (vars.data).join('&'),
|
||||
data: FoniaJS.RequestParam(vars.param),
|
||||
success: (txt) => {
|
||||
if ('' == txt) {
|
||||
FoniaJS.showInfo('Tidak ada data untuk pembuatan laporan !');
|
||||
@@ -162,7 +160,7 @@ var cPRINTERPOS = function(url, options) {
|
||||
};
|
||||
this.do_print = function(nama_p, url, params) {
|
||||
var qzcfg = qz.configs.create(nama_p);
|
||||
new Request.JSON({
|
||||
new Request({
|
||||
url: url,
|
||||
sendParam: params,
|
||||
onSuccess: (ajson) => {
|
||||
@@ -181,7 +179,9 @@ var cPRINTERPOS = function(url, options) {
|
||||
ohead.push("\x1B\x40");
|
||||
ohead.push("\x1B\x61\x01");
|
||||
if (adata.config.logo != null) {
|
||||
ohead.push({type:'raw',format:'image',data:adata.config.logo,options:{language:'ESCPOS',dotDensity:'double'}});
|
||||
//ohead.push({type:'raw',format:'image',data:adata.config.logo,options:{language:'ESCPOS',dotDensity:'double'}});
|
||||
//ohead.push("\x1B\x32");
|
||||
ohead.push({type:'raw',format:'image',flavor:'base64',data:adata.config.logo,options:{language:'ESCPOS',dotDensity:'double'}});
|
||||
ohead.push("\x1B\x32");
|
||||
}
|
||||
if (parseInt(adata.config.fontsize) == 2) {
|
||||
|
||||
Reference in New Issue
Block a user