Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -r e5ba1336f9da src-db/database/model/functions/OBAWO_GETJSONDESCRIPTION.xml
- --- a/src-db/database/model/functions/OBAWO_GETJSONDESCRIPTION.xml Mon May 21 09:42:05 2018 +0200
- +++ b/src-db/database/model/functions/OBAWO_GETJSONDESCRIPTION.xml Mon May 21 13:29:59 2018 +0200
- @@ -38,6 +38,8 @@
- v_guaranteedate_label VARCHAR(2000);
- v_lot_label VARCHAR(2000);
- v_language_code VARCHAR(6);
- + v_att_set_instance_id_to_use VARCHAR(32);
- + v_ref_inv_id VARCHAR(32);
- TYPE RECORD IS REF CURSOR;
- Cur_Attribute RECORD;
- @@ -60,11 +62,20 @@
- v_json:=v_json || '"serialno":{"value":"' || v_serno || '","name":"serialno","label":"' || v_serno_label || '"},';
- v_json:=v_json || '"guaranteedate":{"value":"' || v_guaranteedate || '","name":"guaranteedate","label":"' || v_guaranteedate_label || '"}';
- + SELECT m_refinventory_id, parent_attributesetinstance_id
- + INTO v_ref_inv_id, v_att_set_instance_id_to_use
- + FROM m_attributesetinstance_id
- + WHERE m_attributesetinstance_id = p_attributesetinstance_id;
- +
- + IF (m_refinventory_id IS NULL) THEN
- + v_att_set_instance_id_to_use = p_attributesetinstance_id;
- + END IF;
- +
- FOR Cur_Attribute IN
- (SELECT mai.m_attribute_id as attributeId, coalesce(to_char(mai.value), '') as attributeValue, ma.name as attributeName
- FROM m_attributeinstance mai
- INNER JOIN m_attribute ma on (ma.m_attribute_id=mai.m_attribute_id)
- - WHERE mai.m_attributesetinstance_id = p_attributesetinstance_id
- + WHERE mai.m_attributesetinstance_id = v_att_set_instance_id_to_use
- ORDER BY ma.name)
- LOOP
- 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