private bool IsVehicleIdVIP(CDatM1 m1, ref bool isVIP, long cpmArticleDef = GlobalDefs.DEF_UNDEFINED_VALUE)
        {
            trace.Write(TraceLevel.Info, ">>IsVehicleIdVIP");
            bool fnResult = true;

            try
            {
                isVIP = false;

                COPSPlate strPlate    = m1.GetInVehicleID();
                COPSDate  odDate      = m1.GetInDate().Copy();
                long      lGroup      = m1.GetInGroup();
                long      lArticleDef = GlobalDefs.DEF_UNDEFINED_VALUE;

                tariffCalculator.FillTree();
                bool isVehicleIdVIP = database.IsVehicleIdVIP(tariffCalculator.GetTree(), ref strPlate, odDate, lGroup, ref lArticleDef, ref isVIP);
                if (!isVehicleIdVIP)
                {
                    throw new InvalidOperationException("Error getting last operation group");
                }

                if (isVIP && lArticleDef != GlobalDefs.DEF_UNDEFINED_VALUE)
                {
                    m1.SetInArticleDef((int)lArticleDef);
                }
                else if (isVIP && lArticleDef == GlobalDefs.DEF_UNDEFINED_VALUE)
                {
                    isVIP = isVIP && lArticleDef == cpmArticleDef;
                }

                m1.SetOutIsVIP(isVIP);
            }
            catch (Exception error)
            {
                trace.Write(TraceLevel.Error, error.ToLogString());
                fnResult = false;
            }


            trace.Write(TraceLevel.Info, "<<IsVehicleIdVIP");
            return(fnResult);
        }