upgrade all with dice compatible
This commit is contained in:
+11
-11
@@ -4,9 +4,9 @@
|
||||
Desc. : JS Class Printer & Printer POS
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 27th, 2007.
|
||||
Last Modified : December 26th, 2025.
|
||||
Last Modified : August 21st, 2026.
|
||||
|
||||
(c) 2007 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
@@ -40,10 +40,10 @@ var cPRINTER = function(url, options){
|
||||
type: 'POST',
|
||||
url: vars.url,
|
||||
data: (vars.data).join('&'),
|
||||
success: function(txt){
|
||||
success: (txt) => {
|
||||
var $printData = $('#dataPrint');
|
||||
if (!$printData.length) {
|
||||
var $printData = $('<div/>', {id:'dataPrint','class':'d-none d-print-block print-body'}).appendTo('body');
|
||||
$printData = $('<div/>', {id:'dataPrint','class':'d-none d-print-block print-body'}).appendTo('body');
|
||||
}
|
||||
$printData.html(txt);
|
||||
window.print();
|
||||
@@ -59,7 +59,7 @@ var cPRINTER = function(url, options){
|
||||
type: 'POST',
|
||||
url: vars.url,
|
||||
data: (vars.data).join('&'),
|
||||
success: function(txt){
|
||||
success: (txt) => {
|
||||
if ('' == txt) {
|
||||
FoniaJS.showInfo('Tidak ada data untuk pembuatan laporan !');
|
||||
return false;
|
||||
@@ -72,17 +72,17 @@ var cPRINTER = function(url, options){
|
||||
'<div class="modal-body print-body" id="divPrintP">'+txt+'</div>'+
|
||||
'</div></div></div>';
|
||||
if ($('#winAPPPrint')) $('#winAPPPrint').modal('dispose').remove();
|
||||
$(_wtxt).on('shown.bs.modal', function(e){
|
||||
$('#winAPPPrint').find('#tombCetak').click(function(){
|
||||
$(_wtxt).on('shown.bs.modal', (e) => {
|
||||
$('#winAPPPrint').find('#tombCetak').click(() => {
|
||||
var $printData = $('#dataPrint');
|
||||
if (!$printData.length) {
|
||||
var $printData = $('<div/>', {id:'dataPrint','class':'d-none d-print-block print-body'}).appendTo('body');
|
||||
$printData = $('<div/>', {id:'dataPrint','class':'d-none d-print-block print-body'}).appendTo('body');
|
||||
}
|
||||
$printData.html($('#divPrintP').html());
|
||||
FoniaJS.closeWindow($('#winAPPPrint'));
|
||||
window.print();
|
||||
});
|
||||
}).on('hidden.bs.modal', function(e){
|
||||
}).on('hidden.bs.modal', (e) => {
|
||||
$(this).remove();
|
||||
}).modal('show');
|
||||
},
|
||||
@@ -165,14 +165,14 @@ var cPRINTERPOS = function(url, options) {
|
||||
new Request.JSON({
|
||||
url: url,
|
||||
sendParam: params,
|
||||
onSuccess: function(ajson) {
|
||||
onSuccess: (ajson) => {
|
||||
if (typeof ajson === "object") {
|
||||
var hasil_cetak = (ajson.type == "escp") ? this.gen_escp(ajson) : this.gen_epl(ajson);
|
||||
qz.print(qzcfg, hasil_cetak);
|
||||
} else {
|
||||
FoniaJS.showInfo('Error dalam proses Cetak.');
|
||||
}
|
||||
}.bind(this)
|
||||
}
|
||||
}).send();
|
||||
};
|
||||
this.gen_escp = function(adata) {
|
||||
|
||||
Reference in New Issue
Block a user