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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0047045
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2021-06-09 16:462021-06-30 10:32
Reporterhector_hernaezView Statuspublic 
Assigned Tomarkmm82 
PriorityhighResolutionfixedFixed in VersionPR21Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0047045: In the backoffice when generating an invoice, the order reference of the associated sales order doesn't appear in the invoice

DescriptionWhen a sales order with an order reference is created, this order reference doesn't appear in the sales invoice which is created from the sales order
Steps To ReproduceEverything in the backoffice:
1.Generate the sales order with any product by entering, at the time of its creation, the Order Reference.
2. Make the book of the sales order
3.Generate the corresponding Goods Shipment and complete it.
4.Generate the Sales Invoice by selecting the order generated in step 1.
5. Observe that in the order reference field of the sales invoice, the order reference of the sales order associated doesn't appear.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0129286)
vmromanos (manager)
2021-06-09 18:31
edited on: 2021-06-09 18:34

Right now the C_Invoice.C_Order_ID field is automatically populated when the invoice belongs to a unique order. If the invoice is created from 2 or more orders, then the C_Order_ID field is empty.

Note that you can easily reach the order's reference through that C_Invoice.C_Order_ID column.


Proposed solution:
When manually creating a new Invoice header, if the Order Reference is filled, keep it and do not override it.
If it is empty (usual scenario), then fill it based on the C_Invoice.C_Order_ID order reference.

Maybe an insert/update trigger on the C_Invoice is the easiest and safest solution in this case.

(0129773)
markmm82 (developer)
2021-06-24 15:11
edited on: 2021-06-28 00:41

Test plan: Generating sales invoice lines from orders
1. Generate a sales order with any product by entering, at the time of its creation, the Order Reference = "Reference order". Complete it.
2. Generate the corresponding Goods Shipment and complete it.
3. Create a Sales Invoice header without defining its "Order reference".
   Notice that "Sales Order" field is empty.
4. Execute "Create Lines From Order" process.
5. Select all the lines related to previously created order.
   Notice that lines are created to the invoice.
   Notice that "Sales Order" field is now related to the order.
   Notice that "Order reference" value is now the same than order's reference = "Reference order".
6. Remove all the invoice lines.
   Notice that "Sales Order" field is empty.
   Notice that "Order reference" is empty.
7. Change the "Order reference" value to "Order reference mod" and save the invoice.
8. Execute "Create Lines From Order" process.
9. Select all the lines related to previously created order.
   Notice that lines are created to the invoice.
   Notice that "Sales Order" field is now related to the order.
   Notice that "Order reference" value wasn't updated and it still with = "Reference order mod" as value.
10. Remove all the invoice lines.
   Notice that "Sales Order" field is empty.
   Notice that "Order reference" still as "Order reference mod".

Repeat test for Purchase Invoices

(0129774)
markmm82 (developer)
2021-06-24 15:15
edited on: 2021-06-28 00:42

Test plan: Generating sales invoice lines from shipments
1. Generate a sales order with any product by entering, at the time of its creation, the Order Reference = "Reference order". Complete it.
2. Generate the corresponding Goods Shipment and complete it.
   Notice that Sales Order field is now related to the order.
3. Create a Sales Invoice header without defining its "Order reference".
   Notice that "Sales Order" field is empty.
4. Execute "Create Lines From Shipment" process.
5. Select all the lines related to previously created shipment.
   Notice that lines are created to the invoice.
   Notice that "Sales Order" field is now related to the shipment's sales order.
   Notice that "Order reference" value is now the same than sales order's reference = "Reference order".
6. Remove all the invoice lines.
   Notice that "Sales Order" field is empty.
   Notice that "Order reference" is empty.
7. Change the "Order reference" value to "Order reference mod" and save the invoice.
8. Execute "Create Lines From Shipment" process.
9. Select all the lines related to previously created shipment.
   Notice that lines are created to the invoice.
   Notice that "Sales Order" field is now related to the order.
   Notice that "Order reference" value wasn't updated and it still with = "Reference order mod" as value.
10. Remove all the invoice lines.
   Notice that "Sales Order" field is empty.
   Notice that "Order reference" still as "Reference order mod".

Repeat test for Purchase Invoices

(0129785)
hgbot (developer)
2021-06-24 20:33

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/408 [^]
(0129992)
hgbot (developer)
2021-06-30 10:32

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 20d6adc360b10855ed376fd3611a0db77e78eef6
Author: Mark Orlando Molina <markmm82@gmail.com>
Date: 2021-06-30T08:31:59+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/20d6adc360b10855ed376fd3611a0db77e78eef6 [^]

Fixes BUG-47045: Set the order reference to an invoice header when the Order is updated.

When the C_Order_Id is filled (insert/update), the corresponding reference no. is inserted
unless the user did manually enter any other value, which in this case it's kept.

When the C_Order_Id is removed, the reference no. is removed too only if it's exactly the
same value as the order being removed, otherwise it's kept (which means the user manually
entered any other reference here).

The logic is managed in a trigger, so any invoicing process will get the same logic.

---
M src-db/database/model/triggers/C_INVOICE_TRG.xml
---
(0129993)
hgbot (developer)
2021-06-30 10:32

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/408 [^]

- Issue History
Date Modified Username Field Change
2021-06-09 16:46 hector_hernaez New Issue
2021-06-09 16:46 hector_hernaez Assigned To => Triage Finance
2021-06-09 16:46 hector_hernaez Modules => Core
2021-06-09 16:46 hector_hernaez Resolution time => 1625004000
2021-06-09 16:46 hector_hernaez Triggers an Emergency Pack => No
2021-06-09 18:31 vmromanos Note Added: 0129286
2021-06-09 18:31 vmromanos Assigned To Triage Finance => markmm82
2021-06-09 18:34 vmromanos Note Edited: 0129286 View Revisions
2021-06-24 00:29 markmm82 Status new => scheduled
2021-06-24 15:11 markmm82 Note Added: 0129773
2021-06-24 15:15 markmm82 Note Added: 0129774
2021-06-24 15:16 markmm82 Note Edited: 0129773 View Revisions
2021-06-24 20:33 hgbot Note Added: 0129785
2021-06-28 00:41 markmm82 Note Edited: 0129773 View Revisions
2021-06-28 00:42 markmm82 Note Edited: 0129774 View Revisions
2021-06-30 10:32 hgbot Resolution open => fixed
2021-06-30 10:32 hgbot Status scheduled => closed
2021-06-30 10:32 hgbot Fixed in Version => PR21Q3
2021-06-30 10:32 hgbot Note Added: 0129992
2021-06-30 10:32 hgbot Note Added: 0129993


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker