Table of Contents |
---|
...
Unreleased Encumbrance for Open Order if Pending Payment and Payment transactions were removed before
In Quesnelia there is a new UI feature to unrelease an encumbrance. If changed in the database, there is no need to change transaction summaries.
Prerequisites
Pending Payment and Payment transactions were removed before
...
{
"id": "f2715f25-8504-4698-afd0-3025aa779ac6",
"numTransactions": -1
}
Note : "orderId" possible to get from encumbrance "sourcePurchaseOrderId"
...
PUT {{protocol}}://{{url}}:{{okapiport}}/finance-storage/order-transaction-summaries/{{orderId}}
Request sample:
{
"id": "{{orderId}}",
"numTransactions": 1
}
Note : Change only "numTransactions" : "Total number of encumbrances(transactions) expected to update for this order(for your case should be 1)
...
Check that the encumbrance "amount" is not already included in the budget's "encumbered" amount.
If not then update budget's "encumbered" and "awaitingPayment" amounts :
- New "encumbered" = Prev. budget's "encumbered" + encumbrance "amount"
- New "awaitingPayment" = Prev. budget's "awaitingPayment" - encumbrance "amount"
PUT {{protocol}}://{{url}}:{{okapiport}}/finance/budgets/{{budgetId}}
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "id" : "{{budgetId}}", "_version" : 13, "name" : "ASIAHIST-FY2022", "budgetStatus" : "Active", "allowableEncumbrance" : 110.0, "allowableExpenditure" : 100.0, "allocated" : 23000.0, "awaitingPayment" : 0.0, "available" : 22850.0, "encumbered" : 54.65, "expenditures" : 0.0, "netTransfers" : 0.0, "unavailable" : 150.0, "overEncumbrance" : 0.0, "overExpended" : 0.0, "fundId" : "55f48dc6-efa7-4cfe-bc7c-4786efe493e3", "fiscalYearId" : "a06a95ef-5a96-4839-a2d9-ac484a25c261", "acqUnitIds" : [ ] "initialAllocation" : 23000.0, "allocationTo" : 0.0, "allocationFrom" : 0.0, "totalFunding" : 23000.0, "cashBalance" : 23000.0, "statusExpenseClasses" : [ ] } |
...
Unreleased Encumbrance for Closed Order if Pending Payment, Payment transactions and Invoice were removed beforeOrder if Pending Payment, Payment transactions and Invoice were removed before
In Quesnelia there is a new UI feature to unrelease an encumbrance. If changed in the database, there is no need to change transaction summaries.
Prerequisites
Pending Payment and Payment transactions were removed before
...
- New "encumbered" = Prev. budget's "encumbered" + encumbrance "amount"
- New "awaitingPayment" = Prev. budget's "awaitingPayment" - encumbrance "amount"
4. Get order transaction summary for order where we need to UnRelease encumbrance:
...
{
"id": "f2715f25-8504-4698-afd0-3025aa779ac6",
"numTransactions": -1
}
Note : "orderId" possible to get from encumbrance "sourcePurchaseOrderId"
...
PUT {{protocol}}://{{url}}:{{okapiport}}/finance-storage/order-transaction-summaries/{{orderId}}
Request sample:
{
"id": "{{orderId}}",
"numTransactions": 1
}
Note : Change only "numTransactions" : "Total number of encumbrances(transactions) expected to update for this order(for your case should be 1)
...
Check that the encumbrance "amount" is not already included in the budget's "encumbered" amount.
If not then update budget's "encumbered" and "awaitingPayment" amounts :
- New "encumbered" = Prev. budget's "encumbered" + encumbrance "amount"
- New "awaitingPayment" = Prev. budget's "awaitingPayment" - encumbrance "amount"
PUT {{protocol}}://{{url}}:{{okapiport}}/finance/budgets/{{budgetId}}
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "id" : "{{budgetId}}", "_version" : 13, "name" : "ASIAHIST-FY2022", "budgetStatus" : "Active", "allowableEncumbrance" : 110.0, "allowableExpenditure" : 100.0, "allocated" : 23000.0, "awaitingPayment" : 0.0, "available" : 22850.0, "encumbered" : 54.65, "expenditures" : 0.0, "netTransfers" : 0.0, "unavailable" : 150.0, "overEncumbrance" : 0.0, "overExpended" : 0.0, "fundId" : "55f48dc6-efa7-4cfe-bc7c-4786efe493e3", "fiscalYearId" : "a06a95ef-5a96-4839-a2d9-ac484a25c261", "acqUnitIds" : [ ] "initialAllocation" : 23000.0, "allocationTo" : 0.0, "allocationFrom" : 0.0, "totalFunding" : 23000.0, "cashBalance" : 23000.0, "statusExpenseClasses" : [ ] } |
...
Issue "All expected transaction already processed"
Overview
This issue cannot happen in Quesnelia and beyond.
This issue can be caused by different bugs, not all of which have been fixed in Lotus. An example is MODORDERS-432. There is also MODFISTO-260.
...
1. Get invoice transaction summary for invoice where need to update encumbrance reference:
GET {{protocol}}://{{url}}:{{okapiport}}/finance-storage/invoice-transaction-summaries/{{invoiceId}}
Response sample:
{
"id": "ae27a94f-6313-48c6-b887-2b703bafc25f",
"numPendingPayments": 1,
"numPaymentsCredits": 1
}
2. Get pending payments for invoice
GET all pending payments -> {{protocol}}://{{url}}:{{okapiport}}/finance-storage/transactions?query=sourceInvoiceLineId=={{invoiceLineId}}
Or
GET exact one pending payment where need to update encumbrance reference -> {{protocol}}://{{url}}:{{okapiport}}/finance-storage/transactions/{{pendingPaymentId}}
3. Update invoice transaction summary for invoice
PUT {{protocol}}://{{url}}:{{okapiport}}/finance-storage/invoice-transaction-summaries/{{invoiceId}}
Request sample:
{
"id": "{{invoiceId}}",
"numPendingPayments": 1,
"numPaymentsCredits": 1
}
Note : Change only "numPendingPayments" : "Total number of pending payments(transactions) expected to update for this invoice(for your case should be 1)
Don't update "numPaymentsCredits", because this is total number of payment transaction which will be created in invoice Pay time.
For your case I suppose body should be
{
"id": "{{invoiceId}}",
"numPendingPayments": 1,
"numPaymentsCredits": 15
}
4. Update pending payment with right encumbrance reference
PUT {{protocol}}://{{url}}:{{okapiport}}/finance-storage/transactions/{{pendingPaymentId}}
Request sample:
{
"id": "{{pendingPaymentId}}",
"amount": 4.6,
"awaitingPayment": {
"encumbranceId": "{{rightEncumbranceReference}}",
"releaseEncumbrance": true
},
"currency": "USD",
"fiscalYearId": "a06a95ef-5a96-4839-a2d9-ac484a25c261",
"fromFundId": "65032151-39a5-4cef-8810-5350eb316300",
"source": "Invoice",
"sourceInvoiceId": "ae27a94f-6313-48c6-b887-2b703bafc25f",
"sourceInvoiceLineId": "3e19f3c1-7a9f-4939-8083-06bf3afb4cae",
"transactionType": "Pending payment"
}
Success response : 204
Can not pay invoice that references the same POL and 2 different invoice lines
Overview
To resolve issues with duplicate encumbrances, it is best to use the encumbrance script. Fixing transaction summaries is no longer needed with Quesnelia.
The duplicate key is an encumbrance ID and it is attached to 11 invoice lines Kiwi. In the past...in a similar situation (with Juniper)
...
1. Get order transaction summary for order where we need to release encumbrance:
GET {{protocol}}://{{url}}:{{okapiport}}/finance-storage/order-transaction-summaries/{{orderId}}
Response sample:
{
"id": "f2715f25-8504-4698-afd0-3025aa779ac6",
"numTransactions": -1
}
3. Update order transaction summary for order
PUT {{protocol}}://{{url}}:{{okapiport}}/finance-storage/order-transaction-summaries/{{orderId}}
Request sample:
{
"id": "{{orderId}}",
"numTransactions": 1
}
Note : Change only "numTransactions" : "Total number of encumbrances(transactions) expected to update for this order(for your case should be 1)
2. Release encumbrance for which duplication error occurs
POST {{protocol}}://{{url}}:{{okapiport}}/finance/release-encumbrance/{encumbranceId}
Request body is Empty
3. Remove "encumbranceId" from fund distributions
...
A deleted invoice with pending payments impacted the budget
This should no longer happen, but either way fixing transaction summaries is no longer needed with Quesnelia.
A customer deleted an approved invoice. The pending payments still existed and were impacting the budget. The workaround we used was to update all of the transaction amounts to zero which updated the budget also.
...