Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041205Retail ModulesWeb POSpublic2019-06-28 14:002019-08-06 16:15
xabiermerino 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
 
RR19Q1.3RR19Q1.3 
marvintm
No
0041205: Errors while importing when synchronize a ticket with a discount of 100% and Generate Invoices active
When you have the check 'Generate Invoice' activate and try to synchronize a ticket with a discount of the 100% an error while importing happens:

java.lang.IndexOutOfBoundsException: Index 0 out-of-bounds for length 0
    at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
    at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
    at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
    at java.base/java.util.Objects.checkIndex(Objects.java:372)
    at java.base/java.util.ArrayList.get(ArrayList.java:440)
    at org.hibernate.collection.internal.PersistentBag.get(PersistentBag.java:452)
    at org.openbravo.retail.posterminal.utility.InvoiceUtils.createPaymentTerms(InvoiceUtils.java:751)
- Configure a Price adjustment of 100% por avalanche
- Configure a POS Terminal type for generate invoices
- Create a ticket of avalanche and pay it
- realize that there is a new the errors while importing
No tags attached.
blocks defect 0041203 closed ranjith_qualiantech_com Errors while importing when synchronize a ticket with a discount of 100% and Generate Invoices active 
Issue History
2019-06-28 14:21marvintmTypedefect => backport
2019-06-28 14:21marvintmTarget Version => RR19Q1.2
2019-07-05 15:13marvintmTarget VersionRR19Q1.2 => RR19Q1.3
2019-07-08 12:56ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2019-07-18 09:09hgbotCheckin
2019-07-18 09:09hgbotNote Added: 0113495
2019-07-18 09:09hgbotStatusscheduled => resolved
2019-07-18 09:09hgbotResolutionopen => fixed
2019-07-18 09:09hgbotFixed in SCM revision => http://code.openbravo.com/retail/backports/3.0RR19Q1.3/org.openbravo.retail.posterminal/rev/4956581c444733bf64c70b62158060e121eec8a1 [^]
2019-07-22 17:47ngarciaIssue Monitored: ngarcia
2019-07-26 14:18LeyreIssue Monitored: Leyre
2019-08-06 16:15marvintmReview Assigned To => marvintm
2019-08-06 16:15marvintmStatusresolved => closed
2019-08-06 16:15marvintmFixed in Version => RR19Q1.3

Notes
(0113495)
hgbot   
2019-07-18 09:09   
Repository: retail/backports/3.0RR19Q1.3/org.openbravo.retail.posterminal
Changeset: 4956581c444733bf64c70b62158060e121eec8a1
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Jul 18 12:38:59 2019 +0530
URL: http://code.openbravo.com/retail/backports/3.0RR19Q1.3/org.openbravo.retail.posterminal/rev/4956581c444733bf64c70b62158060e121eec8a1 [^]

Fixed issue 41205 : Invoice Payment schedule should be validated before creating payment terms

* If invoice amount is zero, then invoice payment schedule will not be created.
  When creating invoice payment terms, Invoice Payment schedule should be validated
* Payments should not be processed if payment origAmount is zero

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
M src/org/openbravo/retail/posterminal/utility/InvoiceUtils.java
---