# L/G lifecycle

Use this page to find an existing letter of guarantee (L/G), review its stage, and follow the
available approval, return, closure, liquidation, cancellation, extension, deduction, or increase
branch.

## L/G lifecycle at a glance

An L/G is a saved letter-of-guarantee record that moves through product stages while its approval,
active use, return, and closure work is handled. The L/G list uses these stage labels:

| Stage label |
| --- |
| **Draft** |
| **Awaiting Approval** |
| **Approved** |
| **Active** |
| **Due for Return** |
| **Expired** |
| **Returned** |
| **Closed** |
| **Cancelled** |
| **Liquidated** |

The list presents stage tabs for early, approval, active, returned, closed, cancelled, liquidated, and
expired L/G work. Early L/G work appears in the **All** and **Draft** views.

Find an existing L/G by selecting its stage tab in the L/G list. On a saved record, the available
actions are grouped as follows:

| Work | Available actions |
| --- | --- |
| Approval | **Request approval**, **Approve**, **Cancel**, **Reject approval request** |
| Stage movement | **Due for Return**, **Returned**, **Liquidated**, **Active** |
| Record branches | **LG Extensions**, **LG Deductions**, **LG Increase** |

The stage, recommendation state, approval process, and permissions determine which action appears.

```mermaid
stateDiagram-v2
    state "Requested" as sRequested
    state "Awaiting Approval" as sAwaitingApproval
    state "Rejected Approval" as sRejectedApproval
    state "Approved" as sApproved
    state "Active" as sActive
    state "Due for Return" as sDueForReturn
    state "Returned" as sReturned
    state "Liquidated" as sLiquidated
    state "Cancelled" as sCancelled
    sRequested --> sAwaitingApproval: Request approval
    sAwaitingApproval --> sApproved: Approve
    sAwaitingApproval --> sRejectedApproval: Reject approval request
    sAwaitingApproval --> sRequested: Cancel approval request
    sApproved --> sActive: Active
    sActive --> sDueForReturn: Due for Return
    sDueForReturn --> sReturned: Returned
    sActive --> sLiquidated: Liquidated
    sRequested --> sCancelled: Cancel
```

Use the later sections according to the work you need.

| If you need to… | Go to |
| --- | --- |
| Check the record, subscription, and approval conditions | [Before you start](#before-you-start) |
| Reach the list and choose a stage view | [Find an L/G](#find-an-lg) |
| Recognize the saved-record surface and its supporting tabs | [Understand the L/G screen](#understand-the-lg-screen) |
| Review the starting fields for a new record | [Review a new-record surface](#review-a-new-record-surface) |
| Submit an L/G or follow approval | [Submit and approve an L/G](#submit-and-approve-an-lg) |
| Return, close, liquidate, or cancel an L/G | [Return, close, liquidate, or cancel an L/G](#return-close-liquidate-or-cancel-an-lg) |
| Extend, deduct, increase, or enable editing | [Handle extensions and editing branches](#handle-extensions-and-editing-branches) |
| Correct a blocked action or validation problem | [Fix errors and continue](#fix-errors-and-continue) |
| Continue to the next owned record task | [Continue after the lifecycle action](#continue-after-the-lifecycle-action) |
| Create a new L/G | [Create an L/G](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/create-l-g) |
| Use the finance L/G view | [L/G finance view](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/l-g-finance-view) |
| Work from the sales-job record | [Sales job record](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/sales-job-record) |

![Use the stage tabs and visible list rows to identify the L/G stage view.](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/9cd3ab70e67bca54819fa9f9540f9c7b.png)

## Before you start

An existing-record lifecycle action starts from a saved L/G in the L/G list or its record surface;
the list and details areas appear only in their applicable job, subscription, and page contexts.

| Prepare | Why it matters |
| --- | --- |
| Open the L/G list from an open job record. | The list is available from the job context. |
| Use a subscription that includes the Letter of Guarantee module. | The L/G list checks the Letter of Guarantee module subscription before it appears. |
| Open the details surface for an existing, saved record rather than the new-record popup. | Existing-record actions require saved information and no unsaved changes. |
| Use the L/G details view in the **L/G** tab. | The details surface is shown in that tab. |
| Have the permission required by the action. | Approval controls depend on your account's permission and the approval settings. |
| Confirm the person or role who must approve the L/G before selecting an approval action. | Approval actions require the applicable approval authority. |

The saved-record action surface is available when the L/G is saved and has no unsaved changes. The
approval branch also checks whether approval applies, whether your account may use it, and whether
you are finance responsible. Keep the record saved before starting a stage action.

**Note:** Before selecting **Save** or the available delete action, identify the person or role with
approval authority when your approval process requires it.

## Find an L/G

The L/G list is the place to choose a stage view, read the available rows, and open an existing
record. Work from the headers currently shown in your list.

**Prerequisites**

- An open job record is available.
- The Letter of Guarantee module is included in your subscription.
- You know the stage view in which the saved L/G is listed.

**Steps**

1. Open the L/G list in the job record.
2. Select the stage view that matches the record you need.

   | If you need to… | Select |
   | --- | --- |
   | Review the list without a stage restriction | **All** |
   | Review draft or requested work | **Draft** |
   | Review approval work | **Awaiting Approval** |
   | Review approved work | **Approved** |
   | Review active work | **Active** |
   | Review L/Gs due for return | **Due for Return** |
   | Review expired work | **Expired** |
   | Review returned work | **Returned** |
   | Review closed work | **Closed** |
   | Review cancelled work | **Cancelled** |
   | Review liquidated work | **Liquidated** |

3. Read these visible headers before selecting a record: `L/G no.`, `Beneficiary`, `L/G issuer`,
   `Bank`, `Requested value`, `Issued value`, `Current value`, `Issue date`, `Expiry date`, `Job No`,
   `Stage`, `L/G type`, and `Increase amount`.
4. Select the row for the saved L/G you need to review.
5. Use the list toolbar when the related list task is required: **Refresh**, **Table Layout**,
   or **Settings**.
6. Select **Export** when the list provides the export control.
7. Select **Delete** when the record is eligible for deletion.

![Recognize the L/G list headers, stage tabs, and toolbar buttons.](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/c4634e2be2090eec18a27b7a65bd4ab0.png)

**Result:** The L/G is ready to open from its current stage list, and the headers show which record
row to choose. The columns depend on the current list layout, so use the headers visible on
your screen.

## Understand the L/G screen

The saved L/G screen combines record information, stage actions, controlled-editing branches, and
supporting tabs. A control appears only when its stage and guard conditions allow it.

The saved-record surface includes approval, return, terminal, and branch actions. Recommendation
controls appear at or beyond the requested stage when the corresponding sales or finance
recommendation is required.

The supporting tabs are **Comments**, **Attachment**, and **Last Modifications**. The screen also
contains the deduction, extension, and increase tab branches. Use those branches for their own
supporting work; they do not replace the stage action for the L/G record.

If a saved action produces no visible response, use the recovery guidance in
[Fix errors and continue](#fix-errors-and-continue).

### Review a new-record surface

The new-record surface collects the starting L/G information before later lifecycle actions become
relevant. Use the [Create an L/G](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/create-l-g) page for the complete creation procedure.

The surface can contain **Expiry Date**, **On Behalf of**, **LG Type**, **Confirmation Of The LG
Requirement**, **Confirmation Of The Financial Viability**, **Extension Period**, **Expiration date**,
and **Reason**. **LG Type** has these choices: **Bid bond**, **Down payment guaranty**,
**Performance bond**, and **Warranty bond**. The confirmation fields use these values:

| Field | Values |
| --- | --- |
| **Confirmation Of The LG Requirement** | **Yes** or **No** |
| **Confirmation Of The Financial Viability** | **Yes** or **No** |

**On Behalf of** uses the vendor choices available in the record's vendor list.

The new-record surface provides **Save** and **Save and Close**. Lifecycle work starts after a saved
record is available.

## Submit and approve an L/G

Approval is the controlled review path that moves a saved L/G from requested work through approval
and into the active stage when the applicable controls and permissions allow it.

| Current stage or condition | Control | Product direction |
| --- | --- | --- |
| Requested work ready for the approval path | **Request approval** | The action prepares the L/G for **Awaiting Approval**. |
| Approval is allowed for the current user | **Approve** | The action prepares the L/G for **Approved**. |
| An approval request is open | **Cancel approval request** | The request is cancelled through the unsubmission preparation branch. |
| An approval request is open and rejection is allowed | **Reject approval request** | The L/G is prepared for **Rejected Approval**. |
| An approved L/G can enter active use | **Active** | The action uses the submission preparation branch for the active stage. |

**Prerequisites**

- The L/G is saved.
- The current stage and approval condition match one row in the table.
- The approval process and your approval permission allow the approval action shown in the record
  action area.
- The person or role responsible for approval has been identified before the approval action.

**Steps**

1. Open the saved L/G and read its current stage.
2. Select the control that matches the L/G's current stage and approval condition.

   | If you need to… | Select |
   | --- | --- |
   | Submit requested work for approval | **Request approval** |
   | Approve an L/G awaiting approval | **Approve** |
   | Withdraw an approval request | **Cancel approval request** |
   | Reject an approval request | **Reject approval request** |
   | Move an approved L/G into active use | **Active** |

3. Read the stage shown on the record before starting the next lifecycle branch.

**Result:** The L/G shows the stage exposed by the approval control you used: **Awaiting Approval**,
**Rejected Approval**, **Approved**, or **Active** when the corresponding preparation completes.

## Return, close, liquidate, or cancel an L/G

Return and terminal actions move an L/G out of active or approval-related work into the corresponding
return, closed, liquidated, expired, or cancelled view.

| Control | Stage condition or branch | Resulting stage |
| --- | --- | --- |
| **Due for Return** | The current L/G can enter the due-for-return branch. | The record enters the due-for-return stage. |
| **Returned** | The L/G is in the returned preparation branch and the return information is accepted. | The record is recorded as returned. |
| **Liquidated** | The L/G can enter liquidation. | The record enters liquidation. |
| **Cancel** | The current L/G permits cancellation. | The record enters the cancelled stage. |
| **Closed** | The close preparation branch is available. | The record is closed. |

**Prerequisites**

- The L/G is saved.
- The current stage shows the matching action in the record action area.
- You have the permission required for that control.
- For a return action, the return information required by the popup is available.

**Steps**

1. Open the saved L/G and read its current stage.
2. Choose the action that matches the record's required outcome.

   | If you need to… | Select |
   | --- | --- |
   | Mark the L/G due for return | **Due for Return** |
   | Record that the L/G was returned | **Returned** |
   | Enter the liquidation branch | **Liquidated** |
   | Cancel the L/G | **Cancel** |
   | Close the L/G | **Closed** |

3. Read the resulting stage before leaving the record.

**Result:** The L/G is shown in the stage view produced by the control: due for return, returned,
liquidated, cancelled, expired, or closed. The available result depends on the current-stage guard.

## Handle extensions and editing branches

Extension, deduction, and increase branches change the controlled information on an existing L/G;
they are separate from the main approval and return actions.

| If you need to… | Select or use | Fields handled |
| --- | --- | --- |
| Extend the L/G as a warranty bond | **Extend As Warranty Bond** | **Extension Period**, **Expiration date**, and **Reason** |
| Enter a deduction | **LG Deductions** | **LG Deduction Date**, **LG Deduction Percentage**, and **Reason** |
| Enter an increase | **LG Increase** | **LG Increase Date**, **LG Increase Percentage**, and **LG Increase Reason** |
| Review extension entries | **LG Extensions** | Extension records for the L/G |
| Edit a controlled existing record | **Enable Editing** | Fields permitted by the active editing branch |

**Prerequisites**

- The L/G is saved and the applicable branch is visible.
- The record is **Active** where the active-stage condition controls the branch.
- You have the permission required to enable editing or save the branch.

**Steps**

1. Open the saved L/G and read the visible branch controls.
2. Follow the branch that matches the work you need.

   | If you need to… | Select or enter |
   | --- | --- |
   | Extend the L/G as a warranty bond | Select **Extend As Warranty Bond**; enter **Extension Period**, **Expiration date**, and **Reason**. |
   | Enter a deduction | Select **LG Deductions**; enter **LG Deduction Date** and **LG Deduction Percentage**. |
   | Enter an increase | Select **LG Increase**; enter **LG Increase Date**, **LG Increase Percentage**, and **LG Increase Reason**. |
   | Save an increase | Use the increase branch's save action. |
   | Edit a controlled field | Select **Enable Editing** before changing the field. |

**Result:** The extension, deduction, increase, or editing branch named in the table is open, or the
record remains unchanged when its stage or permission guard does not expose that action.

## Fix errors and continue

Use the exact message on screen to choose the correction. These messages belong to the L/G lifecycle
surface.

| What you see | What it means | What to do |
| --- | --- | --- |
| `Your request was completed successfully` | The requested action completed. | Read the record stage and continue from the resulting view. |
| `An error occurred while processing your request` | Processing failed while the action was handled. | Review the current stage and permission, then ask an administrator to review the action if it remains unavailable. |
| `You don’t have permission` | Your permission does not allow the action. | Ask for the required L/G or approval permission. |
| `Please Add Extension to activate the LG` | The L/G needs an extension before activation. | Add an extension, then return to the activation branch. |
| `LG has one or more extensions or deductions and cannot be reverted to the requested stage` | The L/G cannot return to the requested stage while those entries exist. | Review the extension and deduction branches before retrying. |
| `LG still needs confirmation` | A required L/G confirmation is incomplete. | Complete the applicable confirmation before retrying the action. |
| `Please choose a date after the current expiry date` | The extension date is not after the current expiry date. | Choose a later **Expiration date**. |
| `There is a pending increase you can edit` | An increase is already pending and can be edited. | Edit the pending increase instead of starting another one. |
| `Forbidden characters detected. Please remove them and try again.` | A value contains a forbidden character. | Remove the forbidden character and retry the action. |

The named field rules are also part of recovery: `IncreaseAmount` accepts a minimum of `0.01`,
`IncreaseDate` cannot be later than today, `ExpiryDate` cannot be earlier than today, and an
extension **Expiration date** cannot be earlier than the current L/G expiry date. Several other
requirements depend on company configuration.

If the list headers differ from the headers you expect, work from the columns currently visible in
the selected list layout. If a saved action produces no visible response, do not assume that it
completed; reread the stage and ask an administrator to review the action.

### Out of scope messages

Some messages and surfaces belong to subscription, navigation, comments, attachments, files, or
history work rather than to an L/G stage transition.

| Surface or message | Use its owning area for |
| --- | --- |
| `subscriptionNotInclude` | Subscription access to the Letter of Guarantee module |
| `PageNotFound` | A missing or unavailable page |
| **Back** | Returning from a supporting or unavailable surface |
| **Go Back to Home Page** | Returning to the application home page |
| `comments-component` | Comment work |
| `shared-attached-docs` | Shared attachment work |
| `files` | File work |
| `log-history` | History and modification review |

These surfaces can appear around an L/G record, but they do not define the L/G stage lifecycle.

## Continue after the lifecycle action

After a lifecycle action, read the stage shown on the open L/G record to determine which record view
or follow-up task owns the next work.

| Current need | Continue with |
| --- | --- |
| Review the L/G without changing it | the letters-of-guarantees view-record page |
| Edit an eligible L/G record | the letters-of-guarantees edit-record page |
| Review the finance-route L/G | the finance letters-of-guarantees view-record page |
| Edit the finance-route L/G | the finance letters-of-guarantees edit-record page |
| Create a new L/G | the Create an L/G page |
| Continue from the sales-job context | [Sales job record](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/sales-job-record) |

Use the L/G stage shown on the record to decide whether to continue with approval, active use,
return, closure, liquidation, cancellation, or expiry. For a new record, use [Create an L/G](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/create-l-g).
For finance-specific work, use [L/G finance view](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/l-g-finance-view).
