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
c7ff2cec
Commit
c7ff2cec
authored
Jun 23, 2025
by
Sai Srinivas
Browse files
23-06-2025 By Sai Srinivas
Finance module test cases
parent
a7dc0d35
Changes
44
Show whitespace changes
Inline
Side-by-side
lib/screens/serviceEngineer/VisitDetails.dart
View file @
c7ff2cec
...
@@ -105,6 +105,7 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -105,6 +105,7 @@ class _VisitdetailsState extends State<Visitdetails> {
).
size
.
width
*
).
size
.
width
*
0.75
,
0.75
,
child:
Text
(
child:
Text
(
textSubheads
[
j
]==
""
?
"-"
:
textSubheads
[
j
],
textSubheads
[
j
],
maxLines:
2
,
maxLines:
2
,
overflow:
overflow:
...
@@ -183,7 +184,7 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -183,7 +184,7 @@ class _VisitdetailsState extends State<Visitdetails> {
).
size
.
width
*
).
size
.
width
*
0.8
,
0.8
,
child:
Text
(
child:
Text
(
textSubheads
[
j
],
textSubheads
[
j
]==
""
?
"-"
:
textSubheads
[
j
],
maxLines:
2
,
maxLines:
2
,
overflow:
overflow:
TextOverflow
.
ellipsis
,
TextOverflow
.
ellipsis
,
...
@@ -262,7 +263,7 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -262,7 +263,7 @@ class _VisitdetailsState extends State<Visitdetails> {
).
size
.
width
*
).
size
.
width
*
0.8
,
0.8
,
child:
Text
(
child:
Text
(
textSubheads
[
j
],
textSubheads
[
j
]==
""
?
"-"
:
textSubheads
[
j
],
maxLines:
2
,
maxLines:
2
,
overflow:
overflow:
TextOverflow
.
ellipsis
,
TextOverflow
.
ellipsis
,
...
...
lib/services/api_calling.dart
View file @
c7ff2cec
...
@@ -348,7 +348,7 @@ class ApiCalling {
...
@@ -348,7 +348,7 @@ class ApiCalling {
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
);
}
else
{
}
else
{
res
=
await
post
(
data
,
employeeChekInUrl
,
{});
res
=
await
post
(
data
,
employeeChekInUrl
,
{});
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
.
body
);
}
}
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
return
CheckInResponse
.
fromJson
(
res
);
return
CheckInResponse
.
fromJson
(
res
);
...
@@ -367,7 +367,7 @@ class ApiCalling {
...
@@ -367,7 +367,7 @@ class ApiCalling {
sessioId
,
sessioId
,
location
,
location
,
latlngs
,
latlngs
,
image
,
check_out_pic
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
...
@@ -377,19 +377,27 @@ class ApiCalling {
...
@@ -377,19 +377,27 @@ class ApiCalling {
'posit'
:
(
latlngs
).
toString
(),
'posit'
:
(
latlngs
).
toString
(),
};
};
var
res
;
var
res
;
if
(
image
!=
null
)
{
// if (image != null) {
res
=
await
postImage2
(
data
,
{},
employeeCheckOutUrl
,
image
);
// res = await postImage2(data, {}, employeeCheckOutUrl, image);
// res = jsonDecode(res);
// } else {
// res = await post(data, employeeCheckOutUrl, {});
// res = jsonDecode(res);
// }
// if (res != null) {
// return CheckOutResponse.fromJson(res);
// } else {
// debugPrint("Null Response");
// return null;
// }
if
(
check_out_pic
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
employeeCheckOutUrl
,
check_out_pic
,
'check_out_pic'
);
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
);
}
else
{
}
else
{
res
=
await
post
(
data
,
employeeCheckOutUrl
,
{});
res
=
await
post
(
data
,
employeeCheckOutUrl
,
{});
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
.
body
);
}
}
if
(
res
!=
null
)
{
return
CheckOutResponse
.
fromJson
(
res
);
return
CheckOutResponse
.
fromJson
(
res
);
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
return
null
;
...
@@ -915,23 +923,33 @@ class ApiCalling {
...
@@ -915,23 +923,33 @@ class ApiCalling {
'otp_validated_mobile_number'
:
(
otp_validated_mobile_number
).
toString
(),
'otp_validated_mobile_number'
:
(
otp_validated_mobile_number
).
toString
(),
};
};
var
res
;
var
res
;
// if (payment_proof != null) {
// res = await postImage3(
// data,
// {},
// technicianAddPaymentCollectionUrl,
// payment_proof,
// );
// res = jsonDecode(res);
// } else {
// res = await post(data, technicianAddPaymentCollectionUrl, {});
// res = jsonDecode(res);
// }
// if (res != null) {
// return TechnicianAddPaymentCollectionResponse.fromJson(res);
// } else {
// debugPrint("Null Response");
// return null;
// }
if
(
payment_proof
!=
null
)
{
if
(
payment_proof
!=
null
)
{
res
=
await
postImage3
(
res
=
await
postImageNew
(
data
,
{},
technicianAddPaymentCollectionUrl
,
payment_proof
,
'payment_proof'
);
data
,
{},
technicianAddPaymentCollectionUrl
,
payment_proof
,
);
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
);
return
TechnicianAddPaymentCollectionResponse
.
fromJson
(
res
);
}
else
{
}
else
{
res
=
await
post
(
data
,
technicianAddPaymentCollectionUrl
,
{});
res
=
await
post
(
data
,
technicianAddPaymentCollectionUrl
,
{});
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
.
body
);
}
if
(
res
!=
null
)
{
return
TechnicianAddPaymentCollectionResponse
.
fromJson
(
res
);
return
TechnicianAddPaymentCollectionResponse
.
fromJson
(
res
);
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
debugPrint
(
'hello bev=bug
$e
'
);
...
@@ -1132,12 +1150,15 @@ class ApiCalling {
...
@@ -1132,12 +1150,15 @@ class ApiCalling {
// print(fsr_file);
// print(fsr_file);
var
res
;
var
res
;
if
(
fsr_file
!=
null
)
{
if
(
fsr_file
!=
null
)
{
res
=
await
postImage
4
(
data
,
{},
technicianUpdateVisitUrl
,
fsr_file
);
res
=
await
postImage
New
(
data
,
{},
technicianUpdateVisitUrl
,
fsr_file
,
'fsr_file'
);
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
);
return
UpdateComplaintResponse
.
fromJson
(
res
);
}
else
{
}
else
{
res
=
await
post
(
data
,
technicianUpdateVisitUrl
,
{});
res
=
await
post
(
data
,
technicianUpdateVisitUrl
,
{});
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
.
body
);
return
UpdateComplaintResponse
.
fromJson
(
res
);
}
}
// debugPrint(res);
// debugPrint(res);
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
// debugPrint(res);
// debugPrint(res);
...
@@ -1447,18 +1468,14 @@ class ApiCalling {
...
@@ -1447,18 +1468,14 @@ class ApiCalling {
"attachment"
,
"attachment"
,
);
);
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
);
return
addReceiptPaymentResponse
.
fromJson
(
res
);
}
else
{
}
else
{
res
=
await
post
(
data
,
addPaymentReceiptSubmitUrl
,
{});
res
=
await
post
(
data
,
addPaymentReceiptSubmitUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
res
=
jsonDecode
(
res
.
body
);
return
addReceiptPaymentResponse
.
fromJson
(
res
);
// return addReceiptPaymentResponse.fromJson(res);
}
if
(
res
!=
null
)
{
return
res
;
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
return
addReceiptPaymentResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
return
null
;
...
@@ -3218,6 +3235,82 @@ class ApiCalling {
...
@@ -3218,6 +3235,82 @@ class ApiCalling {
}
}
}
}
static
Future
<
CommonResponse
?>
crmLeadDetailsAddContactAPI
(
empId
,
session
,
acc_id
,
name
,
mob1
,
designation
,
mob2
,
tel
,
email
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'acc_id'
:
(
acc_id
).
toString
(),
'name'
:(
name
).
toString
(),
'mob1'
:(
mob1
).
toString
(),
'designation'
:(
designation
).
toString
(),
'mob2'
:(
mob2
).
toString
(),
'tel'
:(
tel
).
toString
(),
'email'
:(
email
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadDetailsAddContactUrl
,
{});
if
(
res
!=
null
)
{
print
(
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
?>
crmLeadDetailsEditContactAPI
(
empId
,
session
,
contact_id
,
name
,
mob1
,
designation
,
mob2
,
tel
,
email
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'contact_id'
:
(
contact_id
).
toString
(),
'name'
:(
name
).
toString
(),
'mob1'
:(
mob1
).
toString
(),
'designation'
:(
designation
).
toString
(),
'mob2'
:(
mob2
).
toString
(),
'tel'
:(
tel
).
toString
(),
'email'
:(
email
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadDetailsEditContactUrl
,
{});
if
(
res
!=
null
)
{
print
(
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?> TpcIssueListApprovalAPI(
// static Future<CommonResponse?> TpcIssueListApprovalAPI(
// empId,
// empId,
...
...
lib/services/api_names.dart
View file @
c7ff2cec
...
@@ -128,6 +128,12 @@ const crmLeadListDistrictOnStateUrl = "${baseUrl_test}get_segment_on_team";
...
@@ -128,6 +128,12 @@ const crmLeadListDistrictOnStateUrl = "${baseUrl_test}get_segment_on_team";
const
crmLeadListSubLocOnDistrictUrl
=
"
${baseUrl_test}
get_sublocation_on_district"
;
const
crmLeadListSubLocOnDistrictUrl
=
"
${baseUrl_test}
get_sublocation_on_district"
;
const
crmLeadListContactPopUpUrl
=
"
${baseUrl_test}
crm_lead_list_contact_popup"
;
const
crmLeadListContactPopUpUrl
=
"
${baseUrl_test}
crm_lead_list_contact_popup"
;
const
crmLeadDetailsUrl
=
"
${baseUrl_test}
crm_lead_details"
;
const
crmLeadDetailsUrl
=
"
${baseUrl_test}
crm_lead_details"
;
const
crmLeadDetailsAddContactUrl
=
"
${baseUrl_test}
crm_lead_details_add_account"
;
const
crmLeadDetailsEditContactUrl
=
"
${baseUrl_test}
crm_lead_details_edit_contact"
;
const
crmLeadDetailsAddAppointmentUrl
=
"
${baseUrl_test}
crm_lead_details_add_appointment"
;
const
crmProspectListViewUrl
=
"
${baseUrl_test}
crm_prospect_list_view"
;
const
crmProspectListViewUrl
=
"
${baseUrl_test}
crm_prospect_list_view"
;
const
crmProspectListFilterSubmitUrl
=
"
${baseUrl_test}
crm_prospect_list_filter_submit"
;
const
crmProspectListFilterSubmitUrl
=
"
${baseUrl_test}
crm_prospect_list_filter_submit"
;
const
crmCheckAccountFieldsUrl
=
"
${baseUrl_test}
check_crm_add_account_fields"
;
const
crmCheckAccountFieldsUrl
=
"
${baseUrl_test}
check_crm_add_account_fields"
;
...
...
pubspec.yaml
View file @
c7ff2cec
...
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
...
@@ -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
# 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
# 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.
# of the product and file versions while build-number is used as the build suffix.
version
:
1.0.8
6
+9
0
version
:
1.0.8
7
+9
1
environment
:
environment
:
sdk
:
^3.7.2
sdk
:
^3.7.2
...
...
Prev
1
2
3
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