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
63fcc40d
Commit
63fcc40d
authored
Oct 13, 2022
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add bayar sebagian dan seluruhnya utk openbill
parent
ecb565e5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
218 additions
and
119 deletions
+218
-119
view_bill_new.dart
lib/ui/viewbill/view_bill_new.dart
+218
-119
No files found.
lib/ui/viewbill/view_bill_new.dart
View file @
63fcc40d
...
@@ -907,7 +907,8 @@ class CoreBill extends StatelessWidget {
...
@@ -907,7 +907,8 @@ class CoreBill extends StatelessWidget {
Api
.
setToPendingOrder
();
Api
.
setToPendingOrder
();
getBillFunc
(
context
);
getBillFunc
(
context
);
}
else
if
(
dataBill
[
0
].
state
==
}
else
if
(
dataBill
[
0
].
state
==
orderStatePending
)
{
orderStatePending
&&
getTableMode
()
==
tableIndividu
)
{
EasyLoading
.
showToast
(
EasyLoading
.
showToast
(
'Status orderan anda menunggu untuk disetujui'
);
'Status orderan anda menunggu untuk disetujui'
);
}
else
{
}
else
{
...
@@ -1132,27 +1133,133 @@ class CoreBill extends StatelessWidget {
...
@@ -1132,27 +1133,133 @@ class CoreBill extends StatelessWidget {
child:
ButtonComponent
(
child:
ButtonComponent
(
buttonColor:
buttonColor
,
buttonColor:
buttonColor
,
teksButton:
teksButton:
'Excelso CRM Voucher'
)
,
'Excelso CRM Voucher'
,
),
),
),
const
SizedBox
(
height:
16
,
),
GestureDetector
(
onTap:
()
{
Navigator
.
pop
(
context
);
},
child:
const
ButtonComponent
(
buttonColor:
Colors
.
transparent
,
teksButton:
'Batal'
,
teksButtonColor:
textColorBlack
,
),
)
],
],
),
),
);
);
},
},
);
);
}
else
{
}
else
{
buttonDialogAllPayment
(
showDialog
(
context:
context
,
builder:
(
BuildContext
context
)
{
return
AlertDialog
(
title:
defaultText
(
context
,
context
,
dataBill
,
"Pilih cara pembayaran"
,
style:
modalPaymentStyle
(),
),
content:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
GestureDetector
(
onTap:
()
{
if
(
outStandingAll
>
0
)
{
if
(
paymentMode
==
closebill
)
{
addPayment
(
context
,
dataBill
[
0
].
id
,
branchCode
,
brandCode
,
customerName
,
customerName
,
outStandingIndividu
,
payCard
,
fullPayment
,
''
,
outStandingAll
,
);
}
else
{
Navigator
.
pop
(
context
);
buttonDialog
(
context
,
dataBill
,
outStandingAll
,
outStandingAll
,
paymentMode
,
widthScreen
);
onTapCashier
,
}
widthScreen
,
}
else
{
memberinfo
,
EasyLoading
.
showToast
(
'Semua Tagihan Sudah Dibayar'
);
}
},
child:
ButtonComponent
(
buttonColor:
buttonColor
,
teksButton:
'Bayar Sebagian'
),
),
const
SizedBox
(
height:
16
,
),
GestureDetector
(
onTap:
()
{
if
(
outStandingAll
>
0
)
{
addPayment
(
context
,
dataBill
[
0
].
id
,
branchCode
,
branchCode
,
brandCode
,
brandCode
,
customerName
,
payCard
,
fullPayment
,
''
,
outStandingAll
,
);
}
else
{
EasyLoading
.
showToast
(
'Semua Tagihan Sudah Dibayar'
);
}
},
child:
ButtonComponent
(
buttonColor:
buttonColor
,
teksButton:
'Bayar Seluruhnya - Rp
${formatNumber().format(outStandingAll)}
'
),
),
const
SizedBox
(
height:
16
,
),
GestureDetector
(
onTap:
()
{
Navigator
.
pop
(
context
);
},
child:
const
ButtonComponent
(
buttonColor:
Colors
.
transparent
,
teksButton:
'Batal'
,
teksButtonColor:
textColorBlack
,
),
),
],
),
);
);
},
);
// buttonDialogAllPayment(
// context,
// dataBill,
// customerName,
// outStandingIndividu,
// outStandingAll,
// paymentMode,
// onTapCashier,
// widthScreen,
// memberinfo,
// branchCode,
// brandCode,
// );
}
}
}
}
}
}
...
@@ -2275,14 +2382,10 @@ Future<dynamic> buttonDialog(BuildContext context, List<Bill> dataBill,
...
@@ -2275,14 +2382,10 @@ Future<dynamic> buttonDialog(BuildContext context, List<Bill> dataBill,
context:
context
,
context:
context
,
builder:
(
BuildContext
context
)
=>
AlertDialog
(
builder:
(
BuildContext
context
)
=>
AlertDialog
(
title:
defaultText
(
context
,
"Nominal Bayar"
),
title:
defaultText
(
context
,
"Nominal Bayar"
),
content:
SizedBox
(
content:
Column
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.3
,
mainAxisSize:
MainAxisSize
.
min
,
width:
widthScreen
*
widhtDialog
,
child:
Column
(
children:
[
children:
[
Container
(
Column
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.12
,
child:
Column
(
children:
[
children:
[
TextField
(
TextField
(
// autofocus: true,
// autofocus: true,
...
@@ -2306,12 +2409,16 @@ Future<dynamic> buttonDialog(BuildContext context, List<Bill> dataBill,
...
@@ -2306,12 +2409,16 @@ Future<dynamic> buttonDialog(BuildContext context, List<Bill> dataBill,
child:
defaultText
(
child:
defaultText
(
context
,
context
,
"Min
${formatNumber().format(amountParseToInt(dataBill[0].dokuMinPay))}
- Max
${formatNumber().format(outStandingAll)}
"
,
"Min
${formatNumber().format(amountParseToInt(dataBill[0].dokuMinPay))}
- Max
${formatNumber().format(outStandingAll)}
"
,
style:
viewbillStyle
(
font:
14
,
),
),
),
)
)
],
],
),
),
const
SizedBox
(
height:
10
,
),
),
SizedBox
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.01
),
GestureDetector
(
GestureDetector
(
onTap:
()
{
onTap:
()
{
if
(
nominalController
.
text
!=
''
)
{
if
(
nominalController
.
text
!=
''
)
{
...
@@ -2331,62 +2438,54 @@ Future<dynamic> buttonDialog(BuildContext context, List<Bill> dataBill,
...
@@ -2331,62 +2438,54 @@ Future<dynamic> buttonDialog(BuildContext context, List<Bill> dataBill,
EasyLoading
.
showToast
(
EasyLoading
.
showToast
(
'Maksimal bayar
${formatNumber().format(outStandingAll)}
'
);
'Maksimal bayar
${formatNumber().format(outStandingAll)}
'
);
}
else
{
}
else
{
Navigator
.
push
(
addPayment
(
context
,
context
,
MaterialPageRoute
(
dataBill
[
0
].
id
,
builder:
(
_
)
=>
Payment
(
getBranchPref
(),
dataBill:
dataBill
,
getBrand
()
,
isIndividu:
true
,
getCustomerName
()
,
outstandingIndividu:
inputAmount
,
payCard
,
outstandingAll:
outStandingAll
,
partialPayment
,
title:
''
)
,
''
,
)
,
inputAmount
,
);
);
}
}
}
}
},
},
child:
Container
(
child:
ButtonComponent
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
heightTombol
,
buttonColor:
buttonColor
,
decoration:
BoxDecoration
(
teksButton:
'Bayar'
,
borderRadius:
BorderRadius
.
circular
(
roundedButton
),
color:
buttonColor
),
child:
Align
(
child:
defaultText
(
context
,
"OK"
,
style:
textStyleNormalFont
(
context
,
color:
textInButton
),
),
),
),
),
// child: Container(
// height: MediaQuery.of(context).size.height * heightTombol,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(roundedButton),
// color: buttonColor),
// child: Align(
// child: defaultText(
// context,
// "OK",
// style:
// textStyleNormalFont(context, color: textInButton),
// ),
// ),
// ),
),
),
SizedBox
(
const
SizedBox
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.02
,
height:
10
,
),
),
GestureDetector
(
GestureDetector
(
onTap:
()
{
onTap:
()
{
Navigator
.
pop
(
context
);
Navigator
.
pop
(
context
);
},
},
child:
Container
(
child:
const
ButtonComponent
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
heightTombol
,
buttonColor:
Colors
.
transparent
,
decoration:
BoxDecoration
(
teksButton:
'Batal'
,
borderRadius:
BorderRadius
.
circular
(
roundedButton
),
teksButtonColor:
textColorBlack
,
color:
cancelColorButton
,
),
child:
Align
(
child:
Text
(
"Batal"
,
style:
textStyleNormalFont
(
context
,
color:
textCancelColor
,
),
),
),
),
),
)
)
],
],
),
),
),
));
));
}
}
...
...
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