Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
Your Cashier
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ahmad Abi Mulya
Your Cashier
Commits
3c39f42f
Commit
3c39f42f
authored
Aug 28, 2020
by
Trio Saputra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new updated
parent
2dd2b703
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
PaymentActivity.java
...m/example/yourcashiertest/activities/PaymentActivity.java
+9
-4
No files found.
app/src/main/java/com/example/yourcashiertest/activities/PaymentActivity.java
View file @
3c39f42f
...
@@ -73,10 +73,15 @@ public class PaymentActivity extends AppCompatActivity {
...
@@ -73,10 +73,15 @@ public class PaymentActivity extends AppCompatActivity {
ViewUtil
.
showMessage
(
view
,
"Please choose type payment"
);
ViewUtil
.
showMessage
(
view
,
"Please choose type payment"
);
}
else
{
}
else
{
int
amountPaid
=
Integer
.
parseInt
(
binding
.
etAmountPaid
.
getText
().
toString
());
int
amountPaid
=
Integer
.
parseInt
(
binding
.
etAmountPaid
.
getText
().
toString
());
refund
=
amountPaid
-
amount
;
if
(
amountPaid
<
amount
)
{
startActivity
(
new
Intent
(
PaymentActivity
.
this
,
StatusPayment
.
class
).
putExtra
(
REFUND
,
refund
).
putExtra
(
PAY_WITH
,
payment
));
ViewUtil
.
showMessage
(
view
,
"AmountPaid doesn't less than total price"
);
cartViewModel
.
clear
();
}
else
{
finish
();
refund
=
amountPaid
-
amount
;
startActivity
(
new
Intent
(
PaymentActivity
.
this
,
StatusPayment
.
class
).
putExtra
(
REFUND
,
refund
).
putExtra
(
PAY_WITH
,
payment
));
cartViewModel
.
clear
();
finish
();
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment