details: https://code.openbravo.com/erp/devel/pi/rev/c2ba9553dc85 changeset: 28260:c2ba9553dc85 user: Atul Gaware <atul.gaware <at> openbravo.com> date: Wed Jan 13 21:13:18 2016 +0530 summary: Fixes Issue 31860:Cannot save a G/L Journal header with the date of the adjustment period if both periods are opened
c_chk_open_period returns value more than 1 in case standard period and adjustment period is open in which the date of GL journal is included. <> 1 check is failed in this case so check is changed to < 1 to show error message in case period id not available diffstat: src-db/database/model/triggers/GL_JOURNAL_CHK_RESTRICT_TRG.xml | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (30 lines): diff -r 33cb1870df6f -r c2ba9553dc85 src-db/database/model/triggers/GL_JOURNAL_CHK_RESTRICT_TRG.xml --- a/src-db/database/model/triggers/GL_JOURNAL_CHK_RESTRICT_TRG.xml Thu Jan 14 12:28:59 2016 +0100 +++ b/src-db/database/model/triggers/GL_JOURNAL_CHK_RESTRICT_TRG.xml Wed Jan 13 21:13:18 2016 +0530 @@ -19,7 +19,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2015 Openbravo SLU + * All portions are Copyright (C) 2001-2016 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************/ @@ -61,7 +61,7 @@ IF (:old.DateAcct <> :new.DateAcct and - c_chk_open_period(:new.AD_ORG_ID, :new.DATEACCT, null, :new.C_DOCTYPE_ID) <> 1) THEN + c_chk_open_period(:new.AD_ORG_ID, :new.DATEACCT, null, :new.C_DOCTYPE_ID) < 1) THEN RAISE_APPLICATION_ERROR(-20000, '@PeriodNotValid@'); END IF; @@ -75,7 +75,7 @@ IF(:NEW.Processed='Y') THEN RAISE_APPLICATION_ERROR(-20000, '@20501@') ; END IF; - IF (c_chk_open_period(:new.AD_ORG_ID, :new.DATEACCT, null, :new.C_DOCTYPE_ID) <> 1) THEN + IF (c_chk_open_period(:new.AD_ORG_ID, :new.DATEACCT, null, :new.C_DOCTYPE_ID) < 1) THEN RAISE_APPLICATION_ERROR(-20000, '@PeriodNotValid@'); END IF; END IF; ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits