Fixes issue 29211
authorEduardo Argal Guibert <eduardo.argal@openbravo.com>
Tue, 10 Mar 2015 13:58:57 +0100
changeset 26192 9cb33bf7fc79
parent 26191 efa53163ee0c
child 26193 1c38281215d7
Fixes issue 29211
Cannot complete a goods receipt with a line without attribute set value if it has a related prereservation.
Added coalesce when inserting to get default value
src-db/database/model/functions/M_INOUT_POST.xml
--- a/src-db/database/model/functions/M_INOUT_POST.xml	Mon Mar 16 18:01:47 2015 +0100
+++ b/src-db/database/model/functions/M_INOUT_POST.xml	Tue Mar 10 13:58:57 2015 +0100
@@ -610,7 +610,7 @@
                       ) VALUES (
                         get_uuid(), cur_reserve_stock.ad_client_id, cur_reserve_stock.ad_org_id, 'Y',
                         now(), v_user, now(), v_user,
-                        cur_reserve_stock.m_reservation_id, cur_inoutline.m_attributesetinstance_id, cur_inoutline.m_locator_id, cur_inoutline.c_orderline_id,
+                        cur_reserve_stock.m_reservation_id, coalesce(cur_inoutline.m_attributesetinstance_id,'0'), cur_inoutline.m_locator_id, cur_inoutline.c_orderline_id,
                         v_qtyaux, 0, cur_reserve_stock.isallocated
                       );
                     END IF;