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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0024807
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementminorhave not tried2013-09-20 16:482014-03-24 11:23
ReporterjonalegriaesarteView Statuspublic 
Assigned Topramakrishnan 
PrioritynormalResolutionfixedFixed in Version3.0PR14Q2
StatusclosedFix in branchFixed in SCM revisionb80b24804395
ProjectionnoneETAnoneTarget Version3.0PR14Q2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tojonalegriaesarte
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0024807: Close order should check if the order has prepayments associated

DescriptionClose order should check if the order has prepayments associated. In this case, it should check if the amount of the order is less than the prepayment associated to the order
Steps To Reproduce1) Create and book a sales order
2) Record a payment in against that sales order and process it
3) Close the sales order (which makes total zero)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0062473)
gauravdeshmukh (developer)
2013-12-02 06:50
edited on: 2014-01-16 08:28

1) Login with admin role
2) Create and book a sales order
3) Record a payment in against that sales order and process it
4) now goto sales order and try to close the sales order ,It will check if prepayment is associated with then following error message will be shown
 "Prepayment associated with order.

Point to consider

1.If prepayment amount is greater than amount of qty delivered then on close action of sales order should raise an exception as 'Prepayment associated with order'.
2.If prepayment amount is less than amount of qty delivered then sales order is closed with quantity= qtydelivered.
3.If No quantity is delivered/invoiced then on close action of sales order should raise an exception as 'Prepayment associated with order'.

Example:

Consider there is an order with to lines one with product A - 2.00(1 qty) and other product B - 3.00(1 qty). So the total gross of the order is 5.00(assume, there is no tax).

Now,

1. When there is a prepayment of amount 5.00 and qtydelivered = 0, then system should throw the error.
2. When there is a prepayment of amount 2.00 and qtydelivered = 0, then system should throw the error
3. When there is a prepayment of amount 3.00 and qtydelivered = 1(product B), then system should not throw any error. The system will already handle this case, by closing the order after changing the order gross amount to 3.00
4. When there is a prepayment of amount 5.00 and qtydelivered = 2(both product A & B), then system should not throw any error. This case is also already handled.
5. When there is no prepayment, then the order should be allowed to be closed.

(0062658)
eintelau (developer)
2013-12-06 05:17

Please note that it is valid to close a partially delivered sales order with a prepayment, as long as the final amount of the order is >= the prepayment.

e.g
1) Create sales order with 2 line of value $100 each
2) Book order
3) Add prepayment of $100
4) Ship first line of sales order
5) Close sales order

This will result in closed sales order with value $100 and payment of $100
(0063670)
eduardo_Argal (developer)
2014-01-24 11:45

we consider this not to be an issue.
Ex:
A customer registers an order for 100 units of product A and does a prepayment for that order. Afterwards the customer finds this is in fact wrong and does not want to continue with this order so wants to cancel that order.
System is allowing to close the order, setting qty and amount to 0. Once done that system still recognizes the order was originally fully paid. Anyway the payment details of the order changes. It now holds an additional detail to be paid against this 0 amount order of a negative amount of 100. This means that system allows to create a negative payment and return that money to the customer.

This will apply both for sales and purchase flows.
Please help me to understand why we should consider this as a bug, as at this point we consider this as a valid flow.

Thanks in advance
(0063941)
eintelau (developer)
2014-02-06 01:35

Hi,
The business flow you describe seems valid to me as well. So I am happy to keep that behaviour

However the original problem that prompted this issue was slightly different (see support case 23523).

If an order is closed with a prepayment & the user wants to reactivate that payment (e.g payment was recorded incorrectly), then the reactivate payment process fails with a NullPointerException because there is no invoice schedule associated with the payment.

thanks
Ben
(0064486)
gauravdeshmukh (developer)
2014-02-21 11:43
edited on: 2014-02-26 10:37

The description of the support case 23523, is:
"Steps to reproduce (MP24.2)
1) Create and book a sales order
2) Record a payment in against that sales order and process it
3) Close the sales order (which makes total zero)
4) Try to reactivate payment and delete lines

This results in an error caused by a NullPointException
java.lang.NullPointerException
at org.openbravo.advpaymentmngt.process.FIN_PaymentProcess.execute(FIN_PaymentProcess.java:796)

When the process tries to delete payment schedule details with amounts of zero, it doesn't check if it has a non-null Invoice (or Order)
schedule attached"

(0064774)
pramakrishnan (developer)
2014-03-04 07:25

Fixed in pi change set https://code.openbravo.com/erp/devel/pi/rev/87765308f9bd [^]
(0064809)
pramakrishnan (developer)
2014-03-05 09:43

Issue still reproducible
(0064811)
hgbot (developer)
2014-03-05 09:46

Repository: erp/devel/pi
Changeset: b80b2480439541f50e07aa6b46638e7eba65bf93
Author: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com>
Date: Wed Mar 05 14:14:21 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/b80b2480439541f50e07aa6b46638e7eba65bf93 [^]

Fixes Issue 24807: NPE when reactivate and delete the payment associated with closed order

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
(0064876)
hudsonbot (developer)
2014-03-06 04:24

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/94a044af1a46 [^]
Maturity status: Test
(0065381)
jonalegriaesarte (reporter)
2014-03-24 11:23

Tested and working fine.

- Issue History
Date Modified Username Field Change
2013-09-20 16:48 jonalegriaesarte New Issue
2013-09-20 16:48 jonalegriaesarte Assigned To => jonalegriaesarte
2013-09-20 16:48 jonalegriaesarte Modules => Core
2013-09-20 16:48 jonalegriaesarte Triggers an Emergency Pack => No
2013-10-14 16:37 jonalegriaesarte Target Version 3.0MP29 => 3.0MP30
2013-11-25 10:32 jonalegriaesarte Assigned To jonalegriaesarte => pramakrishnan
2013-12-02 06:50 gauravdeshmukh Note Added: 0062473
2013-12-02 09:55 jonalegriaesarte Target Version 3.0MP30 => 3.0MP31
2013-12-06 05:14 eintelau Issue Monitored: eintelau
2013-12-06 05:17 eintelau Note Added: 0062658
2013-12-11 09:53 pramakrishnan Assigned To pramakrishnan => gauravdeshmukh
2013-12-11 10:44 gauravdeshmukh Note Edited: 0062473 View Revisions
2014-01-02 12:38 jonalegriaesarte Target Version 3.0MP31 => 3.0MP32
2014-01-16 08:28 gauravdeshmukh Note Edited: 0062473 View Revisions
2014-01-24 11:45 eduardo_Argal Note Added: 0063670
2014-01-24 11:45 eduardo_Argal Status new => feedback
2014-02-06 01:35 eintelau Note Added: 0063941
2014-02-21 11:43 gauravdeshmukh Note Added: 0064486
2014-02-21 11:43 gauravdeshmukh Status feedback => scheduled
2014-02-26 10:37 gauravdeshmukh Note Edited: 0064486 View Revisions
2014-03-04 07:25 pramakrishnan Review Assigned To => pramakrishnan
2014-03-04 07:25 pramakrishnan Note Added: 0064774
2014-03-04 07:25 pramakrishnan Status scheduled => closed
2014-03-04 07:25 pramakrishnan Resolution open => no change required
2014-03-05 09:43 pramakrishnan Assigned To gauravdeshmukh => pramakrishnan
2014-03-05 09:43 pramakrishnan Note Added: 0064809
2014-03-05 09:43 pramakrishnan Status closed => new
2014-03-05 09:43 pramakrishnan Resolution no change required => open
2014-03-05 09:43 pramakrishnan Review Assigned To pramakrishnan => jonalegriaesarte
2014-03-05 09:43 pramakrishnan Status new => scheduled
2014-03-05 09:46 hgbot Checkin
2014-03-05 09:46 hgbot Note Added: 0064811
2014-03-05 09:46 hgbot Status scheduled => resolved
2014-03-05 09:46 hgbot Resolution open => fixed
2014-03-05 09:46 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b80b2480439541f50e07aa6b46638e7eba65bf93 [^]
2014-03-06 04:24 hudsonbot Checkin
2014-03-06 04:24 hudsonbot Note Added: 0064876
2014-03-24 11:23 jonalegriaesarte Note Added: 0065381
2014-03-24 11:23 jonalegriaesarte Status resolved => closed
2014-03-24 11:23 jonalegriaesarte Fixed in Version => PR14Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker