Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Created date issue #986

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,13 @@ public DemandResponse updateAsync(DemandRequest demandRequest, PaymentBackUpdate
*/
newDemands.add(demand);
} else {
AuditDetails currAuditDetails = demand.getAuditDetails();
if (currAuditDetails != null) {
auditDetail.setCreatedTime(currAuditDetails.getCreatedTime());
auditDetail.setCreatedBy(currAuditDetails.getCreatedBy());
AuditDetails updateAuditDetail = util.getAuditDetail(requestInfo);
AuditDetails demandAuditDetails = demand.getAuditDetails();
if (demandAuditDetails != null) {
updateAuditDetail.setCreatedTime(demandAuditDetails.getCreatedTime());
updateAuditDetail.setCreatedBy(demandAuditDetails.getCreatedBy());
}
demand.setAuditDetails(auditDetail);
demand.setAuditDetails(updateAuditDetail);
for (DemandDetail detail : demand.getDemandDetails()) {

if (StringUtils.isEmpty(detail.getId())) {
Expand All @@ -265,7 +266,13 @@ public DemandResponse updateAsync(DemandRequest demandRequest, PaymentBackUpdate
detail.setId(UUID.randomUUID().toString());
detail.setCollectionAmount(BigDecimal.ZERO);
}
detail.setAuditDetails(auditDetail);
AuditDetails demandDetailAuditDetail = detail.getAuditDetails();
if (demandDetailAuditDetail != null) {
updateAuditDetail.setCreatedTime(demandDetailAuditDetail.getCreatedTime());
updateAuditDetail.setCreatedBy(demandDetailAuditDetail.getCreatedBy());
}

detail.setAuditDetails(updateAuditDetail);
detail.setDemandId(demandId);
detail.setTenantId(demand.getTenantId());
}
Expand Down
33 changes: 18 additions & 15 deletions frontend/mgramseva/lib/screeens/reports/monthly_ledger_report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,21 +89,24 @@ class _MonthlyLedgerReportState extends State<MonthlyLedgerReport>
SizedBox(
width: 10,
),
TextButton.icon(
onPressed: () {
if (reportProvider.selectedBillPeriod == null) {
Notifiers.getToastMessage(
context,
'${ApplicationLocalizations.of(context).translate(i18.common.SELECT_BILLING_CYCLE)}',
'ERROR');
} else {
reportProvider.getMonthlyLedgerReport(
download: true);
}
},
icon: Icon(Icons.download_sharp),
label: Text(ApplicationLocalizations.of(context)
.translate(i18.common.CORE_DOWNLOAD))),
Opacity(
opacity: 0,
child: TextButton.icon(
onPressed: () {
// if (reportProvider.selectedBillPeriod == null) {
// Notifiers.getToastMessage(
// context,
// '${ApplicationLocalizations.of(context).translate(i18.common.SELECT_BILLING_CYCLE)}',
// 'ERROR');
// } else {
// reportProvider.getMonthlyLedgerReport(
// download: true);
// }
},
icon: Icon(Icons.download_sharp),
label: Text(ApplicationLocalizations.of(context)
.translate(i18.common.CORE_DOWNLOAD))),
),
],
),
],
Expand Down