/** * Close Document. * Status: Closed * @return true if success * */ public bool CloseIt() { if (_document != null && // orders can be closed any time _document.Get_Table_ID() == X_C_Order.Table_ID) { } else if (!IsValidAction(ACTION_CLOSE)) { return(false); } if (_document != null) { if (_document.CloseIt()) { _status = STATUS_CLOSED; _document.SetDocStatus(_status); return(true); } return(false); } _status = STATUS_CLOSED; return(true); }