amount, date, time fixed in Void Preview
This commit is contained in:
parent
46bf866de7
commit
66c969873e
@ -11,6 +11,9 @@
|
|||||||
|
|
||||||
### version 3.4
|
### version 3.4
|
||||||
* disable display always on
|
* disable display always on
|
||||||
* auto-settlement
|
|
||||||
* show expiry date as "**/**"
|
[//]: # (* auto-settlement)
|
||||||
*
|
* show expiry date as "`**`/`**`"
|
||||||
|
* align the customer name, in paper slip
|
||||||
|
* settlement fixed in both UI and system
|
||||||
|
* amount, date, time fixed in Void Preview
|
||||||
@ -50,7 +50,6 @@ import androidx.compose.ui.draw.clip
|
|||||||
import androidx.compose.ui.draw.rotate
|
import androidx.compose.ui.draw.rotate
|
||||||
import androidx.compose.ui.graphics.vector.ImageVector
|
import androidx.compose.ui.graphics.vector.ImageVector
|
||||||
import androidx.compose.ui.layout.ContentScale
|
import androidx.compose.ui.layout.ContentScale
|
||||||
import androidx.compose.ui.res.painterResource
|
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
@ -524,26 +523,3 @@ fun Item(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val previewTransactions = listOf(
|
|
||||||
TrnxRecord(
|
|
||||||
1L, "Sale", "MMK 10,000", "**** 1234", "06/10 14:32",
|
|
||||||
isVoided = false, isApproved = true
|
|
||||||
),
|
|
||||||
TrnxRecord(
|
|
||||||
2L, "Void", "MMK 5,500", "**** 5678", "06/10 13:10",
|
|
||||||
isVoided = true, isApproved = false
|
|
||||||
),
|
|
||||||
TrnxRecord(
|
|
||||||
3L, "Refund", "MMK 2,000", "**** 9012", "06/09 09:45",
|
|
||||||
isVoided = false, isApproved = true
|
|
||||||
),
|
|
||||||
TrnxRecord(
|
|
||||||
4L, "Sale", "MMK 30,000", "**** 3456", "06/09 08:00",
|
|
||||||
isVoided = false, isApproved = true
|
|
||||||
),
|
|
||||||
TrnxRecord(
|
|
||||||
5L, "Settlement", "MMK 0", "----", "06/08 18:00",
|
|
||||||
isVoided = false, isApproved = true
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|||||||
@ -55,8 +55,6 @@ import com.mob.utsmyanmar.BuildConfig
|
|||||||
import com.mob.utsmyanmar.R
|
import com.mob.utsmyanmar.R
|
||||||
import com.mob.utsmyanmar.ui.components.appbar.AppBar
|
import com.mob.utsmyanmar.ui.components.appbar.AppBar
|
||||||
import com.mob.utsmyanmar.ui.device_info.DeviceInfoUiState
|
import com.mob.utsmyanmar.ui.device_info.DeviceInfoUiState
|
||||||
import com.mob.utsmyanmar.ui.preview.P2Preview
|
|
||||||
import com.mob.utsmyanmar.ui.preview.P3Preview
|
|
||||||
import com.mob.utsmyanmar.ui.theme.Color
|
import com.mob.utsmyanmar.ui.theme.Color
|
||||||
import com.utsmyanmar.paylibs.sign_on.EchoTestProcess
|
import com.utsmyanmar.paylibs.sign_on.EchoTestProcess
|
||||||
import com.utsmyanmar.paylibs.sign_on.SignOnListener
|
import com.utsmyanmar.paylibs.sign_on.SignOnListener
|
||||||
@ -447,11 +445,3 @@ fun DashboardScreen2(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.N)
|
|
||||||
@P3Preview
|
|
||||||
@P2Preview
|
|
||||||
@Composable
|
|
||||||
fun PreviewDashboardScreen2() {
|
|
||||||
DashboardScreen2(dashboardUiState = DashboardUiState(previewTransactions))
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package com.mob.utsmyanmar.ui.sale_void
|
package com.mob.utsmyanmar.ui.sale_void
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
@ -138,8 +137,8 @@ private fun TransactionDetailsCard(transaction: PayDetail) {
|
|||||||
DetailRow("Card No", transaction.cardNo)
|
DetailRow("Card No", transaction.cardNo)
|
||||||
DetailRow("Reference", transaction.referNo)
|
DetailRow("Reference", transaction.referNo)
|
||||||
DetailRow("Approval", transaction.approvalCode.orEmpty())
|
DetailRow("Approval", transaction.approvalCode.orEmpty())
|
||||||
DetailRow("Date", transaction.tradeDate)
|
DetailRow("Date", transaction.transDate)
|
||||||
DetailRow("Time", transaction.tradeTime)
|
DetailRow("Time", transaction.transTime)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -233,7 +233,7 @@ public abstract class BaseXPrint {
|
|||||||
sunmiPrinterService.printText("CARD NUMBER : "+ PrintUtils.getInstance().cardNumMasking(payDetail.getCardNo()) + "\n", innerResultCallback);
|
sunmiPrinterService.printText("CARD NUMBER : "+ PrintUtils.getInstance().cardNumMasking(payDetail.getCardNo()) + "\n", innerResultCallback);
|
||||||
|
|
||||||
if(!firstLineName.isEmpty()) {
|
if(!firstLineName.isEmpty()) {
|
||||||
sunmiPrinterService.printText("CARD HOLDER NAME: " + firstLineName + "\n", innerResultCallback);
|
sunmiPrinterService.printText("CARD HOLDER : " + firstLineName + "\n", innerResultCallback);
|
||||||
// sunmiPrinterService.printColumnsString(new String[]{"CARD HOLDER NAME:", firstLineName}, new int[]{2, 2}, new int[]{0, 1}, innerResultCallback);
|
// sunmiPrinterService.printColumnsString(new String[]{"CARD HOLDER NAME:", firstLineName}, new int[]{2, 2}, new int[]{0, 1}, innerResultCallback);
|
||||||
}
|
}
|
||||||
if(!secondLineName.isEmpty()) {
|
if(!secondLineName.isEmpty()) {
|
||||||
|
|||||||
@ -42,6 +42,7 @@ public class POSUtil {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public long convertAmount(String amount) {
|
public long convertAmount(String amount) {
|
||||||
long amountValue = 0;
|
long amountValue = 0;
|
||||||
if (amount != null) {
|
if (amount != null) {
|
||||||
@ -170,7 +171,11 @@ public class POSUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String formatAmount(long amount) {
|
public String formatAmount(long amount) {
|
||||||
return String.format("%012d", amount);
|
return String.format(
|
||||||
|
Locale.US,
|
||||||
|
"%,.2f",
|
||||||
|
amount / 100.0
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String responseCodeConverter(String responseCode) {
|
public String responseCodeConverter(String responseCode) {
|
||||||
@ -466,8 +471,7 @@ public class POSUtil {
|
|||||||
} else if (payDetail.getTransactionType() == TransactionsType.CASH_OUT.value) {
|
} else if (payDetail.getTransactionType() == TransactionsType.CASH_OUT.value) {
|
||||||
long totalAmount = payDetail.getAmount() + payDetail.getAdditionalAmount();
|
long totalAmount = payDetail.getAmount() + payDetail.getAdditionalAmount();
|
||||||
return "Transaction for Amount \n" + getDecimalAmountFormat(totalAmount) + " " + currencySign + " Received.";
|
return "Transaction for Amount \n" + getDecimalAmountFormat(totalAmount) + " " + currencySign + " Received.";
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return "Transaction for Amount \n" + getDecimalAmountFormat(payDetail.getAmount()) + " " + currencySign + " Received.";
|
return "Transaction for Amount \n" + getDecimalAmountFormat(payDetail.getAmount()) + " " + currencySign + " Received.";
|
||||||
}
|
}
|
||||||
} else if (TextUtils.equals(payDetail.getAccountType(), "WALLET")) {
|
} else if (TextUtils.equals(payDetail.getAccountType(), "WALLET")) {
|
||||||
@ -496,8 +500,7 @@ public class POSUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return checkResultCode(payDetail.getTradeAnswerCode());
|
return checkResultCode(payDetail.getTradeAnswerCode());
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -715,6 +718,7 @@ public class POSUtil {
|
|||||||
}
|
}
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean checkBooleanCardNo(String cardNo) {
|
public boolean checkBooleanCardNo(String cardNo) {
|
||||||
return !cardNo.equals("-");
|
return !cardNo.equals("-");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user