Openbravo Issue Tracking System - Retail Modules
View Issue Details
0028983Retail ModulesWeb POSpublic2015-02-18 16:292015-05-25 20:33
Orekaria 
Retail 
urgentmajoralways
closedno change required 
5
 
 
marvintm
Automated tests
No
0028983: Returning a sale causes the invoice to use an already existing c_invoice.documentno
Returning a sale causes the invoice to use an already existing c_invoice.documentno
Log into WebPOS

1.
In a new receipt
Add a product
In the menu, select 'invoice this receipt'
Pay and finish the sale

2.
In the menu, select Verified returns
Select the previous sale
In the menu, select 'invoice this receipt'
Remember the document number of the receipt
Finish the sale

3.
Execute this query (change 'VBS1/0000089' with the remembered document number):

SELECT
m_product.name,
c_invoiceline.linenetamt,
c_invoiceline.taxamt,
c_invoiceline.line_gross_amount,
c_invoiceline.qtyinvoiced,
c_invoiceline.priceactual,
c_invoiceline.gross_unit_price
FROM c_invoiceline
INNER JOIN c_invoice ON c_invoiceline.c_invoice_id = c_invoice.c_invoice_id
INNER JOIN c_orderline ON c_invoiceline.c_orderline_id = c_orderline.c_orderline_id
INNER JOIN c_order ON c_orderline.c_order_id = c_order.c_order_id
INNER JOIN m_product ON c_orderline.m_product_id = m_product.m_product_id
WHERE c_invoice.documentno IN
(
   SELECT
   c_invoice.documentno
   FROM c_invoice
   INNER JOIN c_order ON c_invoice.c_order_id = c_order.c_order_id
   WHERE c_order.documentno = 'VBS1/0000089'
)

4.
Verify that there are lines in the invoice that do not correspond to the invoiced receipt
No tags attached.
blocks feature request 0029465RR16Q1 closed Retail QA: RR15Q3: Add tests for Mobile applications 
Issue History
2015-02-18 16:29OrekariaNew Issue
2015-02-18 16:29OrekariaAssigned To => marvintm
2015-02-18 16:29OrekariaRegression level => Automated tests
2015-02-18 16:29OrekariaTriggers an Emergency Pack => No
2015-02-18 21:34OrekariaSummaryReturning a sale causes the invoice to use an already existing documentno => Returning a sale causes the invoice to use an already existing c_invoice.documentno
2015-02-18 21:34OrekariaDescription Updatedbug_revision_view_page.php?rev_id=7705#r7705
2015-02-18 21:34OrekariaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7707#r7707
2015-03-20 21:08mario_castelloAssigned Tomarvintm => mario_castello
2015-03-20 22:10OrekariaRelationship addedblocks 0028933
2015-03-30 19:00OrekariaRelationship addedblocks 0029465
2015-03-30 19:00OrekariaRelationship deletedblocks 0028933
2015-04-01 13:32malsasuaAssigned Tomario_castello => Retail
2015-05-15 10:18OrekariaSeveritycritical => major
2015-05-15 17:41marvintmReview Assigned To => marvintm
2015-05-15 17:41marvintmNote Added: 0077504
2015-05-15 17:41marvintmStatusnew => closed
2015-05-15 17:41marvintmResolutionopen => no change required
2015-05-15 17:42marvintmNote Edited: 0077504bug_revision_view_page.php?bugnote_id=0077504#r8553
2015-05-22 18:27hgbotCheckin
2015-05-22 18:27hgbotNote Added: 0077671
2015-05-25 20:33hgbotCheckin
2015-05-25 20:33hgbotNote Added: 0077725

Notes
(0077504)
marvintm   
2015-05-15 17:41   
(edited on: 2015-05-15 17:42)
The problem as described doesn't happen with a real instance:
- A Sales Invoice is created for the initial Sales order. This invoice includes only one line, with the selected product.
- A different sales invoice is created for the return. This invoice includes only one (different) line, with the selected product.

The reason the query is returning more records is that due to how our masterdata was originally built, there are invoices with duplicated document numbers, as the document sequence of several documents is incorrect. However, there is no issue in the code itself.

(0077671)
hgbot   
2015-05-22 18:27   
Repository: tools/automation/pi-mobile
Changeset: e1251612dc0da9e5f404744bfeffc92e83d65c17
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Fri May 22 17:45:52 2015 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/e1251612dc0da9e5f404744bfeffc92e83d65c17 [^]

Related to issue 28983: Removed automated tests because the issue was closed as 'no change required'

---
R src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/SalesCashupReturnCashupVerifyingDatabase.java
R src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/SaleAndReturnInvoicedVerifyingDatabase.java
---
(0077725)
hgbot   
2015-05-25 20:33   
Repository: tools/automation/pi-mobile
Changeset: 2d82780beb155a0dee2b45d9ea64f5b8cb51816d
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Fri May 22 17:46:44 2015 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/2d82780beb155a0dee2b45d9ea64f5b8cb51816d [^]

Related to issue 28983: Removed automated tests because the issue was closed as 'no change required'

---
R src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/SalesCashupReturnCashupVerifyingDatabase.java
R src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/SaleAndReturnInvoicedVerifyingDatabase.java
---