fix for receipt
This commit is contained in:
parent
4984a726e9
commit
015fe3524d
@ -113,7 +113,7 @@ public class HostConfigFragment extends DataBindingFragment {
|
||||
return;
|
||||
}
|
||||
printer.setGray(GrayLevelEnum.LEVEL_1);
|
||||
Typeface typeface = ResourcesCompat.getFont(requireContext(), R.font.consolas_bold);
|
||||
Typeface typeface = ResourcesCompat.getFont(requireContext(), R.font.firacode);
|
||||
printer.setTypeface(typeface);
|
||||
SystemParamsOperation sp = SystemParamsOperation.getInstance();
|
||||
|
||||
|
||||
BIN
app/src/main/res/font/firacode.ttf
Normal file
BIN
app/src/main/res/font/firacode.ttf
Normal file
Binary file not shown.
@ -2,7 +2,7 @@ package com.utsmyanmar.baselib.network.model.sirius;
|
||||
|
||||
public class SiriusMerchant {
|
||||
|
||||
private int id;
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
@ -16,7 +16,7 @@ public class SiriusMerchant {
|
||||
|
||||
private String mobile;
|
||||
|
||||
public SiriusMerchant(int id, String name, String description, String address,String address2,String phone,String mobile) {
|
||||
public SiriusMerchant(String id, String name, String description, String address,String address2,String phone,String mobile) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
@ -50,7 +50,7 @@ public class SiriusMerchant {
|
||||
return mobile;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ public class SiriusMerchant {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
@ -2,12 +2,12 @@ package com.utsmyanmar.baselib.network.model.sirius;
|
||||
|
||||
public class SiriusProperty {
|
||||
|
||||
private int id;
|
||||
private int terId;
|
||||
private String id;
|
||||
private String terId;
|
||||
|
||||
private int appId;
|
||||
private String appId;
|
||||
|
||||
private int configId;
|
||||
private String configId;
|
||||
|
||||
private String name;
|
||||
|
||||
@ -17,7 +17,7 @@ public class SiriusProperty {
|
||||
|
||||
private String property;
|
||||
|
||||
public SiriusProperty(int id, int terId, int appId, int configId, String name, String description, String type, String property) {
|
||||
public SiriusProperty(String id, String terId, String appId, String configId, String name, String description, String type, String property) {
|
||||
this.id = id;
|
||||
this.terId = terId;
|
||||
this.appId = appId;
|
||||
@ -28,19 +28,19 @@ public class SiriusProperty {
|
||||
this.property = property;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setTerId(int terId) {
|
||||
public void setTerId(String terId) {
|
||||
this.terId = terId;
|
||||
}
|
||||
|
||||
public void setAppId(int appId) {
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public void setConfigId(int configId) {
|
||||
public void setConfigId(String configId) {
|
||||
this.configId = configId;
|
||||
}
|
||||
|
||||
@ -60,19 +60,19 @@ public class SiriusProperty {
|
||||
this.property = property;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getTerId() {
|
||||
public String getTerId() {
|
||||
return terId;
|
||||
}
|
||||
|
||||
public int getAppId() {
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public int getConfigId() {
|
||||
public String getConfigId() {
|
||||
return configId;
|
||||
}
|
||||
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
package com.utsmyanmar.baselib.network.model.sirius;
|
||||
|
||||
public class SiriusTerminal {
|
||||
private int id;
|
||||
private String id;
|
||||
private String name;
|
||||
private String serialNumber;
|
||||
private String ercKey;
|
||||
private String address;
|
||||
private String address2;
|
||||
private int terminalTypeId;
|
||||
private String terminalTypeId;
|
||||
private String terminalModel;
|
||||
|
||||
public SiriusTerminal(int id, String name, String serialNumber, String ercKey, String address, String address2, int terminalTypeId, String terminalModel){
|
||||
public SiriusTerminal(String id, String name, String serialNumber, String ercKey, String address, String address2, String terminalTypeId, String terminalModel){
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.serialNumber = serialNumber;
|
||||
@ -22,7 +22,7 @@ public class SiriusTerminal {
|
||||
}
|
||||
|
||||
//getter
|
||||
public int getId(){
|
||||
public String getId(){
|
||||
return id;
|
||||
}
|
||||
|
||||
@ -50,11 +50,11 @@ public class SiriusTerminal {
|
||||
return terminalModel;
|
||||
}
|
||||
|
||||
public int getTerminalTypeId(){
|
||||
public String getTerminalTypeId(){
|
||||
return terminalTypeId;
|
||||
}
|
||||
|
||||
public void setId(int id){
|
||||
public void setId(String id){
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ public class SiriusTerminal {
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public void setTerminalTypeId(int terminalTypeId){
|
||||
public void setTerminalTypeId(String terminalTypeId){
|
||||
this.terminalTypeId = terminalTypeId;
|
||||
}
|
||||
|
||||
|
||||
BIN
paylibs/src/main/assets/fonts/firacode.ttf
Normal file
BIN
paylibs/src/main/assets/fonts/firacode.ttf
Normal file
Binary file not shown.
BIN
paylibs/src/main/assets/fonts/firacode_bold.ttf
Normal file
BIN
paylibs/src/main/assets/fonts/firacode_bold.ttf
Normal file
Binary file not shown.
BIN
paylibs/src/main/assets/fonts/firacode_regular.ttf
Normal file
BIN
paylibs/src/main/assets/fonts/firacode_regular.ttf
Normal file
Binary file not shown.
BIN
paylibs/src/main/assets/fonts/firacode_semibold.ttf
Normal file
BIN
paylibs/src/main/assets/fonts/firacode_semibold.ttf
Normal file
Binary file not shown.
@ -84,7 +84,7 @@ public abstract class BaseXPrint {
|
||||
protected int fontSmall = 16;
|
||||
// protected FontEntity fontSmall = new FontEntity(DotMatrixFontEnum.CH_SONG_20X20, DotMatrixFontEnum.ASC_SONG_8X16);
|
||||
|
||||
protected int fontNormal = 21;
|
||||
protected int fontNormal = 20;
|
||||
|
||||
// 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);
|
||||
@ -117,13 +117,13 @@ public abstract class BaseXPrint {
|
||||
Resources resources = PayLibsUtils.getInstance().context.getResources();
|
||||
// Typeface typeface = ResourcesCompat.getFont(PayLibsUtils.getInstance().context, R.font.consolas);
|
||||
// printer.setTypeface(typeface);
|
||||
printer.setTypeface(Typeface.createFromAsset(PayLibsUtils.getInstance().context.getAssets(), "fonts/consolab.ttf"));
|
||||
printer.setTypeface(Typeface.createFromAsset(PayLibsUtils.getInstance().context.getAssets(), "fonts/firacode_regular.ttf"));
|
||||
printer.setGray(getGrayLevel());
|
||||
|
||||
}
|
||||
|
||||
private GrayLevelEnum getGrayLevel() {
|
||||
int gray = 1;
|
||||
int gray = 2;
|
||||
GrayLevelEnum grayLevelEnum = GrayLevelEnum.LEVEL_1;
|
||||
|
||||
|
||||
@ -534,7 +534,7 @@ public abstract class BaseXPrint {
|
||||
printer.appendPrnStr("GRAND 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);
|
||||
emptyLine(1);
|
||||
// emptyLine(1);
|
||||
if (settleData.getSaleCount() > 0)
|
||||
printColumnString("SALES", settleData.getSaleCount(), settleData.getSaleAmount(), 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() {
|
||||
|
||||
printer.appendPrnStr("\n", FONT_SIZE_NORMAL, AlignEnum.CENTER, false);
|
||||
// printer.appendPrnStr("\n", FONT_SIZE_NORMAL, AlignEnum.CENTER, false);
|
||||
if (bitmap.getWidth() > 384) {
|
||||
double size = 1.0 * bitmap.getHeight() * 384 / bitmap.getWidth();
|
||||
int newHeight = (int) size;
|
||||
@ -838,7 +838,6 @@ public abstract class BaseXPrint {
|
||||
}
|
||||
printer.appendImage(bitmap, AlignEnum.CENTER);
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void printMerchantHeader() {
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.utsmyanmar.paylibs.print.printx;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.os.RemoteException;
|
||||
|
||||
@ -41,7 +40,7 @@ public class PrintXImpl extends BaseXPrint implements PrintX {
|
||||
SimpleDateFormat dfm = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss", Locale.getDefault());
|
||||
currentTime = dfm.format(new Date());
|
||||
BitmapFactory.Options opts = new BitmapFactory.Options();
|
||||
bitmap = BitmapFactory.decodeResource(resources, R.drawable.print_kbz_logo_new, opts);
|
||||
bitmap = BitmapFactory.decodeResource(resources, R.drawable.print_kbz_logo_new_1, opts);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 40 KiB |
BIN
paylibs/src/main/res/drawable/print_kbz_logo_new_1.png
Normal file
BIN
paylibs/src/main/res/drawable/print_kbz_logo_new_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user