242 lines
11 KiB
Plaintext
242 lines
11 KiB
Plaintext
RAG Knowledge Chunks for CMH.HFA.Accounting.AccountsReceivable.CashReceiptApplications
|
|
---
|
|
Title: RcptAppLambda - Cash Receipt Application Lambda
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceiptApplications
|
|
• component: RcptAppLambda
|
|
• type: component
|
|
• domain: Cash Receipt Applications
|
|
• system: Oracle
|
|
Content: Purpose: AWS Lambda for posting cash receipt applications to Oracle and preprocessing receipt-to-installment applications.
|
|
Processing Logic:
|
|
• Post(): Posts single OracleReceiptApplication to Oracle via integration
|
|
• Pre(): Generates receipt applications by matching unapplied receipts to open installments
|
|
Key Rules:
|
|
• Lambda configuration: 256MB memory, 30s timeout
|
|
• Pre() method name truncated due to 127-character Lambda naming limit
|
|
• Returns empty list if no unapplied receipts or installments
|
|
Example Questions:
|
|
• How do I post a cash receipt application to Oracle?
|
|
• Which Lambda applies receipts to installments?
|
|
• What component preprocesses receipt applications?
|
|
---
|
|
Title: Cash Receipt Application Preprocessing Workflow
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceiptApplications
|
|
• component: RcptAppLambda
|
|
• type: workflow
|
|
• domain: Cash Receipt Applications
|
|
• system: Oracle
|
|
Content: Purpose: Automated workflow for applying unapplied cash receipts to open installments using greedy allocation.
|
|
Workflow Steps:
|
|
1. Filter receipts: UnappliedAmount > 0 AND ReceiptState = "Unapplied" (case-insensitive)
|
|
2. Filter installments: InstallmentBalanceDue > 0
|
|
3. Sort installments by InstallmentSequence (ascending)
|
|
4. For each unapplied receipt, iterate through sorted installments
|
|
5. Apply Math.Min(UnappliedAmount, InstallmentBalanceDue) to each installment
|
|
6. Decrement both UnappliedAmount and InstallmentBalanceDue
|
|
7. Create OracleReceiptApplication for each allocation
|
|
8. Stop when receipt fully applied or all installments paid
|
|
Example Questions:
|
|
• How are receipts automatically applied to installments?
|
|
• What algorithm allocates receipts to installments?
|
|
• In what order are installments paid?
|
|
---
|
|
Title: Receipt Application Allocation Algorithm
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceiptApplications
|
|
• component: RcptAppLambda
|
|
• type: rule
|
|
• domain: Cash Receipt Applications
|
|
• system: Oracle
|
|
Content: Purpose: Greedy allocation algorithm for applying cash receipts to installments in sequence order.
|
|
Algorithm Logic:
|
|
• AmountApplied = Math.Min(UnappliedAmount, InstallmentBalanceDue)
|
|
• Installments processed in InstallmentSequence order (ascending)
|
|
• Nested loop: outer (receipts), inner (installments)
|
|
• Breaks inner loop when receipt UnappliedAmount = 0
|
|
• Breaks outer loop when sum(InstallmentBalanceDue) = 0
|
|
Mutation:
|
|
• UnappliedAmount and InstallmentBalanceDue decremented in-place during processing
|
|
Key Rule: Earliest installments paid first until receipt exhausted or all installments satisfied.
|
|
Example Questions:
|
|
• How is application amount calculated?
|
|
• What order are installments processed?
|
|
• When does receipt application stop?
|
|
---
|
|
Title: OracleReceiptApplication DTO Structure
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceiptApplications
|
|
• component: OracleReceiptApplication
|
|
• type: concept
|
|
• domain: Cash Receipt Applications
|
|
• system: Oracle
|
|
Content: Purpose: Data structure representing a cash receipt application to an invoice installment.
|
|
Key Properties:
|
|
• ActionType (string): Application action (e.g., "Apply")
|
|
• AmountApplied (decimal): Amount applied to transaction
|
|
• ReceiptId (string): Oracle receipt identifier
|
|
• CustomerTrxId (string): Invoice transaction ID
|
|
• Instalment (string): Installment sequence number
|
|
• InstalmentId (string): Installment identifier
|
|
• ApplicationDate, AccountingDate (DateOnly): Application and GL dates
|
|
• Comments (string): Application notes
|
|
• ReceiptDate (DateOnly?), Currency (string), BusinessUnit (string)
|
|
• ReversalGlDate (DateOnly?), ApplicationId (string)
|
|
Example Questions:
|
|
• What fields define a receipt application?
|
|
• How is installment identified in receipt application?
|
|
• What dates are required for receipt application?
|
|
---
|
|
Title: PreProcessReceiptApplicaitonsDto - Receipt Application Input
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceiptApplications
|
|
• component: PreProcessReceiptApplicaitonsDto
|
|
• type: concept
|
|
• domain: Cash Receipt Applications
|
|
• system: Oracle
|
|
Content: Purpose: Input DTO for preprocessing cash receipt applications containing receipts and installments to match.
|
|
Properties:
|
|
• CashReceipts (IEnumerable<OracleReceipt>): Collection of cash receipts with UnappliedAmount
|
|
• Installments (IEnumerable<Installment>): Collection of installments with InstallmentBalanceDue
|
|
Processing Context:
|
|
• Used by RcptAppLambda.Pre() to generate receipt applications
|
|
• Receipts filtered for Unapplied state
|
|
• Installments filtered for open balances and sorted by sequence
|
|
Example Questions:
|
|
• What input is needed for receipt application preprocessing?
|
|
• How do I pass receipts and installments together?
|
|
• What DTO handles receipt-to-installment matching?
|
|
---
|
|
Title: CashReceiptApplicationOicIntegration - Receipt Application API Client
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceiptApplications
|
|
• component: CashReceiptApplicationOicIntegration
|
|
• type: component
|
|
• domain: Cash Receipt Applications
|
|
• system: Oracle OIC
|
|
Content: Purpose: Oracle Integration Cloud (OIC) client for posting cash receipt applications.
|
|
Endpoint:
|
|
• CashReceiptApplicationEndpoint: "/ic/api/integration/v1/flows/rest/CHI_RECEIPTAPP_API/1.0/ReceiptApplication?"
|
|
Processing Logic:
|
|
• PostCashReceiptApplicationAsync(): Serializes OracleReceiptApplication to JSON, POSTs to Oracle, deserializes response
|
|
• Inherits from OracleIntegrationBase for authentication
|
|
• Sets "Content-Type: application/json" header
|
|
Example Questions:
|
|
• What is the Oracle receipt application endpoint?
|
|
• How do I integrate with Oracle receipt application API?
|
|
• Which integration posts receipt applications?
|
|
---
|
|
Title: Unapplied Receipt Filtering Rule
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceiptApplications
|
|
• component: RcptAppLambda
|
|
• type: rule
|
|
• domain: Cash Receipt Applications
|
|
• system: Oracle
|
|
Content: Purpose: Defines criteria for identifying receipts eligible for automatic application.
|
|
Filter Criteria (both conditions must be true):
|
|
• UnappliedAmount > 0 (decimal comparison)
|
|
• ReceiptState equals "Unapplied" (case-insensitive, StringComparison.OrdinalIgnoreCase)
|
|
Processing:
|
|
• Applied using LINQ Where clauses on IEnumerable<OracleReceipt>
|
|
• Results used for automated application to installments
|
|
• Returns empty list if no matches found
|
|
Example Questions:
|
|
• What receipts qualify for automatic application?
|
|
• How are unapplied receipts identified?
|
|
• What conditions filter receipts for application?
|
|
---
|
|
Title: Open Installment Filtering and Sorting Rule
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceiptApplications
|
|
• component: RcptAppLambda
|
|
• type: rule
|
|
• domain: Cash Receipt Applications
|
|
• system: Oracle
|
|
Content: Purpose: Defines filtering and ordering criteria for installments eligible for receipt application.
|
|
Filter Criteria:
|
|
• InstallmentBalanceDue > 0 (only installments with outstanding balance)
|
|
Sort Order:
|
|
• OrderBy InstallmentSequence (ascending)
|
|
• Earliest installments processed first
|
|
Processing:
|
|
• Applied using LINQ Where and OrderBy on IEnumerable<Installment>
|
|
• Sorted list ensures sequential payment application
|
|
• Returns empty list if no installments with balance
|
|
Example Questions:
|
|
• How are installments sorted for receipt application?
|
|
• What installments are eligible for payment?
|
|
• In what sequence are installments paid?
|
|
---
|
|
Title: Receipt Application Standard Field Values
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceiptApplications
|
|
• component: RcptAppLambda
|
|
• type: rule
|
|
• domain: Cash Receipt Applications
|
|
• system: Oracle
|
|
Content: Purpose: Defines standard field values for automatically generated receipt applications.
|
|
Standard Values (Pre method):
|
|
• ActionType: "Apply"
|
|
• Comments: "" (empty string)
|
|
• ApplicationDate: DateOnly.FromDateTime(DateTime.Now)
|
|
• AccountingDate: DateOnly.FromDateTime(DateTime.Now)
|
|
Dynamic Values:
|
|
• AmountApplied: Math.Min(UnappliedAmount, InstallmentBalanceDue)
|
|
• ReceiptId: unappliedReceipt.ReceiptId.ToString()
|
|
• CustomerTrxId: installment.TransactionId.ToString()
|
|
• Instalment: installment.InstallmentSequence.ToString()
|
|
Example Questions:
|
|
• What ActionType is used for receipt applications?
|
|
• What date is set for application and accounting?
|
|
• How are receipt and transaction IDs set?
|
|
---
|
|
Title: Receipt Application Loop Termination Conditions
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceiptApplications
|
|
• component: RcptAppLambda
|
|
• type: rule
|
|
• domain: Cash Receipt Applications
|
|
• system: Oracle
|
|
Content: Purpose: Defines conditions that terminate receipt application processing loops.
|
|
Inner Loop Break (per receipt):
|
|
• Condition: unappliedReceipt.UnappliedAmount == 0
|
|
• Stops processing installments when current receipt fully applied
|
|
Outer Loop Break (all receipts):
|
|
• Condition: sortedInstallments.Sum(x => x.InstallmentBalanceDue) == 0
|
|
• Stops processing receipts when all installments fully paid
|
|
Processing:
|
|
• Inner loop breaks before moving to next receipt
|
|
• Outer loop breaks to avoid processing remaining receipts
|
|
• Optimizes processing by stopping when no work remains
|
|
Example Questions:
|
|
• When does receipt application processing stop?
|
|
• What conditions break application loops?
|
|
• How is early termination handled?
|
|
---
|
|
Title: Receipt-to-Installment Matching Strategy
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceiptApplications
|
|
• component: RcptAppLambda
|
|
• type: workflow
|
|
• domain: Cash Receipt Applications
|
|
• system: Oracle
|
|
Content: Purpose: Strategy for matching multiple receipts to multiple installments using nested iteration.
|
|
Matching Strategy:
|
|
• Outer loop: Iterate through unapplied receipts (unordered)
|
|
• Inner loop: Iterate through installments (ordered by sequence)
|
|
• While loop: Apply portions until receipt or installment exhausted
|
|
• Creates one OracleReceiptApplication per partial/full application
|
|
Allocation Behavior:
|
|
• Receipts applied to earliest installments first
|
|
• Single receipt can pay multiple installments
|
|
• Single installment can receive payments from multiple receipts
|
|
• Tracks remaining balances in-place during processing
|
|
Example Questions:
|
|
• How are multiple receipts matched to installments?
|
|
• Can one receipt pay multiple installments?
|
|
• What strategy allocates payments across installments?
|
|
---
|
|
This completes the RAG knowledge chunks for the CMH.HFA.Accounting.AccountsReceivable.CashReceiptApplications module. Each chunk is atomic, non-overlapping, and optimized for retrieval-augmented generation with precise technical details about receipt application processing.
|