Merge lp:~akretion-team/magentoerpconnect/magentoerpconnect-fix-shipping-amount-if-discount into lp:magentoerpconnect/oerp6.1-stable
Status: | Merged |
---|---|
Merged at revision: | 691 |
Proposed branch: | lp:~akretion-team/magentoerpconnect/magentoerpconnect-fix-shipping-amount-if-discount |
Merge into: | lp:magentoerpconnect/oerp6.1-stable |
Diff against target: |
13 lines (+3/-0) 1 file modified
magentoerpconnect/settings/1.5.0.0/sale.order/external.mappinglines.template.csv (+3/-0) |
To merge this branch: | bzr merge lp:~akretion-team/magentoerpconnect/magentoerpconnect-fix-shipping-amount-if-discount |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sébastien BEAU - http://www.akretion.com | Approve | ||
Review via email: mp+150544@code.launchpad.net |
Description of the change
This merge proposal set the shipping_
An example to make it more clear:
A sale order in magento:
- shipping cost tax included : 7.00 euros
- shipping cost tax excluded : 5.85 euros
- discount on shipping : 7.00 euros
so in the mapping :
amount_tax_inc = 7.00 - 7.00 = 0
amount_tax_exc = 5.85
if amount_tax_exc and amount_tax_inc:
tax_rate = amount_
else:
tax_rate = 0
result=[
('shipping_
('shipping_
('shipping_
]
It will create a shipping cost line with price : 5.85 and no taxes but it's wrong there is no shipping cost
I propose to set the amount_tax_exc to 0 also by adding:
if not amount_tax_inc:
amount_tax_exc = 0
It's ok for me. I merge it