> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rocky.global/llms.txt
> Use this file to discover all available pages before exploring further.

# COMMANDS DOCUMENTATION

# Artisan Commands Documentation

This document centralizes the project's operational commands and links to their detailed documentation.

## 🎯 Objective

* Have a single point of reference for Artisan maintenance, support, and data reconciliation commands.
* Standardize recommended usage (`dry-run` first when applicable).

## 🛠️ Available Commands

### `registrations:reconcile-importe-details`

Reconcile and persist, in `eventos_x_usuarios.details`, the `importe` field selections taken from approved orders.

Includes legacy cases where:

* the main registration order was not linked via `orders.registration_id`
* `meta.selected_value` is missing in `orders_items` lines (including some historical flows with a 100% discount)

#### Usage

```bash theme={null}
php artisan registrations:reconcile-importe-details --event-id={id}
```

#### Options

* `--registration-id=`: Reconcile a specific registration (`eventos_x_usuarios.id`)
* `--event-id=`: Reconcile registrations for a specific event
* `--dry-run`: Shows what would be updated without persisting changes
* `--limit=`: Limit of rows to process when using `--event-id` (default: `500`)

#### Examples

```bash theme={null}
# Preview changes without saving for an event
php artisan registrations:reconcile-importe-details --event-id=25 --dry-run

# Apply changes for an event
php artisan registrations:reconcile-importe-details --event-id=25

# Specific case: a single registration
php artisan registrations:reconcile-importe-details --registration-id=12345 --dry-run
php artisan registrations:reconcile-importe-details --registration-id=12345
```

#### Notes

* You must specify either `--registration-id` or `--event-id`.
* It is recommended to run with `--dry-run` first.
* The command only saves records when it detects real changes.

***

## 📎 Related

* [Admin-Organizer Linking Commands](../guides/ADMIN_ORGANIZER_LINKING.md)
