Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037724
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajorhave not tried2018-01-25 12:012018-02-22 18:19
ReporteraferrazView Statuspublic 
Assigned Tomarkmm82 
PrioritynormalResolutionfixedFixed in Version3.0PR18Q2
StatusclosedFix in branchFixed in SCM revisione2d3bd259787
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava version7.x
OS VersionOpenbravo Appliance 14.04Database version9.3.xAnt version1.9.x
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037724: Error when cancel and replace a sales order of zero amount

DescriptionError when cancel and replace a sales order of zero amount
Steps To ReproduceEnable 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.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0102223)
markmm82 (developer)
2018-02-06 17:10

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 (developer)
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
---
(0102266)
dmiguelez (developer)
2018-02-07 18:48

Code Review + Testing Ok
(0102731)
hudsonbot (developer)
2018-02-22 18:19

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/980a6ad5bbf5 [^]
Maturity status: Test

- 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 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker