Adding Amount by Category to Bill/Receipt
Create a new layout:
- Make a copy of the used printing form
- Rename it in accordance with the task.
Edit the layout:
- Add a (virtual) Band at the bottom of the layout
- Select Dishes as the Band's data source in the DataSet Name section
Select the required Band. Select Computable Fields. Add a Computable Field from the provided Attributes list (MenuItem > Classifications). Field Name and Caption are filled in manually in the Computable Fields windowIn some versions, namely 184.108.40.2069, the Field Name should be filled in Latin letters or without spaces.
Otherwise, when pressing OK the Invalid name identifier: Amounts By Categories error message will appear.
- Open the Grouping dialog window using the Grouping field in the Properties of the selected Band. Enter the required classification into the list on the right — the calculated field created in the previous step, find it using its previously specified heading. If the grouping window contains other data then relocate it to the list on the left
- Add the Memo into the created Band and select the required classification from the suggested list
- Add another Memo into the Band and add the [PriceAmount] variable to it — in this case, the amounts will be given without discounts. If the amounts by categories need to be specified with a discount, then the [Price Amount - Discount Amount] formula should be entered in the Content Editor field
- In order to print only the amounts by categories different from zero, specify the Filter for the created Band:
For combo dishes, use the following filter:
Filter := ([ComboUNI]=0)
Filter := ([Combo]=0)
depending on what should not be taken into account when calculating the amounts: either a combo dish or combo elements. Without the filter, the amounts for combo dishes will be doubled.
- Save the changes in the layout and add this layout into the printing scheme in use.