SambaPOS

Documentation Website

User Tools

Site Tools


Sidebar

Installation

User interface

Basic concepts

  • Departments
  • Terminals
  • Users & user roles
  • Work periods
  • Tickets & orders
  • The POS menu
    • Products & product categories
    • Menus
    • Recipes
    • Product modifiers

Quick-start: setting up a (very basic) POS configuration

Advanced concepts

Customizing your POS system

Extra

Mobile Client

SambaPOS License

creating_accounting_reports_with_custom_reporting_tags

1

Using Custom Report Tags

Custom reports contains some tags useful for preparing reports easily. These tags works same as Printer Template Tags but the difference is these tags will display values from selected date range, or date range from active work period if used out of report module. You can use these tags and SQL together in a single report.

As an example we'll create a sample accounting report. Before doing it I want o give some details about how accounting related tags works.

{ACCOUNT TOTAL:X}
This tag returns total balance of X. X can be an account name or account type name. For example if you type {ACCOUNT TOTAL:Cash} it will give you the balance of 'Cash' account. If you type {ACCOUNT TOTAL:Payment Accounts} it will give you the balance total of all 'Payment Accounts.'

{ACCOUNT DEBIT TOTAL:X}
Works like {ACCOUNT TOTAL:X} but it gives only Debit Total.

{ACCOUNT CREDIT TOTAL:X}
Works like {ACCOUNT TOTAL:X} but it gives only Credit Total.

{ACCOUNT TRANSACTION TOTAL:X}
This tag returns total of X Account Transactions. X should be Account Transaction Type Name:Account Name. For example {ACCOUNT TRANSACTION TOTAL:Payment Transaction:Cash} tag will return total amount of Payment Transactions which changes Cash account.

{ACCOUNT TRANSACTION DEBIT TOTAL:X}
Works like {ACCOUNT TRANSACTION TOTAL} but returns Debit Total.

{ACCOUNT TRANSACTION CREDIT TOTAL:X}
Works like {ACCOUNT TRANSACTION TOTAL} but returns Credit Total.

{ACCOUNT TRANSACTION DETAILS:X}
This special tag prints Account Transaction Details for X Account Transaction Type. X will be the Account Transaction Name. It returns a 3 column table. Date, Description and Amount. For example: {ACCOUNT TRANSACTION DETAILS:Customer Cash Payment:Cash} tag will print details of cash payments made by customers.

Sample Report

If you've used V2 before you'll remember Cash Drawer Report. This custom report creates a Cash Drawer Report in that format.

tip In this report we assumed you have Cash Expense and Cash Income accounts. Please update income and expense account names in report template to match it to your account and account type names.

  [Expenses:1,2,1]
  >Cash Transactions||
  {ACCOUNT TRANSACTION DETAILS:Cash Expense:Cash}
  Total||{ACCOUNT TRANSACTION TOTAL:Cash Expense:Cash}
  
  [Incomes:1,2,1]
  >Sale Incomes||
  Cash||{ACCOUNT TRANSACTION TOTAL:Payment Transaction:Cash}
  Credit Card||{ACCOUNT TRANSACTION TOTAL:Payment Transaction:Credit Card}
  Total||{ACCOUNT TRANSACTION TOTAL:Payment Transaction:Payment Accounts}
  >Cash Transactions||
  {ACCOUNT TRANSACTION DETAILS:Cash Income:Cash}
  {ACCOUNT TRANSACTION DETAILS:Customer Cash Payment:Cash}
  Total||[=F((TN('{ACCOUNT TRANSACTION TOTAL:Cash Income:Cash}')+TN('{ACCOUNT TRANSACTION TOTAL:Customer Cash Payment:Cash}')),'#,#0.00')]
  >Income Totals||
  Cash||{ACCOUNT DEBIT TOTAL:Cash}
  Credit Card||{ACCOUNT DEBIT TOTAL:Credit Card}
  
  [Totals:3,1]
  Cash|{ACCOUNT TOTAL:Cash}
  Credit Card|{ACCOUNT TOTAL:Credit Card}
  Total|{ACCOUNT TOTAL:Payment Accounts}

By using this template we can create a report like this. You'll notice we can use some printer template functions such as TN F or expressions.

forum.sambapos.com_uploads_default_3260_179136f052073801.jpg

creating_accounting_reports_with_custom_reporting_tags.txt · Last modified: 2019/04/19 03:24 by 93.179.68.108