Пример #1
0
        public void Verify(PXCache cache, object item, List <object> pars, ref bool?result, ref object value)
        {
            value = BqlHelper.GetOperandValue <TOrganizationIDField>(cache, item);

            result = (int?)value == GetOrganizationID(cache.Graph);

            if (pars != null)
            {
                pars.Add(BqlHelper.GetParameterValue(cache.Graph, BranchIDParameter));
            }
        }
        protected int?GetOrganizationIDRestrictinValue(PXGraph graph)
        {
            bool?useMasterCalendarParamValue = (bool?)BqlHelper.GetParameterValue(graph, UseMasterCalendarParameter);

            if (useMasterCalendarParamValue == true)
            {
                return(FinPeriod.organizationID.MasterValue);
            }

            return((int?)BqlHelper.GetParameterValue(graph, BranchIDParameter)
                   ?? (int?)BqlHelper.GetParameterValue(graph, OrganizationIDParameter));
        }
Пример #3
0
        protected int?GetOrganizationID(PXGraph graph)
        {
            int?branchID = (int?)BqlHelper.GetParameterValue(graph, BranchIDParameter);

            return(PXAccess.GetParentOrganizationID(branchID));
        }