Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0037724 | Openbravo ERP | 07. Sales management | public | 2018-01-25 12:01 | 2018-02-22 18:19 |
|
Reporter | aferraz | |
Assigned To | markmm82 | |
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 30 | OS Version | Openbravo Appliance 14.04 |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR18Q2 | |
Merge Request Status | |
Review Assigned To | dmiguelez |
OBNetwork customer | No |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0037724: Error when cancel and replace a sales order of zero amount |
Description | Error when cancel and replace a sales order of zero amount |
Steps To Reproduce | Enable Cancel and Replace functionallity: http://wiki.openbravo.com/wiki/How_to_manage_Cancel_and_Replace_process#Objective [^]
Create a Sales Order.
Add one line for any product with quantity 1 and price 10.
Add amother line for any product with quantity -1 and price 10.
Check order gross and net amounts are zero.
Complete the order.
Click on Cancel and Replace.
Check a new order is created in temporal status.
Click on Confirm Cancel and Replace.
Check following error is thrown:
org.openbravo.base.exception.OBException: There is no payment plan for the order. |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2018-01-25 12:01 | aferraz | New Issue | |
2018-01-25 12:01 | aferraz | Assigned To | => Triage Finance |
2018-01-25 12:01 | aferraz | OBNetwork customer | => No |
2018-01-25 12:01 | aferraz | Modules | => Core |
2018-01-25 12:01 | aferraz | Triggers an Emergency Pack | => No |
2018-01-26 09:27 | dmiguelez | Assigned To | Triage Finance => AtulOpenbravo |
2018-02-01 11:26 | dmiguelez | Assigned To | AtulOpenbravo => markmm82 |
2018-02-01 16:04 | markmm82 | Status | new => acknowledged |
2018-02-05 22:08 | markmm82 | Status | acknowledged => scheduled |
2018-02-06 17:10 | markmm82 | Note Added: 0102223 | |
2018-02-07 18:47 | hgbot | Checkin | |
2018-02-07 18:47 | hgbot | Note Added: 0102265 | |
2018-02-07 18:47 | hgbot | Status | scheduled => resolved |
2018-02-07 18:47 | hgbot | Resolution | open => fixed |
2018-02-07 18:47 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/e2d3bd2597874f2fe7b16c22ee1115d181565652 [^] |
2018-02-07 18:48 | dmiguelez | Review Assigned To | => dmiguelez |
2018-02-07 18:48 | dmiguelez | Note Added: 0102266 | |
2018-02-07 18:48 | dmiguelez | Status | resolved => closed |
2018-02-07 18:48 | dmiguelez | Fixed in Version | => 3.0PR18Q2 |
2018-02-22 18:19 | hudsonbot | Checkin | |
2018-02-22 18:19 | hudsonbot | Note Added: 0102731 | |
Notes |
|
|
Test Plan:
As Group Admin:
Go to preference window and enable Enable Cancel and Replace preference.
Go to Sales Order window and create a new one:
Organization = F&B España - Región Norte
Transaction = Standard Order
Business Partner = Alimentos y Supermercados, S.A
Add a line to the created order
Product = Cerveza Ale 0,5 L
Ordered Quantity = 1
Net Unit Price = 2.04
Tax = Ventas exentas
Add a line to the created order
Product = Cerveza Ale 0,5 L
Ordered Quantity = -1
Net Unit Price = 2.04
Tax = Ventas exentas
Book the order
Notice the Total Net Amount = Total Gross Amount = 0.00
Notice in Payment Plan Tab, that wasn't generated any payment plan to this order.
Take note of the document number of the order, for instance 1000244.
Execute Cancel and Replace process
Notice a new order in Temporal Status was created with document no: 1000244-1
Notice the new order has the same information than the cancelled one:
Total Net Amount = Total Gross Amount = 0.00
Lines
Payment Plan is empty
Execute Confirm Cancel and Replace
Notice the process is completed successfully.
Notice a new order was created (1000244*R*) reversing the original one (1000244)
Go to Sales Order window and create a new one:
Organization = F&B España - Región Norte
Transaction = Standard Order
Business Partner = Alimentos y Supermercados, S.A
Add a line to the created order
Product = Cerveza Ale 0,5 L
Ordered Quantity = 1
Net Unit Price = 2.04
Tax = Ventas exentas
Add a line to the created order
Product = Cerveza Lager 0,5L
Ordered Quantity = 1
Net Unit Price = 2.64
Tax = Ventas exentas
Remove discounts if exist.
Book the order
Notice the Total Net Amount = Total Gross Amount = 4.68
Notice in Payment Plan Tab, that was generated a payment plan to this order of 4.68.
Take note of the document number of the order, for instance 1000245.
Execute Cancel and Replace process
Notice a new order in Temporal Status was created with document no: 1000245-1
Notice the new order has the same information than the cancelled one:
Total Net Amount = Total Gross Amount = 4.68
Lines
Payment Plan is empty
Execute Confirm Cancel and Replace
Notice the process is completed successfully.
Notice a new order was created (1000245*R*) reversing the original one (1000245)
A new Payment Plan was generated according the total gross amount of the order |
|
|
(0102265)
|
hgbot
|
2018-02-07 18:47
|
|
Repository: erp/devel/pi
Changeset: e2d3bd2597874f2fe7b16c22ee1115d181565652
Author: Mark <markmm82 <at> gmail.com>
Date: Tue Feb 06 10:43:49 2018 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/e2d3bd2597874f2fe7b16c22ee1115d181565652 [^]
Fixes issue 37724: Error when cancel and replace a sales order of zero amount
When an order with grand total of ZERO is created and booked, no Payment Plan is
created for it, so when she is cancelled and replaced the new created orders haven't
payment plans neither.
So, when the Cancell and Replace process is executed on orders of this kind, the
it was failing trying to get get the payment schedule detail of the oldOrder and
an exception was thrown.
To fix this issue, only will be created Payments to orders with grand total different
than ZERO to avoid the exception and keep the current behaviour for this kind of orders
---
M src/org/openbravo/erpCommon/businessUtility/CancelAndReplaceUtils.java
---
|
|
|
|
|
|
|
|