{"en_US": "<t t-name=\"sale.report_saleorder_document\">\n    <t t-call=\"web.external_layout\">\n        <t t-set=\"doc\" t-value=\"doc.with_context(lang=doc.partner_id.lang)\"/>\n        <t t-set=\"forced_vat\" t-value=\"doc.fiscal_position_id.foreign_vat\"/> <!-- So that it appears in the footer of the report instead of the company VAT if it's set -->\n        <t t-set=\"address\">\n            <div t-field=\"doc.partner_id\" t-options=\"{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: True}\"/>\n            <p t-if=\"doc.partner_id.vat\"><t t-out=\"doc.company_id.account_fiscal_country_id.vat_label or 'Tax ID'\"/>: <span t-field=\"doc.partner_id.vat\"/></p>\n        </t>\n        <t t-if=\"doc.partner_shipping_id == doc.partner_invoice_id                              and doc.partner_invoice_id != doc.partner_id                              or doc.partner_shipping_id != doc.partner_invoice_id\">\n            <t t-set=\"information_block\">\n                <strong>\n                    <t t-if=\"doc.partner_shipping_id == doc.partner_invoice_id\">\n                        Invoicing and Shipping Address:\n                    </t>\n                    <t t-else=\"\">\n                        Invoicing Address:\n                    </t>\n                </strong>\n                <div t-field=\"doc.partner_invoice_id\" t-options=\"{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;, &quot;phone&quot;], &quot;no_marker&quot;: True, &quot;phone_icons&quot;: True}\"/>\n                <t t-if=\"doc.partner_shipping_id != doc.partner_invoice_id\">\n                    <strong>Shipping Address:</strong>\n                    <div t-field=\"doc.partner_shipping_id\" t-options=\"{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;, &quot;phone&quot;], &quot;no_marker&quot;: True, &quot;phone_icons&quot;: True}\"/>\n                </t>\n            </t>\n        </t>\n        <div class=\"page\">\n            <div class=\"oe_structure\"/>\n\n            <h2 class=\"mt-4\">\n                <span t-if=\"env.context.get('proforma', False) or is_pro_forma\">Pro-Forma Invoice # </span>\n                <span t-elif=\"doc.state in ['draft','sent']\">Quotation # </span>\n                <span t-else=\"\">Order # </span>\n                <span t-field=\"doc.name\"/>\n            </h2>\n\n            <div class=\"row mt-4 mb-4\" id=\"informations\">\n                <div t-if=\"doc.client_order_ref\" class=\"col-auto col-3 mw-100 mb-2\" name=\"informations_reference\">\n                    <strong>Your Reference:</strong>\n                    <p class=\"m-0\" t-field=\"doc.client_order_ref\"/>\n                </div>\n                <div t-if=\"doc.date_order\" class=\"col-auto col-3 mw-100 mb-2\" name=\"informations_date\">\n                    <strong t-if=\"doc.state in ['draft', 'sent']\">Quotation Date:</strong>\n                    <strong t-else=\"\">Order Date:</strong>\n                    <p class=\"m-0\" t-field=\"doc.date_order\" t-options=\"{&quot;widget&quot;: &quot;date&quot;}\"/>\n                </div>\n                <div t-if=\"doc.validity_date and doc.state in ['draft', 'sent']\" class=\"col-auto col-3 mw-100 mb-2\" name=\"expiration_date\">\n                    <strong>Expiration:</strong>\n                    <p class=\"m-0\" t-field=\"doc.validity_date\"/>\n                </div>\n                <div t-if=\"doc.user_id.name\" class=\"col-auto col-3 mw-100 mb-2\">\n                    <strong>Salesperson:</strong>\n                    <p class=\"m-0\" t-field=\"doc.user_id\"/>\n                </div>\n            </div>\n\n            <!-- Is there a discount on at least one line? -->\n            <t t-set=\"lines_to_report\" t-value=\"doc._get_order_lines_to_report()\"/>\n            <t t-set=\"display_discount\" t-value=\"any(l.discount for l in lines_to_report)\"/>\n\n            <table class=\"table table-sm o_main_table table-borderless mt-4\">\n                <!-- In case we want to repeat the header, remove \"display: table-row-group\" -->\n                <thead style=\"display: table-row-group\">\n                    <tr>\n                        <th name=\"th_description\" class=\"text-start\">Description</th>\n                        <th name=\"th_quantity\" class=\"text-end\">Quantity</th>\n                        <th name=\"th_priceunit\" class=\"text-end\">Unit Price</th>\n                        <th name=\"th_discount\" t-if=\"display_discount\" class=\"text-end\">\n                            <span>Disc.%</span>\n                        </th>\n                        <th name=\"th_taxes\" class=\"text-end\">Taxes</th>\n                        <th name=\"th_subtotal\" class=\"text-end\">\n                            <span groups=\"account.group_show_line_subtotals_tax_excluded\">Amount</span>\n                            <span groups=\"account.group_show_line_subtotals_tax_included\">Total Price</span>\n                        </th>\n                    </tr>\n                </thead>\n                <tbody class=\"sale_tbody\">\n\n                    <t t-set=\"current_subtotal\" t-value=\"0\"/>\n\n                    <t t-foreach=\"lines_to_report\" t-as=\"line\">\n\n                        <t t-set=\"current_subtotal\" t-value=\"current_subtotal + line.price_subtotal\" groups=\"account.group_show_line_subtotals_tax_excluded\"/>\n                        <t t-set=\"current_subtotal\" t-value=\"current_subtotal + line.price_total\" groups=\"account.group_show_line_subtotals_tax_included\"/>\n\n                        <tr t-att-class=\"'bg-200 fw-bold o_line_section' if line.display_type == 'line_section' else 'fst-italic o_line_note' if line.display_type == 'line_note' else ''\">\n                            <t t-if=\"not line.display_type\">\n                                <td name=\"td_name\"><span t-field=\"line.name\"/></td>\n                                <td name=\"td_quantity\" class=\"text-end\">\n                                    <span t-field=\"line.product_uom_qty\"/>\n                                    <span t-field=\"line.product_uom\"/>\n                                </td>\n                                <td name=\"td_priceunit\" class=\"text-end\">\n                                    <span t-field=\"line.price_unit\"/>\n                                </td>\n                                <td t-if=\"display_discount\" class=\"text-end\">\n                                    <span t-field=\"line.discount\"/>\n                                </td>\n                                <t t-set=\"taxes\" t-value=\"', '.join([(tax.description or tax.name) for tax in line.tax_id])\"/>\n                                <td name=\"td_taxes\" t-attf-class=\"text-end {{ 'text-nowrap' if len(taxes) &lt; 10 else '' }}\">\n                                    <span t-out=\"taxes\">Tax 15%</span>\n                                </td>\n                                <td t-if=\"not line.is_downpayment\" name=\"td_subtotal\" class=\"text-end o_price_total\">\n                                    <span t-field=\"line.price_subtotal\" groups=\"account.group_show_line_subtotals_tax_excluded\"/>\n                                    <span t-field=\"line.price_total\" groups=\"account.group_show_line_subtotals_tax_included\"/>\n                                </td>\n                            </t>\n                            <t t-elif=\"line.display_type == 'line_section'\">\n                                <td name=\"td_section_line\" colspan=\"99\">\n                                    <span t-field=\"line.name\"/>\n                                </td>\n                                <t t-set=\"current_section\" t-value=\"line\"/>\n                                <t t-set=\"current_subtotal\" t-value=\"0\"/>\n                            </t>\n                            <t t-elif=\"line.display_type == 'line_note'\">\n                                <td name=\"td_note_line\" colspan=\"99\">\n                                    <span t-field=\"line.name\"/>\n                                </td>\n                            </t>\n                        </tr>\n\n                        <t t-if=\"current_section and (line_last or lines_to_report[line_index+1].display_type == 'line_section') and not line.is_downpayment\">\n                            <tr class=\"is-subtotal text-end\">\n                                <td name=\"td_section_subtotal\" colspan=\"99\">\n                                    <strong class=\"mr16\">Subtotal</strong>\n                                    <span t-out=\"current_subtotal\" t-options=\"{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: doc.pricelist_id.currency_id}\"/>\n                                </td>\n                            </tr>\n                        </t>\n                    </t>\n                </tbody>\n            </table>\n\n            <div class=\"clearfix\" name=\"so_total_summary\">\n                <div id=\"total\" class=\"row\" name=\"total\">\n                    <div t-attf-class=\"#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ms-auto\">\n                        <table class=\"table table-sm table-borderless\">\n                            <!-- Tax totals -->\n                            <t t-set=\"tax_totals\" t-value=\"doc.tax_totals\"/>\n                            <t t-call=\"account.document_tax_totals\"/>\n                        </table>\n                    </div>\n                </div>\n            </div>\n\n            <div t-if=\"doc.signature\" class=\"mt-4 ml64 mr4\" name=\"signature\">\n                <div class=\"offset-8\">\n                    <strong>Signature</strong>\n                </div>\n                <div class=\"offset-8\">\n                    <img t-att-src=\"image_data_uri(doc.signature)\" style=\"max-height: 4cm; max-width: 8cm;\"/>\n                </div>\n                <div class=\"offset-8 text-center\">\n                    <p t-field=\"doc.signed_by\"/>\n                </div>\n            </div>\n\n            <div>\n                <p t-field=\"doc.note\" name=\"order_note\"/>\n                <p t-if=\"not is_html_empty(doc.payment_term_id.note)\">\n                    <span t-field=\"doc.payment_term_id.note\"/>\n                </p>\n                <p t-if=\"doc.fiscal_position_id and not is_html_empty(doc.fiscal_position_id.sudo().note)\" id=\"fiscal_position_remark\">\n                    <strong>Fiscal Position Remark:</strong>\n                    <span t-field=\"doc.fiscal_position_id.sudo().note\"/>\n                </p>\n            </div>\n        </div>\n    </t>\n</t>", "vi_VN": "<t t-name=\"sale.report_saleorder_document\">\n    <t t-call=\"web.external_layout\">\n        <t t-set=\"doc\" t-value=\"doc.with_context(lang=doc.partner_id.lang)\"/>\n        <t t-set=\"forced_vat\" t-value=\"doc.fiscal_position_id.foreign_vat\"/> <!-- So that it appears in the footer of the report instead of the company VAT if it's set -->\n        <t t-set=\"address\">\n            <div t-field=\"doc.partner_id\" t-options=\"{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: True}\"/>\n            <p t-if=\"doc.partner_id.vat\"><t t-out=\"doc.company_id.account_fiscal_country_id.vat_label or 'Tax ID'\"/>: <span t-field=\"doc.partner_id.vat\"/></p>\n        </t>\n        <t t-if=\"doc.partner_shipping_id == doc.partner_invoice_id                              and doc.partner_invoice_id != doc.partner_id                              or doc.partner_shipping_id != doc.partner_invoice_id\">\n            <t t-set=\"information_block\">\n                <strong>\n                    <t t-if=\"doc.partner_shipping_id == doc.partner_invoice_id\">\n                        Địa chỉ xuất hóa đơn và giao hàng\n                    </t>\n                    <t t-else=\"\">\n                        Địa chỉ xuất hoá đơn\n                    </t>\n                </strong>\n                <div t-field=\"doc.partner_invoice_id\" t-options=\"{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;, &quot;phone&quot;], &quot;no_marker&quot;: True, &quot;phone_icons&quot;: True}\"/>\n                <t t-if=\"doc.partner_shipping_id != doc.partner_invoice_id\">\n                    <strong>Địa chỉ giao hàng:</strong>\n                    <div t-field=\"doc.partner_shipping_id\" t-options=\"{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;, &quot;phone&quot;], &quot;no_marker&quot;: True, &quot;phone_icons&quot;: True}\"/>\n                </t>\n            </t>\n        </t>\n        <div class=\"page\">\n            <div class=\"oe_structure\"/>\n\n            <h2 class=\"mt-4\">\n                <span t-if=\"env.context.get('proforma', False) or is_pro_forma\">Hóa đơn chiếu lệ # </span>\n                <span t-elif=\"doc.state in ['draft','sent']\">Báo giá # </span>\n                <span t-else=\"\">Đơn hàng # </span>\n                <span t-field=\"doc.name\"/>\n            </h2>\n\n            <div class=\"row mt-4 mb-4\" id=\"informations\">\n                <div t-if=\"doc.client_order_ref\" class=\"col-auto col-3 mw-100 mb-2\" name=\"informations_reference\">\n                    <strong>Mã số của bạn:</strong>\n                    <p class=\"m-0\" t-field=\"doc.client_order_ref\"/>\n                </div>\n                <div t-if=\"doc.date_order\" class=\"col-auto col-3 mw-100 mb-2\" name=\"informations_date\">\n                    <strong t-if=\"doc.state in ['draft', 'sent']\">Ngày báo giá</strong>\n                    <strong t-else=\"\">Ngày đặt hàng:</strong>\n                    <p class=\"m-0\" t-field=\"doc.date_order\" t-options=\"{&quot;widget&quot;: &quot;date&quot;}\"/>\n                </div>\n                <div t-if=\"doc.validity_date and doc.state in ['draft', 'sent']\" class=\"col-auto col-3 mw-100 mb-2\" name=\"expiration_date\">\n                    <strong>Ngày hết hạn:</strong>\n                    <p class=\"m-0\" t-field=\"doc.validity_date\"/>\n                </div>\n                <div t-if=\"doc.user_id.name\" class=\"col-auto col-3 mw-100 mb-2\">\n                    <strong>Nhân viên bán hàng</strong>\n                    <p class=\"m-0\" t-field=\"doc.user_id\"/>\n                </div>\n            </div>\n\n            <!-- Is there a discount on at least one line? -->\n            <t t-set=\"lines_to_report\" t-value=\"doc._get_order_lines_to_report()\"/>\n            <t t-set=\"display_discount\" t-value=\"any(l.discount for l in lines_to_report)\"/>\n\n            <table class=\"table table-sm o_main_table table-borderless mt-4\">\n                <!-- In case we want to repeat the header, remove \"display: table-row-group\" -->\n                <thead style=\"display: table-row-group\">\n                    <tr>\n                        <th name=\"th_description\" class=\"text-start\">Mô tả</th>\n                        <th name=\"th_quantity\" class=\"text-end\">Số lượng</th>\n                        <th name=\"th_priceunit\" class=\"text-end\">Đơn giá</th>\n                        <th name=\"th_discount\" t-if=\"display_discount\" class=\"text-end\">\n                            <span>% chiết khấu</span>\n                        </th>\n                        <th name=\"th_taxes\" class=\"text-end\">Thuế</th>\n                        <th name=\"th_subtotal\" class=\"text-end\">\n                            <span groups=\"account.group_show_line_subtotals_tax_excluded\">Amount Số tiền</span>\n                            <span groups=\"account.group_show_line_subtotals_tax_included\">Tổng giá</span>\n                        </th>\n                    </tr>\n                </thead>\n                <tbody class=\"sale_tbody\">\n\n                    <t t-set=\"current_subtotal\" t-value=\"0\"/>\n\n                    <t t-foreach=\"lines_to_report\" t-as=\"line\">\n\n                        <t t-set=\"current_subtotal\" t-value=\"current_subtotal + line.price_subtotal\" groups=\"account.group_show_line_subtotals_tax_excluded\"/>\n                        <t t-set=\"current_subtotal\" t-value=\"current_subtotal + line.price_total\" groups=\"account.group_show_line_subtotals_tax_included\"/>\n\n                        <tr t-att-class=\"'bg-200 fw-bold o_line_section' if line.display_type == 'line_section' else 'fst-italic o_line_note' if line.display_type == 'line_note' else ''\">\n                            <t t-if=\"not line.display_type\">\n                                <td name=\"td_name\"><span t-field=\"line.name\"/></td>\n                                <td name=\"td_quantity\" class=\"text-end\">\n                                    <span t-field=\"line.product_uom_qty\"/>\n                                    <span t-field=\"line.product_uom\"/>\n                                </td>\n                                <td name=\"td_priceunit\" class=\"text-end\">\n                                    <span t-field=\"line.price_unit\"/>\n                                </td>\n                                <td t-if=\"display_discount\" class=\"text-end\">\n                                    <span t-field=\"line.discount\"/>\n                                </td>\n                                <t t-set=\"taxes\" t-value=\"', '.join([(tax.description or tax.name) for tax in line.tax_id])\"/>\n                                <td name=\"td_taxes\" t-attf-class=\"text-end {{ 'text-nowrap' if len(taxes) &lt; 10 else '' }}\">\n                                    <span t-out=\"taxes\">Thuế 15%</span>\n                                </td>\n                                <td t-if=\"not line.is_downpayment\" name=\"td_subtotal\" class=\"text-end o_price_total\">\n                                    <span t-field=\"line.price_subtotal\" groups=\"account.group_show_line_subtotals_tax_excluded\"/>\n                                    <span t-field=\"line.price_total\" groups=\"account.group_show_line_subtotals_tax_included\"/>\n                                </td>\n                            </t>\n                            <t t-elif=\"line.display_type == 'line_section'\">\n                                <td name=\"td_section_line\" colspan=\"99\">\n                                    <span t-field=\"line.name\"/>\n                                </td>\n                                <t t-set=\"current_section\" t-value=\"line\"/>\n                                <t t-set=\"current_subtotal\" t-value=\"0\"/>\n                            </t>\n                            <t t-elif=\"line.display_type == 'line_note'\">\n                                <td name=\"td_note_line\" colspan=\"99\">\n                                    <span t-field=\"line.name\"/>\n                                </td>\n                            </t>\n                        </tr>\n\n                        <t t-if=\"current_section and (line_last or lines_to_report[line_index+1].display_type == 'line_section') and not line.is_downpayment\">\n                            <tr class=\"is-subtotal text-end\">\n                                <td name=\"td_section_subtotal\" colspan=\"99\">\n                                    <strong class=\"mr16\">Thành tiền</strong>\n                                    <span t-out=\"current_subtotal\" t-options=\"{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: doc.pricelist_id.currency_id}\"/>\n                                </td>\n                            </tr>\n                        </t>\n                    </t>\n                </tbody>\n            </table>\n\n            <div class=\"clearfix\" name=\"so_total_summary\">\n                <div id=\"total\" class=\"row\" name=\"total\">\n                    <div t-attf-class=\"#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ms-auto\">\n                        <table class=\"table table-sm table-borderless\">\n                            <!-- Tax totals -->\n                            <t t-set=\"tax_totals\" t-value=\"doc.tax_totals\"/>\n                            <t t-call=\"account.document_tax_totals\"/>\n                        </table>\n                    </div>\n                </div>\n            </div>\n\n            <div t-if=\"doc.signature\" class=\"mt-4 ml64 mr4\" name=\"signature\">\n                <div class=\"offset-8\">\n                    <strong>Chữ ký</strong>\n                </div>\n                <div class=\"offset-8\">\n                    <img t-att-src=\"image_data_uri(doc.signature)\" style=\"max-height: 4cm; max-width: 8cm;\"/>\n                </div>\n                <div class=\"offset-8 text-center\">\n                    <p t-field=\"doc.signed_by\"/>\n                </div>\n            </div>\n\n            <div>\n                <p t-field=\"doc.note\" name=\"order_note\"/>\n                <p t-if=\"not is_html_empty(doc.payment_term_id.note)\">\n                    <span t-field=\"doc.payment_term_id.note\"/>\n                </p>\n                <p t-if=\"doc.fiscal_position_id and not is_html_empty(doc.fiscal_position_id.sudo().note)\" id=\"fiscal_position_remark\">\n                    <strong>Ghi chú vị trí tài chính:</strong>\n                    <span t-field=\"doc.fiscal_position_id.sudo().note\"/>\n                </p>\n            </div>\n        </div>\n    </t>\n</t>"}