{"id":14023,"date":"2018-05-08T08:33:24","date_gmt":"2018-05-08T08:33:24","guid":{"rendered":"https:\/\/kb.sambapos.com\/?p=14023"},"modified":"2020-09-30T12:56:27","modified_gmt":"2020-09-30T12:56:27","slug":"9-1-5-creating-accounting-reports-with-custom-reporting-tags","status":"publish","type":"post","link":"https:\/\/kb.sambapos.com\/en\/9-1-5-creating-accounting-reports-with-custom-reporting-tags\/","title":{"rendered":"9.1.5. Creating Accounting Reports with Custom Reporting Tags"},"content":{"rendered":"<h1 id=\"creating_accounting_reports_with_custom_reporting_tags\" class=\"sectionedit1\">Creating Accounting Reports with Custom Reporting Tags<\/h1>\n<div class=\"level1\"><\/div>\n<h2 id=\"using_custom_report_tags\" class=\"sectionedit2\">Using Custom Report Tags<\/h2>\n<div class=\"level2\">\n<p>Custom reports contain some tags useful for preparing reports easily. These tags work 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.<\/p>\n<p>As an example it&#8217;ll be created a sample accounting report. Before doing it some details will be given about how accounting related tags works.<\/p>\n<p><strong>{ACCOUNT TOTAL:X}<\/strong><br \/>\nThis tag returns total balance of X. X can be an account name or account type name. For example if you type\u00a0<code>{ACCOUNT TOTAL:Cash}<\/code>\u00a0it will give you the balance of &#8216;Cash&#8217; account. If you type\u00a0<code>{ACCOUNT TOTAL:Payment Accounts}<\/code>\u00a0it will give you the balance total of all &#8216;Payment Accounts.&#8217;<\/p>\n<p><strong>{ACCOUNT DEBIT TOTAL:X}<\/strong><br \/>\nWorks like\u00a0<code>{ACCOUNT TOTAL:X}<\/code>\u00a0but it gives only Debit Total.<\/p>\n<p><strong>{ACCOUNT CREDIT TOTAL:X}<\/strong><br \/>\nWorks like\u00a0<code>{ACCOUNT TOTAL:X}<\/code>\u00a0but it gives only Credit Total.<\/p>\n<p><strong>{ACCOUNT TRANSACTION TOTAL:X}<\/strong><br \/>\nThis tag returns total of X Account Transactions. X should be\u00a0<code>Account Transaction Type Name:Account Name<\/code>. For example\u00a0<code>{ACCOUNT TRANSACTION TOTAL:Payment Transaction:Cash}<\/code>\u00a0tag will return total amount of\u00a0<code>Payment Transactions<\/code>\u00a0which changes\u00a0<code>Cash<\/code>\u00a0account.<\/p>\n<p><strong>{ACCOUNT TRANSACTION DEBIT TOTAL:X}<\/strong><br \/>\nWorks like\u00a0<code>{ACCOUNT TRANSACTION TOTAL}<\/code>\u00a0but returns Debit Total.<\/p>\n<p><strong>{ACCOUNT TRANSACTION CREDIT TOTAL:X}<\/strong><br \/>\nWorks like\u00a0<code>{ACCOUNT TRANSACTION TOTAL}<\/code>\u00a0but returns Credit Total.<\/p>\n<p><strong>{ACCOUNT TRANSACTION DETAILS:X}<\/strong><br \/>\nThis 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:\u00a0<code>{ACCOUNT TRANSACTION DETAILS:Customer Cash Payment:Cash}<\/code>\u00a0tag will print details of cash payments made by customers.<\/p>\n<\/div>\n<h3 id=\"sample_report\" class=\"sectionedit3\">Sample Report<\/h3>\n<div class=\"level3\">\n<p>If you&#8217;ve used V2 before you&#8217;ll remember\u00a0<code>Cash Drawer Report<\/code>. This custom report creates a\u00a0<code>Cash Drawer Report<\/code>\u00a0in that format.<\/p>\n<p><span class=\"wrap_tip \">Tip;<\/span>\u00a0In this report we assumed you have\u00a0<code>Cash Expense<\/code>\u00a0and\u00a0<code>Cash Income<\/code>\u00a0accounts. Please update income and expense account names in report template to match it to your account and account type names.<\/p>\n<table style=\"width: 100.345%; border-collapse: collapse; border-color: #dedede; background-color: #dedede; height: 116px;\">\n<tbody>\n<tr>\n<td style=\"width: 98.3161%;\"><code>[Expenses:1,2,1]<br \/>\n&gt;Cash Transactions||<br \/>\n{ACCOUNT TRANSACTION DETAILS:Cash Expense:Cash}<br \/>\nTotal||{ACCOUNT TRANSACTION TOTAL:Cash Expense:Cash}<\/code><\/p>\n<p><code>[Incomes:1,2,1]<br \/>\n&gt;Sale Incomes||<br \/>\nCash||{ACCOUNT TRANSACTION TOTAL:Payment Transaction:Cash}<br \/>\nCredit Card||{ACCOUNT TRANSACTION TOTAL:Payment Transaction:Credit Card}<br \/>\nTotal||{ACCOUNT TRANSACTION TOTAL:Payment Transaction:Payment Accounts}<br \/>\n&gt;Cash Transactions||<br \/>\n{ACCOUNT TRANSACTION DETAILS:Cash Income:Cash}<br \/>\n{ACCOUNT TRANSACTION DETAILS:Customer Cash Payment:Cash}<br \/>\nTotal||[=F((TN('{ACCOUNT TRANSACTION TOTAL:Cash Income:Cash}')+TN('{ACCOUNT TRANSACTION TOTAL:Customer Cash Payment:Cash}')),'#,#0.00')]<br \/>\n&gt;Income Totals||<br \/>\nCash||{ACCOUNT DEBIT TOTAL:Cash}<br \/>\nCredit Card||{ACCOUNT DEBIT TOTAL:Credit Card}<\/code><\/p>\n<p><code>[Totals:3,1]<br \/>\nCash|{ACCOUNT TOTAL:Cash}<br \/>\nCredit Card|{ACCOUNT TOTAL:Credit Card}<br \/>\nTotal|{ACCOUNT TOTAL:Payment Accounts}<\/code><\/td>\n<td style=\"width: 1.71821%;\"><\/td>\n<td style=\"width: 10%;\"><\/td>\n<td style=\"width: 10%;\"><\/td>\n<td style=\"width: 10%;\"><\/td>\n<td style=\"width: 10%;\"><\/td>\n<td style=\"width: 10%;\"><\/td>\n<td style=\"width: 10%;\"><\/td>\n<td style=\"width: 10%;\"><\/td>\n<td style=\"width: 10%;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><code><\/code><code><\/code><\/p>\n<p><code><code><\/code><\/code><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14026 size-large\" style=\"font-size: inherit;\" src=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-5-Creating-Accounting-Reports-with-Custom-Reporting-Tags-01-1024x741.jpg\" alt=\"\" width=\"640\" height=\"463\" srcset=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-5-Creating-Accounting-Reports-with-Custom-Reporting-Tags-01-1024x741.jpg 1024w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-5-Creating-Accounting-Reports-with-Custom-Reporting-Tags-01-300x217.jpg 300w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-5-Creating-Accounting-Reports-with-Custom-Reporting-Tags-01-768x556.jpg 768w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-5-Creating-Accounting-Reports-with-Custom-Reporting-Tags-01.jpg 1997w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/>By using this template you can create a report like this. You&#8217;ll notice that you can use some printer template functions such as\u00a0<code>TN<\/code>\u00a0<code>F<\/code>\u00a0or expressions.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Creating Accounting Reports with Custom Reporting Tags Using Custom Report Tags Custom reports contain some tags useful for preparing reports easily. These tags work 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. [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-14023","post","type-post","status-publish","format-standard","hentry","category-reports"],"_links":{"self":[{"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/posts\/14023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/comments?post=14023"}],"version-history":[{"count":10,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/posts\/14023\/revisions"}],"predecessor-version":[{"id":25069,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/posts\/14023\/revisions\/25069"}],"wp:attachment":[{"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/media?parent=14023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/categories?post=14023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/tags?post=14023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}