Commit 14d01f4d authored by Sai Srinivas's avatar Sai Srinivas
Browse files

31-07-2025 By Sai Srinivas

Finance Module
parent 29665037
...@@ -95,7 +95,7 @@ class _PaymentlistpaymentrequisitionState ...@@ -95,7 +95,7 @@ class _PaymentlistpaymentrequisitionState
final requestLists = provider.paymentsList; final requestLists = provider.paymentsList;
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
appBar: appbar2( appBar: appbar2New(
context, context,
widget.pageTitleName, widget.pageTitleName,
provider.resetForm, provider.resetForm,
...@@ -140,6 +140,7 @@ class _PaymentlistpaymentrequisitionState ...@@ -140,6 +140,7 @@ class _PaymentlistpaymentrequisitionState
), ),
], ],
), ),
0xFFFFFFFF
), ),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: body:
...@@ -161,14 +162,40 @@ class _PaymentlistpaymentrequisitionState ...@@ -161,14 +162,40 @@ class _PaymentlistpaymentrequisitionState
shrinkWrap: true, shrinkWrap: true,
physics: AlwaysScrollableScrollPhysics(), physics: AlwaysScrollableScrollPhysics(),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return InkResponse(
onTap: () async {
var res = await Navigator.push(
context,
MaterialPageRoute(
builder:
(context) =>
Paymentdetailspaymentrequisition(
pageName:
widget.pageTitleName,
paymentRequestId:
requestLists[index].id,
),
settings: RouteSettings(
name:
"Paymentdetailspaymentrequisition",
),
),
);
if (routeSettingName ==
"Paymentdetailspaymentrequisition") {
print("pld");
provider.paymentsListAPI(context, '', '');
}
},
child: Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 10, horizontal: 10,
vertical: 10, vertical: 10,
), ),
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
horizontal: 10, horizontal: 10,
vertical: 10, vertical: 5,
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
...@@ -182,16 +209,15 @@ class _PaymentlistpaymentrequisitionState ...@@ -182,16 +209,15 @@ class _PaymentlistpaymentrequisitionState
flex: 1, flex: 1,
child: Container( child: Container(
height: 50, height: 50,
width: 35, width: 50,
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(3.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFFFFF3CE), color: AppColors.requested_bg_color,
borderRadius: BorderRadius.circular( shape: BoxShape.circle
8,
),
), ),
child: SvgPicture.asset( child: SvgPicture.asset(
"assets/svg/fin_ic.svg", "assets/svg/finance/rupee_ic.svg",
fit: BoxFit.scaleDown,
), ),
), ),
), ),
...@@ -206,16 +232,18 @@ class _PaymentlistpaymentrequisitionState ...@@ -206,16 +232,18 @@ class _PaymentlistpaymentrequisitionState
Text( Text(
requestLists[index] requestLists[index]
.receipientAccount!, .receipientAccount!,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontFamily: "JakartaMedium", fontFamily: "JakartaRegular",
fontSize: 14, fontSize: 14,
color: AppColors.semi_black, color: AppColors.semi_black,
), ),
), ),
Text( Text(
"${requestLists[index].amount}", "${requestLists[index].paymentDate}",
style: TextStyle( style: TextStyle(
fontFamily: "JakartaMedium", fontFamily: "JakartaRegular",
fontSize: 14, fontSize: 14,
color: AppColors.app_blue, color: AppColors.app_blue,
), ),
...@@ -224,179 +252,28 @@ class _PaymentlistpaymentrequisitionState ...@@ -224,179 +252,28 @@ class _PaymentlistpaymentrequisitionState
), ),
), ),
), ),
// Expanded( SizedBox(width: 10),
// flex: 2,
// child: Container(
// padding: EdgeInsets.symmetric(
// horizontal: 5,
// vertical: 10,
// ),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
// color: Color(0xFFE3FFE0),
// ),
// child: Center(
// child: Text(
// requestLists[index].refType!,
// textAlign: TextAlign.center,
// style: TextStyle(
// fontFamily: "JakartaMedium",
// fontSize: 14,
// color: Color(0xFF0D9C00),
// ),
// ),
// ),
// ),
// ),
],
),
Divider(
thickness: 0.5,
color: Color(0xFFD7D7D7),
),
...List.generate(5, (j) {
final headings = [
"To Account",
"Attachment",
"Request Mode",
"Payment Date",
"Note",
];
final subHeadings = [
requestLists[index].payAccount,
"View",
requestLists[index].requestMode,
// requestLists[index].attachmentDirFilePath
requestLists[index].paymentDate,
requestLists[index].description,
];
if (headings[j] == "Attachment" &&
requestLists[index]
.attachmentViewFileName ==
"") {
return SizedBox.shrink();
}
return Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded( Expanded(
flex: 3,
child: Text( child: Text(
headings[j], "₹${requestLists[index].amount}",
maxLines: 1,
textAlign: TextAlign.right,
style: TextStyle( style: TextStyle(
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
fontSize: 14, fontSize: 14,
color: AppColors.semi_black, color: AppColors.app_blue,
),
),
),
Expanded(
child: InkResponse(
onTap:
j != 1
? null
: () {
Navigator.push(
context,
MaterialPageRoute(
builder:
(
context,
) => Fileviewer(
fileName:
requestLists[index]
.attachmentViewFileName!,
fileUrl:
requestLists[index]
.attachmentDirFilePath!,
),
),
);
},
child: Text(
subHeadings[j] == ""
? "-"
: subHeadings[j] ?? "-",
style: TextStyle(
fontSize: 14,
color:
j == 1
? AppColors.app_blue
: Color(0xFF818181),
decoration:
j == 1
? TextDecoration
.underline
: TextDecoration.none,
decorationColor:
j == 1
? AppColors.app_blue
: AppColors.white,
),
), ),
), ),
), ),
], ],
), ),
);
}),
InkResponse(
onTap: () async {
var res = await Navigator.push(
context,
MaterialPageRoute(
builder:
(context) =>
Paymentdetailspaymentrequisition(
pageName:
widget.pageTitleName,
paymentRequestId:
requestLists[index].id,
),
settings: RouteSettings(
name:
"Paymentdetailspaymentrequisition",
),
),
);
if (routeSettingName ==
"Paymentdetailspaymentrequisition") {
print("pld");
provider.paymentsListAPI(context, '', '');
}
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Text(
"View Details",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
SizedBox(width: 5),
SvgPicture.asset(
"assets/svg/next_button.svg",
),
], ],
), ),
), ),
),
],
),
); );
}, },
), ),
......
...@@ -79,7 +79,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> { ...@@ -79,7 +79,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
final requestLists = provider.receiptsList; final requestLists = provider.receiptsList;
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
appBar: appbar2( appBar: appbar2New(
context, context,
widget.pageTitleName, widget.pageTitleName,
provider.resetForm, provider.resetForm,
...@@ -124,6 +124,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> { ...@@ -124,6 +124,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
), ),
], ],
), ),
0xFFFFFFFF
), ),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: body:
...@@ -143,14 +144,39 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> { ...@@ -143,14 +144,39 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
shrinkWrap: true, shrinkWrap: true,
physics: AlwaysScrollableScrollPhysics(), physics: AlwaysScrollableScrollPhysics(),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return InkResponse(
onTap: () async {
var res = await Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Paymentreceiptdetails(
pageName: widget.pageTitleName,
paymentRequestId:
requestLists[index].id,
),
settings: RouteSettings(
name: "Paymentreceiptdetails",
),
),
);
if (routeSettingName ==
"Paymentreceiptdetails") {
debugPrint("prd");
provider.paymentsListAPI(context, '', '');
}
// if (res == true) {
// provider.paymentsListAPI(context, '', '');
// }
},
child: Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 10, horizontal: 10,
vertical: 10, vertical: 10,
), ),
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
horizontal: 10, horizontal: 10,
vertical: 10, vertical: 5,
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
...@@ -164,16 +190,15 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> { ...@@ -164,16 +190,15 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
flex: 1, flex: 1,
child: Container( child: Container(
height: 50, height: 50,
width: 35, width: 50,
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(3.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFFFFF3CE), color: AppColors.requested_bg_color,
borderRadius: BorderRadius.circular( shape: BoxShape.circle
8,
),
), ),
child: SvgPicture.asset( child: SvgPicture.asset(
"assets/svg/fin_ic.svg", "assets/svg/finance/rupee_ic.svg",
fit: BoxFit.scaleDown,
), ),
), ),
), ),
...@@ -188,172 +213,45 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> { ...@@ -188,172 +213,45 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
Text( Text(
requestLists[index] requestLists[index]
.receipientAccount!, .receipientAccount!,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontFamily: "JakartaMedium", fontFamily: "JakartaRegular",
fontSize: 14, fontSize: 14,
color: AppColors.semi_black, color: AppColors.semi_black,
), ),
), ),
Text( Text(
"${requestLists[index].amount}", "${requestLists[index].receiptDate}",
style: TextStyle( style: TextStyle(
fontFamily: "JakartaMedium", fontFamily: "JakartaRegular",
fontSize: 14, fontSize: 14,
color: AppColors.app_blue, color: AppColors.grey_semi,
),
),
],
),
), ),
), ),
], ],
), ),
Divider(
thickness: 0.5,
color: Color(0xFFD7D7D7),
),
...List.generate(5, (j) {
final headings = [
"Receipt Account",
"Attachment",
"Request Mode",
"Receipt Date",
"Note",
];
final subHeadings = [
requestLists[index].receipientAccount,
"View",
requestLists[index].requestMode,
// requestLists[index].attachmentDirFilePath
requestLists[index].receiptDate,
requestLists[index].description,
];
if (headings[j] == "Attachment" &&
requestLists[index]
.attachmentViewFileName ==
"") {
return SizedBox.shrink();
}
return Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
headings[j],
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
), ),
), ),
SizedBox(width: 10),
Expanded( Expanded(
child: InkResponse( flex: 3,
onTap:
j != 1
? null
: () {
Navigator.push(
context,
MaterialPageRoute(
builder:
(
context,
) => Fileviewer(
fileName:
requestLists[index]
.attachmentViewFileName!,
fileUrl:
requestLists[index]
.attachmentDirFilePath!,
),
),
);
},
child: Text( child: Text(
subHeadings[j] == "" "₹${requestLists[index].amount}",
? "-" textAlign: TextAlign.right,
: subHeadings[j] ?? "-", maxLines: 1,
style: TextStyle(
fontSize: 14,
color:
j == 1
? AppColors.app_blue
: Color(0xFF818181),
decoration:
j == 1
? TextDecoration
.underline
: TextDecoration.none,
decorationColor:
j == 1
? AppColors.app_blue
: AppColors.white,
),
),
),
),
],
),
);
}),
InkResponse(
onTap: () async {
var res = await Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Paymentreceiptdetails(
pageName: widget.pageTitleName,
paymentRequestId:
requestLists[index].id,
),
settings: RouteSettings(
name: "Paymentreceiptdetails",
),
),
);
if (routeSettingName ==
"Paymentreceiptdetails") {
debugPrint("prd");
provider.paymentsListAPI(context, '', '');
}
// if (res == true) {
// provider.paymentsListAPI(context, '', '');
// }
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Text(
"View Details",
style: TextStyle( style: TextStyle(
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
fontSize: 14, fontSize: 14,
color: AppColors.app_blue, color: AppColors.app_blue,
), ),
), ),
SizedBox(width: 5),
SvgPicture.asset(
"assets/svg/next_button.svg",
), ),
], ],
), ),
),
),
], ],
), ),
),
); );
}, },
), ),
......
...@@ -225,6 +225,10 @@ class _SplashState extends State<Splash> { ...@@ -225,6 +225,10 @@ class _SplashState extends State<Splash> {
); );
spalshProvider.initPackageInfo(); spalshProvider.initPackageInfo();
spalshProvider.handleVersionCheck(context); spalshProvider.handleVersionCheck(context);
if (connection == 'Online') {
print("camer here");
spalshProvider.handleVersionCheck(context);
}
}); });
} }
...@@ -350,6 +354,13 @@ class _SplashState extends State<Splash> { ...@@ -350,6 +354,13 @@ class _SplashState extends State<Splash> {
default: default:
connection = 'Offline'; connection = 'Offline';
} }
if (connection == 'Online') {
print("camer here");
Provider.of<SplashVersionNotifier>(
context,
listen: false,
).handleVersionCheck(context);
}
return (connection == 'Online') return (connection == 'Online')
? SafeArea( ? SafeArea(
top: false, top: false,
......
...@@ -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.94+98 version: 1.0.95+99
environment: environment:
sdk: ^3.7.2 sdk: ^3.7.2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment