Project:
| View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | ||||||||
| 0054104 | ||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
| defect | [Openbravo ERP] 07. Sales management | major | always | 2023-12-12 12:07 | 2024-01-08 09:45 | |||
| Reporter | sofidossant | View Status | public | |||||
| Assigned To | AtulOpenbravo | |||||||
| Priority | high | Resolution | fixed | Fixed in Version | PR24Q1 | |||
| Status | closed | Fix in branch | Fixed in SCM revision | |||||
| Projection | none | ETA | none | Target Version | ||||
| OS | Any | Database | Any | Java version | ||||
| OS Version | Database version | Ant version | ||||||
| Product Version | pi | SCM revision | ||||||
| Merge Request Status | approved | |||||||
| Review Assigned To | ||||||||
| OBNetwork customer | OBPS | |||||||
| Web browser | ||||||||
| Modules | Core | |||||||
| Support ticket | 82229 | |||||||
| Regression level | ||||||||
| Regression date | ||||||||
| Regression introduced in release | ||||||||
| Regression introduced by commit | ||||||||
| Triggers an Emergency Pack | No | |||||||
| Summary | 0054104: Error when I create the invoice from the shipment | |||||||
| Description | The problem arises when I have this case: Order with 1 line of quantity 2 I create the shipment from the create line from button, I add the order line, but twice, I should have 2 lines left in shipment with quantity 1. And then when completing and creating the invoice, the following error is created: "It is not possible to complete the invoice FO1025318 line 20. Order No. B2B1002923: Invoiced Quantity cannot be higher than Ordered Quantity." The error is in the function src-db/database/model/functions/C_INVOICE_POST.xml | |||||||
| Steps To Reproduce | I create an order with 1 line of quantity 2 I create the shipment from the create line from button, I add the order line, but twice, I should have 2 lines left in shipment with quantity 1. And then when completing and creating the invoice, the following error is created: "It is not possible to complete the invoice FO1025318 line 20. Order No. B2B1002923: Invoiced Quantity cannot be higher than Ordered Quantity." Video https://drive.google.com/file/d/1tyKw34gbiN09UKjvIM9eVPfynazKFaGj/view?usp=sharing [^] | |||||||
| Proposed Solution | The error is in the function src-db/database/model/functions/C_INVOICE_POST.xml In the part: FOR CurLines IN (SELECT * FROM C_INVOICELINE WHERE C_INVOICE_ID=v_Record_ID ORDER BY line) LOOP IF (CurLines.C_OrderLine_ID IS NOT NULL) THEN --Check that qty pending to invoice is higher or equal to the qty being invoiced SELECT o.documentno, ABS(ol.qtyordered) - ABS(ol.qtyinvoiced + CurLines.QtyInvoiced), p.isquantityvariable INTO v_ODocumentNo, v_NewPendingToInvoice, v_Isquantityvariable FROM c_order o, c_orderline ol LEFT JOIN m_product p ON p.m_product_id = ol.m_product_id WHERE o.c_order_id = ol.c_order_id AND ol.c_orderline_id = CurLines.c_orderline_id; IF (v_Isquantityvariable <> 'Y' AND v_NewPendingToInvoice <0) THEN v_Message := '@NotPossibleCompleteInvoice@' || ' ' || v_DocumentNo; v_Message := v_Message || ' ' || '@line@' || ' ' || CurLines.line || '. '; v_Message := v_Message || '@OrderDocumentno@' || ' ' || v_ODocumentNo; v_Message := v_Message || ': ' || '@QtyInvoicedHigherOrdered@' || '.'; RAISE_APPLICATION_ERROR(-20000, v_Message); END IF; We need to check the sum of quantity too. | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Relationships [ Relation Graph ]
[ Dependency Graph ]
|
||||||||
|
||||||||
Notes |
|
|
(0158098) aferraz (viewer) 2023-12-12 13:20 |
I'm not able to reproduce this bug. Can you explain in the steps to reproduce how do you create the invoice? |
|
(0158514) sdossantos (viewer) 2023-12-22 11:55 |
Could you see the video? |
|
(0158779) hgbot (developer) 2024-01-03 04:25 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1089 [^] |
|
(0158780) AtulOpenbravo (viewer) 2024-01-03 04:41 edited on: 2024-01-03 04:42 |
Test Plan - Login into Back Office - Create a Standard Sales Order with any product with Quantity more than 1 for example 2. - Complete the Sales Order. - Navigate to Goods Shipment. - Create header for the same business partner as in the Sales Order. - Using button process Create Lines From Shipment, add filter Sales Order, Choose proper Storage Bin that has stock for the product in the line. - This will add Goods Shipment line with qty as 2. Edit the line and make the Qty as 1. - Again using Create Lines From Shipment process add line for same order lines, edit the qty as 1 such a that same order line is shipped into multiple shipment line. - Complete the Shipment with Invoice if possible flag as true. - Realize that Invoice is created and processed successfully from Shipment. |
|
(0158831) hgbot (developer) 2024-01-03 16:32 |
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1089 [^] |
|
(0158832) hgbot (developer) 2024-01-03 16:32 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/openbravo [^] Changeset: a45cd9c53399669deb0b77c1ecde5bae0f3446f1 Author: Atul Gaware <atul.gaware@openbravo.com> Date: 03-01-2024 15:32:33 URL: https://gitlab.com/openbravo/product/openbravo/-/commit/a45cd9c53399669deb0b77c1ecde5bae0f3446f1 [^] Fixes ISSUE-54104: Error when create the invoice from the shipment --- M src/org/openbravo/materialmgmt/InvoiceGeneratorFromGoodsShipment.java --- |
|
(0158838) hgbot (developer) 2024-01-03 17:34 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/openbravo [^] Changeset: 3b965b1b21c48702b9da3caccb6807619ea14e64 Author: atul.gaware <atul.gaware@openbravo.com> Date: 03-01-2024 22:03:47 URL: https://gitlab.com/openbravo/product/openbravo/-/commit/3b965b1b21c48702b9da3caccb6807619ea14e64 [^] Revert "Fixes ISSUE-54104: Error when create the invoice from the shipment" This reverts commit a45cd9c53399669deb0b77c1ecde5bae0f3446f1. --- M src/org/openbravo/materialmgmt/InvoiceGeneratorFromGoodsShipment.java --- |
|
(0158862) hgbot (developer) 2024-01-04 13:33 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1093 [^] |
|
(0158922) hgbot (developer) 2024-01-08 09:45 |
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1093 [^] |
|
(0158923) hgbot (developer) 2024-01-08 09:45 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/openbravo [^] Changeset: 8c2f943cb5e00d1a30161fd73c1e45f1fffb78f1 Author: Atul Gaware <atul.gaware@openbravo.com> Date: 08-01-2024 08:45:26 URL: https://gitlab.com/openbravo/product/openbravo/-/commit/8c2f943cb5e00d1a30161fd73c1e45f1fffb78f1 [^] Fixes BUG-0054104: Error when create the invoice from the shipment --- M src/org/openbravo/materialmgmt/InvoiceGeneratorFromGoodsShipment.java --- |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2023-12-12 12:07 | sofidossant | New Issue | |
| 2023-12-12 12:07 | sofidossant | Assigned To | => Triage Omni OMS |
| 2023-12-12 12:07 | sofidossant | OBNetwork customer | => OBPS |
| 2023-12-12 12:07 | sofidossant | Modules | => Core |
| 2023-12-12 12:07 | sofidossant | Support ticket | => 82229 |
| 2023-12-12 12:07 | sofidossant | Triggers an Emergency Pack | => No |
| 2023-12-12 13:20 | aferraz | Note Added: 0158098 | |
| 2023-12-12 13:20 | aferraz | Assigned To | Triage Omni OMS => sofidossant |
| 2023-12-12 13:20 | aferraz | Status | new => feedback |
| 2023-12-12 13:41 | sofidossant | Status | feedback => new |
| 2023-12-12 13:41 | sofidossant | Steps to Reproduce Updated | View Revisions |
| 2023-12-12 14:21 | aferraz | Assigned To | sofidossant => Triage Omni OMS |
| 2023-12-22 11:55 | sdossantos | Note Added: 0158514 | |
| 2023-12-27 17:46 | aferraz | Assigned To | Triage Omni OMS => AtulOpenbravo |
| 2024-01-03 04:18 | AtulOpenbravo | Status | new => scheduled |
| 2024-01-03 04:25 | hgbot | Merge Request Status | => open |
| 2024-01-03 04:25 | hgbot | Note Added: 0158779 | |
| 2024-01-03 04:41 | AtulOpenbravo | Note Added: 0158780 | |
| 2024-01-03 04:42 | AtulOpenbravo | Note Edited: 0158780 | View Revisions |
| 2024-01-03 16:31 | hgbot | Merge Request Status | open => approved |
| 2024-01-03 16:32 | hgbot | Resolution | open => fixed |
| 2024-01-03 16:32 | hgbot | Status | scheduled => closed |
| 2024-01-03 16:32 | hgbot | Note Added: 0158831 | |
| 2024-01-03 16:32 | hgbot | Fixed in Version | => PR24Q1 |
| 2024-01-03 16:32 | hgbot | Note Added: 0158832 | |
| 2024-01-03 17:34 | hgbot | Note Added: 0158838 | |
| 2024-01-03 17:35 | AtulOpenbravo | Status | closed => new |
| 2024-01-03 17:35 | AtulOpenbravo | Resolution | fixed => open |
| 2024-01-03 17:35 | AtulOpenbravo | Fixed in Version | PR24Q1 => |
| 2024-01-03 17:35 | AtulOpenbravo | Status | new => scheduled |
| 2024-01-04 13:33 | hgbot | Note Added: 0158862 | |
| 2024-01-08 09:45 | hgbot | Note Added: 0158922 | |
| 2024-01-08 09:45 | hgbot | Resolution | open => fixed |
| 2024-01-08 09:45 | hgbot | Status | scheduled => closed |
| 2024-01-08 09:45 | hgbot | Fixed in Version | => PR24Q1 |
| 2024-01-08 09:45 | hgbot | Note Added: 0158923 | |
| 2024-01-18 08:31 | AtulOpenbravo | Relationship added | related to 0054379 |
| Copyright © 2000 - 2009 MantisBT Group |