# Transactions

Transactions are the third core [concept](https://colaorange.gitbook.io/daily-money-one-doc/eng/concept) of accounting. When using DMO, creating transactions will be one of the most frequent operations.

## Start Accounting

Click on `Start Accounting` at the bottom right of the home screen or the `Add Transaction` icon at the top of the `Transaction List` to enter the page for adding transactions. When adding transactions, you can choose from three modes:

1. **Basic**: A one-to-one transaction.
2. **Advanced**: A one-to-many transaction.
3. **Initiali**: A zero-to-one transaction.

Typically, basic accounting is used for `Basic` transactions, `Advanced` transactions are used for [One to Many Split](#one-to-many-split), and the `Initial` mode is used for [Initialize Account](<https://colaorange.gitbook.io/daily-money-one-doc/account#Initialize Account>).

### Basic Transactions

When adding a basic transaction, you must fill in the date and time of the transaction (time is generally not critical unless needed for sorting), the account from which funds are transferred out, the account to which funds are transferred in, and the amount involved. You can also enter notes for future reference.

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-657a71380accd76651cfbd08d4ee88c2ff8af95f%2Ftransaction-3.png?alt=media" alt="" width="375"></div>

When selecting the accounts, use the account selection tool, which lists accounts in the order set on the `Account Management` screen.

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-cb08e3ef0b402d905a7bc004097da0c2928ae312%2Ftransaction-9.png?alt=media" alt="" width="375"></div>

### Inter-Book Transfers

DMO allows for transfers between accounts in different books. When using the account selection tool, you can click the `Select Book` icon at the top right to switch to another book and select an account from that book.

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-102a55a79fd006f7852933ef23a6af08b6dd0c15%2Ftransaction-10.png?alt=media" alt="" width="375"></div>

When selecting accounts from different books, you need to enter both the transfer-out and transfer-in amounts. Since the currencies might differ between books, DMO does not require that the outgoing amount equals the incoming amount.

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-99fd4de4579e42c5e32fb38a9ee554ba8ba684ca%2Ftransaction-16.png?alt=media" alt="" width="375"></div>

### One-to-Many Split

One-to-many split (technically many-to-many) usually occur in credit card transactions, such as purchasing groceries and daily necessities in a supermarket with a credit card, which fall under different accounts, or in paying credit card fees where foreign transaction fees were not recorded at the time of the original transaction. These scenarios are well-suited for advanced transactions. You might encounter more complex situations, and as long as your transaction amounts are correct, you can flexibly manage your transactions.

When adding an advanced transaction, you need to fill in the date and time of the transaction and select one or more outgoing accounts and one or more incoming accounts. Each account's amount must be entered separately. When all accounts belong to the same book, DMO will require the total outgoing amount to equal the total incoming amount. If any account belongs to a different book, this restriction does not apply.

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-bb9a3483ba4c4217a8794228278556410e058a64%2Ftransaction-4.png?alt=media" alt="" width="375"> <img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-39fe56a12060988ee273abbe00dc9bb6afbdc84f%2Ftransaction-5.png?alt=media" alt="" width="375"></div>

## Transaction List

DMO provides transaction lists for various fixed and custom time periods, listing the transactions of the primary book in order from the latest to the earliest transaction date and time within the period. At the bottom of the list, there is a blance for the period and navigation to switch between periods.

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-7fe231186f473cd80f67524838af87ee85698c50%2Ftransaction-1.png?alt=media" alt="" width="375"></div>

## Fixed and Custom Period Queries

The menu at the top right of the transaction list allows switching between different period modes (weekly, monthly, yearly, until today/specific day) or selecting `Custom Range`.

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-bb5ded78c8a3b3a698ed2b6776c7cf5ab0388574%2Ftransaction-2.png?alt=media" alt="" width="375"></div>

## Share XLSX

The menu at the top right of the transaction list allows sharing transactions within the period in `XLSX` format for easy storage or further data processing.

## Transaction Functions

You can edit transactions by clicking on them, or use the left and right swipe to access different function options. On the left side of the transaction, there are `Trash` and `Delete` functions.

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-8d814e329f91d388b09aa6ace46603e411701c7a%2Ftransaction-6.png?alt=media" alt="" width="375"></div>

On the right side, there are `Edit`, `Clone`, and `Create Template` functions.

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-8d7e6fc403c5367bfd732589a05a1345cde67f48%2Ftransaction-7.png?alt=media" alt="" width="375"></div>

## Edit Transaction

When editing a transaction, you can change all its details. The calculation of the balance sheet are updated in real-time, so as long as the time, accounts, and amounts are correct, there is no need to worry about errors in the results.

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-595893f8ec6544f2b99d3608c134c37a5e758658%2Ftransaction-8.png?alt=media" alt="" width="375"></div>

## Clone Transaction

Cloning a transaction will copy the details of the transaction, and after editing, it will create a new transaction. This is usually used for repeating transactions. If a transaction happens very frequently, you might consider using the `Create Template` function.

## Create Template

When creating a template, it copies the transaction details and creates a transaction template for quickly creating similar or recurring transactions in the future. For more information, refer to [Transaction Templates](https://colaorange.gitbook.io/daily-money-one-doc/eng/transaction-template).

## Trash and Delete Transactions

Sometimes you might need to delete a transaction due to an mistake. Deleting is irreversible and affects the balance sheet. If you're not entirely sure, you can choose to `Trash` the transaction. Trahsed transactions are marked, won't appear in the transaction list, and aren't included in the balance sheet, but can be restored later. This way, you can discard transactions without worrying about not being able to recover them if needed.

## Search

Using the search function, you can query related transactions based on various conditions.

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-9e4c3aa064934fd8b65b49444d17d86eec4bf9bc%2Ftransaction-11.png?alt=media" alt="" width="375"></div>

Search results are listed in order of transfer time. You can use the left and right swipe for different function options. Trashed transactions are not included in the search results.

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-db6fff1d36c912f11024e4c23d5dbf16495180a6%2Ftransaction-12.png?alt=media" alt="" width="375"></div>

## Updated Transactions

Updated transactions are listed from the most recent to the earliest modification time, making it easy to find recently modified transactions and avoid having transactions disappear from the current period transaction list due to changes in the transfer time. This function helps you quickly find recently modified transactions.

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-8c47ba6293580c01f5694be08a8d20f2826f5b13%2Ftransaction-13.png?alt=media" alt="" width="375"></div>

## Trash

Transactions in the trash are listed from the most recent to the earliest modification time. You can batch delete all trashed transactions using the delete all icon at the top right (deletions are irreversible).

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-1033d3b1481cdb7ef71e4d05a133eb7833514d45%2Ftransaction-14.png?alt=media" alt="" width="375"></div>

On the left side of each transaction, you can use the `Restore` or `Delete` functions to handle individual trashed transactions.

<div align="center"><img src="https://532053023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiYzE9Ga1RIcOmuroUJwz%2Fuploads%2Fgit-blob-a2c4998a0322470d50dccd6e50db617687bd344a%2Ftransaction-15.png?alt=media" alt="" width="375"></div>
