ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Tally format for Tax Invoice


We made a Tax Invoice format that looks like the one from Tally for icebreaking a tally user. Not sure what is the best procedure to contribute so pasting it here.


It is always better to share a screenshot to get users attention.




This looks very good.

Good to have you to contribute it back to the community.
You can Post the print format script here if you want so those who would like to use this script can make use of your source code.

  "align_labels_right": 0, 
  "css": ".print-format {\npadding-left: 5mm;\npadding-right: 5mm;\npadding-top: 10mm;\npadding-bottom: 5mm;\n}\n", 
  "custom_format": 1, 
  "default_print_language": null, 
  "disabled": 0, 
  "doc_type": "Sales Invoice", 
  "docstatus": 0, 
  "doctype": "Print Format", 
  "font": "Default", 
  "format_data": "[{\"fieldname\": \"print_heading_template\", \"fieldtype\": \"Custom HTML\", \"options\": \"
Tax Invoice
\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Address\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"address_display\", \"label\": \"Address\"}, {\"print_hide\": 0, \"fieldname\": \"contact_display\", \"label\": \"Contact\"}, {\"print_hide\": 0, \"fieldname\": \"contact_mobile\", \"label\": \"Mobile No\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Currency\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"conversion_rate\", \"label\": \"Exchange Rate\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"scan_barcode\", \"label\": \"Scan Barcode\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"item_code\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"description\", \"print_width\": \"200px\"}, {\"print_hide\": 0, \"fieldname\": \"image\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"qty\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"stock_uom\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"uom\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"discount_amount\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"rate\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"amount\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"pricing_rule\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"deferred_revenue_account\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"service_stop_date\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"enable_deferred_revenue\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"service_start_date\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"service_end_date\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"quality_inspection\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"serial_no\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"asset\", \"print_width\": \"\"}], \"print_hide\": 0, \"fieldname\": \"items\", \"label\": \"Items\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"total_qty\", \"label\": \"Total Quantity\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"total\", \"label\": \"Total\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"charge_type\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"row_id\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"account_head\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"cost_center\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"description\", \"print_width\": \"300px\"}, {\"print_hide\": 0, \"fieldname\": \"rate\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"tax_amount\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"total\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"tax_amount_after_discount_amount\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"base_tax_amount\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"base_total\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"base_tax_amount_after_discount_amount\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"item_wise_tax_detail\", \"print_width\": \"\"}], \"print_hide\": 0, \"fieldname\": \"taxes\", \"label\": \"Sales Taxes and Charges\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Loyalty\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"loyalty_redemption_account\", \"label\": \"Redemption Account\"}, {\"print_hide\": 0, \"fieldname\": \"loyalty_redemption_cost_center\", \"label\": \"Redemption Cost Center\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"base_grand_total\", \"align\": \"left\", \"label\": \"Grand Total (TZS)\"}, {\"print_hide\": 0, \"fieldname\": \"base_rounded_total\", \"align\": \"left\", \"label\": \"Rounded Total (TZS)\"}, {\"print_hide\": 0, \"fieldname\": \"base_in_words\", \"align\": \"left\", \"label\": \"In Words (TZS)\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"grand_total\", \"label\": \"Grand Total\"}, {\"print_hide\": 0, \"fieldname\": \"rounded_total\", \"label\": \"Rounded Total\"}, {\"print_hide\": 0, \"fieldname\": \"in_words\", \"label\": \"In Words\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Advance\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"allocate_advances_automatically\", \"label\": \"Allocate Advances Automatically (FIFO)\"}, {\"print_hide\": 0, \"fieldname\": \"get_advances\", \"label\": \"Get Advances Received\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Terms\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"terms\", \"label\": \"Terms and Conditions Details\"}, {\"fieldtype\": \"Section Break\", \"label\": \"More\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"inter_company_invoice_reference\", \"label\": \"Inter Company Invoice Reference\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Subscription\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"update_auto_repeat_reference\", \"label\": \"Update Auto Repeat Reference\"}]", "html": "

Tax Invoice

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n {{ or \"\" }}
\n {{ frappe.db.get_value(\"Company\",, \"registration_details\") or \"\" }}\n
\n Invoice No.
\n {{ }}\n
\n Dated
\n\t {{ frappe.utils.formatdate(doc.posting_date) }}\n
\n Delivery Note
\n\t  \n
\n Mode/Terms of Payment
\n\t  \n
\n Supplier's Ref.
\n\t  \n
\n Other Reference(s)
\n\t  \n
\n Customer
\n {{ doc.customer_name or \"\" }}
\n\t {{ doc.address_display or \"\" }}\n
\n Buyer's Order No.
\n\t  \n
\n Dated
\n\t  \n
\n Despatch Document No.
\n\t  \n
\n Dated
\n\t  \n
\n Despatched through
\n\t  \n
\n Destination
\n\t  \n
\n Terms of Delivery
\n\t  \n
\n\n\n\t\n\n{% for item in doc.items %}\n{% set remrows = 10 - loop.revindex %}\n\n\t\n\t\n\t\n\t\n\t\n\t\n\n{% set trate = \"\" %}\n{% endfor %}\n\n\n
Sl\n\t Particulars\n\t QTY\n\t Rate\n\t VAT\n\t Amount\n
{{ loop.index }}{{ item.item_name }}{{ item.get_formatted(\"qty\", 0) }}{{ item.get_formatted(\"rate\", doc) }}\n\t\t{% set mydict = json.loads(item.item_tax_rate) %}\n\t\t{% if item.item_tax_rate == \"{}\" %}\n\t\t\t{% for row in doc.taxes %}\n\t\t\t\t{{ row.rate }}.0%\n\t\t\t{% endfor %}\n\t\t{% else %}\n\t\t\t{% for key, value in mydict.items() %}\n\t\t\t\t{{ value }}%\n\t\t\t{% endfor %}\n\t\t{% endif %}\n\n\n {{ item.get_formatted(\"amount\", doc) }}
\n\n\n\n \n\t\n \n\t\n\n\n\t\n \n\t\n\t\n\n\n\t\n\t\n\t\n\n\n\t\n\t\n\n
\n Amount in Words
\n {{ doc.in_words }}

\n {{ doc.base_in_words }}\n
SUB TOTAL{{ doc.get_formatted(\"base_total\", doc) }}{{ doc.get_formatted(\"total\", doc) }}
VAT{{ doc.get_formatted(\"base_total_taxes_and_charges\", doc) }}{{ doc.get_formatted(\"total_taxes_and_charges\", doc) }}
TOTAL{{ doc.get_formatted(\"base_grand_total\", doc) }}{{ doc.get_formatted(\"grand_total\", doc) }}
{{ doc.remarks }}\n for {{ }}\n
\n Authorised Signatory\n
\n", "line_breaks": 0, "modified": "2019-01-06 14:52:41.762710", "module": "Accounts", "name": "Tally Format", "print_format_builder": 1, "print_format_type": "Server", "show_section_headings": 0, "standard": "No" } ]

Hope this helps others. Need to enhance it, but it is a start.