Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0031701 | Openbravo ERP | 07. Sales management | public | 2015-12-14 12:08 | 2015-12-21 20:21 |
|
Reporter | maite | |
Assigned To | nonofrancisco | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | 3.0PR16Q1 | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | vmromanos |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0031701: It is not possible to modify order's payment terms when related partial invoice is in Void status |
Description | It 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 Reproduce | 1. 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 |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0030971 | 3.0PR16Q1 | closed | aferraz | When voiding an unpaid invoice, payment schedule details should be canceled instead of deleted | related to | defect | 0026242 | 3.0PR14Q3 | closed | AtulOpenbravo | Orders could be reactivated although they have a related payment if it is not paid |
|
Attached Files | |
|
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 | |
Notes |
|
|
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
|
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
|
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
---
|
|
|
|
|
|
|
|
|
|
|