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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0031701
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2015-12-14 12:082015-12-21 20:21
ReportermaiteView Statuspublic 
Assigned Tononofrancisco 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision1a0f60909e60
ProjectionnoneETAnoneTarget Version3.0PR16Q1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tovmromanos
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0031701: It is not possible to modify order's payment terms when related partial invoice is in Void status

DescriptionIt is not possible to modify order's payment terms when related partial invoice is in Void status. However, it is possible when related partial invoice is in Completed status
Steps To Reproduce1. Register Sales Order with qty=10 and complete
2. Register related Shipment with qty=3 and complete
3. Register related Sales Invoice with qty=3 and complete
4. Void sales invoice
5. Access Sales Order, Reactivate it and modify "Payment terms" (for example). Try to save it and following error will be raised
"Error
Saving failed. Document posted/processed Where: SQL statement "UPDATE C_Invoice SET PaymentRule=new.PaymentRule, C_PaymentTerm_ID=new.C_PaymentTerm_ID, DateAcct=new.DateAcct WHERE C_Order_ID=new.C_Order_ID AND DocStatus NOT IN('RE', 'CL', 'CO')" PL/pgSQL function "c_order_trg2" line 40 at SQL statement"

If you repeat same steps without Void invoice you will be able to modify Payment Terms
Proposed Solution"c_order_trg2" trigger should also consider VO status
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00309713.0PR16Q1 closedaferraz When voiding an unpaid invoice, payment schedule details should be canceled instead of deleted 
related to defect 00262423.0PR14Q3 closedAtulOpenbravo Orders could be reactivated although they have a related payment if it is not paid 

-  Notes
(0082825)
vmromanos (manager)
2015-12-17 13:10

Test plan:

As Openbravo admin

Create a new Physical Inventory
 Product = Agua sin gas
 Quantity = 1000
Process Inventory

Create a new sales order.
 Business Partner = Hoteles buenas noches
 Product = Agua sin gas
 Quantity = 10
Process order

Create a new Goods Shipment
 Business Partner = Hoteles buenas noches
 Press Create lines from and select previous order line
 Edit the line and change quantity to 3
Process the shipment

Create a new Sales Invoice
 Business Partner = Hoteles buenas noches
 Press Create lines from and select previous order line
 Edit the line and change quantity to 3
Process the invoice
Void the invoice
Verify a new payment for amount 0 has been automatically created to cancel the payment schedule lines

Go back to the previous sales order.
Try to reactivate it.
An error is shown informing it's linked to a payment.

Go to the payment and reactivate it.

Go back to the previous sales order and reactivate it.
Change the Payment term and save it.
Verify you can save it properly.
(0082826)
hgbot (developer)
2015-12-17 13:24

Repository: erp/devel/pi
Changeset: 1a0f60909e60384cb01a3dd62a7584f83a3073f6
Author: Nono <f.carballo <at> nectus.com>
Date: Tue Dec 15 12:57:28 2015 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/1a0f60909e60384cb01a3dd62a7584f83a3073f6 [^]

Fixes Issue 31701 It is not posible to modify order's payments ....
The C_ORDER_TRG2 trigger was updated to take into account sales invoices
with document status 'VO' when updating.

---
M src-db/database/model/triggers/C_ORDER_TRG2.xml
---
(0082827)
hgbot (developer)
2015-12-17 13:24

Repository: erp/devel/pi
Changeset: 6e39d4773c59411ce8a5618cbc5a82e81d908f83
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Dec 17 13:23:14 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6e39d4773c59411ce8a5618cbc5a82e81d908f83 [^]

Related to issue 31701: code review improvements

When reactivating an order, do not consider payments in Awaiting Payment status as payments really linked to the order. This is a way to ensure reactivation of orders already linked to a voided invoice is possible, because since 0030971 a 0 amount payment is automatically when voiding an invoice.
So the flow in that case will be to manually reactivate that payment, and then reactivate the order.

Updated copyright year.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_ORD.xml
M src-db/database/model/triggers/C_ORDER_TRG2.xml
---
(0082828)
vmromanos (manager)
2015-12-17 13:24

Code review + testing OK
(0082909)
hudsonbot (developer)
2015-12-21 20:21

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/1874af35afc7 [^]
Maturity status: Test
(0082910)
hudsonbot (developer)
2015-12-21 20:21

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

- Issue History
Date Modified Username Field Change
2015-12-14 12:08 maite New Issue
2015-12-14 12:08 maite Assigned To => Triage Finance
2015-12-14 12:08 maite Modules => Core
2015-12-14 12:08 maite Resolution time => 1451602800
2015-12-14 12:08 maite Triggers an Emergency Pack => No
2015-12-14 12:08 maite Issue Monitored: networkb
2015-12-17 11:17 vmromanos Status new => scheduled
2015-12-17 11:17 vmromanos Assigned To Triage Finance => nonofrancisco
2015-12-17 12:05 vmromanos Relationship added related to 0030971
2015-12-17 12:58 vmromanos Relationship added related to 0026242
2015-12-17 13:10 vmromanos Note Added: 0082825
2015-12-17 13:24 hgbot Checkin
2015-12-17 13:24 hgbot Note Added: 0082826
2015-12-17 13:24 hgbot Status scheduled => resolved
2015-12-17 13:24 hgbot Resolution open => fixed
2015-12-17 13:24 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1a0f60909e60384cb01a3dd62a7584f83a3073f6 [^]
2015-12-17 13:24 hgbot Checkin
2015-12-17 13:24 hgbot Note Added: 0082827
2015-12-17 13:24 vmromanos Review Assigned To => vmromanos
2015-12-17 13:24 vmromanos Note Added: 0082828
2015-12-17 13:24 vmromanos Status resolved => closed
2015-12-21 20:21 hudsonbot Checkin
2015-12-21 20:21 hudsonbot Note Added: 0082909
2015-12-21 20:21 hudsonbot Checkin
2015-12-21 20:21 hudsonbot Note Added: 0082910


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker