Compare commits
No commits in common. "015fe3524d3a2a92ea8d6197b91d2c7a4dc552e6" and "9a4d8e279ad0ebfa265aba5ae8faad7ad4446b9d" have entirely different histories.
015fe3524d
...
9a4d8e279a
@ -113,7 +113,7 @@ public class HostConfigFragment extends DataBindingFragment {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printer.setGray(GrayLevelEnum.LEVEL_1);
|
printer.setGray(GrayLevelEnum.LEVEL_1);
|
||||||
Typeface typeface = ResourcesCompat.getFont(requireContext(), R.font.firacode);
|
Typeface typeface = ResourcesCompat.getFont(requireContext(), R.font.consolas_bold);
|
||||||
printer.setTypeface(typeface);
|
printer.setTypeface(typeface);
|
||||||
SystemParamsOperation sp = SystemParamsOperation.getInstance();
|
SystemParamsOperation sp = SystemParamsOperation.getInstance();
|
||||||
|
|
||||||
|
|||||||
@ -218,7 +218,7 @@ public class TMSUtil {
|
|||||||
featuresList.add(new Features(6, fragmentActivity.getString(R.string.menu_preauth_completion), R.drawable.ic_pre_auth_dash, FeaturesType.PRE_AUTH_COMPLETE, preAuthCompleteStatus));
|
featuresList.add(new Features(6, fragmentActivity.getString(R.string.menu_preauth_completion), R.drawable.ic_pre_auth_dash, FeaturesType.PRE_AUTH_COMPLETE, preAuthCompleteStatus));
|
||||||
// featuresList.add(new Features(5, fragmentActivity.getString(R.string.menu_wavepay_inquiry), R.drawable.ic_wave_status_dash, FeaturesType.WAVE_PAY_INQUIRY, wavePayInquiryStatus));
|
// featuresList.add(new Features(5, fragmentActivity.getString(R.string.menu_wavepay_inquiry), R.drawable.ic_wave_status_dash, FeaturesType.WAVE_PAY_INQUIRY, wavePayInquiryStatus));
|
||||||
featuresList.add(new Features(1, fragmentActivity.getString(R.string.menu_cash_advance), R.drawable.ic_cash_advance, FeaturesType.CASH_ADVANCE, cashAdvanceStatus));
|
featuresList.add(new Features(1, fragmentActivity.getString(R.string.menu_cash_advance), R.drawable.ic_cash_advance, FeaturesType.CASH_ADVANCE, cashAdvanceStatus));
|
||||||
// featuresList.add(new Features(9, fragmentActivity.getString(R.string.menu_history), R.drawable.ic_history, FeaturesType.HISTORY, true));
|
featuresList.add(new Features(9, fragmentActivity.getString(R.string.menu_history), R.drawable.ic_history, FeaturesType.HISTORY, true));
|
||||||
featuresList.add(new Features(10, "Configs", R.drawable.ic_host, FeaturesType.DEVICE_CONFIG, true));
|
featuresList.add(new Features(10, "Configs", R.drawable.ic_host, FeaturesType.DEVICE_CONFIG, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -2,7 +2,7 @@ package com.utsmyanmar.baselib.network.model.sirius;
|
|||||||
|
|
||||||
public class SiriusMerchant {
|
public class SiriusMerchant {
|
||||||
|
|
||||||
private String id;
|
private int id;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ public class SiriusMerchant {
|
|||||||
|
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
public SiriusMerchant(String id, String name, String description, String address,String address2,String phone,String mobile) {
|
public SiriusMerchant(int id, String name, String description, String address,String address2,String phone,String mobile) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
@ -50,7 +50,7 @@ public class SiriusMerchant {
|
|||||||
return mobile;
|
return mobile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(String id) {
|
public void setId(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ public class SiriusMerchant {
|
|||||||
this.address = address;
|
this.address = address;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,12 +2,12 @@ package com.utsmyanmar.baselib.network.model.sirius;
|
|||||||
|
|
||||||
public class SiriusProperty {
|
public class SiriusProperty {
|
||||||
|
|
||||||
private String id;
|
private int id;
|
||||||
private String terId;
|
private int terId;
|
||||||
|
|
||||||
private String appId;
|
private int appId;
|
||||||
|
|
||||||
private String configId;
|
private int configId;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ public class SiriusProperty {
|
|||||||
|
|
||||||
private String property;
|
private String property;
|
||||||
|
|
||||||
public SiriusProperty(String id, String terId, String appId, String configId, String name, String description, String type, String property) {
|
public SiriusProperty(int id, int terId, int appId, int configId, String name, String description, String type, String property) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.terId = terId;
|
this.terId = terId;
|
||||||
this.appId = appId;
|
this.appId = appId;
|
||||||
@ -28,19 +28,19 @@ public class SiriusProperty {
|
|||||||
this.property = property;
|
this.property = property;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(String id) {
|
public void setId(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTerId(String terId) {
|
public void setTerId(int terId) {
|
||||||
this.terId = terId;
|
this.terId = terId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAppId(String appId) {
|
public void setAppId(int appId) {
|
||||||
this.appId = appId;
|
this.appId = appId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setConfigId(String configId) {
|
public void setConfigId(int configId) {
|
||||||
this.configId = configId;
|
this.configId = configId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,19 +60,19 @@ public class SiriusProperty {
|
|||||||
this.property = property;
|
this.property = property;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTerId() {
|
public int getTerId() {
|
||||||
return terId;
|
return terId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAppId() {
|
public int getAppId() {
|
||||||
return appId;
|
return appId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getConfigId() {
|
public int getConfigId() {
|
||||||
return configId;
|
return configId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
package com.utsmyanmar.baselib.network.model.sirius;
|
package com.utsmyanmar.baselib.network.model.sirius;
|
||||||
|
|
||||||
public class SiriusTerminal {
|
public class SiriusTerminal {
|
||||||
private String id;
|
private int id;
|
||||||
private String name;
|
private String name;
|
||||||
private String serialNumber;
|
private String serialNumber;
|
||||||
private String ercKey;
|
private String ercKey;
|
||||||
private String address;
|
private String address;
|
||||||
private String address2;
|
private String address2;
|
||||||
private String terminalTypeId;
|
private int terminalTypeId;
|
||||||
private String terminalModel;
|
private String terminalModel;
|
||||||
|
|
||||||
public SiriusTerminal(String id, String name, String serialNumber, String ercKey, String address, String address2, String terminalTypeId, String terminalModel){
|
public SiriusTerminal(int id, String name, String serialNumber, String ercKey, String address, String address2, int terminalTypeId, String terminalModel){
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.serialNumber = serialNumber;
|
this.serialNumber = serialNumber;
|
||||||
@ -22,7 +22,7 @@ public class SiriusTerminal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//getter
|
//getter
|
||||||
public String getId(){
|
public int getId(){
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,11 +50,11 @@ public class SiriusTerminal {
|
|||||||
return terminalModel;
|
return terminalModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTerminalTypeId(){
|
public int getTerminalTypeId(){
|
||||||
return terminalTypeId;
|
return terminalTypeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(String id){
|
public void setId(int id){
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ public class SiriusTerminal {
|
|||||||
this.serialNumber = serialNumber;
|
this.serialNumber = serialNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTerminalTypeId(String terminalTypeId){
|
public void setTerminalTypeId(int terminalTypeId){
|
||||||
this.terminalTypeId = terminalTypeId;
|
this.terminalTypeId = terminalTypeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -84,7 +84,7 @@ public abstract class BaseXPrint {
|
|||||||
protected int fontSmall = 16;
|
protected int fontSmall = 16;
|
||||||
// protected FontEntity fontSmall = new FontEntity(DotMatrixFontEnum.CH_SONG_20X20, DotMatrixFontEnum.ASC_SONG_8X16);
|
// protected FontEntity fontSmall = new FontEntity(DotMatrixFontEnum.CH_SONG_20X20, DotMatrixFontEnum.ASC_SONG_8X16);
|
||||||
|
|
||||||
protected int fontNormal = 20;
|
protected int fontNormal = 21;
|
||||||
|
|
||||||
// protected FontEntity fontNormal = new FontEntity(DotMatrixFontEnum.CH_SONG_24X24, DotMatrixFontEnum.ASC_SONG_12X24);
|
// protected FontEntity fontNormal = new FontEntity(DotMatrixFontEnum.CH_SONG_24X24, DotMatrixFontEnum.ASC_SONG_12X24);
|
||||||
protected FontEntity fontBold = new FontEntity(DotMatrixFontEnum.CH_SONG_24X24, DotMatrixFontEnum.ASC_SONG_BOLD_16X24);
|
protected FontEntity fontBold = new FontEntity(DotMatrixFontEnum.CH_SONG_24X24, DotMatrixFontEnum.ASC_SONG_BOLD_16X24);
|
||||||
@ -117,13 +117,13 @@ public abstract class BaseXPrint {
|
|||||||
Resources resources = PayLibsUtils.getInstance().context.getResources();
|
Resources resources = PayLibsUtils.getInstance().context.getResources();
|
||||||
// Typeface typeface = ResourcesCompat.getFont(PayLibsUtils.getInstance().context, R.font.consolas);
|
// Typeface typeface = ResourcesCompat.getFont(PayLibsUtils.getInstance().context, R.font.consolas);
|
||||||
// printer.setTypeface(typeface);
|
// printer.setTypeface(typeface);
|
||||||
printer.setTypeface(Typeface.createFromAsset(PayLibsUtils.getInstance().context.getAssets(), "fonts/firacode_regular.ttf"));
|
printer.setTypeface(Typeface.createFromAsset(PayLibsUtils.getInstance().context.getAssets(), "fonts/consolab.ttf"));
|
||||||
printer.setGray(getGrayLevel());
|
printer.setGray(getGrayLevel());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private GrayLevelEnum getGrayLevel() {
|
private GrayLevelEnum getGrayLevel() {
|
||||||
int gray = 2;
|
int gray = 1;
|
||||||
GrayLevelEnum grayLevelEnum = GrayLevelEnum.LEVEL_1;
|
GrayLevelEnum grayLevelEnum = GrayLevelEnum.LEVEL_1;
|
||||||
|
|
||||||
|
|
||||||
@ -534,7 +534,7 @@ public abstract class BaseXPrint {
|
|||||||
printer.appendPrnStr("GRAND TOTAL", fontNormal, AlignEnum.LEFT,false);
|
printer.appendPrnStr("GRAND TOTAL", fontNormal, AlignEnum.LEFT,false);
|
||||||
printer.appendPrnStr(" " + "COUNT " + " " + " TOTAL", fontNormal, AlignEnum.LEFT,false);
|
printer.appendPrnStr(" " + "COUNT " + " " + " TOTAL", fontNormal, AlignEnum.LEFT,false);
|
||||||
// printer.printColumnsString(new String[]{"", "COUNT", "TOTAL"}, new int[]{2,1, 1}, new int[]{ 2,1, 2}, innerResultCallback);
|
// printer.printColumnsString(new String[]{"", "COUNT", "TOTAL"}, new int[]{2,1, 1}, new int[]{ 2,1, 2}, innerResultCallback);
|
||||||
// emptyLine(1);
|
emptyLine(1);
|
||||||
if (settleData.getSaleCount() > 0)
|
if (settleData.getSaleCount() > 0)
|
||||||
printColumnString("SALES", settleData.getSaleCount(), settleData.getSaleAmount(), false);
|
printColumnString("SALES", settleData.getSaleCount(), settleData.getSaleAmount(), false);
|
||||||
// printer.appendPrnStr("SALES "+ countStringFormat(settleData.getSaleCount())+MMK+" "+ PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getSaleAmount()), fontNormal, AlignEnum.LEFT,false);
|
// printer.appendPrnStr("SALES "+ countStringFormat(settleData.getSaleCount())+MMK+" "+ PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getSaleAmount()), fontNormal, AlignEnum.LEFT,false);
|
||||||
@ -830,7 +830,7 @@ public abstract class BaseXPrint {
|
|||||||
|
|
||||||
protected void printLogo() {
|
protected void printLogo() {
|
||||||
|
|
||||||
// printer.appendPrnStr("\n", FONT_SIZE_NORMAL, AlignEnum.CENTER, false);
|
printer.appendPrnStr("\n", FONT_SIZE_NORMAL, AlignEnum.CENTER, false);
|
||||||
if (bitmap.getWidth() > 384) {
|
if (bitmap.getWidth() > 384) {
|
||||||
double size = 1.0 * bitmap.getHeight() * 384 / bitmap.getWidth();
|
double size = 1.0 * bitmap.getHeight() * 384 / bitmap.getWidth();
|
||||||
int newHeight = (int) size;
|
int newHeight = (int) size;
|
||||||
@ -838,6 +838,7 @@ public abstract class BaseXPrint {
|
|||||||
}
|
}
|
||||||
printer.appendImage(bitmap, AlignEnum.CENTER);
|
printer.appendImage(bitmap, AlignEnum.CENTER);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void printMerchantHeader() {
|
protected void printMerchantHeader() {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.utsmyanmar.paylibs.print.printx;
|
package com.utsmyanmar.paylibs.print.printx;
|
||||||
|
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ public class PrintXImpl extends BaseXPrint implements PrintX {
|
|||||||
SimpleDateFormat dfm = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss", Locale.getDefault());
|
SimpleDateFormat dfm = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss", Locale.getDefault());
|
||||||
currentTime = dfm.format(new Date());
|
currentTime = dfm.format(new Date());
|
||||||
BitmapFactory.Options opts = new BitmapFactory.Options();
|
BitmapFactory.Options opts = new BitmapFactory.Options();
|
||||||
bitmap = BitmapFactory.decodeResource(resources, R.drawable.print_kbz_logo_new_1, opts);
|
bitmap = BitmapFactory.decodeResource(resources, R.drawable.print_kbz_logo_new, opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB |
BIN
paylibs/src/main/res/font/consolab.ttf
Normal file
BIN
paylibs/src/main/res/font/consolab.ttf
Normal file
Binary file not shown.
BIN
paylibs/src/main/res/font/consolas.ttf
Normal file
BIN
paylibs/src/main/res/font/consolas.ttf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user