settlement view fixed
This commit is contained in:
parent
40fa96bb55
commit
1546e5dedc
22
TODO.md
22
TODO.md
@ -1,22 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
2. Card Host
|
|
||||||
Settlement Screen
|
|
||||||
|
|
||||||
KBZ Host MMK - 3000 (Not include in total net amount for void , preauth , preauth cancel)
|
|
||||||
Sale - 2000
|
|
||||||
Void - 1000
|
|
||||||
Preauth - 2500
|
|
||||||
Preauth cancel - 500
|
|
||||||
Preauth complete - 2000
|
|
||||||
|
|
||||||
KBZ Host USD - 3000 (Not include in total net amount for void , preauth , preauth cancel)
|
|
||||||
Sale - 2000
|
|
||||||
Void - 1000
|
|
||||||
Preauth - 2500
|
|
||||||
Preauth cancel - 500
|
|
||||||
Preauth complete - 2000
|
|
||||||
|
|
||||||
MMQR Pay - 3000 (Not include in total net amount for refund transaction and cancel transaction)
|
|
||||||
QR pay - 4000
|
|
||||||
Refund - 1000
|
|
||||||
@ -349,6 +349,12 @@ public class SettlementTransactionFragment extends DataBindingFragment implement
|
|||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
LogUtil.e("SettlementTransactionFragment", "QR: Database cursor error - " + e);
|
LogUtil.e("SettlementTransactionFragment", "QR: Database cursor error - " + e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settlementViewModel.qr_sale_count.setValue(qrSaleCount);
|
||||||
|
settlementViewModel.qr_sale_amount.setValue(qrSaleAmount);
|
||||||
|
settlementViewModel.qr_refund_count.setValue(qrRefundCount);
|
||||||
|
settlementViewModel.qr_refund_amount.setValue(qrRefundAmount);
|
||||||
|
settlementViewModel.qr_section_visibility.setValue(qrCount > 0 ? 0 : 8);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -81,6 +81,9 @@ public class SettlementViewModel extends ViewModel {
|
|||||||
public MutableLiveData<Integer> qr_sale_count = new MutableLiveData<>();
|
public MutableLiveData<Integer> qr_sale_count = new MutableLiveData<>();
|
||||||
public MutableLiveData<Long> qr_sale_amount = new MutableLiveData<>();
|
public MutableLiveData<Long> qr_sale_amount = new MutableLiveData<>();
|
||||||
public MutableLiveData<String> qr_sale_breakdown = new MutableLiveData<>();
|
public MutableLiveData<String> qr_sale_breakdown = new MutableLiveData<>();
|
||||||
|
public MutableLiveData<Integer> qr_refund_count = new MutableLiveData<>();
|
||||||
|
public MutableLiveData<Long> qr_refund_amount = new MutableLiveData<>();
|
||||||
|
public MutableLiveData<Integer> qr_section_visibility = new MutableLiveData<>(8);
|
||||||
|
|
||||||
public MutableLiveData<Integer> void_count = new MutableLiveData<>();
|
public MutableLiveData<Integer> void_count = new MutableLiveData<>();
|
||||||
public MutableLiveData<Long> void_amount = new MutableLiveData<>();
|
public MutableLiveData<Long> void_amount = new MutableLiveData<>();
|
||||||
@ -163,6 +166,11 @@ public class SettlementViewModel extends ViewModel {
|
|||||||
sale_count.setValue(0);
|
sale_count.setValue(0);
|
||||||
sale_amount.setValue(0L);
|
sale_amount.setValue(0L);
|
||||||
sale_breakdown.setValue("");
|
sale_breakdown.setValue("");
|
||||||
|
qr_sale_count.setValue(0);
|
||||||
|
qr_sale_amount.setValue(0L);
|
||||||
|
qr_sale_breakdown.setValue("");
|
||||||
|
qr_refund_count.setValue(0);
|
||||||
|
qr_refund_amount.setValue(0L);
|
||||||
void_count.setValue(0);
|
void_count.setValue(0);
|
||||||
void_amount.setValue(0L);
|
void_amount.setValue(0L);
|
||||||
void_breakdown.setValue("");
|
void_breakdown.setValue("");
|
||||||
|
|||||||
@ -312,6 +312,40 @@
|
|||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="@{settleViewModel.mmk_section_visibility}">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:fontFamily="@font/rubik_regular"
|
||||||
|
android:text="GRAND TOTAL"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:fontFamily="@font/rubik_regular"
|
||||||
|
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.mmk_sale_amount + settleViewModel.mmk_pre_amount - settleViewModel.mmk_void_amount)}"
|
||||||
|
tools:text="5,000.00"
|
||||||
|
android:textAlignment="textEnd"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
@ -563,6 +597,42 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- USD Grand Total -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="@{settleViewModel.usd_section_visibility}">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:fontFamily="@font/rubik_regular"
|
||||||
|
android:text="GRAND TOTAL"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:fontFamily="@font/rubik_regular"
|
||||||
|
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.usd_sale_amount + settleViewModel.usd_pre_amount - settleViewModel.usd_void_amount)}"
|
||||||
|
tools:text="5,000.00"
|
||||||
|
android:textAlignment="textEnd"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -570,6 +640,157 @@
|
|||||||
android:background="@color/colorLightGray"
|
android:background="@color/colorLightGray"
|
||||||
android:visibility="@{settleViewModel.usd_section_visibility}"/>
|
android:visibility="@{settleViewModel.usd_section_visibility}"/>
|
||||||
|
|
||||||
|
<!-- QR Section Header -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="@{settleViewModel.qr_section_visibility}">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:text="QR (MMK)"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- QR Sale -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="@{settleViewModel.qr_section_visibility}">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:fontFamily="@font/rubik_regular"
|
||||||
|
android:text="@string/txt_subtitle_sale"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:fontFamily="@font/rubik_regular"
|
||||||
|
android:text="@={settleViewModel.qr_sale_count+``}"
|
||||||
|
tools:text="2"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:fontFamily="@font/rubik_regular"
|
||||||
|
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.qr_sale_amount)}"
|
||||||
|
tools:text="10,000.00"
|
||||||
|
android:textAlignment="textEnd"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- QR Refund -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="@{settleViewModel.qr_section_visibility}">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:fontFamily="@font/rubik_regular"
|
||||||
|
android:text="@string/txt_subtitle_refund"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:fontFamily="@font/rubik_regular"
|
||||||
|
android:text="@={settleViewModel.qr_refund_count+``}"
|
||||||
|
tools:text="1"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:fontFamily="@font/rubik_regular"
|
||||||
|
android:text="@{`- ` + POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.qr_refund_amount)}"
|
||||||
|
tools:text="- 500.00"
|
||||||
|
android:textAlignment="textEnd"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- QR Grand Total -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="@{settleViewModel.qr_section_visibility}">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:fontFamily="@font/rubik_regular"
|
||||||
|
android:text="GRAND TOTAL"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:fontFamily="@font/rubik_regular"
|
||||||
|
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.qr_sale_amount - settleViewModel.qr_refund_amount)}"
|
||||||
|
tools:text="9,500.00"
|
||||||
|
android:textAlignment="textEnd"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/colorLightGray"
|
||||||
|
android:visibility="@{settleViewModel.qr_section_visibility}"/>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:gravity="bottom"
|
android:gravity="bottom"
|
||||||
|
|||||||
@ -111,7 +111,7 @@
|
|||||||
<string name="text_exp">EXP</string>
|
<string name="text_exp">EXP</string>
|
||||||
<string name="text_echo_test">ECHO test</string>
|
<string name="text_echo_test">ECHO test</string>
|
||||||
<string name="text_cash_deposit">Cash Deposit</string>
|
<string name="text_cash_deposit">Cash Deposit</string>
|
||||||
<string name="text_cash_advance">Cash Out</string>
|
<string name="text_cash_advance">Cash Adv</string>
|
||||||
<string name="text_test_process">Test Process</string>
|
<string name="text_test_process">Test Process</string>
|
||||||
<string name="text_sale">Sale</string>
|
<string name="text_sale">Sale</string>
|
||||||
<string name="text_pre_auth_complete">PreAuthComplete</string>
|
<string name="text_pre_auth_complete">PreAuthComplete</string>
|
||||||
@ -251,12 +251,12 @@
|
|||||||
<string name="txt_empty_trace_no">Trace No is Empty!</string>
|
<string name="txt_empty_trace_no">Trace No is Empty!</string>
|
||||||
<string name="txt_trace_no_not_found">Trace No not found!</string>
|
<string name="txt_trace_no_not_found">Trace No not found!</string>
|
||||||
<string name="txt_please_enter_approval">Please enter approval code!</string>
|
<string name="txt_please_enter_approval">Please enter approval code!</string>
|
||||||
<string name="txt_title_credit_type">Credit Type</string>
|
<string name="txt_title_credit_type">TXN Type</string>
|
||||||
<string name="txt_title_count">Count</string>
|
<string name="txt_title_count">CNT</string>
|
||||||
<string name="txt_title_totals">Totals</string>
|
<string name="txt_title_totals">AMOUNT</string>
|
||||||
<string name="txt_subtitle_sale">Sale</string>
|
<string name="txt_subtitle_sale">Sale</string>
|
||||||
<string name="txt_subtitle_void">Void</string>
|
<string name="txt_subtitle_void">Void</string>
|
||||||
<string name="txt_subtitle_sale_completion">Sale Completion</string>
|
<string name="txt_subtitle_sale_completion">Pre-Auth Comp</string>
|
||||||
<string name="txt_subtitle_refund">Refund</string>
|
<string name="txt_subtitle_refund">Refund</string>
|
||||||
<string name="txt_subtitle_amount">Amount</string>
|
<string name="txt_subtitle_amount">Amount</string>
|
||||||
<string name="txt_subtitle_tip_amount">Tips Amount</string>
|
<string name="txt_subtitle_tip_amount">Tips Amount</string>
|
||||||
|
|||||||
@ -332,13 +332,13 @@ public abstract class BaseXPrint {
|
|||||||
|
|
||||||
dotBreak();
|
dotBreak();
|
||||||
// printer.appendPrnStr("Refund Total:MMK", "- " + PrintUtils.getInstance().getSeparatorOnlyNumberFormat(refundTotal) + " ", fontNormal, false);
|
// printer.appendPrnStr("Refund Total:MMK", "- " + PrintUtils.getInstance().getSeparatorOnlyNumberFormat(refundTotal) + " ", fontNormal, false);
|
||||||
print2ColumnsString("Refund Total:MMK", "-" + PrintUtils.getInstance().getSeparatorOnlyNumberFormat(refundTotal));
|
print2ColumnsString("Refund Total:", "-" + PrintUtils.getInstance().getSeparatorOnlyNumberFormat(refundTotal) + "MMK");
|
||||||
dotBreak();
|
dotBreak();
|
||||||
// printer.appendPrnStr("Sale Total :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(saleTotal) + " ", fontNormal, false);
|
// printer.appendPrnStr("Sale Total :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(saleTotal) + " ", fontNormal, false);
|
||||||
print2ColumnsString("SALE TOTAL :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(saleTotal));
|
print2ColumnsString("SALE TOTAL :", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(saleTotal) + "MMK");
|
||||||
dotBreak();
|
dotBreak();
|
||||||
// printer.appendPrnStr("Total :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(grandTotal) + " ", fontNormal, false);
|
// printer.appendPrnStr("Total :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(grandTotal) + " ", fontNormal, false);
|
||||||
print2ColumnsString("TOTAL : MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(grandTotal));
|
print2ColumnsString("GRAND TOTAL :", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(grandTotal) + "MMK");
|
||||||
dashBreakEnding();
|
dashBreakEnding();
|
||||||
emptyLine(1);
|
emptyLine(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user