# Allocation: split a line's quantity among the customer's branches

> Split the quantity of a quote line among the customer's branches through the Grid, and see how the allocation shows on screen and in the ERP.

Source: https://vendria.com/en/ajuda/rateio-entre-filiais

## What it is

A customer with several branches sends a single order and says how much goes to each
one. In Vendria, the **commercial line stays single** (it mirrors the customer's
purchase order) and its quantity is split among the branches.

The sum of the allocations always equals the line's quantity. That is a rule
the system keeps, not a check someone does at the end.

## The cell is the truth

On an order in the matrix (branch in the columns, product in the rows), what rules is the
**cell**. The line's quantity is always **derived**: it is the sum of the
cells, and it isn't edited directly.

That's why, on an allocated order, changing the line's quantity means changing the cells.

## Where the allocation shows on the quote

On an allocated order, the quote gets the **Summary | Grid** selector above the
items and, below them, the **Allocation by store** section, with one card per destination.
In the **Grid** view you type each destination's quantity; in the **Summary** you see the sum.
The cards bring the delivery, the address, the **Invoiced at** block and the **⋮** menu
with **Change destination**, **Duplicate**, **Delivery address and date** and
**Remove branch from order**. To add a destination, use **Add destination to the
order**; to give a registration to a destination that came in with just a name, use
**Identify the customer**.

The step by step of each of these buttons is in [Allocation on screen, step by step: destinations, Grid and delivery by branch](/en/ajuda/rateio-na-tela-passo-a-passo).

## What each allocation carries

Besides the branch and the quantity: the destination text as the customer wrote it, the
external code, the CNPJ, the quantity in boxes, the delivery address, the expected
date and the note the operator wrote about that destination.

The branch note is a person's instruction about a destination. Adding an item
to the order, changing a group's branch or rescaling the quantity **don't erase**
what was written there.

## A reading doubt still belongs to the LINE

On an allocated order, the doubt about which product that is is still
solved **on the line**, not on the branch card. The reason is concrete: on an order
with nine destinations, the same SKU doubt would show on nine cards changing the
same line. The branch card shows a pointer saying there is an issue; the
choice is made on the line.

This now applies even when the allocation came from a **photo**, and that is where it matters
most, because a spreadsheet barely generates reading doubts and a photo generates many.

## Allocation and stock

On an allocated line the available quantity is rounded down: it is a quantity that
someone picks and ships. See [Stock on the quote: the shortage warning and the ways out](/en/ajuda/estoque-na-cotacao).

## Allocation in the ERP

An allocated document becomes **several orders** on the ERP side: one per destination,
depending on how the company works. Asking for the status by the document number, the
answer brings all of them.
