From 1027673bacd4b02da09492f9ab0c84bdb9e7cf48 Mon Sep 17 00:00:00 2001 From: Benjamin Ohene-Adu <201538805+Purplewells@users.noreply.github.com> Date: Thu, 6 Nov 2025 19:59:55 +0000 Subject: [PATCH] Capture amended and enhanced accounting Capture amended and enhanced accounting --- DataAquarium.Project.xml | 2 +- DataAquarium.Version.xml | 2 +- Sync.LT13085-Adub.xml | 608 ++++- app/App_Code/Helpers/QueueWorker.cs | 79 + app/App_Code/Helpers/SyncQueueHelper.cs | 51 + .../fee_collection_transaction_extra.cs | 18 + .../Services/ApplicationServices.generated.cs | 2 +- .../custom/Rules/SharedBusinessRules.cs | 109 +- .../fee_collection_transaction_extra.r104.cs | 2 +- app/Global.asax | 5 +- app/Global.asax.cs | 13 + app/Global.asax.zip | 46 + app/Web.Sitemap | 10 +- app/controllers/AccountGeneralLedger.xml | 6 +- app/controllers/AssessmentTarget.model.xml | 54 + app/controllers/AssessmentTarget.xml | 240 ++ app/controllers/AttendanceEvent.xml | 4 +- app/controllers/CashFlowStatement.xml | 18 +- app/controllers/Contact.xml | 11 +- app/controllers/EntityType.model.xml | 17 + app/controllers/EntityType.xml | 159 ++ app/controllers/IncomeAndExpenseTracker.xml | 10 +- app/controllers/IncomeExpenseSummary.xml | 16 +- app/controllers/K12StaffAssignment.model.xml | 6 +- app/controllers/K12StaffAssignment.xml | 4 +- .../ManualAccountJournalEntries.xml | 12 +- app/controllers/MeasurementType.model.xml | 14 + app/controllers/MeasurementType.xml | 144 ++ .../MeasurementTypeUnitMapping.model.xml | 18 + .../MeasurementTypeUnitMapping.xml | 126 ++ app/controllers/MeasurementUnit.model.xml | 14 + app/controllers/MeasurementUnit.xml | 144 ++ app/controllers/MiniFeeReminder.xml | 30 +- .../OrganizationPersonRoleStaff.model.xml | 8 +- .../OrganizationPersonRoleStaff.xml | 33 +- .../OrganizationPersonRoleStudent.xml | 2 +- app/controllers/PaymentRecords.xml | 35 + app/controllers/PerformanceIndicator.xml | 6 +- app/controllers/Product.xml | 22 +- app/controllers/SalaryComponent.model.xml | 3 +- app/controllers/SalaryComponent.xml | 8 +- app/controllers/SalaryComponentType.model.xml | 1 - app/controllers/SalaryComponentType.xml | 7 +- app/controllers/StudentFees.xml | 2 +- app/controllers/StudentGradeBookEntry.xml | 6 +- app/controllers/TargetAdjustment.model.xml | 28 + app/controllers/TargetAdjustment.xml | 180 ++ app/controllers/TargetAssignment.model.xml | 35 + app/controllers/TargetAssignment.xml | 191 ++ app/controllers/TargetEntity.model.xml | 13 + app/controllers/TargetEntity.xml | 139 ++ app/controllers/TargetLevel.model.xml | 11 + app/controllers/TargetLevel.xml | 129 ++ app/controllers/TargetTemplate.model.xml | 37 + app/controllers/TargetTemplate.xml | 220 ++ app/controllers/TargetTemplateScope.model.xml | 39 + app/controllers/TargetTemplateScope.xml | 215 ++ .../TargetTemplateScopeDetail.model.xml | 39 + app/controllers/TargetTemplateScopeDetail.xml | 192 ++ app/controllers/TransactionType.xml | 2 +- .../TransactionTypeRefund.model.xml | 16 + app/controllers/TransactionTypeRefund.xml | 150 ++ .../WorkBenchAssessmentTargets.xml | 95 + .../fee_collection_transaction.xml | 36 +- ...fee_collection_transaction_extra.model.xml | 21 +- .../fee_collection_transaction_extra.xml | 144 +- ..._collection_transaction_itemised.model.xml | 6 +- .../get_cashflow_inflow_outflow.xml | 128 ++ .../znCustomFeeDebtorsReminderNote.xml | 2 +- .../znCustomFeeDebtorsReminderNoteV2.xml | 56 +- .../znOrganizationPersonRoleStaff.xml | 26 +- app/controllers/znStaffAssignment.model.xml | 4 +- app/controllers/znStaffAssignment.xml | 16 +- app/controllers/znStudentFeesDetail.xml | 2 +- app/pages/AssessmentTarget.html | 13 + app/pages/CashFlowInflowOutflow.html | 14 + app/pages/EntityType.html | 13 + app/pages/HubAssessmentTarget.html | 13 + app/pages/MeasurementType.html | 13 + app/pages/MeasurementTypeUnitMapping.html | 13 + app/pages/MeasurementUnit.html | 13 + app/pages/MiniFeeReminder.html | 2 +- app/pages/TargetAdjustment.html | 13 + app/pages/TargetAssignment.html | 13 + app/pages/TargetEntity.html | 13 + app/pages/TargetLevel.html | 13 + app/pages/TargetTemplate.html | 13 + app/pages/TargetTemplateScope.html | 13 + app/pages/TargetTemplateScopeDetail.html | 13 + app/pages/TransactionTypeRefund.html | 13 + app/reports/CashFlowStatement_grid1.rdlc | 1456 ++++++------ .../HierarchicalCashFlowStatement_grid1.rdlc | 64 +- .../MiniFeeReminder_mini_bill_statement.rdlc | 16 +- ..._mini_bill_statement_with_instruction.rdlc | 30 +- app/reports/PaymentRecords_bank_manifest.rdlc | 2012 +++++++++++++++++ app/reports/PaymentRecords_grid1.rdlc | 406 +--- ...ollection_transaction_extra_editForm1.rdlc | 1057 +++++++++ ...on_transaction_extra_editForm1_Refund.rdlc | 1057 +++++++++ ...ee_collection_transaction_extra_grid1.rdlc | 910 ++++++++ ...collection_transaction_itemised_grid1.rdlc | 126 +- .../get_cashflow_inflow_outflow_grid1.rdlc | 855 +++++++ 101 files changed, 11060 insertions(+), 1426 deletions(-) create mode 100644 app/App_Code/Helpers/QueueWorker.cs create mode 100644 app/App_Code/Helpers/SyncQueueHelper.cs create mode 100644 app/Global.asax.cs create mode 100644 app/Global.asax.zip create mode 100644 app/controllers/AssessmentTarget.model.xml create mode 100644 app/controllers/AssessmentTarget.xml create mode 100644 app/controllers/EntityType.model.xml create mode 100644 app/controllers/EntityType.xml create mode 100644 app/controllers/MeasurementType.model.xml create mode 100644 app/controllers/MeasurementType.xml create mode 100644 app/controllers/MeasurementTypeUnitMapping.model.xml create mode 100644 app/controllers/MeasurementTypeUnitMapping.xml create mode 100644 app/controllers/MeasurementUnit.model.xml create mode 100644 app/controllers/MeasurementUnit.xml create mode 100644 app/controllers/TargetAdjustment.model.xml create mode 100644 app/controllers/TargetAdjustment.xml create mode 100644 app/controllers/TargetAssignment.model.xml create mode 100644 app/controllers/TargetAssignment.xml create mode 100644 app/controllers/TargetEntity.model.xml create mode 100644 app/controllers/TargetEntity.xml create mode 100644 app/controllers/TargetLevel.model.xml create mode 100644 app/controllers/TargetLevel.xml create mode 100644 app/controllers/TargetTemplate.model.xml create mode 100644 app/controllers/TargetTemplate.xml create mode 100644 app/controllers/TargetTemplateScope.model.xml create mode 100644 app/controllers/TargetTemplateScope.xml create mode 100644 app/controllers/TargetTemplateScopeDetail.model.xml create mode 100644 app/controllers/TargetTemplateScopeDetail.xml create mode 100644 app/controllers/TransactionTypeRefund.model.xml create mode 100644 app/controllers/TransactionTypeRefund.xml create mode 100644 app/controllers/WorkBenchAssessmentTargets.xml create mode 100644 app/controllers/get_cashflow_inflow_outflow.xml create mode 100644 app/pages/AssessmentTarget.html create mode 100644 app/pages/CashFlowInflowOutflow.html create mode 100644 app/pages/EntityType.html create mode 100644 app/pages/HubAssessmentTarget.html create mode 100644 app/pages/MeasurementType.html create mode 100644 app/pages/MeasurementTypeUnitMapping.html create mode 100644 app/pages/MeasurementUnit.html create mode 100644 app/pages/TargetAdjustment.html create mode 100644 app/pages/TargetAssignment.html create mode 100644 app/pages/TargetEntity.html create mode 100644 app/pages/TargetLevel.html create mode 100644 app/pages/TargetTemplate.html create mode 100644 app/pages/TargetTemplateScope.html create mode 100644 app/pages/TargetTemplateScopeDetail.html create mode 100644 app/pages/TransactionTypeRefund.html create mode 100644 app/reports/PaymentRecords_bank_manifest.rdlc create mode 100644 app/reports/fee_collection_transaction_extra_editForm1.rdlc create mode 100644 app/reports/fee_collection_transaction_extra_editForm1_Refund.rdlc create mode 100644 app/reports/fee_collection_transaction_extra_grid1.rdlc create mode 100644 app/reports/get_cashflow_inflow_outflow_grid1.rdlc diff --git a/DataAquarium.Project.xml b/DataAquarium.Project.xml index 5216890..40b1be7 100644 --- a/DataAquarium.Project.xml +++ b/DataAquarium.Project.xml @@ -58,6 +58,6 @@ Created On Date = CreatedDate - {"path":"C:\\Users\\adub\\Documents\\Code OnTime\\Publish\\LearnHub\\V08920250904","previewUrl":"","webConfigCustomizations":{"DebugMode":"false","SMTPDelivery":"network","SMTPFrom":"b.adu@dekakis.com","SMTPDefaultCredentials":"false","SMTPNetworkUserName":"b.adu@dekakis.com","SMTPNetworkPassword":"nanakillo,1970","SMTPEnableSSL":"true","SMTPNetworkPort":"465","SMTPClientDomain":"mail.ntchosting.com"}} + {"path":"C:\\Users\\adub\\Documents\\Code OnTime\\Publish\\LearnHub\\V08920251018","previewUrl":"","webConfigCustomizations":{"DebugMode":"false","CustomErrors":"Off","SMTPDelivery":"network","SMTPFrom":"b.adu@dekakis.com","SMTPDefaultCredentials":"false","SMTPNetworkUserName":"b.adu@dekakis.com","SMTPNetworkPassword":"nanakillo,1970","SMTPEnableSSL":"true","SMTPNetworkPort":"465","SMTPClientDomain":"mail.ntchosting.com"}} \ No newline at end of file diff --git a/DataAquarium.Version.xml b/DataAquarium.Version.xml index 490abc5..b3cfce5 100644 --- a/DataAquarium.Version.xml +++ b/DataAquarium.Version.xml @@ -1,3 +1,3 @@  - \ No newline at end of file + \ No newline at end of file diff --git a/Sync.LT13085-Adub.xml b/Sync.LT13085-Adub.xml index ced9999..fa68dca 100644 --- a/Sync.LT13085-Adub.xml +++ b/Sync.LT13085-Adub.xml @@ -14198,7 +14198,603 @@ INNER JOIN Person p ON p.PersonID = fct.PersonID LEFT JOIN zlkpFeeType zft ON zft.FeeTypeID = f.FeeTypeID where p.PersonID = @PersonID --where f.FeeID = @FeeID and p.PersonID = @PersonID -CodeGetFeeDetailssetFeeDescriptionAfterExecuteInsert|Update|CalculateSETTINGSabout:blankAlwaysfalsefalsefalseSETTINGSSETTINGS*LIBRARYabout:blankAlwaysfalsefalsefalseLIBRARYLIBRARY*ADMINabout:blankAlwaysfalsefalsefalseADMINADMIN*CalendarsAlwaysfalsefalsefalseCalendars*CalendarDashboardNational Eventsfalsefalsefalsematerial-icon-beenherematerial-icon-event_availableThis screen allows users to manage academic calendar, sessions (terms) and grading periods. Your current grading period should be marked as active while previous and upcoming grading periods should be marked as closed (InActive).Administrators, ContentEditorsSubject AreafalsefalsefalseSubject Areamaterial-icon-screen_search_desktopfalsefalsefalsematerial-icon-dvrA course is instance of a class that's offered at an educational instituition associated with an account.falsefalsefalsematerial-icon-watermaterial-icon-water +CodeGetFeeDetailssetFeeDescriptionAfterExecuteInsert|Update|CalculateAfterAfter_controller=fee_collection_transaction_itemised +_view=editForm1 +_template=fee_collection_transaction_itemised_editForm1.rdlc +TransactionID=TransactionIDTake Payment_controller=fee_collection_transaction +_view=editForm1 +_template=fee_collection_transaction_extra_editForm1.rdlc +TransactionID=TransactionIDtruetruefalse3falsefalseRadioButtonListgrid13falsefalseNfalsefalseRadioButtonListgrid1modal-fit-content +modal-max-sm +modal-auto-grow +falsefalsemodal-fit-content +modal-max-sm +modal-auto-grow +modal-content-stub-none +falsefalsemodal-fit-content +modal-max-md +modal-auto-grow +modal-content-stub-none +falsefalse42falsefalsemodal-fit-content +modal-max-sm +modal-auto-grow +modal-content-stub-none +falsefalseNewColumnmodal-max-md3falsefalsemodal-fit-content + +modal-auto-grow +modal-content-stub-none +falsefalseNewRowmodal-max-sm +modal-fit-content +modal-auto-grow +modal-content-stub-none +falsefalseEmployee NumberfalsefalsePrint To Current Bank_controller=PaymentRecords +_view=grid1 +_template=PaymentRecords_grid1.rdlc +_controller=PaymentRecords +_view=grid1_historical_runs +_template=PaymentRecords_grid1.rdlc +bank_manifesttrueIsCurrent = 1falseConfirmThis action will register payment. Do you want to continue ?material-icon-savegrid100focus-autofalsefalseConfirm & Process3falsefalseheader-noneheader-text-noneheader-text-none +modal-auto-growConfirm & ProcessExport To IPY_controller=fee_collection_transaction +_view=editForm1 +_template=fee_collection_transaction_itemised_editForm1.rdlc +TransactionID=TransactionID_controller=fee_collection_transaction_extra +_view=editForm1 +_template=fee_collection_transaction_itemised_editForm1.rdlc +TransactionID=TransactionIDheader-text-none +modal-auto-growtrue_controller=fee_collection_transaction_itemised +_view=editForm1 +_template=fee_collection_transaction_itemised_editForm1.rdlc +TransactionID=TransactionID_controller=fee_collection_transaction_extra +_view=editForm1 +_template=fee_collection_transaction_extra_editForm1.rdlc +TransactionID=TransactionIDfalsetrueCashflow Statement ReportPrint Cashlow LogsExport To ExcelExport To CSVPrint To Word DocSend To RSS APIExport To IPYgrid1grid1get_cashflow_inflow_outflowoverwriteChangesfalse$DefaultGridViewDescription$DefaultEditViewDescription$DefaultEditDescription$DefaultCreateViewDescription$DefaultNewDescriptionset @BusinessRules_EnableResultSet = 1 +-- Enable caching of the result set. Duration is specified in seconds. +-- set @BusinessRules_ResultSetCacheDuration = 30 EXEC zusp_get_cashflow_inflow_outflowset @BusinessRules_PreventDefault = 1 +-- implement insert hereset @BusinessRules_PreventDefault = 1 +-- implement update hereset @BusinessRules_PreventDefault = 1 +-- implement delete hereCashflow Inflow/Outflowtrue30falsefalse30falsefalse20falsefalse50falsefalse15falsefalseTransactionDate DESCCategoryfalsefalseDescriptionfalsefalsepivot1-row1-date-allfalsefalsepivot1-val1-sumfalsefalsepivot1-row1-column-date-allfalsefalsepivot1-row1-column-datefalsefalsepivot1-row1-column-date-yearfalsefalsepivot1-row1-column-year +pivot1-row2-month +falsefalsepivot1-val2-sumfalsefalsepivot1-row1-column-year +pivot1-row2-month +pivot1-title:"Monthly Cash Inflows and Outflows" +falsefalsepivot1-row1-column-year +pivot1-row2-month +pivot1-title:"Cash Inflows and Outflows Overtime" +falsefalsepivot2-row1-columnstacked +pivot1-title:"Comparison of inflow vs outflow composition across categories" +falsefalsepivot2-row1-columnstacked +pivot2-title:"Comparison of inflow vs outflow composition across categories" +falsefalsepivot1-val1-sum +pivot2-val1-sumfalsefalsepivot1-val2-sum +pivot2-val2-sumfalsefalsepivot2-row1-columnstacked +pivot2-title:"Comparison cashflows composition across categories" +falsefalsepivot2-row1-columnstacked +pivot2-title:"Comparison cashflows composition across categories" + +pivot3-row1-pie +pivot3-title:"CashEffect or CashFlowCategory" +falsefalsepivot1-val1-sum +pivot2-val1-sum +pivot3-val1-sumfalsefalsepivot2-row1-columnstacked +pivot2-title:"Comparison cashflows composition across categories" + +pivot3-row1-pie +pivot3-title:"CashFlowCategory Inflows Activities" +falsefalsepivot2-row1-columnstacked +pivot2-title:"Comparison cashflows composition across categories" + +pivot3-row1-pie +pivot3-title:"Cash Flow Breakdown by Category" +falsefalsepivot2-row1-columnstacked +pivot2-title:"Comparison cashflows composition across categories" + +pivot3-row1-pie +pivot3-title:"Cash Flow Breakdown by Category" + +pivot4-row1-pie +pivot4-title:"Cash Outflow Breakdown by Category" +falsefalsepivot1-val2-sum +pivot2-val2-sum +pivot4-val2-sumfalsefalsepivot5-row1-columnstacked +pivot5-title:"Identifying top inflow/outflow accounts"falsefalsepivot1-val1-sum +pivot2-val1-sum +pivot3-val1-sum +pivot5-val1-sumfalsefalsepivot5-row1-barstacked +pivot5-title:"Identifying top inflow/outflow accounts"falsefalsepivot1-val2-sum +pivot2-val2-sum +pivot4-val2-sum +pivot5-val2-sumfalsefalsepivot2-row1-columnstacked +pivot2-title:"Comparison cashflows composition across categories" + +pivot3-row1-pie +pivot3-title:"Cash Flow Breakdown by Category" + +pivot4-row1-pie +pivot4-title:"Cash Outflow Breakdown by Category" + +pivot6-row1-columnstacked +pivot6-title:"Comparison cashflows effect composition" +falsefalsepivot6-col1falsefalseConfirm & SaveThis action will register a new item in your inventory. Do you want to continue ?material-icon-savefalse[Sellable] == 1falsePricingUpdate ChangeConfirm & SaveThis action would commit changes to your item details. Do you want to continue ?material-icon-draft_orders20falsefalse20falsefalse12falsefalse[1]==[1]truefalsetruefalsepivot3-val1-sum +truefalse18pivot3-val1-sum +falsetruefalsetruefalsetruefalsepivot3-val1-sum +truefalsetruefalsetruefalsepivot3-val1-sum +truefalsetruefalsetruefalsepivot3-val1-sum +truefalsemodal-max-md +modal-fit-content +modal-auto-grow +content-stub-none +falsefalsepage-header-none +modal-max-md +modal-fit-content +modal-auto-grow +content-stub-none +falsefalsemodal-title-none +modal-max-sm +modal-fit-content +modal-auto-grow +content-stub-none +falsefalsemodal-title-none +modal-max-sm +modal-fit-content +modal-auto-grow +content-stub-none +falsefalsemodal-title-none +modal-max-sm +modal-auto-grow + +falsefalsemodal-when-sm +modal-title-none +modal-max-sm +modal-auto-grow + +falsefalsemodal-when-sm +modal-title-none +modal-max-sm +modal-auto-grow +modal-fit-content + +falsefalsemodal-when-sm +modal-title-none +modal-auto-grow +modal-fit-content + +falsefalsemodal-when-sm +modal-title-none +modal-auto-grow +content-stub-none + +falsefalsemodal-when-sm +modal-title-none +content-stub-none + +falsefalseEditStaticfalsefalseStaticfalsefalsemodal-max-sm +modal-title-none +content-stub-none + +falsefalsematerial-icon-savings +modal-max-sm +modal-title-none +content-stub-none + +falsefalsematerial-icon-savings +modal-max-sm +content-stub-none + +falsefalse2Write brief note ...falsefalse2Write brief note here ...falsefalsefalsefalse3falsefalsetruefalseStaticfalsefalseStaticfalsefalsetruefalseeditForm1_RefundEditClick To CloseEditClick To CloseEditModalEditeditForm1_RefundReviewheader-text-none +modal-auto-growClick To CloseEditModalReview PaymentEdit InLinematerial-icon-rate_reviewWho Receivedfalsefalsematerial-icon-savings +modal-max-xs +modal-fit-content +content-stub-none +header-title-none + +falsefalsetruefalsetruefalseCustomProcessRefundProcessRefundVersiontrueProcessRefundTransactionProcessRefundeditForm1_RefundEditTransactionTypeRefundIsActive = 1 +AND TransactionTypeCode != 'REFUND'3580falsefalseClosetruefalsefalsefalse2020Employee No.falsefalse20falsefalse252520truefalseStaff Numberfalsefalsetruefalsetruefalseaction-callfalseaction-emailfalseaction-emailfalsefalseaction-callfalsefalseaction-callfalsefalsefalsepivot1-row1-columnstacked-Year +pivot1-title:"Total Income vs. Total Expense"falsefalsepivot1-val1-sumfalsefalsepivot1-val2-sumfalsefalsepivot1-row1-columnstacked-Year +pivot1-title:"Total Income vs. Total Expense" + +pivot2-row1-columnstacked-Year +pivot2-row2-Month +pivot2-title:"Total Income vs. Total Expense Overtime"falsefalsepivot1-val1-sum + +pivot2-val1-sumfalsefalsepivot1-val2-sum +pivot2-val2-sumfalsefalsepivot3-row1-pie +pivot3-title:"Percentage of total expenses dedicated to each Category"falsefalsepivot1-val2-sum +pivot2-val2-sum +pivot3-val1-sumfalsefalsepivot1-val2-sum +pivot2-val2-sum +pivot3-val1-sum +pivot4-val1-sumfalsefalsepivot4-row1-pie +pivot4-title:"Percentage of total amount spent on each Budget"falsefalsepivot3-row1-pie +pivot3-title:"Percentage of total expenses dedicated to each Category" + +pivot5-row1-pie +pivot5-title:"Income Breakdown by Category"falsefalsepivot1-val1-sum +pivot2-val1-sum +pivot5-val1-sumfalsefalsepivot1-val1-sum +pivot2-val1-sum +pivot5-val1-sum +pivot6-val1-sumfalsefalsepivot4-row1-pie +pivot4-title:"Percentage of total amount spent on each Budget" + +pivot6-row1-pie +pivot6-title:"Percentage of total income generated under each Budget"falsefalsepivot6-row1-pie +pivot6-title:"Percentage of total amount spent on each Budget" + +pivot4-row1-pie +pivot4-title:"Percentage of total income generated under each Budget"falsefalsepivot6-row1-pie +pivot6-title:"Percentage of total amount spent on each Budget" + +pivot4-row1-pie +pivot4-title:"Percentage of total income generated under each Budget"falsefalsepivot1-val1-sum +pivot2-val1-sum +pivot5-val1-sum +pivot4-val1-sumfalsefalsepivot1-val2-sum +pivot2-val2-sum +pivot3-val1-sum +pivot6-val1-sumfalsefalsepivot1-row1-bar-year +pivot1-row2-bar-quarter +pivot1-title:"Overview of Budget Value By Quarter" + +pivot2-row1-bar-year +pivot2-row2-bar-quarter +pivot2-title:"Overview of Net Income Value By Quarter" + +pivot4-row1-column-year +pivot4-row2-month +pivot4-title:"Overview of Net Income By Year Month" + +falsefalsepivot1-col1 + +pivot3-row1-bar-year +pivot3-row2-bar-quarter +pivot3-title:"Overview of Net Income Value By Transaction Type" + + +pivot5-row1-column +pivot5-title:"Overview of net Income Value By Transaction Indicator" + +pivot7-row1-pie +pivot7-title:"Overview of Budget Allocation By Transaction Indicator" +falsefalsepivot3-row1-bar-year +pivot3-row2-bar-quarter +pivot3-title:"Overview of Budget Value By Quarter" + +pivot2-row1-bar-year +pivot2-row2-bar-quarter +pivot2-title:"Overview of Net Income Value By Quarter" + +pivot4-row1-column-year +pivot4-row2-month +pivot4-title:"Overview of Net Income By Year Month" + +falsefalsepivot3-col1 + +pivot1-row1-bar-year +pivot1-row2-bar-quarter +pivot1-title:"Overview of Net Income Value By Transaction Type" + + +pivot5-row1-column +pivot5-title:"Overview of net Income Value By Transaction Indicator" + +pivot7-row1-pie +pivot7-title:"Overview of Budget Allocation By Transaction Indicator" +falsefalsepivot2-val2-sum +pivot1-val1-sum +pivot4-val1-sum +pivot5-val1-sumfalsefalsepivot2-val2-sum +pivot3-val1-sum +pivot4-val1-sum +pivot5-val1-sumfalsefalsepivot3-col1 + +pivot1-row1-bar-year +pivot1-row2-bar-quarter +pivot1-title:"Overview of Net Income By Transaction Type" + + +pivot5-row1-column +pivot5-title:"Overview of net Income Value By Transaction Indicator" + +pivot7-row1-pie +pivot7-title:"Overview of Budget Allocation By Transaction Indicator" +falsefalsepivot3-row1-bar-year +pivot3-row2-bar-quarter +pivot3-title:"Overview of Budget Over Time" + +pivot2-row1-bar-year +pivot2-row2-bar-quarter +pivot2-title:"Overview of Net Income Value By Quarter" + +pivot4-row1-column-year +pivot4-row2-month +pivot4-title:"Overview of Net Income By Year Month" + +falsefalsepivot3-row1-bar-year +pivot3-row2-bar-quarter +pivot3-title:"Overview of Budget Over Time" + +pivot2-row1-bar-year +pivot2-row2-bar-quarter +pivot2-title:"Overview of Net Income OverTime" + +pivot4-row1-column-year +pivot4-row2-month +pivot4-title:"Overview of Net Income By Year Month" + +falsefalsepivot3-col1 + +pivot1-row1-bar-year +pivot1-row2-bar-quarter +pivot1-title:"Overview of Allocated Budget Value By Transaction Type" + + +pivot5-row1-column +pivot5-title:"Overview of net Income Value By Transaction Indicator" + +pivot7-row1-pie +pivot7-title:"Overview of Budget Allocation By Transaction Indicator" +falsefalsepivot3-row1-bar-year +pivot3-row2-bar-quarter +pivot3-title:"Overview of Spending Allocation Over Time" + +pivot2-row1-bar-year +pivot2-row2-bar-quarter +pivot2-title:"Overview of Net Income OverTime" + +pivot4-row1-column-year +pivot4-row2-month +pivot4-title:"Overview of Net Income By Year Month" + +falsefalsepivot3-row1-bar-year +pivot3-row2-bar-quarter +pivot3-title:"Overview of Income & Expenses OverTime" + +pivot2-row1-bar-year +pivot2-row2-bar-quarter +pivot2-title:"Overview of Net Income OverTime" + +pivot4-row1-column-year +pivot4-row2-month +pivot4-title:"Overview of Net Income By Year Month" + +falsefalsepivot3-col1 + +pivot1-row1-bar-year +pivot1-row2-bar-quarter +pivot1-title:"Overview of Allocated Budget Value By Transaction Type" + + +pivot5-row1-column +pivot5-title:"Total Net Income Value By Transaction Indicator" + +pivot7-row1-pie +pivot7-title:"Overview of Budget Allocation By Transaction Indicator" +falsefalsepivot5-val2-sum +pivot3-val1-sum +pivot4-val1-sum +pivot2-val1-sumfalsefalsepivot3-row1-bar-year +pivot3-row2-bar-quarter +pivot3-title:"Overview of Income & Expenses OverTime" + +pivot5-row1-bar-year +pivot5-row2-bar-quarter +pivot5-title:"Overview of Net Income OverTime" + +pivot4-row1-column-year +pivot4-row2-month +pivot4-title:"Overview of Net Income By Year Month" + +falsefalsepivot3-row1-bar-year +pivot3-row2-bar-quarter +pivot3-title:"Overview of Income & Expenses OverTime" + +pivot5-row1-bar-year +pivot5-row2-bar-quarter +pivot5-title:"Overview of Net Income OverTime" + +pivot4-row1-column-year +pivot4-row2-month +pivot4-title:"Overview of Net Income By Year Month" + +falsefalsepivot3-col1 + +pivot1-row1-bar-year +pivot1-row2-bar-quarter +pivot1-title:"Overview of Allocated Budget Value By Transaction Type" + + +pivot2-row1-column +pivot2-title:"Total Net Income Value By Transaction Indicator" + +pivot7-row1-pie +pivot7-title:"Overview of Budget Allocation By Transaction Indicator" +falsefalsepivot6-row1-pie +pivot6-title:"Overview of Budget distribution By Indicator" + +pivot8-row1-bar-year +pivot8-row2-bar-quarter +pivot8-title:"Budget Performance Chart"falsefalsepivot1-val1-sum +pivot6-val1-sum +pivot7-val1-sum +pivot8-val1-sumfalsefalsepivot6-row1-pie +pivot6-title:"Overview of Budget distribution By Indicator" + +pivot8-row1-bar +pivot8-title:"Budget Performance Chart"falsefalsepivot8-val2-sumfalsefalsepivot8-val3-sumfalsefalsepivot6-row1-pie +pivot6-title:"Overview of Budget distribution By Indicator" + +pivot8-row1-barstacked +pivot8-title:"Budget Performance Chart"falsefalsepivot5-val2-sum +pivot3-val1-sum +pivot4-val1-sum +pivot2-val1-sum +pivot9-val1-sumfalsefalsepivot1-val1-sum +pivot6-val1-sum +pivot7-val1-sum +pivot8-val1-sum +pivot9-val1-sumfalsefalsepivot1-val1-sum +pivot6-val1-sum +pivot7-val1-sum +pivot8-val1-sum +pivot9-val2-sumfalsefalsepivot3-col1 + +pivot1-row1-bar-year +pivot1-row2-bar-quarter +pivot1-title:"Overview of Allocated Budget Value By Transaction Type" + + +pivot2-row1-column +pivot2-title:"Total Net Income Value By Transaction Indicator" + +pivot7-row1-pie +pivot7-title:"Overview of Budget Allocation By Transaction Indicator" + +pivot9-row1-column +falsefalsepivot5-val2-sum +pivot3-val1-sum +pivot4-val1-sum +pivot2-val1-sum +pivot9-val2-sumfalsefalsepivot1-val1-sum +pivot6-val1-sum +pivot7-val1-sum +pivot8-val1-sum +pivot9-val1-sumfalsefalsepivot3-col1 + +pivot1-row1-bar-year +pivot1-row2-bar-quarter +pivot1-title:"Overview of Allocated Budget Value By Transaction Type" + + +pivot2-row1-column +pivot2-title:"Total Net Income Value By Transaction Indicator" + +pivot7-row1-pie +pivot7-title:"Overview of Budget Allocation By Transaction Indicator" + +pivot9-row1-column +pivot9-title:"Total of Budget Value, Total of Net Income by Indicator" + +falsefalsepivot10-row1-barstacked +pivot10-title:"Total Income breakdown by Category"falsefalsepivot8-val2-sum +pivot10-val2-sumfalsefalsepivot10-row1-donut +pivot10-title:"Total Income breakdown by Category"falsefalsepivot10-row1-donut +pivot10-title:"Total Income breakdown by Indicator Category"falsefalsepivot10-row1-donut +pivot10-title:"Total Income breakdown by Indicator Category" + +pivot11-row1-donut +pivot11-title:"Total Expense breakdown by Indicator Category"falsefalsepivot8-val3-sum +pivot11-val1-sumfalsefalsepivot10-row1-donut +pivot10-title:"Total Income breakdown by Indicator Category" + +pivot11-row1-donut +pivot11-title:"Total Expense breakdown by Indicator Category" +pivot11: hideblankfalsefalsepivot1-row1-line +pivot1-title:"Count of transactions over time"falsefalsepivot1-row1-line-date +pivot1-title:"Count of transactions over time"falsefalsepivot1-row1-line-date +pivot1-title:"Count of transactions by Transaction Date"falsefalsepivot2-row1-line-date +pivot2-title:"Count of transactions by Debit Account"falsefalsepivot3-row1-line-date +pivot3-title:"Count of transactions by Credit Account"falsefalsepivot1-row1-line-date +pivot1-title:"Count of transactions by Transaction Date" +pivot1: hideblankfalsefalsepivot2-row1-line-date +pivot2-title:"Count of transactions by Debit Account" +pivot2: hideblankfalsefalsepivot3-row1-line-date +pivot3-title:"Count of transactions by Credit Account" +pivot3: hideblankfalsefalsepivot2-row1-line-date +pivot2-title:"Count of transactions by Debit Account" +pivot2: hideblank + +pivot3-row1-columnstacked +pivot3-title:"Count of transactions by Debit Account" +pivot3: hideblankfalsefalsepivot3-val1-sumfalsefalsepivot4-val1-sumfalsefalsepivot2-row1-line-date +pivot2-title:"Count of transactions by Debit Account" +pivot2: hideblank + +pivot4-row1-columnstacked +pivot4-title:"Count of transactions by Debit Account" +pivot4: hideblankfalsefalsepivot2-row1-line-date +pivot2-title:"Count of transactions by Debit Account" +pivot2: hideblank + +pivot4-row1-columnstacked +pivot4-title:"Total amount of transactions by Debit Account" +pivot4: hideblankfalsefalsepivot3-row1-column +pivot3-title:"Total Amount of transactions by Credit Account" +pivot3: hideblankfalsefalsepivot3-row1-column +pivot3-title:"Total Amount of transactions by Credit Account" +pivot3: hideblankfalsefalsepivot3-val1-sum +pivot4-val1-sumfalsefalsepivot1-row1-column-top10-other-sortbyvalue +pivot1-title:"What is the distribution of attendance" + +pivot5-row1-column-top10-other-sortbyvalue +pivot5-title:"What is the distribution of attendance by GradeLevel"falsefalsepivot1-row1-column-top10-other-sortbyvalue +pivot1-title:"What is the distribution of attendance" + +pivot5-row1-column-top10-other-sortbyvalue +pivot5-title:"What is the distribution of attendance by GradeLevel" + +pivot2-col1falsefalsepivot1-row1-column-top10-other-sortbyvalue +pivot1-title:"What is the distribution of attendance" + +pivot5-row1-pie-top10-other-sortbyvalue +pivot5-title:"What is the distribution of attendance by GradeLevel" + +pivot2-col1falsefalsepivot10-col1 + +pivot12-row1-column-top10-other-sortbyvalue +pivot12-title:"What is the distribution of attendance"falsepivot2-val1-AVG +pivot7-val1-AVG +pivot8-val1-AVG +pivot10-val1-AVG +pivot12-val1-AVGfalsefalsepivot10-col1 + +pivot12-row1-column-top10-other-sortbyvalue +pivot12-title:"What is the distribution of average weighted score"falsepivot2-row1-column +pivot2-title:"What is the averge score across grade levels" + +pivot12-col1falsefalsepivot2-row1-column +pivot2-title:"What is the averge score across grade levels" + +pivot12-col1falsefalsePrint To PDFfalsefalsefalsefalse20falsefalse20falsefalse2020AdministratorsAdministratorsAdministratorsAdministratorsAdministratorsAdministratorsAdministrators20falsefalse20falsefalseWorkBenchTargetsoverwriteChangesfalseWorkBenchAssessmentTargetsAssessmentFormFormfalsetruefalseTargetLevelTargetAssignmentTargetsTemplateInstitutional learning goalsmaterial-icon-spa35falsefalse20falsefalse2015falsefalse20falsefalse15falsefalseTargetAdjustmentTarget LevelTarget LevelTarget AssignmentTARGET LEVELTARGET ASSIGNMENTTARGETS TEMPLATETARGET ADJUSTMENTA structured system for defining, assigning, and tracking learning and performance targets across students, teachers, and courses.truefalse20falsefalsemodal-max-smfalsefalsemodal-max-sm +modal-fit-contentfalsefalseNewColumntruefalseNewRowfalsefalsefalsefalsetruefalsetruefalsetruefalse20falsefalse20falsefalse2030falsefalsetruefalse3530falsefalse20falsefalse5% Wtfalsefalse20falsefalsetruefalsetruefalsetruefalsefalsefalsetruefalsetruefalseEnd DatefalsefalseStart Datefalsefalse20truefalseMEASUREMENT UNITMEASUREMENT TYPEMEASUREMENT TYPE MAPPINGmodal-max-xs +modal-fit-contentfalsefalsemodal-max-xs +modal-fit-contentfalsefalsemodal-max-xs +modal-fit-contentfalsefalsemodal-max-xs +modal-fit-contentfalsefalsemodal-max-xs +modal-fit-contentfalsefalsemodal-max-xs +modal-fit-contentfalsefalsetruefalsetrue1510falsefalseAuditNewColumnmodal-max-sm +modal-fit-contentfalsefalseASSESSMENT TARGETSmodal-max-xs +modal-fit-contentfalsefalseTARGET ENTITYTARGET TEMPLATE SCOPEmodal-max-xs +modal-fit-contentfalsefalsemodal-max-xs +modal-fit-contentfalsefalsetruefalsetruefalsetruefalsetruefalse5020falsefalse20falsefalse25falsefalse25TARGETS TEMPLATE SCOPETARGETS ASSESSMENT NewColumnAuditNewRowtruetrueASSESSMENT TARGETS truefalsetruefalseFieldNamefalsefalsetruefalsetruefalsetruefalseActionBarTargetActionfalseThe TargetTemplateScope is a bridge/lookup table that defines where and to whom a particular target template applies.TargetTemplateScopeTargetTemplateTargetTemplateTargetTemplateIDtrue2525truefalsetruefalsemodal-max-SM +modal-fit-content +modal-stub-content-nonefalsefalse20falsefalse20falsefalse20falsefalsemodal-fullscren +modal-fit-contentfalsefalse20falsefalse20falsefalse20falsefalseSETTINGSabout:blankAlwaysfalsefalsefalseSETTINGSSETTINGS*LIBRARYabout:blankAlwaysfalsefalsefalseLIBRARYLIBRARY*ADMINabout:blankAlwaysfalsefalsefalseADMINADMIN*CalendarsAlwaysfalsefalsefalseCalendars*CalendarDashboardNational Eventsfalsefalsefalsematerial-icon-beenherematerial-icon-event_availableThis screen allows users to manage academic calendar, sessions (terms) and grading periods. Your current grading period should be marked as active while previous and upcoming grading periods should be marked as closed (InActive).Administrators, ContentEditorsSubject AreafalsefalsefalseSubject Areamaterial-icon-screen_search_desktopfalsefalsefalsematerial-icon-dvrA course is instance of a class that's offered at an educational instituition associated with an account.falsefalsefalsematerial-icon-watermaterial-icon-water modal-max-xs modal-fit-content modal-dock-bottom @@ -14515,4 +15111,12 @@ material-icon-camera_front - Total billed, paid, and outstanding fee summary - Breakdown of current and historical billable items - Detection of unused advance payments (credit > debit) - - Optional carry-forward logic for future applicationmaterial-icon-account_balance_walletCashFlowAlwaysfalsefalsefalseCash Flow*material-icon-spaCashFlowStatementIncome & ExpenseCash EntriestrueClassBasedScoresAlwaysfalsefalsefalseClass Based Scores*ProcessClassScoresform1EditCBA Scoresmaterial-icon-arrow_drop_down_circleHub-AdmissionsCustomisationtruetrueApp CustomisationView App CustomisationHierarchicalCashFlowAlwaysfalsefalsefalseHierarchical Cash Flow*HierarchicalCashFlowStatementmaterial-icon-expandCash Flow HiertruetrueNet Cash FlowGeneral Account LedgerGeneral Account LedgersFiscal Periods15 \ No newline at end of file + - Optional carry-forward logic for future applicationmaterial-icon-account_balance_walletCashFlowAlwaysfalsefalsefalseCash Flow*material-icon-spaCashFlowStatementIncome & ExpenseCash EntriestrueClassBasedScoresAlwaysfalsefalsefalseClass Based Scores*ProcessClassScoresform1EditCBA Scoresmaterial-icon-arrow_drop_down_circleHub-AdmissionsCustomisationtruetrueApp CustomisationView App CustomisationHierarchicalCashFlowAlwaysfalsefalsefalseHierarchical Cash Flow*HierarchicalCashFlowStatementmaterial-icon-expandCash Flow HiertruetrueNet Cash FlowGeneral Account LedgerGeneral Account LedgersFiscal Periods15CashFlowInflowOutflowAlwaysfalsefalsefalseCash Flow Inflow Outflow*get_cashflow_inflow_outflowInflow Outflowtruematerial-icon-flowchartmaterial-icon-timelapseShows cash movement summary of how money enters and leaves your organisation.Produce a cash movement summary — showing how money enters and leaves your organization — directly from the general ledger.modal-max-sm +modal-fit-content +modal-auto-growHubAssessmentTargetAlwaysfalsefalsefalseHub Assessment Target*WorkBenchAssessmentTargetsmaterial-icon-spaHub-TargetstruetrueAssessment TargetsTargetsfalsefalsefalsematerial-icon-startmodal-max-xs +modal-fit-contentmodal-fit-content +modal-content-stub-nonefalsefalsefalseSpecifies the entity domain the target applies to (Course, GradeLevel, Teacher, Department, etc.). + +Supports global (applies to all entities of that type) or specific (applies only to selected entities) scopes. + +Enables you to assign targets without hardcoding anything in procedures or UI.Template Scope Detail \ No newline at end of file diff --git a/app/App_Code/Helpers/QueueWorker.cs b/app/App_Code/Helpers/QueueWorker.cs new file mode 100644 index 0000000..9a7cd60 --- /dev/null +++ b/app/App_Code/Helpers/QueueWorker.cs @@ -0,0 +1,79 @@ +using System; +using System.Data.SqlClient; +using System.Threading; +using System.Configuration; +using System.Web.Hosting; + +public static class QueueWorker +{ + private static Timer _timer; + private static bool _isRunning; + private static bool _initialized; + private static readonly object _lock = new object(); + + // How often to poll the queue + private static readonly TimeSpan _interval = TimeSpan.FromSeconds(30); + + public static void Start() + { + // Prevent duplicate initialization + if (_initialized) + return; + + lock (_lock) + { + if (_initialized) + return; + + _initialized = true; + + // Use HostingEnvironment.QueueBackgroundWorkItem to survive short recycles + HostingEnvironment.QueueBackgroundWorkItem(ct => + { + _timer = new Timer(ProcessQueue, null, TimeSpan.Zero, _interval); + }); + + Log("QueueWorker started at " + DateTime.Now); + } + } + + private static void ProcessQueue(object state) + { + if (_isRunning) return; + _isRunning = true; + + try + { + string connStr = ConfigurationManager.ConnectionStrings["zLearnHub"].ConnectionString; + using (var conn = new SqlConnection(connStr)) + using (var cmd = new SqlCommand("EXEC usp_ProcessSyncQueue", conn)) + { + conn.Open(); + cmd.ExecuteNonQuery(); + } + + Log("Processed SyncQueue at " + DateTime.Now); + } + catch (Exception ex) + { + Log("Error in QueueWorker: " + ex.Message); + } + finally + { + _isRunning = false; + } + } + + private static void Log(string message) + { + try + { + string path = HostingEnvironment.MapPath("~/App_Data/queueworker.log"); + System.IO.File.AppendAllText(path, message + Environment.NewLine); + } + catch + { + // ignore logging errors + } + } +} diff --git a/app/App_Code/Helpers/SyncQueueHelper.cs b/app/App_Code/Helpers/SyncQueueHelper.cs new file mode 100644 index 0000000..99c3e85 --- /dev/null +++ b/app/App_Code/Helpers/SyncQueueHelper.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Data.SqlClient; +using System.Linq; +using System.Web; +using System.Web.Script.Serialization; +using zLearnHub.Data; +using zLearnHub.Services; + +namespace zLearnHub.Helpers +{ + + + +/// +/// Summary description for SyncQueueHelper +/// +public static class SyncQueueHelper +{ + /// + /// Enqueue any entity into the SyncQueue table for background processing. + /// + /// The name of the entity/controller + /// Primary key of the entity + /// Action performed: Insert, Update, Delete + /// The row values to serialize as payload + /// Destination system, e.g., LMS, ERP + /// + + public static void Enqueue(string entityName, int entityId, string action, string entityValues, string targetSystem) + { + // Serialize the entity values to JSON + string payload = new JavaScriptSerializer().Serialize(entityValues); + + // Use SqlText helper provided by Code On Time + SqlText.ExecuteNonQuery(@" + INSERT INTO SyncQueue (EntityName, EntityID, Action, Payload, TargetSystem, CreatedAt, Status) + VALUES (@EntityName, @EntityID, @Action, @Payload, @TargetSystem, GETDATE(), 'Pending') + ", + new + { + EntityName = entityName, + EntityID = entityId, + Action = action, + Payload = payload, + TargetSystem = targetSystem + }); + } +} + +} \ No newline at end of file diff --git a/app/App_Code/Models/fee_collection_transaction_extra.cs b/app/App_Code/Models/fee_collection_transaction_extra.cs index de395d4..e26d018 100644 --- a/app/App_Code/Models/fee_collection_transaction_extra.cs +++ b/app/App_Code/Models/fee_collection_transaction_extra.cs @@ -13,6 +13,8 @@ public enum fee_collection_transaction_extraDataField TransDate, + DueDate, + FeeID, Status, @@ -105,6 +107,9 @@ public partial class fee_collection_transaction_extraModel : BusinessRulesObject [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)] private DateTime? _transDate; + [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)] + private DateTime? _dueDate; + [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)] private int? _feeID; @@ -263,6 +268,19 @@ public DateTime? TransDate } } + public DateTime? DueDate + { + get + { + return _dueDate; + } + set + { + _dueDate = value; + UpdateFieldValue("DueDate", value); + } + } + public int? FeeID { get diff --git a/app/App_Code/Services/ApplicationServices.generated.cs b/app/App_Code/Services/ApplicationServices.generated.cs index 095d32a..dd72dba 100644 --- a/app/App_Code/Services/ApplicationServices.generated.cs +++ b/app/App_Code/Services/ApplicationServices.generated.cs @@ -11,7 +11,7 @@ public virtual void Initialize() { ApplicationServices.FrameworkAppName = "LearnHub"; ApplicationServices.FrameworkSiteContentControllerName = "SiteContent"; - ApplicationServices.Version = "8.9.23.504"; + ApplicationServices.Version = "8.9.23.517"; ApplicationServices.HostVersion = "1.2.5.0"; var compilation = ((CompilationSection)(WebConfigurationManager.GetSection("system.web/compilation"))); var releaseMode = !compilation.Debug; diff --git a/app/App_Code/custom/Rules/SharedBusinessRules.cs b/app/App_Code/custom/Rules/SharedBusinessRules.cs index eef480d..9baff62 100644 --- a/app/App_Code/custom/Rules/SharedBusinessRules.cs +++ b/app/App_Code/custom/Rules/SharedBusinessRules.cs @@ -104,7 +104,7 @@ protected override void VirtualizeController(string controllerName) } //detail access controll formulation - if ((controllerName == "fee_collection_transaction" || controllerName == "fee_collection_transaction_itemised" || controllerName == "znfee_collection_transaction_itemised_detail") && !UserIsInRole("Administrators")) + if ((controllerName == "fee_collection_transaction" || controllerName == "fee_collection_transaction_itemised" || controllerName == "znfee_collection_transaction_itemised_detail" || controllerName == "fee_collection_transaction_extra") && !UserIsInRole("Administrators")) { // make the controller read-only by removing editing actions NodeSet("view[@id='grid1']").SelectActions("Delete").Delete(); @@ -119,6 +119,11 @@ protected override void VirtualizeController(string controllerName) } + else if (controllerName == "Contact" && UserIsInRole("AccountManagers")) + { + NodeSet("view[@id='grid1']").SelectView("grid1").SelectActions("New, Edit, Delete").Delete(); + } + if ((controllerName == "WorkBenchTheStock" || controllerName == "MovementMode" && !UserIsInRole("Administrators"))) { // make the controller read-only by removing editing actions @@ -133,16 +138,19 @@ protected override void VirtualizeController(string controllerName) NodeSet().SelectAction("Delete").Delete(); } + if (ControllerName == "fee_collection_transaction_extra") + { + NodeSet().SelectAction("Delete").Delete(); + } } - protected override void BeforeSqlAction(ActionArgs args, ActionResult result) { base.BeforeSqlAction(args, result); // Check if the request is trying to delete a payment in FeeCollections - if (args.Controller == "fee_collection_transaction" && args.CommandName == "Delete") + if (args.Controller == "fee_collection_transaction_extra" && args.CommandName == "Delete") { if (!UserIsInRole("Administrators, HeadTeachers")) { @@ -153,6 +161,22 @@ protected override void BeforeSqlAction(ActionArgs args, ActionResult result) } } + // Always call base AFTER your logic, not before — so your validation can cancel the action if needed + if (args.Controller == "fee_collection_transaction_extra" && args.CommandName.Equals("Delete", StringComparison.OrdinalIgnoreCase)) + { + // Check if the current user has one of the allowed roles + if (!(UserIsInRole("Administrators") || UserIsInRole("HeadTeachers"))) + { + // Block the delete command + result.Canceled = true; + + // Show a clear message to the user + result.ShowAlert("You do not have permission to delete payment records. Escalate to a higher authority."); + } + } + + base.BeforeSqlAction(args, result); + if (args.Controller == "account_general_ledger" && args.CommandName == "Delete") { if (!UserIsInRole("Administrators, HeadTeachers")) @@ -181,11 +205,25 @@ protected override void BeforeSqlAction(ActionArgs args, ActionResult result) if (status == "Received") { //throw new Exception("Received purchase orders cannot be edited."); - result.ShowAlert("You do not have permission to edit financial records. Please discuss with administrative head."); + result.ShowAlert("You do not have permission to edit PO record in already received. Please discuss with administrative head."); } } } + if (args.Controller == "Contact" && args.CommandName == "New") + { + if (UserIsInRole("AccountManagers")) + { + + //var status = Convert.ToString(SelectFieldValue("Status")); + //if (status == "Received") + //{ + //throw new Exception("Received purchase orders cannot be edited."); + result.ShowAlert("You do not have permission to create new student record. Please discuss with administrative head."); + //} + } + } + } @@ -210,7 +248,7 @@ protected override void AfterSqlAction(ActionArgs args, ActionResult result) } } - + [ControllerAction("StockTransactions", "Insert, Update, Calculate", ActionPhase.After)] public void AddOrUpdateStockTransaction() { @@ -382,30 +420,87 @@ public void process_fee_collection_transaction() } [ControllerAction("fee_collection_transaction", "Custom, ProcessRefund", ActionPhase.After)] - public void ProcessFeeRefund(int OriginalTransactionID, decimal RefundAmountToProcess) + //public void ProcessFeeRefund(int OriginalTransactionID, decimal RefundAmountToProcess) + public void ProcessFeeRefund(int OriginalTransactionID, decimal RefundAmountToProcess, string RefundReason, string NameOfRecepient) { + // Get connection string from configuration string connectionString = ConfigurationManager.ConnectionStrings["zLearnHub"].ConnectionString; + string ActionedBy = Context.User.Identity.Name; + try { using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); - using (SqlCommand command = new SqlCommand("usp_ops_p9_create_fee_refund_transaction_revised_2", connection)) + using (SqlCommand command = new SqlCommand("usp_ops_auto_p4_post_fee_transaction_refund", connection)) { command.CommandType = System.Data.CommandType.StoredProcedure; command.Parameters.AddWithValue("@TransactionID", OriginalTransactionID); command.Parameters.AddWithValue("@RefundAmountToProcess", RefundAmountToProcess); + command.Parameters.AddWithValue("@RefundReason", RefundReason); + command.Parameters.AddWithValue("@NameOfRecepient", NameOfRecepient); + // ADD this line to pass the user's name to the stored procedure + command.Parameters.AddWithValue("@ActionedBy", ActionedBy); command.ExecuteNonQuery(); } } // Optional: Add a user notification + Result.Canceled = true; + // 2. Refresh parent/related views (This should be placed AFTER setting Canceled=true or in a separate hook if needed, but often works here) Result.Refresh(); Result.RefreshChildren(); Result.ShowAlert("Refund processed successfully."); + } + catch (Exception ex) + { + Result.Canceled = false; // Keep the screen open on error + Result.ShowAlert("ERROR processing refund: " + ex.Message); + } } + [ControllerAction("fee_collection_transaction_extra", "Custom, ProcessRefundTransaction", ActionPhase.After)] + //public void ProcessFeeRefund(int OriginalTransactionID, decimal RefundAmountToProcess) + public void ProcessMultiFeeRefund(int OriginalTransactionID, decimal RefundAmountToProcess, string RefundReason, string NameOfRecepient) + { + + // Get connection string from configuration + string connectionString = ConfigurationManager.ConnectionStrings["zLearnHub"].ConnectionString; + string ActionedBy = Context.User.Identity.Name; + + try + { + using (SqlConnection connection = new SqlConnection(connectionString)) + { + connection.Open(); + using (SqlCommand command = new SqlCommand("usp_ops_auto_p4_post_fee_transaction_refund", connection)) + { + command.CommandType = System.Data.CommandType.StoredProcedure; + command.Parameters.AddWithValue("@TransactionID", OriginalTransactionID); + command.Parameters.AddWithValue("@RefundAmountToProcess", RefundAmountToProcess); + command.Parameters.AddWithValue("@RefundReason", RefundReason); + command.Parameters.AddWithValue("@NameOfRecepient", NameOfRecepient); + // ADD this line to pass the user's name to the stored procedure + command.Parameters.AddWithValue("@ActionedBy", ActionedBy); + command.ExecuteNonQuery(); + } + } + + // Optional: Add a user notification + Result.Canceled = true; + // 2. Refresh parent/related views (This should be placed AFTER setting Canceled=true or in a separate hook if needed, but often works here) + Result.Refresh(); + Result.RefreshChildren(); + Result.ShowAlert("Refund processed successfully."); + } + catch (Exception ex) + { + Result.Canceled = false; // Keep the screen open on error + Result.ShowAlert("ERROR processing refund: " + ex.Message); + } + } + [ControllerAction("ProcessPurchaseOrder", "Insert, Update, Calculate", ActionPhase.After)] public void process_purchase_order_from_order_details(int purchaseOrderID) { diff --git a/app/App_Code/custom/Rules/fee_collection_transaction_extra/fee_collection_transaction_extra.r104.cs b/app/App_Code/custom/Rules/fee_collection_transaction_extra/fee_collection_transaction_extra.r104.cs index 01213dc..aa25e9b 100644 --- a/app/App_Code/custom/Rules/fee_collection_transaction_extra/fee_collection_transaction_extra.r104.cs +++ b/app/App_Code/custom/Rules/fee_collection_transaction_extra/fee_collection_transaction_extra.r104.cs @@ -21,7 +21,7 @@ public partial class fee_collection_transaction_extraBusinessRules : zLearnHub.R public void r104Implementation(fee_collection_transaction_extraModel instance) { // This is the placeholder for method implementation. - instance.Description = instance.FeeDescription + '-' + "test"; + instance.Description = instance.FeeDescription; } } } diff --git a/app/Global.asax b/app/Global.asax index 5a262ef..d7350de 100644 --- a/app/Global.asax +++ b/app/Global.asax @@ -19,8 +19,7 @@ void Application_End(object sender, EventArgs e) void Application_Error(object sender, EventArgs e) { - - // Fires when an unhandled error occurs (default from CodeOnTime) + // Fires when an unhandled error occurs zLearnHub.Services.ApplicationServices.Error(); } @@ -38,6 +37,4 @@ void Session_End(object sender, EventArgs e) // or SQLServer, the event is not raised. zLearnHub.Services.ApplicationServices.SessionStop(); } - - \ No newline at end of file diff --git a/app/Global.asax.cs b/app/Global.asax.cs new file mode 100644 index 0000000..654307a --- /dev/null +++ b/app/Global.asax.cs @@ -0,0 +1,13 @@ +using System; +using System.Web; + +namespace LearnHub +{ + public class Global : HttpApplication + { + protected void Application_Start(object sender, EventArgs e) + { + QueueWorker.Start(); // initialize your background queue worker + } + } +} diff --git a/app/Global.asax.zip b/app/Global.asax.zip new file mode 100644 index 0000000..c663d6c --- /dev/null +++ b/app/Global.asax.zip @@ -0,0 +1,46 @@ +<%@ Application Language="C#" %> + + \ No newline at end of file diff --git a/app/Web.Sitemap b/app/Web.Sitemap index 2d66527..3de84f0 100644 --- a/app/Web.Sitemap +++ b/app/Web.Sitemap @@ -30,13 +30,7 @@ - - - - - - - + @@ -50,6 +44,7 @@ + @@ -105,6 +100,7 @@ + diff --git a/app/controllers/AccountGeneralLedger.xml b/app/controllers/AccountGeneralLedger.xml index a8da723..f3f95e2 100644 --- a/app/controllers/AccountGeneralLedger.xml +++ b/app/controllers/AccountGeneralLedger.xml @@ -41,7 +41,7 @@ from "dbo"."account_general_ledger" "account_general_ledger" - + @@ -69,10 +69,10 @@ from "dbo"."account_general_ledger" "account_general_ledger" Ref No. - + Debit - + Credit - + @@ -87,7 +87,7 @@ from "dbo"."K12StaffAssignment" "K12StaffAssignment" - + diff --git a/app/controllers/ManualAccountJournalEntries.xml b/app/controllers/ManualAccountJournalEntries.xml index 9146e60..37b24d2 100644 --- a/app/controllers/ManualAccountJournalEntries.xml +++ b/app/controllers/ManualAccountJournalEntries.xml @@ -38,12 +38,12 @@ from "dbo"."manual_account_journal_entries" "manual_account_journal_entries" - + - + @@ -79,10 +79,10 @@ from "dbo"."manual_account_journal_entries" "manual_account_journal_entries" $DefaultGridViewDescription - - - - + + + + - - + - - + - + + + @@ -228,6 +226,16 @@ from "dbo"."vw_fee_collection_accounting_ledger_mini_fee_reminder" "vw_fee_colle + + + + + + + + + + @@ -323,10 +331,8 @@ PersonID = @Arguments_SelectedValues]]> - - diff --git a/app/controllers/OrganizationPersonRoleStaff.model.xml b/app/controllers/OrganizationPersonRoleStaff.model.xml index 5e07cb5..1c9d772 100644 --- a/app/controllers/OrganizationPersonRoleStaff.model.xml +++ b/app/controllers/OrganizationPersonRoleStaff.model.xml @@ -1,5 +1,5 @@  - + @@ -21,8 +21,7 @@ - - + @@ -30,6 +29,9 @@ + + + diff --git a/app/controllers/OrganizationPersonRoleStaff.xml b/app/controllers/OrganizationPersonRoleStaff.xml index 993e3d2..0da38fc 100644 --- a/app/controllers/OrganizationPersonRoleStaff.xml +++ b/app/controllers/OrganizationPersonRoleStaff.xml @@ -8,7 +8,6 @@ select ,"OrganizationPersonRole"."OrganisationID" "OrganisationID" ,"Organisation"."Name" "Organisation" ,"OrganizationPersonRole"."PersonID" "PersonID" - ,"Person"."IdentificationCode" "UPN" ,"Person"."FirstName" "FirstName" ,"Person"."LastName" "LastName" ,"Person"."PhoneNo" "PhoneNo" @@ -16,6 +15,9 @@ select ,"Person"."PhotoUrl" "PhotoUrl" ,"Person"."SocialSecurityNumber" "SSNo" ,"Person"."BankName" "BankName" + ,"Person"."Owner" "PersonOwner" + ,"Person"."IdentificationCode" "IdentificationCode" + ,"Person"."AccountNo" "AccountNo" ,"OrganizationPersonRole"."EntryDate" "EntryDate" ,"OrganizationPersonRole"."ExitDate" "ExitDate" ,"OrganizationPersonRole"."RoleID" "RoleID" @@ -45,16 +47,18 @@ from "dbo"."OrganizationPersonRole" "OrganizationPersonRole" - + - - + + + + @@ -77,10 +81,14 @@ from "dbo"."OrganizationPersonRole" "OrganizationPersonRole" $DefaultGridViewDescription @@ -64,6 +68,7 @@ from "dbo"."zlkpSalaryComponents" "zlkpSalaryComponents"