Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0054104 | Openbravo ERP | 07. Sales management | public | 2023-12-12 12:07 | 2024-01-08 09:45 | |||||||
Reporter | sofidossant | |||||||||||
Assigned To | AtulOpenbravo | |||||||||||
Priority | high | Severity | major | Reproducibility | always | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | pi | |||||||||||
Target Version | Fixed in Version | PR24Q1 | ||||||||||
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. | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
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 | bug_revision_view_page.php?rev_id=27224#r27224 | |||||||||
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 | bug_revision_view_page.php?bugnote_id=0158780#r27286 | |||||||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|