=====Allocating Purchases to Sales=====
{{entry>0;Allocating Purchases;-}}
The process of connecting purchase material to a sale in CATS is called **"allocation"**.
Purchases are allocated to sales by connecting a location screen to a sale contract item.
Depending on your company's particular workflow, you can allocate from a sale contract to a location screen or from the location screen to a sale.
You can also create a new sale contract or sale item from the allocation dialogue on the location screen **OR** by using the [[cats:procedures:contract:addcontract#add_items_using_shop|Shop feature]], which lets you pull multiple location screens from any number of purchases and create a sale with corresponding sale items.
If the number of units or weight on the location screen is more than the number of units or weight on the sale item, CATS will subdivide the location screen, unless you are using a reservation.
====Allocating From the Sale Contract====
From the Sales Contract Main Screen select **Allo** from the menu to bring up the allocation
dialog.
[{{:cats:procedures:traffic:allocatefromsale_chooseallo.png?|Select Alloc from the top menu bar}}]
If there are multiple unallocated items on the contract, you will be prompted to
pick one from the list. Highlight the item you wish to allocate and pick **Continue**.
[{{:cats:procedures:traffic:allocatefromsale_selectsaleitem.png?|Choose a sale item from the chooser and pick Continue.}}]
A box will be displayed showing some details about the sale item as well as its overall allocation status.
Any existing allocations for the sale item are shown in the list.You can look up a location screen to allocate by:
* Purchase contract number
* Grade code
* Location screen number
Enter a value in any of these fields and hit the [Enter] key or click the **...** button to start a lookup. You can also use a variety of other traffic information by clicking
on the **Other Identifier** link and selecting the type from the drop-down.
[{{:cats:procedures:traffic:allocatefromsale_searchforlocscreen.png?|Look up location screen}}]
\\
[{{:cats:procedures:traffic:allocatefromsale_selectlocscreen.png?|Choose a sale item from the chooser and pick Continue}}]
Traffic screens without posted purchase invoices will not appear on this list unless you
change the default settings for this chooser.
The number of units to be allocated will default to the units on the sale item or the units on the location screen (whichever is smaller). You can manually specify the amount of the allocation by
changing the value in the grid.
[{{:cats:procedures:traffic:allocatefromsale_allocationsfromsale.png?|}}]
If the purchase item has a different product description you will receive
a pop-up stating this. Press **Yes** to continue.
[{{:cats:procedures:traffic:reserve_diffcodes.png?|Purchase and sales have different codes}}]
If the unit weights do not match between purchase and sale items, you will see the following message.
[{{:cats:procedures:traffic:reserve_diffweight.png?|Unit weights do not match}}]
Click on **Apply** to create the allocation.
If there is more material on the location screen than on the sale item, we split the location in a
process we call **"subdividing"**. The material to be allocated is moved to a new, duplicate
screen of exactly the size of the allocation. Please see wiki on [[cats:procedures:traffic:subdividingscreens|subdividing]] for more information.
If you click on **close**, you will get the option to close the form and changes will not be saved.
[{{:cats:procedures:traffic:allocatefromsale_close.png|Close the form and cancel changes}}]
====Allocating from the Purchase Location Screen====
From any unallocated location screen, pick **Allo** from the toolbar menu.
[{{:cats:procedures:traffic:allocatefromploc_allo.png?|Select Allo from a location screen to allocate.}}]
The same option box will pop up as shown in the procedure for allocating from a sale. Choose to look up the sale contract by:
* **Sale Contract Number**
* **Sale Account**
* **Sale Item Grade**
Enter a value in one of these boxes and click the **''...''** button or hit the **[Enter]** key.
[{{:cats:procedures:traffic:allocatefromploc_search.png?|Choose a way to find the sale item to allocate, then hit Enter.}}]
If more than one sale item matches the criteria, you will have to highlight the one you want from the chooser and pick **Continue**.
[{{:cats:procedures:traffic:allocatefromploc_selectsaleitem.png?|Choose a sale item to allocate to and pick Continue.}}]
The number of units to be allocated will default to the units on the sale item or the units on the location screen (whichever is smaller). You can manually specify the amount of the allocation by
changing the value in the grid.
[{{:cats:procedures:traffic:allocatefromploc_allocationsfortrafficscreen.png?|}}]
Click on **Apply** to create the allocation.
If you click on **close**, you will get the option to close the form and changes will not be saved. [{{:cats:procedures:traffic:allocatefromsale_close.png?|Press close to cancel changes}}]
====Allocate to a New Sale or Sale Item====
When allocating from a location screen you can also choose to click on the **Create Sale Item** button to create a new sale contract or sale contract item.\\
[{{:cats:procedures:traffic:alloc_createnewsaleitembutton.png?|Create a new sale button}}]
To allocate this location screen to a new sale record, press **Create a Sale**.
[{{:cats:procedures:traffic:alloc_createasale.png?|Click create a sale to allocate this location screen.}}]
On the next screen, press **Apply** to be able to add the sale number and description.
[{{:cats:procedures:traffic:alloc_clickapplytoalloc.png?|Click apply to add sale number and description.}}]
Add the sale contract number, and press **Apply**.
[{{:cats:procedures:traffic:alloc_addsalecontract.png?|Add the sale contract number}}]
Fill in all the required fields (terms, payment etc.) and press **Save**.
[{{:cats:procedures:traffic:alloc_savetocontinue.png?|Fill in required fields and then save.}}]
You can also add an item to an existing sale contract. After picking **Alloc**, click on the **Create Sale Item** button.
[{{:cats:procedures:traffic:alloc_createnewsaleitembutton.png|Create a new sale button}}]
Next, click the button to **Add an Item**.
[{{:cats:procedures:traffic:alloc_createnewsaleitemorsalecontract.png|Create new sale item}}]
From the list of sale contracts, choose the sale contract that you will be adding the item to, and press **Continue**.
[{{:cats:procedures:traffic:alloc_additementersalecontractnumber.png|Add item to existing sale contract}}]
On this screen, the sale number is now already filled in. Click **Apply** to proceed to add an item description.
[{{:cats:procedures:traffic:alloc_additemtosale.png?|}}]
The grade will be already filled in based on the sale contract you chose. Press **Apply** to continue.
[{{:cats:procedures:traffic:alloc_addcontractitem.png?|Add contract item}}]
Make changes to grade if needed, and then proceed to add item as you normally would.
[[cats:procedures:contract:addcontract|See wiki on item data entry for more information.]]
You can also create a new sale item by using the **Shop** menu option from the main contract sale screen. [[cats:procedures:contract:addcontract#add_items_using_shop|See the wiki on using Shopping Lists in CATS for more information.]]
====Reservation====
When you go in to allocate, you can choose to reserve. This will allocate without flagging a particular sale.\\
To start out as a reservation, click the check box next to **Reserved**. The allocation bar will be green instead of the usual blue. Enter the units to reserve by typing in the ''Units'' column and pick **Apply**.
[{{:cats:procedures:traffic:reserveallocation_selectreservedandapply.png|Click the check box next to Reserved.}}]
If you have not done the step above, just click the **Subdivide** box to change it to **Reserved** and select the **Apply** button to continue.
[{{:cats:procedures:traffic:reserveallocation_changereservedtosubdivide.png|Click on Subdivide to change the method to Reserved.}}]
You can now exit back to the location screen. The reserved amount will show on the location screen. It will show that how many units are allocated, but it will not display a particular sale.
[{{:cats:procedures:traffic:reserveallocation_bagsreservedonscreen.png|Reserved units on the location screen.}}]
Once you want to execute the reservation, click on **Alloc** again, and click the **Reserved** box to switch to **Subdivide**.\\
[{{:cats:procedures:traffic:reserveallocation_clickonreserved.png|Click on Reserved to change it to Subdivide.}}]
Then, click on **Apply** to execute the allocation.
[{{:cats:procedures:traffic:reserveallocation_changereservedtosubdivide.png|Select Apply to execute the allocation.}}]
You will be asked which marks to be moved to the new screen. Click on the check boxes for the marks you want to move, or change the units on each mark listed, and pick **Apply** to proceed.
[{{:cats:procedures:traffic:reserveallocation_movemarksunits.png|Click on the check boxes for the marks you want to move, or change the units on each mark listed, and pick Apply to proceed.}}]\\
Now, you will be taken to the old screen where you created the allocation. Pick Exit to go to the list of screens and enter the new screen you created. There, you can see the allocation as usual.\\
====Hold Feature====
When you go in to allocate, you can choose to place units on hold. This feature will create a hold for a specific account, with no sale created.
Click on **Hold for Customer** to get started.
[{{:cats:procedures:traffic:alloc_holdoption.png?|Click on hold for customer to create a hold.}}]
Enter the terms and units to create a temporary hold for one customer. Press **Apply** to continue.
[{{:cats:procedures:traffic:alloc_createhold.png?|Enter units and press apply to continue}}]
The hold was created. Press **Apply** to continue.
[{{:cats:procedures:traffic:alloc_holdcreated.png?|Press apply to continue}}]
On the location screen, you can see that there is a hold in place.
[{{:cats:procedures:traffic:alloc_locationscreenhold.png?|You will see there is a hold in place, on the top right of the location screen.}}]\\
====Viewing the Allocation====
You can see whether or not a contract is allocated from the main screen, the location screen, or the item screen. You can also use the **Allocated Units** column on most reports or choosers.
===From the Main Contract Screen===
To see how many units are allocated on a contract, navigate to the main contract screen (**Contracts > Purchases (or Sales) > Main** and look at the **Allocated** column. This will list the units allocated for the entire contract.
[{{:cats:procedures:traffic:alloc_allocationonsalecontract.png|Look at the Allocated column to see the number of units allocated.}}]
The item list can also display for each item a link to the allocated contract, or a link to a list of location screens or contracts if the item is allocated to more than one. This is shown above next to the sale item, the link for ''3 Locations''.
===From the Location screen===
On the location screen, the allocated sale contract numbers will be shown on the top.
[{{:cats:procedures:traffic:alloc_fromlocationscreen.png?|}}]
Choose **Exit** to return to the contract.