Compare commits
2 Commits
122c526cc9
...
5163ce2840
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5163ce2840 | ||
|
|
29073c0ef8 |
@ -14,8 +14,8 @@ android {
|
||||
applicationId "com.utsmm.kbz"
|
||||
minSdk 24
|
||||
targetSdk 33
|
||||
versionCode 6
|
||||
versionName "1.05"
|
||||
versionCode 7
|
||||
versionName "1.06"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
||||
@ -156,6 +156,10 @@ public class TMSSetupsImpl implements TMSSetups{
|
||||
SystemParamsOperation.getInstance().setMerchantAddress2("");
|
||||
}
|
||||
|
||||
if(siriusResponse.getAddress3() != null && siriusResponse.getAddress3().isEmpty()){
|
||||
SystemParamsOperation.getInstance().setMerchantAddress3("");
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
if(siriusMerchant != null) {
|
||||
@ -163,6 +167,7 @@ public class TMSSetupsImpl implements TMSSetups{
|
||||
SystemParamsOperation.getInstance().setMerchantName(siriusMerchant.getName());
|
||||
SystemParamsOperation.getInstance().setMerchantAddress(siriusMerchant.getAddress());
|
||||
SystemParamsOperation.getInstance().setMerchantAddress2(siriusMerchant.getAddress2());
|
||||
SystemParamsOperation.getInstance().setMerchantAddress3(siriusMerchant.getAddress3());
|
||||
SystemParamsOperation.getInstance().setMerchantPhoneNo(siriusMerchant.getMobile());
|
||||
SystemParamsOperation.getInstance().setTerminalName(siriusMerchant.getDescription());
|
||||
SystemParamsOperation.getInstance().setTerminalIdForEreceipt(siriusTerminal.getId());
|
||||
|
||||
@ -12,16 +12,19 @@ public class SiriusMerchant {
|
||||
|
||||
private String address2;
|
||||
|
||||
private String address3;
|
||||
|
||||
private String phone;
|
||||
|
||||
private String mobile;
|
||||
|
||||
public SiriusMerchant(String 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 address3,String phone,String mobile) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.address = address;
|
||||
this.address2 = address2;
|
||||
this.address3 = address3;
|
||||
this.phone = phone;
|
||||
this.mobile = mobile;
|
||||
}
|
||||
@ -42,6 +45,12 @@ public class SiriusMerchant {
|
||||
return address2;
|
||||
}
|
||||
|
||||
public String getAddress3(){ return address3; }
|
||||
|
||||
public void setAddress3(String address3){
|
||||
this.address3 = address3;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.utsmyanmar.baselib.network.model.sirius;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SiriusResponse {
|
||||
@ -12,6 +14,8 @@ public class SiriusResponse {
|
||||
|
||||
private String address2;
|
||||
|
||||
private String address3;
|
||||
|
||||
private SiriusMerchant merchant;
|
||||
|
||||
private List<SiriusHost> hosts;
|
||||
@ -20,11 +24,12 @@ public class SiriusResponse {
|
||||
|
||||
private SiriusTerminal terminal;
|
||||
|
||||
public SiriusResponse(String serial, String ecrKey,String address,String address2, SiriusMerchant merchant, List<SiriusHost> hosts, List<SiriusProperty> properties, SiriusTerminal terminal) {
|
||||
public SiriusResponse(String serial, String ecrKey,String address,String address2, SiriusMerchant merchant, List<SiriusHost> hosts, List<SiriusProperty> properties, SiriusTerminal terminal, String address3) {
|
||||
this.serial = serial;
|
||||
this.ecrKey = ecrKey;
|
||||
this.address = address;
|
||||
this.address2 = address2;
|
||||
this.address3 = address3;
|
||||
this.merchant = merchant;
|
||||
this.hosts = hosts;
|
||||
this.properties = properties;
|
||||
@ -39,6 +44,8 @@ public class SiriusResponse {
|
||||
this.address2 = address2;
|
||||
}
|
||||
|
||||
public void setAddress3(String address3) { this.address3 = address3; }
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
@ -47,6 +54,8 @@ public class SiriusResponse {
|
||||
return address2;
|
||||
}
|
||||
|
||||
public String getAddress3(){ return address3; }
|
||||
|
||||
public void setSerial(String serial) {
|
||||
this.serial = serial;
|
||||
}
|
||||
|
||||
@ -174,11 +174,13 @@ public class PrintReceipt {
|
||||
String merchantName = "";
|
||||
String merchantAddress = "";
|
||||
String merchantAddress2 = "";
|
||||
String merchantAddress3 = "";
|
||||
String merchantPhoneNo = "";
|
||||
|
||||
merchantName = SystemParamsOperation.getInstance().getMerchantName();
|
||||
merchantAddress = SystemParamsOperation.getInstance().getMerchantAddress();
|
||||
merchantAddress2 = SystemParamsOperation.getInstance().getMerchantAddress2();
|
||||
merchantAddress3 = SystemParamsOperation.getInstance().getMerchantAddress3();
|
||||
merchantPhoneNo = SystemParamsOperation.getInstance().getMerchantPhoneNo();
|
||||
|
||||
if (TextUtils.equals(merchantName, "") || merchantName == null) {
|
||||
@ -190,6 +192,9 @@ public class PrintReceipt {
|
||||
if (TextUtils.equals(merchantAddress2, "") || merchantAddress2 == null) {
|
||||
merchantAddress2 = "MERCHANT ADDRESS2";
|
||||
}
|
||||
if (TextUtils.equals(merchantAddress3, "") || merchantAddress3 == null) {
|
||||
merchantAddress3 = "MERCHANT ADDRESS3";
|
||||
}
|
||||
if (TextUtils.equals(merchantPhoneNo, "") || merchantPhoneNo == null) {
|
||||
merchantPhoneNo = "MERCHANT PHONENO";
|
||||
}
|
||||
@ -205,6 +210,7 @@ public class PrintReceipt {
|
||||
sunmiPrinterService.setFontSize(textSize, innerResultCallback);
|
||||
sunmiPrinterService.printText(merchantAddress + "\n", innerResultCallback);
|
||||
sunmiPrinterService.printText(merchantAddress2 + "\n", innerResultCallback);
|
||||
sunmiPrinterService.printText(merchantAddress3 + "\n", innerResultCallback);
|
||||
sunmiPrinterService.printText(merchantPhoneNo + "\n", innerResultCallback);
|
||||
sunmiPrinterService.lineWrap(1, innerResultCallback);
|
||||
} catch (RemoteException e) {
|
||||
|
||||
@ -879,13 +879,16 @@ public abstract class BaseXPrint {
|
||||
String merchantName = "";
|
||||
String merchantAddress = "";
|
||||
String merchantAddress2 = "";
|
||||
String merchantAddress3 = "";
|
||||
String merchantPhoneNo = "";
|
||||
String terminalName = "";
|
||||
|
||||
|
||||
merchantName = SystemParamsOperation.getInstance().getMerchantName();
|
||||
receiptHeader = SystemParamsOperation.getInstance().getReceiptHeader();
|
||||
merchantAddress = SystemParamsOperation.getInstance().getMerchantAddress();
|
||||
merchantAddress2 = SystemParamsOperation.getInstance().getMerchantAddress2();
|
||||
merchantAddress3 = SystemParamsOperation.getInstance().getMerchantAddress3();
|
||||
merchantPhoneNo = SystemParamsOperation.getInstance().getMerchantPhoneNo();
|
||||
terminalName = SystemParamsOperation.getInstance().getTerminalName();
|
||||
|
||||
@ -898,6 +901,9 @@ public abstract class BaseXPrint {
|
||||
if (TextUtils.equals(merchantAddress2, "") || merchantAddress2 == null) {
|
||||
merchantAddress2 = "MERCHANT ADDRESS2";
|
||||
}
|
||||
if (TextUtils.equals(merchantAddress3, "") || merchantAddress3 == null) {
|
||||
merchantAddress3 = "MERCHANT ADDRESS3";
|
||||
}
|
||||
// if (TextUtils.equals(merchantPhoneNo, "") || merchantPhoneNo == null) {
|
||||
// merchantPhoneNo = "MERCHANT PHONENO";
|
||||
// }
|
||||
@ -909,6 +915,7 @@ public abstract class BaseXPrint {
|
||||
printer.appendPrnStr(terminalName, fontNormal, AlignEnum.CENTER, false);
|
||||
printer.appendPrnStr(merchantAddress, fontNormal, AlignEnum.CENTER,false);
|
||||
printer.appendPrnStr(merchantAddress2, fontNormal, AlignEnum.CENTER,false);
|
||||
printer.appendPrnStr(merchantAddress3, fontNormal, AlignEnum.CENTER,false);
|
||||
// printer.appendPrnStr(merchantPhoneNo, fontNormal, AlignEnum.CENTER,false);
|
||||
// emptyLine(1);
|
||||
// dashBreak();
|
||||
|
||||
@ -989,6 +989,12 @@ public class SystemParamsOperation {
|
||||
saveSystemParamsSettings(params);
|
||||
}
|
||||
|
||||
public void setMerchantAddress3(String merchantAddress3){
|
||||
SystemParamsSettings params = getSystemParamsSettings();
|
||||
params.setMerchantAddress3(merchantAddress3);
|
||||
saveSystemParamsSettings(params);
|
||||
}
|
||||
|
||||
public void setMerchantPhoneNo(String merchantPhoneNo) {
|
||||
SystemParamsSettings params = getSystemParamsSettings();
|
||||
params.setMerchantPhoneNo(merchantPhoneNo);
|
||||
@ -1687,4 +1693,9 @@ public class SystemParamsOperation {
|
||||
SystemParamsSettings paramsSettings = getSystemParamsSettings();
|
||||
return paramsSettings.getSecHostId();
|
||||
}
|
||||
|
||||
public String getMerchantAddress3() {
|
||||
SystemParamsSettings paramsSettings = getSystemParamsSettings();
|
||||
return paramsSettings.getMerchantAddress3();
|
||||
}
|
||||
}
|
||||
@ -67,6 +67,8 @@ public class SystemParamsSettings implements Serializable {
|
||||
|
||||
private String merchantAddress2 = "";
|
||||
|
||||
private String merchantAddress3 = "";
|
||||
|
||||
private String merchantPhoneNo = "";
|
||||
|
||||
private String systemPassword = "";
|
||||
@ -862,6 +864,14 @@ public class SystemParamsSettings implements Serializable {
|
||||
this.merchantAddress2 = merchantAddress2;
|
||||
}
|
||||
|
||||
protected void setMerchantAddress3(String merchantAddress3){
|
||||
this.merchantAddress3 = merchantAddress3;
|
||||
}
|
||||
|
||||
protected String getMerchantAddress3(){
|
||||
return merchantAddress3;
|
||||
}
|
||||
|
||||
protected String getMerchantAddress2() {
|
||||
return merchantAddress2;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user