Openbravo Issue Tracking System - Modules
View Issue Details
0032514ModulesProcurement Contractspublic2016-03-21 13:472016-04-01 15:03
psanjuan 
markmm82 
urgentmajoralways
closedfixed 
20Ubuntu 8.04.1
 
 
dmiguelez
0032514: No Tax line created after running "Create Invoice" process in the Procurement Contract Invoice Proposal" window
No Tax line created after running "Create Invoice" process in the Procurement Contract Invoice Proposal" window
As group admin role:
Apply module's dataset
Create a new Contract Type:
Service Contract: Y
Sales Contract: N
Create a Contract Invoice Schedule with this Contract Type with an Invoice Frequency = Annual

Test Plan 1

Go to Business Partner window and check that "La Fruta es la Vida" supplier has a purchase price list "Tarifa La Fruta es la Vida" do not set as "Price Including Taxes".
Check that "Zumo de Naranja Bio 0.33L" product is in that list with a purchase unit price = 0.89

Create a Procurement Contract by selecting contract type created.

Fill in all the fields in the header, as described below:
BP = La Fruta es la Vida
Starting date = 21-03-2016
Duration 3
Duration Unit = Year
Price List = Tarifa la Fruta es la vida

Go to Lines:

Add a line to it by selecting the contract invoice schedule created, Product = Zumo de Naranja 0.33L
Price = 0.89
Quantity = 100
Press Complete.

Process it by selecting the option of Generate Invoice Plan.

Launch the Procurement Contract Billing Process for the organization F&B España

Select a date range in order to create at least one invoice proposal (for instance from 01-01-2016 to 31-12-2016.
Select BP = La Fruta es la Vida.
Press Done.

Check that a new window is opened. Window "Procurement Contract Invoice Proposal".

Select one proposal and run "Create Invoices" process.

Check that a new purchase invoice has been created. For instance 10000887.

Go to that invoice and verify below data:

Invoiced quantity = 100
Unit Price = 0.89
Line Net Amount = 89
Tax = Adquisiciones IVA 21%
Total Net Amount = 89.00
Total Gross Amount 107.69 (89+21%s/89)
Above is correct.

Go to tax tab and verify it is empty, therefore invoice posting shown below is not correct:
DEBIT 89.00 (60000) Compra de mercaderías
DEBIT 18.69 (90400) Cuenta de cuadre
CREDIT 107.69 (40000) Proveedores.
There should be a tax line in the Tax tab, with below data:
Tax rate = "Adquisiciones IVA 21% for instance
Taxable Amount = 89.00
Tax Amount = 18.69

Therefore correct posting is:
DEBIT 89.00 (60000) Compra de mercaderías
DEBIT 18.69 (40700) Tax Due
CREDIT 107.69 (40000) Proveedores.
No tags attached.
related to defect 0032472 closed markmm82 Purchase Invoices with Total Gross Amount of 0 created from Procurement Contract Billing Process 
Issue History
2016-03-21 13:47psanjuanNew Issue
2016-03-21 13:47psanjuanAssigned To => Triage Finance
2016-03-21 13:47psanjuanRelationship addedrelated to 0032472
2016-03-21 13:49psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11518#r11518
2016-03-21 13:49psanjuanProposed Solution updated
2016-03-22 13:57ngarciaIssue Monitored: ngarcia
2016-03-22 17:36markmm82Assigned ToTriage Finance => markmm82
2016-03-23 17:13markmm82Statusnew => scheduled
2016-03-23 17:14markmm82Note Added: 0085300
2016-03-30 11:56psanjuanNote Added: 0085329
2016-03-30 12:30psanjuanNote Edited: 0085329bug_revision_view_page.php?bugnote_id=0085329#r11563
2016-03-30 12:30psanjuanNote Edited: 0085300bug_revision_view_page.php?bugnote_id=0085300#r11565
2016-03-30 12:32psanjuanNote Edited: 0085329bug_revision_view_page.php?bugnote_id=0085329#r11566
2016-04-01 14:39hgbotCheckin
2016-04-01 14:39hgbotNote Added: 0085390
2016-04-01 14:39hgbotStatusscheduled => resolved
2016-04-01 14:39hgbotResolutionopen => fixed
2016-04-01 14:39hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.procurement.contract/rev/1fbaf864028f7967704a068f9b6d22055a71603f [^]
2016-04-01 14:39hgbotCheckin
2016-04-01 14:39hgbotNote Added: 0085392
2016-04-01 14:40dmiguelezReview Assigned To => dmiguelez
2016-04-01 14:40dmiguelezNote Added: 0085394
2016-04-01 14:40dmiguelezStatusresolved => closed
2016-04-01 15:03ngarciaNote Added: 0085398

Notes
(0085300)
markmm82   
2016-03-23 17:14   
(edited on: 2016-03-30 12:30)
Test Plan 1.

As group admin role:
    Apply module's dataset
    Create a new Contract Type:
        Service Contract: Y
        Sales Contract: N
    Create a Contract Invoice Schedule with this Contract Type with an Invoice Frequency = Annual

    Go to Business Partner window and check that "La Fruta es la Vida" supplier has a purchase price list "Tarifa La Fruta es la Vida" do not set as "Price Including Taxes".
    Check that "Zumo de Naranja Bio 0.33L" product is in that list with a purchase unit price = 0.89

    Create a Procurement Contract by selecting contract type created.

    Fill in all the fields in the header, as described below:
        BP = La Fruta es la Vida
        Starting date = 21-03-2016
        Duration 3
        Duration Unit = Year
        Price List = Tarifa la Fruta es la vida

    Go to Lines:
        Add a line to it by selecting the contract invoice schedule created, Product = Zumo de Naranja 0.33L
        Price = 0.89
        Quantity = 100
        Save it.
    Press Complete.
        Process it by selecting the option of Generate Invoice Plan.

    Launch the Procurement Contract Billing Process for the organization F&B España

    Select a date range in order to create at least one invoice proposal (for instance from 01-01-2016 to 31-12-2016.
    Select BP = La Fruta es la Vida.
    Press Done.

    Check that a new window is opened. Window "Procurement Contract Invoice Proposal".

    Select one proposal and run "Create Invoices" process.

    Check that a new purchase invoice has been created. For instance 10000860.

    Go to that invoice and verify below data:
        Invoiced quantity = 100
        Unit Price = 0.89
        Line Net Amount = 89
        Tax = Adquisiciones IVA 21%
        Total Net Amount = 89.00
        Total Gross Amount 107.69 (89+21%s/89)
    Above is correct.

    Go to tax tab and verify a tax line, with below data:
        Tax rate = "Adquisiciones IVA 21% for instance
        Taxable Amount = 89.00
        Tax Amount = 18.69
    Above is correct.

    Posting is:
        DEBIT 89.00 (60000) Compra de mercaderías
        DEBIT 18.69 (40700) Tax Due
        CREDIT 107.69 (40000) Proveedores.
    Above is correct.

(0085329)
psanjuan   
2016-03-30 11:56   
(edited on: 2016-03-30 12:32)
Test Plan above verified.

Repeat same scenario for price list including taxes.

Go to that invoice and verify below data:
        Invoiced quantity = 100
        Unit Price = 0.735537 (0.89/1.21)
        Line Net Amount = 73.55
        Tax = Adquisiciones IVA 21%
        Total Net Amount = 73.55
        Total Gross Amount = 89.00
    Above is correct.

    Go to tax tab and verify a tax line, with below data:
        Tax rate = "Adquisiciones IVA 21% for instance
        Taxable Amount = 73.55
        Tax Amount = 15.45 (73.55*21%)
    Above is correct.

    Posting is:
        DEBIT 73.55 (60000) Compra de mercaderías
        DEBIT 15.45 (40700) Tax Due
        CREDIT 89.00 (40000) Proveedores.
    Above is correct.

Issue can be code reviewed and closed.

(0085390)
hgbot   
2016-04-01 14:39   
Repository: erp/pmods/org.openbravo.procurement.contract
Changeset: 1fbaf864028f7967704a068f9b6d22055a71603f
Author: Mark <m.molina <at> nectus.com>
Date: Wed Mar 30 11:03:02 2016 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.procurement.contract/rev/1fbaf864028f7967704a068f9b6d22055a71603f [^]

Fixes issue 32514, Fixes Issue 32472 : Purchase Invoices with right Total Gross Amount
created from Procurement Contract Billing Process
The amounts for the created Purchase Invoices were updated.
No Tax line created after running "Create Invoice" process.
Tax line is created after running "Create Invoice" process in the "Procurement Contract Invoice Proposal" window.

---
M src/org/openbravo/procurement/contract/process/ProcurementContractInvoiceProcess.java
---
(0085392)
hgbot   
2016-04-01 14:39   
Repository: erp/pmods/org.openbravo.procurement.contract
Changeset: 48e9953cf96cb284f38116495adb9caed30ab790
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Fri Apr 01 14:39:18 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.procurement.contract/rev/48e9953cf96cb284f38116495adb9caed30ab790 [^]

Related to Issue 32514. Updated Module version.

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0085394)
dmiguelez   
2016-04-01 14:40   
Code Review + Testing Ok
(0085398)
ngarcia   
2016-04-01 15:03   
Pending to publish the 1.0.200 version of Procurement Contracts module