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
4807bee4
Commit
4807bee4
authored
Jun 19, 2025
by
Sai Srinivas
Browse files
19-06-2025 By Sai Srinivas
Order Module Edit and minor test cases.
parent
d006edb4
Changes
24
Hide whitespace changes
Inline
Side-by-side
lib/screens/order/tpcAgentDetailsByMode.dart
View file @
4807bee4
...
@@ -303,63 +303,4 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
...
@@ -303,63 +303,4 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
Widget
TextWidget
(
context
,
text
)
{
return
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
),
child:
Text
(
text
),
);
}
Widget
ErrorWidget
(
context
,
text
)
{
if
(
text
!=
null
)
return
Text
(
text
!,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
12
));
else
return
SizedBox
(
height:
10
);
}
Widget
textControllerWidget
(
context
,
controller
,
hintText
,
Function
(
String
)?
onChanged
,)
{
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
),
child:
Text
(
hintText
),
),
Container
(
height:
hintText
==
"Enter Description"
?
150
:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
controller:
controller
,
keyboardType:
TextInputType
.
text
,
maxLines:
hintText
==
"Enter Description"
?
60
:
1
,
onChanged:
onChanged
,
decoration:
InputDecoration
(
hintText:
hintText
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
,
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
],
);
}
}
}
lib/screens/order/tpcAgentIssueListDetails.dart
View file @
4807bee4
...
@@ -375,62 +375,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
...
@@ -375,62 +375,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
);
);
}
}
Widget
TextWidget
(
context
,
text
)
{
return
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
),
child:
Text
(
text
),
);
}
Widget
ErrorWidget
(
context
,
text
)
{
if
(
text
!=
null
)
return
Text
(
text
!,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
12
));
else
return
SizedBox
(
height:
10
);
}
Widget
textControllerWidget
(
context
,
controller
,
hintText
,
Function
(
String
)?
onChanged
,)
{
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
),
child:
Text
(
hintText
),
),
Container
(
height:
hintText
==
"Enter Description"
?
150
:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
controller:
controller
,
keyboardType:
TextInputType
.
text
,
maxLines:
hintText
==
"Enter Description"
?
60
:
1
,
onChanged:
onChanged
,
decoration:
InputDecoration
(
hintText:
hintText
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
,
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
],
);
}
Future
<
void
>
_showLevelApprovalSheet
(
BuildContext
context
)
{
Future
<
void
>
_showLevelApprovalSheet
(
BuildContext
context
)
{
...
...
lib/services/api_calling.dart
View file @
4807bee4
...
@@ -63,6 +63,7 @@ import '../Models/financeModels/financeDashboardPagesResponse.dart';
...
@@ -63,6 +63,7 @@ import '../Models/financeModels/financeDashboardPagesResponse.dart';
import
'../Models/ordersModels/AddOrderPaymentSelectAccountResponse.dart'
;
import
'../Models/ordersModels/AddOrderPaymentSelectAccountResponse.dart'
;
import
'../Models/ordersModels/AddOrderPaymentSelectOrderResponse.dart'
;
import
'../Models/ordersModels/AddOrderPaymentSelectOrderResponse.dart'
;
import
'../Models/ordersModels/AddOrderViewResponse.dart'
;
import
'../Models/ordersModels/AddOrderViewResponse.dart'
;
import
'../Models/ordersModels/EditPaymentDetailsAdjustedOrdersViewResponse.dart'
;
import
'../Models/ordersModels/addOrderAccontDetailsResponse.dart'
;
import
'../Models/ordersModels/addOrderAccontDetailsResponse.dart'
;
import
'../Models/ordersModels/addOrderPaymentViewResponse.dart'
;
import
'../Models/ordersModels/addOrderPaymentViewResponse.dart'
;
import
'../Models/ordersModels/addOrderTpcAgentListResponse.dart'
;
import
'../Models/ordersModels/addOrderTpcAgentListResponse.dart'
;
...
@@ -2532,6 +2533,61 @@ class ApiCalling {
...
@@ -2532,6 +2533,61 @@ class ApiCalling {
}
}
}
}
static
Future
<
EditPaymentDetailsAdjustedOrdersViewResponse
?>
ordersEditPaymentDetailsAdjustedOrdersViewAPI
(
empId
,
session
,
payment_id
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
payment_id
.
toString
(),
};
var
res
=
await
post
(
data
,
ordersEditPaymentDetailsAdjustedOrdersViewUrl
,
{});
if
(
res
!=
null
)
{
print
(
"edit adjusted :
${res.body}
"
);
return
EditPaymentDetailsAdjustedOrdersViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
EditPaymentDetailsAdjustedOrdersViewResponse
?>
ordersEditPaymentDetailsAdjustedOrdersUpdateAPI
(
empId
,
session
,
payment_id
,
update_amounts
,
insert_amounts
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
payment_id
.
toString
(),
'update_amounts'
:
jsonEncode
(
update_amounts
).
toString
(),
'insert_amounts'
:
jsonEncode
(
insert_amounts
).
toString
(),
};
var
res
=
await
post
(
data
,
ordersEditPaymentDetailsAdjustedOrdersUrl
,
{});
if
(
res
!=
null
)
{
return
EditPaymentDetailsAdjustedOrdersViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
AddOrderPaymentSelectAccountResponse
?>
AddOrderPaymentSelectAccountAPI
(
static
Future
<
AddOrderPaymentSelectAccountResponse
?>
AddOrderPaymentSelectAccountAPI
(
empId
,
empId
,
session
,
session
,
...
@@ -2574,7 +2630,7 @@ class ApiCalling {
...
@@ -2574,7 +2630,7 @@ class ApiCalling {
final
res
=
await
post
(
data
,
ordersAddPaymentSelectOrderUrl
,
{});
final
res
=
await
post
(
data
,
ordersAddPaymentSelectOrderUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
print
(
data
);
print
(
data
);
debugPrint
(
"
empty
:
${res.body}
"
);
debugPrint
(
"
add order payment selected order
:
${res.body}
"
);
return
AddOrderPaymentSelectOrderResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
AddOrderPaymentSelectOrderResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
...
...
lib/services/api_names.dart
View file @
4807bee4
...
@@ -102,6 +102,7 @@ const ordersAddOrderSubmitUrl ="${baseUrl_test}add_crm_order_submit";
...
@@ -102,6 +102,7 @@ const ordersAddOrderSubmitUrl ="${baseUrl_test}add_crm_order_submit";
const
ordersAddPaymentViewUrl
=
"
${baseUrl_test}
crm_add_order_payment_view"
;
const
ordersAddPaymentViewUrl
=
"
${baseUrl_test}
crm_add_order_payment_view"
;
const
ordersAddPaymentSubmitUrl
=
"
${baseUrl_test}
crm_add_order_payment_submit"
;
const
ordersAddPaymentSubmitUrl
=
"
${baseUrl_test}
crm_add_order_payment_submit"
;
const
ordersEditPaymentDetailsUrl
=
"
${baseUrl_test}
crm_payment_update_edit_details"
;
const
ordersEditPaymentDetailsUrl
=
"
${baseUrl_test}
crm_payment_update_edit_details"
;
const
ordersEditPaymentDetailsAdjustedOrdersViewUrl
=
"
${baseUrl_test}
crm_payment_update_edit_adjusted_orders_view"
;
const
ordersEditPaymentDetailsAdjustedOrdersUrl
=
"
${baseUrl_test}
crm_payment_update_edit_adjusted_orders"
;
const
ordersEditPaymentDetailsAdjustedOrdersUrl
=
"
${baseUrl_test}
crm_payment_update_edit_adjusted_orders"
;
const
ordersAddPaymentSelectAccountForOrderUrl
=
"
${baseUrl_test}
select_account_for_order_payment"
;
const
ordersAddPaymentSelectAccountForOrderUrl
=
"
${baseUrl_test}
select_account_for_order_payment"
;
const
ordersAddPaymentSelectOrderUrl
=
"
${baseUrl_test}
select_order_for_order_payment"
;
const
ordersAddPaymentSelectOrderUrl
=
"
${baseUrl_test}
select_order_for_order_payment"
;
...
...
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