Fixes issue 23621: A good receipts can not be voided
authorJavier Etxarri <javier.echarri@openbravo.com>
Mon, 17 Jun 2013 13:42:03 +0200
changeset 20594 64f14e743de3
parent 20593 4060f2b5e6bd
child 20595 02a166134dac
Fixes issue 23621: A good receipts can not be voided
if the period is closed of the accounting date is closed
src-db/database/model/functions/M_INOUT_POST.xml
--- a/src-db/database/model/functions/M_INOUT_POST.xml	Sun Jun 16 12:36:52 2013 +0530
+++ b/src-db/database/model/functions/M_INOUT_POST.xml	Mon Jun 17 13:42:03 2013 +0200
@@ -314,9 +314,11 @@
         SELECT C_CHK_OPEN_PERIOD(v_AD_Org_ID, v_DateAcct, NULL, v_DocType_ID) 
         INTO v_available_period
         FROM DUAL;
-        
+
         IF (v_available_period<>1) THEN
-          RAISE_APPLICATION_ERROR(-20000, '@PeriodNotAvailable@');
+          IF (v_docAction <> 'RC') THEN
+             RAISE_APPLICATION_ERROR(-20000, '@PeriodNotAvailable@');
+          END IF;
         END IF;
       END IF;