Openbravo Issue Tracking System - Modules
View Issue Details
0037780ModulesFreight Managementpublic2018-01-30 18:272018-02-05 11:15
ngarcia 
collazoandy4 
urgentmajoralways
closedfixed 
5
 
 
dmiguelez
0037780: Tax selected for freight product is based on the invoicing address instead of on the partner address
Tax selected for freight product is based on the invoicing address instead of on the partner address
As group admin role:
   Make the necessary configurations:
      Delivery Period
      Freight Category
      Carrier, Freight, Definition

   Create a business partner
   Set it as customer
   Add two locations to it, one set as shipping location (Spain) and the other one set as invoicing location (Hong Kong)
   
   Create a Sales Order for F&B España Region Norte and the previously created business partner
   Add a line to it
   Check 'Entregas IVA 21%' tax rate is selected
   Set a Delivery Charges in Sales Order header
   Launch Select Freight process and select a line
   Check a new line is included and the selected tax is 'Exportaciones (%N=>0%)'
Check if changing the order of the parameters in SelectFreightHandler.addFixedOrderLine solves the problem:

    parameters.add(order.getInvoiceAddress().getId());
    parameters.add(order.getPartnerAddress().getId());
No tags attached.
related to defect 0037837 closed collazoandy4 Openbravo ERP Tax selected is based on the invoicing address instead of the partner address 
Issue History
2018-01-30 18:27ngarciaNew Issue
2018-01-30 18:27ngarciaAssigned To => Triage Finance
2018-01-30 18:28ngarciaResolution time => 1519081200
2018-01-30 18:28ngarciaIssue Monitored: networkb
2018-01-30 18:54PracticsIssue Monitored: Practics
2018-01-31 16:26dmiguelezAssigned ToTriage Finance => collazoandy4
2018-01-31 21:41collazoandy4Statusnew => scheduled
2018-02-03 03:40collazoandy4Note Added: 0102164
2018-02-05 11:08hgbotCheckin
2018-02-05 11:08hgbotNote Added: 0102178
2018-02-05 11:08hgbotStatusscheduled => resolved
2018-02-05 11:08hgbotResolutionopen => fixed
2018-02-05 11:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.materialmgmt.freightmgmt/rev/01b6175c65872dc0785736a772b648b4d605e036 [^]
2018-02-05 11:10dmiguelezReview Assigned To => dmiguelez
2018-02-05 11:10dmiguelezNote Added: 0102180
2018-02-05 11:10dmiguelezStatusresolved => closed
2018-02-05 11:15dmiguelezNote Added: 0102181
2018-02-05 16:22collazoandy4Relationship addedrelated to 0037837

Notes
(0102164)
collazoandy4   
2018-02-03 03:40   
Configuration Steps
  Go to Freight Category window and create a new record:
    Search Key/Name: FreightCategory
  Go to Delivery Period and create a new record:
    Name: 24H
  Go to Carrier window and create a new record:
    Name: Carrier
    Product: Electricidad
    Create a new record in Freight tab:
      Name: Freight
      Valid from date: First day of month
    Create a new record in Definition tab:
      Set Country, Destination country, Region and Destination Region as empty
      Min Quantity: 2
      Max Quantity: 10
      Freight Amount: 8
  Go to Business Partner window and create a new record:
    Search Key/Name: IssueBP
    Set as customer
    Create two new records in Location/Address tab
      1. Spain, Shipment Address: Y, Invoicing Address: N
      2. Hong kong, Shipment Address: N, Invoicing Address: Y

  Test Plan I
    Go to Sales Order window and create a new record
      Business Partner: IssueBP
      Delivery Charges: Cost based on Ordered quantities (Product Units)
      Create a new record in Lines tab:
        Product: Agua sin Gas 1L
        Ordered quantity: 7
      Check Entregas IVA 21% as line tax
      Click on Select Freight button and select the previous one created and click Done and check
        New record is created in Lines tab with:
          Product: Electricidad
          Ordered Quantity: 1
          Net unit price/List price: 8.00
          Tax: Entregas IVA 21%

  This issue is also reproducible in this scenarios
    Go to Preferences and create a new record:
      Property: RM Allow Orphan Line
      Value: Y
    Log out and Log in
    Go to Goods Shipment window and create a new record:
     Business Partner: IssueBP
     Create a new record in Lines tab:
       Product: Zumo de Piña 0,5L
       Movement Quantity: 10
     Complete the shipment
    Go to Return from Customer window and create a new record:
      Business Partner: IssueBP
      Clic on Insert Orphan Line Button
        Product: Agua sin Gas 1L
        Returned: 2
      Check that the created Tax is wrong Exportaciones (%N=>0%) should be Entregas IVA 21%
      Clic on Pick Edit Lines and select the previous shipment created and set returned qty 4
      Check that the created Tax is wrong Exportaciones (%N=>0%) should be Entregas IVA 21%
(0102178)
hgbot   
2018-02-05 11:08   
Repository: erp/pmods/org.openbravo.materialmgmt.freightmgmt
Changeset: 01b6175c65872dc0785736a772b648b4d605e036
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Fri Feb 02 18:57:01 2018 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.materialmgmt.freightmgmt/rev/01b6175c65872dc0785736a772b648b4d605e036 [^]

Fixes issue 37780:Tax selected for freight product is based on the invoicing
address instead of on the partner address

When a business partner with different invoicing and shipping address the tax
selected is wrong the invoicing address was used as shipping

Now the correct business partner address is selected to properly get the product
tax

---
M src/org/openbravo/materialmgmt/freightmgmt/AvailableFreightsDS.java
M src/org/openbravo/materialmgmt/freightmgmt/SelectFreightHandler.java
---
(0102180)
dmiguelez   
2018-02-05 11:10   
Code Review + Testing Ok
(0102181)
dmiguelez   
2018-02-05 11:15   
Commits related to issue:

https://code.openbravo.com/erp/pmods/org.openbravo.materialmgmt.freightmgmt/rev/03d1f25c6925 [^]

https://code.openbravo.com/erp/pmods/org.openbravo.materialmgmt.freightmgmt/rev/688bf2675a5b [^]