Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033973Retail ModulesWeb POSpublic2016-09-13 13:172019-06-24 15:49
simbu94 
gorka_gil 
normalminorN/A
closedfixed 
5
 
RR19Q3 
marvintm
No
0033973: Handling Cash VAT Management during the creation of Orders or Invoices from POS
Handling Cash VAT Management during the creation of Orders or Invoices from POS
ref: http://wiki.openbravo.com/wiki/Cash_VAT_Management/User_Documentation [^]
NA
No tags attached.
related to feature request 0040363 closed gorka_gil Openbravo ERP A new field needs to be created in the sales invoice header to reflect the amount paid/prepaid of an invoiced POS order. 
depends on defect 0040371 closed jorge-garcia Retail Modules Cash up process is not creating reverse sales invoices 
causes defect 0044255 closed inigo_lerga Openbravo ERP Wrong posting in Settled Remittance Lines: cashvat information not generated when it should 
patch CashVat_Pos.patch (15,023) 2016-09-13 13:26
https://issues.openbravo.com/file_download.php?file_id=9807&type=bug
patch Cashvat_Test.patch (15,144) 2016-09-13 13:26
https://issues.openbravo.com/file_download.php?file_id=9808&type=bug
diff cashvat-pos-19q2.diff (15,352) 2019-03-11 19:14
https://issues.openbravo.com/file_download.php?file_id=12734&type=bug
Issue History
2016-09-13 13:17simbu94New Issue
2016-09-13 13:17simbu94Assigned To => Retail
2016-09-13 13:17simbu94Triggers an Emergency Pack => No
2016-09-13 13:26simbu94File Added: CashVat_Pos.patch
2016-09-13 13:26simbu94File Added: Cashvat_Test.patch
2019-01-11 10:58ngarciaSummaryHandeling Cash VAT Management during the creation of Orders or Invoices from POS => Handling Cash VAT Management during the creation of Orders or Invoices from POS
2019-01-11 10:58ngarciaDescription Updatedbug_revision_view_page.php?rev_id=18114#r18114
2019-01-14 17:18ngarciaIssue Monitored: ngarcia
2019-03-11 19:14gorka_gilFile Added: cashvat-pos-19q2.diff
2019-03-11 19:16gorka_gilNote Added: 0110358
2019-03-12 15:16psanjuanNote Added: 0110387
2019-03-13 15:51psanjuanRelationship addeddepends on 0040371
2019-05-30 17:19gorka_gilRelationship addedrelated to 0040363
2019-06-10 12:26gorka_gilAssigned ToRetail => gorka_gil
2019-06-18 17:01hgbotCheckin
2019-06-18 17:01hgbotNote Added: 0112867
2019-06-18 17:01hgbotCheckin
2019-06-18 17:01hgbotNote Added: 0112868
2019-06-18 17:01hgbotStatusnew => resolved
2019-06-18 17:01hgbotResolutionopen => fixed
2019-06-18 17:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/92f5d7eff1a8bbb06597f9f895102c93b92ee661 [^]
2019-06-18 17:01hgbotCheckin
2019-06-18 17:01hgbotNote Added: 0112869
2019-06-18 17:39hgbotCheckin
2019-06-18 17:39hgbotNote Added: 0112871
2019-06-19 09:48psanjuanNote Added: 0112881
2019-06-19 14:46hgbotCheckin
2019-06-19 14:46hgbotNote Added: 0112893
2019-06-19 16:02hudsonbotCheckin
2019-06-19 16:02hudsonbotNote Added: 0112895
2019-06-19 16:02hudsonbotCheckin
2019-06-19 16:02hudsonbotNote Added: 0112896
2019-06-19 17:19hgbotCheckin
2019-06-19 17:19hgbotNote Added: 0112904
2019-06-24 15:49marvintmReview Assigned To => marvintm
2019-06-24 15:49marvintmStatusresolved => closed
2019-06-24 15:49marvintmFixed in Version => RR19Q3
2020-06-01 16:55maiteRelationship addedcauses 0044255

Notes
(0110358)
gorka_gil   
2019-03-11 19:16   
Uploaded cashvat-pos-19q2.diff, it is the same code as the patch, but merged with 19q2.
(0110387)
psanjuan   
2019-03-12 15:16   
Functional Spec can be found in below link:

https://docs.google.com/document/d/1NB4OQxUjtmK283UTOqV-XKOuFVLJNqstFMyb9DblWAs/edit# [^]
(0112867)
hgbot   
2019-06-18 17:01   
Repository: erp/devel/pi
Changeset: d9535ca2cfdf8fd967420dddf9ec16f683e0df79
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Jun 05 17:14:50 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d9535ca2cfdf8fd967420dddf9ec16f683e0df79 [^]

Related to issue 33973: implement cashvat in webpos

Added two fields:
- "paid amount at invoicing" to invoice header (info for user)
- "is paid at invoincing" to payment detail (for cashvat engine)

FIN_AddPayment.saveGLItem method overloaded to allow to choose if do flush or not


Info about new column ISPAIDATINVOICING:

The FIN_Payment_Detail table has a new nullable column called ISPAIDATINVOICING, which
must be filled by the POS when paying an invoice in the moment of creating this invoice.
It is null to avoid performance penalty when updating existing instances.


From an accounting cash vat POV, both the prepayment (which is the amount paid in the order) and the
amount paid at invoice creation represents the same concept. The correspondent amount must be accounted
in the FINAL Tax account.
Therefore the CashVATUtil.calculatePrepaidPercentageForCashVATTax() method has been modified to take
into account both amounts.
This method is based on the C_INVOICETAX_CASHVAT_V view, so it has been modified too to return the
ISPAIDATINVOICING value that is consumed by the method.

DocLineCashVATReady_PaymentTransactionReconciliation.setInvoiceTaxCashVAT_V() now excludes the payment
details set as ISPAIDATINVOICING, so the payment/transaction/reconcilation accountings do not include
the transitory VAT account.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/triggers/APRM_FIN_PMT_DETAIL_CHECK_TRG.xml
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java
M src-db/database/model/tables/C_INVOICE.xml
M src-db/database/model/tables/FIN_PAYMENT_DETAIL.xml
M src-db/database/model/views/C_INVOICETAX_CASHVAT_V.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/erpCommon/ad_forms/DocLineCashVATReady_PaymentTransactionReconciliation.java
M src/org/openbravo/erpCommon/utility/CashVATUtil.java
---
(0112868)
hgbot   
2019-06-18 17:01   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 92f5d7eff1a8bbb06597f9f895102c93b92ee661
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Jun 05 18:09:04 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/92f5d7eff1a8bbb06597f9f895102c93b92ee661 [^]

Fixed issue 33973: implement cashvat in webpos

Fill the fields paidAmtAtInvoicing (c_invoice) and isPaidAtInvoicing (fin_paymentdetail),
used in the backend to calculate the cashvat, and to which gl item correspond the payment

When having prepaiments (order with payments and after created the invoice) call to
CashVATUtil.createInvoiceTaxCashVAT api to fill the cahsvat table. This is done when the invoice
is created in the pos or in the cashup.

Needed to add to createPSInvoice missing updates of hibernate objects, so the later call
to createCashVat works.

When the organization is set as cashvat send it to the webpos in the terminal info.
Added also to the ticket json a field cashvat when the organization/terminal works with cashvat

When returning a ticket it should mantain the cashvat value of the original ticket, if
Example: if an organization change to cashvat, when returning a ticket from before the
change it should return as not cashvat

The taxes available when cashvat should be only cashvat ones and exemption ones.
If not cashvat, it should not be available any cashvat tax.

---
M src/org/openbravo/retail/posterminal/OrderGroupingProcessor.java
M src/org/openbravo/retail/posterminal/OrderGroupingProcessor_data.xsql
M src/org/openbravo/retail/posterminal/OrderLoader.java
M src/org/openbravo/retail/posterminal/PaidReceiptProperties.java
M src/org/openbravo/retail/posterminal/term/Terminal.java
M src/org/openbravo/retail/posterminal/utility/InvoiceUtils.java
M web/org.openbravo.retail.posterminal/js/data/dataordertaxes.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0112869)
hgbot   
2019-06-18 17:01   
Repository: erp/pmods/org.openbravo.retail.returns
Changeset: 45e350e4d8b4ac5c750f2ec1e3728d81b888c23d
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Jun 05 18:13:04 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.returns/rev/45e350e4d8b4ac5c750f2ec1e3728d81b888c23d [^]

Related to issue 33973: implement cashvat in webpos

When returning lines ensure that are not mixed cashvat and not cashvat lines

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M web/org.openbravo.retail.returns/js/returnUtils.js
---
(0112871)
hgbot   
2019-06-18 17:39   
Repository: erp/devel/pi
Changeset: c11be597ec56c7263bdc236b058e2e4396d764de
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Tue Jun 18 17:38:29 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c11be597ec56c7263bdc236b058e2e4396d764de [^]

Related to issue 33973: fix dbconsistency

---
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0112881)
psanjuan   
2019-06-19 09:48   
Test Plan can be found in below link:
https://docs.google.com/spreadsheets/d/1ff59x1U-pXAKG_j6QHYd3Ga8fjS9JjpQ6BUsGBezYAc/edit#gid=1652432393 [^]
(0112893)
hgbot   
2019-06-19 14:46   
Repository: erp/pmods/org.openbravo.retail.testsampledata
Changeset: 022202ebf6aee3448b23996245bdeb41bf09134a
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Jun 19 14:45:42 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.testsampledata/rev/022202ebf6aee3448b23996245bdeb41bf09134a [^]

Related to issue 33973: Fix sampledata

---
M referencedata/sampledata/Retail_Test/AD_SEQUENCE.xml
M referencedata/sampledata/Retail_Test/AD_WINDOW_ACCESS.xml
M referencedata/sampledata/Retail_Test/C_ACCTSCHEMA_TABLE.xml
M referencedata/sampledata/Retail_Test/OBRETCO_PRODUCTCATEGORY.xml
M referencedata/sampledata/Retail_Test/OBUIAPP_PROCESS_ACCESS.xml
---
(0112895)
hudsonbot   
2019-06-19 16:02   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5a31264dd0f8 [^]
Maturity status: Test
(0112896)
hudsonbot   
2019-06-19 16:02   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5a31264dd0f8 [^]
Maturity status: Test
(0112904)
hgbot   
2019-06-19 17:19   
Repository: erp/pmods/org.openbravo.retail.testsampledata
Changeset: b439bdfdb24ee24cadbbf8e05d5f556b4aecee20
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Jun 19 16:39:21 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.testsampledata/rev/b439bdfdb24ee24cadbbf8e05d5f556b4aecee20 [^]

Related to issue 33973: Backed out changeset 022202ebf6ae, sampledata changes make install.source to fail

---
M referencedata/sampledata/Retail_Test/AD_SEQUENCE.xml
M referencedata/sampledata/Retail_Test/AD_WINDOW_ACCESS.xml
M referencedata/sampledata/Retail_Test/C_ACCTSCHEMA_TABLE.xml
M referencedata/sampledata/Retail_Test/OBRETCO_PRODUCTCATEGORY.xml
M referencedata/sampledata/Retail_Test/OBUIAPP_PROCESS_ACCESS.xml
---