Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sai Srinivas
GEN_ERP_2025
Commits
7959ada6
Commit
7959ada6
authored
Aug 01, 2025
by
Sai Srinivas
Browse files
01-08-2025 By Sai Srinivas
Finance Module and CRM issues
parent
14d01f4d
Changes
35
Show whitespace changes
Inline
Side-by-side
lib/screens/crm/crmDashboard.dart
View file @
7959ada6
...
...
@@ -883,7 +883,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
Expanded
(
flex:
4
,
child:
Text
(
"Find Nearby
Generator
s"
,
"Find Nearby
Lead
s"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
...
...
@@ -1108,10 +1108,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton:
(
provider
.
accessPages
.
where
((
page
)
=>
[
8
,
9
].
contains
(
page
.
id
))
.
toList
()
.
contains
([
8
,
9
]))?
InkResponse
(
floatingActionButton:
provider
.
accessPages
.
any
((
element
)
=>
[
8
,
9
].
contains
(
element
.
id
),)?
InkResponse
(
onTap:
()
async
{
// if (provider.accessPages
// .where((page) => [8, 9].contains(page.id))
...
...
lib/screens/crm/followUpUpdateScreen.dart
View file @
7959ada6
...
...
@@ -14,7 +14,8 @@ import 'package:provider/provider.dart';
class
Followupupdatescreen
extends
StatefulWidget
{
final
leadID
;
final
mode
;
const
Followupupdatescreen
({
super
.
key
,
required
this
.
leadID
,
this
.
mode
});
final
from
;
const
Followupupdatescreen
({
super
.
key
,
required
this
.
leadID
,
this
.
mode
,
this
.
from
});
@override
State
<
Followupupdatescreen
>
createState
()
=>
_FollowupupdatescreenState
();
...
...
@@ -34,7 +35,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> {
setState
(()
=>
_source
=
event
);
});
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
final
provider
=
Provider
.
of
<
followUpUpdateProvider
>(
context
);
final
provider
=
Provider
.
of
<
followUpUpdateProvider
>(
context
,
listen:
false
);
provider
.
getCurrentLocation
(
context
);
});
}
...
...
@@ -115,7 +116,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> {
child:
Column
(
children:
[
Container
(
padding:
EdgeInsets
.
only
(
left:
10
),
padding:
EdgeInsets
.
only
(
left:
10
,
top:
10
),
alignment:
Alignment
.
topLeft
,
child:
Text
(
"Follow up Details"
,
...
...
@@ -520,6 +521,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> {
],
),
),
SizedBox
(
height:
25
),
]
else
if
(
provider
.
nextAppointmentStatus
==
"Next Appointment"
)
...[
...
...
@@ -692,7 +694,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> {
],
),
),
SizedBox
(
height:
25
),
],
SizedBox
(
height:
150
),
],
...
...
@@ -705,6 +707,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> {
provider
.
submitLoading
=
true
;
provider
.
crmAddFollowUpAPIFunction
(
context
,
widget
.
from
,
provider
.
nextAppointmentStatus
,
provider
.
selectOrderStatus
,
widget
.
leadID
,
...
...
lib/screens/crm/generateQuotationScreen.dart
View file @
7959ada6
...
...
@@ -676,21 +676,11 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
provider
.
buttonsLoading
?[
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
app_blue
),
),
SizedBox
(
width:
25
),
SvgPicture
.
asset
(
"assets/svg/crm/vertical_line_ic.svg"
),
SizedBox
(
width:
25
),
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
app_blue
),
),
SizedBox
(
width:
25
),
SvgPicture
.
asset
(
"assets/svg/crm/vertical_line_ic.svg"
),
SizedBox
(
width:
25
),
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
app_blue
),
)
]:
[
Expanded
(
child:
InkResponse
(
...
...
lib/screens/crm/pendingTasksDetails.dart
View file @
7959ada6
...
...
@@ -282,6 +282,7 @@ class _PendingtasksdetailsState extends State<Pendingtasksdetails> {
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Followupupdatescreen
(
leadID:
task
.
leadid
,
from:
"Pending Tasks"
)),
);
},
...
...
lib/screens/finance/AllPaymentRequesitionListsByModes.dart
View file @
7959ada6
...
...
@@ -121,13 +121,13 @@ class _AllpaymentrequesitionlistsbymodesState
case
'Requested'
:
return
"R"
;
case
'Level 1 Approved'
:
return
"A"
;
return
"
L1
A"
;
case
'Level 1 Rejected'
:
return
"R"
;
return
"
L1
R"
;
case
'Level 2 Approved'
:
return
"A"
;
return
"
L2
A"
;
case
'Level 2 Rejected'
:
return
"R"
;
return
"
L2
R"
;
case
'Processed'
:
return
"P"
;
case
'Payment Rejected'
:
...
...
@@ -137,6 +137,28 @@ class _AllpaymentrequesitionlistsbymodesState
return
text
;
}
double
getSize
(
value
){
var
text
=
"A"
;
switch
(
value
){
case
'Requested'
:
return
18.0
;
case
'Level 1 Approved'
:
return
14.0
;
case
'Level 1 Rejected'
:
return
14.0
;
case
'Level 2 Approved'
:
return
14.0
;
case
'Level 2 Rejected'
:
return
14.0
;
case
'Processed'
:
return
18.0
;
case
'Payment Rejected'
:
return
18.0
;
}
return
18.0
;
}
@override
void
dispose
()
{
// TODO: implement dispose
...
...
@@ -315,7 +337,7 @@ class _AllpaymentrequesitionlistsbymodesState
getText
(
requestLists
[
index
].
status
),
style:
TextStyle
(
color:
getTextColor
(
requestLists
[
index
].
status
),
fontSize:
18
,
fontSize:
getSize
(
requestLists
[
index
].
status
)
,
fontFamily:
"JakartaBold"
),
),
...
...
lib/screens/finance/FileViewer.dart
View file @
7959ada6
...
...
@@ -79,8 +79,8 @@ class _FileviewerState extends State<Fileviewer> {
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"File Viewer"
),
body:
SafeArea
(
child:
fileWidget
(
context
)),
appBar:
appbar
New
(
context
,
"File Viewer"
,
0xFFFFFFFF
),
body:
SafeArea
(
child:
Center
(
child:
fileWidget
(
context
))
)
,
);
}
...
...
lib/screens/finance/PaymentRequestionListDetails.dart
View file @
7959ada6
import
'dart:io'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:dotted_line/dotted_line.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
...
...
@@ -64,6 +65,7 @@ class _PaymentrequestionlistdetailsState
// Final decision on whether to show buttons
bool
shouldShowButtons
=
false
;
final
numberFormat
=
NumberFormat
.
decimalPattern
();
@override
void
initState
()
{
// TODO: implement initState
...
...
@@ -77,7 +79,9 @@ class _PaymentrequestionlistdetailsState
context
,
listen:
false
,
);
provider
.
showMoreDetails
=
false
;
provider
.
checkDropDownReset
();
print
(
widget
.
paymentRequestId
);
provider
.
paymentRequesitionDetails
(
context
,
widget
.
paymentRequestId
);
});
}
...
...
@@ -110,13 +114,76 @@ class _PaymentrequestionlistdetailsState
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
child:
_scaffold
1
(
context
),
),
)
:
_scaffold
(
context
)
:
_scaffold
1
(
context
)
:
NoNetwork
(
context
);
}
Color
getDecorationColor
(
value
)
{
var
color
=
AppColors
.
approved_bg_color
;
switch
(
value
)
{
case
'Requested'
:
return
AppColors
.
requested_bg_color
;
case
'Level 1 Approved'
:
return
AppColors
.
approved_bg_color
;
case
'Level 1 Rejected'
:
return
AppColors
.
rejected_bg_color
;
case
'Level 2 Approved'
:
return
AppColors
.
approved_bg_color
;
case
'Level 2 Rejected'
:
return
AppColors
.
rejected_bg_color
;
case
'Processed'
:
return
AppColors
.
processed_bg_color
;
case
'Payment Rejected'
:
return
AppColors
.
rejected_bg_color
;
}
return
color
;
}
Color
getTextColor
(
value
)
{
var
color
=
AppColors
.
approved_text_color
;
switch
(
value
)
{
case
'Requested'
:
return
AppColors
.
requested_text_color
;
case
'Level 1 Approved'
:
return
AppColors
.
approved_text_color
;
case
'Level 1 Rejected'
:
return
AppColors
.
rejected_text_color
;
case
'Level 2 Approved'
:
return
AppColors
.
approved_text_color
;
case
'Level 2 Rejected'
:
return
AppColors
.
rejected_text_color
;
case
'Processed'
:
return
AppColors
.
processed_text_color
;
case
'Payment Rejected'
:
return
AppColors
.
rejected_text_color
;
}
return
color
;
}
getText
(
value
)
{
switch
(
value
)
{
case
'Requested'
:
return
"Requested"
;
case
'Level 1 Approved'
:
return
"L1 Approved"
;
case
'Level 1 Rejected'
:
return
"L1 Rejected"
;
case
'Level 2 Approved'
:
return
"L2 Approved"
;
case
'Level 2 Rejected'
:
return
"L2 Rejected"
;
case
'Processed'
:
return
"Processed"
;
case
'Payment Rejected'
:
return
"Payment Rejected"
;
default
:
return
"Requested"
;
}
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Requesitionlidtdetailsprovider
>(
builder:
(
context
,
provider
,
child
)
{
...
...
@@ -592,370 +659,585 @@ class _PaymentrequestionlistdetailsState
);
}
Future
<
void
>
_showLevelApprovalSheet
(
BuildContext
context
,
paymentID
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
isScrollControlled:
true
,
showDragHandle:
true
,
backgroundColor:
Colors
.
white
,
enableDrag:
true
,
context:
context
,
builder:
(
context
)
{
return
StatefulBuilder
(
builder:
(
context
,
setState
)
{
return
SafeArea
(
child:
Consumer
<
Requesitionlidtdetailsprovider
>(
Widget
_scaffold1
(
BuildContext
context
)
{
return
Consumer
<
Requesitionlidtdetailsprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
left:
15
,
right:
15
,
top:
10
,
var
req_det
=
provider
.
requestsDetails
;
var
pay_det
=
provider
.
paymentsDetails
;
isLevel1Finalized
=
[
"Level 1 Approved"
,
"Level 1 Rejected"
,
"Level 1 approved"
,
"Level 1 rejected"
,
].
contains
(
req_det
.
status
);
isLevel2Finalized
=
[
"Level 2 Approved"
,
"Level 2 Rejected"
,
"Level 2 approved"
,
"Level 2 rejected"
,
].
contains
(
req_det
.
status
);
if
(
widget
.
mode
==
"apr_lvl1"
)
{
shouldShowButtons
=
!
isLevel1Finalized
;
}
else
if
(
widget
.
mode
==
"apr_lvl2"
)
{
shouldShowButtons
=
!
isLevel2Finalized
&&
[
"Requested"
,
"Level 1 Approved"
,
"Level 1 approved"
,
].
contains
(
req_det
.
status
);
}
else
if
(
widget
.
mode
==
"process"
)
{
shouldShowButtons
=
[
"Level 2 Approved"
,
"Level 2 approved"
,
].
contains
(
req_det
.
status
);
}
else
if
(
widget
.
mode
==
"self_apr_lvl2"
)
{
shouldShowButtons
=
[
"Requested"
].
contains
(
req_det
.
status
);
}
final
headings2
=
[
"Proposed Payment Account"
,
"Requesting Purpose"
,
"Requested Amount"
,
"Approved Amount"
,
"Requested Date"
,
];
final
subHeadings2
=
[
req_det
.
proposedAccount
??
"-"
,
req_det
.
requestingPurpose
??
"-"
,
req_det
.
requestedAmount
??
"-"
,
req_det
.
amount
??
"-"
,
req_det
.
date
??
"-"
,
];
final
headings3
=
[
"Account Name"
,
"Payment Account"
,
"Payment Mode"
,
"Employee"
,
"Amount"
,
"Payment Date"
,
"Attachment"
];
final
subHeadings3
=
[
pay_det
.
accountName
??
"-"
,
pay_det
.
paymentAccountName
??
"-"
,
pay_det
.
mode
??
"-"
,
pay_det
.
paymentEmployeeName
??
"-"
,
req_det
.
amount
??
"-"
,
req_det
.
date
??
"-"
,
"View"
,
];
final
headings4
=
[
"Bank Name"
,
"Account Holder Name"
,
"Account Number"
,
"Branch"
,
"IFSC"
,
"UPI ID"
,
];
final
subHeadings4
=
[
pay_det
.
bankName
??
"-"
,
pay_det
.
bankAccountHolderName
??
"-"
,
pay_det
.
bankAccountNumber
??
"-"
,
pay_det
.
bankBranchName
??
"-"
,
pay_det
.
bankIfscCode
??
"-"
,
pay_det
.
bankUpiId
??
"-"
,
];
final
headings5
=
[
"Level 1 Approved By"
,
"Level 1 Remarks"
,
"Level 2 Approved By"
,
"Level 2 Remarks"
,
];
final
subHeadings5
=
[
req_det
.
level1Employee
??
"-"
,
req_det
.
level1ApprovalRemarks
??
"-"
,
req_det
.
level2Employee
??
"-"
,
req_det
.
level2ApprovalRemarks
??
"-"
,
];
final
headings6
=
[
"Note"
,
"Created Employee"
,
];
final
subHeadings6
=
[
req_det
.
description
??
"-"
,
req_det
.
createdEmployee
??
"-"
,
];
var
headings
=
[...
headings2
];
var
subHeadings
=
[...
subHeadings2
];
var
titles
=
[
"Account Details"
];
if
(
provider
.
showMoreDetails
)
{
headings
=
[...
headings3
,
...
headings4
,
...
headings5
,
...
headings6
];
subHeadings
=
[
...
subHeadings2
,
...
subHeadings3
,
...
subHeadings4
,
...
subHeadings5
,
...
subHeadings6
,
];
titles
=
[
"Account Details"
,
"Request Details"
,
"Bank Details"
,
"Approval Details"
,
"Other Details"
,
];
}
final
sections
=
[
{
"title"
:
"Account Details"
,
"headings"
:
headings2
,
"subHeadings"
:
subHeadings2
,
},
if
(
provider
.
showMoreDetails
)
...[
{
"title"
:
"Request Details"
,
"headings"
:
headings3
,
"subHeadings"
:
subHeadings3
,
},
{
"title"
:
"Bank Details"
,
"headings"
:
headings4
,
"subHeadings"
:
subHeadings4
,
},
{
"title"
:
"Approval Details"
,
"headings"
:
headings5
,
"subHeadings"
:
subHeadings5
,
},
{
"title"
:
"Other Details"
,
"headings"
:
headings6
,
"subHeadings"
:
subHeadings6
,
},
],
];
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2New
(
context
,
widget
.
pageName
,
provider
.
resetAll
,
SizedBox
(
width:
0
),
0xFFFFFFFF
,
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SingleChildScrollView
(
child:
Card
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
only
(
bottomLeft:
Radius
.
circular
(
30
),
bottomRight:
Radius
.
circular
(
30
),
),
child:
SingleChildScrollView
(
),
elevation:
2
,
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
only
(
bottomLeft:
Radius
.
circular
(
30
),
bottomRight:
Radius
.
circular
(
30
),
),
),
// margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
45
,
width:
45
,
padding:
EdgeInsets
.
all
(
7.5
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
shape:
BoxShape
.
circle
,
// borderRadius: BorderRadius.circular(8),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisSize:
MainAxisSize
.
min
,
children:
[
if
(
widget
.
mode
==
"apr_lvl1"
)
...[
Align
(
alignment:
Alignment
.
topLeft
,
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountslistdetails
(
accountID:
provider
.
requestsDetails
.
accountId
,
),
),
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
8.0
,
bottom:
4
,
),
child:
Text
(
"Level 1 Approval"
,
req_det
.
accountName
==
""
?
"-"
:
req_det
.
accountName
??
"-"
,
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
decorationStyle:
TextDecorationStyle
.
dotted
,
decorationColor:
AppColors
.
grey_thick
,
height:
1.2
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
Text
(
req_det
.
amount
==
""
?
"-"
:
"₹
${req_det.amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
fontSize:
16
,
),
),
],
),
]
else
if
(
widget
.
mode
==
"apr_lvl2"
)
...[
Align
(
alignment:
Alignment
.
topLeft
,
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
getDecorationColor
(
req_det
.
status
??
"-"
),
),
child:
Center
(
child:
Text
(
"Level 2 Approval"
,
getText
(
req_det
.
status
??
"-"
),
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
16
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
getTextColor
(
req_det
.
status
),
),
),
),
),
),
],
),
SizedBox
(
height:
10
),
Column
(
children:
List
.
generate
(
sections
.
length
,
(
sectionIndex
)
{
final
section
=
sections
[
sectionIndex
];
final
title
=
section
[
"title"
]
as
String
;
final
headings
=
section
[
"headings"
]
as
List
<
String
>;
final
subHeadings
=
section
[
"subHeadings"
]
as
List
<
String
>;
textControllerReadonlyWidget
(
context
,
provider
.
requestedAmount
,
"Enter Requested Amount"
,
(
p0
)
{},
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
title
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
textControllerWidget
(
context
,
approvedAmount
,
"Approved Amount"
,
"Enter Approved Amount"
,
(
p0
)
{},
TextInputType
.
numberWithOptions
(),
false
,
null
,
focusNodes
[
0
],
focusNodes
[
1
],
TextInputAction
.
next
,
),
errorWidget
(
context
,
provider
.
ApprovedAmountError
),
textControllerWidget
(
context
,
remarks
,
"Remarks"
,
"Enter Remarks"
,
(
p0
)
{},
TextInputType
.
text
,
false
,
null
,
focusNodes
[
1
],
null
,
TextInputAction
.
done
,
),
errorWidget
(
context
,
provider
.
remarksError
),
TextWidget
(
context
,
"Proposed Payment Account"
),
DropdownButtonHideUnderline
(
Expanded
(
flex:
6
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
Column
(
children:
List
.
generate
(
headings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
DropdownButton2
<
PaymentAccounts
>(
isExpanded:
true
,
hint:
Text
(
'Select Payment Account'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
paymentsAccounts
.
map
(
(
paymenents
)
=>
DropdownMenuItem
<
PaymentAccounts
>(
value:
paymenents
,
child:
Text
(
paymenents
.
name
??
''
,
style:
const
TextStyle
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
.
toList
(),
value:
provider
.
selectedPaymentAccounts
,
onChanged:
(
PaymentAccounts
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
paymentsAccounts
.
isNotEmpty
)
{
provider
.
selectedPaymentAccounts
=
value
;
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
provider
.
selectedID
=
value
.
id
!;
provider
.
selectedValue
=
value
.
name
!;
print
(
"hfjkshfg"
+
provider
.
selectedID
.
toString
(),
Expanded
(
child:
InkResponse
(
onTap:
subHeadings
[
j
]
==
"View"
?
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
req_det
.
attachmentViewFileName
??
""
,
fileUrl:
req_det
.
attachmentDirFilePath
??
""
,
),
),
);
}
}
},
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
provider
.
paymentAccountSearchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
.
paymentAccountSearchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
:
null
,
child:
Text
(
subHeadings
[
j
].
isEmpty
?
"-"
:
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
decoration:
subHeadings
[
j
]
==
"View"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
AppColors
.
app_blue
,
color:
subHeadings
[
j
]
==
"View"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
),
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
],
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
},
// Optional: clear search text when dropdown closes
);
}),
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
paymentAccountSearchController
.
clear
();
}
],
);
}),
),
InkResponse
(
onTap:
()
async
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"Hide Details"
:
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
Transform
.
flip
(
flipY:
provider
.
showMoreDetails
?
true
:
false
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
InkWell
(
),
SizedBox
(
height:
25
),
],
),
),
),
),
bottomNavigationBar:
([
"admin"
,
"self"
].
contains
(
widget
.
mode
)
||
!
shouldShowButtons
)
?
SizedBox
.
shrink
()
:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
alignment:
Alignment
.
bottomCenter
,
height:
80
,
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
10
),
alignment:
Alignment
.
center
,
height:
45
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Expanded
(
child:
InkResponse
(
onTap:
()
{
provider
.
paymentrequisitionApproveSubmitAPIFunction
(
print
(
provider
.
requestsDetails
.
id
);
_showLevelRejectionSheet
(
context
,
widget
.
mode
,
paymentID
,
approvedAmount
.
text
,
remarks
.
text
,
provider
.
selectedID
,
provider
.
requestsDetails
.
id
,
);
},
child:
Container
(
alignment:
Alignment
.
center
,
height:
45
,
margin:
EdgeInsets
.
only
(
left:
5.0
,
right:
5.0
,
top:
5.0
,
bottom:
5.0
,
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
//1487C9
borderRadius:
BorderRadius
.
circular
(
14.0
),
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFEFEF
),
border:
Border
.
all
(
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Submit"
,
///approve
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
),
"Reject"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
)),
),
),
),
],
),
),
);
},
SizedBox
(
width:
10
),
if
([
"apr_lvl1"
,
"apr_lvl2"
,
"self_apr_lvl2"
,
].
contains
(
widget
.
mode
))
...[
SvgPicture
.
asset
(
"assets/svg/crm/vertical_line_ic.svg"
,
),
SizedBox
(
width:
10
),
Expanded
(
child:
InkResponse
(
onTap:
()
{
provider
.
approveRejectPaymentRequestAPIFunction
(
context
,
provider
.
requestsDetails
.
id
,
);
},
_showLevelApprovalSheet
(
context
,
provider
.
requestsDetails
.
id
,
);
},
);
}
Future
<
void
>
_showLevelRejectionSheet
(
BuildContext
context
,
paymentID
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
isScrollControlled:
true
,
showDragHandle:
true
,
backgroundColor:
Colors
.
white
,
enableDrag:
true
,
context:
context
,
builder:
(
context
)
{
return
StatefulBuilder
(
builder:
(
context
,
setState
)
{
return
SafeArea
(
child:
Consumer
<
Requesitionlidtdetailsprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
left:
15
,
right:
15
,
top:
10
,
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE7FFE5
),
border:
Border
.
all
(
color:
Color
(
0xFF0D9C00
),
width:
0.5
,
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
SingleChildScrollView
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
if
(
widget
.
mode
==
"apr_lvl1"
)
...[
Align
(
alignment:
Alignment
.
topLeft
,
child:
Center
(
child:
Text
(
"Level 1 Rejection
"
,
"Approve
"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
16
,
color:
Color
(
0xFF0D9C00
),
),
),
),
]
else
if
(
widget
.
mode
==
"apr_lvl2"
)
...[
Align
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
"Level 2 Rejection"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
16
,
),
),
),
],
textControllerReadonlyWidget
(
context
,
provider
.
requestedAmount
,
"Requested Amount"
,
(
p0
)
{},
),
textControllerWidget
(
context
,
remarks
,
"Remarks"
,
"Enter Remarks"
,
(
p0
)
{},
TextInputType
.
text
,
false
,
null
,
focusNodes
[
2
],
null
,
TextInputAction
.
done
,
SizedBox
(
width:
10
),
]
else
if
(
widget
.
mode
==
"process"
)
...[
SvgPicture
.
asset
(
"assets/svg/crm/vertical_line_ic.svg"
,
),
errorWidget
(
context
,
provider
.
remarksError
),
InkWell
(
SizedBox
(
width:
10
),
Expanded
(
child:
InkResponse
(
onTap:
()
{
provider
.
p
ayment
r
equ
isitionRejectSubmi
tAPIFunction
(
.
approveRejectP
ayment
R
equ
es
tAPIFunction
(
context
,
widget
.
mode
,
paymentID
,
remarks
.
text
,
provider
.
requestsDetails
.
id
,
);
provider
.
preValues
();
_showAddPaymentSheet
(
context
,
provider
.
requestsDetails
.
id
,
);
},
child:
Container
(
alignment:
Alignment
.
center
,
height:
45
,
margin:
EdgeInsets
.
only
(
left:
5.0
,
right:
5.0
,
top:
5.0
,
bottom:
5.0
,
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
//1487C9
borderRadius:
BorderRadius
.
circular
(
14.0
),
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE7FFE5
),
border:
Border
.
all
(
color:
Color
(
0xFF0D9C00
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Submit"
,
///reject
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
"Add Payment"
,
style:
TextStyle
(
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
),
],
],
),
),
);
},
),
);
}
,
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
);
},
);
}
Future
<
void
>
_show
AddPayment
Sheet
1
(
BuildContext
context
,
paymentID
)
{
Future
<
void
>
_show
LevelApproval
Sheet
(
BuildContext
context
,
paymentID
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
...
...
@@ -970,8 +1252,7 @@ class _PaymentrequestionlistdetailsState
return
SafeArea
(
child:
Consumer
<
Requesitionlidtdetailsprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Scaffold
(
body:
Container
(
return
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
left:
15
,
...
...
@@ -982,82 +1263,101 @@ class _PaymentrequestionlistdetailsState
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
SingleChildScrollView
(
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisSize:
MainAxisSize
.
min
,
children:
[
if
(
widget
.
mode
==
"apr_lvl1"
)
...[
Align
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
"Add
Approval"
,
"Level 1
Approval"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
16
,
),
),
),
textControllerReadonlyWidget
(
]
else
if
(
widget
.
mode
==
"apr_lvl2"
)
...[
Align
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
"Level 2 Approval"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
16
,
),
),
),
],
textControllerReadonlyWidget
(
context
,
provider
.
requestedAmount
,
"Enter Requested Amount"
,
(
p0
)
{},
),
textControllerWidget
(
context
,
approvedAmount
,
"Approved Amount"
,
"Enter Approved Amount"
,
(
p0
)
{},
TextInputType
.
numberWithOptions
(),
false
,
null
,
focusNodes
[
0
],
focusNodes
[
1
],
TextInputAction
.
next
,
),
errorWidget
(
context
,
provider
.
ApprovedAmountError
),
textControllerWidget
(
context
,
provider
.
proposedPaymentAccount
,
"Enter Proposed Payment Account"
,
remarks
,
"Remarks"
,
"Enter Remarks"
,
(
p0
)
{},
TextInputType
.
text
,
false
,
null
,
focusNodes
[
1
],
null
,
TextInputAction
.
done
,
),
TextWidget
(
context
,
"Payment Account"
),
errorWidget
(
context
,
provider
.
remarksError
),
TextWidget
(
context
,
"
Proposed
Payment Account"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
PaymentAccounts
>(
child:
DropdownButton2
<
PaymentAccounts
>(
isExpanded:
true
,
hint:
Text
(
'Select Account'
,
style:
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
'Select Payment Account'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
paymentsAccounts
.
map
(
(
paymenents
,
)
=>
DropdownMenuItem
<
(
paymenents
)
=>
DropdownMenuItem
<
PaymentAccounts
>(
value:
paymenents
,
child:
Text
(
paymenents
.
name
??
''
,
style:
const
TextStyle
(
fontSize:
14
,
paymenents
.
name
??
''
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
TextOverflow
.
ellipsis
,
),
),
)
.
toList
(),
value:
provider
.
selectedPaymentAccounts
,
onChanged:
(
PaymentAccounts
?
value
,
)
{
value:
provider
.
selectedPaymentAccounts
,
onChanged:
(
PaymentAccounts
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
paymentsAccounts
...
...
@@ -1067,14 +1367,11 @@ class _PaymentrequestionlistdetailsState
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
provider
.
selectedID
=
value
.
id
!;
provider
.
selectedValue
=
value
.
name
!;
provider
.
selectedID
=
value
.
id
!;
provider
.
selectedValue
=
value
.
name
!;
print
(
"hfjkshfg"
+
provider
.
selectedID
.
toString
(),
provider
.
selectedID
.
toString
(),
);
}
}
...
...
@@ -1085,8 +1382,7 @@ class _PaymentrequestionlistdetailsState
provider
.
paymentAccountSearchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
...
...
@@ -1098,26 +1394,19 @@ class _PaymentrequestionlistdetailsState
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search account...'
,
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
,
),
BorderRadius
.
circular
(
8
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
,
)
{
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
searchValue
.
toLowerCase
(),
)
??
false
;
},
...
...
@@ -1126,15 +1415,12 @@ class _PaymentrequestionlistdetailsState
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
paymentAccountSearchController
provider
.
paymentAccountSearchController
.
clear
();
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
...
...
@@ -1144,239 +1430,141 @@ class _PaymentrequestionlistdetailsState
],
),
),
textControllerReadonlyWidget
(
context
,
provider
.
approvedAmountReadonly
,
"Approved Amount"
,
(
p0
)
{},
),
textControllerWidget
(
context
,
provider
.
approvedAmount
,
"Payment Amount"
,
"Enter Payment Amount"
,
(
p0
)
{
if
(
numberFormat
.
parse
(
InkWell
(
onTap:
()
{
provider
.
approvedAmountReadonly
.
text
,
)
<
numberFormat
.
parse
(
provider
.
approvedAmount
.
text
,
))
{
provider
.
proposedAmountError
=
"Amount Should not be greater than Approved amount"
;
}
else
{
provider
.
proposedAmountError
=
""
;
}
},
TextInputType
.
numberWithOptions
(),
false
,
null
,
),
errorWidget
(
context
,
provider
.
proposedAmountError
,
),
textControllerWidget
(
context
,
paymentReferenceNumber
,
"Payment Reference Number"
,
"Enter Payment Reference Number"
,
(
p0
)
{},
TextInputType
.
text
,
false
,
null
,
focusNodes
[
3
],
focusNodes
[
4
],
TextInputAction
.
next
,
),
textControllerWidget
(
.
paymentrequisitionApproveSubmitAPIFunction
(
context
,
remarks
,
"Remarks"
,
"Enter Remarks"
,
(
p0
)
{},
TextInputType
.
text
,
false
,
null
,
focusNodes
[
4
],
null
,
TextInputAction
.
done
,
),
InkResponse
(
onTap:
()
{
_showAttachmentSheet
(
context
);
widget
.
mode
,
paymentID
,
approvedAmount
.
text
,
remarks
.
text
,
provider
.
selectedID
,
);
},
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
),
alignment:
Alignment
.
center
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
,
),
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
margin:
EdgeInsets
.
only
(
left:
5.0
,
right:
5.0
,
top:
5.0
,
bottom:
5.0
,
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
//1487C9
borderRadius:
BorderRadius
.
circular
(
14.0
),
),
child:
Center
(
child:
Text
(
"Add Attachment"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
,
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
11
,
fontWeight:
FontWeight
.
w600
,
"Submit"
,
///approve
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
),
),
InkResponse
(
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,
),
),
],
),
),
],
textControllerReadonlyWidget
(
context
,
provider
.
accountName
,
"Enter Account Name"
,
(
p0
)
{},
),
textControllerReadonlyWidget
(
context
,
provider
.
branch
,
"Enter Branch Name"
,
(
p0
)
{},
);
},
),
textControllerReadonlyWidget
(
context
,
provider
.
requestingPurpose
,
"Enter Requesting Purpose"
,
(
p0
)
{},
);
},
);
},
);
}
Future
<
void
>
_showLevelRejectionSheet
(
BuildContext
context
,
paymentID
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
isScrollControlled:
true
,
showDragHandle:
true
,
backgroundColor:
Colors
.
white
,
enableDrag:
true
,
context:
context
,
builder:
(
context
)
{
return
StatefulBuilder
(
builder:
(
context
,
setState
)
{
return
SafeArea
(
child:
Consumer
<
Requesitionlidtdetailsprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
left:
15
,
right:
15
,
top:
10
,
),
textControllerReadonlyWidget
(
context
,
provider
.
description
,
"Enter Description"
,
(
p0
)
{},
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
textControllerReadonlyWidget
(
context
,
provider
.
amount
,
"Enter Amount"
,
(
p0
)
{},
child:
SingleChildScrollView
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
if
(
widget
.
mode
==
"apr_lvl1"
)
...[
Align
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
"Level 1 Rejection"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
16
,
),
textControllerReadonlyWidget
(
context
,
provider
.
paymentMode
,
"Enter Payment Mode"
,
(
p0
)
{},
),
textControllerReadonlyWidget
(
context
,
provider
.
bankHolderName
,
"Bank Account Holder Name"
,
(
p0
)
{},
),
textControllerReadonlyWidget
(
context
,
provider
.
bankAccountNumber
,
"Bank Account Number"
,
(
p0
)
{},
]
else
if
(
widget
.
mode
==
"apr_lvl2"
)
...[
Align
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
"Level 2 Rejection"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
16
,
),
textControllerReadonlyWidget
(
context
,
provider
.
bankName
,
"Bank Name"
,
(
p0
)
{},
),
textControllerReadonlyWidget
(
context
,
provider
.
bankBranchName
,
"Bank Branch Name"
,
(
p0
)
{},
),
],
textControllerReadonlyWidget
(
context
,
provider
.
bankIfscCode
,
"Bank IFSC Code
"
,
provider
.
requestedAmount
,
"Requested Amount
"
,
(
p0
)
{},
),
textControllerReadonlyWidget
(
textControllerWidget
(
context
,
provider
.
bankUpiID
,
"Bank UPI ID"
,
remarks
,
"Remarks"
,
"Enter Remarks"
,
(
p0
)
{},
TextInputType
.
text
,
false
,
null
,
focusNodes
[
2
],
null
,
TextInputAction
.
done
,
),
],
),
),
),
],
),
],
),
),
bottomNavigationBar:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
errorWidget
(
context
,
provider
.
remarksError
),
InkWell
(
onTap:
()
{
provider
.
paymentrequisitionProcessSubmitAPIFunction
(
provider
.
paymentrequisitionRejectSubmitAPIFunction
(
context
,
widget
.
mode
,
paymentReferenceNumber
.
text
,
provider
.
approvedAmount
.
text
,
paymentID
,
provider
.
selectedID
,
remarks
.
text
,
provider
.
imagePath
,
);
},
child:
Container
(
alignment:
Alignment
.
bottomC
enter
,
alignment:
Alignment
.
c
enter
,
height:
45
,
margin:
EdgeInsets
.
only
(
left:
5.0
,
...
...
@@ -1392,13 +1580,15 @@ class _PaymentrequestionlistdetailsState
child:
Text
(
"Submit"
,
///add paymen
t
///rejec
t
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
),
),
),
),
],
),
),
);
},
...
...
@@ -1410,6 +1600,461 @@ class _PaymentrequestionlistdetailsState
);
}
// Future<void> _showAddPaymentSheet1(BuildContext context, paymentID) {
// return showModalBottomSheet(
// useSafeArea: true,
// isDismissible: true,
// isScrollControlled: true,
// showDragHandle: true,
// backgroundColor: Colors.white,
// enableDrag: true,
// context: context,
// builder: (context) {
// return StatefulBuilder(
// builder: (context, setState) {
// return SafeArea(
// child: Consumer<Requesitionlidtdetailsprovider>(
// builder: (context, provider, child) {
// return Scaffold(
// body: Container(
// margin: EdgeInsets.only(
// bottom: 15,
// left: 15,
// right: 15,
// top: 10,
// ),
// padding: EdgeInsets.only(
// bottom: MediaQuery.of(context).viewInsets.bottom,
// ),
//
// child: Column(
// children: [
// Row(
// children: [
// Expanded(
// child: SizedBox(
// child: Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
// children: [
// Align(
// alignment: Alignment.topLeft,
// child: Text(
// "Add Approval",
// style: TextStyle(
// color: AppColors.app_blue,
// fontSize: 16,
// ),
// ),
// ),
//
// textControllerReadonlyWidget(
// context,
// provider.proposedPaymentAccount,
// "Enter Proposed Payment Account",
// (p0) {},
// ),
//
// TextWidget(context, "Payment Account"),
// DropdownButtonHideUnderline(
// child: Row(
// children: [
// Expanded(
// child: DropdownButton2<
// PaymentAccounts
// >(
// isExpanded: true,
// hint: Text(
// 'Select Account',
// style: TextStyle(
// fontSize: 14,
// ),
// overflow:
// TextOverflow.ellipsis,
// ),
// items:
// provider.paymentsAccounts
// .map(
// (
// paymenents,
// ) => DropdownMenuItem<
// PaymentAccounts
// >(
// value: paymenents,
// child: Text(
// paymenents.name ??
// '',
// style:
// const TextStyle(
// fontSize:
// 14,
// ),
// overflow:
// TextOverflow
// .ellipsis,
// ),
// ),
// )
// .toList(),
// value:
// provider
// .selectedPaymentAccounts,
// onChanged: (
// PaymentAccounts? value,
// ) {
// if (value != null) {
// if (provider
// .paymentsAccounts
// .isNotEmpty) {
// provider.selectedPaymentAccounts =
// value;
// print(
// "Selected Complaint Type: ${value.name}, ID: ${value.id}",
// );
// provider.selectedID =
// value.id!;
// provider.selectedValue =
// value.name!;
// print(
// "hfjkshfg" +
// provider.selectedID
// .toString(),
// );
// }
// }
// },
// dropdownSearchData: DropdownSearchData(
// searchInnerWidgetHeight: 50,
// searchController:
// provider
// .paymentAccountSearchController,
// searchInnerWidget: Padding(
// padding:
// const EdgeInsets.all(8),
// child: TextFormField(
// controller:
// provider
// .paymentAccountSearchController,
// decoration: InputDecoration(
// isDense: true,
// contentPadding:
// const EdgeInsets.symmetric(
// horizontal: 10,
// vertical: 8,
// ),
// hintText:
// 'Search account...',
// border: OutlineInputBorder(
// borderRadius:
// BorderRadius.circular(
// 8,
// ),
// ),
// ),
// ),
// ),
// searchMatchFn: (
// item,
// searchValue,
// ) {
// return item.value?.name
// ?.toLowerCase()
// .contains(
// searchValue
// .toLowerCase(),
// ) ??
// false;
// },
//
// // Optional: clear search text when dropdown closes
// ),
// onMenuStateChange: (isOpen) {
// if (!isOpen) {
// provider
// .paymentAccountSearchController
// .clear();
// }
// },
// buttonStyleData:
// ddtheme.buttonStyleData,
// iconStyleData:
// ddtheme.iconStyleData,
// menuItemStyleData:
// ddtheme.menuItemStyleData,
// dropdownStyleData:
// ddtheme.dropdownStyleData,
// ),
// ),
// ],
// ),
// ),
//
// textControllerReadonlyWidget(
// context,
// provider.approvedAmountReadonly,
// "Approved Amount",
// (p0) {},
// ),
//
// textControllerWidget(
// context,
// provider.approvedAmount,
// "Payment Amount",
// "Enter Payment Amount",
// (p0) {
// if (numberFormat.parse(
// provider
// .approvedAmountReadonly
// .text,
// ) <
// numberFormat.parse(
// provider.approvedAmount.text,
// )) {
// provider.proposedAmountError =
// "Amount Should not be greater than Approved amount";
// } else {
// provider.proposedAmountError = "";
// }
// },
// TextInputType.numberWithOptions(),
// false,
// null,
// ),
//
// errorWidget(
// context,
// provider.proposedAmountError,
// ),
//
// textControllerWidget(
// context,
// paymentReferenceNumber,
// "Payment Reference Number",
// "Enter Payment Reference Number",
// (p0) {},
// TextInputType.text,
// false,
// null,
// focusNodes[3],
// focusNodes[4],
// TextInputAction.next,
// ),
//
// textControllerWidget(
// context,
// remarks,
// "Remarks",
// "Enter Remarks",
// (p0) {},
// TextInputType.text,
// false,
// null,
// focusNodes[4],
// null,
// TextInputAction.done,
// ),
//
// InkResponse(
// onTap: () {
// _showAttachmentSheet(context);
// },
// child: Container(
// margin: EdgeInsets.symmetric(
// vertical: 10,
// ),
// height: 45,
// width:
// MediaQuery.of(context).size.width,
// decoration: BoxDecoration(
// color: Color(0xFFE6F6FF),
// borderRadius: BorderRadius.circular(
// 12,
// ),
// border: Border.all(
// color: AppColors.app_blue,
// width: 0.5,
// ),
// ),
// child: Center(
// child: Text(
// "Add Attachment",
// style: TextStyle(
// fontFamily: "JakartaMedium",
// color: AppColors.app_blue,
// ),
// ),
// ),
// ),
// ),
// if (provider.imagePicked == 1 &&
// provider.imagePath != null) ...[
// Padding(
// padding: const EdgeInsets.symmetric(
// vertical: 4.0,
// ),
// child: Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceBetween,
// children: [
// Text(
// "${provider.imagePath}",
// style: TextStyle(
// color: AppColors.semi_black,
// fontSize: 11,
// fontWeight: FontWeight.w600,
// ),
// ),
// InkResponse(
// onTap: () {
// provider.imagePicked = 0;
// provider.imagePath = null;
// provider.imageFilePath = null;
// },
// child: SvgPicture.asset(
// "assets/svg/ic_close.svg",
// width: 15,
// height: 15,
// ),
// ),
// ],
// ),
// ),
// ],
// textControllerReadonlyWidget(
// context,
// provider.accountName,
// "Enter Account Name",
// (p0) {},
// ),
// textControllerReadonlyWidget(
// context,
// provider.branch,
// "Enter Branch Name",
// (p0) {},
// ),
// textControllerReadonlyWidget(
// context,
// provider.requestingPurpose,
// "Enter Requesting Purpose",
// (p0) {},
// ),
//
// textControllerReadonlyWidget(
// context,
// provider.description,
// "Enter Description",
// (p0) {},
// ),
//
// textControllerReadonlyWidget(
// context,
// provider.amount,
// "Enter Amount",
// (p0) {},
// ),
// textControllerReadonlyWidget(
// context,
// provider.paymentMode,
// "Enter Payment Mode",
// (p0) {},
// ),
// textControllerReadonlyWidget(
// context,
// provider.bankHolderName,
// "Bank Account Holder Name",
// (p0) {},
// ),
// textControllerReadonlyWidget(
// context,
// provider.bankAccountNumber,
// "Bank Account Number",
// (p0) {},
// ),
// textControllerReadonlyWidget(
// context,
// provider.bankName,
// "Bank Name",
// (p0) {},
// ),
// textControllerReadonlyWidget(
// context,
// provider.bankBranchName,
// "Bank Branch Name",
// (p0) {},
// ),
//
// textControllerReadonlyWidget(
// context,
// provider.bankIfscCode,
// "Bank IFSC Code",
// (p0) {},
// ),
// textControllerReadonlyWidget(
// context,
// provider.bankUpiID,
// "Bank UPI ID",
// (p0) {},
// ),
// ],
// ),
// ),
// ),
// ],
// ),
// ],
// ),
// ),
// bottomNavigationBar: Align(
// alignment: Alignment.bottomCenter,
// child: InkWell(
// onTap: () {
// provider.paymentrequisitionProcessSubmitAPIFunction(
// context,
// widget.mode,
// paymentReferenceNumber.text,
// provider.approvedAmount.text,
// paymentID,
// provider.selectedID,
// remarks.text,
// provider.imagePath,
// );
// },
// child: Container(
// alignment: Alignment.bottomCenter,
// height: 45,
// margin: EdgeInsets.only(
// left: 5.0,
// right: 5.0,
// top: 5.0,
// bottom: 5.0,
// ),
// decoration: BoxDecoration(
// color: AppColors.app_blue, //1487C9
// borderRadius: BorderRadius.circular(14.0),
// ),
// child: Center(
// child: Text(
// "Submit",
//
// ///add payment
// textAlign: TextAlign.center,
// style: TextStyle(color: Colors.white),
// ),
// ),
// ),
// ),
// ),
// );
// },
// ),
// );
// },
// );
// },
// );
// }
Future
<
void
>
_showAddPaymentSheet
(
BuildContext
context
,
paymentID
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
...
...
@@ -1976,3 +2621,81 @@ class _PaymentrequestionlistdetailsState
);
}
}
///
///
/// List.generate(titles.length, (h){
// return Column(
// children: [
// Container(
// padding: EdgeInsets.symmetric(
// vertical: 4,
// ),
// child: Row(
// children: [
// Expanded(
// flex: 3,
// child: Text(
// titles[h],
// style: TextStyle(
// fontSize: 14,
// fontFamily: "JakartaSemiBold",
// ),
// ),
// ),
// Expanded(
// flex: 6,
// child: DottedLine(
// dashGapLength: 4,
// dashGapColor: Colors.white,
// dashColor: AppColors.grey_semi,
// dashLength: 2,
// lineThickness: 0.5,
// ),
// ),
// ],
// ),
// ),
// ...List.generate(headings.length, (j) {
// return Container(
// padding: EdgeInsets.symmetric(
// vertical: 7,
// ),
// child: Column(
// children: [
//
// Row(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Expanded(
// child: Text(
// headings[j],
// style: TextStyle(
// fontFamily: "JakartaRegular",
// fontSize: 14,
// color: AppColors.semi_black,
// ),
// ),
// ),
// Expanded(
// child: Text(
// subHeadings[j] == ""
// ? "-"
// : subHeadings[j],
// style: TextStyle(
// fontSize: 14,
// color: Color(0xFF818181),
// ),
// ),
// ),
// ],
// ),
// ],
// ),
// );
// }),
// ],
// );
// }),
///
lib/screens/finance/addPaymentReceiptList.dart
View file @
7959ada6
...
...
@@ -90,20 +90,23 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
builder:
(
context
,
provider
,
child
)
{
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
appBar:
appbar2
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar2
New
(
context
,
"
${widget.pageTitleName}
"
,
provider
.
resetForm
,
SizedBox
(
width:
0
),
SizedBox
.
shrink
(),
0xFFFFFFFF
),
body:
Container
(
body:
Scrollbar
(
thumbVisibility:
false
,
child:
SingleChildScrollView
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
App
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
SingleChildScrollView
(
),
margin:
EdgeInsets
.
only
(
top:
10
,
left:
10
,
right:
10
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
...
...
@@ -583,6 +586,8 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
flex:
5
,
child:
Text
(
"
${provider.imagePath}
"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
11
,
...
...
@@ -614,6 +619,7 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
...
...
@@ -630,7 +636,7 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
0
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
1
0
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
...
...
lib/screens/finance/directPaymentRequesitionList.dart
View file @
7959ada6
...
...
@@ -95,15 +95,18 @@ class _DirectpaymentrequesitionlistState
builder:
(
context
,
provider
,
child
)
{
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
appBar:
appbar
(
context
,
"
${widget.pageTitleName}
"
),
body:
Container
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbarNew
(
context
,
"
${widget.pageTitleName}
"
,
0xFFFFFFFF
),
body:
Scrollbar
(
thumbVisibility:
false
,
child:
SingleChildScrollView
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
margin:
EdgeInsets
.
only
(
top:
10
,
left:
10
,
right:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
...
...
@@ -584,6 +587,8 @@ class _DirectpaymentrequesitionlistState
flex:
4
,
child:
Text
(
"
${provider.imagePath}
"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
11
,
...
...
@@ -610,10 +615,12 @@ class _DirectpaymentrequesitionlistState
),
),
],
SizedBox
(
height:
20
,)
],
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
...
...
lib/screens/finance/paymentDetailsPaymentRequisition.dart
View file @
7959ada6
import
'dart:io'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:dotted_line/dotted_line.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
...
...
@@ -9,6 +10,7 @@ import 'package:provider/provider.dart';
import
'../../Notifiers/financeProvider/paymentRequisitionPaymentsListProvider.dart'
;
import
'../../Utils/commonServices.dart'
;
import
'../commom/accountsListDetails.dart'
;
import
'FileViewer.dart'
;
class
Paymentdetailspaymentrequisition
extends
StatefulWidget
{
...
...
@@ -45,6 +47,7 @@ class _PaymentdetailspaymentrequisitionState
listen:
false
,
);
provider
.
paymentsListDetailsAPI
(
context
,
widget
.
paymentRequestId
);
provider
.
showMoreDetails
=
false
;
});
}
...
...
@@ -83,6 +86,388 @@ class _PaymentdetailspaymentrequisitionState
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Paymentrequisitionpaymentslistprovider
>(
builder:
(
context
,
provider
,
child
)
{
var
payment_det
=
provider
.
paymentDetails
;
final
headings1
=
[
"From Account"
,
"Created Employee"
];
final
subHeadings1
=
[
payment_det
.
paymentAccountName
??
"-"
,
payment_det
.
paymentEmployeeName
??
"-"
,
];
final
headings2
=
[
"Bank Name"
,
"Account Holder Name"
,
"Account Number"
,
"Branch"
,
"IFSC"
,
"UPI ID"
,
];
final
subHeadings2
=
[
payment_det
.
bankName
??
"-"
,
payment_det
.
bankAccountHolderName
??
"-"
,
payment_det
.
bankAccountNumber
??
"-"
,
payment_det
.
bankBranchName
??
"-"
,
payment_det
.
bankIfscCode
??
"-"
,
payment_det
.
bankUpiId
??
"-"
,
];
final
headings3
=
[
"Payment Mode"
,
"Payment Reference"
,
"Attachment"
,
"Payment Date"
,
];
final
subHeadings3
=
[
payment_det
.
mode
??
"-"
,
payment_det
.
paymentReferenceNumber
??
"-"
,
"View"
,
payment_det
.
paymentDate
??
"-"
,
];
final
sections
=
[
{
"title"
:
"Account Details"
,
"headings"
:
headings1
,
"subHeadings"
:
subHeadings1
,
},
if
(
provider
.
showMoreDetails
)
...[
{
"title"
:
"Bank Details"
,
"headings"
:
headings2
,
"subHeadings"
:
subHeadings2
,
},
{
"title"
:
"Payment Details"
,
"headings"
:
headings3
,
"subHeadings"
:
subHeadings3
,
},
],
];
var
clickable
=
sections
.
any
(
(
element
)
=>
[
"From Account"
,
"Created Employee"
,
"Attachment"
,
].
contains
(
element
[
"headings"
]),
);
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
widget
.
pageName
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
45
,
width:
45
,
padding:
EdgeInsets
.
all
(
7.5
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
shape:
BoxShape
.
circle
,
// borderRadius: BorderRadius.circular(8),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountslistdetails
(
accountID:
payment_det
.
accountId
,
),
),
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
6
,
),
child:
Text
(
payment_det
.
accountName
??
"-"
,
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
decorationColor:
AppColors
.
grey_thick
,
decorationStyle:
TextDecorationStyle
.
dotted
,
height:
1.5
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
Text
(
"₹
${payment_det.amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
payment_det
.
refType
??
"-"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
],
),
SizedBox
(
height:
10
),
Column
(
children:
List
.
generate
(
sections
.
length
,
(
sectionIndex
)
{
final
section
=
sections
[
sectionIndex
];
final
title
=
section
[
"title"
]
as
String
;
final
headings
=
section
[
"headings"
]
as
List
<
String
>;
final
subHeadings
=
section
[
"subHeadings"
]
as
List
<
String
>;
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
title
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
Expanded
(
flex:
6
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
Column
(
children:
List
.
generate
(
headings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
[
"Attachment"
,
"From Account"
,
"Created Employee"
,
].
contains
(
headings
[
j
])
?
()
{
switch
(
headings
[
j
]){
case
"Attachment"
:
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
payment_det
.
attachmentViewFileName
!,
fileUrl:
payment_det
.
attachmentDirFilePath
!,
),
),
);
break
;
case
"From Account"
:
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountslistdetails
(
accountID:
payment_det
.
paymentAccountId
,
),
),
);
break
;
case
"Created Employee"
:
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountslistdetails
(
accountID:
payment_det
.
createdEmployeeId
,
),
),
);
break
;
}
}
:
null
,
child:
Padding
(
padding:
EdgeInsets
.
only
(
top:
2.5
,
bottom:
2.5
,
),
child:
Text
(
subHeadings
[
j
].
isEmpty
?
"-"
:
subHeadings
[
j
],
style:
TextStyle
(
decoration:
[
"Attachment"
,
"From Account"
,
"Created Employee"
,
].
contains
(
headings
[
j
])
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationStyle:
[
"From Account"
,
"Created Employee"
,
].
contains
(
headings
[
j
])
?
TextDecorationStyle
.
dotted
:
subHeadings
[
j
]
==
"View"
?
TextDecorationStyle
.
solid
:
TextDecorationStyle
.
solid
,
decorationColor:
[
"From Account"
,
"Created Employee"
,
].
contains
(
headings
[
j
])
?
AppColors
.
grey_thick
:
subHeadings
[
j
]
==
"View"
?
AppColors
.
app_blue
:
AppColors
.
app_blue
,
fontSize:
14
,
color:
subHeadings
[
j
]
==
"View"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
),
),
),
),
),
],
),
);
}),
),
],
);
}),
),
InkResponse
(
onTap:
()
async
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"Hide Details"
:
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
Transform
.
flip
(
flipY:
provider
.
showMoreDetails
?
true
:
false
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
],
),
),
),
),
);
},
);
}
Widget
_scaffold1
(
BuildContext
context
)
{
return
Consumer
<
Paymentrequisitionpaymentslistprovider
>(
builder:
(
context
,
provider
,
child
)
{
var
payment_det
=
provider
.
paymentDetails
;
...
...
lib/screens/finance/paymentReceiptDetails.dart
View file @
7959ada6
import
'dart:io'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:dotted_line/dotted_line.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:generp/screens/commom/accountsListDetails.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Notifiers/financeProvider/paymentReceiptsProvider.dart'
;
import
'../../Utils/commonServices.dart'
;
...
...
@@ -41,6 +43,7 @@ class _PaymentreceiptdetailsState extends State<Paymentreceiptdetails> {
context
,
listen:
false
,
);
provider
.
showMoreDetails
=
false
;
provider
.
paymentsListDetailsAPI
(
context
,
widget
.
paymentRequestId
);
});
}
...
...
@@ -80,6 +83,272 @@ class _PaymentreceiptdetailsState extends State<Paymentreceiptdetails> {
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Paymentreceiptsprovider
>(
builder:
(
context
,
provider
,
child
)
{
var
payment_det
=
provider
.
receiptDetails
;
final
headings1
=
[
"Payment Mode"
,
"Receipt Date"
];
final
subHeadings1
=
[
payment_det
.
requestMode
??
"-"
,
payment_det
.
receiptDate
??
"-"
,
];
final
headings2
=
[
"Bank Name"
,
"Account Holder Name"
,
"Account Number"
,
"Branch"
,
"IFSC"
,
"UPI ID"
,
];
final
subHeadings2
=
[
payment_det
.
bankName
??
"-"
,
payment_det
.
bankAccountHolderName
??
"-"
,
payment_det
.
bankAccountNumber
??
"-"
,
payment_det
.
bankBranchName
??
"-"
,
payment_det
.
bankIfscCode
??
"-"
,
payment_det
.
bankUpiId
??
"-"
,
];
final
headings3
=
[
"Note"
,
"Created Employee"
];
final
subHeadings3
=
[
payment_det
.
description
??
"-"
,
payment_det
.
createdEmployee
??
"-"
,
];
final
sections
=
[
{
"title"
:
"Receipt Details"
,
"headings"
:
headings1
,
"subHeadings"
:
subHeadings1
,
},
if
(
provider
.
showMoreDetails
)
...[
{
"title"
:
"Bank Details"
,
"headings"
:
headings2
,
"subHeadings"
:
subHeadings2
,
},
{
"title"
:
"Other Details"
,
"headings"
:
headings3
,
"subHeadings"
:
subHeadings3
,
},
],
];
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
//widget.pageName
appBar:
appbarNew
(
context
,
"Payment Receipt Details"
,
0xFFFFFFFF
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SingleChildScrollView
(
child:
Card
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
only
(
bottomLeft:
Radius
.
circular
(
30
),
bottomRight:
Radius
.
circular
(
30
),
),
),
elevation:
2
,
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
only
(
bottomLeft:
Radius
.
circular
(
30
),
bottomRight:
Radius
.
circular
(
30
),
),
),
// margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
45
,
width:
45
,
padding:
EdgeInsets
.
all
(
7.5
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
shape:
BoxShape
.
circle
,
// borderRadius: BorderRadius.circular(8),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
8
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountslistdetails
(
accountID:
provider
.
receiptDetails
.
accountId
,
),
),
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
6
,
),
child:
Text
(
payment_det
.
receipientAccount
??
"-"
,
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
decorationColor:
AppColors
.
grey_thick
,
decorationStyle:
TextDecorationStyle
.
dotted
,
height:
1.5
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
Text
(
"₹
${payment_det.amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
),
],
),
Column
(
children:
List
.
generate
(
sections
.
length
,
(
sectionIndex
)
{
final
section
=
sections
[
sectionIndex
];
final
title
=
section
[
"title"
]
as
String
;
final
headings
=
section
[
"headings"
]
as
List
<
String
>;
final
subHeadings
=
section
[
"subHeadings"
]
as
List
<
String
>;
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
title
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
Expanded
(
flex:
6
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
Column
(
children:
List
.
generate
(
headings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
Text
(
subHeadings
[
j
].
isEmpty
?
"-"
:
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
],
),
);
}),
),
],
);
}),
),
InkResponse
(
onTap:
()
async
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"Hide Details"
:
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
Transform
.
flip
(
flipY:
provider
.
showMoreDetails
?
true
:
false
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
],
),
),
),
),
);
},
);
}
Widget
_scaffold1
(
BuildContext
context
)
{
return
Consumer
<
Paymentreceiptsprovider
>(
builder:
(
context
,
provider
,
child
)
{
var
payment_det
=
provider
.
receiptDetails
;
...
...
lib/screens/finance/submitPaymentRequestionListsByMode.dart
View file @
7959ada6
...
...
@@ -175,15 +175,17 @@ class _SubmitpaymentrequestionlistsbymodeState
builder:
(
context
,
provider
,
child
)
{
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
appBar:
appbar2
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar2
New
(
context
,
"
${widget.pageTitleName}
"
,
provider
.
resetForm
,
SizedBox
(
width:
0
),
0xFFFFFFFF
),
body:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
margin:
EdgeInsets
.
only
(
top:
10
,
left:
10
,
right:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
...
...
@@ -607,6 +609,8 @@ class _SubmitpaymentrequestionlistsbymodeState
flex:
4
,
child:
Text
(
"
${provider.imagePath}
"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
11
,
...
...
lib/screens/splash.dart
View file @
7959ada6
...
...
@@ -354,13 +354,7 @@ class _SplashState extends State<Splash> {
default
:
connection
=
'Offline'
;
}
if
(
connection
==
'Online'
)
{
print
(
"camer here"
);
Provider
.
of
<
SplashVersionNotifier
>(
context
,
listen:
false
,
).
handleVersionCheck
(
context
);
}
return
(
connection
==
'Online'
)
?
SafeArea
(
top:
false
,
...
...
lib/services/api_calling.dart
View file @
7959ada6
...
...
@@ -17,6 +17,7 @@ import 'package:generp/Models/crmModels/ProspectListViewResponse.dart';
import
'package:generp/Models/crmModels/SubmitLeadListFilterResponse.dart'
;
import
'package:generp/Models/crmModels/crmDownloadGenQuoteResponse.dart'
;
import
'package:generp/Models/crmModels/crmLeadDetailsGenerateQuotationSubmitResponse.dart'
;
import
'package:generp/Models/crmModels/crmNewLeadsProspectsSubmitResponse.dart'
;
import
'package:generp/Models/crmModels/crmNewLeadsProspectsViewResponse.dart'
;
import
'package:generp/Models/crmModels/crmProspectDetailsAddFollowUpAppointmentResponse.dart'
;
import
'package:generp/Models/crmModels/crmProspectDetailsAddLeadsResponse.dart'
;
...
...
@@ -3345,7 +3346,7 @@ class ApiCalling {
}
}
static
Future
<
Common
Response
?>
crmNewLeadsProspectsSubmitAPI
(
static
Future
<
crmNewLeadsProspectsSubmit
Response
?>
crmNewLeadsProspectsSubmitAPI
(
session_id
,
emp_id
,
mode
,
...
...
@@ -3398,7 +3399,7 @@ class ApiCalling {
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
"Submit New Leads
${res.body}
"
);
return
Common
Response
.
fromJson
(
jsonDecode
(
res
.
body
));
return
crmNewLeadsProspectsSubmit
Response
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
...
...
pubspec.yaml
View file @
7959ada6
...
...
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version
:
1.0.95+
99
version
:
1.0.95+
101
environment
:
sdk
:
^3.7.2
...
...
Prev
1
2
Next
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