Feat: US Regional module, added test, changed address template reference to convention
diff --git a/erpnext/regional/print_format/irs_1099_form/irs_1099_form.json b/erpnext/regional/print_format/irs_1099_form/irs_1099_form.json
index 1270427..ce8c44a 100644
--- a/erpnext/regional/print_format/irs_1099_form/irs_1099_form.json
+++ b/erpnext/regional/print_format/irs_1099_form/irs_1099_form.json
@@ -1,23 +1,23 @@
 [
  {
-  "align_labels_right": 0, 
-  "css": "", 
-  "custom_format": 1, 
-  "default_print_language": "en", 
-  "disabled": 0, 
-  "doc_type": "Supplier", 
-  "docstatus": 0, 
-  "doctype": "Print Format", 
-  "font": "Default", 
-  "format_data": "[{\"fieldname\": \"print_heading_template\", \"fieldtype\": \"Custom HTML\", \"options\": \"<div class=\\\"print-heading\\\">\\t\\t\\t\\t<h2>TAX Invoice<br><small>{{ doc.name }}</small>\\t\\t\\t\\t</h2></div>\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"customer_name\", \"label\": \"Customer Name\"}, {\"print_hide\": 0, \"fieldname\": \"customer_name_in_arabic\", \"label\": \"Customer Name in Arabic\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"posting_date\", \"label\": \"Date\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Address\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"company\", \"label\": \"Company\"}, {\"print_hide\": 0, \"fieldname\": \"company_trn\", \"label\": \"Company TRN\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"company_address_display\", \"label\": \"Company Address\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"item_code\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"description\", \"print_width\": \"200px\"}, {\"print_hide\": 0, \"fieldname\": \"uom\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"tax_code\", \"print_width\": \"\"}], \"print_hide\": 0, \"fieldname\": \"items\", \"label\": \"Items\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"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\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"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\", \"align\": \"left\", \"label\": \"In Words\"}]", 
-  "html": "<div id=\"copy_a\" style=\"position: relative; top:0cm; width:17cm;height:28.0cm;\">\n  <table>\n  <tbody>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs bbs\" style=\"width:86mm\" colspan=\"4\"; rowspan=\"3\">PAYER'S name, street address, city or town, state or province, country, ZIP<br>or foreign postal code, and telephone no.<br>\n\t{{company if company else \"\"}}<br>\n\t{{payer_street_address if payer_street_address else \"\"}}\n</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:35mm\">1 Rents</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:25mm\" rowspan=\"2\">OMB No. 1545-0115<br><yone>20</yone><ytwo>18</ytwo><br>Form 1099-MISC</td>\n      <td class=\"lbs bbs\" style=\"width:38mm\" colspan=\"2\" rowspan=\"2\">Miscellaneous Income</td>\n    </tr>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs bbs\" style=\"width:35mm\">2 Royalties</td>\n    </tr>\n    <tr style=\"height:9mm\">\n      <td class=\"tbs rbs lbs bbs\" >3 Other Income<br>\n\t{{payments if payments else \"\"}}\n\t</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">4 Federal Income tax withheld</td>\n      <td class=\"tbs lbs bbs\" style=\"width:29mm\" rowspan=\"2\">Copy A<br>For<br>Internal Revenue<br>Service Center<br><br>File with Form 1096</td>\n    </tr>\n    <tr style=\"height:16mm\">\n      <td class=\"tbs rbs lbs bbs\" style=\"width:43mm\">PAYER'S TIN<br>\n\t{{company_tin if company_tin else \"\"}}\n\t</td>\n      \n      <td class=\"tbs rbs lbs bbs\" colspan=\"3\">RECIPIENT'S TIN<br><br>\n      {{tax_id if tax_id else \"None\"}}\n</td>\n      <td class=\"tbs rbs lbs bbs\" >Fishing boat proceeds</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">6 Medical and health care payments</td>\n    </tr>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"4\">RECIPIENT'S name <br>\n         {{supplier if supplier else \"\"}}\n      </td>\n      <td class=\"tbs rbs lbs bbs\" >7 Nonemployee compensation<br>\n\t</td> \n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">Substitute payments in lieu of dividends or interest</td>\n      <td class=\"tbs lbs bbs\" rowspan=\"6\">For Privacy Act<br>and Paperwork<br>Reduction Act<br>Notice, see the<br>2018 General<br>Instructions for<br>Certain<br>Information<br>Returns.</td>\n    </tr>\n    <tr style=\"height:6mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"4\" rowspan=\"2\">Street address (including apt. no.)<br>\n\t{{recipient_street_address if recipient_street_address else \"\"}}\n\t</td>\n      <td class=\"tbs rbs lbs bbs\" >$___________</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">$___________</td>\n    </tr>\n    <tr style=\"height:7mm\">\n      <td class=\"tbs rbs lbs bbs\" rowspan=\"2\">9 Payer made direct sales of<br>$5,000 or more of consumer products<br>to a buyer<br>(recipient) for resale</td>\n      <td class=\"tbs rbs lbs\" colspan=\"2\">10 Crop insurance proceeds</td>\n    </tr>\n    <tr style=\"height:5mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"4\" rowspan=\"2\">City or town, state or province, country, and ZIP or foreign postal code<br>\n\t{{recipient_city_state if recipient_city_state else \"\"}}\n</td>\n      <td style=\"vertical-align:bottom\" class=\" rbs lbs bbs\" colspan=\"2\">$___________</td>\n    </tr>\n    <tr style=\"height:9mm\">\n      <td class=\"tbs rbs lbs bbs\" >11</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=2>12</td>\n    </tr>\n    <tr style=\"height:13mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">Account number (see instructions)</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:16mm\">FACTA filing<br>requirement</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:14mm\">2nd TIN not.</td>\n      <td class=\"tbs rbs lbs bbs\" >13 Excess golden parachute payments<br>$___________</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">14 Gross proceeds paid to an<br>attorney<br>$___________</td>\n    </tr>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs \" >15a Section 409A deferrals</td>\n      <td class=\"tbs rbs lbs \" colspan=\"3\">15b Section 409 income</td>\n      <td class=\"tbs rbs lbs \" >16 State tax withheld</td>\n      <td class=\"tbs rbs lbs \" colspan=\"2\">17 State/Payer's state no.</td>\n      <td class=\"tbs lbs\" >18 State income</td>\n    </tr>\n    <tr>\n      <td class=\"lbs rbs bbs\">$</td>\n      <td class=\"lbs rbs bbs\" colspan=\"3\">$</td>\n      <td class=\"lbs rbs bbs tbd\">$</td>\n      <td class=\"lbs rbs bbs tbd\" colspan=\"2\"></td>\n      <td class=\"lbs bbs tbd\">$</td>\n    </tr>\n\n    <tr style=\"height:8mm\">\n      <td class=\"tbs\" colspan=\"8\">Form 1099-MISC Cat. No. 14425J www.irs.gov/Form1099MISC Department of the Treasury - Internal Revenue Service</td>\n    </tr>\n\n  </tbody>\n</table>\n</div>\n<div id=\"copy_1\" style=\"position: relative; top:0cm; width:17cm;height:28.0cm;\">\n  <table>\n  <tbody>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs bbs\" style=\"width:86mm\" colspan=\"4\"; rowspan=\"3\">PAYER'S name, street address, city or town, state or province, country, ZIP<br>or foreign postal code, and telephone no.<br>\n      {{company if company else \"\"}}<br>\n    \t{{payer_street_address if payer_street_address else \"\"}}</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:35mm\">1 Rents</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:25mm\" rowspan=\"2\">OMB No. 1545-0115<br><yone>20</yone><ytwo>18</ytwo><br>Form 1099-MISC</td>\n      <td class=\"lbs bbs\" style=\"width:38mm\" colspan=\"2\" rowspan=\"2\">Miscellaneous Income</td>\n    </tr>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs bbs\" style=\"width:35mm\">2 Royalties</td>\n    </tr>\n    <tr style=\"height:9mm\">\n      <td class=\"tbs rbs lbs bbs\" >3 Other Income<br>\n\t{{payments if payments else \"\"}}\n\t</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">4 Federal Income tax withheld</td>\n      <td class=\"tbs lbs bbs\" style=\"width:29mm\" rowspan=\"2\">Copy 1<br>For State Tax<br>Department</td>\n    </tr>\n    <tr style=\"height:16mm\">\n      <td class=\"tbs rbs lbs bbs\" style=\"width:43mm\">PAYER'S TIN<br>\n\t{{company_tin if company_tin else \"\"}}\n\t</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"3\">RECIPIENT'S TIN<br>\n\t{{tax_id if tax_id else \"\"}}\n\t</td>\n      <td class=\"tbs rbs lbs bbs\" >Fishing boat proceeds</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">6 Medical and health care payments</td>\n    </tr>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"4\">RECIPIENT'S name</td>\n      {{supplier if supplier else \"\"}}\n      <td class=\"tbs rbs lbs bbs\" >7 Nonemployee compensation<br>\n\t</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">Substitute payments in lieu of dividends or interest</td>\n      <td class=\"tbs lbs bbs\" rowspan=\"6\"></td>\n    </tr>\n    <tr style=\"height:6mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"4\" rowspan=\"2\">Street address (including apt. no.)<br>\n\t{{recipient_street_address if recipient_street_address else \"\"}}\n\t</td>\n      <td class=\"tbs rbs lbs bbs\" >$___________</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">$___________</td>\n    </tr>\n    <tr style=\"height:7mm\">\n      <td class=\"tbs rbs lbs bbs\" rowspan=\"2\">9 Payer made direct sales of<br>$5,000 or more of consumer products<br>to a buyer<br>(recipient) for resale</td>\n      <td class=\"tbs rbs lbs\" colspan=\"2\">10 Crop insurance proceeds</td>\n    </tr>\n    <tr style=\"height:5mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"4\" rowspan=\"2\">City or town, state or province, country, and ZIP or foreign postal code<br>\n\t{{recipient_city_state if recipient_city_state else \"\"}}\n\t</td>\n      <td style=\"vertical-align:bottom\" class=\" rbs lbs bbs\" colspan=\"2\">$___________</td>\n    </tr>\n    <tr style=\"height:9mm\">\n      <td class=\"tbs rbs lbs bbs\" >11</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=2>12</td>\n    </tr>\n    <tr style=\"height:13mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">Account number (see instructions)</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:16mm\">FACTA filing<br>requirement</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:14mm\">2nd TIN not.</td>\n      <td class=\"tbs rbs lbs bbs\" >13 Excess golden parachute payments<br>$___________</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">14 Gross proceeds paid to an<br>attorney<br>$___________</td>\n    </tr>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs \" >15a Section 409A deferrals</td>\n      <td class=\"tbs rbs lbs \" colspan=\"3\">15b Section 409 income</td>\n      <td class=\"tbs rbs lbs \" >16 State tax withheld</td>\n      <td class=\"tbs rbs lbs \" colspan=\"2\">17 State/Payer's state no.</td>\n      <td class=\"tbs lbs\" >18 State income</td>\n    </tr>\n    <tr>\n      <td class=\"lbs rbs bbs\">$</td>\n      <td class=\"lbs rbs bbs\" colspan=\"3\">$</td>\n      <td class=\"lbs rbs bbs tbd\">$</td>\n      <td class=\"lbs rbs bbs tbd\" colspan=\"2\"></td>\n      <td class=\"lbs bbs tbd\">$</td>\n    </tr>\n\n    <tr style=\"height:8mm\">\n      <td class=\"tbs\" colspan=\"8\">Form 1099-MISC Cat. No. 14425J www.irs.gov/Form1099MISC Department of the Treasury - Internal Revenue Service</td>\n    </tr>\n\n  </tbody>\n</table>\n</div>\n<style>\nbody {\n  font-family: 'Helvetica', sans-serif;\n  font-size: 5.66pt;\n}\nyone {\n  font-family: 'Helvetica', sans-serif;\n  font-size: 14pt;\n  color: black;\n  -webkit-text-fill-color: white; /* Will override color (regardless of order) */\n  -webkit-text-stroke-width: 1px;\n  -webkit-text-stroke-color: black;\n}\nytwo {\n  font-family: 'Helvetica', sans-serif;\n  font-size: 14pt;\n  color: black;\n  -webkit-text-stroke-width: 1px;\n  -webkit-text-stroke-color: black;\n}\n\ntable, th, td {\n font-family: 'Helvetica', sans-serif;\n  font-size: 5.66pt;\n    border: none;\n}\n\n.tbs {\n    border-top: 1px solid black;\n}\n\n.bbs {\n    border-bottom: 1px solid black;\n}\n.lbs {\n    border-left: 1px solid black;\n}\n.rbs {\n    border-right: 1px solid black;\n}\n.allBorder {\n    border-top: 1px solid black;\n    border-right: 1px solid black;\n    border-left: 1px solid black;\n    borter-bottom: 1px solid black;\n}\n.bottomBorderOnlyDashed {\n\tborder-bottom: 1px dashed black;\n}\n.tbd {\n\tborder-top: 1px dashed black;\n}\n.address {\n\tvertical-align: bottom;\n}\n</style>", 
-  "line_breaks": 0, 
-  "modified": "2018-10-08 14:56:56.912851", 
-  "module": "Regional", 
-  "name": "IRS 1099 Form", 
-  "print_format_builder": 1, 
-  "print_format_type": "Server", 
-  "show_section_headings": 0, 
-  "standard": "No"
+	"align_labels_right": 0,
+	"css": "",
+	"custom_format": 1,
+	"default_print_language": "en",
+	"disabled": 0,
+	"doc_type": "Supplier",
+	"docstatus": 0,
+	"doctype": "Print Format",
+	"font": "Default",
+	"format_data": "[{\"fieldname\": \"print_heading_template\", \"fieldtype\": \"Custom HTML\", \"options\": \"<div class=\\\"print-heading\\\">\\t\\t\\t\\t<h2>TAX Invoice<br><small>{{ doc.name }}</small>\\t\\t\\t\\t</h2></div>\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"customer_name\", \"label\": \"Customer Name\"}, {\"print_hide\": 0, \"fieldname\": \"customer_name_in_arabic\", \"label\": \"Customer Name in Arabic\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"posting_date\", \"label\": \"Date\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Address\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"company\", \"label\": \"Company\"}, {\"print_hide\": 0, \"fieldname\": \"company_trn\", \"label\": \"Company TRN\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"company_address_display\", \"label\": \"Company Address\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"item_code\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"description\", \"print_width\": \"200px\"}, {\"print_hide\": 0, \"fieldname\": \"uom\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"tax_code\", \"print_width\": \"\"}], \"print_hide\": 0, \"fieldname\": \"items\", \"label\": \"Items\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"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\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"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\", \"align\": \"left\", \"label\": \"In Words\"}]",
+	"html": "<div id=\"copy_a\" style=\"position: relative; top:0cm; width:17cm;height:28.0cm;\">\n  <table>\n  <tbody>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs bbs\" style=\"width:86mm\" colspan=\"4\"; rowspan=\"3\">PAYER'S name, street address, city or town, state or province, country, ZIP<br>or foreign postal code, and telephone no.<br>\n\t{{company if company else \"\"}}<br>\n\t{{payer_street_address if payer_street_address else \"\"}}\n</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:35mm\">1 Rents</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:25mm\" rowspan=\"2\">OMB No. 1545-0115<br><yone>20</yone><ytwo>18</ytwo><br>Form 1099-MISC</td>\n      <td class=\"lbs bbs\" style=\"width:38mm\" colspan=\"2\" rowspan=\"2\">Miscellaneous Income</td>\n    </tr>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs bbs\" style=\"width:35mm\">2 Royalties</td>\n    </tr>\n    <tr style=\"height:9mm\">\n      <td class=\"tbs rbs lbs bbs\" >3 Other Income<br>\n\t{{payments if payments else \"\"}}\n\t</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">4 Federal Income tax withheld</td>\n      <td class=\"tbs lbs bbs\" style=\"width:29mm\" rowspan=\"2\">Copy A<br>For<br>Internal Revenue<br>Service Center<br><br>File with Form 1096</td>\n    </tr>\n    <tr style=\"height:16mm\">\n      <td class=\"tbs rbs lbs bbs\" style=\"width:43mm\">PAYER'S TIN<br>\n\t{{company_tin if company_tin else \"\"}}\n\t</td>\n      \n      <td class=\"tbs rbs lbs bbs\" colspan=\"3\">RECIPIENT'S TIN<br><br>\n      {{tax_id if tax_id else \"None\"}}\n</td>\n      <td class=\"tbs rbs lbs bbs\" >Fishing boat proceeds</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">6 Medical and health care payments</td>\n    </tr>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"4\">RECIPIENT'S name <br>\n         {{supplier if supplier else \"\"}}\n      </td>\n      <td class=\"tbs rbs lbs bbs\" >7 Nonemployee compensation<br>\n\t</td> \n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">Substitute payments in lieu of dividends or interest</td>\n      <td class=\"tbs lbs bbs\" rowspan=\"6\">For Privacy Act<br>and Paperwork<br>Reduction Act<br>Notice, see the<br>2018 General<br>Instructions for<br>Certain<br>Information<br>Returns.</td>\n    </tr>\n    <tr style=\"height:6mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"4\" rowspan=\"2\">Street address (including apt. no.)<br>\n\t{{recipient_street_address if recipient_street_address else \"\"}}\n\t</td>\n      <td class=\"tbs rbs lbs bbs\" >$___________</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">$___________</td>\n    </tr>\n    <tr style=\"height:7mm\">\n      <td class=\"tbs rbs lbs bbs\" rowspan=\"2\">9 Payer made direct sales of<br>$5,000 or more of consumer products<br>to a buyer<br>(recipient) for resale</td>\n      <td class=\"tbs rbs lbs\" colspan=\"2\">10 Crop insurance proceeds</td>\n    </tr>\n    <tr style=\"height:5mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"4\" rowspan=\"2\">City or town, state or province, country, and ZIP or foreign postal code<br>\n\t{{recipient_city_state if recipient_city_state else \"\"}}\n</td>\n      <td style=\"vertical-align:bottom\" class=\" rbs lbs bbs\" colspan=\"2\">$___________</td>\n    </tr>\n    <tr style=\"height:9mm\">\n      <td class=\"tbs rbs lbs bbs\" >11</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=2>12</td>\n    </tr>\n    <tr style=\"height:13mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">Account number (see instructions)</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:16mm\">FACTA filing<br>requirement</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:14mm\">2nd TIN not.</td>\n      <td class=\"tbs rbs lbs bbs\" >13 Excess golden parachute payments<br>$___________</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">14 Gross proceeds paid to an<br>attorney<br>$___________</td>\n    </tr>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs \" >15a Section 409A deferrals</td>\n      <td class=\"tbs rbs lbs \" colspan=\"3\">15b Section 409 income</td>\n      <td class=\"tbs rbs lbs \" >16 State tax withheld</td>\n      <td class=\"tbs rbs lbs \" colspan=\"2\">17 State/Payer's state no.</td>\n      <td class=\"tbs lbs\" >18 State income</td>\n    </tr>\n    <tr>\n      <td class=\"lbs rbs bbs\">$</td>\n      <td class=\"lbs rbs bbs\" colspan=\"3\">$</td>\n      <td class=\"lbs rbs bbs tbd\">$</td>\n      <td class=\"lbs rbs bbs tbd\" colspan=\"2\"></td>\n      <td class=\"lbs bbs tbd\">$</td>\n    </tr>\n\n    <tr style=\"height:8mm\">\n      <td class=\"tbs\" colspan=\"8\">Form 1099-MISC Cat. No. 14425J www.irs.gov/Form1099MISC Department of the Treasury - Internal Revenue Service</td>\n    </tr>\n\n  </tbody>\n</table>\n</div>\n<div id=\"copy_1\" style=\"position: relative; top:0cm; width:17cm;height:28.0cm;\">\n  <table>\n  <tbody>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs bbs\" style=\"width:86mm\" colspan=\"4\"; rowspan=\"3\">PAYER'S name, street address, city or town, state or province, country, ZIP<br>or foreign postal code, and telephone no.<br>\n      {{company if company else \"\"}}<br>\n    \t{{payer_street_address if payer_street_address else \"\"}}</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:35mm\">1 Rents</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:25mm\" rowspan=\"2\">OMB No. 1545-0115<br><yone>20</yone><ytwo>18</ytwo><br>Form 1099-MISC</td>\n      <td class=\"lbs bbs\" style=\"width:38mm\" colspan=\"2\" rowspan=\"2\">Miscellaneous Income</td>\n    </tr>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs bbs\" style=\"width:35mm\">2 Royalties</td>\n    </tr>\n    <tr style=\"height:9mm\">\n      <td class=\"tbs rbs lbs bbs\" >3 Other Income<br>\n\t{{payments if payments else \"\"}}\n\t</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">4 Federal Income tax withheld</td>\n      <td class=\"tbs lbs bbs\" style=\"width:29mm\" rowspan=\"2\">Copy 1<br>For State Tax<br>Department</td>\n    </tr>\n    <tr style=\"height:16mm\">\n      <td class=\"tbs rbs lbs bbs\" style=\"width:43mm\">PAYER'S TIN<br>\n\t{{company_tin if company_tin else \"\"}}\n\t</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"3\">RECIPIENT'S TIN<br>\n\t{{tax_id if tax_id else \"\"}}\n\t</td>\n      <td class=\"tbs rbs lbs bbs\" >Fishing boat proceeds</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">6 Medical and health care payments</td>\n    </tr>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"4\">RECIPIENT'S name</td>\n      {{supplier if supplier else \"\"}}\n      <td class=\"tbs rbs lbs bbs\" >7 Nonemployee compensation<br>\n\t</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">Substitute payments in lieu of dividends or interest</td>\n      <td class=\"tbs lbs bbs\" rowspan=\"6\"></td>\n    </tr>\n    <tr style=\"height:6mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"4\" rowspan=\"2\">Street address (including apt. no.)<br>\n\t{{recipient_street_address if recipient_street_address else \"\"}}\n\t</td>\n      <td class=\"tbs rbs lbs bbs\" >$___________</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">$___________</td>\n    </tr>\n    <tr style=\"height:7mm\">\n      <td class=\"tbs rbs lbs bbs\" rowspan=\"2\">9 Payer made direct sales of<br>$5,000 or more of consumer products<br>to a buyer<br>(recipient) for resale</td>\n      <td class=\"tbs rbs lbs\" colspan=\"2\">10 Crop insurance proceeds</td>\n    </tr>\n    <tr style=\"height:5mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"4\" rowspan=\"2\">City or town, state or province, country, and ZIP or foreign postal code<br>\n\t{{recipient_city_state if recipient_city_state else \"\"}}\n\t</td>\n      <td style=\"vertical-align:bottom\" class=\" rbs lbs bbs\" colspan=\"2\">$___________</td>\n    </tr>\n    <tr style=\"height:9mm\">\n      <td class=\"tbs rbs lbs bbs\" >11</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=2>12</td>\n    </tr>\n    <tr style=\"height:13mm\">\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">Account number (see instructions)</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:16mm\">FACTA filing<br>requirement</td>\n      <td class=\"tbs rbs lbs bbs\" style=\"width:14mm\">2nd TIN not.</td>\n      <td class=\"tbs rbs lbs bbs\" >13 Excess golden parachute payments<br>$___________</td>\n      <td class=\"tbs rbs lbs bbs\" colspan=\"2\">14 Gross proceeds paid to an<br>attorney<br>$___________</td>\n    </tr>\n    <tr style=\"height:12mm\">\n      <td class=\"tbs rbs lbs \" >15a Section 409A deferrals</td>\n      <td class=\"tbs rbs lbs \" colspan=\"3\">15b Section 409 income</td>\n      <td class=\"tbs rbs lbs \" >16 State tax withheld</td>\n      <td class=\"tbs rbs lbs \" colspan=\"2\">17 State/Payer's state no.</td>\n      <td class=\"tbs lbs\" >18 State income</td>\n    </tr>\n    <tr>\n      <td class=\"lbs rbs bbs\">$</td>\n      <td class=\"lbs rbs bbs\" colspan=\"3\">$</td>\n      <td class=\"lbs rbs bbs tbd\">$</td>\n      <td class=\"lbs rbs bbs tbd\" colspan=\"2\"></td>\n      <td class=\"lbs bbs tbd\">$</td>\n    </tr>\n\n    <tr style=\"height:8mm\">\n      <td class=\"tbs\" colspan=\"8\">Form 1099-MISC Cat. No. 14425J www.irs.gov/Form1099MISC Department of the Treasury - Internal Revenue Service</td>\n    </tr>\n\n  </tbody>\n</table>\n</div>\n<style>\nbody {\n  font-family: 'Helvetica', sans-serif;\n  font-size: 5.66pt;\n}\nyone {\n  font-family: 'Helvetica', sans-serif;\n  font-size: 14pt;\n  color: black;\n  -webkit-text-fill-color: white; /* Will override color (regardless of order) */\n  -webkit-text-stroke-width: 1px;\n  -webkit-text-stroke-color: black;\n}\nytwo {\n  font-family: 'Helvetica', sans-serif;\n  font-size: 14pt;\n  color: black;\n  -webkit-text-stroke-width: 1px;\n  -webkit-text-stroke-color: black;\n}\n\ntable, th, td {\n font-family: 'Helvetica', sans-serif;\n  font-size: 5.66pt;\n    border: none;\n}\n\n.tbs {\n    border-top: 1px solid black;\n}\n\n.bbs {\n    border-bottom: 1px solid black;\n}\n.lbs {\n    border-left: 1px solid black;\n}\n.rbs {\n    border-right: 1px solid black;\n}\n.allBorder {\n    border-top: 1px solid black;\n    border-right: 1px solid black;\n    border-left: 1px solid black;\n    borter-bottom: 1px solid black;\n}\n.bottomBorderOnlyDashed {\n\tborder-bottom: 1px dashed black;\n}\n.tbd {\n\tborder-top: 1px dashed black;\n}\n.address {\n\tvertical-align: bottom;\n}\n</style>",
+	"line_breaks": 0,
+	"modified": "2018-10-08 14:56:56.912851",
+	"module": "Regional",
+	"name": "IRS 1099 Form",
+	"print_format_builder": 1,
+	"print_format_type": "Server",
+	"show_section_headings": 0,
+	"standard": "No"
  }
-]
\ No newline at end of file
+]
diff --git a/erpnext/regional/united_states/address_template.html b/erpnext/regional/united_states/address_template.html
new file mode 100644
index 0000000..089315e
--- /dev/null
+++ b/erpnext/regional/united_states/address_template.html
@@ -0,0 +1,4 @@
+{{ address_line1 }}<br>
+{% if address_line2 %}{{ address_line2 }}<br>{% endif -%}
+{{ city }}, {% if state %}{{ state }}{% endif -%}{% if pincode %} {{ pincode }}<br>{% endif -%}
+{% if country != "United States" %}{{ country|upper }}{% endif -%}
diff --git a/erpnext/regional/united_states/test_united_states.py b/erpnext/regional/united_states/test_united_states.py
new file mode 100644
index 0000000..3c768b7
--- /dev/null
+++ b/erpnext/regional/united_states/test_united_states.py
@@ -0,0 +1,48 @@
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+from __future__ import unicode_literals
+import frappe
+import unittest
+from erpnext.regional.report.irs_1099.irs_1099 import execute as execute_1099_report
+
+
+class TestUnitedStates(unittest.TestCase):
+    def test_irs_1099_custom_field(self):
+        doc = frappe.new_doc("Supplier")
+        doc.supplier_name = "_US 1099 Test Supplier"
+        doc.supplier_group = "Services"
+        doc.supplier_type = "Company"
+        doc.country = "United States"
+        doc.tax_id = "04-1234567"
+        doc.irs_1099 = 1
+        doc.save()
+        frappe.db.commit()
+        supplier = frappe.get_doc('Supplier', "_US 1099 Test Supplier")
+        self.assertEqual(supplier.irs_1099, 1)
+
+    def test_irs_1099_report(self):
+        make_payment_entry_to_irs_1099_supplier()
+        filters = frappe._dict({"fiscal_year": "2016", "company": "_Test Company"})
+        columns, data = execute_1099_report(filters)
+        print(columns, data)
+        expected_row = {'supplier': '_US 1099 Test Supplier',
+                        'supplier_group': 'Services',
+                        'payments': 100.0,
+                        'tax_id': '04-1234567'}
+        self.assertEqual(data, expected_row)
+
+
+def make_payment_entry_to_irs_1099_supplier():
+    pe = frappe.new_doc("Payment Entry")
+    pe.payment_type = "Pay"
+    pe.company = "_Test Company"
+    pe.posting_date = "2016-01-10"
+    pe.paid_from = "_Test Bank USD - _TC"
+    pe.paid_to = "_Test Bank - _TC"
+    pe.paid_amount = 100
+    pe.received_amount = 100
+    pe.reference_no = "For IRS 1099 testing"
+    pe.reference_date = "2016-01-10"
+    pe.party_type = "Supplier"
+    pe.party = "_US 1099 Test Supplier"
+    pe.save()