cash out to cash adv
This commit is contained in:
parent
752693c8f3
commit
8223b4877f
@ -10,10 +10,12 @@
|
||||
* receipt printing animation re-scale
|
||||
|
||||
### version 3.4
|
||||
* disable display always on
|
||||
* enabled screen sleep
|
||||
* 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
|
||||
* show reversal status in trans records
|
||||
* show reversal status in trans records
|
||||
* error_slip_print enable/disable in tms
|
||||
* auto_settlement enable/disable in tms
|
||||
@ -10,7 +10,7 @@ import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation
|
||||
import java.util.Calendar
|
||||
|
||||
object SettlementScheduler {
|
||||
private const val FALLBACK_ALERT_TIME = "01:10:00"
|
||||
private const val FALLBACK_ALERT_TIME = "23:30:00"
|
||||
|
||||
fun schedule(context: Context): Boolean {
|
||||
if (!SystemParamsOperation.getInstance().isAutoSettlement()) {
|
||||
@ -29,7 +29,7 @@ object SettlementScheduler {
|
||||
|
||||
val configuredTime = parseTime(
|
||||
// SystemParamsOperation.getInstance().clearBatchTime
|
||||
"23:05:00"
|
||||
"10:50:00"
|
||||
) ?: parseTime(FALLBACK_ALERT_TIME)!!
|
||||
|
||||
val calendar = Calendar.getInstance().apply {
|
||||
|
||||
@ -152,6 +152,7 @@ private fun PayDetail.isSaleTransaction(): Boolean {
|
||||
}
|
||||
|
||||
private fun formatTypeLabel(raw: String): String = when {
|
||||
raw.equals("CASH_OUT", ignoreCase = true) -> "CASH_ADV"
|
||||
raw.contains("SALE", ignoreCase = true) -> "Sale"
|
||||
raw.contains("VOID", ignoreCase = true) -> "Void"
|
||||
raw.contains("REFUND", ignoreCase = true) -> "Refund"
|
||||
|
||||
@ -34,7 +34,9 @@ internal fun displayTransactionStatus(payDetail: PayDetail): String {
|
||||
}
|
||||
|
||||
internal fun displayTransactionTitle(payDetail: PayDetail): String {
|
||||
val title = payDetail.transType.ifBlank { "TRANSACTION" }
|
||||
val title = payDetail.transType
|
||||
.ifBlank { "TRANSACTION" }
|
||||
.replace("CASH_OUT", "CASH_ADV", ignoreCase = true)
|
||||
return if (payDetail.transactionType == TransactionsType.REVERSAL.value) {
|
||||
"$title (REVERSAL)"
|
||||
} else {
|
||||
|
||||
@ -171,7 +171,9 @@ private fun SettlementRecordRow(record: PayDetail) {
|
||||
horizontalArrangement = Arrangement.SpaceBetween
|
||||
) {
|
||||
Text(
|
||||
text = record.transType.ifBlank { "UNKNOWN" },
|
||||
text = record.transType
|
||||
.ifBlank { "UNKNOWN" }
|
||||
.replace("CASH_OUT", "CASH_ADV", ignoreCase = true),
|
||||
color = Color.LegacyRed,
|
||||
style = MaterialTheme.typography.titleSmall
|
||||
)
|
||||
|
||||
@ -516,7 +516,7 @@ public abstract class BaseXPrint {
|
||||
if(settleData.getVoidSaleCount() > 0)
|
||||
sunmiPrinterService.printColumnsString(new String[]{"VOID SALES", countStringFormat(settleData.getVoidSaleCount()),MMK, "-" + PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getVoidSaleAmount())}, new int[]{3, 1,1, 2}, new int[]{0, 1,1, 2}, innerResultCallback);
|
||||
if(settleData.getCashAdvanceCount() > 0)
|
||||
sunmiPrinterService.printColumnsString(new String[]{"CASH OUT", countStringFormat(settleData.getCashAdvanceCount()),MMK, PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getCashAdvanceAmount())}, new int[]{3, 1,1, 2}, new int[]{0, 1,1, 2}, innerResultCallback);
|
||||
sunmiPrinterService.printColumnsString(new String[]{"CASH ADV", countStringFormat(settleData.getCashAdvanceCount()),MMK, PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getCashAdvanceAmount())}, new int[]{3, 1,1, 2}, new int[]{0, 1,1, 2}, innerResultCallback);
|
||||
if(settleData.getPreAuthCount() > 0)
|
||||
sunmiPrinterService.printColumnsString(new String[]{"PRE AUTH", countStringFormat(settleData.getPreAuthCount()),MMK, PrintUtils.getInstance().getSeparatorNumberFormat(settleData.getPreAuthAmount())}, new int[]{3, 1,1, 2}, new int[]{0, 1,1, 2}, innerResultCallback);
|
||||
if(settleData.getPreAuthVoidCount() > 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user