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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0019155
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 07. Sales managementmajoralways2011-11-23 16:582011-12-15 13:46
ReporterVictorVillarView Statuspublic 
Assigned Toumartirena 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision4b2a93e6cddd
ProjectionnoneETAnoneTarget Version2.50MP37
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.50MP35SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0019155: Buffer too small to concatenate strings in section "Create default Cash entry" in c_order_post1

DescriptionIn the section "Create default Cash entry" there is a concatenation and the variable v_DocumentNo is too small (200), in the function c_order_post1, when you post a Sales Order
Steps To ReproduceWhen you post a Sales Order, it happens the following concatenation:
 C_ORDER.DOCUMENTNO||' - '||C_BPARTNER.NAME||' - '||C_ORDER.GRANDTOTAL
and it stores in v_DocumentNo

We can see in PL/SQL c_order_post1 the definition of the variable:
v_DocumentNo VARCHAR (200)
and the section "Create default Cash entry" has the following code:

 /**************************************************************************
  * Create default Cash entry
  *************************************************************************/
  DECLARE
    v_PaymentRule VARCHAR(60) ;
    CUR_CB RECORD;
    v_debtPaymentID VARCHAR(32); --OBTG:varchar2--
    v_totalCash NUMERIC;
  v_CB_Curr VARCHAR(32); --OBTG:varchar2--
  BEGIN
    /* ALO
    */
    UPDATE C_DEBT_PAYMENT SET IsValid='Y' WHERE C_Order_ID=v_Record_ID;
    SELECT C_ORDER.PAYMENTRULE,
      C_ORDER.DOCUMENTNO||' - '||C_BPARTNER.NAME||' - '||C_ORDER.GRANDTOTAL,
      C_ORDER.GRANDTOTAL,
      C_ORDER.M_WAREHOUSE_ID
    INTO v_PaymentRule,
      v_DocumentNo,
      v_GrandTotal,
      v_M_Warehouse_ID
    FROM C_ORDER,
      C_BPARTNER
    WHERE C_ORDER.C_BPARTNER_ID=C_BPARTNER.C_BPARTNER_ID
      AND C_ORDER_ID=v_Record_ID;
    SELECT MAX(NAME)
    INTO v_WarehouseName
    FROM M_WAREHOUSE
    WHERE M_WAREHOUSE_ID=v_M_Warehouse_ID;
Proposed SolutionIt should be fix with the next statement:
substr(C_ORDER.DOCUMENTNO||' - '||C_BPARTNER.NAME||' - '||C_ORDER.GRANDTOTAL||' ...',1,200)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 00191543.0MP7 closedumartirena Buffer too small to concatenate strings in section "Create default Cash entry" in c_order_post1 

-  Notes
(0043824)
hgbot (developer)
2011-12-13 16:00

Repository: erp/stable/2.50
Changeset: 4b2a93e6cddd71b1da3c7c0945d85ae7d1bb5ca1
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Dec 13 11:54:45 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/4b2a93e6cddd71b1da3c7c0945d85ae7d1bb5ca1 [^]

Fixed Issue 0019155: concatenation too long for v_DocumentNo in c_order_post1

---
M src-db/database/model/functions/C_ORDER_POST1.xml
---
(0043879)
VictorVillar (developer)
2011-12-14 17:44

Verified
(0043888)
umartirena (reporter)
2011-12-15 10:50

Awaiting Test Verification
(0043896)
VictorVillar (developer)
2011-12-15 13:46

Verified

- Issue History
Date Modified Username Field Change
2011-11-23 16:59 VictorVillar Type defect => backport
2011-11-23 16:59 VictorVillar fix_in_branch => 2.50
2011-11-23 17:00 VictorVillar version 3.0MP5.1 => 2.50MP35
2011-11-23 17:00 VictorVillar Target Version 3.0MP7 => 2.50MP37
2011-12-02 14:10 jecharri Assigned To jonalegriaesarte => umartirena
2011-12-13 16:00 hgbot Checkin
2011-12-13 16:00 hgbot Note Added: 0043824
2011-12-13 16:00 hgbot Status scheduled => resolved
2011-12-13 16:00 hgbot Resolution open => fixed
2011-12-13 16:00 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/4b2a93e6cddd71b1da3c7c0945d85ae7d1bb5ca1 [^]
2011-12-14 17:44 VictorVillar Note Added: 0043879
2011-12-14 17:44 VictorVillar Status resolved => closed
2011-12-14 17:44 VictorVillar Fixed in Version => 2.50MP37
2011-12-15 10:50 umartirena Note Added: 0043888
2011-12-15 10:50 umartirena Status closed => new
2011-12-15 10:50 umartirena Resolution fixed => open
2011-12-15 10:50 umartirena Fixed in Version 2.50MP37 =>
2011-12-15 13:20 umartirena Status new => acknowledged
2011-12-15 13:21 umartirena Status acknowledged => scheduled
2011-12-15 13:21 umartirena fix_in_branch 2.50 => pi
2011-12-15 13:23 umartirena Status scheduled => resolved
2011-12-15 13:23 umartirena Resolution open => fixed
2011-12-15 13:46 VictorVillar Note Added: 0043896
2011-12-15 13:46 VictorVillar Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker