Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
B
Byodv2
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
Dio Maulana
Byodv2
Commits
babf7522
Commit
babf7522
authored
Sep 26, 2022
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
payment balance
parent
603e48d1
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
511 additions
and
198 deletions
+511
-198
helper.dart
lib/helper/helper.dart
+3
-1
button_dialog.dart
lib/helper/widget/button_dialog.dart
+2
-2
button_modal.dart
lib/helper/widget/button_modal.dart
+12
-6
app_bar.dart
lib/ui/history_order/app_bar.dart
+3
-1
fav_grid_menu.dart
lib/ui/home/fav_grid_menu.dart
+34
-20
menu_list_utama.dart
lib/ui/home/menu_list_utama.dart
+35
-20
function.dart
lib/ui/payment/function.dart
+8
-0
payment.dart
lib/ui/payment/payment.dart
+6
-5
payment_balance.dart
lib/ui/payment/payment_balance.dart
+266
-0
payment_voucher.dart
lib/ui/payment/payment_voucher.dart
+35
-27
view_bill_new.dart
lib/ui/viewbill/view_bill_new.dart
+107
-116
No files found.
lib/helper/helper.dart
View file @
babf7522
...
@@ -266,7 +266,8 @@ const Color backgroundColor = Color(0xffF4F4F4);
...
@@ -266,7 +266,8 @@ const Color backgroundColor = Color(0xffF4F4F4);
const
Color
backgroundColorViewBill
=
Color
(
0xffE5E5E5
);
const
Color
backgroundColorViewBill
=
Color
(
0xffE5E5E5
);
const
Color
backgroundWhite
=
Color
(
0xffFFFFFF
);
const
Color
backgroundWhite
=
Color
(
0xffFFFFFF
);
const
Color
dividerGrey
=
Color
(
0xff898A8D
);
const
Color
dividerGrey
=
Color
(
0xff898A8D
);
const
Color
dividerGrey2
=
Color
(
0xffF2F2F2
);
const
Color
dividerGrey2
=
Color
(
0xffCCCCCC
);
const
Color
greyBalancePayment
=
Color
(
0xffF2F2F2
);
const
Color
greyColor
=
Color
(
0xffD9D9D9
);
const
Color
greyColor
=
Color
(
0xffD9D9D9
);
const
textColorTabel
=
Color
(
0xff333333
);
const
textColorTabel
=
Color
(
0xff333333
);
const
textColorBlack
=
Color
(
0xff000000
);
const
textColorBlack
=
Color
(
0xff000000
);
...
@@ -400,6 +401,7 @@ const double textScaleFactor = 1.0;
...
@@ -400,6 +401,7 @@ const double textScaleFactor = 1.0;
//** Rounded Value */
//** Rounded Value */
double
roundedButton
=
10
;
double
roundedButton
=
10
;
double
roundedButtonComponent
=
40
;
double
roundedSmallButton
=
5
;
double
roundedSmallButton
=
5
;
double
roundedImage
=
20
;
double
roundedImage
=
20
;
double
roundedDetailPayment
=
10
;
double
roundedDetailPayment
=
10
;
...
...
lib/helper/widget/button_dialog.dart
View file @
babf7522
...
@@ -45,7 +45,7 @@ Future<dynamic> buttonDialogGlobal(
...
@@ -45,7 +45,7 @@ Future<dynamic> buttonDialogGlobal(
onTap:
()
{
onTap:
()
{
ontapOk
();
ontapOk
();
},
},
child:
Button
Modal
(
child:
Button
Component
(
buttonColor:
okButtonColor
,
buttonColor:
okButtonColor
,
teksButton:
textOnOk
,
teksButton:
textOnOk
,
),
),
...
@@ -55,7 +55,7 @@ Future<dynamic> buttonDialogGlobal(
...
@@ -55,7 +55,7 @@ Future<dynamic> buttonDialogGlobal(
onTap:
()
{
onTap:
()
{
ontapCancel
();
ontapCancel
();
},
},
child:
Button
Modal
(
child:
Button
Component
(
buttonColor:
Colors
.
transparent
,
buttonColor:
Colors
.
transparent
,
teksButton:
textOnCancel
,
teksButton:
textOnCancel
,
teksButtonColor:
textColorBlack
,
teksButtonColor:
textColorBlack
,
...
...
lib/helper/widget/button_modal.dart
View file @
babf7522
...
@@ -3,25 +3,31 @@ import 'package:flutter/material.dart';
...
@@ -3,25 +3,31 @@ import 'package:flutter/material.dart';
import
'style.dart'
;
import
'style.dart'
;
class
Button
Modal
extends
StatelessWidget
{
class
Button
Component
extends
StatelessWidget
{
const
Button
Modal
({
const
Button
Component
({
Key
?
key
,
Key
?
key
,
required
this
.
buttonColor
,
required
this
.
buttonColor
,
required
this
.
teksButton
,
required
this
.
teksButton
,
this
.
teksButtonColor
=
textInButton
,
this
.
teksButtonColor
=
textInButton
,
this
.
height
=
43
,
this
.
width
=
double
.
infinity
,
this
.
fontTeksSize
=
14
,
})
:
super
(
key:
key
);
})
:
super
(
key:
key
);
final
Color
buttonColor
;
final
Color
buttonColor
;
final
String
teksButton
;
final
String
teksButton
;
final
Color
teksButtonColor
;
final
Color
teksButtonColor
;
final
double
height
;
final
double
width
;
final
double
fontTeksSize
;
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Container
(
return
Container
(
width:
double
.
infinity
,
width:
width
,
height:
43
,
height:
height
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
roundedButtonComponent
),
color:
buttonColor
,
color:
buttonColor
,
),
),
child:
Center
(
child:
Center
(
...
@@ -29,7 +35,7 @@ class ButtonModal extends StatelessWidget {
...
@@ -29,7 +35,7 @@ class ButtonModal extends StatelessWidget {
context
,
context
,
teksButton
,
teksButton
,
style:
addButton
(
style:
addButton
(
font:
14
,
font:
fontTeksSize
,
color:
teksButtonColor
,
color:
teksButtonColor
,
),
),
),
),
...
...
lib/ui/history_order/app_bar.dart
View file @
babf7522
// ignore_for_file: sized_box_for_whitespace
// ignore_for_file: sized_box_for_whitespace
import
'package:byod/ui/viewbill/view_bill_new.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'../../bloc/search_history.dart'
;
import
'../../bloc/search_history.dart'
;
...
@@ -28,7 +29,8 @@ class CustomAppBar extends StatelessWidget {
...
@@ -28,7 +29,8 @@ class CustomAppBar extends StatelessWidget {
children:
[
children:
[
GestureDetector
(
GestureDetector
(
onTap:
()
{
onTap:
()
{
Navigator
.
pop
(
context
);
Navigator
.
pushReplacement
(
context
,
MaterialPageRoute
(
builder:
(
_
)
=>
const
ViewBillNew
()));
},
},
child:
Container
(
child:
Container
(
width:
24
,
width:
24
,
...
...
lib/ui/home/fav_grid_menu.dart
View file @
babf7522
// ignore_for_file: sized_box_for_whitespace, avoid_unnecessary_containers
// ignore_for_file: sized_box_for_whitespace, avoid_unnecessary_containers
import
'package:byod/helper/widget/button_modal.dart'
;
import
'package:byod/helper/widget/plus_minus_button.dart'
;
import
'package:byod/helper/widget/plus_minus_button.dart'
;
import
'package:byod/models/orders.dart'
;
import
'package:byod/models/orders.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -339,17 +340,31 @@ class FavGridMenu extends StatelessWidget {
...
@@ -339,17 +340,31 @@ class FavGridMenu extends StatelessWidget {
}
}
}
}
},
},
child:
Container
(
// child: Container(
height:
30
,
// height: 30,
width:
widthGrid
-
(
2
*
paddingLeftRigthGrid
),
// width: widthGrid - (2 * paddingLeftRigthGrid),
decoration:
BoxDecoration
(
// decoration: BoxDecoration(
borderRadius:
BorderRadius
.
circular
(
6
),
// borderRadius: BorderRadius.circular(6),
color:
(
menuFav
.
isSell
)
?
buttonColor
:
Colors
.
grey
,
// color: (menuFav.isSell) ? buttonColor : Colors.grey,
),
// ),
child:
Center
(
// child: Center(
child:
defaultText
(
// child: defaultText(
context
,
// context,
(
menuFav
.
isSell
==
false
)
// (menuFav.isSell == false)
// ? 'Habis'
// : (initialValue == 0)
// ? 'Tambah'
// : (initialValue > 0 &&
// menuFav.variantCat.isNotEmpty)
// ? variantButtonCount
// : 'Tambah',
// style: addButtonGridFav(),
// ),
// ),
// ),
child:
ButtonComponent
(
buttonColor:
buttonColor
,
teksButton:
(
menuFav
.
isSell
==
false
)
?
'Habis'
?
'Habis'
:
(
initialValue
==
0
)
:
(
initialValue
==
0
)
?
'Tambah'
?
'Tambah'
...
@@ -357,9 +372,8 @@ class FavGridMenu extends StatelessWidget {
...
@@ -357,9 +372,8 @@ class FavGridMenu extends StatelessWidget {
menuFav
.
variantCat
.
isNotEmpty
)
menuFav
.
variantCat
.
isNotEmpty
)
?
variantButtonCount
?
variantButtonCount
:
'Tambah'
,
:
'Tambah'
,
style:
addButtonGridFav
(),
height:
30
,
),
fontTeksSize:
12
,
),
),
),
)
)
:
Container
(
:
Container
(
...
...
lib/ui/home/menu_list_utama.dart
View file @
babf7522
// ignore_for_file: sized_box_for_whitespace
// ignore_for_file: sized_box_for_whitespace
import
'package:byod/bloc/order_bloc.dart'
;
import
'package:byod/bloc/order_bloc.dart'
;
import
'package:byod/helper/widget/button_modal.dart'
;
import
'package:byod/helper/widget/plus_minus_button.dart'
;
import
'package:byod/helper/widget/plus_minus_button.dart'
;
import
'package:byod/models/orders.dart'
;
import
'package:byod/models/orders.dart'
;
import
'package:byod/ui/home/variant_cat.dart'
;
import
'package:byod/ui/home/variant_cat.dart'
;
...
@@ -362,17 +363,31 @@ class MenuListUtama extends StatelessWidget {
...
@@ -362,17 +363,31 @@ class MenuListUtama extends StatelessWidget {
}
}
}
}
},
},
child:
Container
(
// child: Container(
decoration:
BoxDecoration
(
// decoration: BoxDecoration(
borderRadius:
BorderRadius
.
circular
(
10
),
// borderRadius: BorderRadius.circular(10),
color:
buttonColor
,
// color: buttonColor,
),
// ),
height:
double
.
infinity
,
// height: double.infinity,
width:
125
,
// width: 125,
child:
Center
(
// child: Center(
child:
defaultText
(
// child: defaultText(
context
,
// context,
(
menuUtama
.
isSell
==
false
)
// (menuUtama.isSell == false)
// ? 'Habis'
// : (initialValue == 0)
// ? 'Tambah'
// : (initialValue > 0 &&
// menuUtama.variantCat.isNotEmpty)
// ? variantButtonCount
// : 'Tambah',
// style: addButton(),
// ),
// ),
// ),
child:
ButtonComponent
(
buttonColor:
buttonColor
,
teksButton:
(
menuUtama
.
isSell
==
false
)
?
'Habis'
?
'Habis'
:
(
initialValue
==
0
)
:
(
initialValue
==
0
)
?
'Tambah'
?
'Tambah'
...
@@ -380,9 +395,9 @@ class MenuListUtama extends StatelessWidget {
...
@@ -380,9 +395,9 @@ class MenuListUtama extends StatelessWidget {
menuUtama
.
variantCat
.
isNotEmpty
)
menuUtama
.
variantCat
.
isNotEmpty
)
?
variantButtonCount
?
variantButtonCount
:
'Tambah'
,
:
'Tambah'
,
style:
addButton
()
,
fontTeksSize:
12
,
)
,
height:
36
,
)
,
width:
125
,
),
),
)
)
],
],
...
...
lib/ui/payment/function.dart
View file @
babf7522
import
'package:flutter/cupertino.dart'
;
import
'../../api/api.dart'
;
import
'../../api/api.dart'
;
void
addPayment
(
void
addPayment
(
...
@@ -14,3 +16,9 @@ void addPayment(
...
@@ -14,3 +16,9 @@ void addPayment(
Api
.
addPayment
(
context
,
orderId
,
branchCode
,
brandCode
,
customerName
,
method
,
Api
.
addPayment
(
context
,
orderId
,
branchCode
,
brandCode
,
customerName
,
method
,
paymentType
,
codeVoucher
,
amount
);
paymentType
,
codeVoucher
,
amount
);
}
}
void
addPaymentBalance
(
BuildContext
context
,
String
orderId
,
String
branchCode
,
String
brandCode
,
String
customerName
,
int
amout
)
{
Api
.
addPaymentBalance
(
context
,
orderId
,
branchCode
,
brandCode
,
customerName
,
amout
);
}
lib/ui/payment/payment.dart
View file @
babf7522
...
@@ -370,7 +370,8 @@ class _PaymentState extends State<Payment> {
...
@@ -370,7 +370,8 @@ class _PaymentState extends State<Payment> {
branchCode
,
branchCode
,
brandCode
,
brandCode
,
customerName
,
customerName
,
widget
.
outstandingIndividu
);
widget
.
outstandingIndividu
,
);
}
else
{
}
else
{
addPayment
(
addPayment
(
context
,
context
,
...
...
lib/ui/payment/payment_balance.dart
0 → 100644
View file @
babf7522
// ignore_for_file: sized_box_for_whitespace
import
'dart:math'
;
import
'package:byod/helper/widget/button_modal.dart'
;
import
'package:byod/ui/payment/function.dart'
;
import
'package:flutter/material.dart'
;
import
'../../helper/helper.dart'
;
import
'../../helper/widget/style.dart'
;
import
'../../main.dart'
;
import
'../screen_responsive.dart'
;
import
'../viewbill/view_bill_new.dart'
;
class
PaymentBalance
extends
StatelessWidget
{
const
PaymentBalance
({
super
.
key
,
required
this
.
balanceMember
,
required
this
.
outStanding
,
required
this
.
orderId
,
});
final
int
balanceMember
;
final
int
outStanding
;
final
String
orderId
;
@override
Widget
build
(
BuildContext
context
)
{
double
currentScreen
=
MediaQuery
.
of
(
context
).
size
.
width
;
return
SafeArea
(
child:
Scaffold
(
backgroundColor:
backgroundColor
,
body:
ScreenResponsive
(
widget:
CorePaymentBalance
(
outStanding:
outStanding
,
balanceMember:
balanceMember
,
orderId:
orderId
,
),
isCoreLayout:
true
,
widthScreen:
currentScreen
,
),
),
);
}
}
class
CorePaymentBalance
extends
StatelessWidget
{
const
CorePaymentBalance
({
super
.
key
,
required
this
.
balanceMember
,
required
this
.
outStanding
,
required
this
.
orderId
,
});
final
int
balanceMember
;
final
int
outStanding
;
final
String
orderId
;
@override
Widget
build
(
BuildContext
context
)
{
int
outStandingTopayMember
=
min
(
outStanding
,
balanceMember
);
double
widthScreen
=
responsiveWidthScreen
(
context
);
String
branchCode
=
prefs
.
getString
(
"outlet"
)
??
''
;
String
brandCode
=
prefs
.
getString
(
"brand"
)
??
''
;
String
customerName
=
prefs
.
getString
(
"userName"
)
??
''
;
return
Container
(
width:
widthScreen
,
child:
Stack
(
children:
[
Column
(
children:
[
const
CustomAppBarBalance
(),
const
SizedBox
(
height:
24
,
),
Container
(
width:
widthScreen
,
color:
backgroundWhite
,
padding:
const
EdgeInsets
.
only
(
left:
paddingLeftRight
,
right:
paddingLeftRight
,
top:
16
,
),
child:
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
16
,
vertical:
20
),
decoration:
BoxDecoration
(
color:
greyBalancePayment
,
borderRadius:
BorderRadius
.
circular
(
13
),
),
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
defaultText
(
context
,
'Total Tagihan'
,
style:
rincianPembayaran
(
font:
14
,
)),
defaultText
(
context
,
"Rp
${formatNumber().format(outStanding)}
"
,
style:
rincianPembayaran
(
font:
14
,
),
)
],
),
const
SizedBox
(
height:
10
,
),
const
Divider
(
thickness:
1
,
color:
dividerGrey2
,
),
const
SizedBox
(
height:
10
,
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
defaultText
(
context
,
'Excelso Balance'
,
style:
rincianPembayaran
(
font:
14
,
),
),
defaultText
(
context
,
"Rp
${formatNumber().format(balanceMember)}
"
,
style:
rincianPembayaran
(
font:
14
,
))
],
),
const
SizedBox
(
height:
10
,
),
const
Divider
(
thickness:
1
,
color:
dividerGrey2
,
),
const
SizedBox
(
height:
10
,
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
defaultText
(
context
,
'Nilai Bayar'
,
style:
rincianPembayaran
(
font:
14
,
),
),
defaultText
(
context
,
"Rp
${formatNumber().format(outStandingTopayMember)}
"
,
style:
rincianPembayaran
(
font:
14
,
),
)
],
),
],
),
),
),
Expanded
(
child:
Container
(
width:
widthScreen
,
color:
backgroundWhite
,
),
)
],
),
Positioned
(
bottom:
0
,
child:
Container
(
width:
widthScreen
,
height:
83
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
color:
backgroundWhite
,
boxShadow:
const
[
BoxShadow
(
color:
Colors
.
grey
,
blurRadius:
5.0
,
)
],
),
padding:
const
EdgeInsets
.
all
(
20
),
child:
GestureDetector
(
onTap:
()
{
addPaymentBalance
(
context
,
orderId
,
branchCode
,
brandCode
,
customerName
,
outStandingTopayMember
);
},
child:
ButtonComponent
(
buttonColor:
buttonColor
,
teksButton:
'Bayar'
,
),
),
),
)
],
),
);
}
}
class
CustomAppBarBalance
extends
StatelessWidget
{
const
CustomAppBarBalance
({
Key
?
key
,
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
return
Container
(
padding:
const
EdgeInsets
.
only
(
top:
15
,
bottom:
22
,
left:
paddingLeftRight
,
right:
paddingLeftRight
,
),
// padding: const EdgeInsets.symmetric(horizontal: paddingLeftRight),
color:
backgroundWhite
,
child:
Column
(
children:
[
Row
(
// mainAxisAlignment: MainAxisAlignment.start,
children:
[
GestureDetector
(
onTap:
()
{
Navigator
.
pushReplacement
(
context
,
MaterialPageRoute
(
builder:
(
_
)
=>
const
ViewBillNew
()),
);
},
child:
Container
(
width:
24
,
height:
24
,
child:
Center
(
child:
fontAwesomeNew
(
arrowBack
,
arrowBackSize
,
),
),
),
),
const
SizedBox
(
width:
16
,
),
Center
(
child:
defaultText
(
context
,
'Excelso Member'
,
maxLines:
1
,
overFlow:
TextOverflow
.
ellipsis
,
style:
appBarNameViewBill
(),
),
),
],
),
],
),
);
}
}
lib/ui/payment/payment_voucher.dart
View file @
babf7522
...
@@ -39,7 +39,8 @@ class PaymentVoucher extends StatelessWidget {
...
@@ -39,7 +39,8 @@ class PaymentVoucher extends StatelessWidget {
isCoreLayout:
true
,
isCoreLayout:
true
,
widthScreen:
currentScreen
,
widthScreen:
currentScreen
,
),
),
));
),
);
}
}
}
}
...
@@ -170,7 +171,7 @@ class CorePaymentVoucher extends StatelessWidget {
...
@@ -170,7 +171,7 @@ class CorePaymentVoucher extends StatelessWidget {
color:
backgroundWhite
,
color:
backgroundWhite
,
padding:
const
EdgeInsets
.
symmetric
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
paddingLeftRight
,
vertical:
16
),
horizontal:
paddingLeftRight
,
vertical:
16
),
child:
Button
Modal
(
child:
Button
Component
(
buttonColor:
buttonColor:
(
listVoucher
.
isNotEmpty
&&
listVoucher
[
0
]
!=
'0'
)
(
listVoucher
.
isNotEmpty
&&
listVoucher
[
0
]
!=
'0'
)
?
buttonColor
?
buttonColor
...
@@ -219,7 +220,11 @@ class ListVoucherView extends StatelessWidget {
...
@@ -219,7 +220,11 @@ class ListVoucherView extends StatelessWidget {
?
selectedColorVoucher
?
selectedColorVoucher
:
backgroundWhite
,
:
backgroundWhite
,
),
),
padding:
const
EdgeInsets
.
all
(
16
),
padding:
const
EdgeInsets
.
only
(
top:
16
,
left:
16
,
right:
16
,
),
margin:
EdgeInsets
.
only
(
margin:
EdgeInsets
.
only
(
left:
paddingLeftRight
,
left:
paddingLeftRight
,
right:
paddingLeftRight
,
right:
paddingLeftRight
,
...
@@ -235,7 +240,8 @@ class ListVoucherView extends StatelessWidget {
...
@@ -235,7 +240,8 @@ class ListVoucherView extends StatelessWidget {
topLeft:
Radius
.
circular
(
8
),
topLeft:
Radius
.
circular
(
8
),
topRight:
Radius
.
circular
(
8
),
topRight:
Radius
.
circular
(
8
),
),
),
image:
DecorationImage
(
image:
(
voucherListData
[
index
].
titleImageUrl
!=
''
)
?
DecorationImage
(
colorFilter:
(!
isCanSelect
)
colorFilter:
(!
isCanSelect
)
?
const
ColorFilter
.
mode
(
?
const
ColorFilter
.
mode
(
Colors
.
grey
,
Colors
.
grey
,
...
@@ -246,7 +252,8 @@ class ListVoucherView extends StatelessWidget {
...
@@ -246,7 +252,8 @@ class ListVoucherView extends StatelessWidget {
image:
NetworkImage
(
image:
NetworkImage
(
voucherListData
[
index
].
titleImageUrl
,
voucherListData
[
index
].
titleImageUrl
,
),
),
),
)
:
null
,
),
),
// child: const ClipRRect(
// child: const ClipRRect(
...
@@ -360,7 +367,7 @@ class ListVoucherView extends StatelessWidget {
...
@@ -360,7 +367,7 @@ class ListVoucherView extends StatelessWidget {
?
Column
(
?
Column
(
children:
[
children:
[
const
SizedBox
(
const
SizedBox
(
height:
1
0
,
height:
1
6
,
),
),
Row
(
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
...
@@ -433,7 +440,7 @@ class RincianPembayaranVoucher extends StatelessWidget {
...
@@ -433,7 +440,7 @@ class RincianPembayaranVoucher extends StatelessWidget {
height:
16
,
height:
16
,
),
),
const
Divider
(
const
Divider
(
thickness:
0.5
,
thickness:
1
,
color:
dividerGrey2
,
color:
dividerGrey2
,
),
),
const
SizedBox
(
const
SizedBox
(
...
@@ -444,7 +451,7 @@ class RincianPembayaranVoucher extends StatelessWidget {
...
@@ -444,7 +451,7 @@ class RincianPembayaranVoucher extends StatelessWidget {
children:
[
children:
[
defaultText
(
defaultText
(
context
,
context
,
'Discount
Potongan
'
,
'Discount
E-Voucher
'
,
style:
rincianPembayaran
(
style:
rincianPembayaran
(
font:
12
,
font:
12
,
color:
textGreyBill
,
color:
textGreyBill
,
...
@@ -467,7 +474,7 @@ class RincianPembayaranVoucher extends StatelessWidget {
...
@@ -467,7 +474,7 @@ class RincianPembayaranVoucher extends StatelessWidget {
height:
16
,
height:
16
,
),
),
const
Divider
(
const
Divider
(
thickness:
0.5
,
thickness:
1
,
color:
dividerGrey2
,
color:
dividerGrey2
,
),
),
const
SizedBox
(
const
SizedBox
(
...
@@ -581,6 +588,7 @@ class CustomAppBarVoucher extends StatelessWidget {
...
@@ -581,6 +588,7 @@ class CustomAppBarVoucher extends StatelessWidget {
),
),
textAlignVertical:
TextAlignVertical
.
center
,
textAlignVertical:
TextAlignVertical
.
center
,
decoration:
InputDecoration
(
decoration:
InputDecoration
(
// hintText: 'Kode Voucher',
filled:
true
,
filled:
true
,
fillColor:
Colors
.
white
,
fillColor:
Colors
.
white
,
enabledBorder:
OutlineInputBorder
(
enabledBorder:
OutlineInputBorder
(
...
...
lib/ui/viewbill/view_bill_new.dart
View file @
babf7522
...
@@ -6,6 +6,7 @@ import 'package:byod/helper/helper.dart';
...
@@ -6,6 +6,7 @@ import 'package:byod/helper/helper.dart';
import
'package:byod/helper/widget/button_modal.dart'
;
import
'package:byod/helper/widget/button_modal.dart'
;
import
'package:byod/helper/widget/style.dart'
;
import
'package:byod/helper/widget/style.dart'
;
import
'package:byod/ui/history_order/history_new.dart'
;
import
'package:byod/ui/history_order/history_new.dart'
;
import
'package:byod/ui/payment/payment_balance.dart'
;
import
'package:byod/ui/screen_responsive.dart'
;
import
'package:byod/ui/screen_responsive.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
...
@@ -515,9 +516,8 @@ class CoreBill extends StatelessWidget {
...
@@ -515,9 +516,8 @@ class CoreBill extends StatelessWidget {
height:
24
,
height:
24
,
),
),
const
AddMoreOrder
(),
const
AddMoreOrder
(),
const
Divider
(
const
SizedBox
(
color:
backgroundColorViewBill
,
height:
24
,
thickness:
24
,
),
),
RincianPembayaran
(
RincianPembayaran
(
dataBill:
dataBill
,
dataBill:
dataBill
,
...
@@ -911,7 +911,7 @@ class CoreBill extends StatelessWidget {
...
@@ -911,7 +911,7 @@ class CoreBill extends StatelessWidget {
'Semua Tagihan Sudah Dibayar'
);
'Semua Tagihan Sudah Dibayar'
);
}
}
},
},
child:
Button
Modal
(
child:
Button
Component
(
buttonColor:
buttonColor
,
buttonColor:
buttonColor
,
teksButton:
teksButton:
'Online - Rp
${formatNumber().format(outStandingAll)}
'
),
'Online - Rp
${formatNumber().format(outStandingAll)}
'
),
...
@@ -938,27 +938,42 @@ class CoreBill extends StatelessWidget {
...
@@ -938,27 +938,42 @@ class CoreBill extends StatelessWidget {
EasyLoading
.
showToast
(
EasyLoading
.
showToast
(
'Tidak ada tagihan / Tidak ada balance'
);
'Tidak ada tagihan / Tidak ada balance'
);
}
else
{
}
else
{
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (_) => Payment(
// dataBill: dataBill,
// isIndividu: true,
// outstandingIndividu:
// outStandingTopayMember, // karena hanya excelso untuk saat ini jadi overide outstandingindividu dulu
// outstandingAll:
// outStandingAll,
// title:
// 'Dengan Balance',
// isUsingBalance:
// true)));
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
(
_
)
=>
Payment
(
builder:
(
_
)
=>
dataBill:
dataBill
,
PaymentBalance
(
isIndividu:
true
,
outStanding:
outstandingIndividu:
outStandingTopayMember
,
// karena hanya excelso untuk saat ini jadi overide outstandingindividu dulu
outstandingAll:
outStandingAll
,
outStandingAll
,
title:
balanceMember:
'Dengan Balance'
,
amountParseToIntCrm
(
isUsingBalance:
memberinfo
true
)));
.
balance
),
orderId:
dataBill
[
0
].
id
,
),
),
);
}
}
}
else
{
}
else
{
EasyLoading
.
showToast
(
EasyLoading
.
showToast
(
'Semua Tagihan Sudah Dibayar'
);
'Semua Tagihan Sudah Dibayar'
);
}
}
},
},
child:
Button
Modal
(
child:
Button
Component
(
buttonColor:
buttonColor
,
buttonColor:
buttonColor
,
teksButton:
teksButton:
'Excelso CRM Balance'
),
'Excelso CRM Balance'
),
...
@@ -1031,7 +1046,7 @@ class CoreBill extends StatelessWidget {
...
@@ -1031,7 +1046,7 @@ class CoreBill extends StatelessWidget {
'Tidak ada tagihan'
);
'Tidak ada tagihan'
);
}
}
},
},
child:
Button
Modal
(
child:
Button
Component
(
buttonColor:
buttonColor
,
buttonColor:
buttonColor
,
teksButton:
teksButton:
'Excelso CRM Voucher'
),
'Excelso CRM Voucher'
),
...
@@ -1041,22 +1056,21 @@ class CoreBill extends StatelessWidget {
...
@@ -1041,22 +1056,21 @@ class CoreBill extends StatelessWidget {
);
);
},
},
);
);
}
else
{
buttonDialogAllPayment
(
context
,
dataBill
,
customerName
,
outStandingIndividu
,
outStandingAll
,
tableMode
,
onTapCashier
,
widthScreen
,
memberinfo
,
branchCode
,
brandCode
,
);
}
}
// else {
// buttonDialogAllPayment(
// context,
// dataBill,
// customerName,
// outStandingIndividu,
// outStandingAll,
// tableMode,
// onTapCashier,
// widthScreen,
// memberinfo,
// branchCode,
// brandCode,
// );
// }
}
}
},
},
child:
Container
(
child:
Container
(
...
@@ -1064,11 +1078,8 @@ class CoreBill extends StatelessWidget {
...
@@ -1064,11 +1078,8 @@ class CoreBill extends StatelessWidget {
height:
43
,
height:
43
,
width:
double
.
infinity
,
width:
double
.
infinity
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
borderRadius:
(
dataBill
[
0
].
tableStatus
==
tableStatusOpen
)
BorderRadius
.
circular
(
roundedButtonComponent
),
?
8
:
33
,
),
color:
(
dataBill
[
0
].
tableStatus
==
tableStatusOpen
)
color:
(
dataBill
[
0
].
tableStatus
==
tableStatusOpen
)
?
buttonColor
?
buttonColor
:
disabledColor
,
:
disabledColor
,
...
@@ -1107,7 +1118,7 @@ class CoreBill extends StatelessWidget {
...
@@ -1107,7 +1118,7 @@ class CoreBill extends StatelessWidget {
}
}
}
}
},
},
child:
Button
Modal
(
child:
Button
Component
(
buttonColor:
successColor
,
buttonColor:
successColor
,
teksButton:
(
dataBill
[
0
].
tableStatus
==
teksButton:
(
dataBill
[
0
].
tableStatus
==
tableStatusOpen
)
tableStatusOpen
)
...
@@ -1256,9 +1267,36 @@ class EmptyBill extends StatelessWidget {
...
@@ -1256,9 +1267,36 @@ class EmptyBill extends StatelessWidget {
),
),
),
),
),
),
const
SizedBox
(
],
height:
21
,
),
),
),
],
),
),
)
],
),
Positioned
(
bottom:
0
,
child:
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
paddingLeftRight
,
vertical:
paddingLeftRight
),
width:
widthScreen
,
decoration:
const
BoxDecoration
(
boxShadow:
[
BoxShadow
(
color:
Colors
.
grey
,
blurRadius:
5.0
,
)
],
color:
backgroundWhite
,
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
16
),
topRight:
Radius
.
circular
(
16
),
),
),
child:
Column
(
children:
[
GestureDetector
(
GestureDetector
(
onTap:
()
{
onTap:
()
{
context
.
read
<
BranchExist
>().
branchExist
(
context
.
read
<
BranchExist
>().
branchExist
(
...
@@ -1273,24 +1311,9 @@ class EmptyBill extends StatelessWidget {
...
@@ -1273,24 +1311,9 @@ class EmptyBill extends StatelessWidget {
MaterialPageRoute
(
MaterialPageRoute
(
builder:
(
_
)
=>
const
NewHome2
()));
builder:
(
_
)
=>
const
NewHome2
()));
},
},
child:
Container
(
child:
ButtonComponent
(
margin:
const
EdgeInsets
.
symmetric
(
buttonColor:
buttonColor
,
horizontal:
paddingLeftRight
,
teksButton:
'Buat Pesanan Baru'
,
),
height:
43
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
buttonColor
,
),
child:
Center
(
child:
defaultText
(
context
,
'Buat Pesanan Baru'
,
style:
addButton
(
font:
14
,
),
),
),
),
),
),
),
const
SizedBox
(
const
SizedBox
(
...
@@ -1307,47 +1330,15 @@ class EmptyBill extends StatelessWidget {
...
@@ -1307,47 +1330,15 @@ class EmptyBill extends StatelessWidget {
),
),
);
);
},
},
child:
Container
(
child:
ButtonComponent
(
margin:
const
EdgeInsets
.
symmetric
(
buttonColor:
buttonColor
,
horizontal:
paddingLeftRight
,
teksButton:
'Lihat Transaksi Terakhir'
,
),
height:
43
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
buttonColor
,
),
child:
Center
(
child:
defaultText
(
context
,
'Lihat Transaksi Terakhir'
,
style:
addButton
(
font:
14
,
),
),
),
),
),
],
),
),
)
],
),
),
)
],
),
),
Positioned
(
const
SizedBox
(
bottom:
0
,
child:
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
paddingLeftRight
,
vertical:
paddingLeftRight
),
width:
widthScreen
,
child:
Column
(
children:
const
[
SizedBox
(
height:
5
,
height:
5
,
),
),
BuildVersion
()
const
BuildVersion
()
],
],
),
),
),
),
...
@@ -1853,7 +1844,7 @@ class AddMoreOrder extends StatelessWidget {
...
@@ -1853,7 +1844,7 @@ class AddMoreOrder extends StatelessWidget {
child:
Container
(
child:
Container
(
child:
defaultText
(
child:
defaultText
(
context
,
context
,
'
Apa anda masih ingin memesan
?'
,
'
Tambahkan menu lainnya
?'
,
maxLines:
2
,
maxLines:
2
,
overFlow:
TextOverflow
.
ellipsis
,
overFlow:
TextOverflow
.
ellipsis
,
style:
viewbillStyle
(
style:
viewbillStyle
(
...
...
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