Coder Social home page Coder Social logo

Comments (9)

legalsylvain avatar legalsylvain commented on May 27, 2024 1

Hi. At first glance, i think the problem is not in pos order to sale order module. The module just use export to JSON function that looks to return bad résult

https://github.com/OCA/pos/blob/16.0/pos_order_to_sale_order/static/src/js/CreateOrderPopup.js#L49

Investigation should be done over there.

Thanks !

from pos.

legalsylvain avatar legalsylvain commented on May 27, 2024

Hi. @xmorejon. As far as I understand, the taxes of the sale order lines, are the taxes on the pos order lines.
See : https://github.com/OCA/pos/blob/16.0/pos_order_to_sale_order/models/sale_order_line.py#L19

Are the pos order line correctly set ?

thanks !

from pos.

xmorejon avatar xmorejon commented on May 27, 2024

Hi,

The POS Order Line are not correctly set:

  • Product Price=4,5€
  • VAT (21%)= 0,945€
  • Recarco Equivalencia (5,2%) = 0,234€
  • Total taxes should be: 1,18€

At Product Info / line Level it is not displaying the 0,234€ in the POS Order Line:

image

But on the Total it is correctly displayed:

image

Also if instead of generating the Sales Order, we do the Payment on the POS, the receipt will be correctly built:

image

Could it be that the Point of Sale does a recomputing of the taxes in a later stage, so while preparing Sales Order Lines from the POS Order Lines this Fiscal Position is wrong?
https://github.com/OCA/pos/blob/16.0/pos_order_to_sale_order/models/sale_order_line.py#L19

Thank you so much for looking into it!

from pos.

legalsylvain avatar legalsylvain commented on May 27, 2024

Well. Could add a screenshot of the pos order taxes in the back-office ?

from pos.

xmorejon avatar xmorejon commented on May 27, 2024

Apologies not sure if I follow you:

  • When I do a regular payment in the POS (instead of generating the Sales Order with "pos_order_to_sale_order" module) there is indeed a POS Order in the back-office:
image

This one corresponds to the receipt of the screenshot Order 00172-001-001. Note that the Taxes are CORRECT.

  • But when we generate a Sales order from the POS, there is NO "POS Order" so I cannot make a screenshot:

Sales Order screenshot:
image

No available POS Order: Order 00167-001-0001
image

But corresponding Sales Order in the back-office do miss the Fiscal Position items:

image

Should I look somewhere else?
Merci Sylvain!

from pos.

xmorejon avatar xmorejon commented on May 27, 2024

Hi again!

Forcing a recompute of Taxes, did the trick and seems to fix the issue! :)

image

And now the Sales Order has the correct Fiscal Position included:

image

As mentioned, I am pretty new to ODOO, and not sure if this way of fixing the issue is correct.
Therefore, I would wait for feedback and not suggest this pull request.

Thank you,

Xavier Morejon

from pos.

legalsylvain avatar legalsylvain commented on May 27, 2024

could you add a print(order_data) here : https://github.com/OCA/pos/blob/16.0/pos_order_to_sale_order/models/sale_order.py#L13 ?
and put her the result.
thanks !

from pos.

xmorejon avatar xmorejon commented on May 27, 2024

Hi,

Here you go. (Order with 2 lines):

{'name': 'Order 00188-001-0001', 'amount_paid': 0, 'amount_total': 11.36, 'amount_tax': 2.36, 'amount_return': 0, 'lines': [[0, 0, {'qty': 1, 'price_unit': 4.5, 'price_subtotal': 4.5, 'price_subtotal_incl': 5.68, 'discount': 0, 'product_id': 62, 'tax_ids': [[6, False, [1]]], 'id': 1, 'pack_lot_ids': [], 'description': '', 'full_product_name': 'B-0001', 'price_extra': 0, 'price_manually_set': False, 'price_automatically_set': False}], [0, 0, {'qty': 1, 'price_unit': 4.5, 'price_subtotal': 4.5, 'price_subtotal_incl': 5.68, 'discount': 0, 'product_id': 78, 'tax_ids': [[6, False, [1]]], 'id': 2, 'pack_lot_ids': [], 'description': '', 'full_product_name': 'BC-0002', 'price_extra': 0, 'price_manually_set': False, 'price_automatically_set': False}]], 'statement_ids': [], 'pos_session_id': 190, 'pricelist_id': 3, 'partner_id': 11157, 'user_id': 2, 'uid': '00188-001-0001', 'sequence_number': 1, 'creation_date': '2023-12-10T08:50:06.942Z', 'fiscal_position_id': 6, 'server_id': False, 'to_invoice': False, 'to_ship': False, 'is_tipped': False, 'tip_amount': 0, 'access_token': '3eb2f19d-8a81-4299-a0ff-e41ee1dce4df'}

image

So the Subtotal is right -> 'price_subtotal_incl': 5.68
But there is only one of the TaxID's (corresponding to the 21%) -> 'tax_ids': [[6, False, [1]]]

image

Thank you.
Xavier

from pos.

xmorejon avatar xmorejon commented on May 27, 2024

Thank you Sylvain!
I believe you are right. As the issue looks to be out of this module, I will close the reported issue.

Will look further into:

image

But might also apply the "dirty" fix of recomputing the taxes in alternate version of the module. I really need the Fiscal positions to give expected outcome!

Thank you very much. Great job!
Xavier

from pos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.