Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Discuss
    • Kecerdasan Buatan
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Manajemen Properti
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Konsultasi
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

How to show prices including tax on POS receipt?

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
posticketreportingodoo8.0
1 Balas
20780 Tampilan
Avatar
Yenthe Van Ginneken (Mainframe Monkey)

Hi guys,

I would like to have the POS receipt include the tax-amount in the price per product.
For example if you would buy a product thats costs 1.00 and the tax rate is 21% I want the line to show 1.21€.
In point_of_sale/static/src/xml/pos.xml is the PosTicket which displays the ticket in the browser (and makes the PDF too if you wish). So I've changed this:

                    <td class="pos-right-align">
                        <t t-esc="widget.format_currency(orderline.get_display_price())"/>
                    </td>

With this:

                    <td class="pos-right-align">
                        <t t-esc="widget.format_currency(orderline.get_price_with_tax())"/>
                    </td>

When I now print the ticket in browser everything is fine and the price is shown with the tax amount included in the price on a line. For example:

However, when I now print this ticket with my receipt printer the prices are still shown without these taxes included on the lines. So my question is.. which report is then responsible for the ticket and how can I make it show the prices including taxes? I can't find it anywhere under the reports.. In browser and on PDF it works fine but not when I print the ticket out with the ticket printer. I assume this is controlled/changed by another report?

With kind regards,
Yenthe

1
Avatar
Buang
Shawn Varghese

Nice find. I've removed my earlier comments, to avoid confusing anyone.

Yenthe Van Ginneken (Mainframe Monkey)
Penulis

Thanks Shawn! I've removed mine too and only left my answer there. Hopefully this can help others! It had me confused for hours.

Avatar
Yenthe Van Ginneken (Mainframe Monkey)
Penulis Jawaban Terbai

Alright found the solution myself.
Odoo went in a bit of a weird way here really. The ticket that is shown in your browser and that is printed in the PDF is not the same XML code as for the ticket that the ticket prints.
PosTicket is responsible for printing it on screen and in the PDF and XmlReceipt is responsible for printing with the ticket printer.

If you want to show prices with taxes when the ticket prints it should be like this:

<value><t t-esc='Math.abs(line.price_display + line.tax)' /></value>

In place of:

<value><t t-esc='line.price_display' /></value>

The code that prints out the ticket on screen and in your PDF is from PosTicket in pos.xml (addons/point_of_sale/static/src/xml/pos.xml):

<t t-name="PosTicket">
        <div class="pos-sale-ticket">
            
            <div class="pos-center-align"><t t-esc="new Date().toString(Date.CultureInfo.formatPatterns.shortDate + ' ' +
                Date.CultureInfo.formatPatterns.longTime)"/> <t t-esc="order.get('name')"/></div>
            <br />
            <t t-esc="widget.pos.company.name"/><br />
            Phone: <t t-esc="widget.pos.company.phone || ''"/><br />
            User: <t t-esc="widget.pos.cashier ? widget.pos.cashier.name : widget.pos.user.name"/><br />
            Shop: <t t-esc="widget.pos.shop.name"/><br />
            <br />
            <t t-if="widget.pos.config.receipt_header">
                <div style='text-align:center'>
                    <t t-esc="widget.pos.config.receipt_header" />
                </div>
                <br />
            </t>
            <table>
                <colgroup>
                    <col width='50%' />
                    <col width='25%' />
                    <col width='25%' />
                </colgroup>
                <tr t-foreach="orderlines" t-as="orderline">
                    <td>
                        <t t-esc="orderline.get_product().display_name"/>
                         <t t-if="orderline.get_discount() > 0">
                            <div class="pos-disc-font">
                                With a <t t-esc="orderline.get_discount()"/>% discount
                            </div>
                        </t>
                    </td>
                    <td class="pos-right-align">
                        <t t-esc="orderline.get_quantity_str_with_unit()"/>
                    </td>
                    <td class="pos-right-align">
                        <t t-esc="widget.format_currency(orderline.get_price_with_tax())"/>
                    </td>
                </tr>
            </table>
            <br />
            <table>
                <tr>
                    <td>Subtotal:</td>
                    <td class="pos-right-align">
                        <t t-esc="widget.format_currency(order.getSubtotal())"/>
                    </td>
                </tr>
                <t t-foreach="order.getTaxDetails()" t-as="taxdetail">
                    <tr>
                        <td><t t-esc="taxdetail.tax.name" /></td>
                        <td class="pos-right-align">
                            <t t-esc="widget.format_currency(taxdetail.amount)" />
                        </td>
                    </tr>
                </t>
                <tr>
                    <td>Discount:</td>
                    <td class="pos-right-align">
                        <t t-esc="widget.format_currency(order.getDiscountTotal())"/>
                    </td>
                </tr>
                <tr class="emph">
                    <td>Total:</td>
                    <td class="pos-right-align">
                        <t t-esc="widget.format_currency(order.getTotalTaxIncluded())"/>
                    </td>
                </tr>
            </table>
            <br />
            <table>
                <tr t-foreach="paymentlines" t-as="line">
                    <td>
                        <t t-esc="line.name"/>
                    </td>
                    <td class="pos-right-align">
                        <t t-esc="widget.format_currency(line.get_amount())"/>
                    </td>
                </tr>
            </table>
            <br />
            <table>
                <tr><td>Change: </td><td class="pos-right-align">
                    <t t-esc="widget.format_currency(order.getChange())"/>
                    </td></tr>
            </table>
            <t t-if="widget.pos.config.receipt_footer">
                <br />
                <div style='text-align:center'>
                    <t t-esc="widget.pos.config.receipt_footer" />
                </div>
            </t>
        </div>
    </t>

The code that prints out the ticket from the ticker printer comes from XmlReceipt in pos.xml (addons/point_of_sale/static/src/xml/pos.xml):

    <t t-name="XmlReceipt">
        <receipt align='center' width='40' value-thousands-separator='' >
            <t t-if='receipt.company.logo'>
                <img t-att-src='receipt.company.logo' />
                <br/>
            </t>
            <t t-if='!receipt.company.logo'>
                <h1><t t-esc='receipt.company.name' /></h1>
                <br/>
            </t>
            <div font='b'>
                <t t-if='receipt.shop.name'>
                    <div><t t-esc='receipt.shop.name' /></div>
                </t>
                <t t-if='receipt.company.contact_address'>
                    <div><t t-esc='receipt.company.contact_address' /></div>
                </t>
                <t t-if='receipt.company.phone'>
                    <div>Tel:<t t-esc='receipt.company.phone' /></div>
                </t>
                <t t-if='receipt.company.vat'>
                    <div>VAT:<t t-esc='receipt.company.vat' /></div>
                </t>
                <t t-if='receipt.company.email'>
                    <div><t t-esc='receipt.company.email' /></div>
                </t>
                <t t-if='receipt.company.website'>
                    <div><t t-esc='receipt.company.website' /></div>
                </t>
                <t t-if='receipt.header'>
                    <div><t t-esc='receipt.header' /></div>
                </t>
                <t t-if='receipt.cashier'>
                    <div>--------------------------------</div>
                    <div>Served by <t t-esc='receipt.cashier' /></div>
                </t>
            </div>
            <br /><br />

            <!-- Orderlines -->

            <div line-ratio='0.6'>
                <t t-foreach='receipt.orderlines' t-as='line'>
                    <t t-set='simple' t-value='line.discount === 0 and line.unit_name === "Unit(s)" and line.quantity === 1' />
                    <t t-if='simple'>
                        <line>
                            <left><t t-esc='line.product_name' /></left>
                            <right><value><t t-esc='line.price_display' /></value></right>
                        </line>
                    </t>
                    <t t-if='!simple'>
                        <line><left><t t-esc='line.product_name' /></left></line>
                        <t t-if='line.discount !== 0'>
                            <line indent='1'><left>Discount: <t t-esc='line.discount' />%</left></line>
                        </t>
                        <line indent='1'>
                            <left>
                                <value value-decimals='3' value-autoint='on'>
                                    <t t-esc='line.quantity' />
                                </value>
                                <t t-if='line.unit_name !== "Unit(s)"'>
                                    <t t-esc='line.unit_name' /> 
                                </t>
                                <!--x 
                                <value value-decimals='2'>
                                    <t t-esc='Math.abs(line.price + line.tax)' />
                                </value>-->
                            </left>
                            <right>
                                <value><t t-esc='Math.abs(line.price_display + line.tax)' /></value>
                            </right>
                        </line>
                    </t>
                </t>
            </div>

            <!-- Subtotal -->

            <t t-set='taxincluded' t-value='Math.abs(receipt.subtotal - receipt.total_with_tax) &lt;= 0.000001' />
            <t t-if='!taxincluded'>
                <line><right>--------</right></line>
                <line><left>Subtotal</left><right> <value><t t-esc="receipt.subtotal" /></value></right></line>
                <t t-foreach='receipt.tax_details' t-as='tax'>
                    <line>
                        <left><t t-esc='tax.name' /></left>
                        <right><value><t t-esc='tax.amount' /></value></right>
                    </line>
                </t>
            </t>

            <!-- Total -->

            <line><right>--------</right></line>
            <line size='double-height'>
                <left><pre>        TOTAL</pre></left>
                <right><value><t t-esc='receipt.total_with_tax' /></value></right>
            </line>
            <br/><br/>

            <!-- Payment Lines -->

            <t t-foreach='receipt.paymentlines' t-as='line'>
                <line>
                    <left><t t-esc='line.journal' /></left>
                    <right><value><t t-esc='line.amount'/></value></right>
                </line>
            </t>
            <br/> 

            <line size='double-height'>
                <left><pre>        CHANGE</pre></left>
                <right><value><t t-esc='receipt.change' /></value></right>
            </line>
            <br/>
            
            <!-- Extra Payment Info -->

            <t t-if='receipt.total_discount'>
                <line>
                    <left>Discounts</left>
                    <right><value><t t-esc='receipt.total_discount'/></value></right>
                </line>
            </t>
            <t t-if='taxincluded'>
                <t t-foreach='receipt.tax_details' t-as='tax'>
                    <line>
                        <left><t t-esc='tax.name' /></left>
                        <right><value><t t-esc='tax.amount' /></value></right>
                    </line>
                </t>
            </t>

            <!-- Footer -->
            <t t-if='receipt.footer'>
                <br/>
                <pre><t t-esc='receipt.footer' /></pre>
                <br/>
                <br/>
            </t>

            <br/>
            <div font='b'>
                <div><t t-esc='receipt.name' /></div>
                <div><t t-esc='receipt.date.localestring' /></div>
            </div>

        </receipt>
    </t>

3
Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
Is there a module to add Internal Reference to POS Product List and Receipt in Odoo 18?
pos ticket
Avatar
Avatar
1
Apr 25
3532
Como editar el ticket que se imprime una vez registrado el pago en POS
pos ticket
Avatar
0
Feb 25
3693
Odoo 8 Reporting : Change default "Total" label Diselesaikan
reporting odoo8.0
Avatar
Avatar
1
Mar 22
9476
What happen when POS tickets ran out (multicompany)
pos ticket
Avatar
0
Sep 17
4813
How to modify the Posbox printed tickets, i.e bigger company logo ?
pos ticket
Avatar
Avatar
1
Mar 15
8745
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Karir
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo adalah software terintegrasi dengan 70+ aplikasi seperti CRM, Akuntansi, Inventaris, Sales, eCommerce, Marketing, POS; plus fitur lokal Indonesia!

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now