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
ad026e51
Commit
ad026e51
authored
Aug 12, 2025
by
Sai Srinivas
Browse files
08-08-2025 By Sai Srinivas
Order Module
parent
b5225d58
Changes
25
Expand all
Hide whitespace changes
Inline
Side-by-side
lib/screens/order/paymentListsByMode.dart
View file @
ad026e51
...
...
@@ -159,9 +159,10 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
return
(
connection
==
"Online"
)
?
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
{
Provider
.
of
<
Paymentsprovider
>(
context
).
resetAll
();
return
onBackPressed
(
context
);
onWillPop:
()
async
{
Provider
.
of
<
Paymentsprovider
>(
context
,
listen:
false
).
resetAll
();
Navigator
.
pop
(
context
,
true
);
return
true
;
},
child:
SafeArea
(
top:
false
,
...
...
@@ -175,221 +176,200 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
Widget
_scaffold
(
BuildContext
context
)
{
switch
(
_source
.
keys
.
toList
()[
0
])
{
case
ConnectivityResult
.
mobile
:
connection
=
'Online'
;
break
;
case
ConnectivityResult
.
wifi
:
connection
=
'Online'
;
break
;
case
ConnectivityResult
.
none
:
default
:
connection
=
'Offline'
;
}
return
Consumer
<
Paymentsprovider
>(
return
Consumer
<
Paymentsprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
paymentLists
=
provider
.
paymentsList
;
return
WillPopScope
(
onWillPop:
()
{
provider
.
resetAll
();
return
onBackPressed
(
context
);
},
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2New
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
Row
(
children:
[
// InkResponse(
// onTap: () {
// _showOptionsSheet(context);
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2New
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
Row
(
children:
[
// InkResponse(
// onTap: () {
// _showOptionsSheet(context);
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
InkResponse
(
InkResponse
(
onTap:
()
async
{
_showFilterSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,),
),
],
),
0xFFFFFFFF
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
))
:
paymentLists
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
itemCount:
paymentLists
.
length
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
paymentLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
),
),
);
}
return
InkResponse
(
onTap:
()
async
{
_showFilterSheet
(
context
);
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailsbymode
(
mode:
widget
.
mode
,
pageTitleName:
widget
.
pageTitleName
,
paymentId:
paymentLists
[
index
].
paymentId
,
),));
},
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,),
),
],
),
0xFFFFFFFF
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
))
:
paymentLists
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
itemCount:
paymentLists
.
length
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
paymentLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
),
),
);
}
return
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailsbymode
(
mode:
widget
.
mode
,
pageTitleName:
widget
.
pageTitleName
,
paymentId:
paymentLists
[
index
].
paymentId
,
),));
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
7.5
,
vertical:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
7.5
,
vertical:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Row
(
children:
[
// Expanded(
// flex: 1,
// child: Container(
// height: 50,
// width: 35,
// padding: EdgeInsets.all(8.0),
// decoration: BoxDecoration(
// color: Color(0xFFFFF3CE),
// borderRadius:
// BorderRadius.circular(8),
// ),
// child: SvgPicture.asset(
// "assets/svg/fin_ic.svg",
// ),
// ),
// ),
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
50
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
getDecorationColor
(
// Expanded(
// flex: 1,
// child: Container(
// height: 50,
// width: 35,
// padding: EdgeInsets.all(8.0),
// decoration: BoxDecoration(
// color: Color(0xFFFFF3CE),
// borderRadius:
// BorderRadius.circular(8),
// ),
// child: SvgPicture.asset(
// "assets/svg/fin_ic.svg",
// ),
// ),
// ),
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
50
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
getDecorationColor
(
paymentLists
[
index
].
status
,
),
shape:
BoxShape
.
circle
,
),
child:
Center
(
child:
Text
(
getText
(
paymentLists
[
index
].
status
,
),
style:
TextStyle
(
color:
getTextColor
(
paymentLists
[
index
].
status
,
),
shape:
BoxShape
.
circle
,
),
child:
Center
(
child:
Text
(
getText
(
paymentLists
[
index
].
status
,
),
style:
TextStyle
(
color:
getTextColor
(
paymentLists
[
index
].
status
,
),
fontSize:
getSize
(
paymentLists
[
index
].
status
,
),
fontFamily:
"JakartaBold"
,
),
fontSize:
getSize
(
paymentLists
[
index
].
status
,
),
fontFamily:
"JakartaBold"
,
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
paymentLists
[
index
].
ename
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
paymentLists
[
index
]
.
orderNumber
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_semi
,
fontFamily:
"JakartaRegular"
,
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
],
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
paymentLists
[
index
].
ename
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Text
(
paymentLists
[
index
]
.
orderNumber
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_semi
,
fontFamily:
"JakartaRegular"
,
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
],
),
Expanded
(
flex:
2
,
child:
Container
(
),
),
Expanded
(
flex:
2
,
child:
Container
(
child:
Center
(
child:
Text
(
"₹"
"
${paymentLists[index].amount}
"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
child:
Center
(
child:
Text
(
"₹"
"
${paymentLists[index].amount}
"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
]
,
)
,
),
],
),
),
);
},
),
],
],
),
),
);
},
),
)
:
Emptywidget
(
context
)
,
]
,
),
),
)
:
Emptywidget
(
context
)
,
);
},
);
...
...
lib/screens/order/tpcAgentDetailsByMode.dart
View file @
ad026e51
This diff is collapsed.
Click to expand it.
lib/screens/order/tpcAgentIssueListDetails.dart
View file @
ad026e51
This diff is collapsed.
Click to expand it.
lib/services/api_calling.dart
View file @
ad026e51
...
...
@@ -15,6 +15,7 @@ import 'package:generp/Models/crmModels/LeadListContactPopUpResponse.dart';
import
'package:generp/Models/crmModels/LeadListViewResponse.dart'
;
import
'package:generp/Models/crmModels/ProspectListViewResponse.dart'
;
import
'package:generp/Models/crmModels/SubmitLeadListFilterResponse.dart'
;
import
'package:generp/Models/crmModels/crmDashboardQuotationResponse.dart'
;
import
'package:generp/Models/crmModels/crmDownloadGenQuoteResponse.dart'
;
import
'package:generp/Models/crmModels/crmLeadDetailsGenerateQuotationSubmitResponse.dart'
;
import
'package:generp/Models/crmModels/crmNewLeadsProspectsSubmitResponse.dart'
;
...
...
@@ -66,6 +67,7 @@ import '../Models/ViewVisitDetailsResponse.dart';
import
'../Models/commonModels/commonAddAccountsSubmitResponse.dart'
;
import
'../Models/crmModels/appointmentCalendarResponse.dart'
;
import
'../Models/crmModels/crmAddFollowUpResponse.dart'
;
import
'../Models/crmModels/crmDashboardFollowUpResponse.dart'
;
import
'../Models/crmModels/crmDashboardResponse.dart'
;
import
'../Models/crmModels/crmPendingTasksResponse.dart'
;
import
'../Models/crmModels/crmSelectedProductDetailsResponse.dart'
;
...
...
@@ -3162,6 +3164,71 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
paymentsDetailsAddAdjustedOrderAPI
(
empId
,
session
,
payment_id
,
selected_order_id
,
amount
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
(
payment_id
).
toString
(),
'selected_order_id'
:
(
selected_order_id
).
toString
(),
'amount'
:
(
amount
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersPaymentDetailsAddOrderUrl
,
{});
if
(
res
!=
null
)
{
print
(
"paymentsDetailsAddAdjusted:
$data
"
);
debugPrint
(
res
.
body
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
CommonResponse
?>
paymentsDetailsEditAdjustedOrderAPI
(
empId
,
session
,
selected_order_id
,
amount
,
order_payment_id
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'selected_order_id'
:
(
selected_order_id
).
toString
(),
'amount'
:
(
amount
).
toString
(),
'order_payment_id'
:
(
order_payment_id
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersPaymentDetailsEditOrderUrl
,
{});
if
(
res
!=
null
)
{
print
(
"paymentsDetailsEditAdjusted
$data
"
);
debugPrint
(
res
.
body
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
CommonResponse
?>
ordersAddTPCAgentAPI
(
empId
,
session
,
...
...
@@ -4726,6 +4793,56 @@ class ApiCalling {
}
}
static
Future
<
crmDashboardFollowUpResponse
?>
crmDashboardFollowUpAPI
(
empId
,
session
,
type
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'type'
:
(
type
).
toString
(),
};
final
res
=
await
post
(
data
,
crmDashboardFollowUpUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
return
crmDashboardFollowUpResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
crmDashboardQuotationResponse
?>
crmDashboardQuotationsAPI
(
empId
,
session
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
};
final
res
=
await
post
(
data
,
crmDashboardQuotationsUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
return
crmDashboardQuotationResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
// static Future<CommonResponse?> TpcIssueListApprovalAPI(
// empId,
// session,
...
...
lib/services/api_names.dart
View file @
ad026e51
...
...
@@ -118,6 +118,8 @@ const ordersPaymentListByModeUrl = "${baseUrl_test}crm_payments_list_filter_subm
const
ordersPaymentListDeleteUrl
=
"
${baseUrl_test}
delete_crm_order_payment"
;
const
ordersPaymentListApproveRejectUrl
=
"
${baseUrl_test}
crm_approve_reject_payment"
;
const
ordersPaymentDetailsUrl
=
"
${baseUrl_test}
crm_payment_details"
;
const
ordersPaymentDetailsAddOrderUrl
=
"
${baseUrl_test}
crm_payment_add_adjusted_orders"
;
const
ordersPaymentDetailsEditOrderUrl
=
"
${baseUrl_test}
crm_payment_edit_adjusted_orders"
;
const
ordersAddTPCAgentUrl
=
"
${baseUrl_test}
add_tpc_agent_submit"
;
const
ordersTPCAgentListUrl
=
"
${baseUrl_test}
tpc_agent_list"
;
const
ordersTPCAgentDetailsUrl
=
"
${baseUrl_test}
tpc_agent_details"
;
...
...
@@ -170,6 +172,8 @@ const crmNewProspectLeadViewUrl = "${baseUrl_test}crm_add_new_lead_prospect_view
const
crmNewProspectLeadSubmitUrl
=
"
${baseUrl_test}
crm_add_new_lead_prospect_submit"
;
const
crmNewProspectListEditGstUrl
=
"
${baseUrl_test}
crm_prospect_list_edit_gst"
;
const
crmNearbyOpenLeadsUrl
=
"
${baseUrl_test}
nearby_crm_open_leads"
;
const
crmDashboardFollowUpUrl
=
"
${baseUrl_test}
crm_dashboard_followup_list"
;
const
crmDashboardQuotationsUrl
=
"
${baseUrl_test}
crm_dashboard_quotations_list"
;
...
...
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