details: /erp/devel/pi/rev/c5e9de5472b5
changeset: 8768:c5e9de5472b5
user: Sivaraman Rajagopal <sivaraman.rajagopal <at> openbravo.com>
date: Thu Oct 28 17:56:55 2010 +0530
summary: Fixes issue 14315: Creation of good shipments fails if the product
search key has 32 characters
A_ASSET_CREATE is modified in order to truncate asset value to 40 chars before
to insert. Hence, it's working fine as expected.
diffstat:
src-db/database/model/functions/A_ASSET_CREATE.xml | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (28 lines):
diff -r 756333addf28 -r c5e9de5472b5
src-db/database/model/functions/A_ASSET_CREATE.xml
--- a/src-db/database/model/functions/A_ASSET_CREATE.xml Thu Oct 28
09:20:01 2010 +0200
+++ b/src-db/database/model/functions/A_ASSET_CREATE.xml Thu Oct 28
17:56:55 2010 +0530
@@ -54,6 +54,7 @@
v_Value VARCHAR2(60) ;
v_Name VARCHAR2(80) ;
v_count NUMBER:=0;
+ v_Asset_Value VARCHAR2(200) ;
BEGIN
-- Update AD_PInstance
IF(p_PInstance_ID IS NOT NULL) THEN
@@ -110,6 +111,7 @@
END IF;
v_Value:='_' || Cur_Shipline.Value || v_DocumentNo;
v_Name:='_' || Cur_Shipline.Name || v_DocumentNo;
+ v_Asset_Value:=SUBSTR(Cur_Shipline.BP_Value, 1, 40-LENGTH(v_Value))
|| v_Value;
--
INSERT
INTO A_Asset
@@ -120,7 +122,7 @@
LocationComment, C_BPartner_ID, C_BPartner_Location_ID,
AD_User_ID
)
VALUES
- (v_A_Asset_ID, Cur_Shipline.AD_Client_ID, Cur_Shipline.AD_Org_ID,
'Y', now(), '0', now(), '0', SUBSTR(Cur_Shipline.BP_Value, 1,
40-LENGTH(v_Value)) || v_Value, SUBSTR(Cur_Shipline.BP_Name, 1,
+ (v_A_Asset_ID, Cur_Shipline.AD_Client_ID, Cur_Shipline.AD_Org_ID,
'Y', now(), '0', now(), '0', SUBSTR(v_Asset_Value,1,40),
SUBSTR(Cur_Shipline.BP_Name, 1,
60-LENGTH(v_Name)) || v_Name, SUBSTR(Cur_Shipline.Description || '
' || Cur_Shipline.LineDescription, 1, 255), Cur_Shipline.Help,
Cur_Shipline.A_Asset_Group_ID, Cur_Shipline.M_Product_ID,
Cur_Shipline.VersionNo, Cur_Shipline.GuaranteeDate,
Cur_Shipline.MovementDate, 'N', 'N', null, 'N', v_DocumentNo,
Cur_Shipline.C_BPartner_ID, Cur_Shipline.C_BPartner_Location_ID,
Cur_Shipline.AD_User_ID) ;
DBMS_OUTPUT.PUT_LINE('A_Asset_ID=' || v_A_Asset_ID || ' - ' ||
Cur_Shipline.Value||v_DocumentNo) ;
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits