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
d94265ec
Commit
d94265ec
authored
Jan 13, 2023
by
Jasa Digital
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
view bill edit
parent
b9532527
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3842 additions
and
3793 deletions
+3842
-3793
view_bill_new.dart
lib/ui/viewbill/view_bill_new.dart
+3842
-3793
No files found.
lib/ui/viewbill/view_bill_new.dart
View file @
d94265ec
...
@@ -1997,6 +1997,9 @@ class DeliveryPickupDetail extends StatelessWidget {
...
@@ -1997,6 +1997,9 @@ class DeliveryPickupDetail extends StatelessWidget {
}
}
void
setPickupTimeUser
(
int
time
,
{
String
typeSatuan
=
'jam'
})
{
void
setPickupTimeUser
(
int
time
,
{
String
typeSatuan
=
'jam'
})
{
String
openOutlet
=
getOpenTime
();
String
hourOpen
=
openOutlet
.
split
(
':'
)[
0
];
String
minuteOpen
=
openOutlet
.
split
(
':'
)[
1
];
String
closeOutlet
=
getCloseTime
();
String
closeOutlet
=
getCloseTime
();
String
hourClose
=
closeOutlet
.
split
(
':'
)[
0
];
String
hourClose
=
closeOutlet
.
split
(
':'
)[
0
];
String
minuteClose
=
closeOutlet
.
split
(
':'
)[
1
];
String
minuteClose
=
closeOutlet
.
split
(
':'
)[
1
];
...
@@ -2006,7 +2009,10 @@ class DeliveryPickupDetail extends StatelessWidget {
...
@@ -2006,7 +2009,10 @@ class DeliveryPickupDetail extends StatelessWidget {
"
$dateNow
$hourClose
:
$minuteClose
:00"
;
"
$dateNow
$hourClose
:
$minuteClose
:00"
;
DateTime
dateTimeCloseOutlet
=
DateTime
dateTimeCloseOutlet
=
DateTime
.
parse
(
dateTimeCloseOutletString
);
DateTime
.
parse
(
dateTimeCloseOutletString
);
String
dateTimeOpenOutletString
=
"
$dateNow
$hourOpen
:
$minuteOpen
:00"
;
DateTime
dateTimeOpenOutlet
=
DateTime
.
parse
(
dateTimeOpenOutletString
);
String
hourTime
=
DateFormat
.
H
().
format
(
dateTime
);
String
hourTime
=
DateFormat
.
H
().
format
(
dateTime
);
String
minuteTime
=
DateFormat
.
m
().
format
(
dateTime
);
String
minuteTime
=
DateFormat
.
m
().
format
(
dateTime
);
DateTime
dateSelectedPickupTime
;
DateTime
dateSelectedPickupTime
;
...
@@ -2043,6 +2049,35 @@ class DeliveryPickupDetail extends StatelessWidget {
...
@@ -2043,6 +2049,35 @@ class DeliveryPickupDetail extends StatelessWidget {
);
);
return
;
return
;
}
}
final
differenceOpen
=
dateSelectedPickupTime
.
difference
(
dateTimeOpenOutlet
);
final
differenceFromNow
=
dateSelectedPickupTime
.
difference
(
now
);
if
(
differenceFromNow
.
inMinutes
<
0
)
{
buttonDialogGlobal
(
context
,
'Informasi'
,
'Pickup time tidak dapat dipilih pada waktu yang sudah berlalu'
,
'OK'
,
'Close'
,
ontapClose
,
ontapClose
,
isOkeButtonShow:
false
,
);
return
;
}
if
(
differenceOpen
.
inMinutes
<
0
)
{
buttonDialogGlobal
(
context
,
'Informasi'
,
'Pickup Hanya Bisa Dilakukan Setelah Outlet Buka'
,
'OK'
,
'Close'
,
ontapClose
,
ontapClose
,
isOkeButtonShow:
false
,
);
return
;
}
TimeOfDay
timeOfDayPickup
;
TimeOfDay
timeOfDayPickup
;
if
(
typeSatuan
==
'jam'
)
{
if
(
typeSatuan
==
'jam'
)
{
timeOfDayPickup
=
TimeOfDay
(
timeOfDayPickup
=
TimeOfDay
(
...
@@ -2174,7 +2209,8 @@ class DeliveryPickupDetail extends StatelessWidget {
...
@@ -2174,7 +2209,8 @@ class DeliveryPickupDetail extends StatelessWidget {
now
.
month
,
now
.
month
,
now
.
day
,
now
.
day
,
value
.
hour
,
value
.
hour
,
value
.
minute
);
value
.
minute
,
);
final
differenceClose
=
final
differenceClose
=
dateTimeCloseOutlet
.
difference
(
dateTimeCloseOutlet
.
difference
(
dateSelectedPickupTime
);
dateSelectedPickupTime
);
...
@@ -2688,70 +2724,83 @@ Apakah ingin melanjutkan ?''';
...
@@ -2688,70 +2724,83 @@ Apakah ingin melanjutkan ?''';
const
SizedBox
(
const
SizedBox
(
height:
5
,
height:
5
,
),
),
GestureDetector
(
// GestureDetector(
onTap:
()
{
// onTap: () {
if
(
getIsCanChangeDeliveryPickup
())
{
// if (getIsCanChangeDeliveryPickup()) {
void
ontapOkeChange
()
{
// void ontapOkeChange() {
Navigator
.
push
(
// EasyLoading.show(
context
,
// status: 'Getting outlet...',
MaterialPageRoute
(
// maskType: EasyLoadingMaskType.none,
builder:
(
_
)
=>
const
SelectBranch
(
// );
isFormBill:
true
,
// Api.getBranchList().then((value) {
),
// EasyLoading.dismiss();
),
// if (value.isNotEmpty) {
);
// Navigator.push(
}
// context,
// MaterialPageRoute(
void
onTapCancelChange
()
{
// builder: (_) => const SelectBranch(
Navigator
.
pop
(
context
);
// isFormBill: true,
}
// ),
// ),
String
textOnOk
=
'OK'
;
// );
String
textOnCancel
=
'Batal'
;
// } else {
String
title
=
'Ganti Outlet'
;
// EasyLoading.showToast(
String
description
=
'''
// 'List outlet tidak ditemukan');
Ganti outlet akan menyebabkan orderan anda saat ini hilang.
// }
// });
Apakah ingin melanjutkan ?'''
;
// }
buttonDialogGlobal
(
context
,
// void onTapCancelChange() {
title
,
// Navigator.pop(context);
description
,
// }
textOnOk
,
textOnCancel
,
// String textOnOk = 'OK';
ontapOkeChange
,
// String textOnCancel = 'Batal';
onTapCancelChange
,
// String title = 'Ganti Outlet';
okButtonColor:
buttonColor
,
// String description = '''
);
// Ganti outlet akan menyebabkan orderan anda saat ini hilang.
}
else
{
EasyLoading
.
showToast
(
// Apakah ingin melanjutkan ?''';
'Tidak dapat ganti oulet karena status orderan sedang diproses / telah selesai'
);
// buttonDialogGlobal(
}
// context,
},
// title,
child:
Container
(
// description,
width:
98
,
// textOnOk,
height:
30
,
// textOnCancel,
decoration:
BoxDecoration
(
// ontapOkeChange,
borderRadius:
BorderRadius
.
circular
(
40
),
// onTapCancelChange,
color:
(
isFromMenu
)
// okButtonColor: buttonColor,
?
backgroundColor
// );
:
backgroundWhite
,
// } else {
border:
Border
.
all
(
// EasyLoading.showToast(
color:
buttonColor
,
// 'Tidak dapat ganti oulet karena status orderan sedang diproses / telah selesai');
),
// }
),
// },
child:
Center
(
// child: Container(
child:
defaultText
(
// width: 98,
context
,
// height: 30,
'Ganti Outlet'
,
// decoration: BoxDecoration(
style:
addButton
(
// borderRadius: BorderRadius.circular(40),
font:
8
,
// color: (isFromMenu)
color:
buttonColor
,
// ? backgroundColor
),
// : backgroundWhite,
),
// border: Border.all(
),
// color: buttonColor,
),
// ),
),
// ),
// child: Center(
// child: defaultText(
// context,
// 'Ganti Outlet',
// style: addButton(
// font: 8,
// color: buttonColor,
// ),
// ),
// ),
// ),
// ),
changeOutlet
(
context
),
const
SizedBox
(
const
SizedBox
(
height:
5
,
height:
5
,
),
),
...
...
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