Advertisement
Guest User

Untitled

a guest
May 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.73 KB | None | 0 0
  1. diff -r e5ba1336f9da src-db/database/model/functions/OBAWO_GETJSONDESCRIPTION.xml
  2. --- a/src-db/database/model/functions/OBAWO_GETJSONDESCRIPTION.xml  Mon May 21 09:42:05 2018 +0200
  3. +++ b/src-db/database/model/functions/OBAWO_GETJSONDESCRIPTION.xml  Mon May 21 13:29:59 2018 +0200
  4. @@ -38,6 +38,8 @@
  5.    v_guaranteedate_label VARCHAR(2000);
  6.    v_lot_label VARCHAR(2000);
  7.    v_language_code VARCHAR(6);
  8. +  v_att_set_instance_id_to_use VARCHAR(32);
  9. +  v_ref_inv_id VARCHAR(32);
  10.    TYPE RECORD IS REF CURSOR;
  11.    Cur_Attribute RECORD;
  12.    
  13. @@ -60,11 +62,20 @@
  14.    v_json:=v_json || '"serialno":{"value":"' || v_serno || '","name":"serialno","label":"' || v_serno_label || '"},';
  15.    v_json:=v_json || '"guaranteedate":{"value":"' || v_guaranteedate || '","name":"guaranteedate","label":"' || v_guaranteedate_label || '"}';
  16.  
  17. +  SELECT m_refinventory_id, parent_attributesetinstance_id
  18. +  INTO v_ref_inv_id, v_att_set_instance_id_to_use
  19. +  FROM m_attributesetinstance_id
  20. +  WHERE m_attributesetinstance_id = p_attributesetinstance_id;
  21. +  
  22. +  IF (m_refinventory_id IS NULL) THEN
  23. +    v_att_set_instance_id_to_use = p_attributesetinstance_id;
  24. +  END IF;
  25. +  
  26.    FOR Cur_Attribute IN
  27.      (SELECT mai.m_attribute_id as attributeId, coalesce(to_char(mai.value), '') as attributeValue, ma.name as attributeName
  28.       FROM m_attributeinstance mai
  29.       INNER JOIN m_attribute ma on (ma.m_attribute_id=mai.m_attribute_id)
  30. -     WHERE mai.m_attributesetinstance_id = p_attributesetinstance_id
  31. +     WHERE mai.m_attributesetinstance_id = v_att_set_instance_id_to_use
  32.       ORDER BY ma.name)
  33.    LOOP
  34.      v_json:=v_json || ',"' || Cur_Attribute.attributeId || '":{"value":"' || Cur_Attribute.attributeValue || '","name":"' || Cur_Attribute.attributeName || '"}';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement