upgrade all with dice compatible

This commit is contained in:
2026-08-22 12:53:04 +07:00
parent 27ebdca49b
commit e7bb9a6c90
34 changed files with 546 additions and 486 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
Created Date : December 20th, 2007.
Last Modified : February 7th, 2026.
(c) 2009 - 2026, 3FONIA Software; WWW.3FONIA.COM.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
+1 -1
View File
@@ -6,7 +6,7 @@
Created Date : October 7th, 2008.
Last Modified : November 24th, 2020.
(c) 2008 - 2020, 3FONIA Software; WWW.3FONIA.COM.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,12 +1,12 @@
/*******************************************************************
Module : /modules/js/export.js
Module : /assets/js/export.js
Desc. : Fungsi-fungsi export data & laporan
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : April 1st, 2011.
Last Modified : January 19th, 2026.
(c) 2011 - 2026, 3FONIA Software; WWW.3FONIA.COM.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
+1 -1
View File
@@ -6,7 +6,7 @@
Created Date : June 19th, 2009.
Last Modified : February 10th, 2026.
(c) 2009 - 2026, 3FONIA Software; WWW.3FONIA.COM.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
+1 -1
View File
@@ -6,7 +6,7 @@
Created Date : April 6th, 2015.
Last Modified : October 18th, 2020.
(c) 2015 - 2020, 3FONIA Software; WWW.3FONIA.COM.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
+1 -1
View File
@@ -5,7 +5,7 @@
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : October 12th, 2025.
(c) 2025, 3FONIA Software; WWW.3FONIA.COM.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
+11 -11
View File
@@ -4,9 +4,9 @@
Desc. : JS Class Printer & Printer POS
Created By : Siau Pheng (siaupheng@3fonia.com).
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) {
+37 -35
View File
@@ -1,19 +1,43 @@
/*******************************************************************
Module : /js/qz/qz-start.js
Desc. : JS Setup QZ Connection
Module : /assets/js/qz/qz-start.js
Desc. : Setup QZ Connection
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : May 27th, 2007.
Last Modified : February 8th, 2026.
Last Modified : August 22nd, 2026.
(c) 2008 - 2026, 3FONIA Software; WWW.3FONIA.COM.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
function launchQZ() {
const _divStatus = '#divQZStatus';
if (typeof qz !== 'undefined') {
qz.security.setSignatureAlgorithm("SHA512");
qz.security.setCertificatePromise((resolve, reject) => {
jQuery.ajax({url:'qz/cert', cache:false, dataType:'text'}).then(resolve, reject);
});
qz.security.setSignaturePromise((toSign) => {
return (resolve, reject) => {
jQuery.ajax('qz/sign/'+toSign).then(resolve, reject);
};
});
qz.websocket.setClosedCallbacks((evt) => {
_updateState('Inactive');
if (evt.reason) console.info("Connection closed: " + evt.reason);
});
qz.websocket.setErrorCallbacks((evt) => {
_updateState('Error');
if (evt.target != undefined) {
var err = (evt.target.readyState >= 2) ? "Connection to QZ Tray was closed" : "A connection error occurred, check log for details";
console.info(err)
}
});
}
function launchQZ() {
if (!qz.websocket.isActive()) {
window.location.assign("qz:launch");
//Retry 5 times, pausing 1 second between each attempt
startConnection({ retries: 5, delay: 1 });
}
}
@@ -22,10 +46,10 @@ function startConnection(config) {
config = config ? config : {};
if (!qz.websocket.isActive()) {
_updateState('Waiting');
qz.websocket.connect(config).then(() => {
qz.websocket.connect({...config, host: 'localhost'}).then(() => {
_updateState('Active');
_findDefaultPrinter();
});
}).catch(() => _updateState('Error'));
} else {
console.info('An active connection with QZ already exists.');
}
@@ -35,7 +59,7 @@ function endConnection(){
if (qz.websocket.isActive()) {
qz.websocket.disconnect().then(() => {
_updateState('Inactive');
});
}).catch(() => _updateState('Error'));
} else {
console.info('No active connection with QZ exists.');
}
@@ -64,30 +88,8 @@ function _updateState(text){
} else {
$(_divStatus).addClass('border-warning');
}
}
const _divStatus = '#divQZStatus';
if (typeof qz !== 'undefined') {
qz.security.setSignatureAlgorithm("SHA512");
qz.security.setCertificatePromise((resolve, reject) => {
jQuery.ajax({url:'qz/cert', cache:false, dataType:'text'}).then(resolve, reject);
});
qz.security.setSignaturePromise((toSign) => {
return (resolve, reject) => {
jQuery.ajax('qz/sign/'+toSign).then(resolve, reject);
};
});
qz.websocket.setClosedCallbacks((evt) => {
_updateState('Inactive');
if (evt.reason) console.info("Connection closed: " + evt.reason);
});
qz.websocket.setErrorCallbacks((evt) => {
_updateState('Error');
if (evt.target != undefined) {
var err = (evt.target.readyState >= 2) ? "Connection to QZ Tray was closed" : "A connection error occurred, check log for details";
console.info(err)
}
});
startConnection();
$('li#qzL, li#qzS, li#qzZ').removeClass('d-none');
if (text !== "Error") {
$('li#qzL').addClass('d-none');
} else $('li#qzS, li#qzZ').addClass('d-none');
}
+1 -1
View File
@@ -6,7 +6,7 @@
Created Date : May 27th, 2007.
Last Modified : January 19th, 2026.
(c) 2007 - 2026, 3FONIA Software; WWW.3FONIA.COM.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
+1 -1
View File
@@ -6,7 +6,7 @@
Created Date : March 18th, 2021.
Last Modified : December 26th, 2025.
(c) 2021 - 2025, 3FONIA Software; WWW.3FONIA.COM.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/