Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0007245Openbravo ERP08. Project and service managementpublic2009-01-29 19:202009-04-22 16:30
plujan 
AinhoaPagola 
normalminorhave not tried
closedno change required 
30
pi 
 
Core
No
0007245: If I do not choose a tax in Project Line, when generating purchase order a wrong tax is inserted
I create a Service Project with a line for a product. On the line, I do not choose a tax. Then, I create a Supplier and I generate a Purchase Order. The order line has **VAT 3% as tax, but this is wrong. See attach
# Go to Project & Service Management->Transactions->Service Project
# Click New and fill:
    * Search Key: sca
    * Name: Service Project for Customer A
    * Create Temporary Price List: N (un-checked)
# Move to Project Line tab.
# Click New and fill:
    * Product: A Final goods
    * Planned Quantity: 10
    * Tax: Do not select a tab (is not a mandatory field)
    * Planned Price: 1.75 and verify Planned Amount is 17.5
    * Planned Purchase Price: 1.2
# Go back to Service Project tab.
# Select Service Project for Customer A and edit:
    * Business Partner: CUSTOMER A
    * Sales Representative: Eduard
# Save and click on Change Project Status button and select Order.
# Verify that:
    * Project Status is Order.
    * Price List is CUSTOMER A.
# Move to Supplier tab.
# Click New and fill:
    * Business partner: Vendor A
# Verify that Price List is PURCHASE.
# Save and click on Create Purchase Order from Project.
# Move back to Service Project tab and navigate through Linked Items to the Purchase Order created.
# Move to Lines tab.
# Select A Final goods line and check that Tax is "**VAT 3%"

QA_review_pre_beta
depends on backport 0007332 closed AinhoaPagola If I do not choose a tax in Project Line, when generating purchase order a wrong tax is inserted 
png BUG_250_trunk_WrongTaxes.PNG (68,098) 2009-01-29 19:20
https://issues.openbravo.com/file_download.php?file_id=771&type=bug
png
Issue History
2009-01-29 19:20plujanNew Issue
2009-01-29 19:20plujanAssigned To => rafaroda
2009-01-29 19:20plujansf_bug_id0 => 2546203
2009-01-29 19:20plujanFile Added: BUG_250_trunk_WrongTaxes.PNG
2009-01-29 19:20plujanRegression testing => No
2009-02-03 10:21psarobeTag Attached: QA_review_pre_beta
2009-02-03 10:26psarobeStatusnew => scheduled
2009-02-03 10:26psarobeAssigned Torafaroda => AinhoaPagola
2009-02-03 10:26psarobefix_in_branch => trunk
2009-03-04 10:26AinhoaPagolaAssigned ToAinhoaPagola => Olya
2009-03-13 10:15OlyaNote Added: 0014627
2009-03-13 10:15OlyaStatusscheduled => feedback
2009-03-16 11:08rafarodaNote Added: 0014658
2009-03-24 11:09AinhoaPagolaAssigned ToOlya => AinhoaPagola
2009-04-22 16:30psarobeStatusfeedback => closed
2009-04-22 16:30psarobeResolutionopen => no change required

Notes
(0014627)
Olya   
2009-03-13 10:15   
OB chooses tax based on the tax category of the product used, if user didn’t choose the tax in the Service Project. Tax category can contain one or more taxes. OB makes decision using the following sequence:
1. Get Tax from project.
2. Get ANY Tax from Tax category of the product in the project including local taxes and product destination location taxes excluding taxes with parents.
3. Get ANY Tax from Tax category of the product in the project including local taxes excluding taxes with parents.
4. Get ANY tax of the tax category.
ANY – means the first in the record set.
Two stars in tax dropdown are concatenated to the name of the category if the following query doesn’t contain the tax
SELECT td0.c_tax_id AS id,
         (Coalesce(To_char((CASE
                              WHEN td_trl1.name IS NULL THEN To_char(td0.name)
                              ELSE To_char(td_trl1.name)
                            END)),'')) AS name,
         '' AS DESCRIPTION
FROM c_tax td0
         LEFT JOIN c_tax_trl td_trl1
           ON td0.c_tax_id = td_trl1.c_tax_id
              AND td_trl1.ad_language = 'en_US'
WHERE td0.ad_client_id IN ('0','1000000')
         AND td0.ad_org_id IN ('1000000','1000002','1000003','1000004', '1000005','1000006','1000008','1000009', '1000007','0')
         AND td0.parent_tax_id IS NULL
         AND (td0.isactive = 'Y' OR td0.c_tax_id = ('1000000'))
ORDER BY 2

Usage of p_product_id as the function c_gettax parameter eliminates the taxes of the wrong client and organization.
It's obvious that if tax has parent tax it will not be selected. Parent tax can be denoted by user in any time.
Two stars are displayed when all taxes in the tax category have a parent.

Please see if all taxes in categories tested have a parent.
If so we believe this bug should be closed.
(0014658)
rafaroda   
2009-03-16 11:08   
Reminder sent to: plujan

Pablo,

Could you please have a look on this issue to see whether it was a data problem?

Thanks.