From 507e67026dce25c1d688036add806ebda035be61 Mon Sep 17 00:00:00 2001 From: hodianto Date: Tue, 10 Jul 2018 09:05:42 +0700 Subject: [PATCH] Validator for Stock --- andromedia.midsuit.feature/feature.xml | 59 ++++++++----------- .../midsuit/validator/MID_InOutValidator.java | 3 + 2 files changed, 29 insertions(+), 33 deletions(-) diff --git a/andromedia.midsuit.feature/feature.xml b/andromedia.midsuit.feature/feature.xml index 8c6eb08..2cc5415 100644 --- a/andromedia.midsuit.feature/feature.xml +++ b/andromedia.midsuit.feature/feature.xml @@ -1,33 +1,26 @@ - - - - - [Enter Feature Description here.] - - - - [Enter Copyright Description here.] - - - - [Enter License Description here.] - - - - - - - + + + + + [Enter Feature Description here.] + + + + [Enter Copyright Description here.] + + + + [Enter License Description here.] + + + + + diff --git a/andromeida.midsuit.project/src/andromedia/midsuit/validator/MID_InOutValidator.java b/andromeida.midsuit.project/src/andromedia/midsuit/validator/MID_InOutValidator.java index eb98ac0..0e1960b 100644 --- a/andromeida.midsuit.project/src/andromedia/midsuit/validator/MID_InOutValidator.java +++ b/andromeida.midsuit.project/src/andromedia/midsuit/validator/MID_InOutValidator.java @@ -24,6 +24,9 @@ public class MID_InOutValidator { .firstId(); InOut.setC_BPartner_Location_ID(C_BPartner_Location_ID); } + if(InOut.getC_Order().getDocStatus().equals("DR")) { + return "Failed to Create new Shipment / Receipt for this Order"+InOut.getC_Order().getDocumentNo(); + } return ""; } }